maxsimcli 3.12.0 → 4.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.
Files changed (179) hide show
  1. package/README.md +43 -17
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/adapters/index.d.ts +0 -11
  4. package/dist/adapters/index.d.ts.map +1 -1
  5. package/dist/adapters/index.js +4 -40
  6. package/dist/adapters/index.js.map +1 -1
  7. package/dist/assets/CHANGELOG.md +70 -0
  8. package/dist/assets/dashboard/client/assets/{index-wtQDvXzr.js → index-C_eAetZJ.js} +60 -60
  9. package/dist/assets/dashboard/client/assets/index-CmiJKqOU.css +32 -0
  10. package/dist/assets/dashboard/client/index.html +2 -2
  11. package/dist/assets/dashboard/server.js +467 -271
  12. package/dist/assets/templates/agents/AGENTS.md +13 -1
  13. package/dist/assets/templates/agents/maxsim-debugger.md +2 -2
  14. package/dist/assets/templates/agents/maxsim-executor.md +5 -5
  15. package/dist/assets/templates/agents/maxsim-phase-researcher.md +2 -2
  16. package/dist/assets/templates/agents/maxsim-plan-checker.md +2 -2
  17. package/dist/assets/templates/agents/maxsim-planner.md +3 -3
  18. package/dist/assets/templates/commands/maxsim/add-todo.md +15 -5
  19. package/dist/assets/templates/commands/maxsim/discuss-phase.md +1 -0
  20. package/dist/assets/templates/commands/maxsim/init-existing.md +4 -0
  21. package/dist/assets/templates/commands/maxsim/new-project.md +4 -0
  22. package/dist/assets/templates/references/thinking-partner.md +41 -0
  23. package/dist/assets/templates/skills/batch-worktree/SKILL.md +137 -0
  24. package/dist/assets/templates/skills/brainstorming/SKILL.md +159 -0
  25. package/dist/assets/templates/skills/roadmap-writing/SKILL.md +198 -0
  26. package/dist/assets/templates/skills/sdd/SKILL.md +175 -0
  27. package/dist/assets/templates/skills/simplify/SKILL.md +48 -0
  28. package/dist/assets/templates/skills/using-maxsim/SKILL.md +6 -1
  29. package/dist/assets/templates/templates/acceptance-criteria.md +10 -0
  30. package/dist/assets/templates/templates/decisions.md +10 -0
  31. package/dist/assets/templates/templates/no-gos.md +9 -0
  32. package/dist/assets/templates/workflows/add-todo.md +89 -0
  33. package/dist/assets/templates/workflows/discuss-phase.md +85 -1
  34. package/dist/assets/templates/workflows/execute-phase.md +22 -2
  35. package/dist/assets/templates/workflows/execute-plan.md +166 -0
  36. package/dist/assets/templates/workflows/init-existing.md +116 -0
  37. package/dist/assets/templates/workflows/new-project.md +105 -1
  38. package/dist/assets/templates/workflows/plan-phase.md +3 -3
  39. package/dist/assets/templates/workflows/quick.md +2 -2
  40. package/dist/cli.cjs +1264 -882
  41. package/dist/cli.cjs.map +1 -1
  42. package/dist/cli.js +97 -74
  43. package/dist/cli.js.map +1 -1
  44. package/dist/core/artefakte.d.ts +12 -0
  45. package/dist/core/artefakte.d.ts.map +1 -0
  46. package/dist/core/artefakte.js +136 -0
  47. package/dist/core/artefakte.js.map +1 -0
  48. package/dist/core/commands.d.ts +13 -13
  49. package/dist/core/commands.d.ts.map +1 -1
  50. package/dist/core/commands.js +44 -57
  51. package/dist/core/commands.js.map +1 -1
  52. package/dist/core/config.d.ts +4 -3
  53. package/dist/core/config.d.ts.map +1 -1
  54. package/dist/core/config.js +14 -18
  55. package/dist/core/config.js.map +1 -1
  56. package/dist/core/context-loader.d.ts +20 -0
  57. package/dist/core/context-loader.d.ts.map +1 -0
  58. package/dist/core/context-loader.js +154 -0
  59. package/dist/core/context-loader.js.map +1 -0
  60. package/dist/core/core.d.ts +8 -2
  61. package/dist/core/core.d.ts.map +1 -1
  62. package/dist/core/core.js +47 -11
  63. package/dist/core/core.js.map +1 -1
  64. package/dist/core/dashboard-launcher.d.ts +1 -1
  65. package/dist/core/dashboard-launcher.d.ts.map +1 -1
  66. package/dist/core/dashboard-launcher.js +18 -15
  67. package/dist/core/dashboard-launcher.js.map +1 -1
  68. package/dist/core/frontmatter.d.ts +5 -5
  69. package/dist/core/frontmatter.d.ts.map +1 -1
  70. package/dist/core/frontmatter.js +21 -26
  71. package/dist/core/frontmatter.js.map +1 -1
  72. package/dist/core/index.d.ts +8 -3
  73. package/dist/core/index.d.ts.map +1 -1
  74. package/dist/core/index.js +23 -3
  75. package/dist/core/index.js.map +1 -1
  76. package/dist/core/init.d.ts +14 -14
  77. package/dist/core/init.d.ts.map +1 -1
  78. package/dist/core/init.js +93 -154
  79. package/dist/core/init.js.map +1 -1
  80. package/dist/core/milestone.d.ts +3 -3
  81. package/dist/core/milestone.d.ts.map +1 -1
  82. package/dist/core/milestone.js +9 -9
  83. package/dist/core/milestone.js.map +1 -1
  84. package/dist/core/phase.d.ts +9 -9
  85. package/dist/core/phase.d.ts.map +1 -1
  86. package/dist/core/phase.js +64 -68
  87. package/dist/core/phase.js.map +1 -1
  88. package/dist/core/roadmap.d.ts +4 -3
  89. package/dist/core/roadmap.d.ts.map +1 -1
  90. package/dist/core/roadmap.js +46 -109
  91. package/dist/core/roadmap.js.map +1 -1
  92. package/dist/core/skills.d.ts +19 -0
  93. package/dist/core/skills.d.ts.map +1 -0
  94. package/dist/core/skills.js +145 -0
  95. package/dist/core/skills.js.map +1 -0
  96. package/dist/core/start.d.ts +15 -0
  97. package/dist/core/start.d.ts.map +1 -0
  98. package/dist/core/start.js +80 -0
  99. package/dist/core/start.js.map +1 -0
  100. package/dist/core/state.d.ts +13 -13
  101. package/dist/core/state.d.ts.map +1 -1
  102. package/dist/core/state.js +119 -126
  103. package/dist/core/state.js.map +1 -1
  104. package/dist/core/template.d.ts +3 -3
  105. package/dist/core/template.d.ts.map +1 -1
  106. package/dist/core/template.js +12 -14
  107. package/dist/core/template.js.map +1 -1
  108. package/dist/core/types.d.ts +14 -2
  109. package/dist/core/types.d.ts.map +1 -1
  110. package/dist/core/types.js +8 -0
  111. package/dist/core/types.js.map +1 -1
  112. package/dist/core/verify.d.ts +10 -9
  113. package/dist/core/verify.d.ts.map +1 -1
  114. package/dist/core/verify.js +38 -48
  115. package/dist/core/verify.js.map +1 -1
  116. package/dist/core-TFSlUjV1.cjs +4312 -0
  117. package/dist/core-TFSlUjV1.cjs.map +1 -0
  118. package/dist/install/adapters.d.ts +2 -11
  119. package/dist/install/adapters.d.ts.map +1 -1
  120. package/dist/install/adapters.js +16 -154
  121. package/dist/install/adapters.js.map +1 -1
  122. package/dist/install/copy.d.ts +1 -10
  123. package/dist/install/copy.d.ts.map +1 -1
  124. package/dist/install/copy.js +5 -125
  125. package/dist/install/copy.js.map +1 -1
  126. package/dist/install/hooks.d.ts +4 -5
  127. package/dist/install/hooks.d.ts.map +1 -1
  128. package/dist/install/hooks.js +46 -71
  129. package/dist/install/hooks.js.map +1 -1
  130. package/dist/install/index.js +163 -226
  131. package/dist/install/index.js.map +1 -1
  132. package/dist/install/manifest.d.ts +5 -2
  133. package/dist/install/manifest.d.ts.map +1 -1
  134. package/dist/install/manifest.js +20 -26
  135. package/dist/install/manifest.js.map +1 -1
  136. package/dist/install/patches.d.ts +1 -2
  137. package/dist/install/patches.d.ts.map +1 -1
  138. package/dist/install/patches.js +4 -16
  139. package/dist/install/patches.js.map +1 -1
  140. package/dist/install/shared.d.ts +24 -18
  141. package/dist/install/shared.d.ts.map +1 -1
  142. package/dist/install/shared.js +65 -35
  143. package/dist/install/shared.js.map +1 -1
  144. package/dist/install/uninstall.d.ts +2 -3
  145. package/dist/install/uninstall.d.ts.map +1 -1
  146. package/dist/install/uninstall.js +24 -82
  147. package/dist/install/uninstall.js.map +1 -1
  148. package/dist/install.cjs +321 -1230
  149. package/dist/install.cjs.map +1 -1
  150. package/dist/mcp-server.cjs +22527 -46
  151. package/dist/mcp-server.cjs.map +1 -1
  152. package/dist/skills-BOSxYUzf.cjs +6812 -0
  153. package/dist/skills-BOSxYUzf.cjs.map +1 -0
  154. package/package.json +1 -1
  155. package/dist/adapters/codex.d.ts +0 -19
  156. package/dist/adapters/codex.d.ts.map +0 -1
  157. package/dist/adapters/codex.js +0 -94
  158. package/dist/adapters/codex.js.map +0 -1
  159. package/dist/adapters/gemini.d.ts +0 -19
  160. package/dist/adapters/gemini.d.ts.map +0 -1
  161. package/dist/adapters/gemini.js +0 -96
  162. package/dist/adapters/gemini.js.map +0 -1
  163. package/dist/adapters/opencode.d.ts +0 -17
  164. package/dist/adapters/opencode.d.ts.map +0 -1
  165. package/dist/adapters/opencode.js +0 -111
  166. package/dist/adapters/opencode.js.map +0 -1
  167. package/dist/adapters/transforms/content.d.ts +0 -39
  168. package/dist/adapters/transforms/content.d.ts.map +0 -1
  169. package/dist/adapters/transforms/content.js +0 -125
  170. package/dist/adapters/transforms/content.js.map +0 -1
  171. package/dist/adapters/transforms/frontmatter.d.ts +0 -42
  172. package/dist/adapters/transforms/frontmatter.d.ts.map +0 -1
  173. package/dist/adapters/transforms/frontmatter.js +0 -204
  174. package/dist/adapters/transforms/frontmatter.js.map +0 -1
  175. package/dist/adapters/transforms/tool-maps.d.ts +0 -20
  176. package/dist/adapters/transforms/tool-maps.d.ts.map +0 -1
  177. package/dist/adapters/transforms/tool-maps.js +0 -64
  178. package/dist/adapters/transforms/tool-maps.js.map +0 -1
  179. package/dist/assets/dashboard/client/assets/index-CxFKStBk.css +0 -32
