gsd-opencode 1.20.3 → 1.22.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 +9 -1
- package/agents/gsd-debugger.md +66 -10
- package/agents/gsd-executor.md +36 -16
- package/agents/gsd-integration-checker.md +2 -0
- package/agents/gsd-nyquist-auditor.md +178 -0
- package/agents/gsd-phase-researcher.md +28 -34
- package/agents/gsd-plan-checker.md +42 -78
- package/agents/gsd-planner.md +139 -24
- package/agents/gsd-project-researcher.md +11 -1
- package/agents/gsd-research-synthesizer.md +13 -3
- package/agents/gsd-roadmapper.md +25 -15
- package/agents/gsd-verifier.md +29 -6
- package/bin/dm/lib/constants.js +6 -1
- package/bin/dm/src/services/file-ops.js +14 -1
- package/commands/gsd/gsd-add-phase.md +6 -6
- package/commands/gsd/gsd-add-tests.md +41 -0
- package/commands/gsd/gsd-add-todo.md +7 -7
- package/commands/gsd/gsd-audit-milestone.md +9 -9
- package/commands/gsd/gsd-check-profile.md +3 -3
- package/commands/gsd/gsd-check-todos.md +7 -7
- package/commands/gsd/gsd-cleanup.md +2 -2
- package/commands/gsd/gsd-complete-milestone.md +6 -6
- package/commands/gsd/gsd-debug.md +11 -7
- package/commands/gsd/gsd-discuss-phase.md +26 -19
- package/commands/gsd/gsd-execute-phase.md +13 -13
- package/commands/gsd/gsd-health.md +7 -7
- package/commands/gsd/gsd-help.md +2 -2
- package/commands/gsd/gsd-insert-phase.md +6 -6
- package/commands/gsd/gsd-join-discord.md +1 -1
- package/commands/gsd/gsd-list-phase-assumptions.md +6 -6
- package/commands/gsd/gsd-map-codebase.md +8 -8
- package/commands/gsd/gsd-new-milestone.md +12 -12
- package/commands/gsd/gsd-new-project.md +12 -12
- package/commands/gsd/gsd-pause-work.md +6 -6
- package/commands/gsd/gsd-plan-milestone-gaps.md +9 -9
- package/commands/gsd/gsd-plan-phase.md +14 -13
- package/commands/gsd/gsd-progress.md +8 -8
- package/commands/gsd/gsd-quick.md +17 -13
- package/commands/gsd/gsd-reapply-patches.md +19 -11
- package/commands/gsd/gsd-remove-phase.md +7 -7
- package/commands/gsd/gsd-research-phase.md +12 -11
- package/commands/gsd/gsd-resume-work.md +8 -8
- package/commands/gsd/gsd-set-profile.md +6 -6
- package/commands/gsd/gsd-settings.md +7 -7
- package/commands/gsd/gsd-update.md +5 -5
- package/commands/gsd/gsd-validate-phase.md +35 -0
- package/commands/gsd/gsd-verify-work.md +11 -11
- package/get-shit-done/bin/gsd-oc-commands/allow-read-config.cjs +235 -0
- package/get-shit-done/bin/gsd-oc-tools.cjs +11 -5
- package/get-shit-done/bin/gsd-tools.cjs +45 -6
- package/get-shit-done/bin/lib/commands.cjs +11 -19
- package/get-shit-done/bin/lib/config.cjs +8 -1
- package/get-shit-done/bin/lib/core.cjs +131 -16
- package/get-shit-done/bin/lib/init.cjs +28 -12
- package/get-shit-done/bin/lib/milestone.cjs +34 -8
- package/get-shit-done/bin/lib/phase.cjs +74 -50
- package/get-shit-done/bin/lib/roadmap.cjs +7 -7
- package/get-shit-done/bin/lib/state.cjs +294 -63
- package/get-shit-done/bin/lib/template.cjs +3 -3
- package/get-shit-done/bin/lib/verify.cjs +56 -8
- package/get-shit-done/bin/test/allow-read-config.test.cjs +262 -0
- package/get-shit-done/references/checkpoints.md +1 -1
- package/get-shit-done/references/decimal-phase-calculation.md +6 -6
- package/get-shit-done/references/git-integration.md +3 -3
- package/get-shit-done/references/git-planning-commit.md +2 -2
- package/get-shit-done/references/model-profile-resolution.md +1 -1
- package/get-shit-done/references/model-profiles.md +1 -0
- package/get-shit-done/references/phase-argument-parsing.md +4 -4
- package/get-shit-done/references/planning-config.md +10 -6
- package/get-shit-done/references/questioning.md +17 -0
- package/get-shit-done/references/verification-patterns.md +1 -1
- package/get-shit-done/templates/DEBUG.md +7 -2
- package/get-shit-done/templates/VALIDATION.md +18 -46
- package/get-shit-done/templates/codebase/structure.md +3 -3
- package/get-shit-done/templates/config.json +2 -2
- package/get-shit-done/templates/context.md +14 -0
- package/get-shit-done/templates/phase-prompt.md +10 -10
- package/get-shit-done/templates/retrospective.md +54 -0
- package/get-shit-done/templates/roadmap.md +1 -1
- package/get-shit-done/workflows/add-phase.md +3 -2
- package/get-shit-done/workflows/add-tests.md +351 -0
- package/get-shit-done/workflows/add-todo.md +4 -3
- package/get-shit-done/workflows/audit-milestone.md +40 -5
- package/get-shit-done/workflows/check-todos.md +3 -2
- package/get-shit-done/workflows/cleanup.md +1 -1
- package/get-shit-done/workflows/complete-milestone.md +69 -5
- package/get-shit-done/workflows/diagnose-issues.md +2 -2
- package/get-shit-done/workflows/discovery-phase.md +6 -6
- package/get-shit-done/workflows/discuss-phase.md +194 -58
- package/get-shit-done/workflows/execute-phase.md +29 -23
- package/get-shit-done/workflows/execute-plan.md +22 -18
- package/get-shit-done/workflows/health.md +5 -2
- package/get-shit-done/workflows/help.md +4 -1
- package/get-shit-done/workflows/insert-phase.md +3 -2
- package/get-shit-done/workflows/map-codebase.md +3 -2
- package/get-shit-done/workflows/new-milestone.md +12 -10
- package/get-shit-done/workflows/new-project.md +44 -49
- package/get-shit-done/workflows/oc-set-profile.md +24 -0
- package/get-shit-done/workflows/pause-work.md +2 -2
- package/get-shit-done/workflows/plan-milestone-gaps.md +3 -3
- package/get-shit-done/workflows/plan-phase.md +155 -73
- package/get-shit-done/workflows/progress.md +8 -7
- package/get-shit-done/workflows/quick.md +158 -10
- package/get-shit-done/workflows/remove-phase.md +5 -4
- package/get-shit-done/workflows/research-phase.md +5 -4
- package/get-shit-done/workflows/resume-project.md +3 -2
- package/get-shit-done/workflows/set-profile.md +3 -2
- package/get-shit-done/workflows/settings.md +6 -6
- package/get-shit-done/workflows/transition.md +5 -5
- package/get-shit-done/workflows/update.md +45 -19
- package/get-shit-done/workflows/validate-phase.md +167 -0
- package/get-shit-done/workflows/verify-phase.md +10 -9
- package/get-shit-done/workflows/verify-work.md +18 -4
- package/package.json +1 -1
|
@@ -107,11 +107,14 @@ Phase: "API documentation"
|
|
|
107
107
|
|
|
108
108
|
<process>
|
|
109
109
|
|
|
110
|
+
**Express path available:** If you already have a PRD or acceptance criteria document, use `/gsd-plan-phase {phase} --prd path/to/prd.md` to skip this discussion and go straight to planning.
|
|
111
|
+
|
|
110
112
|
<step name="initialize" priority="first">
|
|
111
113
|
Phase number from argument (required).
|
|
112
114
|
|
|
113
115
|
```bash
|
|
114
|
-
INIT=$(node
|
|
116
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE}")
|
|
117
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
115
118
|
```
|
|
116
119
|
|
|
117
120
|
Parse JSON for: `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `has_verification`, `plan_count`, `roadmap_exists`, `planning_exists`.
|
|
@@ -163,44 +166,152 @@ If "Continue and replan after": Continue to analyze_phase.
|
|
|
163
166
|
If "View existing plans": Display plan files, then offer "Continue" / "Cancel".
|
|
164
167
|
If "Cancel": Exit workflow.
|
|
165
168
|
|
|
166
|
-
**If `has_plans` is false:** Continue to
|
|
169
|
+
**If `has_plans` is false:** Continue to load_prior_context.
|
|
170
|
+
</step>
|
|
171
|
+
|
|
172
|
+
<step name="load_prior_context">
|
|
173
|
+
read project-level and prior phase context to avoid re-asking decided questions and maintain consistency.
|
|
174
|
+
|
|
175
|
+
**Step 1: read project-level files**
|
|
176
|
+
```bash
|
|
177
|
+
# Core project files
|
|
178
|
+
cat .planning/PROJECT.md 2>/dev/null
|
|
179
|
+
cat .planning/REQUIREMENTS.md 2>/dev/null
|
|
180
|
+
cat .planning/STATE.md 2>/dev/null
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Extract from these:
|
|
184
|
+
- **PROJECT.md** — Vision, principles, non-negotiables, user preferences
|
|
185
|
+
- **REQUIREMENTS.md** — Acceptance criteria, constraints, must-haves vs nice-to-haves
|
|
186
|
+
- **STATE.md** — Current progress, any flags or session notes
|
|
187
|
+
|
|
188
|
+
**Step 2: read all prior CONTEXT.md files**
|
|
189
|
+
```bash
|
|
190
|
+
# Find all CONTEXT.md files from phases before current
|
|
191
|
+
find .planning/phases -name "*-CONTEXT.md" 2>/dev/null | sort
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
For each CONTEXT.md where phase number < current phase:
|
|
195
|
+
- read the `<decisions>` section — these are locked preferences
|
|
196
|
+
- read `<specifics>` — particular references or "I want it like X" moments
|
|
197
|
+
- Note any patterns (e.g., "user consistently prefers minimal UI", "user rejected single-key shortcuts")
|
|
198
|
+
|
|
199
|
+
**Step 3: Build internal `<prior_decisions>` context**
|
|
200
|
+
|
|
201
|
+
Structure the extracted information:
|
|
202
|
+
```
|
|
203
|
+
<prior_decisions>
|
|
204
|
+
## Project-Level
|
|
205
|
+
- [Key principle or constraint from PROJECT.md]
|
|
206
|
+
- [Requirement that affects this phase from REQUIREMENTS.md]
|
|
207
|
+
|
|
208
|
+
## From Prior Phases
|
|
209
|
+
### Phase N: [Name]
|
|
210
|
+
- [Decision that may be relevant to current phase]
|
|
211
|
+
- [Preference that establishes a pattern]
|
|
212
|
+
|
|
213
|
+
### Phase M: [Name]
|
|
214
|
+
- [Another relevant decision]
|
|
215
|
+
</prior_decisions>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Usage in subsequent steps:**
|
|
219
|
+
- `analyze_phase`: Skip gray areas already decided in prior phases
|
|
220
|
+
- `present_gray_areas`: Annotate options with prior decisions ("You chose X in Phase 5")
|
|
221
|
+
- `discuss_areas`: Pre-fill answers or flag conflicts ("This contradicts Phase 3 — same here or different?")
|
|
222
|
+
|
|
223
|
+
**If no prior context exists:** Continue without — this is expected for early phases.
|
|
224
|
+
</step>
|
|
225
|
+
|
|
226
|
+
<step name="scout_codebase">
|
|
227
|
+
Lightweight scan of existing code to inform gray area identification and discussion. Uses ~10% context — acceptable for an interactive session.
|
|
228
|
+
|
|
229
|
+
**Step 1: Check for existing codebase maps**
|
|
230
|
+
```bash
|
|
231
|
+
ls .planning/codebase/*.md 2>/dev/null
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**If codebase maps exist:** read the most relevant ones (CONVENTIONS.md, STRUCTURE.md, STACK.md based on phase type). Extract:
|
|
235
|
+
- Reusable components/hooks/utilities
|
|
236
|
+
- Established patterns (state management, styling, data fetching)
|
|
237
|
+
- Integration points (where new code would connect)
|
|
238
|
+
|
|
239
|
+
Skip to Step 3 below.
|
|
240
|
+
|
|
241
|
+
**Step 2: If no codebase maps, do targeted grep**
|
|
242
|
+
|
|
243
|
+
Extract key terms from the phase goal (e.g., "feed" → "post", "card", "list"; "auth" → "login", "session", "token").
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
# Find files related to phase goal terms
|
|
247
|
+
grep -rl "{term1}\|{term2}" src/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null | head -10
|
|
248
|
+
|
|
249
|
+
# Find existing components/hooks
|
|
250
|
+
ls src/components/ 2>/dev/null
|
|
251
|
+
ls src/hooks/ 2>/dev/null
|
|
252
|
+
ls src/lib/ src/utils/ 2>/dev/null
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
read the 3-5 most relevant files to understand existing patterns.
|
|
256
|
+
|
|
257
|
+
**Step 3: Build internal codebase_context**
|
|
258
|
+
|
|
259
|
+
From the scan, identify:
|
|
260
|
+
- **Reusable assets** — existing components, hooks, utilities that could be used in this phase
|
|
261
|
+
- **Established patterns** — how the codebase does state management, styling, data fetching
|
|
262
|
+
- **Integration points** — where new code would connect (routes, nav, providers)
|
|
263
|
+
- **Creative options** — approaches the existing architecture enables or constrains
|
|
264
|
+
|
|
265
|
+
Store as internal `<codebase_context>` for use in analyze_phase and present_gray_areas. This is NOT written to a file — it's used within this session only.
|
|
167
266
|
</step>
|
|
168
267
|
|
|
169
268
|
<step name="analyze_phase">
|
|
170
|
-
Analyze the phase to identify gray areas worth discussing.
|
|
269
|
+
Analyze the phase to identify gray areas worth discussing. **Use both `prior_decisions` and `codebase_context` to ground the analysis.**
|
|
171
270
|
|
|
172
271
|
**read the phase description from ROADMAP.md and determine:**
|
|
173
272
|
|
|
174
273
|
1. **Domain boundary** — What capability is this phase delivering? State it clearly.
|
|
175
274
|
|
|
176
|
-
2. **
|
|
275
|
+
2. **Check prior decisions** — Before generating gray areas, check if any were already decided:
|
|
276
|
+
- Scan `<prior_decisions>` for relevant choices (e.g., "Ctrl+C only, no single-key shortcuts")
|
|
277
|
+
- These are **pre-answered** — don't re-ask unless this phase has conflicting needs
|
|
278
|
+
- Note applicable prior decisions for use in presentation
|
|
279
|
+
|
|
280
|
+
3. **Gray areas by category** — For each relevant category (UI, UX, Behavior, Empty States, Content), identify 1-2 specific ambiguities that would change implementation. **Annotate with code context where relevant** (e.g., "You already have a Card component" or "No existing pattern for this").
|
|
177
281
|
|
|
178
|
-
|
|
282
|
+
4. **Skip assessment** — If no meaningful gray areas exist (pure infrastructure, clear-cut implementation, or all already decided in prior phases), the phase may not need discussion.
|
|
179
283
|
|
|
180
284
|
**Output your analysis internally, then present to user.**
|
|
181
285
|
|
|
182
|
-
Example analysis for "Post Feed" phase:
|
|
286
|
+
Example analysis for "Post Feed" phase (with code and prior context):
|
|
183
287
|
```
|
|
184
288
|
Domain: Displaying posts from followed users
|
|
289
|
+
Existing: Card component (src/components/ui/Card.tsx), useInfiniteQuery hook, Tailwind CSS
|
|
290
|
+
Prior decisions: "Minimal UI preferred" (Phase 2), "No pagination — always infinite scroll" (Phase 4)
|
|
185
291
|
Gray areas:
|
|
186
|
-
- UI: Layout style (cards vs timeline vs grid)
|
|
187
|
-
- UI: Information density (full posts vs previews)
|
|
188
|
-
- Behavior: Loading pattern
|
|
189
|
-
- Empty State: What shows when no posts exist
|
|
292
|
+
- UI: Layout style (cards vs timeline vs grid) — Card component exists with shadow/rounded variants
|
|
293
|
+
- UI: Information density (full posts vs previews) — no existing density patterns
|
|
294
|
+
- Behavior: Loading pattern — ALREADY DECIDED: infinite scroll (Phase 4)
|
|
295
|
+
- Empty State: What shows when no posts exist — EmptyState component exists in ui/
|
|
190
296
|
- Content: What metadata displays (time, author, reactions count)
|
|
191
297
|
```
|
|
192
298
|
</step>
|
|
193
299
|
|
|
194
300
|
<step name="present_gray_areas">
|
|
195
|
-
Present the domain boundary and gray areas to user.
|
|
301
|
+
Present the domain boundary, prior decisions, and gray areas to user.
|
|
196
302
|
|
|
197
|
-
**First, state the boundary:**
|
|
303
|
+
**First, state the boundary and any prior decisions that apply:**
|
|
198
304
|
```
|
|
199
305
|
Phase [X]: [Name]
|
|
200
306
|
Domain: [What this phase delivers — from your analysis]
|
|
201
307
|
|
|
202
308
|
We'll clarify HOW to implement this.
|
|
203
309
|
(New capabilities belong in other phases.)
|
|
310
|
+
|
|
311
|
+
[If prior decisions apply:]
|
|
312
|
+
**Carrying forward from earlier phases:**
|
|
313
|
+
- [Decision from Phase N that applies here]
|
|
314
|
+
- [Decision from Phase M that applies here]
|
|
204
315
|
```
|
|
205
316
|
|
|
206
317
|
**Then use question (multiSelect: true):**
|
|
@@ -208,17 +319,35 @@ We'll clarify HOW to implement this.
|
|
|
208
319
|
- question: "Which areas do you want to discuss for [phase name]?"
|
|
209
320
|
- options: Generate 3-4 phase-specific gray areas, each with:
|
|
210
321
|
- "[Specific area]" (label) — concrete, not generic
|
|
211
|
-
- [1-2 questions this covers] (description)
|
|
322
|
+
- [1-2 questions this covers + code context annotation] (description)
|
|
212
323
|
- **Highlight the recommended choice with brief explanation why**
|
|
213
324
|
|
|
325
|
+
**Prior decision annotations:** When a gray area was already decided in a prior phase, annotate it:
|
|
326
|
+
```
|
|
327
|
+
☐ Exit shortcuts — How should users quit?
|
|
328
|
+
(You decided "Ctrl+C only, no single-key shortcuts" in Phase 5 — revisit or keep?)
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**Code context annotations:** When the scout found relevant existing code, annotate the gray area description:
|
|
332
|
+
```
|
|
333
|
+
☐ Layout style — Cards vs list vs timeline?
|
|
334
|
+
(You already have a Card component with shadow/rounded variants. Reusing it keeps the app consistent.)
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**Combining both:** When both prior decisions and code context apply:
|
|
338
|
+
```
|
|
339
|
+
☐ Loading behavior — Infinite scroll or pagination?
|
|
340
|
+
(You chose infinite scroll in Phase 4. useInfiniteQuery hook already set up.)
|
|
341
|
+
```
|
|
342
|
+
|
|
214
343
|
**Do NOT include a "skip" or "you decide" option.** User ran this command to discuss — give them real choices.
|
|
215
344
|
|
|
216
|
-
**Examples by domain:**
|
|
345
|
+
**Examples by domain (with code context):**
|
|
217
346
|
|
|
218
347
|
For "Post Feed" (visual feature):
|
|
219
348
|
```
|
|
220
|
-
☐ Layout style — Cards vs list vs timeline?
|
|
221
|
-
☐ Loading behavior — Infinite scroll or pagination?
|
|
349
|
+
☐ Layout style — Cards vs list vs timeline? (Card component exists with variants)
|
|
350
|
+
☐ Loading behavior — Infinite scroll or pagination? (useInfiniteQuery hook available)
|
|
222
351
|
☐ Content ordering — Chronological, algorithmic, or user choice?
|
|
223
352
|
☐ Post metadata — What info per post? Timestamps, reactions, author?
|
|
224
353
|
```
|
|
@@ -260,7 +389,15 @@ Ask 4 questions per area before offering to continue or move on. Each answer oft
|
|
|
260
389
|
- header: "[Area]" (max 12 chars — abbreviate if needed)
|
|
261
390
|
- question: Specific decision for this area
|
|
262
391
|
- options: 2-3 concrete choices (question adds "Other" automatically), with the recommended choice highlighted and brief explanation why
|
|
392
|
+
- **Annotate options with code context** when relevant:
|
|
393
|
+
```
|
|
394
|
+
"How should posts be displayed?"
|
|
395
|
+
- Cards (reuses existing Card component — consistent with Messages)
|
|
396
|
+
- List (simpler, would be a new pattern)
|
|
397
|
+
- Timeline (needs new Timeline component — none exists yet)
|
|
398
|
+
```
|
|
263
399
|
- Include "You decide" as an option when reasonable — captures OpenCode discretion
|
|
400
|
+
- **Context7 for library choices:** When a gray area involves library selection (e.g., "magic links" → query next-auth docs) or API approach decisions, use `mcp__context7__*` tools to fetch current documentation and inform the options. Don't use Context7 for every question — only when library-specific knowledge improves the options.
|
|
264
401
|
|
|
265
402
|
3. **After 4 questions, check:**
|
|
266
403
|
- header: "[Area]" (max 12 chars)
|
|
@@ -286,7 +423,7 @@ Ask 4 questions per area before offering to continue or move on. Each answer oft
|
|
|
286
423
|
**question design:**
|
|
287
424
|
- Options should be concrete, not abstract ("Cards" not "Option A")
|
|
288
425
|
- Each answer should inform the next question
|
|
289
|
-
- If user picks "Other"
|
|
426
|
+
- If user picks "Other" to provide freeform input (e.g., "let me describe it", "something else", or an open-ended reply), ask your follow-up as plain text — NOT another question. Wait for them to type at the normal prompt, then reflect their input back and confirm before resuming question for the next question.
|
|
290
427
|
|
|
291
428
|
**Scope creep handling:**
|
|
292
429
|
If user mentions something outside the phase domain:
|
|
@@ -344,6 +481,20 @@ mkdir -p ".planning/phases/${padded_phase}-${phase_slug}"
|
|
|
344
481
|
|
|
345
482
|
</decisions>
|
|
346
483
|
|
|
484
|
+
<code_context>
|
|
485
|
+
## Existing Code Insights
|
|
486
|
+
|
|
487
|
+
### Reusable Assets
|
|
488
|
+
- [Component/hook/utility]: [How it could be used in this phase]
|
|
489
|
+
|
|
490
|
+
### Established Patterns
|
|
491
|
+
- [Pattern]: [How it constrains/enables this phase]
|
|
492
|
+
|
|
493
|
+
### Integration Points
|
|
494
|
+
- [Where new code connects to existing system]
|
|
495
|
+
|
|
496
|
+
</code_context>
|
|
497
|
+
|
|
347
498
|
<specifics>
|
|
348
499
|
## Specific Ideas
|
|
349
500
|
|
|
@@ -413,7 +564,7 @@ Created: .planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md
|
|
|
413
564
|
Commit phase context (uses `commit_docs` from init internally):
|
|
414
565
|
|
|
415
566
|
```bash
|
|
416
|
-
node
|
|
567
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs(${padded_phase}): capture phase context" --files "${phase_dir}/${padded_phase}-CONTEXT.md"
|
|
417
568
|
```
|
|
418
569
|
|
|
419
570
|
Confirm: "Committed: docs(${padded_phase}): capture phase context"
|
|
@@ -423,7 +574,7 @@ Confirm: "Committed: docs(${padded_phase}): capture phase context"
|
|
|
423
574
|
Update STATE.md with session info:
|
|
424
575
|
|
|
425
576
|
```bash
|
|
426
|
-
node
|
|
577
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state record-session \
|
|
427
578
|
--stopped-at "Phase ${PHASE} context gathered" \
|
|
428
579
|
--resume-file "${phase_dir}/${padded_phase}-CONTEXT.md"
|
|
429
580
|
```
|
|
@@ -431,7 +582,7 @@ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state record-session \
|
|
|
431
582
|
Commit STATE.md:
|
|
432
583
|
|
|
433
584
|
```bash
|
|
434
|
-
node
|
|
585
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs(state): record phase ${PHASE} context session" --files .planning/STATE.md
|
|
435
586
|
```
|
|
436
587
|
</step>
|
|
437
588
|
|
|
@@ -439,17 +590,24 @@ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs(state): rec
|
|
|
439
590
|
Check for auto-advance trigger:
|
|
440
591
|
|
|
441
592
|
1. Parse `--auto` flag from $ARGUMENTS
|
|
442
|
-
2.
|
|
593
|
+
2. **Sync chain flag with intent** — if user invoked manually (no `--auto`), clear the ephemeral chain flag from any previous interrupted `--auto` chain. This does NOT touch `workflow.auto_advance` (the user's persistent settings preference):
|
|
594
|
+
```bash
|
|
595
|
+
if [[ ! "$ARGUMENTS" =~ --auto ]]; then
|
|
596
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-set workflow._auto_chain_active false 2>/dev/null
|
|
597
|
+
fi
|
|
598
|
+
```
|
|
599
|
+
3. read both the chain flag and user preference:
|
|
443
600
|
```bash
|
|
444
|
-
|
|
601
|
+
AUTO_CHAIN=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow._auto_chain_active 2>/dev/null || echo "false")
|
|
602
|
+
AUTO_CFG=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow.auto_advance 2>/dev/null || echo "false")
|
|
445
603
|
```
|
|
446
604
|
|
|
447
|
-
**If `--auto` flag present AND `
|
|
605
|
+
**If `--auto` flag present AND `AUTO_CHAIN` is not true:** Persist chain flag to config (handles direct `--auto` usage without new-project):
|
|
448
606
|
```bash
|
|
449
|
-
node
|
|
607
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-set workflow._auto_chain_active true
|
|
450
608
|
```
|
|
451
609
|
|
|
452
|
-
**If `--auto` flag present OR `AUTO_CFG` is true:**
|
|
610
|
+
**If `--auto` flag present OR `AUTO_CHAIN` is true OR `AUTO_CFG` is true:**
|
|
453
611
|
|
|
454
612
|
Display banner:
|
|
455
613
|
```
|
|
@@ -457,42 +615,16 @@ Display banner:
|
|
|
457
615
|
GSD ► AUTO-ADVANCING TO PLAN
|
|
458
616
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
459
617
|
|
|
460
|
-
Context captured.
|
|
618
|
+
Context captured. Launching plan-phase...
|
|
461
619
|
```
|
|
462
620
|
|
|
463
|
-
|
|
621
|
+
Launch plan-phase using the skill tool to avoid nested task sessions (which cause runtime freezes due to deep agent nesting — see #686):
|
|
464
622
|
```
|
|
465
|
-
|
|
466
|
-
prompt="
|
|
467
|
-
<objective>
|
|
468
|
-
You are the plan-phase orchestrator. Create executable plans for Phase ${PHASE}: ${PHASE_NAME}, then auto-advance to execution.
|
|
469
|
-
</objective>
|
|
470
|
-
|
|
471
|
-
<execution_context>
|
|
472
|
-
@~/.config/opencode/get-shit-done/workflows/plan-phase.md
|
|
473
|
-
@~/.config/opencode/get-shit-done/references/ui-brand.md
|
|
474
|
-
@~/.config/opencode/get-shit-done/references/model-profile-resolution.md
|
|
475
|
-
</execution_context>
|
|
476
|
-
|
|
477
|
-
<arguments>
|
|
478
|
-
PHASE=${PHASE}
|
|
479
|
-
ARGUMENTS='${PHASE} --auto'
|
|
480
|
-
</arguments>
|
|
481
|
-
|
|
482
|
-
<instructions>
|
|
483
|
-
1. read plan-phase.md from execution_context for your complete workflow
|
|
484
|
-
2. Follow ALL steps: initialize, validate, load context, research, plan, verify, auto-advance
|
|
485
|
-
3. When spawning agents (gsd-phase-researcher, gsd-planner, gsd-plan-checker), use task with specified subagent_type and model
|
|
486
|
-
4. For step 14 (auto-advance to execute): spawn execute-phase as a task with DIRECT file reference — tell it to read execute-phase.md. Include @file refs to execute-phase.md, checkpoints.md, tdd.md, model-profile-resolution.md. Pass --no-transition flag so execute-phase returns results instead of chaining further.
|
|
487
|
-
5. Do NOT use the skill tool or /gsd- commands. read workflow .md files directly.
|
|
488
|
-
6. Return: PHASE COMPLETE (full pipeline success), PLANNING COMPLETE (planning done but execute failed/skipped), PLANNING INCONCLUSIVE, or GAPS FOUND
|
|
489
|
-
</instructions>
|
|
490
|
-
",
|
|
491
|
-
subagent_type="general",
|
|
492
|
-
description="Plan Phase ${PHASE}"
|
|
493
|
-
)
|
|
623
|
+
skill(skill="gsd-plan-phase", args="${PHASE} --auto")
|
|
494
624
|
```
|
|
495
625
|
|
|
626
|
+
This keeps the auto-advance chain flat — discuss, plan, and execute all run at the same nesting level rather than spawning increasingly deep task agents.
|
|
627
|
+
|
|
496
628
|
**Handle plan-phase return:**
|
|
497
629
|
- **PHASE COMPLETE** → Full chain succeeded. Display:
|
|
498
630
|
```
|
|
@@ -529,11 +661,15 @@ Route to `confirm_creation` step (existing behavior — show manual next steps).
|
|
|
529
661
|
|
|
530
662
|
<success_criteria>
|
|
531
663
|
- Phase validated against roadmap
|
|
532
|
-
-
|
|
664
|
+
- Prior context loaded (PROJECT.md, REQUIREMENTS.md, STATE.md, prior CONTEXT.md files)
|
|
665
|
+
- Already-decided questions not re-asked (carried forward from prior phases)
|
|
666
|
+
- Codebase scouted for reusable assets, patterns, and integration points
|
|
667
|
+
- Gray areas identified through intelligent analysis with code and prior decision annotations
|
|
533
668
|
- User selected which areas to discuss
|
|
534
|
-
- Each selected area explored until user satisfied
|
|
669
|
+
- Each selected area explored until user satisfied (with code-informed and prior-decision-informed options)
|
|
535
670
|
- Scope creep redirected to deferred ideas
|
|
536
671
|
- CONTEXT.md captures actual decisions, not vague vision
|
|
672
|
+
- CONTEXT.md includes code_context section with reusable assets and patterns
|
|
537
673
|
- Deferred ideas preserved for future phases
|
|
538
674
|
- STATE.md updated with session info
|
|
539
675
|
- User knows next steps
|
|
@@ -16,16 +16,24 @@ read STATE.md before any operation to load project context.
|
|
|
16
16
|
Load all context in one call:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
INIT=$(node
|
|
19
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init execute-phase "${PHASE_ARG}")
|
|
20
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
20
21
|
```
|
|
21
22
|
|
|
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`.
|
|
23
|
+
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`, `phase_req_ids`.
|
|
23
24
|
|
|
24
25
|
**If `phase_found` is false:** Error — phase directory not found.
|
|
25
26
|
**If `plan_count` is 0:** Error — no plans found in phase.
|
|
26
27
|
**If `state_exists` is false but `.planning/` exists:** Offer reconstruct or continue.
|
|
27
28
|
|
|
28
29
|
When `parallelization` is false, plans within a wave execute sequentially.
|
|
30
|
+
|
|
31
|
+
**Sync chain flag with intent** — if user invoked manually (no `--auto`), clear the ephemeral chain flag from any previous interrupted `--auto` chain. This does NOT touch `workflow.auto_advance` (the user's persistent settings preference). Must happen before any config reads (checkpoint handling also reads auto-advance flags):
|
|
32
|
+
```bash
|
|
33
|
+
if [[ ! "$ARGUMENTS" =~ --auto ]]; then
|
|
34
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-set workflow._auto_chain_active false 2>/dev/null
|
|
35
|
+
fi
|
|
36
|
+
```
|
|
29
37
|
</step>
|
|
30
38
|
|
|
31
39
|
<step name="handle_branching">
|
|
@@ -51,7 +59,7 @@ Report: "Found {plan_count} plans in {phase_dir} ({incomplete_count} incomplete)
|
|
|
51
59
|
Load plan inventory with wave grouping in one call:
|
|
52
60
|
|
|
53
61
|
```bash
|
|
54
|
-
PLAN_INDEX=$(node
|
|
62
|
+
PLAN_INDEX=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" phase-plan-index "${PHASE_NUMBER}")
|
|
55
63
|
```
|
|
56
64
|
|
|
57
65
|
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`.
|
|
@@ -110,10 +118,10 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
|
|
|
110
118
|
</objective>
|
|
111
119
|
|
|
112
120
|
<execution_context>
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
121
|
+
@$HOME/.config/opencode/get-shit-done/workflows/execute-plan.md
|
|
122
|
+
@$HOME/.config/opencode/get-shit-done/templates/summary.md
|
|
123
|
+
@$HOME/.config/opencode/get-shit-done/references/checkpoints.md
|
|
124
|
+
@$HOME/.config/opencode/get-shit-done/references/tdd.md
|
|
117
125
|
</execution_context>
|
|
118
126
|
|
|
119
127
|
<files_to_read>
|
|
@@ -122,7 +130,7 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
|
|
|
122
130
|
- .planning/STATE.md (State)
|
|
123
131
|
- .planning/config.json (Config, if exists)
|
|
124
132
|
- ./AGENTS.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)
|
|
133
|
+
- .OpenCode/skills/ or .agents/skills/ (Project skills, if either exists — list skills, read SKILL.md for each, follow relevant rules during implementation)
|
|
126
134
|
</files_to_read>
|
|
127
135
|
|
|
128
136
|
<success_criteria>
|
|
@@ -179,12 +187,13 @@ Plans with `autonomous: false` require user interaction.
|
|
|
179
187
|
|
|
180
188
|
**Auto-mode checkpoint handling:**
|
|
181
189
|
|
|
182
|
-
read auto-advance config:
|
|
190
|
+
read auto-advance config (chain flag + user preference):
|
|
183
191
|
```bash
|
|
184
|
-
|
|
192
|
+
AUTO_CHAIN=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow._auto_chain_active 2>/dev/null || echo "false")
|
|
193
|
+
AUTO_CFG=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow.auto_advance 2>/dev/null || echo "false")
|
|
185
194
|
```
|
|
186
195
|
|
|
187
|
-
When executor returns a checkpoint AND `AUTO_CFG` is `"true"
|
|
196
|
+
When executor returns a checkpoint AND (`AUTO_CHAIN` is `"true"` OR `AUTO_CFG` is `"true"`):
|
|
188
197
|
- **human-verify** → Auto-spawn continuation agent with `{user_response}` = `"approved"`. Log `⚡ Auto-approved checkpoint`.
|
|
189
198
|
- **decision** → Auto-spawn continuation agent with `{user_response}` = first option from checkpoint details. Log `⚡ Auto-selected: [option]`.
|
|
190
199
|
- **human-action** → Present to user (existing behavior below). Auth gates cannot be automated.
|
|
@@ -256,7 +265,7 @@ fi
|
|
|
256
265
|
|
|
257
266
|
**2. Find parent UAT file:**
|
|
258
267
|
```bash
|
|
259
|
-
PARENT_INFO=$(node
|
|
268
|
+
PARENT_INFO=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" find-phase "${PARENT_PHASE}" --raw)
|
|
260
269
|
# Extract directory from PARENT_INFO JSON, then find UAT file in that directory
|
|
261
270
|
```
|
|
262
271
|
|
|
@@ -287,17 +296,13 @@ mv .planning/debug/{slug}.md .planning/debug/resolved/
|
|
|
287
296
|
|
|
288
297
|
**6. Commit updated artifacts:**
|
|
289
298
|
```bash
|
|
290
|
-
node
|
|
299
|
+
node "$HOME/.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
|
|
291
300
|
```
|
|
292
301
|
</step>
|
|
293
302
|
|
|
294
303
|
<step name="verify_phase_goal">
|
|
295
304
|
Verify phase achieved its GOAL, not just completed tasks.
|
|
296
305
|
|
|
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
|
-
```
|
|
300
|
-
|
|
301
306
|
```
|
|
302
307
|
task(
|
|
303
308
|
prompt="Verify phase {phase_number} goal achievement.
|
|
@@ -362,7 +367,7 @@ Gap closure cycle: `/gsd-plan-phase {X} --gaps` reads VERIFICATION.md → create
|
|
|
362
367
|
**Mark phase complete and update all tracking files:**
|
|
363
368
|
|
|
364
369
|
```bash
|
|
365
|
-
COMPLETION=$(node
|
|
370
|
+
COMPLETION=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" phase complete "${PHASE_NUMBER}")
|
|
366
371
|
```
|
|
367
372
|
|
|
368
373
|
The CLI handles:
|
|
@@ -375,7 +380,7 @@ The CLI handles:
|
|
|
375
380
|
Extract from result: `next_phase`, `next_phase_name`, `is_last_phase`.
|
|
376
381
|
|
|
377
382
|
```bash
|
|
378
|
-
node
|
|
383
|
+
node "$HOME/.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
|
|
379
384
|
```
|
|
380
385
|
</step>
|
|
381
386
|
|
|
@@ -409,12 +414,13 @@ STOP. Do not proceed to auto-advance or transition.
|
|
|
409
414
|
**Auto-advance detection:**
|
|
410
415
|
|
|
411
416
|
1. Parse `--auto` flag from $ARGUMENTS
|
|
412
|
-
2. read
|
|
417
|
+
2. read both the chain flag and user preference (chain flag already synced in init step):
|
|
413
418
|
```bash
|
|
414
|
-
|
|
419
|
+
AUTO_CHAIN=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow._auto_chain_active 2>/dev/null || echo "false")
|
|
420
|
+
AUTO_CFG=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow.auto_advance 2>/dev/null || echo "false")
|
|
415
421
|
```
|
|
416
422
|
|
|
417
|
-
**If `--auto` flag present OR `AUTO_CFG` is true (AND verification passed with no gaps):**
|
|
423
|
+
**If `--auto` flag present OR `AUTO_CHAIN` is true OR `AUTO_CFG` is true (AND verification passed with no gaps):**
|
|
418
424
|
|
|
419
425
|
```
|
|
420
426
|
╔══════════════════════════════════════════╗
|
|
@@ -425,7 +431,7 @@ STOP. Do not proceed to auto-advance or transition.
|
|
|
425
431
|
|
|
426
432
|
Execute the transition workflow inline (do NOT use task — orchestrator context is ~10-15%, transition needs phase completion data already in context):
|
|
427
433
|
|
|
428
|
-
read and follow
|
|
434
|
+
read and follow `$HOME/.config/opencode/get-shit-done/workflows/transition.md`, passing through the `--auto` flag so it propagates to the next phase invocation.
|
|
429
435
|
|
|
430
436
|
**If neither `--auto` nor `AUTO_CFG` is true:**
|
|
431
437
|
|