maxsimcli 4.8.0 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/dist/assets/CHANGELOG.md +13 -0
  2. package/dist/assets/hooks/maxsim-check-update.cjs +38 -0
  3. package/dist/assets/hooks/maxsim-check-update.cjs.map +1 -1
  4. package/dist/assets/hooks/maxsim-statusline.cjs +116 -48
  5. package/dist/assets/hooks/maxsim-statusline.cjs.map +1 -1
  6. package/dist/assets/hooks/maxsim-sync-reminder.cjs +117 -0
  7. package/dist/assets/hooks/maxsim-sync-reminder.cjs.map +1 -0
  8. package/dist/assets/templates/agents/AGENTS.md +78 -106
  9. package/dist/assets/templates/agents/executor.md +101 -0
  10. package/dist/assets/templates/agents/planner.md +86 -0
  11. package/dist/assets/templates/agents/researcher.md +71 -0
  12. package/dist/assets/templates/agents/verifier.md +88 -0
  13. package/dist/assets/templates/commands/maxsim/debug.md +7 -7
  14. package/dist/assets/templates/commands/maxsim/execute.md +45 -0
  15. package/dist/assets/templates/commands/maxsim/go.md +29 -0
  16. package/dist/assets/templates/commands/maxsim/help.md +2 -2
  17. package/dist/assets/templates/commands/maxsim/init.md +52 -0
  18. package/dist/assets/templates/commands/maxsim/plan.md +50 -0
  19. package/dist/assets/templates/commands/maxsim/progress.md +4 -3
  20. package/dist/assets/templates/commands/maxsim/quick.md +6 -4
  21. package/dist/assets/templates/commands/maxsim/settings.md +4 -3
  22. package/dist/assets/templates/references/continuation-format.md +16 -16
  23. package/dist/assets/templates/references/model-profile-resolution.md +1 -1
  24. package/dist/assets/templates/references/model-profiles.md +12 -19
  25. package/dist/assets/templates/rules/conventions.md +51 -0
  26. package/dist/assets/templates/rules/verification-protocol.md +57 -0
  27. package/dist/assets/templates/skills/agent-system-map/SKILL.md +92 -0
  28. package/dist/assets/templates/skills/brainstorming/SKILL.md +48 -36
  29. package/dist/assets/templates/skills/code-review/SKILL.md +40 -61
  30. package/dist/assets/templates/skills/commit-conventions/SKILL.md +75 -0
  31. package/dist/assets/templates/skills/evidence-collection/SKILL.md +87 -0
  32. package/dist/assets/templates/skills/handoff-contract/SKILL.md +70 -0
  33. package/dist/assets/templates/skills/input-validation/SKILL.md +51 -0
  34. package/dist/assets/templates/skills/maxsim-batch/SKILL.md +41 -45
  35. package/dist/assets/templates/skills/maxsim-simplify/SKILL.md +37 -90
  36. package/dist/assets/templates/skills/memory-management/SKILL.md +32 -67
  37. package/dist/assets/templates/skills/research-methodology/SKILL.md +137 -0
  38. package/dist/assets/templates/skills/roadmap-writing/SKILL.md +40 -58
  39. package/dist/assets/templates/skills/sdd/SKILL.md +34 -69
  40. package/dist/assets/templates/skills/systematic-debugging/SKILL.md +20 -26
  41. package/dist/assets/templates/skills/tdd/SKILL.md +25 -33
  42. package/dist/assets/templates/skills/tool-priority-guide/SKILL.md +80 -0
  43. package/dist/assets/templates/skills/using-maxsim/SKILL.md +42 -73
  44. package/dist/assets/templates/skills/verification-before-completion/SKILL.md +12 -24
  45. package/dist/assets/templates/skills/verification-gates/SKILL.md +169 -0
  46. package/dist/assets/templates/templates/UAT.md +3 -3
  47. package/dist/assets/templates/templates/VALIDATION.md +1 -1
  48. package/dist/assets/templates/templates/context.md +4 -4
  49. package/dist/assets/templates/templates/debug-subagent-prompt.md +3 -3
  50. package/dist/assets/templates/templates/discovery.md +2 -2
  51. package/dist/assets/templates/templates/phase-prompt.md +2 -2
  52. package/dist/assets/templates/templates/planner-subagent-prompt.md +7 -7
  53. package/dist/assets/templates/templates/project.md +1 -1
  54. package/dist/assets/templates/templates/research.md +1 -1
  55. package/dist/assets/templates/templates/state.md +2 -2
  56. package/dist/assets/templates/templates/summary.md +41 -0
  57. package/dist/assets/templates/workflows/batch.md +5 -5
  58. package/dist/assets/templates/workflows/diagnose-issues.md +2 -2
  59. package/dist/assets/templates/workflows/discovery-phase.md +3 -3
  60. package/dist/assets/templates/workflows/discuss-phase.md +11 -11
  61. package/dist/assets/templates/workflows/execute-phase.md +205 -11
  62. package/dist/assets/templates/workflows/execute-plan.md +299 -34
  63. package/dist/assets/templates/workflows/execute.md +421 -0
  64. package/dist/assets/templates/workflows/go.md +250 -0
  65. package/dist/assets/templates/workflows/health.md +5 -5
  66. package/dist/assets/templates/workflows/help.md +165 -435
  67. package/dist/assets/templates/workflows/init-existing.md +23 -23
  68. package/dist/assets/templates/workflows/init.md +205 -0
  69. package/dist/assets/templates/workflows/new-milestone.md +9 -9
  70. package/dist/assets/templates/workflows/new-project.md +26 -26
  71. package/dist/assets/templates/workflows/plan-create.md +298 -0
  72. package/dist/assets/templates/workflows/plan-discuss.md +347 -0
  73. package/dist/assets/templates/workflows/plan-phase.md +29 -29
  74. package/dist/assets/templates/workflows/plan-research.md +177 -0
  75. package/dist/assets/templates/workflows/plan.md +231 -0
  76. package/dist/assets/templates/workflows/progress.md +46 -42
  77. package/dist/assets/templates/workflows/quick.md +195 -14
  78. package/dist/assets/templates/workflows/research-phase.md +5 -5
  79. package/dist/assets/templates/workflows/sdd.md +20 -12
  80. package/dist/assets/templates/workflows/settings.md +18 -14
  81. package/dist/assets/templates/workflows/verify-phase.md +1 -1
  82. package/dist/assets/templates/workflows/verify-work.md +16 -16
  83. package/dist/cli.cjs +496 -91
  84. package/dist/cli.cjs.map +1 -1
  85. package/dist/core-D5zUr9cb.cjs.map +1 -1
  86. package/dist/install.cjs +234 -17
  87. package/dist/install.cjs.map +1 -1
  88. package/dist/mcp-server.cjs +21 -2
  89. package/dist/mcp-server.cjs.map +1 -1
  90. package/dist/skills-CjFWZIGM.cjs.map +1 -1
  91. package/package.json +1 -1
  92. package/dist/assets/hooks/maxsim-context-monitor.cjs +0 -121
  93. package/dist/assets/hooks/maxsim-context-monitor.cjs.map +0 -1
  94. package/dist/assets/templates/agents/maxsim-code-reviewer.md +0 -239
  95. package/dist/assets/templates/agents/maxsim-codebase-mapper.md +0 -214
  96. package/dist/assets/templates/agents/maxsim-debugger.md +0 -572
  97. package/dist/assets/templates/agents/maxsim-drift-checker.md +0 -522
  98. package/dist/assets/templates/agents/maxsim-executor.md +0 -504
  99. package/dist/assets/templates/agents/maxsim-integration-checker.md +0 -273
  100. package/dist/assets/templates/agents/maxsim-phase-researcher.md +0 -305
  101. package/dist/assets/templates/agents/maxsim-plan-checker.md +0 -343
  102. package/dist/assets/templates/agents/maxsim-planner.md +0 -610
  103. package/dist/assets/templates/agents/maxsim-project-researcher.md +0 -359
  104. package/dist/assets/templates/agents/maxsim-research-synthesizer.md +0 -263
  105. package/dist/assets/templates/agents/maxsim-roadmapper.md +0 -324
  106. package/dist/assets/templates/agents/maxsim-spec-reviewer.md +0 -245
  107. package/dist/assets/templates/agents/maxsim-verifier.md +0 -393
  108. package/dist/assets/templates/commands/maxsim/add-phase.md +0 -43
  109. package/dist/assets/templates/commands/maxsim/add-tests.md +0 -41
  110. package/dist/assets/templates/commands/maxsim/add-todo.md +0 -57
  111. package/dist/assets/templates/commands/maxsim/artefakte.md +0 -122
  112. package/dist/assets/templates/commands/maxsim/audit-milestone.md +0 -36
  113. package/dist/assets/templates/commands/maxsim/batch.md +0 -42
  114. package/dist/assets/templates/commands/maxsim/check-drift.md +0 -56
  115. package/dist/assets/templates/commands/maxsim/check-todos.md +0 -46
  116. package/dist/assets/templates/commands/maxsim/cleanup.md +0 -18
  117. package/dist/assets/templates/commands/maxsim/complete-milestone.md +0 -136
  118. package/dist/assets/templates/commands/maxsim/discuss-phase.md +0 -87
  119. package/dist/assets/templates/commands/maxsim/discuss.md +0 -70
  120. package/dist/assets/templates/commands/maxsim/execute-phase.md +0 -41
  121. package/dist/assets/templates/commands/maxsim/health.md +0 -22
  122. package/dist/assets/templates/commands/maxsim/init-existing.md +0 -46
  123. package/dist/assets/templates/commands/maxsim/insert-phase.md +0 -32
  124. package/dist/assets/templates/commands/maxsim/list-phase-assumptions.md +0 -46
  125. package/dist/assets/templates/commands/maxsim/map-codebase.md +0 -71
  126. package/dist/assets/templates/commands/maxsim/new-milestone.md +0 -44
  127. package/dist/assets/templates/commands/maxsim/new-project.md +0 -46
  128. package/dist/assets/templates/commands/maxsim/pause-work.md +0 -38
  129. package/dist/assets/templates/commands/maxsim/plan-milestone-gaps.md +0 -34
  130. package/dist/assets/templates/commands/maxsim/plan-phase.md +0 -44
  131. package/dist/assets/templates/commands/maxsim/realign.md +0 -39
  132. package/dist/assets/templates/commands/maxsim/reapply-patches.md +0 -110
  133. package/dist/assets/templates/commands/maxsim/remove-phase.md +0 -31
  134. package/dist/assets/templates/commands/maxsim/research-phase.md +0 -189
  135. package/dist/assets/templates/commands/maxsim/resume-work.md +0 -40
  136. package/dist/assets/templates/commands/maxsim/roadmap.md +0 -19
  137. package/dist/assets/templates/commands/maxsim/sdd.md +0 -39
  138. package/dist/assets/templates/commands/maxsim/set-profile.md +0 -34
  139. package/dist/assets/templates/commands/maxsim/update.md +0 -37
  140. package/dist/assets/templates/commands/maxsim/verify-work.md +0 -38
  141. package/dist/assets/templates/workflows/add-phase.md +0 -111
  142. package/dist/assets/templates/workflows/add-tests.md +0 -351
  143. package/dist/assets/templates/workflows/add-todo.md +0 -247
  144. package/dist/assets/templates/workflows/audit-milestone.md +0 -297
  145. package/dist/assets/templates/workflows/check-drift.md +0 -248
  146. package/dist/assets/templates/workflows/check-todos.md +0 -261
  147. package/dist/assets/templates/workflows/cleanup.md +0 -153
  148. package/dist/assets/templates/workflows/complete-milestone.md +0 -701
  149. package/dist/assets/templates/workflows/discuss.md +0 -343
  150. package/dist/assets/templates/workflows/insert-phase.md +0 -129
  151. package/dist/assets/templates/workflows/list-phase-assumptions.md +0 -178
  152. package/dist/assets/templates/workflows/map-codebase.md +0 -315
  153. package/dist/assets/templates/workflows/pause-work.md +0 -122
  154. package/dist/assets/templates/workflows/plan-milestone-gaps.md +0 -274
  155. package/dist/assets/templates/workflows/realign.md +0 -288
  156. package/dist/assets/templates/workflows/remove-phase.md +0 -154
  157. package/dist/assets/templates/workflows/resume-project.md +0 -306
  158. package/dist/assets/templates/workflows/roadmap.md +0 -130
  159. package/dist/assets/templates/workflows/set-profile.md +0 -81
  160. package/dist/assets/templates/workflows/transition.md +0 -544
  161. package/dist/assets/templates/workflows/update.md +0 -220
