Cortex TMS: AI Prompt Library
Provides 12 project-aware prompt templates for AI collaboration, accessible via `cortex-tms prompt <name>`.
What this file does
Provides 12 project-aware prompt templates for AI collaboration, accessible via cortex-tms prompt <name>.
When to use it
- Starting a new session and need context from project docs
- Implementing a feature with architecture and pattern constraints
- Debugging an issue with known troubleshooting references
- Onboarding to a new Cortex TMS project with placeholder docs
Assumes this stack
Cortex TMS: AI Prompt Library
This file contains project-aware prompt templates for streamlined AI collaboration. Use cortex-tms prompt <name> to quickly access these prompts.
init-session
Review NEXT-TASKS.md, docs/core/ARCHITECTURE.md, and CLAUDE.md. Summarize current priorities and propose a step-by-step plan for the next task.
feature
Implement [FEATURE]. First, check ARCHITECTURE.md for constraints, follow PATTERNS.md for style, and validate logic against DOMAIN-LOGIC.md.
debug
I'm seeing [ISSUE]. Check docs/core/TROUBLESHOOTING.md for known issues, then trace the logic through ARCHITECTURE.md to find the failure point.
review
Review the current changes against PATTERNS.md. Flag any violations of project conventions and suggest specific fixes.
refactor
Refactor [COMPONENT]. Improve structure per PATTERNS.md while ensuring behavior remains strictly compliant with DOMAIN-LOGIC.md.
decision
We need to decide on [TOPIC]. Draft a new Architecture Decision Record in docs/core/DECISIONS.md using the project's standard format.
finish
Task complete. Execute the Maintenance Protocol:
- Run
pnpm run docs:syncto ensure version integrity across documentation - Update
NEXT-TASKS.mdwith task status and next priorities - Run
node bin/cortex-tms.js validate --strictto verify project health - Follow Git Protocol: commit with conventional format and co-authorship
- Suggest next priority from backlog
bootstrap
You have just been added to a project that uses Cortex TMS for AI governance. The documentation files exist but contain placeholder content that needs to be populated with real project information.
Your task: Analyze this codebase and populate the TMS documentation files as DRAFTS for human review.
Step 1 - Understand the project:
- Read
package.json(or equivalent) for tech stack and dependencies - Scan the directory structure to understand components
- Read entry points (
src/index.*,src/app.*,bin/*) - Read any existing README.md for project context
Step 2 - Populate ARCHITECTURE.md (docs/core/ARCHITECTURE.md):
- Fill "Quick Context" with what the project does, who it's for, key constraint
- Fill "System Overview" with 2-3 sentences about the system
- Fill "Component Map" table with real components from the codebase
- Fill "Core Data Flow" with the actual happy path
- Mark all populated sections with:
<!-- AI-DRAFT: Review before treating as canonical -->
Step 3 - Customize CLAUDE.md:
- Update CLI commands with the project's actual commands (from package.json scripts)
- Add project-specific operational loop steps
- Add any project-specific rules or conventions you observed
Step 4 - Customize copilot-instructions.md (.github/copilot-instructions.md):
- Fill in the actual tech stack
- Add real conventions observed in the code
- Add project-specific prohibitions
Step 5 - Populate NEXT-TASKS.md:
- If there are open TODOs, issues, or incomplete features, suggest initial tasks
- Otherwise, suggest "Review AI-generated documentation" as first task
Rules:
- Be SPECIFIC to this project - no generic advice
- Reference actual file paths from the codebase
- Mark every generated section with
<!-- AI-DRAFT -->comment - Ask the user to confirm before writing each file
- If unsure about something, ASK rather than guess
- Do NOT open or send content from
.env*,*.pem,id_rsa*, or similar secret files - Skip
node_modules/,dist/,build/,coverage/,.git/
populate-architecture
Analyze this codebase and populate docs/core/ARCHITECTURE.md:
- Read
package.jsonfor tech stack, then scansrc/directory structure - Fill "Quick Context": what it does, who it's for, key constraint
- Fill "Component Map": real components with responsibilities and tech stack
- Fill "Core Data Flow": trace the main happy path from entry point to output
- Fill "Deployment & Infrastructure" from config files and CI workflows
Be specific to THIS project. Reference actual file paths. Mark sections with
<!-- AI-DRAFT: Review before treating as canonical -->.
Present the draft and ask for confirmation before writing.
discover-patterns
Review this codebase and document patterns for docs/core/PATTERNS.md:
- Scan representative files in
src/for recurring conventions - Identify: naming conventions, error handling, component structure, testing patterns
- For each pattern, find a canonical example (actual file path + code snippet)
- Document as "Pattern N: Name" with Rule, Anti-Pattern, and Canonical Example
Extract ACTUAL patterns from code, not generic best practices.
Mark all entries with <!-- AI-DRAFT -->. Present draft for review before writing.
extract-rules
Extract domain-specific rules for docs/core/DOMAIN-LOGIC.md:
- Look for validation logic (schemas, validators, form rules)
- Look for business rules (calculations, state machines, conditionals)
- Look for integration constraints (API limits, timeouts, rate limits)
- Look for security rules (auth checks, input sanitization)
For each rule: write a clear imperative statement, cite the source file,
and mark severity (critical/important/guideline).
Mark all entries with <!-- AI-DRAFT -->. Present draft for review before writing.
Usage Tips
- Replace placeholders like
[FEATURE],[ISSUE],[COMPONENT],[TOPIC]with your specific context - Customize these prompts to match your team's vocabulary and workflow
- Run
cortex-tms prompt --listto see all available prompts
What's inside
12 prompt templates: init-session, feature, debug, review, refactor, decision, finish, bootstrap, populate-architecture, discover-patterns, extract-rules, plus usage tips
Change this for your project
- Replace
cortex-tmswith your own CLI tool name if different - Replace
pnpm run docs:syncwith your project's actual doc sync command - Replace
node bin/cortex-tms.js validate --strictwith your own health check command
Where it goes
A prompt collection. Copy the individual prompts you need rather than the whole file.
Worth borrowing
- Templates reference specific project docs (ARCHITECTURE.md, PATTERNS.md) to keep AI context-aware
- Bootstrap prompt provides a step-by-step onboarding script for populating placeholder docs
Related Documents
starProject
Lists 120+ starred open-source projects across AI, DevOps, Flutter, and web development for discovery and inspiration.
midjourney-expert
Serves as a reference for Midjourney V7/Niji 7 prompting, covering parameters, reference systems, editing tools, and moderation workarounds.
🎣 Hooks & Headlines Generator
Generates 20, 30 headline variations across 10 proven formulas, with psychological reasoning and platform-specific best practices.
Daily Agent Tasks Framework
Gives you a daily structure for assigning strategic work to Claude and development work to Codex, organized by project priority and current sprint.