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.
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
Related Documents
You must use artifacts for
<citation_instructions>If the assistant's response is based on content returned by the web_search, drive_search, google_drive_search, or google_drive_fetch tool, the assistant must always appropriately cite its response. Here are the rules for good citations:
starProject
- **Description:** Multilingual Document Layout Parsing in a Single Vision-Language Model
Prompts
<img width="395" alt="prompts.chat" src="https://github.com/user-attachments/assets/e0d0e32d-d2ce-4459-9f37-e951d9f4f5de" />
Daily Agent Tasks Framework
**Your Daily System for Working with Claude and Codex**