get-research-done 1.1.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 +560 -0
- package/agents/grd-architect.md +789 -0
- package/agents/grd-codebase-mapper.md +738 -0
- package/agents/grd-critic.md +1065 -0
- package/agents/grd-debugger.md +1203 -0
- package/agents/grd-evaluator.md +948 -0
- package/agents/grd-executor.md +784 -0
- package/agents/grd-explorer.md +2063 -0
- package/agents/grd-graduator.md +484 -0
- package/agents/grd-integration-checker.md +423 -0
- package/agents/grd-phase-researcher.md +641 -0
- package/agents/grd-plan-checker.md +745 -0
- package/agents/grd-planner.md +1386 -0
- package/agents/grd-project-researcher.md +865 -0
- package/agents/grd-research-synthesizer.md +256 -0
- package/agents/grd-researcher.md +2361 -0
- package/agents/grd-roadmapper.md +605 -0
- package/agents/grd-verifier.md +778 -0
- package/bin/install.js +1294 -0
- package/commands/grd/add-phase.md +207 -0
- package/commands/grd/add-todo.md +193 -0
- package/commands/grd/architect.md +283 -0
- package/commands/grd/audit-milestone.md +277 -0
- package/commands/grd/check-todos.md +228 -0
- package/commands/grd/complete-milestone.md +136 -0
- package/commands/grd/debug.md +169 -0
- package/commands/grd/discuss-phase.md +86 -0
- package/commands/grd/evaluate.md +1095 -0
- package/commands/grd/execute-phase.md +339 -0
- package/commands/grd/explore.md +258 -0
- package/commands/grd/graduate.md +323 -0
- package/commands/grd/help.md +482 -0
- package/commands/grd/insert-phase.md +227 -0
- package/commands/grd/insights.md +231 -0
- package/commands/grd/join-discord.md +18 -0
- package/commands/grd/list-phase-assumptions.md +50 -0
- package/commands/grd/map-codebase.md +71 -0
- package/commands/grd/new-milestone.md +721 -0
- package/commands/grd/new-project.md +1008 -0
- package/commands/grd/pause-work.md +134 -0
- package/commands/grd/plan-milestone-gaps.md +295 -0
- package/commands/grd/plan-phase.md +525 -0
- package/commands/grd/progress.md +364 -0
- package/commands/grd/quick-explore.md +236 -0
- package/commands/grd/quick.md +309 -0
- package/commands/grd/remove-phase.md +349 -0
- package/commands/grd/research-phase.md +200 -0
- package/commands/grd/research.md +681 -0
- package/commands/grd/resume-work.md +40 -0
- package/commands/grd/set-profile.md +106 -0
- package/commands/grd/settings.md +136 -0
- package/commands/grd/update.md +172 -0
- package/commands/grd/verify-work.md +219 -0
- package/get-research-done/config/default.json +15 -0
- package/get-research-done/references/checkpoints.md +1078 -0
- package/get-research-done/references/continuation-format.md +249 -0
- package/get-research-done/references/git-integration.md +254 -0
- package/get-research-done/references/model-profiles.md +73 -0
- package/get-research-done/references/planning-config.md +94 -0
- package/get-research-done/references/questioning.md +141 -0
- package/get-research-done/references/tdd.md +263 -0
- package/get-research-done/references/ui-brand.md +160 -0
- package/get-research-done/references/verification-patterns.md +612 -0
- package/get-research-done/templates/DEBUG.md +159 -0
- package/get-research-done/templates/UAT.md +247 -0
- package/get-research-done/templates/archive-reason.md +195 -0
- package/get-research-done/templates/codebase/architecture.md +255 -0
- package/get-research-done/templates/codebase/concerns.md +310 -0
- package/get-research-done/templates/codebase/conventions.md +307 -0
- package/get-research-done/templates/codebase/integrations.md +280 -0
- package/get-research-done/templates/codebase/stack.md +186 -0
- package/get-research-done/templates/codebase/structure.md +285 -0
- package/get-research-done/templates/codebase/testing.md +480 -0
- package/get-research-done/templates/config.json +35 -0
- package/get-research-done/templates/context.md +283 -0
- package/get-research-done/templates/continue-here.md +78 -0
- package/get-research-done/templates/critic-log.md +288 -0
- package/get-research-done/templates/data-report.md +173 -0
- package/get-research-done/templates/debug-subagent-prompt.md +91 -0
- package/get-research-done/templates/decision-log.md +58 -0
- package/get-research-done/templates/decision.md +138 -0
- package/get-research-done/templates/discovery.md +146 -0
- package/get-research-done/templates/experiment-readme.md +104 -0
- package/get-research-done/templates/graduated-script.md +180 -0
- package/get-research-done/templates/iteration-summary.md +234 -0
- package/get-research-done/templates/milestone-archive.md +123 -0
- package/get-research-done/templates/milestone.md +115 -0
- package/get-research-done/templates/objective.md +271 -0
- package/get-research-done/templates/phase-prompt.md +567 -0
- package/get-research-done/templates/planner-subagent-prompt.md +117 -0
- package/get-research-done/templates/project.md +184 -0
- package/get-research-done/templates/requirements.md +231 -0
- package/get-research-done/templates/research-project/ARCHITECTURE.md +204 -0
- package/get-research-done/templates/research-project/FEATURES.md +147 -0
- package/get-research-done/templates/research-project/PITFALLS.md +200 -0
- package/get-research-done/templates/research-project/STACK.md +120 -0
- package/get-research-done/templates/research-project/SUMMARY.md +170 -0
- package/get-research-done/templates/research.md +529 -0
- package/get-research-done/templates/roadmap.md +202 -0
- package/get-research-done/templates/scorecard.json +113 -0
- package/get-research-done/templates/state.md +287 -0
- package/get-research-done/templates/summary.md +246 -0
- package/get-research-done/templates/user-setup.md +311 -0
- package/get-research-done/templates/verification-report.md +322 -0
- package/get-research-done/workflows/complete-milestone.md +756 -0
- package/get-research-done/workflows/diagnose-issues.md +231 -0
- package/get-research-done/workflows/discovery-phase.md +289 -0
- package/get-research-done/workflows/discuss-phase.md +433 -0
- package/get-research-done/workflows/execute-phase.md +657 -0
- package/get-research-done/workflows/execute-plan.md +1844 -0
- package/get-research-done/workflows/list-phase-assumptions.md +178 -0
- package/get-research-done/workflows/map-codebase.md +322 -0
- package/get-research-done/workflows/resume-project.md +307 -0
- package/get-research-done/workflows/transition.md +556 -0
- package/get-research-done/workflows/verify-phase.md +628 -0
- package/get-research-done/workflows/verify-work.md +596 -0
- package/hooks/dist/grd-check-update.js +61 -0
- package/hooks/dist/grd-statusline.js +84 -0
- package/package.json +47 -0
- package/scripts/audit-help-commands.sh +115 -0
- package/scripts/build-hooks.js +42 -0
- package/scripts/verify-all-commands.sh +246 -0
- package/scripts/verify-architect-warning.sh +35 -0
- package/scripts/verify-insights-mode.sh +40 -0
- package/scripts/verify-quick-mode.sh +20 -0
- package/scripts/verify-revise-data-routing.sh +139 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grd:quick
|
|
3
|
+
description: Execute a quick task with GSD guarantees (atomic commits, state tracking) but skip optional agents
|
|
4
|
+
argument-hint: ""
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- Bash
|
|
12
|
+
- Task
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<objective>
|
|
17
|
+
Execute small, ad-hoc tasks with GSD guarantees (atomic commits, STATE.md tracking) while skipping optional agents (research, plan-checker, verifier).
|
|
18
|
+
|
|
19
|
+
Quick mode is the same system with a shorter path:
|
|
20
|
+
- Spawns grd-planner (quick mode) + grd-executor(s)
|
|
21
|
+
- Skips grd-phase-researcher, grd-plan-checker, grd-verifier
|
|
22
|
+
- Quick tasks live in `.planning/quick/` separate from planned phases
|
|
23
|
+
- Updates STATE.md "Quick Tasks Completed" table (NOT ROADMAP.md)
|
|
24
|
+
|
|
25
|
+
Use when: You know exactly what to do and the task is small enough to not need research or verification.
|
|
26
|
+
</objective>
|
|
27
|
+
|
|
28
|
+
<execution_context>
|
|
29
|
+
Orchestration is inline - no separate workflow file. Quick mode is deliberately simpler than full GSD.
|
|
30
|
+
</execution_context>
|
|
31
|
+
|
|
32
|
+
<context>
|
|
33
|
+
@.planning/STATE.md
|
|
34
|
+
</context>
|
|
35
|
+
|
|
36
|
+
<process>
|
|
37
|
+
**Step 0: Resolve Model Profile**
|
|
38
|
+
|
|
39
|
+
Read model profile for agent spawning:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Default to "balanced" if not set.
|
|
46
|
+
|
|
47
|
+
**Model lookup table:**
|
|
48
|
+
|
|
49
|
+
| Agent | quality | balanced | budget |
|
|
50
|
+
|-------|---------|----------|--------|
|
|
51
|
+
| grd-planner | opus | opus | sonnet |
|
|
52
|
+
| grd-executor | opus | sonnet | sonnet |
|
|
53
|
+
|
|
54
|
+
Store resolved models for use in Task calls below.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
**Step 1: Pre-flight validation**
|
|
59
|
+
|
|
60
|
+
Check that an active GSD project exists:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
if [ ! -f .planning/ROADMAP.md ]; then
|
|
64
|
+
echo "Quick mode requires an active project with ROADMAP.md."
|
|
65
|
+
echo "Run /grd:new-project first."
|
|
66
|
+
exit 1
|
|
67
|
+
fi
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If validation fails, stop immediately with the error message.
|
|
71
|
+
|
|
72
|
+
Quick tasks can run mid-phase - validation only checks ROADMAP.md exists, not phase status.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
**Step 2: Get task description**
|
|
77
|
+
|
|
78
|
+
Prompt user interactively for the task description:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
AskUserQuestion(
|
|
82
|
+
header: "Quick Task",
|
|
83
|
+
question: "What do you want to do?",
|
|
84
|
+
followUp: null
|
|
85
|
+
)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Store response as `$DESCRIPTION`.
|
|
89
|
+
|
|
90
|
+
If empty, re-prompt: "Please provide a task description."
|
|
91
|
+
|
|
92
|
+
Generate slug from description:
|
|
93
|
+
```bash
|
|
94
|
+
slug=$(echo "$DESCRIPTION" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//' | cut -c1-40)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
**Step 3: Calculate next quick task number**
|
|
100
|
+
|
|
101
|
+
Ensure `.planning/quick/` directory exists and find the next sequential number:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Ensure .planning/quick/ exists
|
|
105
|
+
mkdir -p .planning/quick
|
|
106
|
+
|
|
107
|
+
# Find highest existing number and increment
|
|
108
|
+
last=$(ls -1d .planning/quick/[0-9][0-9][0-9]-* 2>/dev/null | sort -r | head -1 | xargs -I{} basename {} | grep -oE '^[0-9]+')
|
|
109
|
+
|
|
110
|
+
if [ -z "$last" ]; then
|
|
111
|
+
next_num="001"
|
|
112
|
+
else
|
|
113
|
+
next_num=$(printf "%03d" $((10#$last + 1)))
|
|
114
|
+
fi
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
**Step 4: Create quick task directory**
|
|
120
|
+
|
|
121
|
+
Create the directory for this quick task:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
QUICK_DIR=".planning/quick/${next_num}-${slug}"
|
|
125
|
+
mkdir -p "$QUICK_DIR"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Report to user:
|
|
129
|
+
```
|
|
130
|
+
Creating quick task ${next_num}: ${DESCRIPTION}
|
|
131
|
+
Directory: ${QUICK_DIR}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Store `$QUICK_DIR` for use in orchestration.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
**Step 5: Spawn planner (quick mode)**
|
|
139
|
+
|
|
140
|
+
Spawn grd-planner with quick mode context:
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
Task(
|
|
144
|
+
prompt="
|
|
145
|
+
<planning_context>
|
|
146
|
+
|
|
147
|
+
**Mode:** quick
|
|
148
|
+
**Directory:** ${QUICK_DIR}
|
|
149
|
+
**Description:** ${DESCRIPTION}
|
|
150
|
+
|
|
151
|
+
**Project State:**
|
|
152
|
+
@.planning/STATE.md
|
|
153
|
+
|
|
154
|
+
</planning_context>
|
|
155
|
+
|
|
156
|
+
<constraints>
|
|
157
|
+
- Create a SINGLE plan with 1-3 focused tasks
|
|
158
|
+
- Quick tasks should be atomic and self-contained
|
|
159
|
+
- No research phase, no checker phase
|
|
160
|
+
- Target ~30% context usage (simple, focused)
|
|
161
|
+
</constraints>
|
|
162
|
+
|
|
163
|
+
<output>
|
|
164
|
+
Write plan to: ${QUICK_DIR}/${next_num}-PLAN.md
|
|
165
|
+
Return: ## PLANNING COMPLETE with plan path
|
|
166
|
+
</output>
|
|
167
|
+
",
|
|
168
|
+
subagent_type="grd-planner",
|
|
169
|
+
model="{planner_model}",
|
|
170
|
+
description="Quick plan: ${DESCRIPTION}"
|
|
171
|
+
)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
After planner returns:
|
|
175
|
+
1. Verify plan exists at `${QUICK_DIR}/${next_num}-PLAN.md`
|
|
176
|
+
2. Extract plan count (typically 1 for quick tasks)
|
|
177
|
+
3. Report: "Plan created: ${QUICK_DIR}/${next_num}-PLAN.md"
|
|
178
|
+
|
|
179
|
+
If plan not found, error: "Planner failed to create ${next_num}-PLAN.md"
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
**Step 6: Spawn executor**
|
|
184
|
+
|
|
185
|
+
Spawn grd-executor with plan reference:
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
Task(
|
|
189
|
+
prompt="
|
|
190
|
+
Execute quick task ${next_num}.
|
|
191
|
+
|
|
192
|
+
Plan: @${QUICK_DIR}/${next_num}-PLAN.md
|
|
193
|
+
Project state: @.planning/STATE.md
|
|
194
|
+
|
|
195
|
+
<constraints>
|
|
196
|
+
- Execute all tasks in the plan
|
|
197
|
+
- Commit each task atomically
|
|
198
|
+
- Create summary at: ${QUICK_DIR}/${next_num}-SUMMARY.md
|
|
199
|
+
- Do NOT update ROADMAP.md (quick tasks are separate from planned phases)
|
|
200
|
+
</constraints>
|
|
201
|
+
",
|
|
202
|
+
subagent_type="grd-executor",
|
|
203
|
+
model="{executor_model}",
|
|
204
|
+
description="Execute: ${DESCRIPTION}"
|
|
205
|
+
)
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
After executor returns:
|
|
209
|
+
1. Verify summary exists at `${QUICK_DIR}/${next_num}-SUMMARY.md`
|
|
210
|
+
2. Extract commit hash from executor output
|
|
211
|
+
3. Report completion status
|
|
212
|
+
|
|
213
|
+
If summary not found, error: "Executor failed to create ${next_num}-SUMMARY.md"
|
|
214
|
+
|
|
215
|
+
Note: For quick tasks producing multiple plans (rare), spawn executors in parallel waves per execute-phase patterns.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
**Step 7: Update STATE.md**
|
|
220
|
+
|
|
221
|
+
Update STATE.md with quick task completion record.
|
|
222
|
+
|
|
223
|
+
**7a. Check if "Quick Tasks Completed" section exists:**
|
|
224
|
+
|
|
225
|
+
Read STATE.md and check for `### Quick Tasks Completed` section.
|
|
226
|
+
|
|
227
|
+
**7b. If section doesn't exist, create it:**
|
|
228
|
+
|
|
229
|
+
Insert after `### Blockers/Concerns` section:
|
|
230
|
+
|
|
231
|
+
```markdown
|
|
232
|
+
### Quick Tasks Completed
|
|
233
|
+
|
|
234
|
+
| # | Description | Date | Commit | Directory |
|
|
235
|
+
|---|-------------|------|--------|-----------|
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**7c. Append new row to table:**
|
|
239
|
+
|
|
240
|
+
```markdown
|
|
241
|
+
| ${next_num} | ${DESCRIPTION} | $(date +%Y-%m-%d) | ${commit_hash} | [${next_num}-${slug}](./quick/${next_num}-${slug}/) |
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**7d. Update "Last activity" line:**
|
|
245
|
+
|
|
246
|
+
Find and update the line:
|
|
247
|
+
```
|
|
248
|
+
Last activity: $(date +%Y-%m-%d) - Completed quick task ${next_num}: ${DESCRIPTION}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Use Edit tool to make these changes atomically
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
**Step 8: Final commit and completion**
|
|
256
|
+
|
|
257
|
+
Stage and commit quick task artifacts:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Stage quick task artifacts
|
|
261
|
+
git add ${QUICK_DIR}/${next_num}-PLAN.md
|
|
262
|
+
git add ${QUICK_DIR}/${next_num}-SUMMARY.md
|
|
263
|
+
git add .planning/STATE.md
|
|
264
|
+
|
|
265
|
+
# Commit with quick task format
|
|
266
|
+
git commit -m "$(cat <<'EOF'
|
|
267
|
+
docs(quick-${next_num}): ${DESCRIPTION}
|
|
268
|
+
|
|
269
|
+
Quick task completed.
|
|
270
|
+
|
|
271
|
+
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
272
|
+
EOF
|
|
273
|
+
)"
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Get final commit hash:
|
|
277
|
+
```bash
|
|
278
|
+
commit_hash=$(git rev-parse --short HEAD)
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Display completion output:
|
|
282
|
+
```
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
GSD > QUICK TASK COMPLETE
|
|
286
|
+
|
|
287
|
+
Quick Task ${next_num}: ${DESCRIPTION}
|
|
288
|
+
|
|
289
|
+
Summary: ${QUICK_DIR}/${next_num}-SUMMARY.md
|
|
290
|
+
Commit: ${commit_hash}
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
Ready for next task: /grd:quick
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
</process>
|
|
298
|
+
|
|
299
|
+
<success_criteria>
|
|
300
|
+
- [ ] ROADMAP.md validation passes
|
|
301
|
+
- [ ] User provides task description
|
|
302
|
+
- [ ] Slug generated (lowercase, hyphens, max 40 chars)
|
|
303
|
+
- [ ] Next number calculated (001, 002, 003...)
|
|
304
|
+
- [ ] Directory created at `.planning/quick/NNN-slug/`
|
|
305
|
+
- [ ] `${next_num}-PLAN.md` created by planner
|
|
306
|
+
- [ ] `${next_num}-SUMMARY.md` created by executor
|
|
307
|
+
- [ ] STATE.md updated with quick task row
|
|
308
|
+
- [ ] Artifacts committed
|
|
309
|
+
</success_criteria>
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grd: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: `/grd:remove-phase 17` → phase = 17
|
|
30
|
+
- Example: `/grd:remove-phase 16.1` → phase = 16.1
|
|
31
|
+
|
|
32
|
+
If no argument provided:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
ERROR: Phase number required
|
|
36
|
+
Usage: /grd:remove-phase <phase-number>
|
|
37
|
+
Example: /grd: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 /grd: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
|
+
**Check planning config:**
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
259
|
+
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
|
|
263
|
+
|
|
264
|
+
**If `COMMIT_PLANNING_DOCS=true` (default):**
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
git add .planning/
|
|
268
|
+
git commit -m "chore: remove phase {target} ({original-phase-name})"
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
The commit message preserves the historical record of what was removed.
|
|
272
|
+
</step>
|
|
273
|
+
|
|
274
|
+
<step name="completion">
|
|
275
|
+
Present completion summary:
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
Phase {target} ({original-name}) removed.
|
|
279
|
+
|
|
280
|
+
Changes:
|
|
281
|
+
- Deleted: .planning/phases/{target}-{slug}/
|
|
282
|
+
- Renumbered: Phases {first-renumbered}-{last-old} → {first-renumbered-1}-{last-new}
|
|
283
|
+
- Updated: ROADMAP.md, STATE.md
|
|
284
|
+
- Committed: chore: remove phase {target} ({original-name})
|
|
285
|
+
|
|
286
|
+
Current roadmap: {total-remaining} phases
|
|
287
|
+
Current position: Phase {current} of {new-total}
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## What's Next
|
|
292
|
+
|
|
293
|
+
Would you like to:
|
|
294
|
+
- `/grd:progress` — see updated roadmap status
|
|
295
|
+
- Continue with current phase
|
|
296
|
+
- Review roadmap
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
```
|
|
300
|
+
</step>
|
|
301
|
+
|
|
302
|
+
</process>
|
|
303
|
+
|
|
304
|
+
<anti_patterns>
|
|
305
|
+
|
|
306
|
+
- Don't remove completed phases (have SUMMARY.md files)
|
|
307
|
+
- Don't remove current or past phases
|
|
308
|
+
- Don't leave gaps in numbering - always renumber
|
|
309
|
+
- Don't add "removed phase" notes to STATE.md - git commit is the record
|
|
310
|
+
- Don't ask about each decimal phase - just renumber them
|
|
311
|
+
- Don't modify completed phase directories
|
|
312
|
+
</anti_patterns>
|
|
313
|
+
|
|
314
|
+
<edge_cases>
|
|
315
|
+
|
|
316
|
+
**Removing a decimal phase (e.g., 17.1):**
|
|
317
|
+
- Only affects other decimals in same series (17.2 → 17.1, 17.3 → 17.2)
|
|
318
|
+
- Integer phases unchanged
|
|
319
|
+
- Simpler operation
|
|
320
|
+
|
|
321
|
+
**No subsequent phases to renumber:**
|
|
322
|
+
- Removing the last phase (e.g., Phase 20 when that's the end)
|
|
323
|
+
- Just delete and update ROADMAP.md, no renumbering needed
|
|
324
|
+
|
|
325
|
+
**Phase directory doesn't exist:**
|
|
326
|
+
- Phase may be in ROADMAP.md but directory not created yet
|
|
327
|
+
- Skip directory deletion, proceed with ROADMAP.md updates
|
|
328
|
+
|
|
329
|
+
**Decimal phases under removed integer:**
|
|
330
|
+
- Removing Phase 17 when 17.1, 17.2 exist
|
|
331
|
+
- 17.1 → 16.1, 17.2 → 16.2
|
|
332
|
+
- They maintain their position in execution order (after current last integer)
|
|
333
|
+
|
|
334
|
+
</edge_cases>
|
|
335
|
+
|
|
336
|
+
<success_criteria>
|
|
337
|
+
Phase removal is complete when:
|
|
338
|
+
|
|
339
|
+
- [ ] Target phase validated as future/unstarted
|
|
340
|
+
- [ ] Phase directory deleted (if existed)
|
|
341
|
+
- [ ] All subsequent phase directories renumbered
|
|
342
|
+
- [ ] Files inside directories renamed ({old}-01-PLAN.md → {new}-01-PLAN.md)
|
|
343
|
+
- [ ] ROADMAP.md updated (section removed, all references renumbered)
|
|
344
|
+
- [ ] STATE.md updated (phase count, progress percentage)
|
|
345
|
+
- [ ] Dependency references updated in subsequent phases
|
|
346
|
+
- [ ] Changes committed with descriptive message
|
|
347
|
+
- [ ] No gaps in phase numbering
|
|
348
|
+
- [ ] User informed of changes
|
|
349
|
+
</success_criteria>
|