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.
Files changed (40) hide show
  1. package/dist/assets/CHANGELOG.md +14 -0
  2. package/dist/assets/hooks/maxsim-check-update.cjs.map +1 -1
  3. package/dist/assets/hooks/maxsim-notification-sound.cjs +70 -0
  4. package/dist/assets/hooks/maxsim-notification-sound.cjs.map +1 -0
  5. package/dist/assets/hooks/maxsim-statusline.cjs.map +1 -1
  6. package/dist/assets/hooks/maxsim-stop-sound.cjs +70 -0
  7. package/dist/assets/hooks/maxsim-stop-sound.cjs.map +1 -0
  8. package/dist/assets/hooks/maxsim-sync-reminder.cjs.map +1 -1
  9. package/dist/assets/templates/agents/AGENTS.md +1 -1
  10. package/dist/assets/templates/agents/executor.md +3 -3
  11. package/dist/assets/templates/agents/planner.md +5 -5
  12. package/dist/assets/templates/agents/verifier.md +1 -1
  13. package/dist/assets/templates/commands/maxsim/quick.md +2 -2
  14. package/dist/assets/templates/skills/github-artifact-protocol/SKILL.md +8 -8
  15. package/dist/assets/templates/skills/github-tools-guide/SKILL.md +96 -0
  16. package/dist/assets/templates/workflows/execute-plan.md +90 -99
  17. package/dist/assets/templates/workflows/execute.md +58 -45
  18. package/dist/assets/templates/workflows/go.md +22 -17
  19. package/dist/assets/templates/workflows/init-existing.md +13 -16
  20. package/dist/assets/templates/workflows/new-milestone.md +23 -1
  21. package/dist/assets/templates/workflows/new-project.md +13 -16
  22. package/dist/assets/templates/workflows/plan-create.md +16 -24
  23. package/dist/assets/templates/workflows/plan-discuss.md +6 -8
  24. package/dist/assets/templates/workflows/plan-research.md +7 -6
  25. package/dist/assets/templates/workflows/plan.md +21 -14
  26. package/dist/assets/templates/workflows/progress.md +54 -30
  27. package/dist/assets/templates/workflows/quick.md +21 -13
  28. package/dist/assets/templates/workflows/sdd.md +29 -26
  29. package/dist/assets/templates/workflows/verify-phase.md +77 -58
  30. package/dist/cli.cjs +10894 -8290
  31. package/dist/cli.cjs.map +1 -1
  32. package/dist/core-D5zUr9cb.cjs.map +1 -1
  33. package/dist/install.cjs +60 -37
  34. package/dist/install.cjs.map +1 -1
  35. package/dist/skills-CjFWZIGM.cjs.map +1 -1
  36. package/package.json +2 -4
  37. package/dist/assets/templates/workflows/discovery-phase.md +0 -292
  38. package/dist/assets/templates/workflows/execute-phase.md +0 -768
  39. package/dist/mcp-server.cjs +0 -40900
  40. package/dist/mcp-server.cjs.map +0 -1
@@ -32,15 +32,16 @@ Parse JSON for: `executor_model`, `verifier_model`, `commit_docs`, `phase_found`
32
32
  </step>
33
33
 
34
34
  <step name="discover_plans">
35
- Find incomplete plans skip any plan that already has a matching SUMMARY.md:
35
+ Find incomplete plans by querying GitHub Issues (the source of truth for plans and completion status):
36
36
 
37
37
  ```bash
38
- PLAN_INDEX=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs phase-plan-index "${PHASE_NUMBER}")
38
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue ${phase_issue_number} --comments
39
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs github list-sub-issues ${phase_issue_number}
39
40
  ```
40
41
 
41
- Parse JSON for: `plans[]` (each with `id`, `objective`, `files_modified`, `task_count`, `has_summary`), `incomplete`.
42
+ Parse plan comments (`<!-- maxsim:type=plan -->`) from the phase issue. A plan is complete when all its task sub-issues are closed.
42
43
 
