maxsimcli 4.16.0 → 5.0.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/dist/assets/CHANGELOG.md +31 -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/executor.md +2 -2
- package/dist/assets/templates/agents/planner.md +1 -1
- 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 +82 -68
- package/dist/assets/templates/workflows/execute.md +51 -36
- package/dist/assets/templates/workflows/go.md +21 -16
- 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 +45 -20
- package/dist/assets/templates/workflows/quick.md +21 -13
- package/dist/assets/templates/workflows/sdd.md +13 -11
- package/dist/assets/templates/workflows/verify-phase.md +77 -58
- package/dist/cli.cjs +4410 -2265
- package/dist/cli.cjs.map +1 -1
- package/dist/install.cjs +61 -38
- package/dist/install.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 -752
- package/dist/mcp-server.cjs +0 -41031
- 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,8 +37,8 @@ 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.
|
|
@@ -120,7 +112,7 @@ Pattern B only (verify-only checkpoints). Skip for A/C.
|
|
|
120
112
|
2. Per segment:
|
|
121
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.
|
|
122
114
|
- Main route: execute tasks using standard flow (step name="execute")
|
|
123
|
-
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:
|
|
124
116
|
- Verify key-files.created exist on disk with `[ -f ]`
|
|
125
117
|
- Check `git log --oneline --all --grep="{phase}-{plan}"` returns ≥1 commit
|
|
126
118
|
- Check for `## Self-Check: PASSED` or `## Self-Check: FAILED` and append to summary comment body
|
|
@@ -188,8 +180,8 @@ Deviations are normal — handle via rules below.
|
|
|
188
180
|
**Before starting each task (WIRE-04 board transition):**
|
|
189
181
|
- Look up the task's sub-issue number from `task_mappings` in the GitHub context.
|
|
190
182
|
- Move the task sub-issue to "In Progress":
|
|
191
|
-
```
|
|
192
|
-
|
|
183
|
+
```bash
|
|
184
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue --issue-number $TASK_SUB_ISSUE_NUMBER --status "In Progress"
|
|
193
185
|
```
|
|
194
186
|
|
|
195
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.
|
|
@@ -197,17 +189,13 @@ Deviations are normal — handle via rules below.
|
|
|
197
189
|
|
|
198
190
|
**After each task completes successfully (WIRE-04 board transition):**
|
|
199
191
|
- Post task completion details on the task sub-issue:
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
issue_number: task_sub_issue_number,
|
|
203
|
-
commit_sha: TASK_COMMIT,
|
|
204
|
-
files_changed: [list of files modified by this task]
|
|
205
|
-
)
|
|
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"
|
|
206
194
|
```
|
|
207
195
|
- Close the task sub-issue and move to "Done":
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
|
|
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"
|
|
211
199
|
```
|
|
212
200
|
|
|
213
201
|
3. Run `<verification>` checks
|
|
@@ -362,13 +350,19 @@ Orchestrator parses → presents to user → spawns fresh continuation with your
|
|
|
362
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".
|
|
363
351
|
|
|
364
352
|
**On review failure (WIRE-07):** If the task sub-issue was already moved to "Done", reopen and move back:
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
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"
|
|
372
366
|
```
|
|
373
367
|
</step>
|
|
374
368
|
|
|
@@ -394,11 +388,17 @@ fi
|
|
|
394
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.
|
|
395
389
|
|
|
396
390
|
Also post a reminder comment on the phase issue:
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
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"
|
|
402
402
|
```
|
|
403
403
|
</step>
|
|
404
404
|
|
|
@@ -422,12 +422,10 @@ Build summary content using the same structure as `~/.claude/maxsim/templates/su
|
|
|
422
422
|
- Self-Check result
|
|
423
423
|
|
|
424
424
|
Post to the phase issue:
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
body: {summary_content}
|
|
430
|
-
)
|
|
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
|
|
431
429
|
```
|
|
432
430
|
|
|
433
431
|
Record the comment URL/ID as `SUMMARY_COMMENT_ID` for future reference.
|
|
@@ -597,13 +595,19 @@ Wait for user response:
|
|
|
597
595
|
**On review failure -- reopen affected task sub-issues (WIRE-07):**
|
|
598
596
|
|
|
599
597
|
If the code review identifies failures tied to specific tasks, and those task sub-issues were already closed:
|
|
600
|
-
```
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
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"
|
|
607
611
|
```
|
|
608
612
|
|
|
609
613
|
---
|
|
@@ -886,12 +890,10 @@ Add review cycle results to the summary content in memory (under a `## Review Cy
|
|
|
886
890
|
```
|
|
887
891
|
|
|
888
892
|
Now post the complete summary (with review cycle included) to GitHub:
|
|
889
|
-
```
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
body: {complete_summary_content_including_review_cycle}
|
|
894
|
-
)
|
|
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
|
|
895
897
|
```
|
|
896
898
|
|
|
897
899
|
After posting, commit any review-cycle metadata:
|
|
@@ -1003,22 +1005,34 @@ If the plan includes verification criteria (from `<verification>` section of pla
|
|
|
1003
1005
|
|
|
1004
1006
|
Build verification results content in memory with `<!-- maxsim:type=verification -->` marker.
|
|
1005
1007
|
|
|
1006
|
-
```
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
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
|
|
1012
1020
|
```
|
|
1013
1021
|
|
|
1014
1022
|
If the plan includes UAT criteria (from `<uat>` section):
|
|
1015
1023
|
|
|
1016
|
-
```
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
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
|
|
1022
1036
|
```
|
|
1023
1037
|
|
|
1024
1038
|
GitHub Issues is the source of truth -- verification and UAT results are always posted as GitHub comments.
|
|
@@ -1043,8 +1057,8 @@ node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "" --files .planning/codebase/
|
|
|
1043
1057
|
If `USER_SETUP_CREATED=true`: display `⚠️ USER SETUP REQUIRED` with path + env/config tasks at TOP.
|
|
1044
1058
|
|
|
1045
1059
|
Check completion by querying the phase issue's task sub-issues:
|
|
1046
|
-
```
|
|
1047
|
-
|
|
1060
|
+
```bash
|
|
1061
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github list-sub-issues $PHASE_ISSUE_NUMBER
|
|
1048
1062
|
```
|
|
1049
1063
|
|
|
1050
1064
|
Count open vs closed sub-issues. Map closed count to plans complete.
|
|
@@ -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.
|
|
@@ -99,8 +99,8 @@ Exit workflow.
|
|
|
99
99
|
|
|
100
100
|
If phase_issue_number is set, optionally detect whether the phase issue was externally modified since last read:
|
|
101
101
|
|
|
102
|
-
```
|
|
103
|
-
|
|
102
|
+
```bash
|
|
103
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github detect-external-edits --phase-number "$PHASE_NUMBER"
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
If external edits are detected: warn the user before proceeding.
|
|
@@ -148,7 +148,7 @@ Display:
|
|
|
148
148
|
Wait for user choice via natural conversation.
|
|
149
149
|
|
|
150
150
|
- **View results:** Fetch and display summary comments (`<!-- maxsim:type=summary -->`) from the phase issue, then re-show options.
|
|
151
|
-
- **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).
|
|
152
152
|
- **View verification:** Fetch and display the verification comment (`<!-- maxsim:type=verification -->`) from the phase issue, then re-show options.
|
|
153
153
|
- **Done:** Exit workflow.
|
|
154
154
|
|
|
@@ -235,7 +235,7 @@ Execute each wave in sequence. Within a wave: parallel if `parallelization` is t
|
|
|
235
235
|
<success_criteria>
|
|
236
236
|
- [ ] All tasks executed
|
|
237
237
|
- [ ] Each task committed individually
|
|
238
|
-
- [ ] Summary posted as GitHub comment (
|
|
238
|
+
- [ ] Summary posted as GitHub comment (`github post-comment` with type=summary) on phase issue
|
|
239
239
|
- [ ] Task sub-issues moved: In Progress when started, Done when completed
|
|
240
240
|
- [ ] STATE.md updated with position and decisions
|
|
241
241
|
- [ ] ROADMAP.md updated with plan progress
|
|
@@ -290,8 +290,8 @@ Proceeding to verification...
|
|
|
290
290
|
```
|
|
291
291
|
|
|
292
292
|
**Move phase issue to "In Review" on GitHub (WIRE-08):**
|
|
293
|
-
```
|
|
294
|
-
|
|
293
|
+
```bash
|
|
294
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue --issue-number $PHASE_ISSUE_NUMBER --status "In Review"
|
|
295
295
|
```
|
|
296
296
|
This signals all tasks are complete and the phase is awaiting verification. The phase moves to "Done" only after verification passes.
|
|
297
297
|
|
|
@@ -318,7 +318,7 @@ Phase goal: {goal from ROADMAP.md}
|
|
|
318
318
|
Phase requirement IDs: {phase_req_ids}
|
|
319
319
|
Check must_haves against actual codebase.
|
|
320
320
|
Cross-reference requirement IDs from plan frontmatter against REQUIREMENTS.md.
|
|
321
|
-
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.
|
|
322
322
|
Also write VERIFICATION.md to the phase directory for local reference.",
|
|
323
323
|
subagent_type="verifier",
|
|
324
324
|
model="{verifier_model}"
|
|
@@ -329,8 +329,8 @@ Also write VERIFICATION.md to the phase directory for local reference.",
|
|
|
329
329
|
|
|
330
330
|
Read verification status from the verification comment on the phase issue:
|
|
331
331
|
|
|
332
|
-
```
|
|
333
|
-
|
|
332
|
+
```bash
|
|
333
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue $PHASE_ISSUE_NUMBER --comments
|
|
334
334
|
```
|
|
335
335
|
|
|
336
336
|
Look for the `<!-- maxsim:type=verification -->` comment and parse the `status:` field from its body.
|
|
@@ -347,17 +347,23 @@ Phase {phase_number} complete!
|
|
|
347
347
|
```
|
|
348
348
|
|
|
349
349
|
Move phase issue to "Done" status:
|
|
350
|
-
```
|
|
351
|
-
|
|
350
|
+
```bash
|
|
351
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue --issue-number $PHASE_ISSUE_NUMBER --status "Done"
|
|
352
352
|
```
|
|
353
353
|
|
|
354
354
|
Post phase completion comment:
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
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
|
|
361
367
|
```
|
|
362
368
|
|
|
363
369
|
Mark phase complete:
|
|
@@ -372,12 +378,14 @@ node .claude/maxsim/bin/maxsim-tools.cjs commit "docs(phase-{X}): complete phase
|
|
|
372
378
|
|
|
373
379
|
**If `gaps_found`:** Post a gaps comment on the phase issue, then proceed to Retry Loop (step 6).
|
|
374
380
|
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
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
|
|
381
389
|
```
|
|
382
390
|
|
|
383
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.
|
|
@@ -431,7 +439,7 @@ Task(
|
|
|
431
439
|
<downstream_consumer>
|
|
432
440
|
Output consumed by /maxsim:execute.
|
|
433
441
|
Plans must be executable prompts.
|
|
434
|
-
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.
|
|
435
443
|
</downstream_consumer>
|
|
436
444
|
",
|
|
437
445
|
subagent_type="planner",
|
|
@@ -456,12 +464,19 @@ At any point during the workflow, if context is getting full (conversation is lo
|
|
|
456
464
|
|
|
457
465
|
**Checkpoint protocol:**
|
|
458
466
|
1. Post a checkpoint comment to the phase's GitHub Issue (if issue tracking is active):
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
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
|
|
465
480
|
```
|
|
466
481
|
|
|
467
482
|
2. Display checkpoint recommendation:
|
|
@@ -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,17 +151,17 @@ 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
|
|
|
@@ -165,12 +170,12 @@ Rule 5: Phase "To Do" on GitHub board (not yet started)?
|
|
|
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>
|
|
@@ -108,16 +108,16 @@ Parse init context for `has_github_remote` and `gh_authenticated`:
|
|
|
108
108
|
```
|
|
109
109
|
- Do NOT proceed with initialization.
|
|
110
110
|
|
|
111
|
-
3. Both checks passed —
|
|
112
|
-
```
|
|
113
|
-
|
|
111
|
+
3. Both checks passed — run `github setup` with the project name as the milestone title:
|
|
112
|
+
```bash
|
|
113
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github setup --milestone-title "[project name]"
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
4. If `
|
|
116
|
+
4. If `github setup` fails:
|
|
117
117
|
- STOP with the error message returned by the tool.
|
|
118
118
|
- Do not fall back to local-only mode.
|
|
119
119
|
|
|
120
|
-
5. Record the `project_number` and board details returned by `
|
|
120
|
+
5. Record the `project_number` and board details returned by `github setup` for use in the Phase Issue Creation step.
|
|
121
121
|
|
|
122
122
|
## Step 2: Conflict Resolution
|
|
123
123
|
|
|
@@ -1174,15 +1174,12 @@ Display banner:
|
|
|
1174
1174
|
- `requirements` (list of REQ-IDs mapped to this phase)
|
|
1175
1175
|
- `success_criteria` (list of observable outcomes)
|
|
1176
1176
|
|
|
1177
|
-
2. For each phase,
|
|
1178
|
-
```
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
goal
|
|
1183
|
-
requirements: ["REQ-01", "REQ-02", ...],
|
|
1184
|
-
success_criteria: ["criterion 1", "criterion 2", ...]
|
|
1185
|
-
})
|
|
1177
|
+
2. For each phase, run `github create-phase`:
|
|
1178
|
+
```bash
|
|
1179
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github create-phase \
|
|
1180
|
+
--phase-number "[phase_number]" \
|
|
1181
|
+
--phase-name "[phase_name]" \
|
|
1182
|
+
--goal "[goal]"
|
|
1186
1183
|
```
|
|
1187
1184
|
The tool auto-adds each issue to the project board with "To Do" status.
|
|
1188
1185
|
|
|
@@ -1457,7 +1454,7 @@ Print next steps:
|
|
|
1457
1454
|
- [ ] Git repo initialized (if not already)
|
|
1458
1455
|
- [ ] GitHub remote detected (gate passed)
|
|
1459
1456
|
- [ ] GitHub CLI authenticated (gate passed)
|
|
1460
|
-
- [ ] `
|
|
1457
|
+
- [ ] `github setup` called successfully — project_number recorded
|
|
1461
1458
|
- [ ] Conflict detection completed (merge/overwrite/cancel dialog)
|
|
1462
1459
|
- [ ] Codebase scan completed (4 mapper agents spawned)
|
|
1463
1460
|
- [ ] README validated against scan findings
|
|
@@ -1469,7 +1466,7 @@ Print next steps:
|
|
|
1469
1466
|
- [ ] PROJECT.md created with brownfield extra sections
|
|
1470
1467
|
- [ ] REQUIREMENTS.md created with stage-aware format
|
|
1471
1468
|
- [ ] ROADMAP.md created with 3-5 concrete phases (no TBD)
|
|
1472
|
-
- [ ] `
|
|
1469
|
+
- [ ] `github create-phase` called for every phase — all issues on board with "To Do" status
|
|
1473
1470
|
- [ ] STATE.md created with pre-populated decisions and blockers
|
|
1474
1471
|
- [ ] config.json created with workflow settings
|
|
1475
1472
|
- [ ] .planning/codebase/ populated with scan documents
|
|
@@ -333,6 +333,26 @@ Success criteria:
|
|
|
333
333
|
node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs: create milestone v[X.Y] roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
|
|
334
334
|
```
|
|
335
335
|
|
|
336
|
+
## 10b. Create Phase Tracking Issues on GitHub
|
|
337
|
+
|
|
338
|
+
**This step is MANDATORY — GitHub Issues are the single source of truth for phase tracking.**
|
|
339
|
+
|
|
340
|
+
For each phase in the roadmap, run `github create-phase` to create a tracking issue:
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
# For each phase:
|
|
344
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github create-phase \
|
|
345
|
+
--phase-number "[N]" \
|
|
346
|
+
--phase-name "[Phase Name]" \
|
|
347
|
+
--goal "[Phase Goal from ROADMAP.md]"
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
Track results. If any phase issue creation fails, warn and suggest manual creation.
|
|
351
|
+
|
|
352
|
+
```
|
|
353
|
+
✓ Created {N} phase issues on GitHub Project Board
|
|
354
|
+
```
|
|
355
|
+
|
|
336
356
|
## 11. Done
|
|
337
357
|
|
|
338
358
|
```
|
|
@@ -348,8 +368,9 @@ node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs: create milestone v[X.Y]
|
|
|
348
368
|
| Research | `.planning/research/` |
|
|
349
369
|
| Requirements | `.planning/REQUIREMENTS.md` |
|
|
350
370
|
| Roadmap | `.planning/ROADMAP.md` |
|
|
371
|
+
| Phase Issues | GitHub Project Board |
|
|
351
372
|
|
|
352
|
-
**[N] phases** | **[X] requirements** | Ready to build ✓
|
|
373
|
+
**[N] phases** | **[X] requirements** | **[N] GitHub issues** | Ready to build ✓
|
|
353
374
|
|
|
354
375
|
## ▶ Next Up
|
|
355
376
|
|
|
@@ -375,6 +396,7 @@ Also: `/maxsim:plan [N]` — skip discussion, plan directly
|
|
|
375
396
|
- [ ] Roadmap files written immediately (not draft)
|
|
376
397
|
- [ ] User feedback incorporated (if any)
|
|
377
398
|
- [ ] ROADMAP.md phases continue from previous milestone
|
|
399
|
+
- [ ] `github create-phase` called for every phase — all issues on GitHub board
|
|
378
400
|
- [ ] All commits made (if planning docs committed)
|
|
379
401
|
- [ ] User knows next step: `/maxsim:plan [N]`
|
|
380
402
|
|