gsd-opencode 1.10.2 → 1.20.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/agents/gsd-codebase-mapper.md +29 -3
- package/agents/gsd-debugger.md +19 -21
- package/agents/gsd-executor.md +213 -528
- package/agents/gsd-integration-checker.md +20 -0
- package/agents/gsd-phase-researcher.md +189 -267
- package/agents/gsd-plan-checker.md +278 -279
- package/agents/gsd-planner.md +299 -490
- package/agents/gsd-project-researcher.md +103 -345
- package/agents/gsd-research-synthesizer.md +5 -22
- package/agents/gsd-roadmapper.md +43 -6
- package/agents/gsd-verifier.md +158 -377
- package/{lib → bin/dm/lib}/constants.js +10 -3
- package/{src → bin/dm/src}/commands/install.js +5 -4
- package/{src → bin/dm/src}/commands/uninstall.js +3 -1
- package/{src → bin/dm/src}/services/backup-manager.js +1 -1
- package/{src → bin/dm/src}/services/config.js +1 -1
- package/{src → bin/dm/src}/services/file-ops.js +20 -4
- package/{src → bin/dm/src}/services/health-checker.js +3 -1
- package/{src → bin/dm/src}/services/repair-service.js +3 -1
- package/{src → bin/dm/src}/services/settings.js +1 -1
- package/{src → bin/dm/src}/services/update-service.js +2 -2
- package/bin/gsd-install.js +0 -0
- package/bin/gsd.js +9 -9
- package/commands/gsd/gsd-add-phase.md +43 -0
- package/commands/gsd/gsd-add-todo.md +47 -0
- package/commands/gsd/gsd-audit-milestone.md +36 -0
- package/commands/gsd/gsd-check-todos.md +45 -0
- package/commands/gsd/gsd-cleanup.md +18 -0
- package/commands/gsd/{complete-milestone.md → gsd-complete-milestone.md} +1 -1
- package/commands/gsd/{debug.md → gsd-debug.md} +16 -21
- package/commands/gsd/{discuss-phase.md → gsd-discuss-phase.md} +6 -9
- package/commands/gsd/gsd-execute-phase.md +41 -0
- package/commands/gsd/gsd-health.md +22 -0
- package/commands/gsd/gsd-help.md +22 -0
- package/commands/gsd/gsd-insert-phase.md +32 -0
- package/commands/gsd/gsd-join-discord.md +18 -0
- package/commands/gsd/{list-phase-assumptions.md → gsd-list-phase-assumptions.md} +3 -7
- package/commands/gsd/{map-codebase.md → gsd-map-codebase.md} +3 -3
- package/commands/gsd/gsd-new-milestone.md +44 -0
- package/commands/gsd/gsd-new-project.md +42 -0
- package/commands/gsd/gsd-pause-work.md +38 -0
- package/commands/gsd/gsd-plan-milestone-gaps.md +34 -0
- package/commands/gsd/gsd-plan-phase.md +44 -0
- package/commands/gsd/gsd-progress.md +24 -0
- package/commands/gsd/gsd-quick.md +41 -0
- package/commands/gsd/gsd-reapply-patches.md +119 -0
- package/commands/gsd/gsd-remove-phase.md +31 -0
- package/commands/gsd/{research-phase.md → gsd-research-phase.md} +38 -49
- package/commands/gsd/{resume-work.md → gsd-resume-work.md} +2 -2
- package/commands/gsd/gsd-set-profile.md +34 -0
- package/commands/gsd/gsd-settings.md +36 -0
- package/commands/gsd/gsd-update.md +37 -0
- package/commands/gsd/gsd-verify-work.md +38 -0
- package/get-shit-done/bin/gsd-tools.cjs +553 -0
- package/get-shit-done/bin/gsd-tools.test.cjs +2346 -0
- package/get-shit-done/bin/lib/commands.cjs +556 -0
- package/get-shit-done/bin/lib/config.cjs +162 -0
- package/get-shit-done/bin/lib/core.cjs +377 -0
- package/get-shit-done/bin/lib/frontmatter.cjs +299 -0
- package/get-shit-done/bin/lib/init.cjs +694 -0
- package/get-shit-done/bin/lib/milestone.cjs +215 -0
- package/get-shit-done/bin/lib/phase.cjs +877 -0
- package/get-shit-done/bin/lib/roadmap.cjs +298 -0
- package/get-shit-done/bin/lib/state.cjs +490 -0
- package/get-shit-done/bin/lib/template.cjs +222 -0
- package/get-shit-done/bin/lib/verify.cjs +772 -0
- package/get-shit-done/references/checkpoints.md +62 -364
- package/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/get-shit-done/references/git-integration.md +10 -16
- 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 +54 -66
- package/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/get-shit-done/references/planning-config.md +112 -10
- package/get-shit-done/references/questioning.md +4 -0
- package/get-shit-done/references/ui-brand.md +1 -1
- package/get-shit-done/templates/UAT.md +1 -1
- package/get-shit-done/templates/VALIDATION.md +104 -0
- package/get-shit-done/templates/codebase/structure.md +6 -6
- package/get-shit-done/templates/config.json +37 -0
- package/get-shit-done/templates/context.md +2 -10
- package/get-shit-done/templates/continue-here.md +6 -6
- package/get-shit-done/templates/debug-subagent-prompt.md +2 -2
- package/get-shit-done/templates/discovery.md +6 -6
- package/get-shit-done/templates/milestone-archive.md +3 -3
- package/get-shit-done/templates/phase-prompt.md +9 -7
- package/get-shit-done/templates/planner-subagent-prompt.md +6 -6
- package/get-shit-done/templates/research-project/ARCHITECTURE.md +1 -1
- package/get-shit-done/templates/research.md +29 -6
- package/get-shit-done/templates/roadmap.md +1 -1
- package/get-shit-done/templates/state.md +0 -30
- 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 +16 -37
- package/get-shit-done/templates/user-setup.md +1 -13
- package/get-shit-done/templates/verification-report.md +5 -5
- package/get-shit-done/workflows/add-phase.md +111 -0
- package/{commands/gsd → get-shit-done/workflows}/add-todo.md +24 -60
- package/{commands/gsd → get-shit-done/workflows}/audit-milestone.md +83 -63
- package/{commands/gsd → get-shit-done/workflows}/check-todos.md +21 -73
- package/get-shit-done/workflows/cleanup.md +152 -0
- package/get-shit-done/workflows/complete-milestone.md +251 -312
- package/get-shit-done/workflows/diagnose-issues.md +6 -31
- package/get-shit-done/workflows/discovery-phase.md +11 -11
- package/get-shit-done/workflows/discuss-phase.md +156 -49
- package/get-shit-done/workflows/execute-phase.md +238 -396
- package/get-shit-done/workflows/execute-plan.md +180 -1609
- package/get-shit-done/workflows/health.md +156 -0
- package/{commands/gsd → get-shit-done/workflows}/help.md +33 -35
- package/get-shit-done/workflows/insert-phase.md +129 -0
- package/get-shit-done/workflows/list-phase-assumptions.md +3 -3
- package/get-shit-done/workflows/map-codebase.md +73 -80
- package/get-shit-done/workflows/new-milestone.md +382 -0
- package/{commands/gsd → get-shit-done/workflows}/new-project.md +281 -234
- package/get-shit-done/workflows/oc-set-profile.md +320 -0
- package/{commands/gsd → get-shit-done/workflows}/pause-work.md +31 -43
- package/{commands/gsd → get-shit-done/workflows}/plan-milestone-gaps.md +29 -50
- package/get-shit-done/workflows/plan-phase.md +478 -0
- package/{commands/gsd → get-shit-done/workflows}/progress.md +64 -47
- package/get-shit-done/workflows/quick.md +453 -0
- package/get-shit-done/workflows/remove-phase.md +154 -0
- package/get-shit-done/workflows/research-phase.md +73 -0
- package/get-shit-done/workflows/resume-project.md +17 -26
- package/get-shit-done/workflows/set-profile.md +80 -0
- package/get-shit-done/workflows/settings.md +213 -0
- package/get-shit-done/workflows/transition.md +84 -104
- package/{commands/gsd → get-shit-done/workflows}/update.md +70 -28
- package/get-shit-done/workflows/verify-phase.md +106 -492
- package/get-shit-done/workflows/verify-work.md +26 -53
- package/package.json +7 -4
- package/rules/gsd-oc-work-hard.md +36 -0
- package/skills/gsd-oc-select-model/SKILL.md +348 -0
- package/skills/gsd-oc-select-model/scripts/select-models.cjs +268 -0
- package/agents/gsd-set-model.md +0 -287
- package/agents/gsd-set-profile.md +0 -239
- package/agents/gsd-settings.md +0 -749
- package/bin/install.js +0 -323
- package/commands/gsd/add-phase.md +0 -207
- package/commands/gsd/execute-phase.md +0 -339
- package/commands/gsd/insert-phase.md +0 -227
- package/commands/gsd/new-milestone.md +0 -721
- package/commands/gsd/plan-phase.md +0 -525
- package/commands/gsd/quick.md +0 -309
- package/commands/gsd/remove-phase.md +0 -349
- package/commands/gsd/set-model.md +0 -77
- package/commands/gsd/set-profile.md +0 -46
- package/commands/gsd/settings.md +0 -33
- package/commands/gsd/verify-work.md +0 -219
- package/commands/gsd/whats-new.md +0 -124
- /package/{src → bin/dm/src}/commands/check.js +0 -0
- /package/{src → bin/dm/src}/commands/config.js +0 -0
- /package/{src → bin/dm/src}/commands/list.js +0 -0
- /package/{src → bin/dm/src}/commands/repair.js +0 -0
- /package/{src → bin/dm/src}/commands/update.js +0 -0
- /package/{src → bin/dm/src}/services/manifest-manager.js +0 -0
- /package/{src → bin/dm/src}/services/migration-service.js +0 -0
- /package/{src → bin/dm/src}/services/scope-manager.js +0 -0
- /package/{src → bin/dm/src}/services/structure-detector.js +0 -0
- /package/{src → bin/dm/src}/utils/hash.js +0 -0
- /package/{src → bin/dm/src}/utils/interactive.js +0 -0
- /package/{src → bin/dm/src}/utils/logger.js +0 -0
- /package/{src → bin/dm/src}/utils/npm-registry.js +0 -0
- /package/{src → bin/dm/src}/utils/path-resolver.js +0 -0
|
@@ -1,149 +1,64 @@
|
|
|
1
1
|
<purpose>
|
|
2
|
-
Execute all plans in a phase using wave-based parallel execution. Orchestrator stays lean
|
|
2
|
+
Execute all plans in a phase using wave-based parallel execution. Orchestrator stays lean — delegates plan execution to subagents.
|
|
3
3
|
</purpose>
|
|
4
4
|
|
|
5
5
|
<core_principle>
|
|
6
|
-
|
|
6
|
+
Orchestrator coordinates, not executes. Each subagent loads the full execute-plan context. Orchestrator: discover plans → analyze deps → group waves → spawn agents → handle checkpoints → collect results.
|
|
7
7
|
</core_principle>
|
|
8
8
|
|
|
9
9
|
<required_reading>
|
|
10
10
|
read STATE.md before any operation to load project context.
|
|
11
|
-
read config.json for planning behavior settings.
|
|
12
11
|
</required_reading>
|
|
13
12
|
|
|
14
13
|
<process>
|
|
15
14
|
|
|
16
|
-
<step name="
|
|
17
|
-
|
|
15
|
+
<step name="initialize" priority="first">
|
|
16
|
+
Load all context in one call:
|
|
18
17
|
|
|
19
18
|
```bash
|
|
20
|
-
|
|
19
|
+
INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init execute-phase "${PHASE_ARG}")
|
|
21
20
|
```
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
Parse JSON for: `executor_model`, `verifier_model`, `commit_docs`, `parallelization`, `branching_strategy`, `branch_name`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `plans`, `incomplete_plans`, `plan_count`, `incomplete_count`, `state_exists`, `roadmap_exists`.
|
|
24
23
|
|
|
25
|
-
**
|
|
24
|
+
**If `phase_found` is false:** Error — phase directory not found.
|
|
25
|
+
**If `plan_count` is 0:** Error — no plans found in phase.
|
|
26
|
+
**If `state_exists` is false but `.planning/` exists:** Offer reconstruct or continue.
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|-------|---------|----------|--------|
|
|
29
|
-
| gsd-executor | opus | sonnet | sonnet |
|
|
30
|
-
| gsd-verifier | sonnet | sonnet | haiku |
|
|
31
|
-
| general | — | — | — |
|
|
32
|
-
|
|
33
|
-
Store resolved models for use in Task calls below.
|
|
28
|
+
When `parallelization` is false, plans within a wave execute sequentially.
|
|
34
29
|
</step>
|
|
35
30
|
|
|
36
|
-
<step name="
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
cat .planning/STATE.md 2>/dev/null
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**If file exists:** Parse and internalize:
|
|
44
|
-
- Current position (phase, plan, status)
|
|
45
|
-
- Accumulated decisions (constraints on this execution)
|
|
46
|
-
- Blockers/concerns (things to watch for)
|
|
47
|
-
|
|
48
|
-
**If file missing but .planning/ exists:**
|
|
49
|
-
```
|
|
50
|
-
STATE.md missing but planning artifacts exist.
|
|
51
|
-
Options:
|
|
52
|
-
1. Reconstruct from existing artifacts
|
|
53
|
-
2. Continue without project state (may lose accumulated context)
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**If .planning/ doesn't exist:** Error - project not initialized.
|
|
31
|
+
<step name="handle_branching">
|
|
32
|
+
Check `branching_strategy` from init:
|
|
57
33
|
|
|
58
|
-
**
|
|
34
|
+
**"none":** Skip, continue on current branch.
|
|
59
35
|
|
|
36
|
+
**"phase" or "milestone":** Use pre-computed `branch_name` from init:
|
|
60
37
|
```bash
|
|
61
|
-
|
|
62
|
-
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
63
|
-
# Auto-detect gitignored (overrides config)
|
|
64
|
-
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
|
38
|
+
git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
|
|
65
39
|
```
|
|
66
40
|
|
|
67
|
-
|
|
41
|
+
All subsequent commits go to this branch. User handles merging.
|
|
68
42
|
</step>
|
|
69
43
|
|
|
70
44
|
<step name="validate_phase">
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
# Match both zero-padded (05-*) and unpadded (5-*) folders
|
|
75
|
-
PADDED_PHASE=$(printf "%02d" ${PHASE_ARG} 2>/dev/null || echo "${PHASE_ARG}")
|
|
76
|
-
PHASE_DIR=$(ls -d .planning/phases/${PADDED_PHASE}-* .planning/phases/${PHASE_ARG}-* 2>/dev/null | head -1)
|
|
77
|
-
if [ -z "$PHASE_DIR" ]; then
|
|
78
|
-
echo "ERROR: No phase directory matching '${PHASE_ARG}'"
|
|
79
|
-
exit 1
|
|
80
|
-
fi
|
|
81
|
-
|
|
82
|
-
PLAN_COUNT=$(ls -1 "$PHASE_DIR"/*-PLAN.md 2>/dev/null | wc -l | tr -d ' ')
|
|
83
|
-
if [ "$PLAN_COUNT" -eq 0 ]; then
|
|
84
|
-
echo "ERROR: No plans found in $PHASE_DIR"
|
|
85
|
-
exit 1
|
|
86
|
-
fi
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Report: "Found {N} plans in {phase_dir}"
|
|
90
|
-
</step>
|
|
91
|
-
|
|
92
|
-
<step name="discover_plans">
|
|
93
|
-
List all plans and extract metadata:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
# Get all plans
|
|
97
|
-
ls -1 "$PHASE_DIR"/*-PLAN.md 2>/dev/null | sort
|
|
98
|
-
|
|
99
|
-
# Get completed plans (have SUMMARY.md)
|
|
100
|
-
ls -1 "$PHASE_DIR"/*-SUMMARY.md 2>/dev/null | sort
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
For each plan, read frontmatter to extract:
|
|
104
|
-
- `wave: N` - Execution wave (pre-computed)
|
|
105
|
-
- `autonomous: true/false` - Whether plan has checkpoints
|
|
106
|
-
- `gap_closure: true/false` - Whether plan closes gaps from verification/UAT
|
|
107
|
-
|
|
108
|
-
Build plan inventory:
|
|
109
|
-
- Plan path
|
|
110
|
-
- Plan ID (e.g., "03-01")
|
|
111
|
-
- Wave number
|
|
112
|
-
- Autonomous flag
|
|
113
|
-
- Gap closure flag
|
|
114
|
-
- Completion status (SUMMARY exists = complete)
|
|
45
|
+
From init JSON: `phase_dir`, `plan_count`, `incomplete_count`.
|
|
115
46
|
|
|
116
|
-
|
|
117
|
-
- Skip completed plans (have SUMMARY.md)
|
|
118
|
-
- If `--gaps-only` flag: also skip plans where `gap_closure` is not `true`
|
|
119
|
-
|
|
120
|
-
If all plans filtered out, report "No matching incomplete plans" and exit.
|
|
47
|
+
Report: "Found {plan_count} plans in {phase_dir} ({incomplete_count} incomplete)"
|
|
121
48
|
</step>
|
|
122
49
|
|
|
123
|
-
<step name="
|
|
124
|
-
|
|
50
|
+
<step name="discover_and_group_plans">
|
|
51
|
+
Load plan inventory with wave grouping in one call:
|
|
125
52
|
|
|
126
53
|
```bash
|
|
127
|
-
|
|
128
|
-
for plan in $PHASE_DIR/*-PLAN.md; do
|
|
129
|
-
wave=$(grep "^wave:" "$plan" | cut -d: -f2 | tr -d ' ')
|
|
130
|
-
autonomous=$(grep "^autonomous:" "$plan" | cut -d: -f2 | tr -d ' ')
|
|
131
|
-
echo "$plan:$wave:$autonomous"
|
|
132
|
-
done
|
|
54
|
+
PLAN_INDEX=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs phase-plan-index "${PHASE_NUMBER}")
|
|
133
55
|
```
|
|
134
56
|
|
|
135
|
-
|
|
136
|
-
```
|
|
137
|
-
waves = {
|
|
138
|
-
1: [plan-01, plan-02],
|
|
139
|
-
2: [plan-03, plan-04],
|
|
140
|
-
3: [plan-05]
|
|
141
|
-
}
|
|
142
|
-
```
|
|
57
|
+
Parse JSON for: `phase`, `plans[]` (each with `id`, `wave`, `autonomous`, `objective`, `files_modified`, `task_count`, `has_summary`), `waves` (map of wave number → plan IDs), `incomplete`, `has_checkpoints`.
|
|
143
58
|
|
|
144
|
-
**
|
|
59
|
+
**Filtering:** Skip plans where `has_summary: true`. If `--gaps-only`: also skip non-gap_closure plans. If all filtered: "No matching incomplete plans" → exit.
|
|
145
60
|
|
|
146
|
-
Report
|
|
61
|
+
Report:
|
|
147
62
|
```
|
|
148
63
|
## Execution Plan
|
|
149
64
|
|
|
@@ -151,461 +66,388 @@ Report wave structure with context:
|
|
|
151
66
|
|
|
152
67
|
| Wave | Plans | What it builds |
|
|
153
68
|
|------|-------|----------------|
|
|
154
|
-
| 1 | 01-01, 01-02 | {from plan objectives} |
|
|
155
|
-
| 2 | 01-03 |
|
|
156
|
-
| 3 | 01-04 [checkpoint] | {from plan objectives} |
|
|
157
|
-
|
|
69
|
+
| 1 | 01-01, 01-02 | {from plan objectives, 3-8 words} |
|
|
70
|
+
| 2 | 01-03 | ... |
|
|
158
71
|
```
|
|
159
|
-
|
|
160
|
-
The "What it builds" column comes from skimming plan names/objectives. Keep it brief (3-8 words).
|
|
161
72
|
</step>
|
|
162
73
|
|
|
163
74
|
<step name="execute_waves">
|
|
164
|
-
Execute each wave in sequence.
|
|
75
|
+
Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`, sequential if `false`.
|
|
165
76
|
|
|
166
77
|
**For each wave:**
|
|
167
78
|
|
|
168
79
|
1. **Describe what's being built (BEFORE spawning):**
|
|
169
80
|
|
|
170
|
-
read each plan's `<objective
|
|
81
|
+
read each plan's `<objective>`. Extract what's being built and why.
|
|
171
82
|
|
|
172
|
-
**Output:**
|
|
173
83
|
```
|
|
174
84
|
---
|
|
175
|
-
|
|
176
85
|
## Wave {N}
|
|
177
86
|
|
|
178
87
|
**{Plan ID}: {Plan Name}**
|
|
179
|
-
{2-3 sentences: what this builds,
|
|
180
|
-
|
|
181
|
-
**{Plan ID}: {Plan Name}** (if parallel)
|
|
182
|
-
{same format}
|
|
88
|
+
{2-3 sentences: what this builds, technical approach, why it matters}
|
|
183
89
|
|
|
184
90
|
Spawning {count} agent(s)...
|
|
185
|
-
|
|
186
91
|
---
|
|
187
92
|
```
|
|
188
93
|
|
|
189
|
-
**Examples:**
|
|
190
94
|
- Bad: "Executing terrain generation plan"
|
|
191
95
|
- Good: "Procedural terrain generator using Perlin noise — creates height maps, biome zones, and collision meshes. Required before vehicle physics can interact with ground."
|
|
192
96
|
|
|
193
|
-
2. **
|
|
97
|
+
2. **Spawn executor agents:**
|
|
194
98
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
# read each plan in the wave
|
|
199
|
-
PLAN_CONTENT=$(cat "{plan_path}")
|
|
200
|
-
STATE_CONTENT=$(cat .planning/STATE.md)
|
|
201
|
-
CONFIG_CONTENT=$(cat .planning/config.json 2>/dev/null)
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
Use Task tool with multiple parallel calls. Each agent gets prompt with inlined content:
|
|
99
|
+
Pass paths only — executors read files themselves with their fresh 200k context.
|
|
100
|
+
This keeps orchestrator context lean (~10-15%).
|
|
205
101
|
|
|
206
102
|
```
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
103
|
+
task(
|
|
104
|
+
subagent_type="gsd-executor",
|
|
105
|
+
model="{executor_model}",
|
|
106
|
+
prompt="
|
|
107
|
+
<objective>
|
|
108
|
+
Execute plan {plan_number} of phase {phase_number}-{phase_name}.
|
|
109
|
+
Commit each task atomically. Create SUMMARY.md. Update STATE.md and ROADMAP.md.
|
|
110
|
+
</objective>
|
|
111
|
+
|
|
112
|
+
<execution_context>
|
|
113
|
+
@~/.config/opencode/get-shit-done/workflows/execute-plan.md
|
|
114
|
+
@~/.config/opencode/get-shit-done/templates/summary.md
|
|
115
|
+
@~/.config/opencode/get-shit-done/references/checkpoints.md
|
|
116
|
+
@~/.config/opencode/get-shit-done/references/tdd.md
|
|
117
|
+
</execution_context>
|
|
118
|
+
|
|
119
|
+
<files_to_read>
|
|
120
|
+
read these files at execution start using the read tool:
|
|
121
|
+
- {phase_dir}/{plan_file} (Plan)
|
|
122
|
+
- .planning/STATE.md (State)
|
|
123
|
+
- .planning/config.json (Config, if exists)
|
|
124
|
+
- ./OPENCODE.md (Project instructions, if exists — follow project-specific guidelines and coding conventions)
|
|
125
|
+
- .agents/skills/ (Project skills, if exists — list skills, read SKILL.md for each, follow relevant rules during implementation)
|
|
126
|
+
</files_to_read>
|
|
127
|
+
|
|
128
|
+
<success_criteria>
|
|
129
|
+
- [ ] All tasks executed
|
|
130
|
+
- [ ] Each task committed individually
|
|
131
|
+
- [ ] SUMMARY.md created in plan directory
|
|
132
|
+
- [ ] STATE.md updated with position and decisions
|
|
133
|
+
- [ ] ROADMAP.md updated with plan progress (via `roadmap update-plan-progress`)
|
|
134
|
+
</success_criteria>
|
|
135
|
+
"
|
|
136
|
+
)
|
|
237
137
|
```
|
|
238
138
|
|
|
239
|
-
|
|
139
|
+
3. **Wait for all agents in wave to complete.**
|
|
240
140
|
|
|
241
|
-
|
|
141
|
+
4. **Report completion — spot-check claims first:**
|
|
242
142
|
|
|
243
|
-
|
|
143
|
+
For each SUMMARY.md:
|
|
144
|
+
- Verify first 2 files from `key-files.created` exist on disk
|
|
145
|
+
- Check `git log --oneline --all --grep="{phase}-{plan}"` returns ≥1 commit
|
|
146
|
+
- Check for `## Self-Check: FAILED` marker
|
|
244
147
|
|
|
245
|
-
|
|
246
|
-
- Verify SUMMARY.md exists at expected path
|
|
247
|
-
- read SUMMARY.md to extract what was built
|
|
248
|
-
- Note any issues or deviations
|
|
148
|
+
If ANY spot-check fails: report which plan failed, route to failure handler — ask "Retry plan?" or "Continue with remaining waves?"
|
|
249
149
|
|
|
250
|
-
|
|
150
|
+
If pass:
|
|
251
151
|
```
|
|
252
152
|
---
|
|
253
|
-
|
|
254
153
|
## Wave {N} Complete
|
|
255
154
|
|
|
256
155
|
**{Plan ID}: {Plan Name}**
|
|
257
|
-
{What was built — from SUMMARY.md
|
|
258
|
-
{Notable deviations
|
|
259
|
-
|
|
260
|
-
**{Plan ID}: {Plan Name}** (if parallel)
|
|
261
|
-
{same format}
|
|
262
|
-
|
|
263
|
-
{If more waves: brief note on what this enables for next wave}
|
|
156
|
+
{What was built — from SUMMARY.md}
|
|
157
|
+
{Notable deviations, if any}
|
|
264
158
|
|
|
159
|
+
{If more waves: what this enables for next wave}
|
|
265
160
|
---
|
|
266
161
|
```
|
|
267
162
|
|
|
268
|
-
**Examples:**
|
|
269
163
|
- Bad: "Wave 2 complete. Proceeding to Wave 3."
|
|
270
164
|
- Good: "Terrain system complete — 3 biome types, height-based texturing, physics collision meshes. Vehicle physics (Wave 3) can now reference ground surfaces."
|
|
271
165
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
If any agent in wave fails:
|
|
275
|
-
- Report which plan failed and why
|
|
276
|
-
- Ask user: "Continue with remaining waves?" or "Stop execution?"
|
|
277
|
-
- If continue: proceed to next wave (dependent plans may also fail)
|
|
278
|
-
- If stop: exit with partial completion report
|
|
166
|
+
5. **Handle failures:**
|
|
279
167
|
|
|
280
|
-
|
|
168
|
+
**Known OpenCode bug (classifyHandoffIfNeeded):** If an agent reports "failed" with error containing `classifyHandoffIfNeeded is not defined`, this is a OpenCode runtime bug — not a GSD or agent issue. The error fires in the completion handler AFTER all tool calls finish. In this case: run the same spot-checks as step 4 (SUMMARY.md exists, git commits present, no Self-Check: FAILED). If spot-checks PASS → treat as **successful**. If spot-checks FAIL → treat as real failure below.
|
|
281
169
|
|
|
282
|
-
|
|
170
|
+
For real failures: report which plan failed → ask "Continue?" or "Stop?" → if continue, dependent plans may also fail. If stop, partial completion report.
|
|
283
171
|
|
|
284
|
-
6. **
|
|
172
|
+
6. **Execute checkpoint plans between waves** — see `<checkpoint_handling>`.
|
|
285
173
|
|
|
174
|
+
7. **Proceed to next wave.**
|
|
286
175
|
</step>
|
|
287
176
|
|
|
288
177
|
<step name="checkpoint_handling">
|
|
289
178
|
Plans with `autonomous: false` require user interaction.
|
|
290
179
|
|
|
291
|
-
**
|
|
292
|
-
|
|
293
|
-
**Execution flow for checkpoint plans:**
|
|
294
|
-
|
|
295
|
-
1. **Spawn agent for checkpoint plan:**
|
|
296
|
-
```
|
|
297
|
-
Task(prompt="{subagent-task-prompt}", subagent_type="gsd-executor", model="{executor_model}")
|
|
298
|
-
```
|
|
180
|
+
**Auto-mode checkpoint handling:**
|
|
299
181
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
182
|
+
read auto-advance config:
|
|
183
|
+
```bash
|
|
184
|
+
AUTO_CFG=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs config-get workflow.auto_advance 2>/dev/null || echo "false")
|
|
185
|
+
```
|
|
304
186
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
- What's awaited from user
|
|
187
|
+
When executor returns a checkpoint AND `AUTO_CFG` is `"true"`:
|
|
188
|
+
- **human-verify** → Auto-spawn continuation agent with `{user_response}` = `"approved"`. Log `⚡ Auto-approved checkpoint`.
|
|
189
|
+
- **decision** → Auto-spawn continuation agent with `{user_response}` = first option from checkpoint details. Log `⚡ Auto-selected: [option]`.
|
|
190
|
+
- **human-action** → Present to user (existing behavior below). Auth gates cannot be automated.
|
|
310
191
|
|
|
311
|
-
|
|
192
|
+
**Standard flow (not auto-mode, or human-action type):**
|
|
312
193
|
|
|
313
|
-
|
|
194
|
+
1. Spawn agent for checkpoint plan
|
|
195
|
+
2. Agent runs until checkpoint task or auth gate → returns structured state
|
|
196
|
+
3. Agent return includes: completed tasks table, current task + blocker, checkpoint type/details, what's awaited
|
|
197
|
+
4. **Present to user:**
|
|
314
198
|
```
|
|
315
199
|
## Checkpoint: [Type]
|
|
316
200
|
|
|
317
201
|
**Plan:** 03-03 Dashboard Layout
|
|
318
202
|
**Progress:** 2/3 tasks complete
|
|
319
203
|
|
|
320
|
-
[Checkpoint Details
|
|
321
|
-
|
|
204
|
+
[Checkpoint Details from agent return]
|
|
322
205
|
[Awaiting section from agent return]
|
|
323
206
|
```
|
|
207
|
+
5. User responds: "approved"/"done" | issue description | decision selection
|
|
208
|
+
6. **Spawn continuation agent (NOT resume)** using continuation-prompt.md template:
|
|
209
|
+
- `{completed_tasks_table}`: From checkpoint return
|
|
210
|
+
- `{resume_task_number}` + `{resume_task_name}`: Current task
|
|
211
|
+
- `{user_response}`: What user provided
|
|
212
|
+
- `{resume_instructions}`: Based on checkpoint type
|
|
213
|
+
7. Continuation agent verifies previous commits, continues from resume point
|
|
214
|
+
8. Repeat until plan completes or user stops
|
|
324
215
|
|
|
325
|
-
|
|
326
|
-
- "approved" / "done" → spawn continuation agent
|
|
327
|
-
- Description of issues → spawn continuation agent with feedback
|
|
328
|
-
- Decision selection → spawn continuation agent with choice
|
|
329
|
-
|
|
330
|
-
6. **Spawn continuation agent (NOT resume):**
|
|
331
|
-
|
|
332
|
-
Use the continuation-prompt.md template:
|
|
333
|
-
```
|
|
334
|
-
Task(
|
|
335
|
-
prompt=filled_continuation_template,
|
|
336
|
-
subagent_type="gsd-executor",
|
|
337
|
-
model="{executor_model}"
|
|
338
|
-
)
|
|
339
|
-
```
|
|
216
|
+
**Why fresh agent, not resume:** Resume relies on internal serialization that breaks with parallel tool calls. Fresh agents with explicit state are more reliable.
|
|
340
217
|
|
|
341
|
-
|
|
342
|
-
- `{completed_tasks_table}`: From agent's checkpoint return
|
|
343
|
-
- `{resume_task_number}`: Current task from checkpoint
|
|
344
|
-
- `{resume_task_name}`: Current task name from checkpoint
|
|
345
|
-
- `{user_response}`: What user provided
|
|
346
|
-
- `{resume_instructions}`: Based on checkpoint type (see continuation-prompt.md)
|
|
347
|
-
|
|
348
|
-
7. **Continuation agent executes:**
|
|
349
|
-
- Verifies previous commits exist
|
|
350
|
-
- Continues from resume point
|
|
351
|
-
- May hit another checkpoint (repeat from step 4)
|
|
352
|
-
- Or completes plan
|
|
353
|
-
|
|
354
|
-
8. **Repeat until plan completes or user stops**
|
|
355
|
-
|
|
356
|
-
**Why fresh agent instead of resume:**
|
|
357
|
-
Resume relies on OpenCode's internal serialization which breaks with parallel tool calls.
|
|
358
|
-
Fresh agents with explicit state are more reliable and maintain full context.
|
|
359
|
-
|
|
360
|
-
**Checkpoint in parallel context:**
|
|
361
|
-
If a plan in a parallel wave has a checkpoint:
|
|
362
|
-
- Spawn as normal
|
|
363
|
-
- Agent pauses at checkpoint and returns with structured state
|
|
364
|
-
- Other parallel agents may complete while waiting
|
|
365
|
-
- Present checkpoint to user
|
|
366
|
-
- Spawn continuation agent with user response
|
|
367
|
-
- Wait for all agents to finish before next wave
|
|
218
|
+
**Checkpoints in parallel waves:** Agent pauses and returns while other parallel agents may complete. Present checkpoint, spawn continuation, wait for all before next wave.
|
|
368
219
|
</step>
|
|
369
220
|
|
|
370
221
|
<step name="aggregate_results">
|
|
371
|
-
After all waves
|
|
222
|
+
After all waves:
|
|
372
223
|
|
|
373
224
|
```markdown
|
|
374
225
|
## Phase {X}: {Name} Execution Complete
|
|
375
226
|
|
|
376
|
-
**Waves
|
|
377
|
-
**Plans completed:** {M} of {total}
|
|
378
|
-
|
|
379
|
-
### Wave Summary
|
|
227
|
+
**Waves:** {N} | **Plans:** {M}/{total} complete
|
|
380
228
|
|
|
381
229
|
| Wave | Plans | Status |
|
|
382
230
|
|------|-------|--------|
|
|
383
231
|
| 1 | plan-01, plan-02 | ✓ Complete |
|
|
384
232
|
| CP | plan-03 | ✓ Verified |
|
|
385
233
|
| 2 | plan-04 | ✓ Complete |
|
|
386
|
-
| 3 | plan-05 | ✓ Complete |
|
|
387
234
|
|
|
388
235
|
### Plan Details
|
|
389
|
-
|
|
390
236
|
1. **03-01**: [one-liner from SUMMARY.md]
|
|
391
237
|
2. **03-02**: [one-liner from SUMMARY.md]
|
|
392
|
-
...
|
|
393
238
|
|
|
394
239
|
### Issues Encountered
|
|
395
|
-
[Aggregate from
|
|
240
|
+
[Aggregate from SUMMARYs, or "None"]
|
|
241
|
+
```
|
|
242
|
+
</step>
|
|
243
|
+
|
|
244
|
+
<step name="close_parent_artifacts">
|
|
245
|
+
**For decimal/polish phases only (X.Y pattern):** Close the feedback loop by resolving parent UAT and debug artifacts.
|
|
246
|
+
|
|
247
|
+
**Skip if** phase number has no decimal (e.g., `3`, `04`) — only applies to gap-closure phases like `4.1`, `03.1`.
|
|
248
|
+
|
|
249
|
+
**1. Detect decimal phase and derive parent:**
|
|
250
|
+
```bash
|
|
251
|
+
# Check if phase_number contains a decimal
|
|
252
|
+
if [[ "$PHASE_NUMBER" == *.* ]]; then
|
|
253
|
+
PARENT_PHASE="${PHASE_NUMBER%%.*}"
|
|
254
|
+
fi
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
**2. Find parent UAT file:**
|
|
258
|
+
```bash
|
|
259
|
+
PARENT_INFO=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs find-phase "${PARENT_PHASE}" --raw)
|
|
260
|
+
# Extract directory from PARENT_INFO JSON, then find UAT file in that directory
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**If no parent UAT found:** Skip this step (gap-closure may have been triggered by VERIFICATION.md instead).
|
|
264
|
+
|
|
265
|
+
**3. Update UAT gap statuses:**
|
|
266
|
+
|
|
267
|
+
read the parent UAT file's `## Gaps` section. For each gap entry with `status: failed`:
|
|
268
|
+
- Update to `status: resolved`
|
|
269
|
+
|
|
270
|
+
**4. Update UAT frontmatter:**
|
|
271
|
+
|
|
272
|
+
If all gaps now have `status: resolved`:
|
|
273
|
+
- Update frontmatter `status: diagnosed` → `status: resolved`
|
|
274
|
+
- Update frontmatter `updated:` timestamp
|
|
275
|
+
|
|
276
|
+
**5. Resolve referenced debug sessions:**
|
|
277
|
+
|
|
278
|
+
For each gap that has a `debug_session:` field:
|
|
279
|
+
- read the debug session file
|
|
280
|
+
- Update frontmatter `status:` → `resolved`
|
|
281
|
+
- Update frontmatter `updated:` timestamp
|
|
282
|
+
- Move to resolved directory:
|
|
283
|
+
```bash
|
|
284
|
+
mkdir -p .planning/debug/resolved
|
|
285
|
+
mv .planning/debug/{slug}.md .planning/debug/resolved/
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**6. Commit updated artifacts:**
|
|
289
|
+
```bash
|
|
290
|
+
node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs(phase-${PARENT_PHASE}): resolve UAT gaps and debug sessions after ${PHASE_NUMBER} gap closure" --files .planning/phases/*${PARENT_PHASE}*/*-UAT.md .planning/debug/resolved/*.md
|
|
396
291
|
```
|
|
397
292
|
</step>
|
|
398
293
|
|
|
399
294
|
<step name="verify_phase_goal">
|
|
400
|
-
Verify phase achieved its GOAL, not just completed
|
|
295
|
+
Verify phase achieved its GOAL, not just completed tasks.
|
|
401
296
|
|
|
402
|
-
|
|
297
|
+
```bash
|
|
298
|
+
PHASE_REQ_IDS=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE_NUMBER}" | jq -r '.section' | grep -i "Requirements:" | sed 's/.*Requirements:\*\*\s*//' | sed 's/[\[\]]//g')
|
|
299
|
+
```
|
|
403
300
|
|
|
404
301
|
```
|
|
405
|
-
|
|
302
|
+
task(
|
|
406
303
|
prompt="Verify phase {phase_number} goal achievement.
|
|
407
|
-
|
|
408
304
|
Phase directory: {phase_dir}
|
|
409
305
|
Phase goal: {goal from ROADMAP.md}
|
|
410
|
-
|
|
411
|
-
Check must_haves against actual codebase.
|
|
412
|
-
|
|
306
|
+
Phase requirement IDs: {phase_req_ids}
|
|
307
|
+
Check must_haves against actual codebase.
|
|
308
|
+
Cross-reference requirement IDs from PLAN frontmatter against REQUIREMENTS.md — every ID MUST be accounted for.
|
|
309
|
+
Create VERIFICATION.md.",
|
|
413
310
|
subagent_type="gsd-verifier",
|
|
414
311
|
model="{verifier_model}"
|
|
415
312
|
)
|
|
416
313
|
```
|
|
417
314
|
|
|
418
|
-
|
|
419
|
-
|
|
315
|
+
read status:
|
|
420
316
|
```bash
|
|
421
317
|
grep "^status:" "$PHASE_DIR"/*-VERIFICATION.md | cut -d: -f2 | tr -d ' '
|
|
422
318
|
```
|
|
423
319
|
|
|
424
|
-
**Route by status:**
|
|
425
|
-
|
|
426
320
|
| Status | Action |
|
|
427
321
|
|--------|--------|
|
|
428
|
-
| `passed` |
|
|
429
|
-
| `human_needed` | Present items
|
|
322
|
+
| `passed` | → update_roadmap |
|
|
323
|
+
| `human_needed` | Present items for human testing, get approval or feedback |
|
|
430
324
|
| `gaps_found` | Present gap summary, offer `/gsd-plan-phase {phase} --gaps` |
|
|
431
325
|
|
|
432
|
-
**If passed:**
|
|
433
|
-
|
|
434
|
-
Phase goal verified. Proceed to update_roadmap.
|
|
435
|
-
|
|
436
326
|
**If human_needed:**
|
|
437
|
-
|
|
438
|
-
```markdown
|
|
327
|
+
```
|
|
439
328
|
## ✓ Phase {X}: {Name} — Human Verification Required
|
|
440
329
|
|
|
441
330
|
All automated checks passed. {N} items need human testing:
|
|
442
331
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
{Extract from VERIFICATION.md human_verification section}
|
|
446
|
-
|
|
447
|
-
---
|
|
332
|
+
{From VERIFICATION.md human_verification section}
|
|
448
333
|
|
|
449
|
-
|
|
450
|
-
- "approved" → continue to update_roadmap
|
|
451
|
-
- Report issues → will route to gap closure planning
|
|
334
|
+
"approved" → continue | Report issues → gap closure
|
|
452
335
|
```
|
|
453
336
|
|
|
454
|
-
If user approves → continue to update_roadmap.
|
|
455
|
-
If user reports issues → treat as gaps_found.
|
|
456
|
-
|
|
457
337
|
**If gaps_found:**
|
|
458
|
-
|
|
459
|
-
Present gaps and offer next command:
|
|
460
|
-
|
|
461
|
-
```markdown
|
|
338
|
+
```
|
|
462
339
|
## ⚠ Phase {X}: {Name} — Gaps Found
|
|
463
340
|
|
|
464
341
|
**Score:** {N}/{M} must-haves verified
|
|
465
|
-
**Report:** {phase_dir}/{
|
|
342
|
+
**Report:** {phase_dir}/{phase_num}-VERIFICATION.md
|
|
466
343
|
|
|
467
344
|
### What's Missing
|
|
468
|
-
|
|
469
|
-
{Extract gap summaries from VERIFICATION.md gaps section}
|
|
345
|
+
{Gap summaries from VERIFICATION.md}
|
|
470
346
|
|
|
471
347
|
---
|
|
472
|
-
|
|
473
348
|
## ▶ Next Up
|
|
474
349
|
|
|
475
|
-
**Plan gap closure** — create additional plans to complete the phase
|
|
476
|
-
|
|
477
350
|
`/gsd-plan-phase {X} --gaps`
|
|
478
351
|
|
|
479
352
|
*`/new` first → fresh context window*
|
|
480
353
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
**Also available:**
|
|
484
|
-
- `cat {phase_dir}/{phase}-VERIFICATION.md` — see full report
|
|
485
|
-
- `/gsd-verify-work {X}` — manual testing before planning
|
|
354
|
+
Also: `cat {phase_dir}/{phase_num}-VERIFICATION.md` — full report
|
|
355
|
+
Also: `/gsd-verify-work {X}` — manual testing first
|
|
486
356
|
```
|
|
487
357
|
|
|
488
|
-
|
|
489
|
-
1. Reads VERIFICATION.md gaps
|
|
490
|
-
2. Creates additional plans (04, 05, etc.) with `gap_closure: true` to close gaps
|
|
491
|
-
3. User then runs `/gsd-execute-phase {X} --gaps-only`
|
|
492
|
-
4. Execute-phase runs only gap closure plans (04-05)
|
|
493
|
-
5. Verifier runs again after new plans complete
|
|
494
|
-
|
|
495
|
-
User stays in control at each decision point.
|
|
358
|
+
Gap closure cycle: `/gsd-plan-phase {X} --gaps` reads VERIFICATION.md → creates gap plans with `gap_closure: true` → user runs `/gsd-execute-phase {X} --gaps-only` → verifier re-runs.
|
|
496
359
|
</step>
|
|
497
360
|
|
|
498
361
|
<step name="update_roadmap">
|
|
499
|
-
|
|
362
|
+
**Mark phase complete and update all tracking files:**
|
|
500
363
|
|
|
501
364
|
```bash
|
|
502
|
-
|
|
503
|
-
# Update completion date
|
|
504
|
-
# Update status
|
|
365
|
+
COMPLETION=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs phase complete "${PHASE_NUMBER}")
|
|
505
366
|
```
|
|
506
367
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
-
|
|
511
|
-
-
|
|
512
|
-
-
|
|
513
|
-
- Proceed to offer_next step
|
|
368
|
+
The CLI handles:
|
|
369
|
+
- Marking phase checkbox `[x]` with completion date
|
|
370
|
+
- Updating Progress table (Status → Complete, date)
|
|
371
|
+
- Updating plan count to final
|
|
372
|
+
- Advancing STATE.md to next phase
|
|
373
|
+
- Updating REQUIREMENTS.md traceability
|
|
514
374
|
|
|
515
|
-
|
|
516
|
-
- Continue with git operations below
|
|
375
|
+
Extract from result: `next_phase`, `next_phase_name`, `is_last_phase`.
|
|
517
376
|
|
|
518
|
-
Commit phase completion (roadmap, state, verification):
|
|
519
377
|
```bash
|
|
520
|
-
|
|
521
|
-
git add .planning/REQUIREMENTS.md # if updated
|
|
522
|
-
git commit -m "docs(phase-{X}): complete phase execution"
|
|
378
|
+
node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs(phase-{X}): complete phase execution" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md {phase_dir}/*-VERIFICATION.md
|
|
523
379
|
```
|
|
524
380
|
</step>
|
|
525
381
|
|
|
526
382
|
<step name="offer_next">
|
|
527
|
-
Present next steps based on milestone status:
|
|
528
383
|
|
|
529
|
-
**If
|
|
530
|
-
|
|
531
|
-
|
|
384
|
+
**Exception:** If `gaps_found`, the `verify_phase_goal` step already presents the gap-closure path (`/gsd-plan-phase {X} --gaps`). No additional routing needed — skip auto-advance.
|
|
385
|
+
|
|
386
|
+
**No-transition check (spawned by auto-advance chain):**
|
|
532
387
|
|
|
533
|
-
|
|
388
|
+
Parse `--no-transition` flag from $ARGUMENTS.
|
|
534
389
|
|
|
535
|
-
|
|
390
|
+
**If `--no-transition` flag present:**
|
|
391
|
+
|
|
392
|
+
Execute-phase was spawned by plan-phase's auto-advance. Do NOT run transition.md.
|
|
393
|
+
After verification passes and roadmap is updated, return completion status to parent:
|
|
536
394
|
|
|
537
|
-
*`/new` first for fresh context*
|
|
538
395
|
```
|
|
396
|
+
## PHASE COMPLETE
|
|
397
|
+
|
|
398
|
+
Phase: ${PHASE_NUMBER} - ${PHASE_NAME}
|
|
399
|
+
Plans: ${completed_count}/${total_count}
|
|
400
|
+
Verification: {Passed | Gaps Found}
|
|
539
401
|
|
|
540
|
-
|
|
402
|
+
[Include aggregate_results output]
|
|
541
403
|
```
|
|
542
|
-
MILESTONE COMPLETE!
|
|
543
404
|
|
|
544
|
-
|
|
405
|
+
STOP. Do not proceed to auto-advance or transition.
|
|
406
|
+
|
|
407
|
+
**If `--no-transition` flag is NOT present:**
|
|
408
|
+
|
|
409
|
+
**Auto-advance detection:**
|
|
410
|
+
|
|
411
|
+
1. Parse `--auto` flag from $ARGUMENTS
|
|
412
|
+
2. read `workflow.auto_advance` from config:
|
|
413
|
+
```bash
|
|
414
|
+
AUTO_CFG=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs config-get workflow.auto_advance 2>/dev/null || echo "false")
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
**If `--auto` flag present OR `AUTO_CFG` is true (AND verification passed with no gaps):**
|
|
545
418
|
|
|
546
|
-
`/gsd-complete-milestone`
|
|
547
419
|
```
|
|
548
|
-
|
|
420
|
+
╔══════════════════════════════════════════╗
|
|
421
|
+
║ AUTO-ADVANCING → TRANSITION ║
|
|
422
|
+
║ Phase {X} verified, continuing chain ║
|
|
423
|
+
╚══════════════════════════════════════════╝
|
|
424
|
+
```
|
|
549
425
|
|
|
550
|
-
|
|
426
|
+
Execute the transition workflow inline (do NOT use task — orchestrator context is ~10-15%, transition needs phase completion data already in context):
|
|
551
427
|
|
|
552
|
-
|
|
553
|
-
**Why this works:**
|
|
428
|
+
read and follow `~/.config/opencode/get-shit-done/workflows/transition.md`, passing through the `--auto` flag so it propagates to the next phase invocation.
|
|
554
429
|
|
|
555
|
-
|
|
556
|
-
- read plan frontmatter (small)
|
|
557
|
-
- Analyze dependencies (logic, no heavy reads)
|
|
558
|
-
- Fill template strings
|
|
559
|
-
- Spawn Task calls
|
|
560
|
-
- Collect results
|
|
430
|
+
**If neither `--auto` nor `AUTO_CFG` is true:**
|
|
561
431
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
- Loads templates, references
|
|
565
|
-
- Executes plan with full capacity
|
|
566
|
-
- Creates SUMMARY, commits
|
|
432
|
+
The workflow ends. The user runs `/gsd-progress` or invokes the transition workflow manually.
|
|
433
|
+
</step>
|
|
567
434
|
|
|
568
|
-
|
|
435
|
+
</process>
|
|
569
436
|
|
|
570
|
-
|
|
437
|
+
<context_efficiency>
|
|
438
|
+
Orchestrator: ~10-15% context. Subagents: fresh 200k each. No polling (task blocks). No context bleed.
|
|
571
439
|
</context_efficiency>
|
|
572
440
|
|
|
573
441
|
<failure_handling>
|
|
574
|
-
**
|
|
575
|
-
- SUMMARY.md
|
|
576
|
-
-
|
|
577
|
-
-
|
|
578
|
-
|
|
579
|
-
**Dependency chain breaks:**
|
|
580
|
-
- Wave 1 plan fails
|
|
581
|
-
- Wave 2 plans depending on it will likely fail
|
|
582
|
-
- Orchestrator can still attempt them (user choice)
|
|
583
|
-
- Or skip dependent plans entirely
|
|
584
|
-
|
|
585
|
-
**All agents in wave fail:**
|
|
586
|
-
- Something systemic (git issues, permissions, etc.)
|
|
587
|
-
- Stop execution
|
|
588
|
-
- Report for manual investigation
|
|
589
|
-
|
|
590
|
-
**Checkpoint fails to resolve:**
|
|
591
|
-
- User can't approve or provides repeated issues
|
|
592
|
-
- Ask: "Skip this plan?" or "Abort phase execution?"
|
|
593
|
-
- Record partial progress in STATE.md
|
|
442
|
+
- **classifyHandoffIfNeeded false failure:** Agent reports "failed" but error is `classifyHandoffIfNeeded is not defined` → OpenCode bug, not GSD. Spot-check (SUMMARY exists, commits present) → if pass, treat as success
|
|
443
|
+
- **Agent fails mid-plan:** Missing SUMMARY.md → report, ask user how to proceed
|
|
444
|
+
- **Dependency chain breaks:** Wave 1 fails → Wave 2 dependents likely fail → user chooses attempt or skip
|
|
445
|
+
- **All agents in wave fail:** Systemic issue → stop, report for investigation
|
|
446
|
+
- **Checkpoint unresolvable:** "Skip this plan?" or "Abort phase execution?" → record partial progress in STATE.md
|
|
594
447
|
</failure_handling>
|
|
595
448
|
|
|
596
449
|
<resumption>
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
If phase execution was interrupted (context limit, user exit, error):
|
|
600
|
-
|
|
601
|
-
1. Run `/gsd-execute-phase {phase}` again
|
|
602
|
-
2. discover_plans finds completed SUMMARYs
|
|
603
|
-
3. Skips completed plans
|
|
604
|
-
4. Resumes from first incomplete plan
|
|
605
|
-
5. Continues wave-based execution
|
|
450
|
+
Re-run `/gsd-execute-phase {phase}` → discover_plans finds completed SUMMARYs → skips them → resumes from first incomplete plan → continues wave execution.
|
|
606
451
|
|
|
607
|
-
|
|
608
|
-
- Last completed plan
|
|
609
|
-
- Current wave
|
|
610
|
-
- Any pending checkpoints
|
|
452
|
+
STATE.md tracks: last completed plan, current wave, pending checkpoints.
|
|
611
453
|
</resumption>
|