maxsimcli 4.2.3 → 4.3.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.
Files changed (66) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/assets/CHANGELOG.md +26 -0
  3. package/dist/assets/templates/agents/AGENTS.md +8 -6
  4. package/dist/assets/templates/agents/maxsim-code-reviewer.md +11 -0
  5. package/dist/assets/templates/agents/maxsim-executor.md +1 -0
  6. package/dist/assets/templates/agents/maxsim-planner.md +1 -0
  7. package/dist/assets/templates/agents/maxsim-project-researcher.md +96 -0
  8. package/dist/assets/templates/agents/maxsim-research-synthesizer.md +55 -3
  9. package/dist/assets/templates/agents/maxsim-roadmapper.md +11 -0
  10. package/dist/assets/templates/references/questioning.md +184 -33
  11. package/dist/assets/templates/skills/code-review/SKILL.md +5 -3
  12. package/dist/assets/templates/skills/{batch-worktree → maxsim-batch}/SKILL.md +3 -3
  13. package/dist/assets/templates/skills/{simplify → maxsim-simplify}/SKILL.md +7 -6
  14. package/dist/assets/templates/skills/using-maxsim/SKILL.md +4 -2
  15. package/dist/assets/templates/templates/conventions.md +138 -0
  16. package/dist/assets/templates/templates/no-gos.md +45 -4
  17. package/dist/assets/templates/templates/project.md +23 -0
  18. package/dist/assets/templates/workflows/batch.md +1 -1
  19. package/dist/assets/templates/workflows/init-existing.md +187 -0
  20. package/dist/assets/templates/workflows/new-project.md +195 -7
  21. package/dist/backend-server.cjs +13 -0
  22. package/dist/backend-server.cjs.map +1 -1
  23. package/dist/cli.cjs +350 -40
  24. package/dist/cli.cjs.map +1 -1
  25. package/dist/cli.js +7 -3
  26. package/dist/cli.js.map +1 -1
  27. package/dist/core/core.d.ts +2 -0
  28. package/dist/core/core.d.ts.map +1 -1
  29. package/dist/core/core.js +67 -6
  30. package/dist/core/core.js.map +1 -1
  31. package/dist/core/index.d.ts +4 -4
  32. package/dist/core/index.d.ts.map +1 -1
  33. package/dist/core/index.js +9 -3
  34. package/dist/core/index.js.map +1 -1
  35. package/dist/core/init.d.ts +2 -0
  36. package/dist/core/init.d.ts.map +1 -1
  37. package/dist/core/init.js +6 -0
  38. package/dist/core/init.js.map +1 -1
  39. package/dist/core/milestone.d.ts +1 -1
  40. package/dist/core/milestone.d.ts.map +1 -1
  41. package/dist/core/milestone.js +81 -37
  42. package/dist/core/milestone.js.map +1 -1
  43. package/dist/core/phase.d.ts +3 -0
  44. package/dist/core/phase.d.ts.map +1 -1
  45. package/dist/core/phase.js +213 -0
  46. package/dist/core/phase.js.map +1 -1
  47. package/dist/core/state.d.ts +6 -0
  48. package/dist/core/state.d.ts.map +1 -1
  49. package/dist/core/state.js +69 -0
  50. package/dist/core/state.js.map +1 -1
  51. package/dist/core/types.d.ts +11 -0
  52. package/dist/core/types.d.ts.map +1 -1
  53. package/dist/core-RRjCSt0G.cjs.map +1 -1
  54. package/dist/install/manifest.d.ts.map +1 -1
  55. package/dist/install/manifest.js +5 -1
  56. package/dist/install/manifest.js.map +1 -1
  57. package/dist/install/shared.d.ts +1 -1
  58. package/dist/install/shared.d.ts.map +1 -1
  59. package/dist/install/shared.js +1 -1
  60. package/dist/install/shared.js.map +1 -1
  61. package/dist/install.cjs +6 -3
  62. package/dist/install.cjs.map +1 -1
  63. package/dist/mcp-server.cjs +13 -0
  64. package/dist/mcp-server.cjs.map +1 -1
  65. package/dist/skills-MYlMkYNt.cjs.map +1 -1
  66. package/package.json +1 -1