43
- **Filtering:** Skip plans where `has_summary: true`. If all plans complete: "All plans in phase already have summaries" — exit.
44
+ **Filtering:** Skip plans where all task sub-issues are closed. If all plans complete: "All plans in phase are already complete" — exit.
44
45
 
45
46
  Report:
46
47
  ```
@@ -58,11 +59,7 @@ Report:
58
59
  </step>
59
60
 
60
61
  <step name="load_plan">
61
- For each incomplete plan, read the plan file and extract the ordered task list:
62
-
63
- ```bash
64
- cat ${PHASE_DIR}/${PLAN_FILE}
65
- ```
62
+ For each incomplete plan, read the plan content from the GitHub Issue comment (loaded in discover_plans) and extract the ordered task list.
66
63
 
67
64
  Extract for each task:
68
65
  - **Task number** (sequential order in plan)
@@ -325,14 +322,7 @@ Display task completion:
325
322
  </step>
326
323
 
327
324
  <step name="create_summary">
328
- After all tasks in a plan complete, create SUMMARY.md:
329
-
330
- ```bash
331
- # Get the summary template
332
- cat ~/.claude/maxsim/templates/summary.md
333
- ```
334
-
335
- Create `{phase}-{plan}-SUMMARY.md` in the phase directory. Include:
325
+ After all tasks in a plan complete, build the summary content in memory and post it as a GitHub comment on the phase issue. Include:
336
326
 
337
327
  **Frontmatter:** phase, plan, subsystem, tags, requires/provides/affects, tech-stack, key-files.created/modified, key-decisions, requirements-completed (copy from PLAN.md frontmatter), duration, completed date.
338
328
 
@@ -356,12 +346,21 @@ Create `{phase}-{plan}-SUMMARY.md` in the phase directory. Include:
356
346
  - Deviations (if any)
357
347
  - Issues encountered
358
348
 
359
- Use `node ~/.claude/maxsim/bin/maxsim-tools.cjs` for template operations as needed.
349
+ Post summary to GitHub:
350
+ ```bash
351
+ # Write summary content to tmpfile
352
+ SUMMARY_FILE=$(mktemp)
353
+ cat > "$SUMMARY_FILE" << 'SUMMARY_EOF'
354
+ {summary_content}
355
+ SUMMARY_EOF
356
+
357
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number ${phase_issue_number} --body-file "$SUMMARY_FILE" --type summary
358
+ ```
360
359
 
361
360
  Self-check:
362
361
  - Verify first 2 files from `key-files.created` exist on disk
363
362
  - Check `git log --oneline --all --grep="{phase}-{plan}"` returns commits
364
- - Append `## Self-Check: PASSED` or `## Self-Check: FAILED`
363
+ - Append `## Self-Check: PASSED` or `## Self-Check: FAILED` to summary content before posting
365
364
  </step>
366
365
 
367
366
  <step name="update_state">
@@ -396,23 +395,27 @@ node ~/.claude/maxsim/bin/maxsim-tools.cjs requirements mark-complete ${REQ_IDS}
396
395
  Task code already committed per-task. Commit planning artifacts:
397
396
 
398
397
  ```bash
399
- node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs({phase}-{plan}): complete SDD execution" --files .planning/phases/${PHASE_DIR_NAME}/${PHASE}-${PLAN}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md .planning/REQUIREMENTS.md
398
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs({phase}-{plan}): complete SDD execution" --files .planning/STATE.md .planning/ROADMAP.md .planning/REQUIREMENTS.md
400
399
  ```
400
+
401
+ Note: No local SUMMARY.md is committed -- summary was posted to GitHub as a comment.
401
402
  </step>
402
403
 
403
404
  <step name="offer_next">
404
405
  After all plans in the phase are processed:
405
406
 
407
+ Check completion by querying the phase issue's task sub-issues:
406
408
  ```bash
407
- ls -1 .planning/phases/${PHASE_DIR_NAME}/*-PLAN.md 2>/dev/null | wc -l
408
- ls -1 .planning/phases/${PHASE_DIR_NAME}/*-SUMMARY.md 2>/dev/null | wc -l
409
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs github list-sub-issues ${phase_issue_number}
409
410
  ```