@@ -0,0 +1,198 @@
1
+ ---
2
+ name: roadmap-writing
3
+ description: Use when creating or restructuring a project roadmap — requires phased planning with dependencies, success criteria, and MAXSIM-compatible format
4
+ ---
5
+
6
+ # Roadmap Writing
7
+
8
+ A roadmap without success criteria is a wish list. Define what done looks like for every phase.
9
+
10
+ **If a phase does not have measurable success criteria, it is not a plan — it is a hope.**
11
+
12
+ ## The Iron Law
13
+
14
+ <HARD-GATE>
15
+ NO PHASE WITHOUT SUCCESS CRITERIA AND DEPENDENCIES.
16
+ Every phase MUST have: a number, a name, a goal, success criteria (testable statements), and explicit dependencies.
17
+ "We'll figure it out as we go" is not planning — it is drifting.
18
+ Violating this rule is a violation — not flexibility.
19
+ </HARD-GATE>
20
+
21
+ ## The Gate Function
22
+
23
+ Follow these steps IN ORDER when creating or restructuring a roadmap.
24
+
25
+ ### 1. SCOPE — Understand the Project
26
+
27
+ Before writing phases, understand what you are planning:
28
+
29
+ - Read PROJECT.md for vision and constraints
30
+ - Read REQUIREMENTS.md for v1/v2/out-of-scope boundaries
31
+ - Check existing STATE.md for decisions and blockers
32
+ - Identify the delivery target (MVP, v1, v2, etc.)
33
+
34
+ ```bash
35
+ # Load project context
36
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs state read --raw
37
+
38
+ # Check existing roadmap (if any)
39
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs roadmap read --raw
40
+ ```
41
+
42
+ ### 2. DECOMPOSE — Break Into Phases
43
+
44
+ Each phase should be:
45
+
46
+ | Property | Requirement |
47
+ |----------|------------|
48
+ | **Independently deliverable** | The phase produces a working increment — not a half-built feature |
49
+ | **1-3 days of work** | Larger phases should be split; smaller ones should be merged |
50
+ | **Clear boundary** | You can tell when the phase is done without ambiguity |
51
+ | **Ordered by dependency** | No phase depends on a later phase |
52
+
53
+ **Phase numbering convention:**
54
+
55
+ | Format | When to Use |
56
+ |--------|------------|
57
+ | `01`, `02`, `03` | Standard sequential phases |
58
+ | `01A`, `01B` | Parallel sub-phases that can execute concurrently |
59
+ | `01.1`, `01.2` | Sequential sub-phases within a parent phase |
60
+
61
+ Sort order: `01 < 01A < 01B < 01.1 < 01.2 < 02`
62
+
63
+ ### 3. DEFINE — Write Each Phase
64
+
65
+ Every phase MUST include all of these fields:
66
+
67
+ ```markdown
68
+ ### Phase {number}: {name}
69
+ **Goal**: {one sentence — what this phase achieves}
70
+ **Depends on**: {phase numbers, or "Nothing" for the first phase}
71
+ **Requirements**: {requirement IDs from REQUIREMENTS.md, if applicable}
72
+ **Success Criteria** (what must be TRUE):
73
+ 1. {Testable statement — can be verified with a command, test, or inspection}
74
+ 2. {Testable statement}
75
+ 3. {Testable statement}
76
+ **Plans**: TBD
77
+ ```
78
+
79
+ **Success criteria rules:**
80
+ - Each criterion must be testable — "code is clean" is not testable; "no lint warnings" is testable
81
+ - Include at least 2 criteria per phase
82
+ - At least one criterion should be verifiable by running a command (test, build, lint)
83
+ - Criteria describe the END STATE, not the process ("tests pass" not "write tests")
84
+
85
+ ### 4. CONNECT — Map Dependencies
86
+
87
+ Draw the dependency graph:
88
+ - Which phases can run in parallel? (Use letter suffixes: `03A`, `03B`)
89
+ - Which phases are strictly sequential? (Use number suffixes: `03.1`, `03.2`)
90
+ - Are there any circular dependencies? (This is a design error — restructure)
91
+
92
+ **Rule: Every phase except the first must declare at least one dependency.**
93
+
94
+ ### 5. MILESTONE — Group Into Milestones
95
+
96
+ Group phases into milestones that represent user-visible releases:
97
+
98
+ ```markdown
99
+ ## Milestones
100
+
101
+ - **v1.0 MVP** — Phases 1-4
102
+ - **v1.1 Polish** — Phases 5-7
103
+ - **v2.0 Scale** — Phases 8-10
104
+ ```
105
+
106
+ Each milestone should be a coherent deliverable that could ship independently.
107
+
108
+ ### 6. WRITE — Produce the Roadmap
109
+
110
+ Assemble the complete ROADMAP.md:
111
+
112
+ ```markdown
113
+ # Roadmap: {project name}
114
+
115
+ ## Overview
116
+
117
+ {2-3 sentences: what the project is, what this roadmap covers, delivery strategy}
118
+
119
+ ## Milestones
120
+
121
+ - {emoji} **{milestone name}** — Phases {range} ({status})
122
+
123
+ ## Phases
124
+
125
+ - [ ] **Phase {N}: {name}** - {one-line summary}
126
+
127
+ ## Phase Details
128
+
129
+ ### Phase {N}: {name}
130
+ **Goal**: ...
131
+ **Depends on**: ...
132
+ **Requirements**: ...
133
+ **Success Criteria** (what must be TRUE):
134
+ 1. ...
135
+ **Plans**: TBD
136
+ ```
137
+
138
+ ### 7. VALIDATE — Check the Roadmap
139
+
140
+ Before finalizing, verify:
141
+
142
+ ```bash
143
+ # Write the roadmap (creates or overwrites .planning/ROADMAP.md)
144
+ # Then verify phase structure
145
+ node ~/.claude/maxsim/bin/maxsim-tools.cjs roadmap read --raw
146
+ ```
147
+
148
+ | Check | How to Verify |
149
+ |-------|--------------|
150
+ | Every phase has success criteria | Read each phase detail section |
151
+ | Dependencies are acyclic | Trace the dependency chain — no loops |
152
+ | Phase numbering is sequential | Numbers increase, no gaps larger than 1 |
153
+ | Milestones cover all phases | Every phase appears in exactly one milestone |
154
+ | Success criteria are testable | Each criterion can be verified by command, test, or inspection |
155
+
156
+ ## Common Rationalizations — REJECT THESE
157
+
158
+ | Excuse | Why It Violates the Rule |
159
+ |--------|--------------------------|
160
+ | "We don't know enough to plan" | Plan what you know. Unknown phases get a research spike first. |
161
+ | "The roadmap will change anyway" | Plans change — that is expected. No plan guarantees drift. |
162
+ | "Success criteria are too rigid" | Vague criteria are useless. Rigid criteria are adjustable. |
163
+ | "One big phase is simpler" | Big phases hide complexity and delay feedback. Split them. |
164
+ | "Dependencies are obvious" | Obvious to you now. Not obvious to the agent running phase 5 next week. |
165
+ | "We'll add details later" | Later never comes. Write the details now while context is fresh. |
166
+
167
+ ## Red Flags — STOP If You Catch Yourself:
168
+
169
+ - Writing a phase without success criteria
170
+ - Creating phases longer than 3 days of work
171
+ - Skipping dependency declarations
172
+ - Writing vague criteria like "code is good" or "feature works"
173
+ - Creating circular dependencies between phases
174
+ - Putting all work in one or two massive phases
175
+
176
+ **If any red flag triggers: STOP. Review the phase structure and fix it.**
177
+
178
+ ## Verification Checklist
179
+
180
+ Before finalizing a roadmap, confirm:
181
+
182
+ - [ ] Every phase has a number, name, goal, dependencies, and success criteria
183
+ - [ ] Success criteria are testable (verifiable by command, test, or inspection)
184
+ - [ ] Dependencies form a DAG (no circular dependencies)
185
+ - [ ] Phase numbering follows MAXSIM convention (01, 01A, 01B, 01.1, etc.)
186
+ - [ ] Phases are 1-3 days of work each
187
+ - [ ] Milestones group phases into coherent deliverables
188
+ - [ ] ROADMAP.md matches the expected format for MAXSIM CLI parsing
189
+ - [ ] Overview section summarizes the project and delivery strategy
190
+
191
+ ## In MAXSIM Plan Execution
192
+
193
+ Roadmap writing integrates with the MAXSIM lifecycle:
194
+ - Use during project initialization (`/maxsim:plan-phase`) to create the initial roadmap
195
+ - Use when restructuring after a significant scope change or pivot
196
+ - The roadmap is read by MAXSIM agents via `roadmap read` — format compliance is mandatory
197
+ - Phase numbering must be parseable by `normalizePhaseName()` and `comparePhaseNum()` in core
198
+ - Config `model_profile` in `.planning/config.json` affects agent assignment per phase
@@ -0,0 +1,175 @@
1
+ ---
2
+ name: sdd
3
+ description: Dispatch fresh subagent per task with 2-stage review between tasks
4
+ ---
5
+
6
+ # Spec-Driven Dispatch (SDD)
7
+
8
+ Execute tasks sequentially, each in a fresh subagent with clean context. Review every task before moving to the next.
9
+
10
+ **If the previous task did not pass review, you do not start the next task.**
11
+
12
+ ## When to Use
13
+
14
+ - Tasks are sequential and each builds on the previous
15
+ - Context rot is a concern (long plans, many files, complex logic)
16
+ - Each task benefits from starting with a clean context window
17
+ - You want enforced quality gates between tasks
18
+
19
+ Do NOT use this skill when:
20
+ - Tasks are independent and can run in parallel (use batch-worktree instead)
21
+ - The plan has only 1-2 small tasks (overhead is not worth it)
22
+ - All tasks modify the same small set of files (single-agent execution is simpler)
23
+
24
+ ## The Iron Law
25
+
26
+ <HARD-GATE>
27
+ NO TASK STARTS UNTIL THE PREVIOUS TASK PASSES 2-STAGE REVIEW.
28
+ If the review found issues, they must be fixed before the next task begins.
29
+ No "we'll fix it later." No "it's close enough." No skipping review for simple tasks.
30
+ Violating this rule ships unreviewed code — the exact problem SDD prevents.
31
+ </HARD-GATE>
32
+
33
+ ## Process
34
+
35
+ ### 1. LOAD — Read the Plan
36
+
37
+ - Read the plan file (PLAN.md) to get the ordered task list
38
+ - For each task, identify: description, acceptance criteria, relevant files
39
+ - Confirm task order makes sense (later tasks may depend on earlier ones)
40
+
41
+ ```bash
42
+ # Load plan context
43
+ INIT=$(node .claude/maxsim/bin/maxsim-tools.cjs init execute-phase "${PHASE}")
44
+ ```
45
+
46
+ ### 2. DISPATCH — Spawn Fresh Agent Per Task
47
+
48
+ For each task in order:
49
+
50
+ 1. Assemble the task context:
51
+ - Task description and acceptance criteria from the plan
52
+ - Only the files relevant to this specific task
53
+ - Results from previous tasks (commit hashes, created files) — NOT the full previous context
54
+ 2. Spawn a fresh `general-purpose` agent with this minimal context
55
+ 3. The agent implements the task, runs tests, and commits
56
+
57
+ ```bash
58
+ # Record task dispatch
59
+ node .claude/maxsim/bin/maxsim-tools.cjs state-add-decision "SDD: dispatching task N — [description]"
60
+ ```
61
+
62
+ ### 3. REVIEW — 2-Stage Quality Gate
63
+
64
+ After each task completes, run two review stages before proceeding:
65
+
66
+ #### Stage 1: Spec Compliance
67
+
68
+ - Does the implementation match the task description?
69
+ - Are all acceptance criteria met?
70
+ - Were only the specified files modified (no scope creep)?
71
+ - Do the changes align with the plan's intent?
72
+
73
+ **Verdict:** PASS or FAIL with specific issues.
74
+
75
+ #### Stage 2: Code Quality
76
+
77
+ - Are there obvious bugs, edge cases, or error handling gaps?
78
+ - Is the code readable and consistent with codebase conventions?
79
+ - Are there unnecessary complications or dead code?
80
+ - Do all tests pass?
81
+
82
+ ```bash
83
+ # Run tests to verify
84
+ npx vitest run
85
+ ```
86
+
87
+ **Verdict:** PASS or FAIL with specific issues.
88
+
89
+ ### 4. FIX — Address Review Failures
90
+
91
+ If either review stage fails:
92
+
93
+ 1. Spawn a NEW fresh agent with:
94
+ - The original task description
95
+ - The review feedback (specific issues found)
96
+ - The current state of the files
97
+ 2. The fix agent addresses ONLY the review issues — no new features
98
+ 3. Re-run both review stages on the fixed code
99
+ 4. If 3 fix attempts fail: STOP and escalate to the user
100
+
101
+ ### 5. ADVANCE — Move to Next Task
102
+
103
+ Only after both review stages pass:
104
+ - Record the task as complete
105
+ - Note the commit hash and any files created/modified
106
+ - Pass this minimal summary (not full context) to the next task's agent
107
+
108
+ ```bash
109
+ # Record task completion
110
+ node .claude/maxsim/bin/maxsim-tools.cjs state-add-decision "SDD: task N complete — [summary]"
111
+ ```
112
+
113
+ ### 6. REPORT — Final Summary
114
+
115
+ After all tasks complete:
116
+ - List each task with its status and commit hash
117
+ - Note any tasks that required fix iterations
118
+ - Summarize the total changes made
119
+
120
+ ## Context Management Rules
121
+
122
+ Each agent receives ONLY what it needs:
123
+
124
+ | Context Item | Included? |
125
+ |-------------|-----------|
126
+ | Task description + acceptance criteria | Always |
127
+ | Files relevant to this task | Always |
128
+ | Previous task commit hashes | Always |
129
+ | Previous task full diff | Never |
130
+ | Previous task agent conversation | Never |
131
+ | PROJECT.md / REQUIREMENTS.md | Only if task references project-level concerns |
132
+ | Full codebase | Never — only specified files |
133
+
134
+ **The point of SDD is fresh context. Loading the previous agent's full context defeats the purpose.**
135
+
136
+ ## Common Rationalizations — REJECT THESE
137
+
138
+ | Excuse | Why It Violates the Rule |
139
+ |--------|--------------------------|
140
+ | "This task is simple, skip review" | Simple tasks still have bugs. Review takes seconds for simple code. |
141
+ | "Review is slowing us down" | Unreviewed code slows you down more when bugs compound across tasks. |
142
+ | "Just pass the full context forward" | Full context = context rot. Minimal summaries keep agents effective. |
143
+ | "Fix it in the next task" | The next task's agent does not know about the bug. Fix it now. |
144
+ | "The agent knows best, trust it" | Agents make mistakes. That is why review exists. |
145
+
146
+ ## Red Flags — STOP If You Catch Yourself:
147
+
148
+ - Starting a new task before the previous one passed review
149
+ - Passing full conversation history to the next agent
150
+ - Skipping Stage 1 or Stage 2 of the review
151
+ - Accumulating "fix later" items across tasks
152
+ - On the 3rd fix attempt for the same review issue (escalate to user)
153
+
154
+ **If any red flag triggers: STOP. Complete the review cycle for the current task before proceeding.**
155
+
156
+ ## Verification Checklist
157
+
158
+ Before reporting completion, confirm:
159
+
160
+ - [ ] Every task was executed by a fresh agent with minimal context
161
+ - [ ] Every task passed both spec compliance and code quality review
162
+ - [ ] No task was skipped or started before the previous task passed review
163
+ - [ ] Fix iterations (if any) are documented
164
+ - [ ] All tests pass after the final task
165
+ - [ ] Summary includes per-task status and commit hashes
166
+
167
+ ## In MAXSIM Plan Execution
168
+
169
+ When a plan specifies `skill: "sdd"`:
170
+ - The orchestrator reads tasks from PLAN.md in order
171
+ - Each task is dispatched to a fresh subagent
172
+ - 2-stage review runs between every task
173
+ - Failed reviews trigger fix agents (up to 3 attempts)
174
+ - Progress is tracked in STATE.md via decision entries
175
+ - Final results are recorded in SUMMARY.md
@@ -135,3 +135,51 @@ Simplification applies at the task level, after implementation and before commit
135
135
  - Make simplification changes as part of the same commit (not a separate task)
