maxsimcli 4.15.3 → 4.15.4

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 (33) hide show
  1. package/dist/assets/CHANGELOG.md +7 -0
  2. package/dist/assets/hooks/maxsim-statusline.cjs +46 -7
  3. package/dist/assets/hooks/maxsim-statusline.cjs.map +1 -1
  4. package/dist/assets/templates/references/git-planning-commit.md +1 -1
  5. package/dist/assets/templates/references/questioning.md +1 -1
  6. package/dist/assets/templates/templates/codebase/structure.md +1 -1
  7. package/dist/assets/templates/templates/milestone-archive.md +3 -3
  8. package/dist/assets/templates/workflows/batch.md +2 -3
  9. package/dist/assets/templates/workflows/diagnose-issues.md +6 -6
  10. package/dist/assets/templates/workflows/discovery-phase.md +6 -7
  11. package/dist/assets/templates/workflows/discuss-phase.md +8 -11
  12. package/dist/assets/templates/workflows/execute-phase.md +5 -49
  13. package/dist/assets/templates/workflows/execute-plan.md +0 -6
  14. package/dist/assets/templates/workflows/go.md +2 -2
  15. package/dist/assets/templates/workflows/help.md +1 -1
  16. package/dist/assets/templates/workflows/init-existing.md +0 -5
  17. package/dist/assets/templates/workflows/new-milestone.md +2 -7
  18. package/dist/assets/templates/workflows/new-project.md +0 -5
  19. package/dist/assets/templates/workflows/quick.md +0 -1
  20. package/dist/assets/templates/workflows/sdd.md +0 -2
  21. package/dist/assets/templates/workflows/settings.md +2 -7
  22. package/dist/assets/templates/workflows/verify-work.md +2 -16
  23. package/dist/cli.cjs +11 -56
  24. package/dist/cli.cjs.map +1 -1
  25. package/dist/core-D5zUr9cb.cjs.map +1 -1
  26. package/dist/install.cjs +10 -26
  27. package/dist/install.cjs.map +1 -1
  28. package/dist/mcp-server.cjs +2 -38
  29. package/dist/mcp-server.cjs.map +1 -1
  30. package/dist/skills-CjFWZIGM.cjs.map +1 -1
  31. package/package.json +1 -1
  32. package/dist/assets/templates/references/dashboard-bridge.md +0 -59
  33. package/dist/assets/templates/workflows/plan-phase.md +0 -501
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxsimcli",
3
- "version": "4.15.3",
3
+ "version": "4.15.4",
4
4
  "private": false,
5
5
  "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code, OpenCode, Gemini and Codex by MayStudios.",