@@ -1,247 +0,0 @@
1
- <purpose>
2
- Capture an idea, task, or issue that surfaces during a MAXSIM session as a structured todo for later work. Enables "thought → capture → continue" flow without losing context.
3
- </purpose>
4
-
5
- <required_reading>
6
- Read all files referenced by the invoking prompt's execution_context before starting.
7
- @./references/dashboard-bridge.md
8
- @./references/thinking-partner.md
9
- </required_reading>
10
-
11
- <process>
12
-
13
- <step name="init_context">
14
- Load todo context:
15
-
16
- ```bash
17
- INIT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs init todos)
18
- ```
19
-
20
- Extract from init JSON: `commit_docs`, `date`, `timestamp`, `todo_count`, `todos`, `pending_dir`, `todos_dir_exists`.
21
-
22
- Ensure directories exist:
23
- ```bash
24
- mkdir -p .planning/todos/pending .planning/todos/done
25
- ```
26
-
27
- Note existing areas from the todos array for consistency in infer_area step.
28
- </step>
29
-
30
- <step name="extract_content">
31
- **With arguments:** Use as the title/focus.
32
- - `/maxsim:add-todo Add auth token refresh` → title = "Add auth token refresh"
33
-
34
- **Without arguments:** Analyze recent conversation to extract:
35
- - The specific problem, idea, or task discussed
36
- - Relevant file paths mentioned
37
- - Technical details (error messages, line numbers, constraints)
38
-
39
- Formulate:
40
- - `title`: 3-10 word descriptive title (action verb preferred)
41
- - `problem`: What's wrong or why this is needed
42
- - `solution`: Approach hints or "TBD" if just an idea
43
- - `files`: Relevant paths with line numbers from conversation
44
- </step>
45
-
46
- <step name="discussion_mode">
47
- **Discussion mode triggers:**
48
-
49
- 1. `--discuss` flag is present in $ARGUMENTS
50
- 2. Complexity detected: title contains "refactor", "redesign", "migrate", "architecture", or problem description exceeds 3 sentences
51
-
52
- **If neither trigger:** Skip to infer_area (quick-add path).
53
-
54
- **If discussion mode activated:**
55
-
56
- ```
57
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
58
- MAXSIM ► TODO DISCUSSION
59
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
60
- ```
61
-
62
- Apply thinking-partner behaviors to clarify the todo before filing:
63
-
64
- **Round 1 — Scope clarification (2-3 questions):**
65
-
66
- Use AskUserQuestion to probe:
67
- - What exactly is the problem? (Challenge vagueness)
68
- - What does "done" look like for this? (Make abstract concrete)
69
- - Is this one thing or multiple things? (Surface hidden scope)
70
-
71
- **Round 2 — Approach exploration (2-3 questions):**
72
-
73
- Use AskUserQuestion to explore:
74
- - What approaches have you considered? (Propose alternatives with trade-offs)
75
- - What constraints exist? (Surface unstated assumptions)
76
- - What could go wrong? (Make consequences visible)
77
-
78
- **Round 3 — Readiness check:**
79
-
80
- Use AskUserQuestion:
81
- - header: "Todo"
82
- - question: "Ready to file this todo?"
83
- - options:
84
- - "File it" -- Capture what we discussed
85
- - "Keep discussing" -- I want to explore more
86
- - "Split into multiple" -- This is actually several todos
87
-
88
- If "Keep discussing": ask 2-3 more probing questions, then check again.
89
- If "Split into multiple": help user define 2-3 separate todos, file each one.
90
- If "File it": continue to infer_area.
91
-
92
- **Discussion mode enriches the todo file** — the Problem section includes discussion insights, and a new "## Approach" section captures approach decisions (replacing "## Solution" with richer content).
93
-
94
- **Time budget:** 20-30 minutes max. After 6 rounds of questions, offer to file what you have.
95
- </step>
96
-
97
- <step name="infer_area">
98
- Infer area from file paths:
99
-
100
- | Path pattern | Area |
101
- |--------------|------|
102
- | `src/api/*`, `api/*` | `api` |
103
- | `src/components/*`, `src/ui/*` | `ui` |
104
- | `src/auth/*`, `auth/*` | `auth` |
105
- | `src/db/*`, `database/*` | `database` |
106
- | `tests/*`, `__tests__/*` | `testing` |
107
- | `docs/*` | `docs` |
108
- | `.planning/*` | `planning` |
109
- | `scripts/*`, `bin/*` | `tooling` |
110
- | No files or unclear | `general` |
111
-
112
- Use existing area from step 2 if similar match exists.
113
- </step>
114
-
115
- <step name="check_duplicates">
116
- ```bash
117
- # Search for key words from title in existing todos
118
- grep -l -i "[key words from title]" .planning/todos/pending/*.md 2>/dev/null
119
- ```
120
-
121
- If potential duplicate found:
122
- 1. Read the existing todo
123
- 2. Compare scope
124
-
125
- If overlapping, use AskUserQuestion:
126
- - header: "Duplicate?"
127
- - question: "Similar todo exists: [title]. What would you like to do?"
128
- - options:
129
- - "Skip" — keep existing todo
130
- - "Replace" — update existing with new context
131
- - "Add anyway" — create as separate todo
132
- </step>
133
-
134
- <step name="create_file">
135
- Use values from init context: `timestamp` and `date` are already available.
136
-
137
- Generate slug for the title:
138
- ```bash
139
- slug=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs generate-slug "$title" --raw)
140
- ```
141
-
142
- Write to `.planning/todos/pending/${date}-${slug}.md`:
143
-
144
- **Quick mode format:**
145
-
146
- ```markdown
147
- ---
148
- created: [timestamp]
149
- title: [title]
150
- area: [area]
151
- mode: quick
152
- files:
153
- - [file:lines]
154
- ---
155
-
156
- ## Problem
157
-
158
- [problem description - enough context for future Claude to understand weeks later]
159
-
160
- ## Solution
161
-
162
- [approach hints or "TBD"]
163
- ```
164
-
165
- **Discussion mode format (enriched):**
166
-
167
- ```markdown
168
- ---
169
- created: [timestamp]
170
- title: [title]
171
- area: [area]
172
- mode: discussed
173
- files:
174
- - [file:lines]
175
- ---
176
-
177
- ## Problem
178
-
179
- [problem description enriched with discussion insights]
180
-
181
- ## Scope
182
-
183
- [What's in scope and what's not — from discussion round 1]
184
-
185
- ## Approach
186
-
187
- [Approach decisions with trade-offs explored — from discussion round 2]
188
- [Include alternatives considered and why this approach was chosen]
189
-
190
- ## Risks
191
-
192
- [What could go wrong — from discussion]
193
-
194
- ## Solution
195
-
196
- [Concrete next steps or "TBD"]
197
- ```
198
- </step>
199
-
200
- <step name="update_state">
201
- If `.planning/STATE.md` exists:
202
-
203
- 1. Use `todo_count` from init context (or re-run `init todos` if count changed)
204
- 2. Update "### Pending Todos" under "## Accumulated Context"
205
- </step>
206
-
207
- <step name="git_commit">
208
- Commit the todo and any updated state:
209
-
210
- ```bash
211
- node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs: capture todo - [title]" --files .planning/todos/pending/[filename] .planning/STATE.md
212
- ```
213
-
214
- Tool respects `commit_docs` config and gitignore automatically.
215
-
216
- Confirm: "Committed: docs: capture todo - [title]"
217
- </step>
218
-
219
- <step name="confirm">
220
- ```
221
- Todo saved: .planning/todos/pending/[filename]
222
-
223
- [title]
224
- Area: [area]
225
- Files: [count] referenced
226
-
227
- ---
228
-
229
- Would you like to:
230
-
231
- 1. Continue with current work
232
- 2. Add another todo
233
- 3. View all todos (/maxsim:check-todos)
234
- ```
235
- </step>
236
-
237
- </process>
238
-
239
- <success_criteria>
240
- - [ ] Directory structure exists
241
- - [ ] Todo file created with valid frontmatter
242
- - [ ] Problem section has enough context for future Claude
243
- - [ ] No duplicates (checked and resolved)
244
- - [ ] Area consistent with existing todos
245
- - [ ] STATE.md updated if exists
246
- - [ ] Todo and state committed to git
247
- </success_criteria>
@@ -1,297 +0,0 @@
1
- <purpose>
2
- Verify milestone achieved its definition of done by aggregating phase verifications, checking cross-phase integration, and assessing requirements coverage. Reads existing VERIFICATION.md files (phases already verified during execute-phase), aggregates tech debt and deferred gaps, then spawns integration checker for cross-phase wiring.
3
- </purpose>
4
-
5
- <required_reading>
6
- Read all files referenced by the invoking prompt's execution_context before starting.
7
- </required_reading>
8
-
9
- <process>
10
-
11
- ## 0. Initialize Milestone Context
12
-
13
- ```bash
14
- INIT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs init milestone-op)
15
- ```
16
-
17
- Extract from init JSON: `milestone_version`, `milestone_name`, `phase_count`, `completed_phases`, `commit_docs`.
18
-
19
- Resolve integration checker model:
20
- ```bash
21
- CHECKER_MODEL=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs resolve-model maxsim-integration-checker --raw)
22
- ```
23
-
24
- ## 1. Determine Milestone Scope
25
-
26
- ```bash
27
- # Get phases in milestone (sorted numerically, handles decimals)
28
- node ~/.claude/maxsim/bin/maxsim-tools.cjs phases list
29
- ```
30
-
31
- - Parse version from arguments or detect current from ROADMAP.md
32
- - Identify all phase directories in scope
33
- - Extract milestone definition of done from ROADMAP.md
34
- - Extract requirements mapped to this milestone from REQUIREMENTS.md
35
-
36
- ## 2. Read All Phase Verifications
37
-
38
- For each phase directory, read the VERIFICATION.md:
39
-
40
- ```bash
41
- # For each phase, use find-phase to resolve the directory (handles archived phases)
42
- PHASE_INFO=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs find-phase 01 --raw)
43
- # Extract directory from JSON, then read VERIFICATION.md from that directory
44
- # Repeat for each phase number from ROADMAP.md
45
- ```
46
-
47
- From each VERIFICATION.md, extract:
48
- - **Status:** passed | gaps_found
49
- - **Critical gaps:** (if any — these are blockers)
50
- - **Non-critical gaps:** tech debt, deferred items, warnings
51
- - **Anti-patterns found:** TODOs, stubs, placeholders
52
- - **Requirements coverage:** which requirements satisfied/blocked
53
-
54
- If a phase is missing VERIFICATION.md, flag it as "unverified phase" — this is a blocker.
55
-
56
- ## 3. Spawn Integration Checker
57
-
58
- With phase context collected:
59
-
60
- Extract `MILESTONE_REQ_IDS` from REQUIREMENTS.md traceability table — all REQ-IDs assigned to phases in this milestone.
61
-
62
- ```
63
- Task(
64
- prompt="Check cross-phase integration and E2E flows.
65
-
66
- Phases: {phase_dirs}
67
- Phase exports: {from SUMMARYs}
68
- API routes: {routes created}
69
-
70
- Milestone Requirements:
71
- {MILESTONE_REQ_IDS — list each REQ-ID with description and assigned phase}
72
-
73
- MUST map each integration finding to affected requirement IDs where applicable.
74
-
75
- Verify cross-phase wiring and E2E user flows.",
76
- subagent_type="maxsim-integration-checker",
77
- model="{integration_checker_model}"
78
- )
79
- ```
80
-
81
- ## 4. Collect Results
82
-
83
- Combine:
84
- - Phase-level gaps and tech debt (from step 2)
85
- - Integration checker's report (wiring gaps, broken flows)
86
-
87
- ## 5. Check Requirements Coverage (3-Source Cross-Reference)
88
-
89
- MUST cross-reference three independent sources for each requirement:
90
-
91
- ### 5a. Parse REQUIREMENTS.md Traceability Table
92
-
93
- Extract all REQ-IDs mapped to milestone phases from the traceability table:
94
- - Requirement ID, description, assigned phase, current status, checked-off state (`[x]` vs `[ ]`)
95
-
96
- ### 5b. Parse Phase VERIFICATION.md Requirements Tables
97
-
98
- For each phase's VERIFICATION.md, extract the expanded requirements table:
99
- - Requirement | Source Plan | Description | Status | Evidence
100
- - Map each entry back to its REQ-ID
101
-
102
- ### 5c. Extract SUMMARY.md Frontmatter Cross-Check
103
-
104
- For each phase's SUMMARY.md, extract `requirements-completed` from YAML frontmatter:
105
- ```bash
106
- for summary in .planning/phases/*-*/*-SUMMARY.md; do
107
- node ~/.claude/maxsim/bin/maxsim-tools.cjs summary-extract "$summary" --fields requirements_completed | jq -r '.requirements_completed'
108
- done
109
- ```
110
-
111
- ### 5d. Status Determination Matrix
112
-
113
- For each REQ-ID, determine status using all three sources:
114
-
115
- | VERIFICATION.md Status | SUMMARY Frontmatter | REQUIREMENTS.md | → Final Status |
116
- |------------------------|---------------------|-----------------|----------------|
117
- | passed | listed | `[x]` | **satisfied** |
118
- | passed | listed | `[ ]` | **satisfied** (update checkbox) |
119
- | passed | missing | any | **partial** (verify manually) |
120
- | gaps_found | any | any | **unsatisfied** |
121
- | missing | listed | any | **partial** (verification gap) |
122
- | missing | missing | any | **unsatisfied** |
123
-
124
- ### 5e. FAIL Gate and Orphan Detection
125
-
126
- **REQUIRED:** Any `unsatisfied` requirement MUST force `gaps_found` status on the milestone audit.
127
-
128
- **Orphan detection:** Requirements present in REQUIREMENTS.md traceability table but absent from ALL phase VERIFICATION.md files MUST be flagged as orphaned. Orphaned requirements are treated as `unsatisfied` — they were assigned but never verified by any phase.
129
-
130
- ## 6. Aggregate into v{version}-MILESTONE-AUDIT.md
131
-
132
- Create `.planning/v{version}-v{version}-MILESTONE-AUDIT.md` with:
133
-
134
- ```yaml
135
- ---
136
- milestone: {version}
137
- audited: {timestamp}
138
- status: passed | gaps_found | tech_debt
139
- scores:
140
- requirements: N/M
141
- phases: N/M
142
- integration: N/M
143
- flows: N/M
144
- gaps: # Critical blockers
145
- requirements:
146
- - id: "{REQ-ID}"
147
- status: "unsatisfied | partial | orphaned"
148
- phase: "{assigned phase}"
149
- claimed_by_plans: ["{plan files that reference this requirement}"]
150
- completed_by_plans: ["{plan files whose SUMMARY marks it complete}"]
151
- verification_status: "passed | gaps_found | missing | orphaned"
152
- evidence: "{specific evidence or lack thereof}"
153
- integration: [...]
154
- flows: [...]
155
- tech_debt: # Non-critical, deferred
156
- - phase: 01-auth
157
- items:
158
- - "TODO: add rate limiting"
159
- - "Warning: no password strength validation"
160
- - phase: 03-dashboard
161
- items:
162
- - "Deferred: mobile responsive layout"
163
- ---
164
- ```
165
-
166
- Plus full markdown report with tables for requirements, phases, integration, tech debt.
167
-
168
- **Status values:**
169
- - `passed` — all requirements met, no critical gaps, minimal tech debt
170
- - `gaps_found` — critical blockers exist
171
- - `tech_debt` — no blockers but accumulated deferred items need review
172
-
173
- ## 7. Present Results
174
-
175
- Route by status (see `<offer_next>`).
176
-
177
- </process>
178
-
179
- <offer_next>
180
- Output this markdown directly (not as a code block). Route based on status:
181
-
182
- ---
183
-
184
- **If passed:**
185
-
186
- ## ✓ Milestone {version} — Audit Passed
187
-
188
- **Score:** {N}/{M} requirements satisfied
189
- **Report:** .planning/v{version}-MILESTONE-AUDIT.md
190
-
191
- All requirements covered. Cross-phase integration verified. E2E flows complete.
192
-
193
- ───────────────────────────────────────────────────────────────
194
-
195
- ## ▶ Next Up
196
-
197
- **Complete milestone** — archive and tag
198
-
199
- /maxsim:complete-milestone {version}
200
-
201
- <sub>/clear first → fresh context window</sub>
202
-
203
- ───────────────────────────────────────────────────────────────
204
-
205
- ---
206
-
207
- **If gaps_found:**
208
-
209
- ## ⚠ Milestone {version} — Gaps Found
210
-
211
- **Score:** {N}/{M} requirements satisfied
212
- **Report:** .planning/v{version}-MILESTONE-AUDIT.md
213
-
214
- ### Unsatisfied Requirements
215
-
216
- {For each unsatisfied requirement:}
217
- - **{REQ-ID}: {description}** (Phase {X})
218
- - {reason}
219
-
220
- ### Cross-Phase Issues
221
-
222
- {For each integration gap:}
223
- - **{from} → {to}:** {issue}
224
-
225
- ### Broken Flows
226
-
227
- {For each flow gap:}
228
- - **{flow name}:** breaks at {step}
229
-
230
- ───────────────────────────────────────────────────────────────
231
-
232
- ## ▶ Next Up
233
-
234
- **Plan gap closure** — create phases to complete milestone
235
-
236
- /maxsim:plan-milestone-gaps
237
-
238
- <sub>/clear first → fresh context window</sub>
239
-
240
- ───────────────────────────────────────────────────────────────
241
-
242
- **Also available:**
243
- - cat .planning/v{version}-MILESTONE-AUDIT.md — see full report
244
- - /maxsim:complete-milestone {version} — proceed anyway (accept tech debt)
245
-
246
- ───────────────────────────────────────────────────────────────
247
-
248
- ---
249
-
250
- **If tech_debt (no blockers but accumulated debt):**
251
-
252
- ## ⚡ Milestone {version} — Tech Debt Review
253
-
254
- **Score:** {N}/{M} requirements satisfied
255
- **Report:** .planning/v{version}-MILESTONE-AUDIT.md
256
-
257
- All requirements met. No critical blockers. Accumulated tech debt needs review.
258
-
259
- ### Tech Debt by Phase
260
-
261
- {For each phase with debt:}
262
- **Phase {X}: {name}**
263
- - {item 1}
264
- - {item 2}
265
-
266
- ### Total: {N} items across {M} phases
267
-
268
- ───────────────────────────────────────────────────────────────
269
-
270
- ## ▶ Options
271
-
272
- **A. Complete milestone** — accept debt, track in backlog
273
-
274
- /maxsim:complete-milestone {version}
275
-
276
- **B. Plan cleanup phase** — address debt before completing
277
-
278
- /maxsim:plan-milestone-gaps
279
-
280
- <sub>/clear first → fresh context window</sub>
281
-
282
- ───────────────────────────────────────────────────────────────
283
- </offer_next>
284
-
285
- <success_criteria>
286
- - [ ] Milestone scope identified
287
- - [ ] All phase VERIFICATION.md files read
288
- - [ ] SUMMARY.md `requirements-completed` frontmatter extracted for each phase
289
- - [ ] REQUIREMENTS.md traceability table parsed for all milestone REQ-IDs
290
- - [ ] 3-source cross-reference completed (VERIFICATION + SUMMARY + traceability)
291
- - [ ] Orphaned requirements detected (in traceability but absent from all VERIFICATIONs)
292
- - [ ] Tech debt and deferred gaps aggregated
293
- - [ ] Integration checker spawned with milestone requirement IDs
294
- - [ ] v{version}-MILESTONE-AUDIT.md created with structured requirement gap objects
295
- - [ ] FAIL gate enforced — any unsatisfied requirement forces gaps_found status
296
- - [ ] Results presented with actionable next steps
297
- </success_criteria>