136
136
  - If simplification reveals a larger refactoring opportunity, file a todo — do not scope-creep
137
137
  - Track significant simplifications in the task's commit message (e.g., "extracted shared helper for X")
138
+
139
+ ## Parallel 3-Reviewer Pattern (Execution Pipeline)
140
+
141
+ When invoked as part of the Execute-Review-Simplify-Review cycle in `execute-plan.md`, simplification runs as 3 parallel review agents. Each reviewer focuses on one dimension:
142
+
143
+ ### Reviewer 1: Code Reuse
144
+ - Find duplicated logic across the codebase (not just within changed files)
145
+ - Identify copy-paste from other files that should be extracted to shared modules
146
+ - Suggest shared helpers for patterns appearing 3+ times (Rule of Three)
147
+ - Check if existing utility functions, library methods, or helpers could replace new code
148
+ - **Output:** List of reuse opportunities with file paths and line ranges
149
+
150
+ ### Reviewer 2: Code Quality
151
+ - Check naming consistency with codebase conventions (read CLAUDE.md first)
152
+ - Verify error handling covers all external calls and edge cases
153
+ - Look for dead code: unused imports, variables, unreachable branches, commented-out code
154
+ - Check for unnecessary abstractions, wrappers, or premature generalizations
155
+ - Verify security: no hardcoded secrets, no unsanitized inputs, no data exposure
156
+ - **Output:** List of quality issues categorized by severity (BLOCKER, HIGH, MEDIUM)
157
+
158
+ ### Reviewer 3: Efficiency
159
+ - Find O(n^2) operations where O(n) is straightforward
160
+ - Identify repeated computations that could be cached or hoisted out of loops
161
+ - Check for unnecessary allocations in hot paths
162
+ - Look for redundant data transformations (data processed multiple times when once suffices)
163
+ - Only flag obvious issues — do not optimize without evidence of a problem
164
+ - **Output:** List of efficiency issues with suggested fixes
165
+
166
+ ### Consolidation
167
+
168
+ After all 3 reviewers report, the orchestrating agent:
169
+ 1. Merges findings into a single deduplicated list
170
+ 2. Prioritizes: BLOCKER > HIGH > MEDIUM > informational
171
+ 3. Applies fixes for all actionable items (BLOCKER and HIGH)
172
+ 4. Files MEDIUM issues as todos if they require larger refactoring
173
+ 5. Runs tests to confirm fixes do not break anything
174
+ 6. Reports final status: CLEAN (nothing found), FIXED (issues found and resolved), or BLOCKED (cannot fix without architectural change)
175
+
176
+ ### Spawning Pattern
177
+
178
+ Each reviewer is spawned as a parallel agent via the Agent tool:
179
+ ```
180
+ # All 3 run in parallel
181
+ Task(prompt="Reviewer 1: Code Reuse — {files_to_review} ...", subagent_type="maxsim-executor")
182
+ Task(prompt="Reviewer 2: Code Quality — {files_to_review} ...", subagent_type="maxsim-executor")
183
+ Task(prompt="Reviewer 3: Efficiency — {files_to_review} ...", subagent_type="maxsim-executor")
184
+ # Wait for all 3 to complete, then consolidate
185
+ ```
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: using-maxsim
3
3
  description: Entry skill that establishes MAXSIM workflow rules — triggers before any action to route work through the correct MAXSIM commands, skills, and agents