410
411
 
412
+ Count open vs closed sub-issues to determine completion.
413
+
411
414
  | Condition | Route | Action |
412
415
  |-----------|-------|--------|
413
- | summaries < plans | **A: More plans** | Find next incomplete plan. Show next plan, suggest `/maxsim:execute {phase}` (SDD mode) to continue. |
414
- | summaries = plans, more phases exist | **B: Phase done** | Show completion, suggest `/maxsim:execute {phase}` (verification) then `/maxsim:plan {next}`. |
415
- | summaries = plans, last phase | **C: Milestone done** | Show banner, suggest `/maxsim:progress` (milestone completion) + `/maxsim:execute` (verification). |
416
+ | open sub-issues remain | **A: More plans** | Find next incomplete plan (by open sub-issues). Show next plan, suggest `/maxsim:execute {phase}` (SDD mode) to continue. |
417
+ | all sub-issues closed, more phases exist | **B: Phase done** | Show completion, suggest `/maxsim:execute {phase}` (verification) then `/maxsim:plan {next}`. |
418
+ | all sub-issues closed, last phase | **C: Milestone done** | Show banner, suggest `/maxsim:progress` (milestone completion) + `/maxsim:execute` (verification). |
416
419
 
417
420
  All routes: recommend `/clear` first for fresh context.
418
421
  </step>
@@ -428,5 +431,5 @@ All routes: recommend `/clear` first for fresh context.
428
431
  </failure_handling>
429
432
 
430
433
  <resumption>
431
- Re-run `/maxsim:execute {phase}` (SDD mode) — discover_plans finds completed SUMMARYs, skips them, resumes from first incomplete plan. Within a plan, completed tasks (those with commits matching the plan pattern) can be detected and skipped.
434
+ Re-run `/maxsim:execute {phase}` (SDD mode) — discover_plans queries GitHub for task sub-issue status, skips plans with all sub-issues closed, resumes from first incomplete plan. Within a plan, completed tasks (those with commits matching the plan pattern) can be detected and skipped.
432
435
  </resumption>
@@ -47,7 +47,11 @@ grep -E "^| ${phase_number}" .planning/REQUIREMENTS.md 2>/dev/null
47
47
 
48
48
  **Get the phase issue number from GitHub (live):**
49
49
 
50
- Call `mcp_get_all_progress` and find the entry where `phase_number` matches. Extract `issue_number` — this is used for posting all verification results as GitHub comments.
50
+ Run `github all-progress` and find the entry where `phase_number` matches. Extract `issue_number` — this is used for posting all verification results as GitHub comments.
51
+
52
+ ```bash
53
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs github all-progress
54
+ ```
51
55
 
52
56
  Extract **phase goal** from ROADMAP.md (the outcome to verify, not tasks) and **requirements** from REQUIREMENTS.md if it exists.
53
57
  </step>
@@ -218,40 +222,44 @@ If gaps_found:
218
222
  <step name="post_verification_to_github">
219
223
  **Post verification results as a GitHub comment (primary output — no local file written).**
220
224
 
221
- Build the verification content in memory using the same structured format as the verification report template. Then call `mcp_post_comment` with `type: 'verification'` on the phase issue:
225
+ Build the verification content in memory using the same structured format as the verification report template. Then run `github post-comment` with `type: 'verification'` on the phase issue.
222
226
 