@@ -6,6 +6,7 @@ Initialize a new project through unified flow: questioning, research (optional),
6
6
  Read all files referenced by the invoking prompt's execution_context before starting.
7
7
  @./references/dashboard-bridge.md
8
8
  @./references/thinking-partner.md
9
+ @./references/questioning.md
9
10
  </required_reading>
10
11
 
11
12
  <tool_mandate>
@@ -251,13 +252,40 @@ Consult `questioning.md` for techniques:
251
252
  - Find edges
252
253
  - Reveal motivation
253
254
 
254
- **Check context (background, not out loud):**
255
+ **Track context with domain checklist (background, not out loud):**
255
256
 
256
- As you go, mentally check the context checklist from `questioning.md`. If gaps remain, weave questions naturally. Don't suddenly switch to checklist mode.
257
+ Follow the `<domain_checklist>` from `questioning.md`. Silently track which domains have been COVERED, marked N/A, or remain UNCOVERED as the conversation progresses. Do NOT show the checklist or switch to checklist mode. Weave uncovered domains naturally when the conversation allows.
257
258
 
258
- **Decision gate:**
259
+ Also follow the `<nogos_tracking>` from `questioning.md`:
260
+ - Watch for rejection signals, past failures, and strong opinions throughout
261
+ - Silently accumulate no-gos — do NOT confirm each one as it comes up
262
+ - After 5+ rounds, weave challenge-based probing naturally ("What would make this project fail?")
263
+ - After understanding the domain, suggest common anti-patterns for their project type
259
264
 
260
- When you could write a clear PROJECT.md, use AskUserQuestion:
265
+ **Count questioning rounds internally.** Each AskUserQuestion call counts as one round. Do NOT show the count to the user.
266
+
267
+ **Decision gate (with coverage gate):**
268
+
269
+ The "Ready?" option ONLY appears when BOTH conditions are met:
270
+ 1. Round count >= 10 (at least 10 questioning rounds completed)
271
+ 2. Domain coverage >= 80% (at least 80% of relevant domains are COVERED or N/A)
272
+
273
+ If either condition is not met, continue questioning — weave uncovered domains naturally.
274
+
275
+ When both conditions are met, **first display a coverage summary** (this IS shown to the user):
276
+
277
+ ```
278
+ ## Domain Coverage Summary
279
+
280
+ **Core:** Auth (COVERED), Data Model (COVERED), API Style (N/A), Deployment (COVERED), Error Handling (UNCOVERED), Testing (COVERED)
281
+ **Infrastructure:** Caching (N/A), Search (N/A), Monitoring (COVERED), CI/CD (COVERED), Environments (COVERED)
282
+ **UX/Product:** Roles (COVERED), Notifications (N/A), File Uploads (N/A), i18n (N/A), Accessibility (N/A)
283
+ **Scale/Ops:** Performance (COVERED), Concurrency (N/A), Migration (N/A), Backup (N/A), Rate Limiting (N/A)
284
+
285
+ Coverage: [X]% ([covered + na] / [total]) — [X] rounds completed
286
+ ```
287
+
288
+ Then use AskUserQuestion:
261
289
 
262
290
  - header: "Ready?"
263
291
  - question: "I think I understand what you're after. Ready to create PROJECT.md?"
@@ -267,7 +295,40 @@ When you could write a clear PROJECT.md, use AskUserQuestion:
267
295
 
268
296
  If "Keep exploring" — ask what they want to add, or identify gaps and probe naturally.
269
297
 