4
+ alwaysApply: true
4
5
  ---
5
6
 
6
7
  # Using MAXSIM
@@ -49,11 +50,15 @@ Skills are behavioral rules that activate automatically based on context:
49
50
 
50
51
  | Skill | Triggers When |
51
52
  |-------|---------------|
53
+ | `using-maxsim` | Always (alwaysApply) — entry point for all MAXSIM work |
52
54
  | `systematic-debugging` | Any bug, test failure, or unexpected behavior encountered |
53
55
  | `tdd` | Implementing any feature or bug fix (write test first) |
54
56
  | `verification-before-completion` | Before claiming any work is complete or passing |
55
57
  | `memory-management` | Recurring patterns, errors, or decisions worth persisting |
56
- | `using-maxsim` | Always entry point for all MAXSIM work |
58
+ | `brainstorming` | Before implementing any significant feature or design |
59
+ | `roadmap-writing` | When creating or restructuring a project roadmap |
60
+ | `simplify` | When reviewing and cleaning up code changes |
61
+ | `code-review` | When reviewing implementation quality |
57
62
 
58
63
  ## Available Agents
59
64
 
@@ -0,0 +1,10 @@
1
+ # Acceptance Criteria
2
+
3
+ > Conditions that must be met for deliverables to be accepted.
4
+
5
+ **Created:** {{date}}
6
+
7
+ ## Criteria
8
+
9
+ | # | Criterion | Status | Verified |
10
+ |---|-----------|--------|----------|
@@ -0,0 +1,10 @@
1
+ # Decisions
2
+
3
+ > Architectural and design decisions for this project.
4
+
5
+ **Created:** {{date}}
6
+
7
+ ## Decision Log
8
+
9
+ | # | Decision | Rationale | Date | Phase |
10
+ |---|----------|-----------|------|-------|
@@ -0,0 +1,9 @@
1
+ # No-Gos
2
+
3
+ > Things explicitly out of scope or forbidden.
4
+
5
+ **Created:** {{date}}
6
+
7
+ ## Boundaries
8
+
9
+ - _No entries yet._
@@ -5,6 +5,7 @@ Capture an idea, task, or issue that surfaces during a MAXSIM session as a struc
5
5
  <required_reading>
