maxsimcli 4.7.1 → 4.9.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 (161) hide show
  1. package/dist/assets/CHANGELOG.md +20 -0
  2. package/dist/assets/hooks/maxsim-check-update.cjs +38 -0
  3. package/dist/assets/hooks/maxsim-check-update.cjs.map +1 -1
  4. package/dist/assets/hooks/maxsim-statusline.cjs +116 -48
  5. package/dist/assets/hooks/maxsim-statusline.cjs.map +1 -1
  6. package/dist/assets/hooks/maxsim-sync-reminder.cjs +117 -0
  7. package/dist/assets/hooks/maxsim-sync-reminder.cjs.map +1 -0
  8. package/dist/assets/templates/agents/AGENTS.md +78 -106
  9. package/dist/assets/templates/agents/executor.md +101 -0
  10. package/dist/assets/templates/agents/planner.md +86 -0
  11. package/dist/assets/templates/agents/researcher.md +71 -0
  12. package/dist/assets/templates/agents/verifier.md +88 -0
  13. package/dist/assets/templates/commands/maxsim/debug.md +7 -7
  14. package/dist/assets/templates/commands/maxsim/execute.md +45 -0
  15. package/dist/assets/templates/commands/maxsim/go.md +29 -0
  16. package/dist/assets/templates/commands/maxsim/help.md +2 -2
  17. package/dist/assets/templates/commands/maxsim/init.md +52 -0
  18. package/dist/assets/templates/commands/maxsim/plan.md +50 -0
  19. package/dist/assets/templates/commands/maxsim/progress.md +4 -3
  20. package/dist/assets/templates/commands/maxsim/quick.md +6 -4
  21. package/dist/assets/templates/commands/maxsim/settings.md +4 -3
  22. package/dist/assets/templates/references/continuation-format.md +16 -16
  23. package/dist/assets/templates/references/model-profile-resolution.md +1 -1
  24. package/dist/assets/templates/references/model-profiles.md +12 -19
  25. package/dist/assets/templates/rules/conventions.md +51 -0
  26. package/dist/assets/templates/rules/verification-protocol.md +57 -0
  27. package/dist/assets/templates/skills/agent-system-map/SKILL.md +92 -0
  28. package/dist/assets/templates/skills/brainstorming/SKILL.md +48 -36
  29. package/dist/assets/templates/skills/code-review/SKILL.md +40 -61
  30. package/dist/assets/templates/skills/commit-conventions/SKILL.md +75 -0
  31. package/dist/assets/templates/skills/evidence-collection/SKILL.md +87 -0
  32. package/dist/assets/templates/skills/handoff-contract/SKILL.md +70 -0
  33. package/dist/assets/templates/skills/input-validation/SKILL.md +51 -0
  34. package/dist/assets/templates/skills/maxsim-batch/SKILL.md +41 -45
  35. package/dist/assets/templates/skills/maxsim-simplify/SKILL.md +37 -90
  36. package/dist/assets/templates/skills/memory-management/SKILL.md +32 -67
  37. package/dist/assets/templates/skills/research-methodology/SKILL.md +137 -0
  38. package/dist/assets/templates/skills/roadmap-writing/SKILL.md +40 -58
  39. package/dist/assets/templates/skills/sdd/SKILL.md +34 -69
  40. package/dist/assets/templates/skills/systematic-debugging/SKILL.md +20 -26
  41. package/dist/assets/templates/skills/tdd/SKILL.md +25 -33
  42. package/dist/assets/templates/skills/tool-priority-guide/SKILL.md +80 -0
  43. package/dist/assets/templates/skills/using-maxsim/SKILL.md +42 -73
  44. package/dist/assets/templates/skills/verification-before-completion/SKILL.md +12 -24
  45. package/dist/assets/templates/skills/verification-gates/SKILL.md +169 -0
  46. package/dist/assets/templates/templates/UAT.md +3 -3
  47. package/dist/assets/templates/templates/VALIDATION.md +1 -1
  48. package/dist/assets/templates/templates/context.md +4 -4
  49. package/dist/assets/templates/templates/debug-subagent-prompt.md +3 -3
  50. package/dist/assets/templates/templates/discovery.md +2 -2
  51. package/dist/assets/templates/templates/phase-prompt.md +2 -2
  52. package/dist/assets/templates/templates/planner-subagent-prompt.md +7 -7
  53. package/dist/assets/templates/templates/project.md +1 -1
  54. package/dist/assets/templates/templates/research.md +1 -1
  55. package/dist/assets/templates/templates/state.md +2 -2
  56. package/dist/assets/templates/templates/summary.md +41 -0
  57. package/dist/assets/templates/workflows/batch.md +5 -5
  58. package/dist/assets/templates/workflows/diagnose-issues.md +2 -2
  59. package/dist/assets/templates/workflows/discovery-phase.md +3 -3
  60. package/dist/assets/templates/workflows/discuss-phase.md +11 -11
  61. package/dist/assets/templates/workflows/execute-phase.md +205 -11
  62. package/dist/assets/templates/workflows/execute-plan.md +299 -34
  63. package/dist/assets/templates/workflows/execute.md +421 -0
  64. package/dist/assets/templates/workflows/go.md +250 -0
  65. package/dist/assets/templates/workflows/health.md +5 -5
  66. package/dist/assets/templates/workflows/help.md +165 -435
  67. package/dist/assets/templates/workflows/init-existing.md +23 -23
  68. package/dist/assets/templates/workflows/init.md +205 -0
  69. package/dist/assets/templates/workflows/new-milestone.md +9 -9
  70. package/dist/assets/templates/workflows/new-project.md +26 -26
  71. package/dist/assets/templates/workflows/plan-create.md +298 -0
  72. package/dist/assets/templates/workflows/plan-discuss.md +347 -0
  73. package/dist/assets/templates/workflows/plan-phase.md +29 -29
  74. package/dist/assets/templates/workflows/plan-research.md +177 -0
  75. package/dist/assets/templates/workflows/plan.md +231 -0
  76. package/dist/assets/templates/workflows/progress.md +46 -42
  77. package/dist/assets/templates/workflows/quick.md +195 -14
  78. package/dist/assets/templates/workflows/research-phase.md +5 -5
  79. package/dist/assets/templates/workflows/sdd.md +20 -12
  80. package/dist/assets/templates/workflows/settings.md +18 -14
  81. package/dist/assets/templates/workflows/verify-phase.md +1 -1
  82. package/dist/assets/templates/workflows/verify-work.md +16 -16
  83. package/dist/cli.cjs +496 -91
  84. package/dist/cli.cjs.map +1 -1
  85. package/dist/core-D5zUr9cb.cjs.map +1 -1
  86. package/dist/install.cjs +274 -355
  87. package/dist/install.cjs.map +1 -1
  88. package/dist/mcp-server.cjs +5213 -2248
  89. package/dist/mcp-server.cjs.map +1 -1
  90. package/dist/skills-CjFWZIGM.cjs.map +1 -1
  91. package/package.json +4 -1
  92. package/dist/assets/hooks/maxsim-context-monitor.cjs +0 -121
  93. package/dist/assets/hooks/maxsim-context-monitor.cjs.map +0 -1
  94. package/dist/assets/templates/agents/maxsim-code-reviewer.md +0 -239
  95. package/dist/assets/templates/agents/maxsim-codebase-mapper.md +0 -214
  96. package/dist/assets/templates/agents/maxsim-debugger.md +0 -572
  97. package/dist/assets/templates/agents/maxsim-drift-checker.md +0 -522
  98. package/dist/assets/templates/agents/maxsim-executor.md +0 -504
  99. package/dist/assets/templates/agents/maxsim-integration-checker.md +0 -273
  100. package/dist/assets/templates/agents/maxsim-phase-researcher.md +0 -305
  101. package/dist/assets/templates/agents/maxsim-plan-checker.md +0 -343
  102. package/dist/assets/templates/agents/maxsim-planner.md +0 -610
  103. package/dist/assets/templates/agents/maxsim-project-researcher.md +0 -359
  104. package/dist/assets/templates/agents/maxsim-research-synthesizer.md +0 -263
  105. package/dist/assets/templates/agents/maxsim-roadmapper.md +0 -324
  106. package/dist/assets/templates/agents/maxsim-spec-reviewer.md +0 -245
  107. package/dist/assets/templates/agents/maxsim-verifier.md +0 -393
  108. package/dist/assets/templates/commands/maxsim/add-phase.md +0 -43
  109. package/dist/assets/templates/commands/maxsim/add-tests.md +0 -41
  110. package/dist/assets/templates/commands/maxsim/add-todo.md +0 -57
  111. package/dist/assets/templates/commands/maxsim/artefakte.md +0 -122
  112. package/dist/assets/templates/commands/maxsim/audit-milestone.md +0 -36
  113. package/dist/assets/templates/commands/maxsim/batch.md +0 -42
  114. package/dist/assets/templates/commands/maxsim/check-drift.md +0 -56
  115. package/dist/assets/templates/commands/maxsim/check-todos.md +0 -46
  116. package/dist/assets/templates/commands/maxsim/cleanup.md +0 -18
  117. package/dist/assets/templates/commands/maxsim/complete-milestone.md +0 -136
  118. package/dist/assets/templates/commands/maxsim/discuss-phase.md +0 -87
  119. package/dist/assets/templates/commands/maxsim/discuss.md +0 -70
  120. package/dist/assets/templates/commands/maxsim/execute-phase.md +0 -41
  121. package/dist/assets/templates/commands/maxsim/health.md +0 -22
  122. package/dist/assets/templates/commands/maxsim/init-existing.md +0 -46
  123. package/dist/assets/templates/commands/maxsim/insert-phase.md +0 -32
  124. package/dist/assets/templates/commands/maxsim/list-phase-assumptions.md +0 -46
  125. package/dist/assets/templates/commands/maxsim/map-codebase.md +0 -71
  126. package/dist/assets/templates/commands/maxsim/new-milestone.md +0 -44
  127. package/dist/assets/templates/commands/maxsim/new-project.md +0 -46
  128. package/dist/assets/templates/commands/maxsim/pause-work.md +0 -38
  129. package/dist/assets/templates/commands/maxsim/plan-milestone-gaps.md +0 -34
  130. package/dist/assets/templates/commands/maxsim/plan-phase.md +0 -44
  131. package/dist/assets/templates/commands/maxsim/realign.md +0 -39
  132. package/dist/assets/templates/commands/maxsim/reapply-patches.md +0 -110
  133. package/dist/assets/templates/commands/maxsim/remove-phase.md +0 -31
  134. package/dist/assets/templates/commands/maxsim/research-phase.md +0 -189
  135. package/dist/assets/templates/commands/maxsim/resume-work.md +0 -40
  136. package/dist/assets/templates/commands/maxsim/roadmap.md +0 -19
  137. package/dist/assets/templates/commands/maxsim/sdd.md +0 -39
  138. package/dist/assets/templates/commands/maxsim/set-profile.md +0 -34
  139. package/dist/assets/templates/commands/maxsim/update.md +0 -37
  140. package/dist/assets/templates/commands/maxsim/verify-work.md +0 -38
  141. package/dist/assets/templates/workflows/add-phase.md +0 -111
  142. package/dist/assets/templates/workflows/add-tests.md +0 -351
  143. package/dist/assets/templates/workflows/add-todo.md +0 -247
  144. package/dist/assets/templates/workflows/audit-milestone.md +0 -297
  145. package/dist/assets/templates/workflows/check-drift.md +0 -248
  146. package/dist/assets/templates/workflows/check-todos.md +0 -261
  147. package/dist/assets/templates/workflows/cleanup.md +0 -153
  148. package/dist/assets/templates/workflows/complete-milestone.md +0 -701
  149. package/dist/assets/templates/workflows/discuss.md +0 -343
  150. package/dist/assets/templates/workflows/insert-phase.md +0 -129
  151. package/dist/assets/templates/workflows/list-phase-assumptions.md +0 -178
  152. package/dist/assets/templates/workflows/map-codebase.md +0 -315
  153. package/dist/assets/templates/workflows/pause-work.md +0 -122
  154. package/dist/assets/templates/workflows/plan-milestone-gaps.md +0 -274
  155. package/dist/assets/templates/workflows/realign.md +0 -288
  156. package/dist/assets/templates/workflows/remove-phase.md +0 -154
  157. package/dist/assets/templates/workflows/resume-project.md +0 -306
  158. package/dist/assets/templates/workflows/roadmap.md +0 -130
  159. package/dist/assets/templates/workflows/set-profile.md +0 -81
  160. package/dist/assets/templates/workflows/transition.md +0 -544
  161. package/dist/assets/templates/workflows/update.md +0 -220