270
- Loop until "Create PROJECT.md" selected.
298
+ **No-Gos Confirmation (after user selects "Create PROJECT.md"):**
299
+
300
+ Before writing any documents, present ALL accumulated no-gos for user confirmation:
301
+
302
+ ```
303
+ ## No-Gos Collected
304
+
305
+ During our conversation, I captured these boundaries:
306
+
307
+ ### Hard Constraints
308
+ - [constraint 1]
309
+
310
+ ### Anti-Patterns
311
+ - [pattern to avoid 1]
312
+
313
+ ### Previous Failures
314
+ - [past failure 1]
315
+
316
+ ### Domain-Specific Risks
317
+ - [risk 1]
318
+
319
+ Anything to add, remove, or change before these become locked?
320
+ ```
321
+
322
+ Use AskUserQuestion:
323
+ - header: "No-Gos"
324
+ - question: "Confirm these no-gos?"
325
+ - options:
326
+ - "Confirmed" — Lock these no-gos
327
+ - "Adjust" — I want to add/remove/change some
328
+
329
+ If "Adjust": capture changes via freeform, update the list, re-confirm.
330
+
331
+ Loop until "Confirmed" selected. These confirmed no-gos flow into NO-GOS.md using the structured template from `templates/no-gos.md`.
271
332
 
272
333
  ## 4. Write PROJECT.md
273
334
 
@@ -442,10 +503,38 @@ Write content:
442
503
  *No-gos captured during /maxsim:new-project initialization*
443
504
  ```
444
505
 
506
+ **CONVENTIONS.md** — Coding conventions for agents to follow:
507
+
508
+ Generate `.planning/CONVENTIONS.md` using the template from `templates/conventions.md`.
509
+
510
+ **If research has already run (Step 6 completed):**
511
+ Populate from research recommendations + questioning confirmations:
512
+ - Tech Stack: from locked decisions in research synthesis
513
+ - File Layout: from recommended framework conventions
514
+ - Error Handling: from user's stated preference during questioning
515
+ - Testing: from user's stated testing strategy during questioning
516
+ - Set `{{source}}` to "new-project init (research-informed)"
517
+ - Set `{{generated_or_confirmed}}` to "generated"
518
+
519
+ **If no research (Step 6 was skipped):**
520
+ Populate from questioning context + reasonable defaults:
521
+ - Tech Stack: from any technology choices mentioned during questioning
522
+ - File Layout: from framework conventions (infer from chosen framework)
523
+ - Error Handling: from user's stated preference or framework default
524
+ - Testing: from user's stated strategy or framework default
525
+ - Set `{{source}}` to "new-project init (questioning-derived)"
526
+ - Set `{{generated_or_confirmed}}` to "generated"
527
+
528
+ Write content using the 4 must-have sections (Tech Stack, File Layout, Error Handling, Testing). Remove HTML comment examples and replace with actual project-specific conventions.
529
+
530
+ ```bash
531
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs artefakte-write .planning/CONVENTIONS.md
532
+ ```
533
+
445
534
  **Commit artefakte:**
446
535
 
447
536
  ```bash
448
- node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs: generate initialization artefakte" --files .planning/DECISIONS.md .planning/ACCEPTANCE-CRITERIA.md .planning/NO-GOS.md
537
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs: generate initialization artefakte" --files .planning/DECISIONS.md .planning/ACCEPTANCE-CRITERIA.md .planning/NO-GOS.md .planning/CONVENTIONS.md
449
538
  ```
450
539
 
451
540
  **If auto mode:** Generate artefakte from the provided document with reasonable inferences. Mark uncertain entries with `(inferred)`.
@@ -837,7 +926,10 @@ Commit after writing.
837
926
  ", subagent_type="maxsim-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
838
927
  ```
839
928
 
