maxsimcli 4.15.4 → 5.0.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.
- package/dist/assets/CHANGELOG.md +14 -0
- package/dist/assets/hooks/maxsim-check-update.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-notification-sound.cjs +70 -0
- package/dist/assets/hooks/maxsim-notification-sound.cjs.map +1 -0
- package/dist/assets/hooks/maxsim-statusline.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-stop-sound.cjs +70 -0
- package/dist/assets/hooks/maxsim-stop-sound.cjs.map +1 -0
- package/dist/assets/hooks/maxsim-sync-reminder.cjs.map +1 -1
- package/dist/assets/templates/agents/AGENTS.md +1 -1
- package/dist/assets/templates/agents/executor.md +3 -3
- package/dist/assets/templates/agents/planner.md +5 -5
- package/dist/assets/templates/agents/verifier.md +1 -1
- package/dist/assets/templates/commands/maxsim/quick.md +2 -2
- package/dist/assets/templates/skills/github-artifact-protocol/SKILL.md +8 -8
- package/dist/assets/templates/skills/github-tools-guide/SKILL.md +96 -0
- package/dist/assets/templates/workflows/execute-plan.md +90 -99
- package/dist/assets/templates/workflows/execute.md +58 -45
- package/dist/assets/templates/workflows/go.md +22 -17
- package/dist/assets/templates/workflows/init-existing.md +13 -16
- package/dist/assets/templates/workflows/new-milestone.md +23 -1
- package/dist/assets/templates/workflows/new-project.md +13 -16
- package/dist/assets/templates/workflows/plan-create.md +16 -24
- package/dist/assets/templates/workflows/plan-discuss.md +6 -8
- package/dist/assets/templates/workflows/plan-research.md +7 -6
- package/dist/assets/templates/workflows/plan.md +21 -14
- package/dist/assets/templates/workflows/progress.md +54 -30
- package/dist/assets/templates/workflows/quick.md +21 -13
- package/dist/assets/templates/workflows/sdd.md +29 -26
- package/dist/assets/templates/workflows/verify-phase.md +77 -58
- package/dist/cli.cjs +10894 -8290
- package/dist/cli.cjs.map +1 -1
- package/dist/core-D5zUr9cb.cjs.map +1 -1
- package/dist/install.cjs +60 -37
- package/dist/install.cjs.map +1 -1
- package/dist/skills-CjFWZIGM.cjs.map +1 -1
- package/package.json +2 -4
- package/dist/assets/templates/workflows/discovery-phase.md +0 -292
- package/dist/assets/templates/workflows/execute-phase.md +0 -768
- package/dist/mcp-server.cjs +0 -40900
- package/dist/mcp-server.cjs.map +0 -1
|
@@ -9,15 +9,7 @@ Read config.json for planning behavior settings.
|
|
|
9
9
|
@./references/git-integration.md
|
|
10
10
|
</required_reading>
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
MAXSIM provides MCP tools (mcp_create_phase, mcp_list_phases, etc.) for structured operations.
|
|
15
|
-
If MCP tools are available in your tool list, prefer them for phase, todo, and state operations.
|
|
16
|
-
|
|
17
|
-
**If MCP tools are NOT available** (server not running, .mcp.json not configured, or non-Claude runtime):
|
|
18
|
-
- Log a warning: "MCP server not available -- using Bash tools router fallback"
|
|
19
|
-
- Fall back to the Bash tools router: `node .claude/maxsim/bin/maxsim-tools.cjs <command>`
|
|
20
|
-
- All operations work identically via either path -- MCP is preferred but not required
|
|
12
|
+
MAXSIM provides CLI commands (`github create-phase`, `github list-phases`, etc.) for structured operations.
|
|
21
13
|
|
|
22
14
|
<process>
|
|
23
15
|
|
|
@@ -45,31 +37,19 @@ When the orchestrator passes `github_context` (phase_issue_number and plan_comme
|
|
|
45
37
|
|
|
46
38
|
**External edit detection (WIRE-06):** Before beginning execution, check if the plan comment was modified since the orchestrator read it:
|
|
47
39
|
|
|
48
|
-
```
|
|
49
|
-
|
|
40
|
+
```bash
|
|
41
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github detect-external-edits --phase-number "$PHASE_NUMBER"
|
|
50
42
|
```
|
|
51
43
|
|
|
52
44
|
If external edits detected: warn user and offer to re-read the plan before proceeding.
|
|
53
45
|
|
|
54
|
-
**
|
|
46
|
+
**If no GitHub context is available:**
|
|
55
47
|
|
|
56
|
-
If no `phase_issue_number` or `plan_comment_body` was passed:
|
|
48
|
+
GitHub Issues is the source of truth for plans. If no `phase_issue_number` or `plan_comment_body` was passed, report the error and exit:
|
|
57
49
|
|
|
58
|
-
```bash
|
|
59
|
-
# Use plans/summaries from INIT JSON, or list files
|
|
60
|
-
ls .planning/phases/XX-name/*-PLAN.md 2>/dev/null | sort
|
|
61
|
-
ls .planning/phases/XX-name/*-SUMMARY.md 2>/dev/null | sort
|
|
62
50
|
```
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<if mode="yolo">
|
|
67
|
-
Auto-approve: `⚡ Execute {phase}-{plan}-PLAN.md [Plan X of Y for Phase Z]` → parse_segments.
|
|
68
|
-
</if>
|
|
69
|
-
|
|
70
|
-
<if mode="interactive" OR="custom with gates.execute_next_plan true">
|
|
71
|
-
Present plan identification, wait for confirmation.
|
|
72
|
-
</if>
|
|
51
|
+
Plan content must be provided via GitHub Issue comment. Ensure GitHub integration is configured.
|
|
52
|
+
```
|
|
73
53
|
</step>
|
|
74
54
|
|
|
75
55
|
<step name="record_start_time">
|
|
@@ -132,7 +112,7 @@ Pattern B only (verify-only checkpoints). Skip for A/C.
|
|
|
132
112
|
2. Per segment:
|
|
133
113
|
- Subagent route: spawn executor for assigned tasks only. Prompt: task range, plan content (from GitHub comment or local path), read full plan for context, execute assigned tasks, track deviations, move task sub-issues to "In Progress" when started and "Done" when completed, NO SUMMARY/commit. Track via agent protocol.
|
|
134
114
|
- Main route: execute tasks using standard flow (step name="execute")
|
|
135
|
-
3. After ALL segments: aggregate files/deviations/decisions → post SUMMARY as GitHub comment (
|
|
115
|
+
3. After ALL segments: aggregate files/deviations/decisions → post SUMMARY as GitHub comment (`github post-comment` with type=summary) → commit → self-check:
|
|
136
116
|
- Verify key-files.created exist on disk with `[ -f ]`
|
|
137
117
|
- Check `git log --oneline --all --grep="{phase}-{plan}"` returns ≥1 commit
|
|
138
118
|
- Check for `## Self-Check: PASSED` or `## Self-Check: FAILED` and append to summary comment body
|
|
@@ -144,12 +124,7 @@ Pattern B only (verify-only checkpoints). Skip for A/C.
|
|
|
144
124
|
|
|
145
125
|
The plan content IS the execution instructions. Follow exactly. If plan references CONTEXT.md: honor user's vision throughout.
|
|
146
126
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
When plan is loaded from a local file (fallback):
|
|
150
|
-
```bash
|
|
151
|
-
cat .planning/phases/XX-name/{phase}-{plan}-PLAN.md
|
|
152
|
-
```
|
|
127
|
+
The plan content is already in memory from the load_plan_from_github step (loaded from the GitHub Issue comment passed by the orchestrator).
|
|
153
128
|
</step>
|
|
154
129
|
|
|
155
130
|
<step name="pre_execution_gates">
|
|
@@ -193,7 +168,7 @@ fi
|
|
|
193
168
|
node ~/.claude/maxsim/bin/maxsim-tools.cjs phases list --type summaries --raw
|
|
194
169
|
# Extract the second-to-last summary from the JSON result
|
|
195
170
|
```
|
|
196
|
-
If previous phase has unresolved issues (check summary comments on phase issue
|
|
171
|
+
If previous phase has unresolved issues (check summary comments on phase issue for "Issues Encountered" / "Next Phase Readiness" blockers): AskUserQuestion(header="Previous Issues", options: "Proceed anyway" | "Address first" | "Review previous").
|
|
197
172
|
</step>
|
|
198
173
|
|
|
199
174
|
<step name="execute">
|
|
@@ -205,8 +180,8 @@ Deviations are normal — handle via rules below.
|
|
|
205
180
|
**Before starting each task (WIRE-04 board transition):**
|
|
206
181
|
- Look up the task's sub-issue number from `task_mappings` in the GitHub context.
|
|
207
182
|
- Move the task sub-issue to "In Progress":
|
|
208
|
-
```
|
|
209
|
-
|
|
183
|
+
```bash
|
|
184
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue --issue-number $TASK_SUB_ISSUE_NUMBER --status "In Progress"
|
|
210
185
|
```
|
|
211
186
|
|
|
212
187
|
- `type="auto"`: if `tdd="true"` → TDD execution. Implement with deviation rules + auth gates. Verify done criteria. Commit (see task_commit). Track hash for Summary.
|
|
@@ -214,17 +189,13 @@ Deviations are normal — handle via rules below.
|
|
|
214
189
|
|
|
215
190
|
**After each task completes successfully (WIRE-04 board transition):**
|
|
216
191
|
- Post task completion details on the task sub-issue:
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
issue_number: task_sub_issue_number,
|
|
220
|
-
commit_sha: TASK_COMMIT,
|
|
221
|
-
files_changed: [list of files modified by this task]
|
|
222
|
-
)
|
|
192
|
+
```bash
|
|
193
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-completion --issue-number $TASK_SUB_ISSUE_NUMBER --commit-sha "$TASK_COMMIT" --files-changed "file1.ts,file2.ts"
|
|
223
194
|
```
|
|
224
195
|
- Close the task sub-issue and move to "Done":
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
|
|
196
|
+
```bash
|
|
197
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github close-issue $TASK_SUB_ISSUE_NUMBER
|
|
198
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue --issue-number $TASK_SUB_ISSUE_NUMBER --status "Done"
|
|
228
199
|
```
|
|
229
200
|
|
|
230
201
|
3. Run `<verification>` checks
|
|
@@ -379,13 +350,19 @@ Orchestrator parses → presents to user → spawns fresh continuation with your
|
|
|
379
350
|
If verification fails: STOP. Present: "Verification failed for Task [X]: [name]. Expected: [criteria]. Actual: [result]." Options: Retry | Skip (mark incomplete) | Stop (investigate). If skipped → SUMMARY "Issues Encountered".
|
|
380
351
|
|
|
381
352
|
**On review failure (WIRE-07):** If the task sub-issue was already moved to "Done", reopen and move back:
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
353
|
+
```bash
|
|
354
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github reopen-issue $TASK_SUB_ISSUE_NUMBER
|
|
355
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue --issue-number $TASK_SUB_ISSUE_NUMBER --status "In Progress"
|
|
356
|
+
TMPFILE=$(mktemp)
|
|
357
|
+
cat > "$TMPFILE" << 'BODY_EOF'
|
|
358
|
+
## Review Failure
|
|
359
|
+
|
|
360
|
+
Verification failed for this task. Moving back to In Progress.
|
|
361
|
+
|
|
362
|
+
**Reason:** {failure details}
|
|
363
|
+
**Action needed:** {what needs to be fixed}
|
|
364
|
+
BODY_EOF
|
|
365
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number $TASK_SUB_ISSUE_NUMBER --body-file "$TMPFILE"
|
|
389
366
|
```
|
|
390
367
|
</step>
|
|
391
368
|
|
|
@@ -411,11 +388,17 @@ fi
|
|
|
411
388
|
If plan frontmatter contains a `user_setup` field: create `{phase}-USER-SETUP.md` using template `~/.claude/maxsim/templates/user-setup.md`. Per service: env vars table, account setup checklist, dashboard config, local dev notes, verification commands. Status "Incomplete". Set `USER_SETUP_CREATED=true`. If empty/missing: skip.
|
|
412
389
|
|
|
413
390
|
Also post a reminder comment on the phase issue:
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
391
|
+
```bash
|
|
392
|
+
TMPFILE=$(mktemp)
|
|
393
|
+
cat > "$TMPFILE" << 'BODY_EOF'
|
|
394
|
+
## User Setup Required
|
|
395
|
+
|
|
396
|
+
This plan created a USER-SETUP.md with manual steps needed before proceeding.
|
|
397
|
+
|
|
398
|
+
**File:** {phase}-USER-SETUP.md
|
|
399
|
+
**Services:** {list of services requiring setup}
|
|
400
|
+
BODY_EOF
|
|
401
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number $PHASE_ISSUE_NUMBER --body-file "$TMPFILE"
|
|
419
402
|
```
|
|
420
403
|
</step>
|
|
421
404
|
|
|
@@ -439,17 +422,15 @@ Build summary content using the same structure as `~/.claude/maxsim/templates/su
|
|
|
439
422
|
- Self-Check result
|
|
440
423
|
|
|
441
424
|
Post to the phase issue:
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
body: {summary_content}
|
|
447
|
-
)
|
|
425
|
+
```bash
|
|
426
|
+
TMPFILE=$(mktemp)
|
|
427
|
+
echo "$SUMMARY_CONTENT" > "$TMPFILE"
|
|
428
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number $PHASE_ISSUE_NUMBER --body-file "$TMPFILE" --type summary
|
|
448
429
|
```
|
|
449
430
|
|
|
450
431
|
Record the comment URL/ID as `SUMMARY_COMMENT_ID` for future reference.
|
|
451
432
|
|
|
452
|
-
|
|
433
|
+
GitHub Issues is the source of truth -- summaries are always posted as GitHub comments.
|
|
453
434
|
</step>
|
|
454
435
|
|
|
455
436
|
<step name="review_cycle">
|
|
@@ -614,13 +595,19 @@ Wait for user response:
|
|
|
614
595
|
**On review failure -- reopen affected task sub-issues (WIRE-07):**
|
|
615
596
|
|
|
616
597
|
If the code review identifies failures tied to specific tasks, and those task sub-issues were already closed:
|
|
617
|
-
```
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
598
|
+
```bash
|
|
599
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github reopen-issue $TASK_SUB_ISSUE_NUMBER
|
|
600
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue --issue-number $TASK_SUB_ISSUE_NUMBER --status "In Progress"
|
|
601
|
+
TMPFILE=$(mktemp)
|
|
602
|
+
cat > "$TMPFILE" << 'BODY_EOF'
|
|
603
|
+
## Code Review Failure
|
|
604
|
+
|
|
605
|
+
This task's code review was blocked. Moving back to In Progress.
|
|
606
|
+
|
|
607
|
+
**Blocking issues:**
|
|
608
|
+
{list of blocker/high issues from verifier}
|
|
609
|
+
BODY_EOF
|
|
610
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number $TASK_SUB_ISSUE_NUMBER --body-file "$TMPFILE"
|
|
624
611
|
```
|
|
625
612
|
|
|
626
613
|
---
|
|
@@ -903,12 +890,10 @@ Add review cycle results to the summary content in memory (under a `## Review Cy
|
|
|
903
890
|
```
|
|
904
891
|
|
|
905
892
|
Now post the complete summary (with review cycle included) to GitHub:
|
|
906
|
-
```
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
body: {complete_summary_content_including_review_cycle}
|
|
911
|
-
)
|
|
893
|
+
```bash
|
|
894
|
+
TMPFILE=$(mktemp)
|
|
895
|
+
echo "$COMPLETE_SUMMARY_CONTENT" > "$TMPFILE"
|
|
896
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number $PHASE_ISSUE_NUMBER --body-file "$TMPFILE" --type summary
|
|
912
897
|
```
|
|
913
898
|
|
|
914
899
|
After posting, commit any review-cycle metadata:
|
|
@@ -1020,25 +1005,37 @@ If the plan includes verification criteria (from `<verification>` section of pla
|
|
|
1020
1005
|
|
|
1021
1006
|
Build verification results content in memory with `<!-- maxsim:type=verification -->` marker.
|
|
1022
1007
|
|
|
1023
|
-
```
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1008
|
+
```bash
|
|
1009
|
+
TMPFILE=$(mktemp)
|
|
1010
|
+
cat > "$TMPFILE" << 'BODY_EOF'
|
|
1011
|
+
<!-- maxsim:type=verification -->
|
|
1012
|
+
## Plan {plan_number} Verification
|
|
1013
|
+
|
|
1014
|
+
{verification_results}
|
|
1015
|
+
|
|
1016
|
+
**Status:** {passed|failed}
|
|
1017
|
+
**Timestamp:** {ISO timestamp}
|
|
1018
|
+
BODY_EOF
|
|
1019
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number $PHASE_ISSUE_NUMBER --body-file "$TMPFILE" --type verification
|
|
1029
1020
|
```
|
|
1030
1021
|
|
|
1031
1022
|
If the plan includes UAT criteria (from `<uat>` section):
|
|
1032
1023
|
|
|
1033
|
-
```
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1024
|
+
```bash
|
|
1025
|
+
TMPFILE=$(mktemp)
|
|
1026
|
+
cat > "$TMPFILE" << 'BODY_EOF'
|
|
1027
|
+
<!-- maxsim:type=uat -->
|
|
1028
|
+
## Plan {plan_number} UAT
|
|
1029
|
+
|
|
1030
|
+
{uat_criteria_and_results}
|
|
1031
|
+
|
|
1032
|
+
**Status:** {pending|passed|failed}
|
|
1033
|
+
**Timestamp:** {ISO timestamp}
|
|
1034
|
+
BODY_EOF
|
|
1035
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number $PHASE_ISSUE_NUMBER --body-file "$TMPFILE" --type uat
|
|
1039
1036
|
```
|
|
1040
1037
|
|
|
1041
|
-
|
|
1038
|
+
GitHub Issues is the source of truth -- verification and UAT results are always posted as GitHub comments.
|
|
1042
1039
|
</step>
|
|
1043
1040
|
|
|
1044
1041
|
<step name="update_codebase_map">
|
|
@@ -1060,18 +1057,12 @@ node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "" --files .planning/codebase/
|
|
|
1060
1057
|
If `USER_SETUP_CREATED=true`: display `⚠️ USER SETUP REQUIRED` with path + env/config tasks at TOP.
|
|
1061
1058
|
|
|
1062
1059
|
Check completion by querying the phase issue's task sub-issues:
|
|
1063
|
-
```
|
|
1064
|
-
|
|
1060
|
+
```bash
|
|
1061
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github list-sub-issues $PHASE_ISSUE_NUMBER
|
|
1065
1062
|
```
|
|
1066
1063
|
|
|
1067
1064
|
Count open vs closed sub-issues. Map closed count to plans complete.
|
|
1068
1065
|
|
|
1069
|
-
Fallback (no GitHub):
|
|
1070
|
-
```bash
|
|
1071
|
-
ls -1 .planning/phases/[current-phase-dir]/*-PLAN.md 2>/dev/null | wc -l
|
|
1072
|
-
ls -1 .planning/phases/[current-phase-dir]/*-SUMMARY.md 2>/dev/null | wc -l
|
|
1073
|
-
```
|
|
1074
|
-
|
|
1075
1066
|
| Condition | Route | Action |
|
|
1076
1067
|
|-----------|-------|--------|
|
|
1077
1068
|
| open task sub-issues remain | **A: More plans** | Find next incomplete plan (by open sub-issues or missing summary comment). Yolo: auto-continue. Interactive: show next plan, suggest `/maxsim:execute {phase}`. STOP here. |
|
|
@@ -41,8 +41,8 @@ Exit workflow.
|
|
|
41
41
|
|
|
42
42
|
When GitHub integration is active (phase_issue_number is set), check for plan comments on the phase issue before reporting no plans:
|
|
43
43
|
|
|
44
|
-
```
|
|
45
|
-
|
|
44
|
+
```bash
|
|
45
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue $PHASE_ISSUE_NUMBER --comments
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
Parse the response to find comments with `<!-- maxsim:type=plan -->` markers or `## Plan NN` headings. If no plan comments are found:
|
|
@@ -61,8 +61,8 @@ Exit workflow.
|
|
|
61
61
|
When GitHub integration is active (`phase_issue_number` is set):
|
|
62
62
|
|
|
63
63
|
1. Fetch the phase issue and its comments:
|
|
64
|
-
```
|
|
65
|
-
|
|
64
|
+
```bash
|
|
65
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue $PHASE_ISSUE_NUMBER --comments
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
2. Parse issue comments to identify plan comments. A plan comment is one that contains either:
|
|
@@ -75,8 +75,8 @@ When GitHub integration is active (`phase_issue_number` is set):
|
|
|
75
75
|
- Store plan content in memory as `PLAN_COMMENTS[]`
|
|
76
76
|
|
|
77
77
|
4. Check completion status for each plan by calling:
|
|
78
|
-
```
|
|
79
|
-
|
|
78
|
+
```bash
|
|
79
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github list-sub-issues $PHASE_ISSUE_NUMBER
|
|
80
80
|
```
|
|
81
81
|
A plan is considered complete when ALL of its task sub-issues are closed (state: closed).
|
|
82
82
|
Additionally, check for `<!-- maxsim:type=summary -->` comments on the phase issue as a secondary completion signal.
|
|
@@ -87,17 +87,20 @@ When GitHub integration is active (`phase_issue_number` is set):
|
|
|
87
87
|
- `plan_count`: total plan comments found
|
|
88
88
|
- `incomplete_count`: count of incomplete plans
|
|
89
89
|
|
|
90
|
-
When GitHub integration is NOT active (no `phase_issue_number`)
|
|
91
|
-
```bash
|
|
92
|
-
PLAN_INDEX=$(node .claude/maxsim/bin/maxsim-tools.cjs phase-plan-index "${PHASE_NUMBER}")
|
|
90
|
+
When GitHub integration is NOT active (no `phase_issue_number`):
|
|
93
91
|
```
|
|
92
|
+
No plans found for Phase {phase_number}. GitHub Issues is the source of truth for plans.
|
|
93
|
+
|
|
94
|
+
Ensure GitHub integration is configured: run /maxsim:init to set up GitHub Issues.
|
|
95
|
+
```
|
|
96
|
+
Exit workflow.
|
|
94
97
|
|
|
95
98
|
### 2b. Check for External Edits (WIRE-06)
|
|
96
99
|
|
|
97
100
|
If phase_issue_number is set, optionally detect whether the phase issue was externally modified since last read:
|
|
98
101
|
|
|
99
|
-
```
|
|
100
|
-
|
|
102
|
+
```bash
|
|
103
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github detect-external-edits --phase-number "$PHASE_NUMBER"
|
|
101
104
|
```
|
|
102
105
|
|
|
103
106
|
If external edits are detected: warn the user before proceeding.
|
|
@@ -145,7 +148,7 @@ Display:
|
|
|
145
148
|
Wait for user choice via natural conversation.
|
|
146
149
|
|
|
147
150
|
- **View results:** Fetch and display summary comments (`<!-- maxsim:type=summary -->`) from the phase issue, then re-show options.
|
|
148
|
-
- **Re-execute:** Reopen task sub-issues via `
|
|
151
|
+
- **Re-execute:** Reopen task sub-issues via `github reopen-issue` for each task sub-issue, restart from Execute Plans (step 4).
|
|
149
152
|
- **View verification:** Fetch and display the verification comment (`<!-- maxsim:type=verification -->`) from the phase issue, then re-show options.
|
|
150
153
|
- **Done:** Exit workflow.
|
|
151
154
|
|
|
@@ -232,7 +235,7 @@ Execute each wave in sequence. Within a wave: parallel if `parallelization` is t
|
|
|
232
235
|
<success_criteria>
|
|
233
236
|
- [ ] All tasks executed
|
|
234
237
|
- [ ] Each task committed individually
|
|
235
|
-
- [ ] Summary posted as GitHub comment (
|
|
238
|
+
- [ ] Summary posted as GitHub comment (`github post-comment` with type=summary) on phase issue
|
|
236
239
|
- [ ] Task sub-issues moved: In Progress when started, Done when completed
|
|
237
240
|
- [ ] STATE.md updated with position and decisions
|
|
238
241
|
- [ ] ROADMAP.md updated with plan progress
|
|
@@ -287,8 +290,8 @@ Proceeding to verification...
|
|
|
287
290
|
```
|
|
288
291
|
|
|
289
292
|
**Move phase issue to "In Review" on GitHub (WIRE-08):**
|
|
290
|
-
```
|
|
291
|
-
|
|
293
|
+
```bash
|
|
294
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue --issue-number $PHASE_ISSUE_NUMBER --status "In Review"
|
|
292
295
|
```
|
|
293
296
|
This signals all tasks are complete and the phase is awaiting verification. The phase moves to "Done" only after verification passes.
|
|
294
297
|
|
|
@@ -315,7 +318,7 @@ Phase goal: {goal from ROADMAP.md}
|
|
|
315
318
|
Phase requirement IDs: {phase_req_ids}
|
|
316
319
|
Check must_haves against actual codebase.
|
|
317
320
|
Cross-reference requirement IDs from plan frontmatter against REQUIREMENTS.md.
|
|
318
|
-
Post verification results as a GitHub comment (
|
|
321
|
+
Post verification results as a GitHub comment (`github post-comment` with type=verification) on the phase issue.
|
|
319
322
|
Also write VERIFICATION.md to the phase directory for local reference.",
|
|
320
323
|
subagent_type="verifier",
|
|
321
324
|
model="{verifier_model}"
|
|
@@ -326,17 +329,12 @@ Also write VERIFICATION.md to the phase directory for local reference.",
|
|
|
326
329
|
|
|
327
330
|
Read verification status from the verification comment on the phase issue:
|
|
328
331
|
|
|
329
|
-
```
|
|
330
|
-
|
|
332
|
+
```bash
|
|
333
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue $PHASE_ISSUE_NUMBER --comments
|
|
331
334
|
```
|
|
332
335
|
|
|
333
336
|
Look for the `<!-- maxsim:type=verification -->` comment and parse the `status:` field from its body.
|
|
334
337
|
|
|
335
|
-
Also fall back to reading locally:
|
|
336
|
-
```bash
|
|
337
|
-
grep "^status:" "$PHASE_DIR"/*-VERIFICATION.md | cut -d: -f2 | tr -d ' '
|
|
338
|
-
```
|
|
339
|
-
|
|
340
338
|
**If `passed`:** Show verification gate and proceed to completion.
|
|
341
339
|
|
|
342
340
|
```
|
|
@@ -349,17 +347,23 @@ Phase {phase_number} complete!
|
|
|
349
347
|
```
|
|
350
348
|
|
|
351
349
|
Move phase issue to "Done" status:
|
|
352
|
-
```
|
|
353
|
-
|
|
350
|
+
```bash
|
|
351
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue --issue-number $PHASE_ISSUE_NUMBER --status "Done"
|
|
354
352
|
```
|
|
355
353
|
|
|
356
354
|
Post phase completion comment:
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
355
|
+
```bash
|
|
356
|
+
TMPFILE=$(mktemp)
|
|
357
|
+
cat > "$TMPFILE" << 'BODY_EOF'
|
|
358
|
+
## Phase {phase_number} Complete
|
|
359
|
+
|
|
360
|
+
All plans executed and verified.
|
|
361
|
+
|
|
362
|
+
**Plans:** {completed}/{total}
|
|
363
|
+
**Waves:** {wave_count}
|
|
364
|
+
**Verification:** Passed
|
|
365
|
+
BODY_EOF
|
|
366
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number $PHASE_ISSUE_NUMBER --body-file "$TMPFILE" --type phase-complete
|
|
363
367
|
```
|
|
364
368
|
|
|
365
369
|
Mark phase complete:
|
|
@@ -374,12 +378,14 @@ node .claude/maxsim/bin/maxsim-tools.cjs commit "docs(phase-{X}): complete phase
|
|
|
374
378
|
|
|
375
379
|
**If `gaps_found`:** Post a gaps comment on the phase issue, then proceed to Retry Loop (step 6).
|
|
376
380
|
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
381
|
+
```bash
|
|
382
|
+
TMPFILE=$(mktemp)
|
|
383
|
+
cat > "$TMPFILE" << 'BODY_EOF'
|
|
384
|
+
## Verification Gaps Found
|
|
385
|
+
|
|
386
|
+
{gap summaries from verification result}
|
|
387
|
+
BODY_EOF
|
|
388
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number $PHASE_ISSUE_NUMBER --body-file "$TMPFILE" --type verification-gaps
|
|
383
389
|
```
|
|
384
390
|
|
|
385
391
|
**If `human_needed`:** Present items for human testing, get approval or feedback. If approved, treat as passed. If issues reported, proceed to Retry Loop.
|
|
@@ -433,7 +439,7 @@ Task(
|
|
|
433
439
|
<downstream_consumer>
|
|
434
440
|
Output consumed by /maxsim:execute.
|
|
435
441
|
Plans must be executable prompts.
|
|
436
|
-
Post gap-closure plans as comments on phase issue #{phase_issue_number} using
|
|
442
|
+
Post gap-closure plans as comments on phase issue #{phase_issue_number} using `github post-comment` with type=plan.
|
|
437
443
|
</downstream_consumer>
|
|
438
444
|
",
|
|
439
445
|
subagent_type="planner",
|
|
@@ -458,12 +464,19 @@ At any point during the workflow, if context is getting full (conversation is lo
|
|
|
458
464
|
|
|
459
465
|
**Checkpoint protocol:**
|
|
460
466
|
1. Post a checkpoint comment to the phase's GitHub Issue (if issue tracking is active):
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
+
```bash
|
|
468
|
+
TMPFILE=$(mktemp)
|
|
469
|
+
cat > "$TMPFILE" << 'BODY_EOF'
|
|
470
|
+
## MAXSIM Checkpoint
|
|
471
|
+
|
|
472
|
+
**Command:** /maxsim:execute
|
|
473
|
+
**Stage:** {current_stage}
|
|
474
|
+
**Plans completed:** {completed_count}/{total_count}
|
|
475
|
+
**Verification attempts:** {attempt_count}/3
|
|
476
|
+
**Resume from:** {next_action}
|
|
477
|
+
**Timestamp:** {ISO timestamp}
|
|
478
|
+
BODY_EOF
|
|
479
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number $PHASE_ISSUE_NUMBER --body-file "$TMPFILE" --type checkpoint
|
|
467
480
|
```
|
|
468
481
|
|
|
469
482
|
2. Display checkpoint recommendation:
|
|
@@ -510,7 +523,7 @@ Display final results:
|
|
|
510
523
|
|
|
511
524
|
<success_criteria>
|
|
512
525
|
- [ ] Phase validated against roadmap
|
|
513
|
-
- [ ] Plan inventory loaded from GitHub issue comments (
|
|
526
|
+
- [ ] Plan inventory loaded from GitHub issue comments (GitHub Issues is the source of truth)
|
|
514
527
|
- [ ] External edit detection warns user if phase issue was modified externally
|
|
515
528
|
- [ ] Current state correctly detected from task sub-issue closure and summary comments
|
|
516
529
|
- [ ] Re-entry flow works for already-executed phases
|
|
@@ -42,12 +42,13 @@ Read local files for project context:
|
|
|
42
42
|
|
|
43
43
|
**3. Live GitHub state (primary source — always-live, no cached state):**
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
- `phase_number`, `title`, `issue_number`
|
|
47
|
-
- `total_tasks`, `completed_tasks`, `remaining_tasks`
|
|
48
|
-
- `status` (GitHub board column: To Do / In Progress / In Review / Done)
|
|
45
|
+
Run `github status` to get current state of all phases and detect interrupted work in one call:
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
```bash
|
|
48
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github status
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Returns: `phase_number`, `title`, `issue_number`, `total_tasks`, `completed_tasks`, `remaining_tasks`, `status` (GitHub board column: To Do / In Progress / In Review / Done), and any interrupted phase detection.
|
|
51
52
|
|
|
52
53
|
**4. Git context:**
|
|
53
54
|
```bash
|
|
@@ -108,7 +109,11 @@ Resolve this before continuing. Options:
|
|
|
108
109
|
Block until user responds.
|
|
109
110
|
|
|
110
111
|
**3. Failed verification on GitHub**
|
|
111
|
-
Check if any phase issue has a verification comment with FAIL status (from live GitHub data via `
|
|
112
|
+
Check if any phase issue has a verification comment with FAIL status (from live GitHub data via `github all-progress` — look for phases stuck in "In Review" with a known failure, or check recent comments via `github get-issue` for the current phase issue):
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue N --comments
|
|
116
|
+
```
|
|
112
117
|
```
|
|
113
118
|
## Problem Detected
|
|
114
119
|
|
|
@@ -135,7 +140,7 @@ Block until user responds.
|
|
|
135
140
|
|
|
136
141
|
Apply rules in strict precedence order. The FIRST matching rule determines the action.
|
|
137
142
|
|
|
138
|
-
Use live GitHub data from `
|
|
143
|
+
Use live GitHub data from `github status` (gathered in Phase 1) as the primary source of truth for phase state. Use local ROADMAP.md for phase ordering only.
|
|
139
144
|
|
|
140
145
|
```
|
|
141
146
|
Rule 1: No .planning/ directory?
|
|
@@ -146,31 +151,31 @@ Rule 2: Has blockers in STATE.md? (not cleared in problem detection)
|
|
|
146
151
|
-> Action: Surface blocker, suggest resolution
|
|
147
152
|
-> Reasoning: "BLOCKED: {blocker text}"
|
|
148
153
|
|
|
149
|
-
Rule 3: Interrupted phase detected (from
|
|
154
|
+
Rule 3: Interrupted phase detected (from `github status`)?
|
|
150
155
|
-> Action: /maxsim:execute {N}
|
|
151
156
|
-> Reasoning: "Phase {N} ({name}) was interrupted. Resuming execution."
|
|
152
157
|
|
|
153
158
|
Rule 4: Phase "In Progress" on GitHub board with incomplete tasks?
|
|
154
|
-
-> Check:
|
|
159
|
+
-> Check: `github status` returns a phase with status="In Progress" and remaining_tasks > 0
|
|
155
160
|
-> Action: /maxsim:execute {N}
|
|
156
161
|
-> Reasoning: "Phase {N} ({name}) has {remaining} tasks remaining. Ready to continue."
|
|
157
162
|
|
|
158
163
|
Rule 5: Phase "To Do" on GitHub board (not yet started)?
|
|
159
|
-
-> Check:
|
|
164
|
+
-> Check: `github status` returns the next unstarted phase (status="To Do")
|
|
160
165
|
-> Action: /maxsim:plan {N}
|
|
161
166
|
-> Reasoning: "Phase {N} ({name}) needs planning."
|
|
162
167
|
|
|
163
|
-
Sub-check: Does
|
|
168
|
+
Sub-check: Does a context comment exist on the phase GitHub Issue?
|
|
164
169
|
-> If yes: "Discussion complete, ready for research + planning."
|
|
165
170
|
-> If no: "Starting from discussion stage."
|
|
166
171
|
|
|
167
172
|
Rule 6: Current phase "In Review" on GitHub board?
|
|
168
|
-
-> Check:
|
|
173
|
+
-> Check: `github status` returns a phase with status="In Review"
|
|
169
174
|
-> Action: /maxsim:execute {N}
|
|
170
175
|
-> Reasoning: "Phase {N} ({name}) is awaiting verification."
|
|
171
176
|
|
|
172
177
|
Rule 7: All phases "Done" on GitHub board?
|
|
173
|
-
-> Check:
|
|
178
|
+
-> Check: `github status` — all phases have status="Done"
|
|
174
179
|
-> Action: /maxsim:progress
|
|
175
180
|
-> Reasoning: "All phases complete. Milestone ready for review."
|
|
176
181
|
|
|
@@ -193,7 +198,7 @@ Once a rule matches, display detection reasoning FIRST, then act immediately.
|
|
|
193
198
|
**Project:** {project name from PROJECT.md, or "New project"}
|
|
194
199
|
**Milestone:** {milestone from ROADMAP.md, or "Not started"}
|
|
195
200
|
**Current phase:** {phase N - name, or "None"} (GitHub Issue #{issue_number})
|
|
196
|
-
**GitHub Status:** {board column from live
|
|
201
|
+
**GitHub Status:** {board column from live `github status` data}
|
|
197
202
|
**Tasks:** {completed}/{total} complete
|
|
198
203
|
|
|
199
204
|
**Action:** Running /maxsim:{command} {args}...
|
|
@@ -207,7 +212,7 @@ Then immediately dispatch the command using the SlashCommand tool. The user can
|
|
|
207
212
|
<step name="interactive_menu">
|
|
208
213
|
**Phase 5: Interactive Menu (Rule 8 — no obvious action)**
|
|
209
214
|
|
|
210
|
-
When no clear action is detected, show a contextual menu. The menu items are NOT static — filter based on what makes sense for the current project state (use live GitHub data from
|
|
215
|
+
When no clear action is detected, show a contextual menu. The menu items are NOT static — filter based on what makes sense for the current project state (use live GitHub data from `github status`).
|
|
211
216
|
|
|
212
217
|
```
|
|
213
218
|
## Project Status
|
|
@@ -233,7 +238,7 @@ Or describe what you'd like to do:
|
|
|
233
238
|
- If no phases exist on board: show `/maxsim:plan` prominently
|
|
234
239
|
- Always include `/maxsim:quick` as it is always relevant
|
|
235
240
|
- Always include an open-ended fallback ("Or describe what you'd like to do")
|
|
236
|
-
- If GitHub not available (
|
|
241
|
+
- If GitHub not available (CLI calls fail): show error: "GitHub integration required. Run `/maxsim:init` to configure GitHub." Do NOT fall back to local file scanning.
|
|
237
242
|
|
|
238
243
|
Wait for user selection, then dispatch the chosen command.
|
|
239
244
|
</step>
|
|
@@ -247,7 +252,7 @@ Wait for user selection, then dispatch the chosen command.
|
|
|
247
252
|
- No arguments accepted — this is pure auto-detection
|
|
248
253
|
- No mention of old commands (plan, execute-phase, etc.)
|
|
249
254
|
- Keep initial feedback fast — show "Analyzing..." before heavy operations
|
|
250
|
-
- Primary source for phase state: live GitHub (
|
|
255
|
+
- Primary source for phase state: live GitHub (`github status`)
|
|
251
256
|
- Local reads: STATE.md for blockers/decisions, ROADMAP.md for phase ordering only
|
|
252
257
|
- If context gathering fails (tools not available, etc.), fall back to the interactive menu
|
|
253
258
|
</constraints>
|