223
- ```
224
- mcp_post_comment({
225
- issue_number: {PHASE_ISSUE_NUMBER},
226
- type: 'verification',
227
- body: {
228
- status: 'passed' | 'gaps_found' | 'human_needed',
229
- score: '{verified}/{total}',
230
- phase: '{phase_number} {phase_name}',
231
- timestamp: '{ISO timestamp}',
232
- truths_checked: [
233
- { truth: '...', status: 'VERIFIED | FAILED | UNCERTAIN', evidence: '...' }
234
- ],
235
- artifacts_verified: [
236
- { path: '...', exists: true/false, substantive: true/false, wired: true/false, status: 'VERIFIED | STUB | MISSING | ORPHANED' }
237
- ],
238
- key_links_validated: [
239
- { from: '...', to: '...', via: '...', status: 'WIRED | PARTIAL | NOT_WIRED' }
240
- ],
241
- antipatterns: [
242
- { file: '...', line: N, pattern: '...', severity: 'Blocker | Warning | Info' }
243
- ],
244
- human_verification_items: [
245
- { name: '...', steps: '...', expected: '...', reason: '...' }
246
- ],
247
- gaps: [
248
- { description: '...', fix_plan: '...' }
249
- ],
250
- fix_plans: [
251
- { name: '...', objective: '...', tasks: ['...'] }
252
- ]
253
- }
254
- })
227
+ Write the body content to a tmpfile first, then post:
228
+
229
+ ```bash
230
+ # Write body to tmpfile (JSON with status, score, phase, timestamp, truths_checked, artifacts_verified, etc.)
231
+ BODY_FILE=$(mktemp)
232
+ cat > "$BODY_FILE" << 'VERIFICATION_EOF'
233
+ {
234
+ "status": "passed | gaps_found | human_needed",
235
+ "score": "{verified}/{total}",
236
+ "phase": "{phase_number} — {phase_name}",
237
+ "timestamp": "{ISO timestamp}",
238
+ "truths_checked": [
239
+ { "truth": "...", "status": "VERIFIED | FAILED | UNCERTAIN", "evidence": "..." }
240
+ ],
241
+ "artifacts_verified": [
242
+ { "path": "...", "exists": true, "substantive": true, "wired": true, "status": "VERIFIED | STUB | MISSING | ORPHANED" }
243
+ ],
244
+ "key_links_validated": [
245
+ { "from": "...", "to": "...", "via": "...", "status": "WIRED | PARTIAL | NOT_WIRED" }
246
+ ],
247
+ "antipatterns": [
248
+ { "file": "...", "line": 0, "pattern": "...", "severity": "Blocker | Warning | Info" }
249
+ ],
250
+ "human_verification_items": [
251
+ { "name": "...", "steps": "...", "expected": "...", "reason": "..." }
252
+ ],
253
+ "gaps": [
254
+ { "description": "...", "fix_plan": "..." }
255
+ ],
256
+ "fix_plans": [
257
+ { "name": "...", "objective": "...", "tasks": ["..."] }
258
+ ]
259
+ }
260
+ VERIFICATION_EOF
261
+
262
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number {PHASE_ISSUE_NUMBER} --body-file "$BODY_FILE" --type verification
255
263
  ```
256
264
 
257
265
  The comment is the canonical record of this verification run.
@@ -262,24 +270,26 @@ The comment is the canonical record of this verification run.
262
270
 
263
271
  Present the human verification items to the user and walk through each one. After the user completes UAT:
264
272
 
265
- Build the UAT results in memory, then post as a GitHub comment by calling `mcp_post_comment` with `type: 'uat'` on the phase issue:
273
+ Build the UAT results in memory, then post as a GitHub comment by running `github post-comment` with `type: 'uat'` on the phase issue:
266
274
 
267
- ```
268
- mcp_post_comment({
269
- issue_number: {PHASE_ISSUE_NUMBER},
270
- type: 'uat',
271
- body: {
272
- status: 'passed' | 'gaps_found',
273
- phase: '{phase_number} — {phase_name}',
274
- timestamp: '{ISO timestamp}',
275
- items: [
276
- { name: '...', result: 'pass | fail', notes: '...' }
277
- ],
278
- gaps: [
279
- { description: '...', severity: 'Blocker | Warning' }
280
- ]
281
- }
282
- })
275
+ ```bash
276
+ # Write UAT body to tmpfile
277
+ UAT_FILE=$(mktemp)
278
+ cat > "$UAT_FILE" << 'UAT_EOF'
279
+ {
280
+ "status": "passed | gaps_found",
281
+ "phase": "{phase_number} — {phase_name}",
282
+ "timestamp": "{ISO timestamp}",
283
+ "items": [
284
+ { "name": "...", "result": "pass | fail", "notes": "..." }
285
+ ],
286
+ "gaps": [
287
+ { "description": "...", "severity": "Blocker | Warning" }
288
+ ]
289
+ }
290
+ UAT_EOF
291
+
292
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment --issue-number {PHASE_ISSUE_NUMBER} --body-file "$UAT_FILE" --type uat
283
293
  ```