840
- Display research complete banner and key findings:
929
+ **Locked Decisions Approval Gate:**
930
+
931
+ After synthesis completes, read `.planning/research/SUMMARY.md` and extract the "Locked Decisions" section. Present these to the user for approval:
932
+
841
933
  ```
842
934
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
843
935
  MAXSIM ► RESEARCH COMPLETE ✓
@@ -850,6 +942,39 @@ Display research complete banner and key findings:
850
942
  **Watch Out For:** [from SUMMARY.md]
851
943
 
852
944
  Files: `.planning/research/`
945
+
946
+ ## Locked Decisions (Approval Required)
947
+
948
+ These decisions will flow to the planner as constraints:
949
+
950
+ | # | Decision | Rationale | Alternatives Rejected | Effort |
951
+ |---|----------|-----------|----------------------|--------|
952
+ | 1 | [from SUMMARY.md] | ... | ... | ... |
953
+ | 2 | [from SUMMARY.md] | ... | ... | ... |
954
+ ```
955
+
956
+ Use AskUserQuestion:
957
+ - header: "Decisions"
958
+ - question: "Approve these locked decisions? You can override any of them."
959
+ - options:
960
+ - "Approve all" — Lock these decisions as-is
961
+ - "Override some" — I want to change some decisions
962
+ - "Reject all" — Start fresh on decisions
963
+
964
+ If "Override some": ask which decisions to change, capture overrides, update the locked decisions list.
965
+ If "Reject all": remove locked decisions section from SUMMARY.md; decisions will emerge during requirements/roadmap instead.
966
+
967
+ **After approval, update PROJECT.md** with the "Tech Stack Decisions" section (from template `templates/project.md`):
968
+
969
+ Read the current `.planning/PROJECT.md` and append the Tech Stack Decisions section populated from the approved locked decisions. Use the format from the project.md template.
970
+
971
+ ```bash
972
+ # PROJECT.md already exists from Step 4 — update it with tech stack decisions
973
+ ```
974
+
975
+ Commit the updated PROJECT.md:
976
+ ```bash
977
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs: add tech stack decisions from research" --files .planning/PROJECT.md
853
978
  ```
854
979
 
855
980
  **If "Skip research":** Continue to Step 7.
@@ -1129,6 +1254,61 @@ Use AskUserQuestion:
1129
1254
  node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
