| name | new-command |
| description | Scaffold a new CLI command for Cortex TMS following the existing codebase patterns. Use when this capability is needed. |
| metadata | {"author":"cortex-tms"} |
New Command
Scaffold a new CLI command for Cortex TMS.
Before Writing Code
- Read existing patterns — look at src/commands/archive.ts and src/commands/status.ts as reference implementations
- Read types — check src/types/cli.ts for existing interfaces
- Read tests — check src/tests/archive.test.ts for the test pattern
- Propose the command — describe what it does, its subcommands/options, and which files will be created/modified. Follow Propose/Justify/Recommend. Wait for approval.
Implementation Checklist
After the user approves the plan:
Rules
- Match the exact patterns in existing commands (Commander.js, chalk, ora)
- Follow existing test patterns (vitest, createTempDir, runCommand)
- If the user asks a question, STOP and answer before continuing
- Show git diff before committing. Wait for approval.
Arguments
$ARGUMENTS — the name and purpose of the new command
Source: cortex-tms/cortex-tms — distributed by TomeVault.