@howlil/ez-agents 2.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 +845 -0
- package/README.zh-CN.md +702 -0
- package/agents/ez-codebase-mapper.md +770 -0
- package/agents/ez-debugger.md +1255 -0
- package/agents/ez-executor.md +487 -0
- package/agents/ez-integration-checker.md +443 -0
- package/agents/ez-nyquist-auditor.md +176 -0
- package/agents/ez-phase-researcher.md +553 -0
- package/agents/ez-plan-checker.md +706 -0
- package/agents/ez-planner.md +1307 -0
- package/agents/ez-project-researcher.md +629 -0
- package/agents/ez-research-synthesizer.md +247 -0
- package/agents/ez-roadmapper.md +650 -0
- package/agents/ez-ui-auditor.md +441 -0
- package/agents/ez-ui-checker.md +302 -0
- package/agents/ez-ui-researcher.md +355 -0
- package/agents/ez-verifier.md +579 -0
- package/bin/install.js +2862 -0
- package/bin/update.js +214 -0
- package/commands/ez/add-phase.md +43 -0
- package/commands/ez/add-tests.md +41 -0
- package/commands/ez/add-todo.md +47 -0
- package/commands/ez/audit-milestone.md +36 -0
- package/commands/ez/autonomous.md +41 -0
- package/commands/ez/check-todos.md +45 -0
- package/commands/ez/cleanup.md +18 -0
- package/commands/ez/complete-milestone.md +136 -0
- package/commands/ez/debug.md +168 -0
- package/commands/ez/discuss-phase.md +90 -0
- package/commands/ez/execute-phase.md +41 -0
- package/commands/ez/health.md +22 -0
- package/commands/ez/help.md +22 -0
- package/commands/ez/insert-phase.md +32 -0
- package/commands/ez/join-discord.md +18 -0
- package/commands/ez/list-phase-assumptions.md +46 -0
- package/commands/ez/map-codebase.md +71 -0
- package/commands/ez/new-milestone.md +44 -0
- package/commands/ez/new-project.md +42 -0
- package/commands/ez/pause-work.md +38 -0
- package/commands/ez/plan-milestone-gaps.md +34 -0
- package/commands/ez/plan-phase.md +45 -0
- package/commands/ez/progress.md +24 -0
- package/commands/ez/quick.md +45 -0
- package/commands/ez/reapply-patches.md +124 -0
- package/commands/ez/remove-phase.md +31 -0
- package/commands/ez/research-phase.md +190 -0
- package/commands/ez/resume-work.md +40 -0
- package/commands/ez/set-profile.md +34 -0
- package/commands/ez/settings.md +36 -0
- package/commands/ez/stats.md +18 -0
- package/commands/ez/ui-phase.md +34 -0
- package/commands/ez/ui-review.md +32 -0
- package/commands/ez/update.md +37 -0
- package/commands/ez/validate-phase.md +35 -0
- package/commands/ez/verify-work.md +38 -0
- package/get-shit-done/bin/ez-tools.cjs +598 -0
- package/get-shit-done/bin/lib/assistant-adapter.cjs +205 -0
- package/get-shit-done/bin/lib/audit-exec.cjs +150 -0
- package/get-shit-done/bin/lib/auth.cjs +175 -0
- package/get-shit-done/bin/lib/circuit-breaker.cjs +118 -0
- package/get-shit-done/bin/lib/commands.cjs +666 -0
- package/get-shit-done/bin/lib/config.cjs +183 -0
- package/get-shit-done/bin/lib/core.cjs +495 -0
- package/get-shit-done/bin/lib/file-lock.cjs +236 -0
- package/get-shit-done/bin/lib/frontmatter.cjs +299 -0
- package/get-shit-done/bin/lib/fs-utils.cjs +153 -0
- package/get-shit-done/bin/lib/git-utils.cjs +203 -0
- package/get-shit-done/bin/lib/health-check.cjs +163 -0
- package/get-shit-done/bin/lib/index.cjs +113 -0
- package/get-shit-done/bin/lib/init.cjs +710 -0
- package/get-shit-done/bin/lib/logger.cjs +117 -0
- package/get-shit-done/bin/lib/milestone.cjs +241 -0
- package/get-shit-done/bin/lib/model-provider.cjs +146 -0
- package/get-shit-done/bin/lib/phase.cjs +908 -0
- package/get-shit-done/bin/lib/retry.cjs +119 -0
- package/get-shit-done/bin/lib/roadmap.cjs +305 -0
- package/get-shit-done/bin/lib/safe-exec.cjs +128 -0
- package/get-shit-done/bin/lib/safe-path.cjs +130 -0
- package/get-shit-done/bin/lib/state.cjs +721 -0
- package/get-shit-done/bin/lib/temp-file.cjs +239 -0
- package/get-shit-done/bin/lib/template.cjs +222 -0
- package/get-shit-done/bin/lib/test-file-lock.cjs +112 -0
- package/get-shit-done/bin/lib/test-graceful.cjs +93 -0
- package/get-shit-done/bin/lib/test-logger.cjs +60 -0
- package/get-shit-done/bin/lib/test-safe-exec.cjs +38 -0
- package/get-shit-done/bin/lib/test-safe-path.cjs +33 -0
- package/get-shit-done/bin/lib/test-temp-file.cjs +125 -0
- package/get-shit-done/bin/lib/timeout-exec.cjs +62 -0
- package/get-shit-done/bin/lib/verify.cjs +820 -0
- package/get-shit-done/references/checkpoints.md +776 -0
- package/get-shit-done/references/continuation-format.md +249 -0
- package/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/get-shit-done/references/git-integration.md +248 -0
- package/get-shit-done/references/git-planning-commit.md +38 -0
- package/get-shit-done/references/model-profile-resolution.md +34 -0
- package/get-shit-done/references/model-profiles.md +93 -0
- package/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/get-shit-done/references/planning-config.md +200 -0
- package/get-shit-done/references/questioning.md +162 -0
- package/get-shit-done/references/tdd.md +263 -0
- package/get-shit-done/references/ui-brand.md +160 -0
- package/get-shit-done/references/verification-patterns.md +612 -0
- package/get-shit-done/templates/DEBUG.md +164 -0
- package/get-shit-done/templates/UAT.md +247 -0
- package/get-shit-done/templates/UI-SPEC.md +100 -0
- package/get-shit-done/templates/VALIDATION.md +76 -0
- package/get-shit-done/templates/codebase/architecture.md +255 -0
- package/get-shit-done/templates/codebase/concerns.md +310 -0
- package/get-shit-done/templates/codebase/conventions.md +307 -0
- package/get-shit-done/templates/codebase/integrations.md +280 -0
- package/get-shit-done/templates/codebase/stack.md +186 -0
- package/get-shit-done/templates/codebase/structure.md +285 -0
- package/get-shit-done/templates/codebase/testing.md +480 -0
- package/get-shit-done/templates/config.json +37 -0
- package/get-shit-done/templates/context.md +352 -0
- package/get-shit-done/templates/continue-here.md +78 -0
- package/get-shit-done/templates/copilot-instructions.md +7 -0
- package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
- package/get-shit-done/templates/discovery.md +146 -0
- package/get-shit-done/templates/milestone-archive.md +123 -0
- package/get-shit-done/templates/milestone.md +115 -0
- package/get-shit-done/templates/phase-prompt.md +610 -0
- package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
- package/get-shit-done/templates/project.md +184 -0
- package/get-shit-done/templates/requirements.md +231 -0
- package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
- package/get-shit-done/templates/research-project/FEATURES.md +147 -0
- package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
- package/get-shit-done/templates/research-project/STACK.md +120 -0
- package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
- package/get-shit-done/templates/research.md +552 -0
- package/get-shit-done/templates/retrospective.md +54 -0
- package/get-shit-done/templates/roadmap.md +202 -0
- package/get-shit-done/templates/state.md +176 -0
- package/get-shit-done/templates/summary-complex.md +59 -0
- package/get-shit-done/templates/summary-minimal.md +41 -0
- package/get-shit-done/templates/summary-standard.md +48 -0
- package/get-shit-done/templates/summary.md +248 -0
- package/get-shit-done/templates/user-setup.md +311 -0
- package/get-shit-done/templates/verification-report.md +322 -0
- package/get-shit-done/workflows/add-phase.md +112 -0
- package/get-shit-done/workflows/add-tests.md +351 -0
- package/get-shit-done/workflows/add-todo.md +158 -0
- package/get-shit-done/workflows/audit-milestone.md +332 -0
- package/get-shit-done/workflows/autonomous.md +743 -0
- package/get-shit-done/workflows/check-todos.md +177 -0
- package/get-shit-done/workflows/cleanup.md +152 -0
- package/get-shit-done/workflows/complete-milestone.md +766 -0
- package/get-shit-done/workflows/diagnose-issues.md +219 -0
- package/get-shit-done/workflows/discovery-phase.md +289 -0
- package/get-shit-done/workflows/discuss-phase.md +762 -0
- package/get-shit-done/workflows/execute-phase.md +468 -0
- package/get-shit-done/workflows/execute-plan.md +483 -0
- package/get-shit-done/workflows/health.md +159 -0
- package/get-shit-done/workflows/help.md +492 -0
- package/get-shit-done/workflows/insert-phase.md +130 -0
- package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
- package/get-shit-done/workflows/map-codebase.md +316 -0
- package/get-shit-done/workflows/new-milestone.md +384 -0
- package/get-shit-done/workflows/new-project.md +1111 -0
- package/get-shit-done/workflows/node-repair.md +92 -0
- package/get-shit-done/workflows/pause-work.md +122 -0
- package/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
- package/get-shit-done/workflows/plan-phase.md +651 -0
- package/get-shit-done/workflows/progress.md +382 -0
- package/get-shit-done/workflows/quick.md +610 -0
- package/get-shit-done/workflows/remove-phase.md +155 -0
- package/get-shit-done/workflows/research-phase.md +74 -0
- package/get-shit-done/workflows/resume-project.md +307 -0
- package/get-shit-done/workflows/set-profile.md +81 -0
- package/get-shit-done/workflows/settings.md +242 -0
- package/get-shit-done/workflows/stats.md +57 -0
- package/get-shit-done/workflows/transition.md +544 -0
- package/get-shit-done/workflows/ui-phase.md +290 -0
- package/get-shit-done/workflows/ui-review.md +157 -0
- package/get-shit-done/workflows/update.md +320 -0
- package/get-shit-done/workflows/validate-phase.md +167 -0
- package/get-shit-done/workflows/verify-phase.md +243 -0
- package/get-shit-done/workflows/verify-work.md +584 -0
- package/package.json +55 -0
- package/scripts/build-hooks.js +43 -0
- package/scripts/run-tests.cjs +29 -0
|
@@ -0,0 +1,743 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
|
|
3
|
+
Drive all remaining milestone phases autonomously. For each incomplete phase: discuss → plan → execute using Skill() flat invocations. Pauses only for explicit user decisions (grey area acceptance, blockers, validation requests). Re-reads ROADMAP.md after each phase to catch dynamically inserted phases.
|
|
4
|
+
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<required_reading>
|
|
8
|
+
|
|
9
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
10
|
+
|
|
11
|
+
</required_reading>
|
|
12
|
+
|
|
13
|
+
<process>
|
|
14
|
+
|
|
15
|
+
<step name="initialize" priority="first">
|
|
16
|
+
|
|
17
|
+
## 1. Initialize
|
|
18
|
+
|
|
19
|
+
Parse `$ARGUMENTS` for `--from N` flag:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
FROM_PHASE=""
|
|
23
|
+
if echo "$ARGUMENTS" | grep -qE '\-\-from\s+[0-9]'; then
|
|
24
|
+
FROM_PHASE=$(echo "$ARGUMENTS" | grep -oE '\-\-from\s+[0-9]+\.?[0-9]*' | awk '{print $2}')
|
|
25
|
+
fi
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Bootstrap via milestone-level init:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
INIT=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" init milestone-op)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Parse JSON for: `milestone_version`, `milestone_name`, `phase_count`, `completed_phases`, `roadmap_exists`, `state_exists`, `commit_docs`.
|
|
35
|
+
|
|
36
|
+
**If `roadmap_exists` is false:** Error — "No ROADMAP.md found. Run `/ez:new-milestone` first."
|
|
37
|
+
**If `state_exists` is false:** Error — "No STATE.md found. Run `/ez:new-milestone` first."
|
|
38
|
+
|
|
39
|
+
Display startup banner:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
43
|
+
GSD ► AUTONOMOUS
|
|
44
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
45
|
+
|
|
46
|
+
Milestone: {milestone_version} — {milestone_name}
|
|
47
|
+
Phases: {phase_count} total, {completed_phases} complete
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If `FROM_PHASE` is set, display: `Starting from phase ${FROM_PHASE}`
|
|
51
|
+
|
|
52
|
+
</step>
|
|
53
|
+
|
|
54
|
+
<step name="discover_phases">
|
|
55
|
+
|
|
56
|
+
## 2. Discover Phases
|
|
57
|
+
|
|
58
|
+
Run phase discovery:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
ROADMAP=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" roadmap analyze)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Parse the JSON `phases` array.
|
|
65
|
+
|
|
66
|
+
**Filter to incomplete phases:** Keep only phases where `disk_status !== "complete"` OR `roadmap_complete === false`.
|
|
67
|
+
|
|
68
|
+
**Apply `--from N` filter:** If `FROM_PHASE` was provided, additionally filter out phases where `number < FROM_PHASE` (use numeric comparison — handles decimal phases like "5.1").
|
|
69
|
+
|
|
70
|
+
**Sort by `number`** in numeric ascending order.
|
|
71
|
+
|
|
72
|
+
**If no incomplete phases remain:**
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
76
|
+
GSD ► AUTONOMOUS ▸ COMPLETE 🎉
|
|
77
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
78
|
+
|
|
79
|
+
All phases complete! Nothing left to do.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Exit cleanly.
|
|
83
|
+
|
|
84
|
+
**Display phase plan:**
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
## Phase Plan
|
|
88
|
+
|
|
89
|
+
| # | Phase | Status |
|
|
90
|
+
|---|-------|--------|
|
|
91
|
+
| 5 | Skill Scaffolding & Phase Discovery | In Progress |
|
|
92
|
+
| 6 | Smart Discuss | Not Started |
|
|
93
|
+
| 7 | Auto-Chain Refinements | Not Started |
|
|
94
|
+
| 8 | Lifecycle Orchestration | Not Started |
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Fetch details for each phase:**
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
DETAIL=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" roadmap get-phase ${PHASE_NUM})
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Extract `phase_name`, `goal`, `success_criteria` from each. Store for use in execute_phase and transition messages.
|
|
104
|
+
|
|
105
|
+
</step>
|
|
106
|
+
|
|
107
|
+
<step name="execute_phase">
|
|
108
|
+
|
|
109
|
+
## 3. Execute Phase
|
|
110
|
+
|
|
111
|
+
For the current phase, display the progress banner:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
115
|
+
GSD ► AUTONOMOUS ▸ Phase {N}/{T}: {Name} [████░░░░] {P}%
|
|
116
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Where N = current phase number (from the ROADMAP, e.g., 6), T = total milestone phases (from `phase_count` parsed in initialize step, e.g., 8), P = percentage of all milestone phases completed so far. Calculate P as: (number of phases with `disk_status` "complete" from the latest `roadmap analyze` / T × 100). Use █ for filled and ░ for empty segments in the progress bar (8 characters wide).
|
|
120
|
+
|
|
121
|
+
**3a. Smart Discuss**
|
|
122
|
+
|
|
123
|
+
Check if CONTEXT.md already exists for this phase:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
PHASE_STATE=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" init phase-op ${PHASE_NUM})
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Parse `has_context` from JSON.
|
|
130
|
+
|
|
131
|
+
**If has_context is true:** Skip discuss — context already gathered. Display:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
Phase ${PHASE_NUM}: Context exists — skipping discuss.
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Proceed to 3b.
|
|
138
|
+
|
|
139
|
+
**If has_context is false:** Execute the smart_discuss step for this phase.
|
|
140
|
+
|
|
141
|
+
After smart_discuss completes, verify context was written:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
PHASE_STATE=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" init phase-op ${PHASE_NUM})
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Check `has_context`. If false → go to handle_blocker: "Smart discuss for phase ${PHASE_NUM} did not produce CONTEXT.md."
|
|
148
|
+
|
|
149
|
+
**3b. Plan**
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
Skill(skill="gsd:plan-phase", args="${PHASE_NUM}")
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Verify plan produced output — re-run `init phase-op` and check `has_plans`. If false → go to handle_blocker: "Plan phase ${PHASE_NUM} did not produce any plans."
|
|
156
|
+
|
|
157
|
+
**3c. Execute**
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
Skill(skill="gsd:execute-phase", args="${PHASE_NUM} --no-transition")
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**3d. Post-Execution Routing**
|
|
164
|
+
|
|
165
|
+
After execute-phase returns, read the verification result:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
VERIFY_STATUS=$(grep "^status:" "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null | head -1 | cut -d: -f2 | tr -d ' ')
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Where `PHASE_DIR` comes from the `init phase-op` call already made in step 3a. If the variable is not in scope, re-fetch:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
PHASE_STATE=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" init phase-op ${PHASE_NUM})
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Parse `phase_dir` from the JSON.
|
|
178
|
+
|
|
179
|
+
**If VERIFY_STATUS is empty** (no VERIFICATION.md or no status field):
|
|
180
|
+
|
|
181
|
+
Go to handle_blocker: "Execute phase ${PHASE_NUM} did not produce verification results."
|
|
182
|
+
|
|
183
|
+
**If `passed`:**
|
|
184
|
+
|
|
185
|
+
Display:
|
|
186
|
+
```
|
|
187
|
+
Phase ${PHASE_NUM} ✅ ${PHASE_NAME} — Verification passed
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Proceed to iterate step.
|
|
191
|
+
|
|
192
|
+
**If `human_needed`:**
|
|
193
|
+
|
|
194
|
+
Read the human_verification section from VERIFICATION.md to get the count and items requiring manual testing.
|
|
195
|
+
|
|
196
|
+
Display the items, then ask user via AskUserQuestion:
|
|
197
|
+
- **question:** "Phase ${PHASE_NUM} has items needing manual verification. Validate now or continue to next phase?"
|
|
198
|
+
- **options:** "Validate now" / "Continue without validation"
|
|
199
|
+
|
|
200
|
+
On **"Validate now"**: Present the specific items from VERIFICATION.md's human_verification section. After user reviews, ask:
|
|
201
|
+
- **question:** "Validation result?"
|
|
202
|
+
- **options:** "All good — continue" / "Found issues"
|
|
203
|
+
|
|
204
|
+
On "All good — continue": Display `Phase ${PHASE_NUM} ✅ Human validation passed` and proceed to iterate step.
|
|
205
|
+
|
|
206
|
+
On "Found issues": Go to handle_blocker with the user's reported issues as the description.
|
|
207
|
+
|
|
208
|
+
On **"Continue without validation"**: Display `Phase ${PHASE_NUM} ⏭ Human validation deferred` and proceed to iterate step.
|
|
209
|
+
|
|
210
|
+
**If `gaps_found`:**
|
|
211
|
+
|
|
212
|
+
Read gap summary from VERIFICATION.md (score and missing items). Display:
|
|
213
|
+
```
|
|
214
|
+
⚠ Phase ${PHASE_NUM}: ${PHASE_NAME} — Gaps Found
|
|
215
|
+
Score: {N}/{M} must-haves verified
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Ask user via AskUserQuestion:
|
|
219
|
+
- **question:** "Gaps found in phase ${PHASE_NUM}. How to proceed?"
|
|
220
|
+
- **options:** "Run gap closure" / "Continue without fixing" / "Stop autonomous mode"
|
|
221
|
+
|
|
222
|
+
On **"Run gap closure"**: Execute gap closure cycle (limit: 1 attempt):
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
Skill(skill="gsd:plan-phase", args="${PHASE_NUM} --gaps")
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Verify gap plans were created — re-run `init phase-op ${PHASE_NUM}` and check `has_plans`. If no new gap plans → go to handle_blocker: "Gap closure planning for phase ${PHASE_NUM} did not produce plans."
|
|
229
|
+
|
|
230
|
+
Re-execute:
|
|
231
|
+
```
|
|
232
|
+
Skill(skill="gsd:execute-phase", args="${PHASE_NUM} --no-transition")
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Re-read verification status:
|
|
236
|
+
```bash
|
|
237
|
+
VERIFY_STATUS=$(grep "^status:" "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null | head -1 | cut -d: -f2 | tr -d ' ')
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
If `passed` or `human_needed`: Route normally (continue or ask user as above).
|
|
241
|
+
|
|
242
|
+
If still `gaps_found` after this retry: Display "Gaps persist after closure attempt." and ask via AskUserQuestion:
|
|
243
|
+
- **question:** "Gap closure did not fully resolve issues. How to proceed?"
|
|
244
|
+
- **options:** "Continue anyway" / "Stop autonomous mode"
|
|
245
|
+
|
|
246
|
+
On "Continue anyway": Proceed to iterate step.
|
|
247
|
+
On "Stop autonomous mode": Go to handle_blocker.
|
|
248
|
+
|
|
249
|
+
This limits gap closure to 1 automatic retry to prevent infinite loops.
|
|
250
|
+
|
|
251
|
+
On **"Continue without fixing"**: Display `Phase ${PHASE_NUM} ⏭ Gaps deferred` and proceed to iterate step.
|
|
252
|
+
|
|
253
|
+
On **"Stop autonomous mode"**: Go to handle_blocker with "User stopped — gaps remain in phase ${PHASE_NUM}".
|
|
254
|
+
|
|
255
|
+
</step>
|
|
256
|
+
|
|
257
|
+
<step name="smart_discuss">
|
|
258
|
+
|
|
259
|
+
## Smart Discuss
|
|
260
|
+
|
|
261
|
+
Run smart discuss for the current phase. Proposes grey area answers in batch tables — the user accepts or overrides per area. Produces identical CONTEXT.md output to regular discuss-phase.
|
|
262
|
+
|
|
263
|
+
> **Note:** Smart discuss is an autonomous-optimized variant of the `gsd:discuss-phase` skill. It produces identical CONTEXT.md output but uses batch table proposals instead of sequential questioning. The original `discuss-phase` skill remains unchanged (per CTRL-03). Future milestones may extract this to a separate skill file.
|
|
264
|
+
|
|
265
|
+
**Inputs:** `PHASE_NUM` from execute_phase. Run init to get phase paths:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
PHASE_STATE=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" init phase-op ${PHASE_NUM})
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Parse from JSON: `phase_dir`, `phase_slug`, `padded_phase`, `phase_name`.
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
### Sub-step 1: Load prior context
|
|
276
|
+
|
|
277
|
+
Read project-level and prior phase context to avoid re-asking decided questions.
|
|
278
|
+
|
|
279
|
+
**Read project files:**
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
cat .planning/PROJECT.md 2>/dev/null
|
|
283
|
+
cat .planning/REQUIREMENTS.md 2>/dev/null
|
|
284
|
+
cat .planning/STATE.md 2>/dev/null
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Extract from these:
|
|
288
|
+
- **PROJECT.md** — Vision, principles, non-negotiables, user preferences
|
|
289
|
+
- **REQUIREMENTS.md** — Acceptance criteria, constraints, must-haves vs nice-to-haves
|
|
290
|
+
- **STATE.md** — Current progress, decisions logged so far
|
|
291
|
+
|
|
292
|
+
**Read all prior CONTEXT.md files:**
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
find .planning/phases -name "*-CONTEXT.md" 2>/dev/null | sort
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
For each CONTEXT.md where phase number < current phase:
|
|
299
|
+
- Read the `<decisions>` section — these are locked preferences
|
|
300
|
+
- Read `<specifics>` — particular references or "I want it like X" moments
|
|
301
|
+
- Note patterns (e.g., "user consistently prefers minimal UI", "user rejected verbose output")
|
|
302
|
+
|
|
303
|
+
**Build internal prior_decisions context** (do not write to file):
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
<prior_decisions>
|
|
307
|
+
## Project-Level
|
|
308
|
+
- [Key principle or constraint from PROJECT.md]
|
|
309
|
+
- [Requirement affecting this phase from REQUIREMENTS.md]
|
|
310
|
+
|
|
311
|
+
## From Prior Phases
|
|
312
|
+
### Phase N: [Name]
|
|
313
|
+
- [Decision relevant to current phase]
|
|
314
|
+
- [Preference that establishes a pattern]
|
|
315
|
+
</prior_decisions>
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
If no prior context exists, continue without — expected for early phases.
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
### Sub-step 2: Scout Codebase
|
|
323
|
+
|
|
324
|
+
Lightweight codebase scan to inform grey area identification and proposals. Keep under ~5% context.
|
|
325
|
+
|
|
326
|
+
**Check for existing codebase maps:**
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
ls .planning/codebase/*.md 2>/dev/null
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
**If codebase maps exist:** Read the most relevant ones (CONVENTIONS.md, STRUCTURE.md, STACK.md based on phase type). Extract reusable components, established patterns, integration points. Skip to building context below.
|
|
333
|
+
|
|
334
|
+
**If no codebase maps, do targeted grep:**
|
|
335
|
+
|
|
336
|
+
Extract key terms from the phase goal. Search for related files:
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
grep -rl "{term1}\|{term2}" src/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null | head -10
|
|
340
|
+
ls src/components/ src/hooks/ src/lib/ src/utils/ 2>/dev/null
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Read the 3-5 most relevant files to understand existing patterns.
|
|
344
|
+
|
|
345
|
+
**Build internal codebase_context** (do not write to file):
|
|
346
|
+
- **Reusable assets** — existing components, hooks, utilities usable in this phase
|
|
347
|
+
- **Established patterns** — how the codebase does state management, styling, data fetching
|
|
348
|
+
- **Integration points** — where new code connects (routes, nav, providers)
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
### Sub-step 3: Analyze Phase and Generate Proposals
|
|
353
|
+
|
|
354
|
+
**Get phase details:**
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
DETAIL=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" roadmap get-phase ${PHASE_NUM})
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Extract `goal`, `requirements`, `success_criteria` from the JSON response.
|
|
361
|
+
|
|
362
|
+
**Infrastructure detection — check FIRST before generating grey areas:**
|
|
363
|
+
|
|
364
|
+
A phase is pure infrastructure when ALL of these are true:
|
|
365
|
+
1. Goal keywords match: "scaffolding", "plumbing", "setup", "configuration", "migration", "refactor", "rename", "restructure", "upgrade", "infrastructure"
|
|
366
|
+
2. AND success criteria are all technical: "file exists", "test passes", "config valid", "command runs"
|
|
367
|
+
3. AND no user-facing behavior is described (no "users can", "displays", "shows", "presents")
|
|
368
|
+
|
|
369
|
+
**If infrastructure-only:** Skip Sub-step 4. Jump directly to Sub-step 5 with minimal CONTEXT.md. Display:
|
|
370
|
+
|
|
371
|
+
```
|
|
372
|
+
Phase ${PHASE_NUM}: Infrastructure phase — skipping discuss, writing minimal context.
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
Use these defaults for the CONTEXT.md:
|
|
376
|
+
- `<domain>`: Phase boundary from ROADMAP goal
|
|
377
|
+
- `<decisions>`: Single "### Claude's Discretion" subsection — "All implementation choices are at Claude's discretion — pure infrastructure phase"
|
|
378
|
+
- `<code_context>`: Whatever the codebase scout found
|
|
379
|
+
- `<specifics>`: "No specific requirements — infrastructure phase"
|
|
380
|
+
- `<deferred>`: "None"
|
|
381
|
+
|
|
382
|
+
**If NOT infrastructure — generate grey area proposals:**
|
|
383
|
+
|
|
384
|
+
Determine domain type from the phase goal:
|
|
385
|
+
- Something users **SEE** → visual: layout, interactions, states, density
|
|
386
|
+
- Something users **CALL** → interface: contracts, responses, errors, auth
|
|
387
|
+
- Something users **RUN** → execution: invocation, output, behavior modes, flags
|
|
388
|
+
- Something users **READ** → content: structure, tone, depth, flow
|
|
389
|
+
- Something being **ORGANIZED** → organization: criteria, grouping, exceptions, naming
|
|
390
|
+
|
|
391
|
+
Check prior_decisions — skip grey areas already decided in prior phases.
|
|
392
|
+
|
|
393
|
+
Generate **3-4 grey areas** with **~4 questions each**. For each question:
|
|
394
|
+
- **Pre-select a recommended answer** based on: prior decisions (consistency), codebase patterns (reuse), domain conventions (standard approaches), ROADMAP success criteria
|
|
395
|
+
- Generate **1-2 alternatives** per question
|
|
396
|
+
- **Annotate** with prior decision context ("You decided X in Phase N") and code context ("Component Y exists with Z variants") where relevant
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
### Sub-step 4: Present Proposals Per Area
|
|
401
|
+
|
|
402
|
+
Present grey areas **one at a time**. For each area (M of N):
|
|
403
|
+
|
|
404
|
+
Display a table:
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
### Grey Area {M}/{N}: {Area Name}
|
|
408
|
+
|
|
409
|
+
| # | Question | ✅ Recommended | Alternative(s) |
|
|
410
|
+
|---|----------|---------------|-----------------|
|
|
411
|
+
| 1 | {question} | {answer} — {rationale} | {alt1}; {alt2} |
|
|
412
|
+
| 2 | {question} | {answer} — {rationale} | {alt1} |
|
|
413
|
+
| 3 | {question} | {answer} — {rationale} | {alt1}; {alt2} |
|
|
414
|
+
| 4 | {question} | {answer} — {rationale} | {alt1} |
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
Then prompt the user via **AskUserQuestion**:
|
|
418
|
+
- **header:** "Area {M}/{N}"
|
|
419
|
+
- **question:** "Accept these answers for {Area Name}?"
|
|
420
|
+
- **options:** Build dynamically — always "Accept all" first, then "Change Q1" through "Change QN" for each question (up to 4), then "Discuss deeper" last. Cap at 6 explicit options max (AskUserQuestion adds "Other" automatically).
|
|
421
|
+
|
|
422
|
+
**On "Accept all":** Record all recommended answers for this area. Move to next area.
|
|
423
|
+
|
|
424
|
+
**On "Change QN":** Use AskUserQuestion with the alternatives for that specific question:
|
|
425
|
+
- **header:** "{Area Name}"
|
|
426
|
+
- **question:** "Q{N}: {question text}"
|
|
427
|
+
- **options:** List the 1-2 alternatives plus "You decide" (maps to Claude's Discretion)
|
|
428
|
+
|
|
429
|
+
Record the user's choice. Re-display the updated table with the change reflected. Re-present the full acceptance prompt so the user can make additional changes or accept.
|
|
430
|
+
|
|
431
|
+
**On "Discuss deeper":** Switch to interactive mode for this area only — ask questions one at a time using AskUserQuestion with 2-3 concrete options per question plus "You decide". After 4 questions, prompt:
|
|
432
|
+
- **header:** "{Area Name}"
|
|
433
|
+
- **question:** "More questions about {area name}, or move to next?"
|
|
434
|
+
- **options:** "More questions" / "Next area"
|
|
435
|
+
|
|
436
|
+
If "More questions", ask 4 more. If "Next area", display final summary table of captured answers for this area and move on.
|
|
437
|
+
|
|
438
|
+
**On "Other" (free text):** Interpret as either a specific change request or general feedback. Incorporate into the area's decisions, re-display updated table, re-present acceptance prompt.
|
|
439
|
+
|
|
440
|
+
**Scope creep handling:** If user mentions something outside the phase domain:
|
|
441
|
+
|
|
442
|
+
```
|
|
443
|
+
"{Feature} sounds like a new capability — that belongs in its own phase.
|
|
444
|
+
I'll note it as a deferred idea.
|
|
445
|
+
|
|
446
|
+
Back to {current area}: {return to current question}"
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
Track deferred ideas internally for inclusion in CONTEXT.md.
|
|
450
|
+
|
|
451
|
+
---
|
|
452
|
+
|
|
453
|
+
### Sub-step 5: Write CONTEXT.md
|
|
454
|
+
|
|
455
|
+
After all areas are resolved (or infrastructure skip), write the CONTEXT.md file.
|
|
456
|
+
|
|
457
|
+
**File path:** `${phase_dir}/${padded_phase}-CONTEXT.md`
|
|
458
|
+
|
|
459
|
+
Use **exactly** this structure (identical to discuss-phase output):
|
|
460
|
+
|
|
461
|
+
```markdown
|
|
462
|
+
# Phase {PHASE_NUM}: {Phase Name} - Context
|
|
463
|
+
|
|
464
|
+
**Gathered:** {date}
|
|
465
|
+
**Status:** Ready for planning
|
|
466
|
+
|
|
467
|
+
<domain>
|
|
468
|
+
## Phase Boundary
|
|
469
|
+
|
|
470
|
+
{Domain boundary statement from analysis — what this phase delivers}
|
|
471
|
+
|
|
472
|
+
</domain>
|
|
473
|
+
|
|
474
|
+
<decisions>
|
|
475
|
+
## Implementation Decisions
|
|
476
|
+
|
|
477
|
+
### {Area 1 Name}
|
|
478
|
+
- {Accepted/chosen answer for Q1}
|
|
479
|
+
- {Accepted/chosen answer for Q2}
|
|
480
|
+
- {Accepted/chosen answer for Q3}
|
|
481
|
+
- {Accepted/chosen answer for Q4}
|
|
482
|
+
|
|
483
|
+
### {Area 2 Name}
|
|
484
|
+
- {Accepted/chosen answer for Q1}
|
|
485
|
+
- {Accepted/chosen answer for Q2}
|
|
486
|
+
...
|
|
487
|
+
|
|
488
|
+
### Claude's Discretion
|
|
489
|
+
{Any "You decide" answers collected — note Claude has flexibility here}
|
|
490
|
+
|
|
491
|
+
</decisions>
|
|
492
|
+
|
|
493
|
+
<code_context>
|
|
494
|
+
## Existing Code Insights
|
|
495
|
+
|
|
496
|
+
### Reusable Assets
|
|
497
|
+
- {From codebase scout — components, hooks, utilities}
|
|
498
|
+
|
|
499
|
+
### Established Patterns
|
|
500
|
+
- {From codebase scout — state management, styling, data fetching}
|
|
501
|
+
|
|
502
|
+
### Integration Points
|
|
503
|
+
- {From codebase scout — where new code connects}
|
|
504
|
+
|
|
505
|
+
</code_context>
|
|
506
|
+
|
|
507
|
+
<specifics>
|
|
508
|
+
## Specific Ideas
|
|
509
|
+
|
|
510
|
+
{Any specific references or "I want it like X" from discussion}
|
|
511
|
+
{If none: "No specific requirements — open to standard approaches"}
|
|
512
|
+
|
|
513
|
+
</specifics>
|
|
514
|
+
|
|
515
|
+
<deferred>
|
|
516
|
+
## Deferred Ideas
|
|
517
|
+
|
|
518
|
+
{Ideas captured but out of scope for this phase}
|
|
519
|
+
{If none: "None — discussion stayed within phase scope"}
|
|
520
|
+
|
|
521
|
+
</deferred>
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
Write the file.
|
|
525
|
+
|
|
526
|
+
**Commit:**
|
|
527
|
+
|
|
528
|
+
```bash
|
|
529
|
+
node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" commit "docs(${PADDED_PHASE}): smart discuss context" --files "${phase_dir}/${padded_phase}-CONTEXT.md"
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
Display confirmation:
|
|
533
|
+
|
|
534
|
+
```
|
|
535
|
+
Created: {path}
|
|
536
|
+
Decisions captured: {count} across {area_count} areas
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
</step>
|
|
540
|
+
|
|
541
|
+
<step name="iterate">
|
|
542
|
+
|
|
543
|
+
## 4. Iterate
|
|
544
|
+
|
|
545
|
+
After each phase completes, re-read ROADMAP.md to catch phases inserted mid-execution (decimal phases like 5.1):
|
|
546
|
+
|
|
547
|
+
```bash
|
|
548
|
+
ROADMAP=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" roadmap analyze)
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
Re-filter incomplete phases using the same logic as discover_phases:
|
|
552
|
+
- Keep phases where `disk_status !== "complete"` OR `roadmap_complete === false`
|
|
553
|
+
- Apply `--from N` filter if originally provided
|
|
554
|
+
- Sort by number ascending
|
|
555
|
+
|
|
556
|
+
Read STATE.md fresh:
|
|
557
|
+
|
|
558
|
+
```bash
|
|
559
|
+
cat .planning/STATE.md
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
Check for blockers in the Blockers/Concerns section. If blockers are found, go to handle_blocker with the blocker description.
|
|
563
|
+
|
|
564
|
+
If incomplete phases remain: proceed to next phase, loop back to execute_phase.
|
|
565
|
+
|
|
566
|
+
If all phases complete, proceed to lifecycle step.
|
|
567
|
+
|
|
568
|
+
</step>
|
|
569
|
+
|
|
570
|
+
<step name="lifecycle">
|
|
571
|
+
|
|
572
|
+
## 5. Lifecycle
|
|
573
|
+
|
|
574
|
+
After all phases complete, run the milestone lifecycle sequence: audit → complete → cleanup.
|
|
575
|
+
|
|
576
|
+
Display lifecycle transition banner:
|
|
577
|
+
|
|
578
|
+
```
|
|
579
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
580
|
+
GSD ► AUTONOMOUS ▸ LIFECYCLE
|
|
581
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
582
|
+
|
|
583
|
+
All phases complete → Starting lifecycle: audit → complete → cleanup
|
|
584
|
+
Milestone: {milestone_version} — {milestone_name}
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
**5a. Audit**
|
|
588
|
+
|
|
589
|
+
```
|
|
590
|
+
Skill(skill="gsd:audit-milestone")
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
After audit completes, detect the result:
|
|
594
|
+
|
|
595
|
+
```bash
|
|
596
|
+
AUDIT_FILE=".planning/v${milestone_version}-MILESTONE-AUDIT.md"
|
|
597
|
+
AUDIT_STATUS=$(grep "^status:" "${AUDIT_FILE}" 2>/dev/null | head -1 | cut -d: -f2 | tr -d ' ')
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
**If AUDIT_STATUS is empty** (no audit file or no status field):
|
|
601
|
+
|
|
602
|
+
Go to handle_blocker: "Audit did not produce results — audit file missing or malformed."
|
|
603
|
+
|
|
604
|
+
**If `passed`:**
|
|
605
|
+
|
|
606
|
+
Display:
|
|
607
|
+
```
|
|
608
|
+
Audit ✅ passed — proceeding to complete milestone
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
Proceed to 5b (no user pause — per CTRL-01).
|
|
612
|
+
|
|
613
|
+
**If `gaps_found`:**
|
|
614
|
+
|
|
615
|
+
Read the gaps summary from the audit file. Display:
|
|
616
|
+
```
|
|
617
|
+
⚠ Audit: Gaps Found
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
Ask user via AskUserQuestion:
|
|
621
|
+
- **question:** "Milestone audit found gaps. How to proceed?"
|
|
622
|
+
- **options:** "Continue anyway — accept gaps" / "Stop — fix gaps manually"
|
|
623
|
+
|
|
624
|
+
On **"Continue anyway"**: Display `Audit ⏭ Gaps accepted — proceeding to complete milestone` and proceed to 5b.
|
|
625
|
+
|
|
626
|
+
On **"Stop"**: Go to handle_blocker with "User stopped — audit gaps remain. Run /ez:audit-milestone to review, then /ez:complete-milestone when ready."
|
|
627
|
+
|
|
628
|
+
**If `tech_debt`:**
|
|
629
|
+
|
|
630
|
+
Read the tech debt summary from the audit file. Display:
|
|
631
|
+
```
|
|
632
|
+
⚠ Audit: Tech Debt Identified
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
Show the summary, then ask user via AskUserQuestion:
|
|
636
|
+
- **question:** "Milestone audit found tech debt. How to proceed?"
|
|
637
|
+
- **options:** "Continue with tech debt" / "Stop — address debt first"
|
|
638
|
+
|
|
639
|
+
On **"Continue with tech debt"**: Display `Audit ⏭ Tech debt acknowledged — proceeding to complete milestone` and proceed to 5b.
|
|
640
|
+
|
|
641
|
+
On **"Stop"**: Go to handle_blocker with "User stopped — tech debt to address. Run /ez:audit-milestone to review details."
|
|
642
|
+
|
|
643
|
+
**5b. Complete Milestone**
|
|
644
|
+
|
|
645
|
+
```
|
|
646
|
+
Skill(skill="gsd:complete-milestone", args="${milestone_version}")
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
After complete-milestone returns, verify it produced output:
|
|
650
|
+
|
|
651
|
+
```bash
|
|
652
|
+
ls .planning/milestones/v${milestone_version}-ROADMAP.md 2>/dev/null
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
If the archive file does not exist, go to handle_blocker: "Complete milestone did not produce expected archive files."
|
|
656
|
+
|
|
657
|
+
**5c. Cleanup**
|
|
658
|
+
|
|
659
|
+
```
|
|
660
|
+
Skill(skill="gsd:cleanup")
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
Cleanup shows its own dry-run and asks user for approval internally — this is an acceptable pause per CTRL-01 since it's an explicit decision about file deletion.
|
|
664
|
+
|
|
665
|
+
**5d. Final Completion**
|
|
666
|
+
|
|
667
|
+
Display final completion banner:
|
|
668
|
+
|
|
669
|
+
```
|
|
670
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
671
|
+
GSD ► AUTONOMOUS ▸ COMPLETE 🎉
|
|
672
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
673
|
+
|
|
674
|
+
Milestone: {milestone_version} — {milestone_name}
|
|
675
|
+
Status: Complete ✅
|
|
676
|
+
Lifecycle: audit ✅ → complete ✅ → cleanup ✅
|
|
677
|
+
|
|
678
|
+
Ship it! 🚀
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
</step>
|
|
682
|
+
|
|
683
|
+
<step name="handle_blocker">
|
|
684
|
+
|
|
685
|
+
## 6. Handle Blocker
|
|
686
|
+
|
|
687
|
+
When any phase operation fails or a blocker is detected, present 3 options via AskUserQuestion:
|
|
688
|
+
|
|
689
|
+
**Prompt:** "Phase {N} ({Name}) encountered an issue: {description}"
|
|
690
|
+
|
|
691
|
+
**Options:**
|
|
692
|
+
1. **"Fix and retry"** — Re-run the failed step (discuss, plan, or execute) for this phase
|
|
693
|
+
2. **"Skip this phase"** — Mark phase as skipped, continue to the next incomplete phase
|
|
694
|
+
3. **"Stop autonomous mode"** — Display summary of progress so far and exit cleanly
|
|
695
|
+
|
|
696
|
+
**On "Fix and retry":** Loop back to the failed step within execute_phase. If the same step fails again after retry, re-present these options.
|
|
697
|
+
|
|
698
|
+
**On "Skip this phase":** Log `Phase {N} ⏭ {Name} — Skipped by user` and proceed to iterate.
|
|
699
|
+
|
|
700
|
+
**On "Stop autonomous mode":** Display progress summary:
|
|
701
|
+
|
|
702
|
+
```
|
|
703
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
704
|
+
GSD ► AUTONOMOUS ▸ STOPPED
|
|
705
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
706
|
+
|
|
707
|
+
Completed: {list of completed phases}
|
|
708
|
+
Skipped: {list of skipped phases}
|
|
709
|
+
Remaining: {list of remaining phases}
|
|
710
|
+
|
|
711
|
+
Resume with: /ez:autonomous --from {next_phase}
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
</step>
|
|
715
|
+
|
|
716
|
+
</process>
|
|
717
|
+
|
|
718
|
+
<success_criteria>
|
|
719
|
+
- [ ] All incomplete phases executed in order (smart discuss → plan → execute each)
|
|
720
|
+
- [ ] Smart discuss proposes grey area answers in tables, user accepts or overrides per area
|
|
721
|
+
- [ ] Progress banners displayed between phases
|
|
722
|
+
- [ ] Execute-phase invoked with --no-transition (autonomous manages transitions)
|
|
723
|
+
- [ ] Post-execution verification reads VERIFICATION.md and routes on status
|
|
724
|
+
- [ ] Passed verification → automatic continue to next phase
|
|
725
|
+
- [ ] Human-needed verification → user prompted to validate or skip
|
|
726
|
+
- [ ] Gaps-found → user offered gap closure, continue, or stop
|
|
727
|
+
- [ ] Gap closure limited to 1 retry (prevents infinite loops)
|
|
728
|
+
- [ ] Plan-phase and execute-phase failures route to handle_blocker
|
|
729
|
+
- [ ] ROADMAP.md re-read after each phase (catches inserted phases)
|
|
730
|
+
- [ ] STATE.md checked for blockers before each phase
|
|
731
|
+
- [ ] Blockers handled via user choice (retry / skip / stop)
|
|
732
|
+
- [ ] Final completion or stop summary displayed
|
|
733
|
+
- [ ] After all phases complete, lifecycle step is invoked (not manual suggestion)
|
|
734
|
+
- [ ] Lifecycle transition banner displayed before audit
|
|
735
|
+
- [ ] Audit invoked via Skill(skill="gsd:audit-milestone")
|
|
736
|
+
- [ ] Audit result routing: passed → auto-continue, gaps_found → user decides, tech_debt → user decides
|
|
737
|
+
- [ ] Audit technical failure (no file/no status) routes to handle_blocker
|
|
738
|
+
- [ ] Complete-milestone invoked via Skill() with ${milestone_version} arg
|
|
739
|
+
- [ ] Cleanup invoked via Skill() — internal confirmation is acceptable (CTRL-01)
|
|
740
|
+
- [ ] Final completion banner displayed after lifecycle
|
|
741
|
+
- [ ] Progress bar uses phase number / total milestone phases (not position among incomplete)
|
|
742
|
+
- [ ] Smart discuss documents relationship to discuss-phase with CTRL-03 note
|
|
743
|
+
</success_criteria>
|