$npx -y skills add tody-agent/codymaster --skill cm-startStart the CM Workflow to execute your objective from idea to production code.
| 1 | # Command: `/cm-start [your objective]` |
| 2 | |
| 3 | ## TL;DR |
| 4 | - **Use to** kick off a CM session — entry point |
| 5 | - **Detects**: stack (Phase 2), suggests skills, reads continuity + learnings |
| 6 | - **Next**: cm-brainstorm-idea or cm-planning |
| 7 | |
| 8 | > **Role: Workflow Orchestrator** — You assess complexity, select the right workflow depth, and drive execution from objective to production code. |
| 9 | |
| 10 | When this workflow is called, the AI Assistant should execute the following action sequence in the spirit of the **CodyMaster Kit**: |
| 11 | |
| 12 | 0. **Load Working Memory:** |
| 13 | Per `_shared/helpers.md#Load-Working-Memory` — **use Smart Spine order:** |
| 14 | 1. Check `.cm/context-bus.json` → any active pipeline? any prior skill output to reuse? |
| 15 | 2. Load L0 indexes: `learnings-index.md` (~100 tok) + `skeleton-index.md` (~500 tok) |
| 16 | 3. Scope-filter learnings via `cm_query` — only load what matches current objective |
| 17 | 4. Read `CONTINUITY.md` → set Active Goal to the new objective |
| 18 | 5. Run token budget check: `cm continuity budget` → confirm no category is over soft limit |
| 19 | |
| 20 | > ⚡ Total context load: ~700 tokens. Full load used to be ~3,200. |
| 21 | > Only escalate to L2 (full files) if L0 index explicitly flags a match. |
| 22 | 0.5. **Skill Coverage Check (Adaptive Discovery):** |
| 23 | - Scan the objective for technologies, frameworks, or patterns mentioned |
| 24 | - Cross-reference with `cm-skill-index` Layer 1 triggers |
| 25 | - If gap detected → trigger Discovery Loop from `cm-skill-mastery` Part C: |
| 26 | `npx skills find "{keyword}"` → review → ask user → install if approved |
| 27 | - Log any discovered skills to `.cm-skills-log.json` |
| 28 | |
| 29 | 0.6. **Stack & Tier Detection (Phase 2):** |
| 30 | - `cm stack detect --write` → writes `.cm/project-skills.md` (frameworks + suggested skills) |
| 31 | - `cm tier classify --write` → writes `.cm/project-tier.md` (LITE/STANDARD/PROFESSIONAL/ENTERPRISE) |
| 32 | - The tier sets the default Vibecoding mode and **adaptive depth**: |
| 33 | - LITE/STANDARD → render skill TL;DR only |
| 34 | - PROFESSIONAL/ENTERPRISE → render full protocol |
| 35 | - Inject the suggested-skills list into the skill chain shortlist |
| 36 | - These reports are token-light (~300 tok combined) and skipped if files exist and are <24h old |
| 37 | |
| 38 | 0.7. **Code Intelligence Setup (cm-codeintell):** |
| 39 | - **ALWAYS:** Run skeleton indexer → `bash scripts/index-codebase.sh` → `.cm/skeleton.md` |
| 40 | - Read `.cm/skeleton.md` (~5K tokens) → instant codebase understanding |
| 41 | - Count source files → determine intelligence level (MINIMAL/LITE/STANDARD/FULL) |
| 42 | - IF level >= LITE: generate architecture diagram → `.cm/architecture.mmd` |
| 43 | - IF level >= STANDARD: check CodeGraph → `codegraph status` → index if needed |
| 44 | - IF level >= STANDARD: also check qmd (cm-deep-search) for existing semantic vector databases and initialize/update if needed. |
| 45 | - Log intelligence level to `CONTINUITY.md` |
| 46 | |
| 47 | 1. **Understand Requirements (Planning & JTBD):** |
| 48 | - Read the objective provided in the `/cm-start` command. |
| 49 | - Analyze requirements, ask clarifying questions if needed (apply `cm-planning`). |
| 50 | - Consider multi-language support (i18n) from the start if the project requires it. |
| 51 | |
| 52 | 2. **Detect Project Level:** |
| 53 | Per `_shared/helpers.md#Project-Level-Detection` |
| 54 | - Analyze the objective to determine L0/L1/L2/L3 complexity |
| 55 | - Present detected level and recommended skill chain to the user |
| 56 | - Let user confirm or override the level |
| 57 | |
| 58 | 3. **Execute Based on Level:** |
| 59 | |
| 60 | **L0 (Micro):** Code + Test only |
| 61 | - Skip planning. Apply `cm-tdd` directly → `cm-quality-gate` |
| 62 | |
| 63 | **L1 (Small):** Planning lite → Code → Deploy |
| 64 | - Apply `cm-planning` (lightweight implementation plan) |
| 65 | - Apply `cm-tdd` + `cm-execution` → `cm-quality-gate` |
| 66 | |
| 67 | **L2 (Medium):** Full analysis flow |
| 68 | - Init OpenSpec (create `openspec/changes/[initiative-name]/` folder and artifacts manually) |
| 69 | - Apply `cm-brainstorm-idea` if problem is ambiguous |
| 70 | - Apply `cm-planning` (full implementation plan with OpenSpec `tasks.md`) |
| 71 | - Create `cm-tasks.json` from `tasks.md` → launch RARV autonomous execution |
| 72 | - Apply `cm-quality-gate` → `cm-safe-deploy` |
| 73 | |
| 74 | **L3 (Large):** Full + PRD + Architecture + Sprint |
| 75 | - Init OpenSpec (create `openspec/changes/[initiative-name]/` folder and artifacts manually) |
| 76 | - Apply `cm-brainstorm-idea` (mandatory) |
| 77 | - Apply `cm-planning` with FR/NFR requirement tracing |
| 78 | - Sprint planning → `openspec/changes/[objective]/tasks.md` sync with `cm-tasks.json` |
| 79 | - Apply `cm-execution` (Mode E: TRIZ-Parallel for speed) |
| 80 | - Apply `cm-quality-gate` → `cm-safe-deploy` |
| 81 | |
| 82 | 3. **Track Progress:** |
| 83 | - Create `openspec/changes/[objective]/tasks.md` (for standardized spec tracking) |
| 84 | - Create or update `cm-tasks.json` (for autonomous agent execution) |
| 85 | - Suggest `/cm-dashboard` for visual tracking |
| 86 | - Suggest `/cm-status` for quick terminal summary |
| 87 | |
| 88 | 4. |