6
6
  "bin": {
@@ -1,59 +0,0 @@
1
- <dashboard_bridge>
2
-
3
- ## Dashboard Mode Detection
4
-
5
- At the START of this workflow (before any user interaction), probe for the dashboard MCP server:
6
-
7
- Call `mcp__maxsim-dashboard__get_phase_status` (no parameters).
8
-
9
- - **Success** (returns JSON) → set `DASHBOARD_ACTIVE = true` for this workflow session
10
- - **Failure** (tool not found, connection error) → set `DASHBOARD_ACTIVE = false`
11
-
12
- Probe **once** per workflow. Do not re-probe. If the dashboard was not detected, use standard tools throughout.
13
-
14
- **Mid-workflow fallback:** If an MCP call fails after a successful probe (dashboard crashed), fall back to `AskUserQuestion` for that call and set `DASHBOARD_ACTIVE = false` for the remainder.
15
-
16
- ## Question Routing
17
-
18
- **When `DASHBOARD_ACTIVE = true`:** Use `mcp__maxsim-dashboard__ask_question` for ALL user questions.
19
-
20
- **When `DASHBOARD_ACTIVE = false`:** Use `AskUserQuestion` as normal.
21
-
22
- ### Schema Translation: AskUserQuestion → ask_question
23
-
24
- When routing to the dashboard MCP tool, translate fields as follows:
25
-
26
- **Merge header into question:**
27
- ```
28
- AskUserQuestion: header="Context", question="Which areas need discussion?"
29
- → ask_question: question="**Context** — Which areas need discussion?"
30
- ```
31
-
32
- **Convert options:**
33
- ```
34
- AskUserQuestion: options=[{label: "Cards", description: "Grid layout"}]
35
- → ask_question: options=[{value: "cards", label: "Cards", description: "Grid layout"}]
36
- ```
37
-
38
- Rules:
39
- 1. Prepend `header` as bold prefix: `"**{header}** — {question}"`
40
- 2. Option `value` = slugified `label` (lowercase, spaces→hyphens)
41
- 3. Option `label` and `description` map directly
42
- 4. Always set `allow_free_text: true` (equivalent to AskUserQuestion's implicit "Other")
43
- 5. For `multiSelect`: prefix question with "Select all that apply:" and number each option. Parse the user's comma-separated response to determine selections.
44
- 6. The MCP tool returns a plain string. Match it against option `label` or `value` to identify the selection. Non-matching text = free-text "Other" input.
45
-
46
- ## Lifecycle Events
47
-
48
- Use `mcp__maxsim-dashboard__submit_lifecycle_event` to report workflow progress to the dashboard. Only emit when `DASHBOARD_ACTIVE = true`.
49
-
50
- | Event type | When to emit | Fields |
51
- |---|---|---|
52
- | `phase-started` | execute-phase: after init, before first wave | `phase_name`, `phase_number` |
53
- | `plan-started` | execute-phase: before spawning each plan executor | `phase_name`, `phase_number`, `step` (1-based plan index), `total_steps` |
54
- | `plan-complete` | execute-phase: after executor returns success | `phase_name`, `phase_number`, `step`, `total_steps` |
55
- | `phase-complete` | execute-phase: after roadmap update | `phase_name`, `phase_number` |
56
-
57
- **Fire-and-forget.** If the call fails, ignore and continue. Never gate workflow progress on lifecycle event delivery.
58
-
59
- </dashboard_bridge>
@@ -1,501 +0,0 @@
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:init` first.
4
- 2. `.planning/ROADMAP.md` exists — if not, stop and tell the user to initialize the project.
5
- </sanity_check>
6
-
7
- <deprecation_notice>
8
- **DEPRECATED — Use plan.md + sub-workflows instead.**
9
-
10
- This file (plan-phase.md) is a legacy monolithic workflow that writes artifacts to local `.planning/phases/` directories. It has been superseded by the GitHub-first planning workflow:
11
-
12
- - **Canonical orchestrator:** `@./workflows/plan.md`
13
- - **Discussion stage:** `@./workflows/plan-discuss.md`
14
- - **Research stage:** `@./workflows/plan-research.md`
15
- - **Planning stage:** `@./workflows/plan-create.md`
16
-
17
- The canonical workflow stores all artifacts (context decisions, research findings, plans) as GitHub Issue comments instead of local files, and uses GitHub Issue state for stage detection and re-entry.
18
-
19
- **This file is retained for reference only.** Do not use it for new work. Any fixes or improvements should be made to the canonical sub-workflows above.
20
- </deprecation_notice>
21
-
22
- <purpose>
23
- [LEGACY] Create executable phase prompts (PLAN.md files) for a roadmap phase with integrated research and verification. Default flow: Research (if needed) -> Plan -> Verify -> Done. Orchestrates researcher, planner, and planner (plan-checking mode) agents with a revision loop (max 3 iterations).
24
-
25
- NOTE: This workflow writes artifacts to local `.planning/phases/` directories. The current canonical workflow (plan.md + sub-workflows) stores artifacts on GitHub Issues instead.
26
- </purpose>
27
-
28
- <required_reading>
29
- Read all files referenced by the invoking prompt's execution_context before starting.
30
-
31
- @./references/ui-brand.md
32
- @./references/dashboard-bridge.md
33
- </required_reading>
34
-
35
- <process>
36
-
37
- ## 1. Initialize
38
-
39
- Load all context in one call (paths only to minimize orchestrator context):
40
-
41
- ```bash
42
- INIT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs init plan-phase "$PHASE")
43
- ```
44
-
45
- Parse JSON for: `researcher_model`, `planner_model`, `checker_model`, `research_enabled`, `plan_checker_enabled`, `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `plan_count`, `planning_exists`, `roadmap_exists`, `phase_req_ids`.
46
-
47
- **File paths (for <files_to_read> blocks):** `state_path`, `roadmap_path`, `requirements_path`, `context_path`, `research_path`, `verification_path`, `uat_path`. These are null if files don't exist.
48
-
49
- **If `planning_exists` is false:** Error — run `/maxsim:init` first.
50
-
51
- ## 2. Parse and Normalize Arguments
52
-
53
- Extract from $ARGUMENTS: phase number (integer or decimal like `2.1`), flags (`--research`, `--skip-research`, `--gaps`, `--skip-verify`).
54
-
55
- **If no phase number:** Detect next unplanned phase from roadmap.
56
-
57
- **If `phase_found` is false:** Validate phase exists in ROADMAP.md. If valid, create the directory using `phase_slug` and `padded_phase` from init:
58
- ```bash
59
- mkdir -p ".planning/phases/${padded_phase}-${phase_slug}"
60
- ```
61
-
62
- **Existing artifacts from init:** `has_research`, `has_plans`, `plan_count`.
63
-
64
- ## 3. Validate Phase
65
-
66
- ```bash
67
- PHASE_INFO=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs roadmap get-phase "${PHASE}")
68
- ```
69
-
70
- **If `found` is false:** Error with available phases. **If `found` is true:** Extract `phase_number`, `phase_name`, `goal` from JSON.
71
-
72
- ## 4. Load CONTEXT.md
73
-
74
- Check `context_path` from init JSON.
75
-
76
- If `context_path` is not null, display: `Using phase context from: ${context_path}`
77
-
78
- **If `context_path` is null (no CONTEXT.md exists):**
79
-
80
- Use AskUserQuestion:
81
- - header: "No context"
82
- - question: "No CONTEXT.md found for Phase {X}. Plans will use research and requirements only — your design preferences won't be included. Continue or capture context first?"
83
- - options:
84
- - "Continue without context" — Plan using research + requirements only
85
- - "Run discuss-phase first" — Capture design decisions before planning
86
-
87
- If "Continue without context": Proceed to step 5.
88
- If "Run discuss-phase first": Display `/maxsim:plan {X}` (discussion stage) and exit workflow.
89
-
90
- ## 5. Handle Research
91
-
92
- **Skip if:** `--gaps` flag, `--skip-research` flag, or `research_enabled` is false (from init) without `--research` override.
93
-
94
- **If `has_research` is true (from init) AND no `--research` flag:** Use existing, skip to step 6.
95
-
96
- **If RESEARCH.md missing OR `--research` flag:**
97
-
98
- Display banner:
99
- ```
100
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
101
- MAXSIM ► RESEARCHING PHASE {X}
102
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
103
-
104
- ◆ Spawning researcher...
105
- ```
106
-
107
- ### Spawn researcher
108
-
109
- ```bash
110
- PHASE_DESC=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs roadmap get-phase "${PHASE}" | jq -r '.section')
111
- ```
112
-
113
- Research prompt:
114
-
115
- ```markdown
116
- <objective>
117
- Research how to implement Phase {phase_number}: {phase_name}
118
- Answer: "What do I need to know to PLAN this phase well?"
119
- </objective>
120
-
121
- <files_to_read>
122
- - {context_path} (USER DECISIONS from /maxsim:plan discussion stage)
123
- - {requirements_path} (Project requirements)
124
- - {state_path} (Project decisions and history)
125
- </files_to_read>
126
-
127
- <additional_context>
128
- **Phase description:** {phase_description}
129
- **Phase requirement IDs (MUST address):** {phase_req_ids}
130
-
131
- **Project instructions:** Read ./CLAUDE.md if exists — follow project-specific guidelines
132
- **Project skills:** Check .skills/ directory (if exists) — read SKILL.md files, research should account for project skill patterns
133
- </additional_context>
134
-
135
- <output>
136
- Write to: {phase_dir}/{phase_num}-RESEARCH.md
137
- </output>
138
- ```
139
-
140
- ```
141
- Task(
142
- prompt=research_prompt,
143
- subagent_type="researcher",
144
- model="{researcher_model}",
145
- description="Research Phase {phase}"
146
- )
147
- ```
148
-
149
- ### Handle Researcher Return
150
-
151
- - **`## RESEARCH COMPLETE`:** Display confirmation, continue to step 6
152
- - **`## RESEARCH BLOCKED`:** Display blocker, offer: 1) Provide context, 2) Skip research, 3) Abort
153
-
154
- ## 5.5. Create Validation Strategy (if Nyquist enabled)
155
-
156
- **Skip if:** `workflow.nyquist_validation` is false in `.planning/config.json`.
157
-
158
- After researcher completes, check if RESEARCH.md contains a Validation Architecture section:
159
-
160
- ```bash
161
- grep -l "## Validation Architecture" "${PHASE_DIR}"/*-RESEARCH.md 2>/dev/null
162
- ```
163
-
164
- **If found:**
165
- 1. Read validation template from `~/.claude/maxsim/templates/VALIDATION.md`
166
- 2. Write to `${PHASE_DIR}/${PADDED_PHASE}-VALIDATION.md`
167
- 3. Fill frontmatter: replace `{N}` with phase number, `{phase-slug}` with phase slug, `{date}` with current date
168
- 4. If `commit_docs` is true:
169
- ```bash
170
- node ~/.claude/maxsim/bin/maxsim-tools.cjs commit-docs "docs(phase-${PHASE}): add validation strategy"
171
- ```
172
-
173
- **If not found (and nyquist enabled):** Display warning:
174
- ```
175
- ⚠ Nyquist validation enabled but researcher did not produce a Validation Architecture section.
176
- Continuing without validation strategy. Plans may fail Dimension 8 check.
177
- ```
178
-
179
- ## 6. Check Existing Plans
180
-
181
- ```bash
182
- ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null
183
- ```
184
-
185
- **If exists:** Offer: 1) Add more plans, 2) View existing, 3) Replan from scratch.
186
-
187
- ## 7. Use Context Paths from INIT
188
-
189
- Extract from INIT JSON:
190
-
191
- ```bash
192
- STATE_PATH=$(echo "$INIT" | jq -r '.state_path // empty')
193
- ROADMAP_PATH=$(echo "$INIT" | jq -r '.roadmap_path // empty')
194
- REQUIREMENTS_PATH=$(echo "$INIT" | jq -r '.requirements_path // empty')
195
- RESEARCH_PATH=$(echo "$INIT" | jq -r '.research_path // empty')
196
- VERIFICATION_PATH=$(echo "$INIT" | jq -r '.verification_path // empty')
197
- UAT_PATH=$(echo "$INIT" | jq -r '.uat_path // empty')
198
- CONTEXT_PATH=$(echo "$INIT" | jq -r '.context_path // empty')
199
- ```
200
-
201
- ## 8. Spawn planner Agent
202
-
203
- Display banner:
204
- ```
205
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
206
- MAXSIM ► PLANNING PHASE {X}
207
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
208
-
209
- ◆ Spawning planner...
210
- ```
211
-
212
- Planner prompt:
213
-
214
- ```markdown
215
- <planning_context>
216
- **Phase:** {phase_number}
217
- **Mode:** {standard | gap_closure}
218
-
219
- <files_to_read>
220
- - {state_path} (Project State)
221
- - {roadmap_path} (Roadmap)
222
- - {requirements_path} (Requirements)
223
- - {context_path} (USER DECISIONS from /maxsim:plan discussion stage)
224
- - {research_path} (Technical Research)
225
- - {verification_path} (Verification Gaps - if --gaps)
226
- - {uat_path} (UAT Gaps - if --gaps)
227
- </files_to_read>
228
-
229
- **Phase requirement IDs (every ID MUST appear in a plan's `requirements` field):** {phase_req_ids}
230
-
231
- **Project instructions:** Read ./CLAUDE.md if exists — follow project-specific guidelines
232
- **Project skills:** Check .skills/ directory (if exists) — read SKILL.md files, plans should account for project skill rules
233
- </planning_context>
234
-
235
- <downstream_consumer>
236
- Output consumed by /maxsim:execute. Plans need:
237
- - Frontmatter (wave, depends_on, files_modified, autonomous)
238
- - Tasks in XML format
239
- - Verification criteria
240
- - must_haves for goal-backward verification
241
- </downstream_consumer>
242
-
243
- <quality_gate>
244
- - [ ] PLAN.md files created in phase directory
245
- - [ ] Each plan has valid frontmatter
246
- - [ ] Tasks are specific and actionable
247
- - [ ] Dependencies correctly identified
248
- - [ ] Waves assigned for parallel execution
249
- - [ ] must_haves derived from phase goal
250
- </quality_gate>
251
- ```
252
-
253
- ```
254
- Task(
255
- prompt=filled_prompt,
256
- subagent_type="planner",
257
- model="{planner_model}",
258
- description="Plan Phase {phase}"
259
- )
260
- ```
261
-
262
- ## 9. Handle Planner Return
263
-
264
- - **`## PLANNING COMPLETE`:** Display plan count. If `--skip-verify` or `plan_checker_enabled` is false (from init): skip to step 13. Otherwise: step 10.
265
- - **`## CHECKPOINT REACHED`:** Present to user, get response, spawn continuation (step 12)
266
- - **`## PLANNING INCONCLUSIVE`:** Show attempts, offer: Add context / Retry / Manual
267
-
268
- ## 10. Spawn planner Agent (Plan Verification Mode)
269
-
270
- Display banner:
271
- ```
272
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
273
- MAXSIM ► VERIFYING PLANS
274
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
275
-
276
- ◆ Spawning plan checker...
277
- ```
278
-
279
- Checker prompt:
280
-
281
- ```markdown
282
- <verification_context>
283
- **Phase:** {phase_number}
284
- **Phase Goal:** {goal from ROADMAP}
285
-
286
- <files_to_read>
287
- - {PHASE_DIR}/*-PLAN.md (Plans to verify)
288
- - {roadmap_path} (Roadmap)
289
- - {requirements_path} (Requirements)
290
- - {context_path} (USER DECISIONS from /maxsim:plan discussion stage)
291
- - {research_path} (Technical Research — includes Validation Architecture)
292
- </files_to_read>
293
-
294
- **Phase requirement IDs (MUST ALL be covered):** {phase_req_ids}
295
-
296
- **Project instructions:** Read ./CLAUDE.md if exists — verify plans honor project guidelines
297
- **Project skills:** Check .skills/ directory (if exists) — verify plans account for project skill rules
298
- </verification_context>
299
-
300
- <expected_output>
301
- - ## VERIFICATION PASSED — all checks pass
302
- - ## ISSUES FOUND — structured issue list
303
- </expected_output>
304
- ```
305
-
306
- ```
307
- Task(
308
- prompt="## Task: Verify plans achieve phase goal\n\n## Suggested Skills: verification-gates\n\n" + checker_prompt,
309
- subagent_type="planner",
310
- model="{checker_model}",
311
- description="Verify Phase {phase} plans"
312
- )
313
- ```
314
-
315
- ## 11. Handle Checker Return
316
-
317
- - **`## VERIFICATION PASSED`:** Display confirmation, proceed to step 13.
318
- - **`## ISSUES FOUND`:** Display issues, check iteration count, proceed to step 12.
319
-
320
- ## 12. Revision Loop (Max 3 Iterations)
321
-
322
- Track `iteration_count` (starts at 1 after initial plan + check).
323
-
324
- **If iteration_count < 3:**
325
-
326
- Display: `Sending back to planner for revision... (iteration {N}/3)`
327
-
328
- Revision prompt:
329
-
330
- ```markdown
331
- <revision_context>
332
- **Phase:** {phase_number}
333
- **Mode:** revision
334
-
335
- <files_to_read>
336
- - {PHASE_DIR}/*-PLAN.md (Existing plans)
337
- - {context_path} (USER DECISIONS from /maxsim:plan discussion stage)
338
- </files_to_read>
339
-
340
- **Checker issues:** {structured_issues_from_checker}
341
- </revision_context>
342
-
343
- <instructions>
344
- Make targeted updates to address checker issues.
345
- Do NOT replan from scratch unless issues are fundamental.
346
- Return what changed.
347
- </instructions>
348
- ```
349
-
350
- ```
351
- Task(
352
- prompt=revision_prompt,
353
- subagent_type="planner",
354
- model="{planner_model}",
355
- description="Revise Phase {phase} plans"
356
- )
357
- ```
358
-
359
- After planner returns -> spawn checker again (step 10), increment iteration_count.
360
-
361
- **If iteration_count >= 3:**
362
-
363
- Display: `Max iterations reached. {N} issues remain:` + issue list
364
-
365
- Offer: 1) Force proceed, 2) Provide guidance and retry, 3) Abandon
366
-
367
- ## 13. Present Final Status
368
-
369
- Route to `<offer_next>` OR `auto_advance` depending on flags/config.
370
-
371
- ## 14. Auto-Advance Check
372
-
373
- Check for auto-advance trigger:
374
-
375
- 1. Parse `--auto` flag from $ARGUMENTS
376
- 2. Read `workflow.auto_advance` from config:
377
- ```bash
378
- AUTO_CFG=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs config-get workflow.auto_advance 2>/dev/null || echo "false")
379
- ```
380
-
381
- **If `--auto` flag present OR `AUTO_CFG` is true:**
382
-
383
- Display banner:
384
- ```
385
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
386
- MAXSIM ► AUTO-ADVANCING TO EXECUTE
387
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
388
-
389
- Plans ready. Spawning execute-phase...
390
- ```
391
-
392
- Spawn execute-phase as Task with direct workflow file reference (do NOT use Skill tool — Skills don't resolve inside Task subagents):
393
- ```
394
- Task(
395
- prompt="
396
- <objective>
397
- You are the execute-phase orchestrator. Execute all plans for Phase ${PHASE}: ${PHASE_NAME}.
398
- </objective>
399
-
400
- <execution_context>
401
- @./workflows/execute-phase.md
402
- @./references/checkpoints.md
403
- @./references/tdd.md
404
- @./references/model-profile-resolution.md
405
- </execution_context>
406
-
407
- <arguments>
408
- PHASE=${PHASE}
409
- ARGUMENTS='${PHASE} --auto --no-transition'
410
- </arguments>
411
-
412
- <instructions>
413
- 1. Read execute-phase.md from execution_context for your complete workflow
414
- 2. Follow ALL steps: initialize, handle_branching, validate_phase, discover_and_group_plans, execute_waves, aggregate_results, close_parent_artifacts, verify_phase_goal, update_roadmap
415
- 3. The --no-transition flag means: after verification + roadmap update, STOP and return status. Do NOT run transition.md.
416
- 4. When spawning executor agents, use subagent_type='executor' with the existing @file pattern from the workflow
417
- 5. When spawning verifier agents, use subagent_type='verifier'
418
- 6. Preserve the classifyHandoffIfNeeded workaround (spot-check on that specific error)
419
- 7. Do NOT use the Skill tool or /maxsim: commands
420
- </instructions>
421
- ",
422
- subagent_type="general-purpose",
423
- description="Execute Phase ${PHASE}"
424
- )
425
- ```
426
-
427
- **Handle execute-phase return:**
428
- - **PHASE COMPLETE** → Display final summary:
429
- ```
430
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
431
- MAXSIM ► PHASE ${PHASE} COMPLETE ✓
432
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
433
-
434
- Auto-advance pipeline finished.
435
-
436
- Next: /maxsim:plan ${NEXT_PHASE} --auto
437
- ```
438
- - **GAPS FOUND / VERIFICATION FAILED** → Display result, stop chain:
439
- ```
440
- Auto-advance stopped: Execution needs review.
441
-
442
- Review the output above and continue manually:
443
- /maxsim:execute ${PHASE}
444
- ```
445
-
446
- **If neither `--auto` nor config enabled:**
447
- Route to `<offer_next>` (existing behavior).
448
-
449
- </process>
450
-
451
- <offer_next>
452
- Output this markdown directly (not as a code block):
453
-
454
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
455
- MAXSIM ► PHASE {X} PLANNED ✓
456
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
457
-
458
- **Phase {X}: {Name}** — {N} plan(s) in {M} wave(s)
459
-
460
- | Wave | Plans | What it builds |
461
- |------|-------|----------------|
462
- | 1 | 01, 02 | [objectives] |
463
- | 2 | 03 | [objective] |
464
-
465
- Research: {Completed | Used existing | Skipped}
466
- Verification: {Passed | Passed with override | Skipped}
467
-
468
- ───────────────────────────────────────────────────────────────
469
-
470
- ## ▶ Next Up
471
-
472
- **Execute Phase {X}** — run all {N} plans
473
-
474
- /maxsim:execute {X}
475
-
476
- <sub>/clear first → fresh context window</sub>
477
-
478
- ───────────────────────────────────────────────────────────────
479
-
480
- **Also available:**
481
- - cat .planning/phases/{phase-dir}/*-PLAN.md — review plans
482
- - /maxsim:plan {X} --research — re-research first
483
-
484
- ───────────────────────────────────────────────────────────────
485
- </offer_next>
486
-
487
- <success_criteria>
488
- - [ ] .planning/ directory validated
489
- - [ ] Phase validated against roadmap
490
- - [ ] Phase directory created if needed
491
- - [ ] CONTEXT.md loaded early (step 4) and passed to ALL agents
492
- - [ ] Research completed (unless --skip-research or --gaps or exists)
493
- - [ ] researcher spawned with CONTEXT.md
494
- - [ ] Existing plans checked
495
- - [ ] planner spawned with CONTEXT.md + RESEARCH.md
496
- - [ ] Plans created (PLANNING COMPLETE or CHECKPOINT handled)
497
- - [ ] planner (plan-check mode) spawned with CONTEXT.md
498
- - [ ] Verification passed OR user override OR max iterations with user decision
499
- - [ ] User sees status between agent spawns
500
- - [ ] User knows next steps
501
- </success_criteria>