1130
1255
  ```
1131
1256
 
1257
+ ## 8b. Agent Dry-Run Validation
1258
+
1259
+ **Always runs after all documents are generated — this is the quality gate for init output.**
1260
+
1261
+ Spawn a test agent to validate that all generated docs contain enough information for a fresh agent to start Phase 1 without asking clarifying questions.
1262
+
1263
+ ```
1264
+ Task(prompt="
1265
+ You are a fresh agent about to start Phase 1 of this project.
1266
+ Read the following files and report what you would need to ask before starting work.
1267
+
1268
+ Do NOT infer missing information. If a specific library version is not stated, report it as a gap.
1269
+ If the error handling pattern is not described, report it as a gap.
1270
+ Your job is to find what is NOT written, not to demonstrate you could figure it out.
1271
+
1272
+ <files_to_read>
1273
+ - .planning/PROJECT.md
1274
+ - .planning/REQUIREMENTS.md
1275
+ - .planning/CONVENTIONS.md
1276
+ - .planning/NO-GOS.md
1277
+ - .planning/ROADMAP.md
1278
+ </files_to_read>
1279
+
1280
+ Report format:
1281
+
1282
+ ## DRY-RUN RESULT
1283
+
1284
+ ### Can Start: YES/NO
1285
+
1286
+ ### Gaps Found:
1287
+ - [What information is missing]
1288
+ - [What is ambiguous]
1289
+ - [What would need clarification]
1290
+
1291
+ ### Quality Score: [1-10]
1292
+ (10 = could start immediately with zero questions, 1 = need major clarifications)
1293
+ ", model="{planner_model}", description="Agent readiness dry-run")
1294
+ ```
1295
+
1296
+ **Handle dry-run results:**
1297
+
1298
+ **If gaps found (Can Start = NO or Quality Score < 7):**
1299
+ - For each gap, update the relevant document to fill it:
1300
+ - Missing tech versions → update CONVENTIONS.md Tech Stack
1301
+ - Missing error handling → update CONVENTIONS.md Error Handling
1302
+ - Ambiguous requirements → update REQUIREMENTS.md
1303
+ - Missing constraints → update NO-GOS.md
1304
+ - Commit the fixes:
1305
+ ```bash
1306
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs: fill gaps from agent dry-run validation" --files .planning/PROJECT.md .planning/REQUIREMENTS.md .planning/CONVENTIONS.md .planning/NO-GOS.md
1307
+ ```
1308
+
1309
+ **If no gaps (Can Start = YES and Quality Score >= 7):**
1310
+ - Continue to Step 9.
1311
+
1132
1312
  ## 9. Done
1133
1313
 
1134
1314
  Present completion summary:
@@ -1144,6 +1324,7 @@ Present completion summary:
1144
1324
  |----------------|-----------------------------|
1145
1325
  | Project | `.planning/PROJECT.md` |
1146
1326
  | Config | `.planning/config.json` |
1327
+ | Conventions | `.planning/CONVENTIONS.md` |
1147
1328
  | Research | `.planning/research/` |
1148
1329
  | Requirements | `.planning/REQUIREMENTS.md` |
1149
1330
  | Roadmap | `.planning/ROADMAP.md` |
@@ -1188,6 +1369,10 @@ Exit skill and invoke SlashCommand("/maxsim:discuss-phase 1 --auto")
1188
1369
 
1189
1370
  - `.planning/PROJECT.md`
1190
1371
  - `.planning/config.json`
1372
+ - `.planning/CONVENTIONS.md`
1373
+ - `.planning/NO-GOS.md`
1374
+ - `.planning/DECISIONS.md`
1375
+ - `.planning/ACCEPTANCE-CRITERIA.md`
1191
1376
  - `.planning/research/` (if research selected)
1192
1377
  - `STACK.md`
1193
1378
  - `FEATURES.md`
@@ -1218,6 +1403,9 @@ Exit skill and invoke SlashCommand("/maxsim:discuss-phase 1 --auto")
1218
1403
  - [ ] ROADMAP.md created with phases, requirement mappings, success criteria
1219
1404
  - [ ] STATE.md initialized
1220
1405
  - [ ] REQUIREMENTS.md traceability updated
1406
+ - [ ] CONVENTIONS.md generated with 4 must-have sections (Tech Stack, File Layout, Error Handling, Testing)
1407
+ - [ ] NO-GOS.md populated from confirmed no-gos during questioning
1408
+ - [ ] Agent dry-run validation passed (Quality Score >= 7)
1221
1409
  - [ ] User knows next step is `/maxsim:discuss-phase 1`
1222
1410
 
1223
1411
  **Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
@@ -68003,6 +68003,19 @@ async function findPhaseInternalAsync(cwd, phase) {
68003
68003
  const normalized = normalizePhaseName(phase);
68004
68004
  const current = await searchPhaseInDirAsync(pd, node_path.default.join(".planning", "phases"), normalized);
68005
68005
  if (current) return current;
68006
+ const archiveDir = planningPath(cwd, "archive");
68007
+ if (await pathExistsAsync(archiveDir)) try {
68008
+ const versionDirs = (await node_fs.promises.readdir(archiveDir, { withFileTypes: true })).filter((e) => e.isDirectory()).map((e) => e.name).sort().reverse();
68009
+ for (const versionName of versionDirs) {
68010
+ const result = await searchPhaseInDirAsync(node_path.default.join(archiveDir, versionName), node_path.default.join(".planning", "archive", versionName), normalized);
68011
+ if (result) {
68012
+ result.archived = versionName;
68013
+ return result;
68014
+ }
68015
+ }
68016
+ } catch (e) {
68017
+ debugLog("find-phase-async-archive-search-failed", e);
68018
+ }
68006
68019
  const milestonesDir = planningPath(cwd, "milestones");
68007
68020
  if (!await pathExistsAsync(milestonesDir)) return null;
68008
68021
  try {