mindsystem-cc 3.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.
- package/LICENSE +21 -0
- package/README.md +501 -0
- package/agents/ms-codebase-mapper.md +739 -0
- package/agents/ms-debugger.md +1184 -0
- package/agents/ms-designer.md +414 -0
- package/agents/ms-executor.md +760 -0
- package/agents/ms-integration-checker.md +423 -0
- package/agents/ms-milestone-auditor.md +448 -0
- package/agents/ms-mock-generator.md +182 -0
- package/agents/ms-plan-checker.md +746 -0
- package/agents/ms-research-synthesizer.md +248 -0
- package/agents/ms-researcher.md +962 -0
- package/agents/ms-roadmapper.md +606 -0
- package/agents/ms-verifier.md +779 -0
- package/agents/ms-verify-fixer.md +124 -0
- package/bin/install.js +296 -0
- package/commands/ms/add-phase.md +207 -0
- package/commands/ms/add-todo.md +182 -0
- package/commands/ms/audit-milestone.md +318 -0
- package/commands/ms/check-phase.md +162 -0
- package/commands/ms/check-todos.md +217 -0
- package/commands/ms/complete-milestone.md +137 -0
- package/commands/ms/create-roadmap.md +273 -0
- package/commands/ms/debug.md +149 -0
- package/commands/ms/define-requirements.md +121 -0
- package/commands/ms/design-phase.md +341 -0
- package/commands/ms/discuss-milestone.md +48 -0
- package/commands/ms/discuss-phase.md +60 -0
- package/commands/ms/do-work.md +90 -0
- package/commands/ms/execute-phase.md +289 -0
- package/commands/ms/help.md +623 -0
- package/commands/ms/insert-phase.md +227 -0
- package/commands/ms/list-phase-assumptions.md +50 -0
- package/commands/ms/map-codebase.md +71 -0
- package/commands/ms/new-milestone.md +193 -0
- package/commands/ms/new-project.md +338 -0
- package/commands/ms/pause-work.md +123 -0
- package/commands/ms/plan-milestone-gaps.md +285 -0
- package/commands/ms/plan-phase.md +105 -0
- package/commands/ms/progress.md +370 -0
- package/commands/ms/remove-phase.md +338 -0
- package/commands/ms/research-phase.md +175 -0
- package/commands/ms/research-project.md +339 -0
- package/commands/ms/resume-work.md +40 -0
- package/commands/ms/review-design.md +484 -0
- package/commands/ms/simplify-flutter.md +193 -0
- package/commands/ms/update.md +159 -0
- package/commands/ms/verify-work.md +92 -0
- package/commands/ms/whats-new.md +124 -0
- package/mindsystem/references/checkpoints.md +788 -0
- package/mindsystem/references/continuation-format.md +255 -0
- package/mindsystem/references/debugging/debugging-mindset.md +11 -0
- package/mindsystem/references/debugging/hypothesis-testing.md +11 -0
- package/mindsystem/references/debugging/investigation-techniques.md +11 -0
- package/mindsystem/references/debugging/verification-patterns.md +11 -0
- package/mindsystem/references/debugging/when-to-research.md +11 -0
- package/mindsystem/references/git-integration.md +254 -0
- package/mindsystem/references/goal-backward.md +286 -0
- package/mindsystem/references/mock-patterns.md +294 -0
- package/mindsystem/references/plan-format.md +473 -0
- package/mindsystem/references/principles.md +73 -0
- package/mindsystem/references/questioning.md +140 -0
- package/mindsystem/references/research-pitfalls.md +233 -0
- package/mindsystem/references/scope-estimation.md +256 -0
- package/mindsystem/references/tdd.md +263 -0
- package/mindsystem/references/verification-patterns.md +595 -0
- package/mindsystem/templates/DEBUG.md +159 -0
- package/mindsystem/templates/UAT.md +403 -0
- package/mindsystem/templates/adhoc-summary.md +153 -0
- package/mindsystem/templates/codebase/architecture.md +255 -0
- package/mindsystem/templates/codebase/concerns.md +310 -0
- package/mindsystem/templates/codebase/conventions.md +307 -0
- package/mindsystem/templates/codebase/integrations.md +280 -0
- package/mindsystem/templates/codebase/stack.md +186 -0
- package/mindsystem/templates/codebase/structure.md +285 -0
- package/mindsystem/templates/codebase/testing.md +480 -0
- package/mindsystem/templates/config.json +26 -0
- package/mindsystem/templates/context.md +140 -0
- package/mindsystem/templates/continue-here.md +78 -0
- package/mindsystem/templates/debug-subagent-prompt.md +91 -0
- package/mindsystem/templates/design-iteration.md +208 -0
- package/mindsystem/templates/design.md +417 -0
- package/mindsystem/templates/discovery.md +146 -0
- package/mindsystem/templates/milestone-archive.md +123 -0
- package/mindsystem/templates/milestone-context.md +93 -0
- package/mindsystem/templates/milestone.md +115 -0
- package/mindsystem/templates/phase-prompt.md +574 -0
- package/mindsystem/templates/project.md +184 -0
- package/mindsystem/templates/requirements.md +231 -0
- package/mindsystem/templates/research-project/ARCHITECTURE.md +204 -0
- package/mindsystem/templates/research-project/FEATURES.md +147 -0
- package/mindsystem/templates/research-project/PITFALLS.md +200 -0
- package/mindsystem/templates/research-project/STACK.md +120 -0
- package/mindsystem/templates/research-project/SUMMARY.md +170 -0
- package/mindsystem/templates/research-subagent-prompt.md +92 -0
- package/mindsystem/templates/research.md +529 -0
- package/mindsystem/templates/roadmap.md +214 -0
- package/mindsystem/templates/state.md +224 -0
- package/mindsystem/templates/summary.md +269 -0
- package/mindsystem/templates/user-setup.md +323 -0
- package/mindsystem/templates/verification-report.md +322 -0
- package/mindsystem/workflows/complete-milestone.md +759 -0
- package/mindsystem/workflows/create-milestone.md +203 -0
- package/mindsystem/workflows/debug.md +14 -0
- package/mindsystem/workflows/define-requirements.md +330 -0
- package/mindsystem/workflows/diagnose-issues.md +241 -0
- package/mindsystem/workflows/discovery-phase.md +293 -0
- package/mindsystem/workflows/discuss-milestone.md +310 -0
- package/mindsystem/workflows/discuss-phase.md +237 -0
- package/mindsystem/workflows/do-work.md +359 -0
- package/mindsystem/workflows/execute-phase.md +644 -0
- package/mindsystem/workflows/execute-plan.md +1828 -0
- package/mindsystem/workflows/generate-mocks.md +187 -0
- package/mindsystem/workflows/list-phase-assumptions.md +178 -0
- package/mindsystem/workflows/map-codebase.md +289 -0
- package/mindsystem/workflows/plan-phase.md +876 -0
- package/mindsystem/workflows/research-phase.md +17 -0
- package/mindsystem/workflows/research-project.md +23 -0
- package/mindsystem/workflows/resume-project.md +311 -0
- package/mindsystem/workflows/transition.md +564 -0
- package/mindsystem/workflows/verify-phase.md +629 -0
- package/mindsystem/workflows/verify-work.md +823 -0
- package/package.json +32 -0
- package/scripts/generate-phase-patch.sh +169 -0
- package/scripts/ms-lookup/README.md +112 -0
- package/scripts/ms-lookup/ms_lookup/__init__.py +3 -0
- package/scripts/ms-lookup/ms_lookup/__main__.py +6 -0
- package/scripts/ms-lookup/ms_lookup/backends/__init__.py +6 -0
- package/scripts/ms-lookup/ms_lookup/backends/context7.py +219 -0
- package/scripts/ms-lookup/ms_lookup/backends/perplexity.py +145 -0
- package/scripts/ms-lookup/ms_lookup/cache.py +48 -0
- package/scripts/ms-lookup/ms_lookup/cli.py +219 -0
- package/scripts/ms-lookup/ms_lookup/config.py +23 -0
- package/scripts/ms-lookup/ms_lookup/errors.py +24 -0
- package/scripts/ms-lookup/ms_lookup/output.py +49 -0
- package/scripts/ms-lookup/ms_lookup/tokens.py +56 -0
- package/scripts/ms-lookup/pyproject.toml +17 -0
- package/scripts/ms-lookup/uv.lock +207 -0
- package/scripts/ms-lookup-wrapper.sh +21 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ms:progress
|
|
3
|
+
description: Check project progress, show context, and route to next action (execute or plan)
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Bash
|
|
7
|
+
- Grep
|
|
8
|
+
- Glob
|
|
9
|
+
- SlashCommand
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<objective>
|
|
13
|
+
Check project progress, summarize recent work and what's ahead, then intelligently route to the next action - either executing an existing plan or creating the next one.
|
|
14
|
+
|
|
15
|
+
Provides situational awareness before continuing work.
|
|
16
|
+
</objective>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
<process>
|
|
20
|
+
|
|
21
|
+
<step name="verify">
|
|
22
|
+
**Verify planning structure exists:**
|
|
23
|
+
|
|
24
|
+
If no `.planning/` directory:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
No planning structure found.
|
|
28
|
+
|
|
29
|
+
Run /ms:new-project to start a new project.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Exit.
|
|
33
|
+
|
|
34
|
+
If missing STATE.md: suggest `/ms:new-project`.
|
|
35
|
+
|
|
36
|
+
**If ROADMAP.md missing but PROJECT.md exists:**
|
|
37
|
+
|
|
38
|
+
This means a milestone was completed and archived. Go to **Route F** (between milestones).
|
|
39
|
+
|
|
40
|
+
If missing both ROADMAP.md and PROJECT.md: suggest `/ms:new-project`.
|
|
41
|
+
</step>
|
|
42
|
+
|
|
43
|
+
<step name="load">
|
|
44
|
+
**Load full project context:**
|
|
45
|
+
|
|
46
|
+
- Read `.planning/STATE.md` for living memory (position, decisions, issues)
|
|
47
|
+
- Read `.planning/ROADMAP.md` for phase structure and objectives
|
|
48
|
+
- Read `.planning/PROJECT.md` for current state (What This Is, Core Value, Requirements)
|
|
49
|
+
</step>
|
|
50
|
+
|
|
51
|
+
<step name="recent">
|
|
52
|
+
**Gather recent work context:**
|
|
53
|
+
|
|
54
|
+
- Find the 2-3 most recent SUMMARY.md files
|
|
55
|
+
- Extract from each: what was accomplished, key decisions, any issues logged
|
|
56
|
+
- This shows "what we've been working on"
|
|
57
|
+
</step>
|
|
58
|
+
|
|
59
|
+
<step name="position">
|
|
60
|
+
**Parse current position:**
|
|
61
|
+
|
|
62
|
+
- From STATE.md: current phase, plan number, status
|
|
63
|
+
- Calculate: total plans, completed plans, remaining plans
|
|
64
|
+
- Note any blockers or concerns
|
|
65
|
+
- Check for CONTEXT.md: For phases without PLAN.md files, check if `{phase}-CONTEXT.md` exists in phase directory
|
|
66
|
+
- Check for DESIGN.md: For UI-heavy phases, check if `{phase}-DESIGN.md` exists in phase directory
|
|
67
|
+
- Count pending todos: `ls .planning/todos/pending/*.md 2>/dev/null | wc -l`
|
|
68
|
+
- Check for active debug sessions: `ls .planning/debug/*.md 2>/dev/null | grep -v resolved | wc -l`
|
|
69
|
+
</step>
|
|
70
|
+
|
|
71
|
+
<step name="report">
|
|
72
|
+
**Present rich status report:**
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
# [Project Name]
|
|
76
|
+
|
|
77
|
+
**Progress:** [████████░░] 8/10 plans complete
|
|
78
|
+
|
|
79
|
+
## Recent Work
|
|
80
|
+
- [Phase X, Plan Y]: [what was accomplished - 1 line]
|
|
81
|
+
- [Phase X, Plan Z]: [what was accomplished - 1 line]
|
|
82
|
+
|
|
83
|
+
## Current Position
|
|
84
|
+
Phase [N] of [total]: [phase-name]
|
|
85
|
+
Plan [M] of [phase-total]: [status]
|
|
86
|
+
CONTEXT: [✓ if CONTEXT.md exists | - if not]
|
|
87
|
+
DESIGN: [✓ if DESIGN.md exists | - if not]
|
|
88
|
+
|
|
89
|
+
## Key Decisions Made
|
|
90
|
+
- [decision 1 from STATE.md]
|
|
91
|
+
- [decision 2]
|
|
92
|
+
|
|
93
|
+
## Blockers/Concerns
|
|
94
|
+
- [any blockers or concerns from STATE.md]
|
|
95
|
+
|
|
96
|
+
## Pending Todos
|
|
97
|
+
- [count] pending — /ms:check-todos to review
|
|
98
|
+
|
|
99
|
+
## Active Debug Sessions
|
|
100
|
+
- [count] active — /ms:debug to continue
|
|
101
|
+
(Only show this section if count > 0)
|
|
102
|
+
|
|
103
|
+
## What's Next
|
|
104
|
+
[Next phase/plan objective from ROADMAP]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
</step>
|
|
108
|
+
|
|
109
|
+
<step name="route">
|
|
110
|
+
**Determine next action based on verified counts.**
|
|
111
|
+
|
|
112
|
+
**Step 1: Count plans, summaries, and issues in current phase**
|
|
113
|
+
|
|
114
|
+
List files in the current phase directory:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
ls -1 .planning/phases/[current-phase-dir]/*-PLAN.md 2>/dev/null | wc -l
|
|
118
|
+
ls -1 .planning/phases/[current-phase-dir]/*-SUMMARY.md 2>/dev/null | wc -l
|
|
119
|
+
ls -1 .planning/phases/[current-phase-dir]/*-UAT.md 2>/dev/null | wc -l
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
State: "This phase has {X} plans, {Y} summaries."
|
|
123
|
+
|
|
124
|
+
**Step 1.5: Check for unaddressed UAT gaps**
|
|
125
|
+
|
|
126
|
+
Check for UAT.md files with status "diagnosed" (has gaps needing fixes).
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Check for diagnosed UAT with gaps
|
|
130
|
+
grep -l "status: diagnosed" .planning/phases/[current-phase-dir]/*-UAT.md 2>/dev/null
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Track:
|
|
134
|
+
- `uat_with_gaps`: UAT.md files with status "diagnosed" (gaps need fixing)
|
|
135
|
+
|
|
136
|
+
**Step 2: Route based on counts**
|
|
137
|
+
|
|
138
|
+
| Condition | Meaning | Action |
|
|
139
|
+
|-----------|---------|--------|
|
|
140
|
+
| uat_with_gaps > 0 | UAT gaps need fix plans | Go to **Route E** |
|
|
141
|
+
| summaries < plans | Unexecuted plans exist | Go to **Route A** |
|
|
142
|
+
| summaries = plans AND plans > 0 | Phase complete | Go to Step 3 |
|
|
143
|
+
| plans = 0 | Phase not yet planned | Go to **Route B** |
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
**Route A: Unexecuted plan exists**
|
|
148
|
+
|
|
149
|
+
Find the first PLAN.md without matching SUMMARY.md.
|
|
150
|
+
Read its `<objective>` section.
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## ▶ Next Up
|
|
156
|
+
|
|
157
|
+
**Phase {N}: [Phase Name]** — [objective from ROADMAP.md]
|
|
158
|
+
|
|
159
|
+
`/ms:execute-phase {N}`
|
|
160
|
+
|
|
161
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
**Route B: Phase needs planning**
|
|
169
|
+
|
|
170
|
+
Check if `{phase}-CONTEXT.md` exists in phase directory.
|
|
171
|
+
|
|
172
|
+
**If CONTEXT.md exists:**
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## ▶ Next Up
|
|
178
|
+
|
|
179
|
+
**Phase {N}: {Name}** — {Goal from ROADMAP.md}
|
|
180
|
+
<sub>✓ Context gathered, ready to plan</sub>
|
|
181
|
+
|
|
182
|
+
`/ms:plan-phase {phase-number}`
|
|
183
|
+
|
|
184
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**If CONTEXT.md does NOT exist:**
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## ▶ Next Up
|
|
195
|
+
|
|
196
|
+
**Phase {N}: {Name}** — {Goal from ROADMAP.md}
|
|
197
|
+
|
|
198
|
+
`/ms:plan-phase {phase}`
|
|
199
|
+
|
|
200
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
**Also available:**
|
|
205
|
+
- `/ms:discuss-phase {phase}` — gather context first
|
|
206
|
+
- `/ms:design-phase {phase}` — create UI/UX specifications
|
|
207
|
+
- `/ms:research-phase {phase}` — investigate unknowns
|
|
208
|
+
- `/ms:list-phase-assumptions {phase}` — see Claude's assumptions
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
**Route E: UAT gaps need fix plans**
|
|
216
|
+
|
|
217
|
+
UAT.md exists with gaps (diagnosed issues). User needs to plan fixes.
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## ⚠ UAT Gaps Found
|
|
223
|
+
|
|
224
|
+
**{phase}-UAT.md** has {N} gaps requiring fixes.
|
|
225
|
+
|
|
226
|
+
`/ms:plan-phase {phase} --gaps`
|
|
227
|
+
|
|
228
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
**Also available:**
|
|
233
|
+
- `/ms:verify-work {phase}` — run more UAT testing
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
**Step 3: Check milestone status (only when phase complete)**
|
|
241
|
+
|
|
242
|
+
Read ROADMAP.md and identify:
|
|
243
|
+
1. Current phase number
|
|
244
|
+
2. All phase numbers in the current milestone section
|
|
245
|
+
|
|
246
|
+
Count total phases and identify the highest phase number.
|
|
247
|
+
|
|
248
|
+
State: "Current phase is {X}. Milestone has {N} phases (highest: {Y})."
|
|
249
|
+
|
|
250
|
+
**Route based on milestone status:**
|
|
251
|
+
|
|
252
|
+
| Condition | Meaning | Action |
|
|
253
|
+
|-----------|---------|--------|
|
|
254
|
+
| current phase < highest phase | More phases remain | Go to **Route C** |
|
|
255
|
+
| current phase = highest phase | Milestone complete | Go to **Route D** |
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
**Route C: Phase complete, more phases remain**
|
|
260
|
+
|
|
261
|
+
Read ROADMAP.md to get the next phase's name and goal.
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## ✓ Phase {Z} Complete
|
|
267
|
+
|
|
268
|
+
## ▶ Next Up
|
|
269
|
+
|
|
270
|
+
**Phase {Z+1}: {Name}** — {Goal from ROADMAP.md}
|
|
271
|
+
|
|
272
|
+
`/ms:plan-phase {Z+1}`
|
|
273
|
+
|
|
274
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
**Also available:**
|
|
279
|
+
- `/ms:verify-work {Z}` — user acceptance test before continuing
|
|
280
|
+
- `/ms:discuss-phase {Z+1}` — gather context first
|
|
281
|
+
- `/ms:design-phase {Z+1}` — create UI/UX specifications
|
|
282
|
+
- `/ms:research-phase {Z+1}` — investigate unknowns
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
**Route D: Milestone complete**
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## 🎉 Milestone Complete
|
|
295
|
+
|
|
296
|
+
All {N} phases finished!
|
|
297
|
+
|
|
298
|
+
## ▶ Next Up
|
|
299
|
+
|
|
300
|
+
**Complete Milestone** — archive and prepare for next
|
|
301
|
+
|
|
302
|
+
`/ms:complete-milestone`
|
|
303
|
+
|
|
304
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
**Also available:**
|
|
309
|
+
- `/ms:verify-work` — user acceptance test before completing milestone
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
**Route F: Between milestones (ROADMAP.md missing, PROJECT.md exists)**
|
|
317
|
+
|
|
318
|
+
A milestone was completed and archived. Ready to start the next milestone cycle.
|
|
319
|
+
|
|
320
|
+
Read MILESTONES.md to find the last completed milestone version.
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## ✓ Milestone v{X.Y} Complete
|
|
326
|
+
|
|
327
|
+
Ready to plan the next milestone.
|
|
328
|
+
|
|
329
|
+
## ▶ Next Up
|
|
330
|
+
|
|
331
|
+
**Discuss Next Milestone** — figure out what to build next
|
|
332
|
+
|
|
333
|
+
`/ms:discuss-milestone`
|
|
334
|
+
|
|
335
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
**Next milestone flow:**
|
|
340
|
+
1. `/ms:discuss-milestone` — thinking partner, creates context file
|
|
341
|
+
2. `/ms:new-milestone` — update PROJECT.md with new goals
|
|
342
|
+
3. `/ms:research-project` — (optional) research ecosystem
|
|
343
|
+
4. `/ms:define-requirements` — scope what to build
|
|
344
|
+
5. `/ms:create-roadmap` — plan how to build it
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
</step>
|
|
350
|
+
|
|
351
|
+
<step name="edge_cases">
|
|
352
|
+
**Handle edge cases:**
|
|
353
|
+
|
|
354
|
+
- Phase complete but next phase not planned → offer `/ms:plan-phase [next]`
|
|
355
|
+
- All work complete → offer milestone completion
|
|
356
|
+
- Blockers present → highlight before offering to continue
|
|
357
|
+
- Handoff file exists → mention it, offer `/ms:resume-work`
|
|
358
|
+
</step>
|
|
359
|
+
|
|
360
|
+
</process>
|
|
361
|
+
|
|
362
|
+
<success_criteria>
|
|
363
|
+
|
|
364
|
+
- [ ] Rich context provided (recent work, decisions, issues)
|
|
365
|
+
- [ ] Current position clear with visual progress
|
|
366
|
+
- [ ] What's next clearly explained
|
|
367
|
+
- [ ] Smart routing: /ms:execute-phase if plan exists, /ms:plan-phase if not
|
|
368
|
+
- [ ] User confirms before any action
|
|
369
|
+
- [ ] Seamless handoff to appropriate gsd command
|
|
370
|
+
</success_criteria>
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ms:remove-phase
|
|
3
|
+
description: Remove a future phase from roadmap and renumber subsequent phases
|
|
4
|
+
argument-hint: <phase-number>
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<objective>
|
|
13
|
+
Remove an unstarted future phase from the roadmap and renumber all subsequent phases to maintain a clean, linear sequence.
|
|
14
|
+
|
|
15
|
+
Purpose: Clean removal of work you've decided not to do, without polluting context with cancelled/deferred markers.
|
|
16
|
+
Output: Phase deleted, all subsequent phases renumbered, git commit as historical record.
|
|
17
|
+
</objective>
|
|
18
|
+
|
|
19
|
+
<execution_context>
|
|
20
|
+
@.planning/ROADMAP.md
|
|
21
|
+
@.planning/STATE.md
|
|
22
|
+
</execution_context>
|
|
23
|
+
|
|
24
|
+
<process>
|
|
25
|
+
|
|
26
|
+
<step name="parse_arguments">
|
|
27
|
+
Parse the command arguments:
|
|
28
|
+
- Argument is the phase number to remove (integer or decimal)
|
|
29
|
+
- Example: `/ms:remove-phase 17` → phase = 17
|
|
30
|
+
- Example: `/ms:remove-phase 16.1` → phase = 16.1
|
|
31
|
+
|
|
32
|
+
If no argument provided:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
ERROR: Phase number required
|
|
36
|
+
Usage: /ms:remove-phase <phase-number>
|
|
37
|
+
Example: /ms:remove-phase 17
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Exit.
|
|
41
|
+
</step>
|
|
42
|
+
|
|
43
|
+
<step name="load_state">
|
|
44
|
+
Load project state:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cat .planning/STATE.md 2>/dev/null
|
|
48
|
+
cat .planning/ROADMAP.md 2>/dev/null
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Parse current phase number from STATE.md "Current Position" section.
|
|
52
|
+
</step>
|
|
53
|
+
|
|
54
|
+
<step name="validate_phase_exists">
|
|
55
|
+
Verify the target phase exists in ROADMAP.md:
|
|
56
|
+
|
|
57
|
+
1. Search for `### Phase {target}:` heading
|
|
58
|
+
2. If not found:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
ERROR: Phase {target} not found in roadmap
|
|
62
|
+
Available phases: [list phase numbers]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Exit.
|
|
66
|
+
</step>
|
|
67
|
+
|
|
68
|
+
<step name="validate_future_phase">
|
|
69
|
+
Verify the phase is a future phase (not started):
|
|
70
|
+
|
|
71
|
+
1. Compare target phase to current phase from STATE.md
|
|
72
|
+
2. Target must be > current phase number
|
|
73
|
+
|
|
74
|
+
If target <= current phase:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
ERROR: Cannot remove Phase {target}
|
|
78
|
+
|
|
79
|
+
Only future phases can be removed:
|
|
80
|
+
- Current phase: {current}
|
|
81
|
+
- Phase {target} is current or completed
|
|
82
|
+
|
|
83
|
+
To abandon current work, use /ms:pause-work instead.
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Exit.
|
|
87
|
+
|
|
88
|
+
3. Check for SUMMARY.md files in phase directory:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
ls .planning/phases/{target}-*/*-SUMMARY.md 2>/dev/null
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If any SUMMARY.md files exist:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
ERROR: Phase {target} has completed work
|
|
98
|
+
|
|
99
|
+
Found executed plans:
|
|
100
|
+
- {list of SUMMARY.md files}
|
|
101
|
+
|
|
102
|
+
Cannot remove phases with completed work.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Exit.
|
|
106
|
+
</step>
|
|
107
|
+
|
|
108
|
+
<step name="gather_phase_info">
|
|
109
|
+
Collect information about the phase being removed:
|
|
110
|
+
|
|
111
|
+
1. Extract phase name from ROADMAP.md heading: `### Phase {target}: {Name}`
|
|
112
|
+
2. Find phase directory: `.planning/phases/{target}-{slug}/`
|
|
113
|
+
3. Find all subsequent phases (integer and decimal) that need renumbering
|
|
114
|
+
|
|
115
|
+
**Subsequent phase detection:**
|
|
116
|
+
|
|
117
|
+
For integer phase removal (e.g., 17):
|
|
118
|
+
- Find all phases > 17 (integers: 18, 19, 20...)
|
|
119
|
+
- Find all decimal phases >= 17.0 and < 18.0 (17.1, 17.2...) → these become 16.x
|
|
120
|
+
- Find all decimal phases for subsequent integers (18.1, 19.1...) → renumber with their parent
|
|
121
|
+
|
|
122
|
+
For decimal phase removal (e.g., 17.1):
|
|
123
|
+
- Find all decimal phases > 17.1 and < 18 (17.2, 17.3...) → renumber down
|
|
124
|
+
- Integer phases unchanged
|
|
125
|
+
|
|
126
|
+
List all phases that will be renumbered.
|
|
127
|
+
</step>
|
|
128
|
+
|
|
129
|
+
<step name="confirm_removal">
|
|
130
|
+
Present removal summary and confirm:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
Removing Phase {target}: {Name}
|
|
134
|
+
|
|
135
|
+
This will:
|
|
136
|
+
- Delete: .planning/phases/{target}-{slug}/
|
|
137
|
+
- Renumber {N} subsequent phases:
|
|
138
|
+
- Phase 18 → Phase 17
|
|
139
|
+
- Phase 18.1 → Phase 17.1
|
|
140
|
+
- Phase 19 → Phase 18
|
|
141
|
+
[etc.]
|
|
142
|
+
|
|
143
|
+
Proceed? (y/n)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Wait for confirmation.
|
|
147
|
+
</step>
|
|
148
|
+
|
|
149
|
+
<step name="delete_phase_directory">
|
|
150
|
+
Delete the target phase directory if it exists:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
if [ -d ".planning/phases/{target}-{slug}" ]; then
|
|
154
|
+
rm -rf ".planning/phases/{target}-{slug}"
|
|
155
|
+
echo "Deleted: .planning/phases/{target}-{slug}/"
|
|
156
|
+
fi
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
If directory doesn't exist, note: "No directory to delete (phase not yet created)"
|
|
160
|
+
</step>
|
|
161
|
+
|
|
162
|
+
<step name="renumber_directories">
|
|
163
|
+
Rename all subsequent phase directories:
|
|
164
|
+
|
|
165
|
+
For each phase directory that needs renumbering (in reverse order to avoid conflicts):
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Example: renaming 18-dashboard to 17-dashboard
|
|
169
|
+
mv ".planning/phases/18-dashboard" ".planning/phases/17-dashboard"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Process in descending order (20→19, then 19→18, then 18→17) to avoid overwriting.
|
|
173
|
+
|
|
174
|
+
Also rename decimal phase directories:
|
|
175
|
+
- `17.1-fix-bug` → `16.1-fix-bug` (if removing integer 17)
|
|
176
|
+
- `17.2-hotfix` → `17.1-hotfix` (if removing decimal 17.1)
|
|
177
|
+
</step>
|
|
178
|
+
|
|
179
|
+
<step name="rename_files_in_directories">
|
|
180
|
+
Rename plan files inside renumbered directories:
|
|
181
|
+
|
|
182
|
+
For each renumbered directory, rename files that contain the phase number:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# Inside 17-dashboard (was 18-dashboard):
|
|
186
|
+
mv "18-01-PLAN.md" "17-01-PLAN.md"
|
|
187
|
+
mv "18-02-PLAN.md" "17-02-PLAN.md"
|
|
188
|
+
mv "18-01-SUMMARY.md" "17-01-SUMMARY.md" # if exists
|
|
189
|
+
# etc.
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Also handle CONTEXT.md and DISCOVERY.md (these don't have phase prefixes, so no rename needed).
|
|
193
|
+
</step>
|
|
194
|
+
|
|
195
|
+
<step name="update_roadmap">
|
|
196
|
+
Update ROADMAP.md:
|
|
197
|
+
|
|
198
|
+
1. **Remove the phase section entirely:**
|
|
199
|
+
- Delete from `### Phase {target}:` to the next phase heading (or section end)
|
|
200
|
+
|
|
201
|
+
2. **Remove from phase list:**
|
|
202
|
+
- Delete line `- [ ] **Phase {target}: {Name}**` or similar
|
|
203
|
+
|
|
204
|
+
3. **Remove from Progress table:**
|
|
205
|
+
- Delete the row for Phase {target}
|
|
206
|
+
|
|
207
|
+
4. **Renumber all subsequent phases:**
|
|
208
|
+
- `### Phase 18:` → `### Phase 17:`
|
|
209
|
+
- `- [ ] **Phase 18:` → `- [ ] **Phase 17:`
|
|
210
|
+
- Table rows: `| 18. Dashboard |` → `| 17. Dashboard |`
|
|
211
|
+
- Plan references: `18-01:` → `17-01:`
|
|
212
|
+
|
|
213
|
+
5. **Update dependency references:**
|
|
214
|
+
- `**Depends on:** Phase 18` → `**Depends on:** Phase 17`
|
|
215
|
+
- For the phase that depended on the removed phase:
|
|
216
|
+
- `**Depends on:** Phase 17` (removed) → `**Depends on:** Phase 16`
|
|
217
|
+
|
|
218
|
+
6. **Renumber decimal phases:**
|
|
219
|
+
- `### Phase 17.1:` → `### Phase 16.1:` (if integer 17 removed)
|
|
220
|
+
- Update all references consistently
|
|
221
|
+
|
|
222
|
+
Write updated ROADMAP.md.
|
|
223
|
+
</step>
|
|
224
|
+
|
|
225
|
+
<step name="update_state">
|
|
226
|
+
Update STATE.md:
|
|
227
|
+
|
|
228
|
+
1. **Update total phase count:**
|
|
229
|
+
- `Phase: 16 of 20` → `Phase: 16 of 19`
|
|
230
|
+
|
|
231
|
+
2. **Recalculate progress percentage:**
|
|
232
|
+
- New percentage based on completed plans / new total plans
|
|
233
|
+
|
|
234
|
+
Do NOT add a "Roadmap Evolution" note - the git commit is the record.
|
|
235
|
+
|
|
236
|
+
Write updated STATE.md.
|
|
237
|
+
</step>
|
|
238
|
+
|
|
239
|
+
<step name="update_file_contents">
|
|
240
|
+
Search for and update phase references inside plan files:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Find files that reference the old phase numbers
|
|
244
|
+
grep -r "Phase 18" .planning/phases/17-*/ 2>/dev/null
|
|
245
|
+
grep -r "Phase 19" .planning/phases/18-*/ 2>/dev/null
|
|
246
|
+
# etc.
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Update any internal references to reflect new numbering.
|
|
250
|
+
</step>
|
|
251
|
+
|
|
252
|
+
<step name="commit">
|
|
253
|
+
Stage and commit the removal:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
git add .planning/
|
|
257
|
+
git commit -m "chore: remove phase {target} ({original-phase-name})"
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
The commit message preserves the historical record of what was removed.
|
|
261
|
+
</step>
|
|
262
|
+
|
|
263
|
+
<step name="completion">
|
|
264
|
+
Present completion summary:
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
Phase {target} ({original-name}) removed.
|
|
268
|
+
|
|
269
|
+
Changes:
|
|
270
|
+
- Deleted: .planning/phases/{target}-{slug}/
|
|
271
|
+
- Renumbered: Phases {first-renumbered}-{last-old} → {first-renumbered-1}-{last-new}
|
|
272
|
+
- Updated: ROADMAP.md, STATE.md
|
|
273
|
+
- Committed: chore: remove phase {target} ({original-name})
|
|
274
|
+
|
|
275
|
+
Current roadmap: {total-remaining} phases
|
|
276
|
+
Current position: Phase {current} of {new-total}
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## What's Next
|
|
281
|
+
|
|
282
|
+
Would you like to:
|
|
283
|
+
- `/ms:progress` — see updated roadmap status
|
|
284
|
+
- Continue with current phase
|
|
285
|
+
- Review roadmap
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
```
|
|
289
|
+
</step>
|
|
290
|
+
|
|
291
|
+
</process>
|
|
292
|
+
|
|
293
|
+
<anti_patterns>
|
|
294
|
+
|
|
295
|
+
- Don't remove completed phases (have SUMMARY.md files)
|
|
296
|
+
- Don't remove current or past phases
|
|
297
|
+
- Don't leave gaps in numbering - always renumber
|
|
298
|
+
- Don't add "removed phase" notes to STATE.md - git commit is the record
|
|
299
|
+
- Don't ask about each decimal phase - just renumber them
|
|
300
|
+
- Don't modify completed phase directories
|
|
301
|
+
</anti_patterns>
|
|
302
|
+
|
|
303
|
+
<edge_cases>
|
|
304
|
+
|
|
305
|
+
**Removing a decimal phase (e.g., 17.1):**
|
|
306
|
+
- Only affects other decimals in same series (17.2 → 17.1, 17.3 → 17.2)
|
|
307
|
+
- Integer phases unchanged
|
|
308
|
+
- Simpler operation
|
|
309
|
+
|
|
310
|
+
**No subsequent phases to renumber:**
|
|
311
|
+
- Removing the last phase (e.g., Phase 20 when that's the end)
|
|
312
|
+
- Just delete and update ROADMAP.md, no renumbering needed
|
|
313
|
+
|
|
314
|
+
**Phase directory doesn't exist:**
|
|
315
|
+
- Phase may be in ROADMAP.md but directory not created yet
|
|
316
|
+
- Skip directory deletion, proceed with ROADMAP.md updates
|
|
317
|
+
|
|
318
|
+
**Decimal phases under removed integer:**
|
|
319
|
+
- Removing Phase 17 when 17.1, 17.2 exist
|
|
320
|
+
- 17.1 → 16.1, 17.2 → 16.2
|
|
321
|
+
- They maintain their position in execution order (after current last integer)
|
|
322
|
+
|
|
323
|
+
</edge_cases>
|
|
324
|
+
|
|
325
|
+
<success_criteria>
|
|
326
|
+
Phase removal is complete when:
|
|
327
|
+
|
|
328
|
+
- [ ] Target phase validated as future/unstarted
|
|
329
|
+
- [ ] Phase directory deleted (if existed)
|
|
330
|
+
- [ ] All subsequent phase directories renumbered
|
|
331
|
+
- [ ] Files inside directories renamed ({old}-01-PLAN.md → {new}-01-PLAN.md)
|
|
332
|
+
- [ ] ROADMAP.md updated (section removed, all references renumbered)
|
|
333
|
+
- [ ] STATE.md updated (phase count, progress percentage)
|
|
334
|
+
- [ ] Dependency references updated in subsequent phases
|
|
335
|
+
- [ ] Changes committed with descriptive message
|
|
336
|
+
- [ ] No gaps in phase numbering
|
|
337
|
+
- [ ] User informed of changes
|
|
338
|
+
</success_criteria>
|