@@ -1,343 +0,0 @@
1
- <sanity_check>
2
- Before executing any step in this workflow, verify:
3
- 1. The current directory contains a `.planning/` folder -- if not, stop and tell the user to run `/maxsim:new-project` first.
4
- 2. `.planning/ROADMAP.md` exists -- if not, stop and tell the user to initialize the project.
5
- </sanity_check>
6
-
7
- <purpose>
8
- Triage an unknown problem, idea, or bug into the right size -- quick todo or new phase -- through collaborative discussion.
9
-
10
- You are a thinking partner, not a form collector. The user has something on their mind -- help them clarify it, size it, and file it in the right place. Then offer the next action so momentum continues.
11
-
12
- **Key distinction:** This workflow triages an UNKNOWN item into the right size. `/maxsim:discuss-phase` gathers decisions for a KNOWN phase. They are complementary, not overlapping.
13
- </purpose>
14
-
15
- <required_reading>
16
- Read all files referenced by the invoking prompt's execution_context before starting.
17
- @./references/dashboard-bridge.md
18
- @./references/thinking-partner.md
19
- </required_reading>
20
-
21
- <tool_mandate>
22
- **CRITICAL -- Structured user interaction is MANDATORY.**
23
-
24
- Every question directed at the user MUST use a structured tool. NEVER write a question as plain text and wait for the user to respond. This applies to:
25
-
26
- - Existing todo confirmation
27
- - Every clarifying question during discussion
28
- - Triage size classification proposal
29
- - Filing confirmation
30
- - Next action offers
31
- - Any follow-up or clarification
32
-
33
- **Tool selection:** At workflow start, probe for the dashboard (see @dashboard-bridge). Then:
34
- - **DASHBOARD_ACTIVE = true** -- use `mcp__maxsim-dashboard__ask_question` (questions appear in browser). Follow the schema translation rules from @dashboard-bridge.
35
- - **DASHBOARD_ACTIVE = false** -- use `AskUserQuestion` (questions appear in terminal).
36
-
37
- **The rule is simple:** If you need input from the user -- use the appropriate structured tool based on dashboard availability. Zero exceptions.
38
- </tool_mandate>
39
-
40
- <process>
41
-
42
- <step name="init_context">
43
- Load project state and todo context:
44
-
45
- ```bash
46
- STATE=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs state-load --raw)
47
- ```
48
-
49
- Check `planning_exists` from state. **Hard stop** if false -- tell user to run `/maxsim:new-project` first.
50
-
51
- ```bash
52
- INIT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs init todos)
53
- ```
54
-
55
- Extract from init JSON: `commit_docs`, `date`, `timestamp`, `todo_count`, `todos`, `pending_dir`, `todos_dir_exists`.
56
-
57
- Ensure directories exist:
58
- ```bash
59
- mkdir -p .planning/todos/pending .planning/todos/done
60
- ```
61
-
62
- Parse user input from $ARGUMENTS (if any):
63
- - If arguments provided: store as `user_input` for use in detect_existing_todo and gather_context
64
- - If no arguments: `user_input` is empty -- will ask interactively in gather_context
65
-
66
- Note existing areas from the todos array for consistency in later area inference.
67
- </step>
68
-
69
- <step name="detect_existing_todo">
70
- **Only runs if `user_input` is non-empty.**
71
-
72
- Search pending todos for a title or slug match against the user's input:
73
-
74
- ```bash
75
- # Search for matching words in existing todo titles
76
- grep -l -i "[key words from user_input]" .planning/todos/pending/*.md 2>/dev/null
77
- ```
78
-
79
- Also compare against the `todos` array from init context -- check `title` and filename fields for partial matches.
80
-
81
- **If a match is found:**
82
-
83
- Use AskUserQuestion:
84
- - header: "Existing Todo"
85
- - question: "Found a pending todo that might match: **[todo title]**. Want to discuss this one?"
86
- - options:
87
- - "Yes, discuss this todo" -- Load its context and continue discussion about it
88
- - "No, this is something new" -- Proceed as a new item
89
-
90
- If "Yes": Read the matched todo file. Use its content as context for the discussion. The user may want to refine scope, change priority, or decide to work on it now.
91
-
92
- If "No": Proceed to gather_context as a new item, using `user_input` as the starting description.
93
-
94
- **If no match found (or no user_input):**
95
-
96
- Proceed to gather_context.
97
- </step>
98
-
99
- <step name="gather_context">
100
- Use adaptive questioning to understand what the user is describing.
101
-
102
- **Apply thinking-partner behaviors from @./references/thinking-partner.md:**
103
- - Challenge vague descriptions -- "broken" means what exactly?
104
- - Surface unstated assumptions -- "this should be easy" might hide complexity
105
- - Propose alternatives if the user's framing suggests a different approach
106
- - Follow the thread -- build each question on the previous answer
107
-
108
- **If `user_input` is non-empty (user provided a description):**
109
-
110
- Start by reflecting back what you understood, then ask your first clarifying question.
111
-
112
- Use AskUserQuestion:
113
- - header: "Clarify"
114
- - question: Based on the user's description, ask the most important clarifying question. For example: "You mentioned [X]. What specifically is the problem -- is it [scenario A] or [scenario B]?"
115
- - options: 2-3 concrete options that capture likely answers, plus the implicit "Other" for free-text
116
-
117
- **If `user_input` is empty (no arguments):**
118
-
119
- Use AskUserQuestion:
120
- - header: "Discuss"
121
- - question: "What's on your mind? Describe the problem, idea, or bug you want to discuss."
122
- - options: (none -- free text only, do not provide options for the opening question)
123
-
124
- **After the first response, ask 1-2 more adaptive follow-up questions:**
125
-
126
- Each follow-up uses AskUserQuestion with header, question, and options tailored to what the user just said.
127
-
128
- **Adaptive depth:**
129
- - If answers reveal the item is simple and well-defined (clear problem, clear scope, obvious size): move to triage after 2 questions
130
- - If answers reveal complexity (multiple systems involved, unclear scope, competing approaches): ask up to 2 more questions before triage
131
- - Maximum: 4 questions before triage. Read the room -- don't over-probe simple bugs.
132
-
133
- **What to extract from the discussion:**
134
- - `title`: 3-10 word descriptive title (action verb preferred)
135
- - `problem`: What is wrong or why this is needed
136
- - `scope_hint`: Simple fix, or touches multiple systems?
137
- - `files`: Any file paths or areas mentioned
138
- - `size_signal`: Does this feel like a quick todo or a multi-day phase?
139
- </step>
140
-
141
- <step name="triage">
142
- Based on gathered context, propose a size classification.
143
-
144
- **Assess the item:**
145
- - Quick todo: Well-defined problem, clear fix, single area, could be done in one session
146
- - Phase: Touches multiple systems, needs research, unclear approach, requires planning
147
-
148
- **Present classification via AskUserQuestion:**
149
- - header: "Size"
150
- - question: "Based on what you described, this looks like [your assessment with brief explanation]. Does that match?"
151
- - options:
152
- - "Quick fix (todo)" -- File as a todo for later or work on it now
153
- - "Needs a phase" -- Too big for a todo, add to the roadmap as a new phase
154
- - "Let me explain more" -- I want to provide more context before deciding
155
-
156
- Include a brief explanation of WHY you suggest the classification you suggest. For example: "This sounds like a focused bug fix in one file -- a quick todo should cover it." Or: "This touches auth, database, and the API layer -- that's phase-sized work."
157
-
158
- **CRITICAL: Always present this as a question. Never auto-route.** Even if the size is obvious, the user confirms.
159
-
160
- **If user selects "Let me explain more":**
161
- Loop back to gather_context for 1-2 more questions, then return to triage with updated assessment.
162
-
163
- **If user selects "Quick fix (todo)":**
164
- Proceed to file_as_todo.
165
-
166
- **If user selects "Needs a phase":**
167
- Proceed to file_as_phase.
168
- </step>
169
-
170
- <step name="file_as_todo">
171
- File the item as a todo using existing maxsim-tools.cjs commands.
172
-
173
- **1. Generate slug:**
174
- ```bash
175
- slug=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs generate-slug "$title" --raw)
176
- ```
177
-
178
- **2. Infer area from discussion context:**
179
-
180
- Use file paths and topic from the discussion to infer area:
181
-
182
- | Path pattern | Area |
183
- |--------------|------|
184
- | `src/api/*`, `api/*` | `api` |
185
- | `src/components/*`, `src/ui/*` | `ui` |
186
- | `src/auth/*`, `auth/*` | `auth` |
187
- | `src/db/*`, `database/*` | `database` |
188
- | `tests/*`, `__tests__/*` | `testing` |
189
- | `docs/*` | `docs` |
190
- | `.planning/*` | `planning` |
191
- | `scripts/*`, `bin/*` | `tooling` |
192
- | No files or unclear | `general` |
193
-
194
- Use existing areas from init context if a similar match exists.
195
-
196
- **3. Check for duplicates:**
197
- ```bash
198
- # Search for key words from title in existing todos
199
- grep -l -i "[key words from title]" .planning/todos/pending/*.md 2>/dev/null
200
- ```
201
-
202
- If potential duplicate found, read the existing todo and compare scope.
203
-
204
- If overlapping, use AskUserQuestion:
205
- - header: "Duplicate?"
206
- - question: "A similar todo already exists: **[existing title]**. What would you like to do?"
207
- - options:
208
- - "Skip" -- Keep the existing todo as-is
209
- - "Replace" -- Update the existing todo with new context from this discussion
210
- - "Add anyway" -- Create a separate todo (they cover different aspects)
211
-
212
- If "Skip": Jump to offer_next_action (nothing filed).
213
- If "Replace": Update the existing file instead of creating new.
214
- If "Add anyway": Continue creating new todo.
215
-
216
- **4. Create todo file:**
217
-
218
- Use values from init context: `timestamp` and `date` are already available.
219
-
220
- Write to `.planning/todos/pending/${date}-${slug}.md`:
221
-
222
- ```markdown
223
- ---
224
- created: [timestamp]
225
- title: [title]
226
- area: [area]
227
- mode: discussed
228
- files:
229
- - [file paths from discussion, if any]
230
- ---
231
-
232
- ## Problem
233
-
234
- [Problem description enriched with discussion insights -- enough context for a future Claude session to understand weeks later]
235
-
236
- ## Solution
237
-
238
- [Approach hints from the discussion, or "TBD" if only the problem was clarified]
239
- ```
240
-
241
- **5. Commit:**
242
- ```bash
243
- node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs: add todo [slug]" --files .planning/todos/pending/${date}-${slug}.md
244
- ```
245
-
246
- Confirm to user: "Filed as todo: **[title]**"
247
-
248
- Proceed to offer_next_action.
249
- </step>
250
-
251
- <step name="file_as_phase">
252
- File the item as a new phase on the roadmap.
253
-
254
- **1. Gather phase details via AskUserQuestion:**
255
- - header: "Phase"
256
- - question: "What should this phase be called? And in one sentence, what's the goal?"
257
- - options: (none -- free text for naming)
258
-
259
- Parse the response to extract:
260
- - `phase_name`: Short name (2-5 words)
261
- - `phase_goal`: One-sentence goal description
262
-
263
- **2. Preview and confirm via AskUserQuestion:**
264
-
265
- First, check the current roadmap to determine what the next phase number would be:
266
- ```bash
267
- node ~/.claude/maxsim/bin/maxsim-tools.cjs roadmap analyze --raw
268
- ```
269
-
270
- - header: "Confirm"
271
- - question: "This would add **Phase [N]: [phase_name]** to the roadmap with goal: *[phase_goal]*. Proceed?"
272
- - options:
273
- - "Yes, add it" -- Add to roadmap
274
- - "Let me adjust" -- I want to change the name or goal
275
- - "Cancel" -- Don't add anything
276
-
277
- If "Let me adjust": Ask again for name/goal, then re-preview.
278
- If "Cancel": Jump to offer_next_action (nothing filed).
279
- If "Yes, add it": Continue.
280
-
281
- **3. Create the phase:**
282
- ```bash
283
- node ~/.claude/maxsim/bin/maxsim-tools.cjs phase add "[phase_name]"
284
- ```
285
-
286
- **4. Commit:**
287
- ```bash
288
- node ~/.claude/maxsim/bin/maxsim-tools.cjs commit "docs: add phase [phase_name]" --files .planning/ROADMAP.md .planning/phases/
289
- ```
290
-
291
- Confirm to user: "Added to roadmap: **Phase [N]: [phase_name]**"
292
-
293
- Proceed to offer_next_action.
294
- </step>
295
-
296
- <step name="offer_next_action">
297
- After filing (or skipping), offer contextual next actions.
298
-
299
- **If filed as todo:**
300
-
301
- Use AskUserQuestion:
302
- - header: "Next"
303
- - question: "Todo filed. What would you like to do next?"
304
- - options:
305
- - "Work on it now" -- Start a quick task with /maxsim:quick
306
- - "Save for later" -- It's captured, move on
307
- - "Check all todos" -- See pending todos with /maxsim:check-todos
308
-
309
- If "Work on it now": Tell the user to run `/maxsim:quick [todo-title]` (print the command, do not auto-execute).
310
- If "Save for later": Confirm and end workflow.
311
- If "Check all todos": Tell the user to run `/maxsim:check-todos`.
312
-
313
- **If filed as phase:**
314
-
315
- Use AskUserQuestion:
316
- - header: "Next"
317
- - question: "Phase added to roadmap. What would you like to do next?"
318
- - options:
319
- - "Discuss it" -- Gather implementation context with /maxsim:discuss-phase [phase]
320
- - "Plan it" -- Jump to planning with /maxsim:plan-phase [phase]
321
- - "Save for later" -- It's on the roadmap, move on
322
-
323
- If "Discuss it": Tell the user to run `/maxsim:discuss-phase [phase-number]`.
324
- If "Plan it": Tell the user to run `/maxsim:plan-phase [phase-number]`.
325
- If "Save for later": Confirm and end workflow.
326
-
327
- **If nothing was filed (duplicate skip or cancel):**
328
-
329
- Confirm that no action was taken and the discussion is complete.
330
-
331
- **User always chooses -- no auto-start.** Print the recommended command for the user to copy and run, do not execute it.
332
- </step>
333
-
334
- </process>
335
-
336
- <success_criteria>
337
- - [ ] User's problem/idea/bug understood through adaptive discussion
338
- - [ ] Existing todo detected if user referenced one
339
- - [ ] Triage routing confirmed by user before any filing
340
- - [ ] Item filed correctly (todo file in pending, or phase added to roadmap)
341
- - [ ] Git commit created for the filed item
342
- - [ ] Next action offered with concrete commands to run
343
- </success_criteria>
@@ -1,129 +0,0 @@
1
- <purpose>
2
- Insert a decimal phase for urgent work discovered mid-milestone between existing integer phases. Uses decimal numbering (72.1, 72.2, etc.) to preserve the logical sequence of planned phases while accommodating urgent insertions without renumbering the entire roadmap.
3
- </purpose>
4
-
5
- <required_reading>
6
- Read all files referenced by the invoking prompt's execution_context before starting.
7
- </required_reading>
8
-
9
- <process>
10
-
11
- <step name="parse_arguments">
12
- Parse the command arguments:
13
- - First argument: integer phase number to insert after
14
- - Remaining arguments: phase description
15
-
16
- Example: `/maxsim:insert-phase 72 Fix critical auth bug`
17
- -> after = 72
18
- -> description = "Fix critical auth bug"
19
-
20
- If arguments missing:
21
-
22
- ```
23
- ERROR: Both phase number and description required
24
- Usage: /maxsim:insert-phase <after> <description>
25
- Example: /maxsim:insert-phase 72 Fix critical auth bug
26
- ```
27
-
28
- Exit.
29
-
30
- Validate first argument is an integer.
31
- </step>
32
-
33
- <step name="init_context">
34
- Load phase operation context:
35
-
36
- ```bash
37
- INIT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs init phase-op "${after_phase}")
38
- ```
39
-
40
- Check `roadmap_exists` from init JSON. If false:
41
- ```
42
- ERROR: No roadmap found (.planning/ROADMAP.md)
43
- ```
44
- Exit.
45
- </step>
46
-
47
- <step name="insert_phase">
48
- **Delegate the phase insertion to maxsim-tools:**
49
-
50
- ```bash
51
- RESULT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs phase insert "${after_phase}" "${description}")
52
- ```
53
-
54
- The CLI handles:
55
- - Verifying target phase exists in ROADMAP.md
56
- - Calculating next decimal phase number (checking existing decimals on disk)
57
- - Generating slug from description
58
- - Creating the phase directory (`.planning/phases/{N.M}-{slug}/`)
59
- - Inserting the phase entry into ROADMAP.md after the target phase with (INSERTED) marker
60
-
61
- Extract from result: `phase_number`, `after_phase`, `name`, `slug`, `directory`.
62
- </step>
63
-
64
- <step name="update_project_state">
65
- Update STATE.md to reflect the inserted phase:
66
-
67
- 1. Read `.planning/STATE.md`
68
- 2. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
69
- ```
70
- - Phase {decimal_phase} inserted after Phase {after_phase}: {description} (URGENT)
71
- ```
72
-
73
- If "Roadmap Evolution" section doesn't exist, create it.
74
- </step>
75
-
76
- <step name="completion">
77
- Present completion summary:
78
-
79
- ```
80
- Phase {decimal_phase} inserted after Phase {after_phase}:
81
- - Description: {description}
82
- - Directory: .planning/phases/{decimal-phase}-{slug}/
83
- - Status: Not planned yet
84
- - Marker: (INSERTED) - indicates urgent work
85
-
86
- Roadmap updated: .planning/ROADMAP.md
87
- Project state updated: .planning/STATE.md
88
-
89
- ---
90
-
91
- ## Next Up
92
-
93
- **Phase {decimal_phase}: {description}** -- urgent insertion
94
-
95
- `/maxsim:plan-phase {decimal_phase}`
96
-
97
- <sub>`/clear` first -> fresh context window</sub>
98
-
99
- ---
100
-
101
- **Also available:**
102
- - Review insertion impact: Check if Phase {next_integer} dependencies still make sense
103
- - Review roadmap
104
-
105
- ---
106
- ```
107
- </step>
108
-
109
- </process>
110
-
111
- <anti_patterns>
112
-
113
- - Don't use this for planned work at end of milestone (use /maxsim:add-phase)
114
- - Don't insert before Phase 1 (decimal 0.1 makes no sense)
115
- - Don't renumber existing phases
116
- - Don't modify the target phase content
117
- - Don't create plans yet (that's /maxsim:plan-phase)
118
- - Don't commit changes (user decides when to commit)
119
- </anti_patterns>
120
-
121
- <success_criteria>
122
- Phase insertion is complete when:
123
-
124
- - [ ] `maxsim-tools phase insert` executed successfully
125
- - [ ] Phase directory created
126
- - [ ] Roadmap updated with new phase entry (includes "(INSERTED)" marker)
127
- - [ ] STATE.md updated with roadmap evolution note
128
- - [ ] User informed of next steps and dependency implications
129
- </success_criteria>
@@ -1,178 +0,0 @@
1
- <purpose>
2
- Surface Claude's assumptions about a phase before planning, enabling users to correct misconceptions early.
3
-
4
- Key difference from discuss-phase: This is ANALYSIS of what Claude thinks, not INTAKE of what user knows. No file output - purely conversational to prompt discussion.
5
- </purpose>
6
-
7
- <process>
8
-
9
- <step name="validate_phase" priority="first">
10
- Phase number: $ARGUMENTS (required)
11
-
12
- **If argument missing:**
13
-
14
- ```
15
- Error: Phase number required.
16
-
17
- Usage: /maxsim:list-phase-assumptions [phase-number]
18
- Example: /maxsim:list-phase-assumptions 3
19
- ```
20
-
21
- Exit workflow.
22
-
23
- **If argument provided:**
24
- Validate phase exists in roadmap:
25
-
26
- ```bash
27
- cat .planning/ROADMAP.md | grep -i "Phase ${PHASE}"
28
- ```
29
-
30
- **If phase not found:**
31
-
32
- ```
33
- Error: Phase ${PHASE} not found in roadmap.
34
-
35
- Available phases:
36
- [list phases from roadmap]
37
- ```
38
-
39
- Exit workflow.
40
-
41
- **If phase found:**
42
- Parse phase details from roadmap:
43
-
44
- - Phase number
45
- - Phase name
46
- - Phase description/goal
47
- - Any scope details mentioned
48
-
49
- Continue to analyze_phase.
50
- </step>
51
-
52
- <step name="analyze_phase">
53
- Based on roadmap description and project context, identify assumptions across five areas:
54
-
55
- **1. Technical Approach:**
56
- What libraries, frameworks, patterns, or tools would Claude use?
57
- - "I'd use X library because..."
58
- - "I'd follow Y pattern because..."
59
- - "I'd structure this as Z because..."
60
-
61
- **2. Implementation Order:**
62
- What would Claude build first, second, third?
63
- - "I'd start with X because it's foundational"
64
- - "Then Y because it depends on X"
65
- - "Finally Z because..."
66
-
67
- **3. Scope Boundaries:**
68
- What's included vs excluded in Claude's interpretation?
69
- - "This phase includes: A, B, C"
70
- - "This phase does NOT include: D, E, F"
71
- - "Boundary ambiguities: G could go either way"
72
-
73
- **4. Risk Areas:**
74
- Where does Claude expect complexity or challenges?
75
- - "The tricky part is X because..."
76
- - "Potential issues: Y, Z"
77
- - "I'd watch out for..."
78
-
79
- **5. Dependencies:**
80
- What does Claude assume exists or needs to be in place?
81
- - "This assumes X from previous phases"
82
- - "External dependencies: Y, Z"
83
- - "This will be consumed by..."
84
-
85
- Be honest about uncertainty. Mark assumptions with confidence levels:
86
- - "Fairly confident: ..." (clear from roadmap)
87
- - "Assuming: ..." (reasonable inference)
88
- - "Unclear: ..." (could go multiple ways)
89
- </step>
90
-
91
- <step name="present_assumptions">
92
- Present assumptions in a clear, scannable format:
93
-
94
- ```
95
- ## My Assumptions for Phase ${PHASE}: ${PHASE_NAME}
96
-
97
- ### Technical Approach
98
- [List assumptions about how to implement]
99
-
100
- ### Implementation Order
101
- [List assumptions about sequencing]
102
-
103
- ### Scope Boundaries
104
- **In scope:** [what's included]
105
- **Out of scope:** [what's excluded]
106
- **Ambiguous:** [what could go either way]
107
-
108
- ### Risk Areas
109
- [List anticipated challenges]
110
-
111
- ### Dependencies
112
- **From prior phases:** [what's needed]
113
- **External:** [third-party needs]
114
- **Feeds into:** [what future phases need from this]
115
-
116
- ---
117
-
118
- **What do you think?**
119
-
120
- Are these assumptions accurate? Let me know:
121
- - What I got right
122
- - What I got wrong
123
- - What I'm missing
124
- ```
125
-
126
- Wait for user response.
127
- </step>
128
-
129
- <step name="gather_feedback">
130
- **If user provides corrections:**
131
-
132
- Acknowledge the corrections:
133
-
134
- ```
135
- Key corrections:
136
- - [correction 1]
137
- - [correction 2]
138
-
139
- This changes my understanding significantly. [Summarize new understanding]
140
- ```
141
-
142
- **If user confirms assumptions:**
143
-
144
- ```
145
- Assumptions validated.
146
- ```
147
-
148
- Continue to offer_next.
149
- </step>
150
-
151
- <step name="offer_next">
152
- Present next steps:
153
-
154
- ```
155
- What's next?
156
- 1. Discuss context (/maxsim:discuss-phase ${PHASE}) - Let me ask you questions to build comprehensive context
157
- 2. Plan this phase (/maxsim:plan-phase ${PHASE}) - Create detailed execution plans
158
- 3. Re-examine assumptions - I'll analyze again with your corrections
159
- 4. Done for now
160
- ```
161
-
162
- Wait for user selection.
163
-
164
- If "Discuss context": Note that CONTEXT.md will incorporate any corrections discussed here
165
- If "Plan this phase": Proceed knowing assumptions are understood
166
- If "Re-examine": Return to analyze_phase with updated understanding
167
- </step>
168
-
169
- </process>
170
-
171
- <success_criteria>
172
- - Phase number validated against roadmap
173
- - Assumptions surfaced across five areas: technical approach, implementation order, scope, risks, dependencies
174
- - Confidence levels marked where appropriate
175
- - "What do you think?" prompt presented
176
- - User feedback acknowledged
177
- - Clear next steps offered
178
- </success_criteria>