284
294
 
285
295
  Do NOT write a UAT.md file to `.planning/phases/`.
@@ -289,20 +299,29 @@ Do NOT write a UAT.md file to `.planning/phases/`.
289
299
  **Update GitHub board based on verification outcome.**
290
300
 
291
301
  **If verification passes AND PR is merged:**
292
- 1. Call `mcp_move_issue` to move the phase issue to the "Done" column on the board
293
- 2. Call `mcp_close_issue` to close the phase issue
302
+ 1. Run `github move-issue` to move the phase issue to the "Done" column on the board
303
+ 2. Run `github close-issue` to close the phase issue
294
304
  3. Report to orchestrator: phase complete, issue closed
295
305
 
306
+ ```bash
307
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue --project-number P --item-id ID --status "Done"
308
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs github close-issue N
309
+ ```
310
+
296
311
  **If verification passes but PR not yet merged:**
297
312
  1. Keep the phase issue in "In Review" on the board
298
313
  2. Note: board will be updated when PR merges
299
314
 
300
315
  **If verification fails (gaps_found):**
301
316
  1. Check current board column for the phase issue
302
- 2. If in "In Review": call `mcp_move_issue` to move back to "In Progress"
317
+ 2. If in "In Review": run `github move-issue` to move back to "In Progress"
303
318
  3. Post failure details as a verification comment (already done in post_verification_to_github step)
304
319
  4. Note which gaps need fixing before re-verification
305
320
 
321
+ ```bash
322
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue --project-number P --item-id ID --status "In Progress"
323
+ ```
324
+
306
325
  **If human_needed:**
307
326
  1. Keep the phase issue in its current column (do not move)
308
327
  2. The UAT comment posted above documents what needs human testing
@@ -321,7 +340,7 @@ Orchestrator routes: `passed` → update_roadmap | `gaps_found` → create/execu
321
340
  </process>
322
341
 
323
342
  <success_criteria>
324
- - [ ] Phase issue number retrieved from live GitHub via mcp_get_all_progress
343
+ - [ ] Phase issue number retrieved from live GitHub via `github all-progress`
325
344
  - [ ] Must-haves established (from frontmatter or derived)
326
345
  - [ ] All truths verified with status and evidence
327
346
  - [ ] All artifacts checked at all three levels
@@ -331,9 +350,9 @@ Orchestrator routes: `passed` → update_roadmap | `gaps_found` → create/execu
331
350
  - [ ] Human verification items identified
332
351
  - [ ] Overall status determined
333
352
  - [ ] Fix plans generated (if gaps_found)
334
- - [ ] Verification results posted as GitHub comment via mcp_post_comment (type: 'verification') — NO local VERIFICATION.md written
335
- - [ ] UAT results posted as GitHub comment via mcp_post_comment (type: 'uat') — NO local UAT.md written
336
- - [ ] Board transition executed: mcp_move_issue + mcp_close_issue on pass; mcp_move_issue back to In Progress on fail
353
+ - [ ] Verification results posted as GitHub comment via `github post-comment` (type: 'verification') — NO local VERIFICATION.md written
354
+ - [ ] UAT results posted as GitHub comment via `github post-comment` (type: 'uat') — NO local UAT.md written
355
+ - [ ] Board transition executed: `github move-issue` + `github close-issue` on pass; `github move-issue` back to In Progress on fail
337
356
  - [ ] Results returned to orchestrator
338
357
  </success_criteria>
339
358
  </output>