6
6
  Read all files referenced by the invoking prompt's execution_context before starting.
7
7
  @./references/dashboard-bridge.md
8
+ @./references/thinking-partner.md
8
9
  </required_reading>
9
10
 
10
11
  <process>
@@ -42,6 +43,57 @@ Formulate:
42
43
  - `files`: Relevant paths with line numbers from conversation
43
44
  </step>
44
45
 
46
+ <step name="discussion_mode">
47
+ **Discussion mode triggers:**
48
+
49
+ 1. `--discuss` flag is present in $ARGUMENTS
50
+ 2. Complexity detected: title contains "refactor", "redesign", "migrate", "architecture", or problem description exceeds 3 sentences
51
+
52
+ **If neither trigger:** Skip to infer_area (quick-add path).
53
+
54
+ **If discussion mode activated:**
55
+
56
+ ```
57
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
58
+ MAXSIM ► TODO DISCUSSION
59
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
60
+ ```
61
+
62
+ Apply thinking-partner behaviors to clarify the todo before filing:
63
+
64
+ **Round 1 — Scope clarification (2-3 questions):**
65
+
66
+ Use AskUserQuestion to probe:
67
+ - What exactly is the problem? (Challenge vagueness)
68
+ - What does "done" look like for this? (Make abstract concrete)
69
+ - Is this one thing or multiple things? (Surface hidden scope)
70
+
71
+ **Round 2 — Approach exploration (2-3 questions):**
72
+
73
+ Use AskUserQuestion to explore:
74
+ - What approaches have you considered? (Propose alternatives with trade-offs)
75
+ - What constraints exist? (Surface unstated assumptions)
76
+ - What could go wrong? (Make consequences visible)
77
+
78
+ **Round 3 — Readiness check:**
79
+
80
+ Use AskUserQuestion:
81
+ - header: "Todo"
82
+ - question: "Ready to file this todo?"
83
+ - options:
84
+ - "File it" -- Capture what we discussed
85
+ - "Keep discussing" -- I want to explore more
86
+ - "Split into multiple" -- This is actually several todos
87
+
88
+ If "Keep discussing": ask 2-3 more probing questions, then check again.
89
+ If "Split into multiple": help user define 2-3 separate todos, file each one.
90
+ If "File it": continue to infer_area.
91
+
92
+ **Discussion mode enriches the todo file** — the Problem section includes discussion insights, and a new "## Approach" section captures approach decisions (replacing "## Solution" with richer content).
93
+
94
+ **Time budget:** 20-30 minutes max. After 6 rounds of questions, offer to file what you have.
95
+ </step>
96
+
45
97
  <step name="infer_area">
