maxsimcli 4.1.0 → 4.2.1
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.
- package/README.md +14 -5
- package/dist/.tsbuildinfo +1 -1
- package/dist/assets/CHANGELOG.md +32 -0
- package/dist/assets/dashboard/client/assets/index-C199D4Eb.css +32 -0
- package/dist/assets/dashboard/client/assets/{index-C_eAetZJ.js → index-nAXJLp0_.js} +61 -59
- package/dist/assets/dashboard/client/index.html +2 -2
- package/dist/assets/dashboard/server.js +26 -11
- package/dist/assets/templates/agents/AGENTS.md +18 -69
- package/dist/assets/templates/agents/maxsim-code-reviewer.md +17 -92
- package/dist/assets/templates/agents/maxsim-codebase-mapper.md +57 -694
- package/dist/assets/templates/agents/maxsim-debugger.md +80 -925
- package/dist/assets/templates/agents/maxsim-executor.md +94 -431
- package/dist/assets/templates/agents/maxsim-integration-checker.md +51 -319
- package/dist/assets/templates/agents/maxsim-phase-researcher.md +63 -429
- package/dist/assets/templates/agents/maxsim-plan-checker.md +79 -568
- package/dist/assets/templates/agents/maxsim-planner.md +125 -855
- package/dist/assets/templates/agents/maxsim-project-researcher.md +32 -472
- package/dist/assets/templates/agents/maxsim-research-synthesizer.md +25 -134
- package/dist/assets/templates/agents/maxsim-roadmapper.md +66 -480
- package/dist/assets/templates/agents/maxsim-spec-reviewer.md +13 -55
- package/dist/assets/templates/agents/maxsim-verifier.md +95 -450
- package/dist/assets/templates/commands/maxsim/artefakte.md +122 -0
- package/dist/assets/templates/commands/maxsim/batch.md +42 -0
- package/dist/assets/templates/commands/maxsim/check-todos.md +1 -0
- package/dist/assets/templates/commands/maxsim/sdd.md +39 -0
- package/dist/assets/templates/references/thinking-partner.md +33 -0
- package/dist/assets/templates/workflows/batch.md +420 -0
- package/dist/assets/templates/workflows/check-todos.md +85 -1
- package/dist/assets/templates/workflows/discuss-phase.md +31 -0
- package/dist/assets/templates/workflows/execute-plan.md +96 -27
- package/dist/assets/templates/workflows/help.md +47 -0
- package/dist/assets/templates/workflows/sdd.md +426 -0
- package/dist/backend-server.cjs +174 -51
- package/dist/backend-server.cjs.map +1 -1
- package/dist/cli.cjs +310 -146
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +5 -5
- package/dist/cli.js.map +1 -1
- package/dist/core/artefakte.d.ts.map +1 -1
- package/dist/core/artefakte.js +16 -0
- package/dist/core/artefakte.js.map +1 -1
- package/dist/core/context-loader.d.ts +1 -0
- package/dist/core/context-loader.d.ts.map +1 -1
- package/dist/core/context-loader.js +58 -0
- package/dist/core/context-loader.js.map +1 -1
- package/dist/core/core.d.ts +6 -0
- package/dist/core/core.d.ts.map +1 -1
- package/dist/core/core.js +238 -0
- package/dist/core/core.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +5 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/phase.d.ts +11 -11
- package/dist/core/phase.d.ts.map +1 -1
- package/dist/core/phase.js +88 -73
- package/dist/core/phase.js.map +1 -1
- package/dist/core/roadmap.d.ts +2 -2
- package/dist/core/roadmap.d.ts.map +1 -1
- package/dist/core/roadmap.js +11 -10
- package/dist/core/roadmap.js.map +1 -1
- package/dist/core/state.d.ts +11 -11
- package/dist/core/state.d.ts.map +1 -1
- package/dist/core/state.js +60 -54
- package/dist/core/state.js.map +1 -1
- package/dist/core-RRjCSt0G.cjs.map +1 -1
- package/dist/{lifecycle-D4E9yP6E.cjs → lifecycle-0M4VqOMm.cjs} +2 -2
- package/dist/{lifecycle-D4E9yP6E.cjs.map → lifecycle-0M4VqOMm.cjs.map} +1 -1
- package/dist/mcp/context-tools.d.ts.map +1 -1
- package/dist/mcp/context-tools.js +7 -3
- package/dist/mcp/context-tools.js.map +1 -1
- package/dist/mcp/phase-tools.js +3 -3
- package/dist/mcp/phase-tools.js.map +1 -1
- package/dist/mcp-server.cjs +163 -40
- package/dist/mcp-server.cjs.map +1 -1
- package/dist/{server-pvY2WbKj.cjs → server-G1MIg_Oe.cjs} +7 -7
- package/dist/server-G1MIg_Oe.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/assets/dashboard/client/assets/index-CmiJKqOU.css +0 -32
- package/dist/server-pvY2WbKj.cjs.map +0 -1
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
<sanity_check>
|
|
2
|
+
Before executing any step in this workflow, verify:
|
|
3
|
+
1. The current directory contains a `.planning/` folder — if not, stop and tell the user to run `/maxsim:new-project` first.
|
|
4
|
+
2. `.planning/ROADMAP.md` exists — if not, stop and tell the user to initialize the project.
|
|
5
|
+
</sanity_check>
|
|
6
|
+
|
|
7
|
+
<purpose>
|
|
8
|
+
Execute phase plans sequentially using fresh-context subagents with mandatory 2-stage review between every task. Each task agent receives only the minimum context it needs. Review is a hard gate — no task starts until the previous task passes both review stages.
|
|
9
|
+
</purpose>
|
|
10
|
+
|
|
11
|
+
<core_principle>
|
|
12
|
+
Fresh context per task. No context bleeding between tasks. Review is mandatory, never skippable. Previous task's full diff and conversation are NEVER passed to the next task agent.
|
|
13
|
+
</core_principle>
|
|
14
|
+
|
|
15
|
+
<required_reading>
|
|
16
|
+
Read STATE.md before any operation to load project context.
|
|
17
|
+
|
|
18
|
+
@./references/dashboard-bridge.md
|
|
19
|
+
</required_reading>
|
|
20
|
+
|
|
21
|
+
<process>
|
|
22
|
+
|
|
23
|
+
<step name="initialize" priority="first">
|
|
24
|
+
Reuse the execute-phase init to load phase directory, plans, and model configuration:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
INIT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs init execute-phase "${PHASE_ARG}")
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Parse JSON for: `executor_model`, `verifier_model`, `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `plans`, `incomplete_plans`, `plan_count`, `incomplete_count`, `state_exists`, `roadmap_exists`, `phase_req_ids`.
|
|
31
|
+
|
|
32
|
+
**If `phase_found` is false:** Error — phase directory not found.
|
|
33
|
+
**If `plan_count` is 0:** Error — no plans found in phase.
|
|
34
|
+
</step>
|
|
35
|
+
|
|
36
|
+
<step name="discover_plans">
|
|
37
|
+
Find incomplete plans — skip any plan that already has a matching SUMMARY.md:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
PLAN_INDEX=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs phase-plan-index "${PHASE_NUMBER}")
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Parse JSON for: `plans[]` (each with `id`, `objective`, `files_modified`, `task_count`, `has_summary`), `incomplete`.
|
|
44
|
+
|
|
45
|
+
**Filtering:** Skip plans where `has_summary: true`. If all plans complete: "All plans in phase already have summaries" — exit.
|
|
46
|
+
|
|
47
|
+
Report:
|
|
48
|
+
```
|
|
49
|
+
## SDD Execution Plan
|
|
50
|
+
|
|
51
|
+
**Phase {X}: {Name}** — {incomplete_count} plans to execute
|
|
52
|
+
|
|
53
|
+
| Plan | Tasks | Objective |
|
|
54
|
+
|------|-------|-----------|
|
|
55
|
+
| 01-01 | 5 | {from plan objective, 5-10 words} |
|
|
56
|
+
| 01-02 | 3 | ... |
|
|
57
|
+
|
|
58
|
+
**Mode:** Spec-Driven Dispatch — fresh agent per task, 2-stage review between tasks
|
|
59
|
+
```
|
|
60
|
+
</step>
|
|
61
|
+
|
|
62
|
+
<step name="load_plan">
|
|
63
|
+
For each incomplete plan, read the plan file and extract the ordered task list:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
cat ${PHASE_DIR}/${PLAN_FILE}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Extract for each task:
|
|
70
|
+
- **Task number** (sequential order in plan)
|
|
71
|
+
- **Task name**
|
|
72
|
+
- **Description** (what to implement)
|
|
73
|
+
- **Acceptance criteria** (done criteria from plan)
|
|
74
|
+
- **Relevant files** (files to read and/or modify)
|
|
75
|
+
- **Done criteria** (verification steps)
|
|
76
|
+
|
|
77
|
+
Store as structured task list for the dispatch loop.
|
|
78
|
+
</step>
|
|
79
|
+
|
|
80
|
+
<step name="dispatch_loop">
|
|
81
|
+
For each task in order within the current plan:
|
|
82
|
+
|
|
83
|
+
**4a — Assemble Context**
|
|
84
|
+
|
|
85
|
+
Build minimal context for the task agent. Include ONLY:
|
|
86
|
+
- Task description and acceptance criteria
|
|
87
|
+
- Relevant files list (files to read and modify)
|
|
88
|
+
- Previous task commit hashes and files modified (NOT full diffs, NOT previous agent conversations)
|
|
89
|
+
- Project CLAUDE.md (if exists) for coding conventions
|
|
90
|
+
- .skills/ SKILL.md files (if exist) for relevant project rules
|
|
91
|
+
|
|
92
|
+
Context table (SDD principle):
|
|
93
|
+
| Item | Include? |
|
|
94
|
+
|------|----------|
|
|
95
|
+
| Task description + acceptance criteria | ALWAYS |
|
|
96
|
+
| Relevant files list | ALWAYS |
|
|
97
|
+
| Project CLAUDE.md | ALWAYS (if exists) |
|
|
98
|
+
| Previous task commit hash + files modified | YES (minimal summary only) |
|
|
99
|
+
| Previous task full diff | NEVER |
|
|
100
|
+
| Previous agent conversation | NEVER |
|
|
101
|
+
| Full plan file | NO (only current task extracted) |
|
|
102
|
+
|
|
103
|
+
**4b — Spawn Executor**
|
|
104
|
+
|
|
105
|
+
Fresh `maxsim-executor` agent with minimal context:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Task(
|
|
109
|
+
subagent_type="maxsim-executor",
|
|
110
|
+
model="{executor_model}",
|
|
111
|
+
prompt="
|
|
112
|
+
<objective>
|
|
113
|
+
Execute task {task_number} of plan {plan_id} in phase {phase_number}-{phase_name}.
|
|
114
|
+
Commit atomically when done.
|
|
115
|
+
</objective>
|
|
116
|
+
|
|
117
|
+
<task>
|
|
118
|
+
Name: {task_name}
|
|
119
|
+
Description: {task_description}
|
|
120
|
+
Acceptance criteria: {acceptance_criteria}
|
|
121
|
+
Done criteria: {done_criteria}
|
|
122
|
+
</task>
|
|
123
|
+
|
|
124
|
+
<files_to_read>
|
|
125
|
+
Read these files at execution start using the Read tool:
|
|
126
|
+
- {relevant_files list}
|
|
127
|
+
- ./CLAUDE.md (Project instructions, if exists — follow coding conventions)
|
|
128
|
+
- .skills/ (Project skills, if exists — read SKILL.md for each, follow relevant rules)
|
|
129
|
+
</files_to_read>
|
|
130
|
+
|
|
131
|
+
<previous_task_context>
|
|
132
|
+
{If first task: 'This is the first task in the plan.'}
|
|
133
|
+
{If not first: 'Previous task committed as {commit_hash}. Files modified: {file_list}. Do NOT re-read or re-implement previous work.'}
|
|
134
|
+
</previous_task_context>
|
|
135
|
+
|
|
136
|
+
<commit_protocol>
|
|
137
|
+
After implementation:
|
|
138
|
+
1. Run tests relevant to changed files
|
|
139
|
+
2. Stage files individually (NEVER git add . or git add -A)
|
|
140
|
+
3. Commit: {type}({phase}-{plan}): {description}
|
|
141
|
+
4. Report: commit hash, files modified, tests run
|
|
142
|
+
</commit_protocol>
|
|
143
|
+
|
|
144
|
+
<success_criteria>
|
|
145
|
+
- [ ] All acceptance criteria met
|
|
146
|
+
- [ ] Done criteria verified
|
|
147
|
+
- [ ] Tests pass
|
|
148
|
+
- [ ] Atomic commit created
|
|
149
|
+
</success_criteria>
|
|
150
|
+
"
|
|
151
|
+
)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Record the commit hash from the executor's output.
|
|
155
|
+
|
|
156
|
+
**4c — Review Stage 1: Spec Compliance**
|
|
157
|
+
|
|
158
|
+
Spawn `maxsim-spec-reviewer` to verify implementation matches task spec:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
Task(
|
|
162
|
+
subagent_type="maxsim-spec-reviewer",
|
|
163
|
+
model="{executor_model}",
|
|
164
|
+
prompt="
|
|
165
|
+
<objective>
|
|
166
|
+
Review task {task_number} of plan {plan_id} for spec compliance.
|
|
167
|
+
</objective>
|
|
168
|
+
|
|
169
|
+
<task_spec>
|
|
170
|
+
Name: {task_name}
|
|
171
|
+
Description: {task_description}
|
|
172
|
+
Acceptance criteria: {acceptance_criteria}
|
|
173
|
+
Done criteria: {done_criteria}
|
|
174
|
+
Relevant files: {relevant_files}
|
|
175
|
+
</task_spec>
|
|
176
|
+
|
|
177
|
+
<commit>
|
|
178
|
+
Commit hash: {task_commit_hash}
|
|
179
|
+
</commit>
|
|
180
|
+
|
|
181
|
+
<instructions>
|
|
182
|
+
1. Read each file in the relevant files list
|
|
183
|
+
2. Verify every acceptance criterion is met in the implementation
|
|
184
|
+
3. Verify done criteria pass
|
|
185
|
+
4. Check that ONLY specified files were modified (run: git diff --name-only {task_commit_hash}^..{task_commit_hash})
|
|
186
|
+
5. Report verdict: PASS or FAIL
|
|
187
|
+
6. If FAIL: list each unmet criterion with specific details
|
|
188
|
+
</instructions>
|
|
189
|
+
"
|
|
190
|
+
)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**4d — Review Stage 2: Code Quality**
|
|
194
|
+
|
|
195
|
+
Spawn `maxsim-code-reviewer` to check for bugs, edge cases, and conventions:
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
Task(
|
|
199
|
+
subagent_type="maxsim-code-reviewer",
|
|
200
|
+
model="{executor_model}",
|
|
201
|
+
prompt="
|
|
202
|
+
<objective>
|
|
203
|
+
Review task {task_number} of plan {plan_id} for code quality.
|
|
204
|
+
Spec compliance already verified.
|
|
205
|
+
</objective>
|
|
206
|
+
|
|
207
|
+
<commit>
|
|
208
|
+
Commit hash: {task_commit_hash}
|
|
209
|
+
Files modified: {files_from_commit}
|
|
210
|
+
</commit>
|
|
211
|
+
|
|
212
|
+
<instructions>
|
|
213
|
+
1. Read CLAUDE.md for project conventions
|
|
214
|
+
2. Read each modified file
|
|
215
|
+
3. Check for: bugs, unhandled edge cases, missing error handling, convention violations, security issues
|
|
216
|
+
4. Categorize: BLOCKER (must fix) or ADVISORY (note for later)
|
|
217
|
+
5. Report verdict: PASS (no blockers) or FAIL (list blocking issues)
|
|
218
|
+
</instructions>
|
|
219
|
+
"
|
|
220
|
+
)
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**4e — Handle Failure**
|
|
224
|
+
|
|
225
|
+
If EITHER review stage returns FAIL:
|
|
226
|
+
|
|
227
|
+
1. Spawn a NEW fresh executor agent with:
|
|
228
|
+
- Original task spec (description + acceptance criteria)
|
|
229
|
+
- Review feedback (specific failures from reviewer)
|
|
230
|
+
- Current file state (files to read, NOT previous agent conversation)
|
|
231
|
+
- Instruction: fix ONLY the review issues, do NOT add new features
|
|
232
|
+
|
|
233
|
+
```
|
|
234
|
+
Task(
|
|
235
|
+
subagent_type="maxsim-executor",
|
|
236
|
+
model="{executor_model}",
|
|
237
|
+
prompt="
|
|
238
|
+
<objective>
|
|
239
|
+
Fix review failures for task {task_number} of plan {plan_id}.
|
|
240
|
+
Fix ONLY the issues listed below. Do NOT add new features or refactor beyond what is required.
|
|
241
|
+
</objective>
|
|
242
|
+
|
|
243
|
+
<original_task>
|
|
244
|
+
Name: {task_name}
|
|
245
|
+
Description: {task_description}
|
|
246
|
+
Acceptance criteria: {acceptance_criteria}
|
|
247
|
+
</original_task>
|
|
248
|
+
|
|
249
|
+
<review_failures>
|
|
250
|
+
{spec_review_failures if any}
|
|
251
|
+
{code_review_failures if any}
|
|
252
|
+
</review_failures>
|
|
253
|
+
|
|
254
|
+
<files_to_read>
|
|
255
|
+
{files modified by previous attempt — read current state}
|
|
256
|
+
</files_to_read>
|
|
257
|
+
|
|
258
|
+
<commit_protocol>
|
|
259
|
+
Stage and commit fixes: fix({phase}-{plan}): address review feedback for task {task_number}
|
|
260
|
+
</commit_protocol>
|
|
261
|
+
"
|
|
262
|
+
)
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
2. Re-run BOTH review stages (4c and 4d) on the fix commit
|
|
266
|
+
3. **Cap at 3 fix attempts.** If still failing after 3 attempts: STOP and escalate to user.
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
## TASK BLOCKED — Review Failed After 3 Fix Attempts
|
|
270
|
+
|
|
271
|
+
**Task:** {task_number} - {task_name}
|
|
272
|
+
**Plan:** {plan_id}
|
|
273
|
+
**Phase:** {phase_number} - {phase_name}
|
|
274
|
+
|
|
275
|
+
### Unresolved Review Failures
|
|
276
|
+
{remaining failures from last review}
|
|
277
|
+
|
|
278
|
+
### Fix Attempt History
|
|
279
|
+
| Attempt | Spec Review | Code Review | Commit |
|
|
280
|
+
|---------|-------------|-------------|--------|
|
|
281
|
+
| 1 | {PASS/FAIL} | {PASS/FAIL} | {hash} |
|
|
282
|
+
| 2 | {PASS/FAIL} | {PASS/FAIL} | {hash} |
|
|
283
|
+
| 3 | {PASS/FAIL} | {PASS/FAIL} | {hash} |
|
|
284
|
+
|
|
285
|
+
Options:
|
|
286
|
+
- "fix manually" — You fix the issues, then resume
|
|
287
|
+
- "skip task" — Mark incomplete, continue to next task
|
|
288
|
+
- "stop" — Halt SDD execution
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**4f — Advance**
|
|
292
|
+
|
|
293
|
+
After both reviews PASS, record task completion:
|
|
294
|
+
- Commit hash
|
|
295
|
+
- Files modified
|
|
296
|
+
|
|
297
|
+
Pass ONLY this minimal summary to the next task context. Do NOT pass:
|
|
298
|
+
- Full diff output
|
|
299
|
+
- Review conversation content
|
|
300
|
+
- Previous agent's reasoning or approach
|
|
301
|
+
|
|
302
|
+
**4g — Report Task**
|
|
303
|
+
|
|
304
|
+
Display task completion:
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
---
|
|
308
|
+
## Task {N}/{total}: {task_name} — COMPLETE
|
|
309
|
+
|
|
310
|
+
**Commit:** {commit_hash}
|
|
311
|
+
**Files:** {files_modified_count} modified
|
|
312
|
+
**Spec Review:** PASS
|
|
313
|
+
**Code Review:** PASS
|
|
314
|
+
{If fix iterations > 0: **Fix Iterations:** {count}}
|
|
315
|
+
|
|
316
|
+
{If more tasks: Dispatching next task...}
|
|
317
|
+
---
|
|
318
|
+
```
|
|
319
|
+
</step>
|
|
320
|
+
|
|
321
|
+
<step name="create_summary">
|
|
322
|
+
After all tasks in a plan complete, create SUMMARY.md:
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
# Get the summary template
|
|
326
|
+
cat ~/.claude/maxsim/templates/summary.md
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Create `{phase}-{plan}-SUMMARY.md` in the phase directory. Include:
|
|
330
|
+
|
|
331
|
+
**Frontmatter:** phase, plan, subsystem, tags, requires/provides/affects, tech-stack, key-files.created/modified, key-decisions, requirements-completed (copy from PLAN.md frontmatter), duration, completed date.
|
|
332
|
+
|
|
333
|
+
**Body:**
|
|
334
|
+
- One-liner: substantive description of what was built
|
|
335
|
+
- Per-task status table:
|
|
336
|
+
|
|
337
|
+
```markdown
|
|
338
|
+
## Task Execution (SDD)
|
|
339
|
+
|
|
340
|
+
| Task | Name | Status | Commit | Fix Iterations |
|
|
341
|
+
|------|------|--------|--------|----------------|
|
|
342
|
+
| 1 | {name} | PASS | {hash} | 0 |
|
|
343
|
+
| 2 | {name} | PASS | {hash} | 1 |
|
|
344
|
+
| 3 | {name} | PASS | {hash} | 0 |
|
|
345
|
+
|
|
346
|
+
**Execution mode:** Spec-Driven Dispatch (fresh agent per task, 2-stage review)
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
- Review summary per task
|
|
350
|
+
- Deviations (if any)
|
|
351
|
+
- Issues encountered
|
|
352
|
+
|
|
353
|
+
Use `node ~/.claude/maxsim/bin/maxsim-tools.cjs` for template operations as needed.
|
|
354
|
+
|
|
355
|
+
Self-check:
|
|
356
|
+
- Verify first 2 files from `key-files.created` exist on disk
|
|
357
|
+
- Check `git log --oneline --all --grep="{phase}-{plan}"` returns commits
|
|
358
|
+
- Append `## Self-Check: PASSED` or `## Self-Check: FAILED`
|
|
359
|
+
</step>
|
|
360
|
+
|
|
361
|
+
<step name="update_state">
|
|
362
|
+
Standard state updates after plan completion:
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
# Advance plan counter
|
|
366
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs state advance-plan
|
|
367
|
+
|
|
368
|
+
# Recalculate progress
|
|
369
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs state update-progress
|
|
370
|
+
|
|
371
|
+
# Record execution metrics
|
|
372
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs state record-metric \
|
|
373
|
+
--phase "${PHASE}" --plan "${PLAN}" --duration "${DURATION}" \
|
|
374
|
+
--tasks "${TASK_COUNT}" --files "${FILE_COUNT}"
|
|
375
|
+
|
|
376
|
+
# Record session
|
|
377
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs state record-session \
|
|
378
|
+
--stopped-at "Completed ${PHASE}-${PLAN}-PLAN.md (SDD)" \
|
|
379
|
+
--resume-file "None"
|
|
380
|
+
|
|
381
|
+
# Update roadmap progress
|
|
382
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs roadmap update-plan-progress "${PHASE}"
|
|
383
|
+
|
|
384
|
+
# Mark requirements complete (if plan has requirements field)
|
|
385
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs requirements mark-complete ${REQ_IDS}
|
|
386
|
+
```
|
|
387
|
+
</step>
|
|
388
|
+
|
|
389
|
+
<step name="git_commit_metadata">
|
|
390
|
+
Task code already committed per-task. Commit planning artifacts:
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs({phase}-{plan}): complete SDD execution" --files .planning/phases/${PHASE_DIR_NAME}/${PHASE}-${PLAN}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md .planning/REQUIREMENTS.md
|
|
394
|
+
```
|
|
395
|
+
</step>
|
|
396
|
+
|
|
397
|
+
<step name="offer_next">
|
|
398
|
+
After all plans in the phase are processed:
|
|
399
|
+
|
|
400
|
+
```bash
|
|
401
|
+
ls -1 .planning/phases/${PHASE_DIR_NAME}/*-PLAN.md 2>/dev/null | wc -l
|
|
402
|
+
ls -1 .planning/phases/${PHASE_DIR_NAME}/*-SUMMARY.md 2>/dev/null | wc -l
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
| Condition | Route | Action |
|
|
406
|
+
|-----------|-------|--------|
|
|
407
|
+
| summaries < plans | **A: More plans** | Find next incomplete plan. Show next plan, suggest `/maxsim:sdd {phase}` to continue. |
|
|
408
|
+
| summaries = plans, more phases exist | **B: Phase done** | Show completion, suggest `/maxsim:verify-work {phase}` then `/maxsim:plan-phase {next}`. |
|
|
409
|
+
| summaries = plans, last phase | **C: Milestone done** | Show banner, suggest `/maxsim:complete-milestone` + `/maxsim:verify-work`. |
|
|
410
|
+
|
|
411
|
+
All routes: recommend `/clear` first for fresh context.
|
|
412
|
+
</step>
|
|
413
|
+
|
|
414
|
+
</process>
|
|
415
|
+
|
|
416
|
+
<failure_handling>
|
|
417
|
+
- **Task agent fails (no commit):** Report failure, ask user: retry task or skip
|
|
418
|
+
- **Review agent fails to return verdict:** Treat as FAIL, re-run review
|
|
419
|
+
- **3 fix attempts exhausted:** Hard stop on task, escalate to user with full history
|
|
420
|
+
- **classifyHandoffIfNeeded bug:** If agent reports "failed" with `classifyHandoffIfNeeded is not defined` — Claude Code runtime bug. Spot-check (commit exists, files modified) — if pass, treat as success
|
|
421
|
+
- **All tasks in plan blocked:** Stop plan, report to user, suggest manual intervention
|
|
422
|
+
</failure_handling>
|
|
423
|
+
|
|
424
|
+
<resumption>
|
|
425
|
+
Re-run `/maxsim:sdd {phase}` — discover_plans finds completed SUMMARYs, skips them, resumes from first incomplete plan. Within a plan, completed tasks (those with commits matching the plan pattern) can be detected and skipped.
|
|
426
|
+
</resumption>
|