46
98
  Infer area from file paths:
47
99
 
@@ -89,11 +141,14 @@ slug=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs generate-slug "$title" --raw)
89
141
 
90
142
  Write to `.planning/todos/pending/${date}-${slug}.md`:
91
143
 
144
+ **Quick mode format:**
145
+
92
146
  ```markdown
93
147
  ---
94
148
  created: [timestamp]
95
149
  title: [title]
96
150
  area: [area]
151
+ mode: quick
97
152
  files:
98
153
  - [file:lines]
99
154
  ---
@@ -106,6 +161,40 @@ files:
106
161
 
107
162
  [approach hints or "TBD"]
108
163
  ```
164
+
165
+ **Discussion mode format (enriched):**
166
+
167
+ ```markdown
168
+ ---
169
+ created: [timestamp]
170
+ title: [title]
171
+ area: [area]
172
+ mode: discussed
173
+ files:
174
+ - [file:lines]
175
+ ---
176
+
177
+ ## Problem
178
+
179
+ [problem description enriched with discussion insights]
180
+
181
+ ## Scope
182
+
183
+ [What's in scope and what's not — from discussion round 1]
184
+
185
+ ## Approach
186
+
187
+ [Approach decisions with trade-offs explored — from discussion round 2]
188
+ [Include alternatives considered and why this approach was chosen]
189
+
190
+ ## Risks
191
+
192
+ [What could go wrong — from discussion]
193
+
194
+ ## Solution
195
+
196
+ [Concrete next steps or "TBD"]
197
+ ```
109
198
  </step>
110
199
 
111
200
  <step name="update_state">