gsd-opencode 1.20.4 → 1.22.1
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 +10 -1
- package/agents/gsd-debugger.md +67 -10
- package/agents/gsd-executor.md +37 -16
- package/agents/gsd-integration-checker.md +3 -0
- package/agents/gsd-nyquist-auditor.md +179 -0
- package/agents/gsd-phase-researcher.md +29 -34
- package/agents/gsd-plan-checker.md +43 -78
- package/agents/gsd-planner.md +140 -24
- package/agents/gsd-project-researcher.md +12 -1
- package/agents/gsd-research-synthesizer.md +14 -3
- package/agents/gsd-roadmapper.md +26 -15
- package/agents/gsd-verifier.md +30 -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 +20 -9
- 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-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/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/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
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gsd-plan-checker
|
|
3
3
|
description: Verifies plans will achieve phase goal before execution. Goal-backward analysis of plan quality. Spawned by /gsd-plan-phase orchestrator.
|
|
4
|
+
mode: subagent
|
|
4
5
|
tools:
|
|
5
6
|
read: true
|
|
6
7
|
bash: true
|
|
7
8
|
glob: true
|
|
8
9
|
grep: true
|
|
9
10
|
color: "#008000"
|
|
11
|
+
skills:
|
|
12
|
+
- gsd-plan-checker-workflow
|
|
10
13
|
---
|
|
11
14
|
|
|
12
15
|
<role>
|
|
@@ -35,7 +38,7 @@ Before verifying, discover project context:
|
|
|
35
38
|
|
|
36
39
|
**Project instructions:** read `./AGENTS.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions.
|
|
37
40
|
|
|
38
|
-
**Project skills:** Check `.agents/skills/` directory if
|
|
41
|
+
**Project skills:** Check `.OpenCode/skills/` or `.agents/skills/` directory if either exists:
|
|
39
42
|
1. List available skills (subdirectories)
|
|
40
43
|
2. read `SKILL.md` for each skill (lightweight index ~130 lines)
|
|
41
44
|
3. Load specific `rules/*.md` files as needed during verification
|
|
@@ -318,102 +321,61 @@ issue:
|
|
|
318
321
|
|
|
319
322
|
## Dimension 8: Nyquist Compliance
|
|
320
323
|
|
|
321
|
-
|
|
322
|
-
Skip this entire dimension if:
|
|
323
|
-
- workflow.nyquist_validation is false in .planning/config.json
|
|
324
|
-
- The phase being checked has no RESEARCH.md (researcher was skipped)
|
|
325
|
-
- The RESEARCH.md has no "Validation Architecture" section (researcher ran without Nyquist)
|
|
324
|
+
Skip if: `workflow.nyquist_validation` is explicitly set to `false` in config.json (absent key = enabled), phase has no RESEARCH.md, or RESEARCH.md has no "Validation Architecture" section. Output: "Dimension 8: SKIPPED (nyquist_validation disabled or not applicable)"
|
|
326
325
|
|
|
327
|
-
|
|
328
|
-
</dimension_8_skip_condition>
|
|
326
|
+
### Check 8e — VALIDATION.md Existence (Gate)
|
|
329
327
|
|
|
330
|
-
|
|
331
|
-
This dimension enforces the Nyquist-Shannon Sampling Theorem for AI code generation:
|
|
332
|
-
if OpenCode's executor produces output at high frequency (one task per commit), feedback
|
|
333
|
-
must run at equally high frequency. A plan that produces code without pre-defined
|
|
334
|
-
automated verification is under-sampled — errors will be statistically missed.
|
|
328
|
+
Before running checks 8a-8d, verify VALIDATION.md exists:
|
|
335
329
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
330
|
+
```bash
|
|
331
|
+
ls "${PHASE_DIR}"/*-VALIDATION.md 2>/dev/null
|
|
332
|
+
```
|
|
339
333
|
|
|
340
|
-
|
|
334
|
+
**If missing:** **BLOCKING FAIL** — "VALIDATION.md not found for phase {N}. Re-run `/gsd-plan-phase {N} --research` to regenerate."
|
|
335
|
+
Skip checks 8a-8d entirely. Report Dimension 8 as FAIL with this single issue.
|
|
341
336
|
|
|
342
|
-
|
|
337
|
+
**If exists:** Proceed to checks 8a-8d.
|
|
343
338
|
|
|
344
|
-
|
|
345
|
-
2. If `<automated>` is absent or empty:
|
|
346
|
-
- Is there a Wave 0 dependency that creates the test before this task runs?
|
|
347
|
-
- If no Wave 0 dependency exists → **BLOCKING FAIL**
|
|
348
|
-
3. If `<automated>` says "MISSING":
|
|
349
|
-
- A Wave 0 task must reference the same test file path → verify this link is present
|
|
350
|
-
- If the link is broken → **BLOCKING FAIL**
|
|
339
|
+
### Check 8a — Automated Verify Presence
|
|
351
340
|
|
|
352
|
-
|
|
353
|
-
|
|
341
|
+
For each `<task>` in each plan:
|
|
342
|
+
- `<verify>` must contain `<automated>` command, OR a Wave 0 dependency that creates the test first
|
|
343
|
+
- If `<automated>` is absent with no Wave 0 dependency → **BLOCKING FAIL**
|
|
344
|
+
- If `<automated>` says "MISSING", a Wave 0 task must reference the same test file path → **BLOCKING FAIL** if link broken
|
|
354
345
|
|
|
355
346
|
### Check 8b — Feedback Latency Assessment
|
|
356
347
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
2. Does the command include `--watchAll` or equivalent watch mode flags?
|
|
362
|
-
- If yes: **BLOCKING FAIL** — watch mode is not suitable for CI/post-commit sampling
|
|
363
|
-
3. Does the command include `sleep`, `wait`, or arbitrary delays > 30 seconds?
|
|
364
|
-
- If yes: **WARNING** — flag as latency risk
|
|
348
|
+
For each `<automated>` command:
|
|
349
|
+
- Full E2E suite (playwright, cypress, selenium) → **WARNING** — suggest faster unit/smoke test
|
|
350
|
+
- Watch mode flags (`--watchAll`) → **BLOCKING FAIL**
|
|
351
|
+
- Delays > 30 seconds → **WARNING**
|
|
365
352
|
|
|
366
353
|
### Check 8c — Sampling Continuity
|
|
367
354
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
1. Map each task to its wave number
|
|
371
|
-
2. For each consecutive window of 3 tasks in the same wave: at least 2 must have
|
|
372
|
-
an `<automated>` verify command (not just Wave 0 scaffolding)
|
|
373
|
-
3. If any 3 consecutive implementation tasks all lack automated verify: **BLOCKING FAIL**
|
|
355
|
+
Map tasks to waves. Per wave, any consecutive window of 3 implementation tasks must have ≥2 with `<automated>` verify. 3 consecutive without → **BLOCKING FAIL**.
|
|
374
356
|
|
|
375
357
|
### Check 8d — Wave 0 Completeness
|
|
376
358
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
3. Is the Wave 0 task in a plan that executes BEFORE the dependent task?
|
|
359
|
+
For each `<automated>MISSING</automated>` reference:
|
|
360
|
+
- Wave 0 task must exist with matching `<files>` path
|
|
361
|
+
- Wave 0 plan must execute before dependent task
|
|
362
|
+
- Missing match → **BLOCKING FAIL**
|
|
382
363
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
### Dimension 8 Output Block
|
|
386
|
-
|
|
387
|
-
Include this block in the plan-checker report:
|
|
364
|
+
### Dimension 8 Output
|
|
388
365
|
|
|
389
366
|
```
|
|
390
367
|
## Dimension 8: Nyquist Compliance
|
|
391
368
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
| {task name} | {plan} | {wave} | `{command}` | ~{N}s | ✅ PASS / ❌ FAIL |
|
|
396
|
-
|
|
397
|
-
### Sampling Continuity Check
|
|
398
|
-
Wave {N}: {X}/{Y} tasks verified → ✅ PASS / ❌ FAIL
|
|
399
|
-
|
|
400
|
-
### Wave 0 Completeness
|
|
401
|
-
- {test file} → Wave 0 task present ✅ / MISSING ❌
|
|
369
|
+
| task | Plan | Wave | Automated Command | Status |
|
|
370
|
+
|------|------|------|-------------------|--------|
|
|
371
|
+
| {task} | {plan} | {wave} | `{command}` | ✅ / ❌ |
|
|
402
372
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
Return to planner with the following required changes:
|
|
407
|
-
{list of specific fixes needed}
|
|
373
|
+
Sampling: Wave {N}: {X}/{Y} verified → ✅ / ❌
|
|
374
|
+
Wave 0: {test file} → ✅ present / ❌ MISSING
|
|
375
|
+
Overall: ✅ PASS / ❌ FAIL
|
|
408
376
|
```
|
|
409
377
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
If Dimension 8 FAILS:
|
|
413
|
-
- Return to `gsd-planner` with the specific revision instructions above
|
|
414
|
-
- The planner must address ALL failing checks before returning
|
|
415
|
-
- This follows the same loop behavior as existing dimensions
|
|
416
|
-
- Maximum 3 revision loops for Dimension 8 before escalating to user
|
|
378
|
+
If FAIL: return to planner with specific fixes. Same revision loop as other dimensions (max 3 loops).
|
|
417
379
|
|
|
418
380
|
</verification_dimensions>
|
|
419
381
|
|
|
@@ -423,7 +385,8 @@ If Dimension 8 FAILS:
|
|
|
423
385
|
|
|
424
386
|
Load phase operation context:
|
|
425
387
|
```bash
|
|
426
|
-
INIT=$(node
|
|
388
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE_ARG}")
|
|
389
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
427
390
|
```
|
|
428
391
|
|
|
429
392
|
Extract from init JSON: `phase_dir`, `phase_number`, `has_plans`, `plan_count`.
|
|
@@ -434,7 +397,7 @@ Orchestrator provides CONTEXT.md content in the verification prompt. If provided
|
|
|
434
397
|
ls "$phase_dir"/*-PLAN.md 2>/dev/null
|
|
435
398
|
# read research for Nyquist validation data
|
|
436
399
|
cat "$phase_dir"/*-RESEARCH.md 2>/dev/null
|
|
437
|
-
node
|
|
400
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" roadmap get-phase "$phase_number"
|
|
438
401
|
ls "$phase_dir"/*-BRIEF.md 2>/dev/null
|
|
439
402
|
```
|
|
440
403
|
|
|
@@ -447,7 +410,7 @@ Use gsd-tools to validate plan structure:
|
|
|
447
410
|
```bash
|
|
448
411
|
for plan in "$PHASE_DIR"/*-PLAN.md; do
|
|
449
412
|
echo "=== $plan ==="
|
|
450
|
-
PLAN_STRUCTURE=$(node
|
|
413
|
+
PLAN_STRUCTURE=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" verify plan-structure "$plan")
|
|
451
414
|
echo "$PLAN_STRUCTURE"
|
|
452
415
|
done
|
|
453
416
|
```
|
|
@@ -465,7 +428,7 @@ Map errors/warnings to verification dimensions:
|
|
|
465
428
|
Extract must_haves from each plan using gsd-tools:
|
|
466
429
|
|
|
467
430
|
```bash
|
|
468
|
-
MUST_HAVES=$(node
|
|
431
|
+
MUST_HAVES=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" frontmatter get "$PLAN_PATH" --field must_haves)
|
|
469
432
|
```
|
|
470
433
|
|
|
471
434
|
Returns JSON: `{ truths: [...], artifacts: [...], key_links: [...] }`
|
|
@@ -503,12 +466,14 @@ Session persists | 01 | 3 | COVERED
|
|
|
503
466
|
|
|
504
467
|
For each requirement: find covering task(s), verify action is specific, flag gaps.
|
|
505
468
|
|
|
469
|
+
**Exhaustive cross-check:** Also read PROJECT.md requirements (not just phase goal). Verify no PROJECT.md requirement relevant to this phase is silently dropped. A requirement is "relevant" if the ROADMAP.md explicitly maps it to this phase or if the phase goal directly implies it — do NOT flag requirements that belong to other phases or future work. Any unmapped relevant requirement is an automatic blocker — list it explicitly in issues.
|
|
470
|
+
|
|
506
471
|
## Step 5: Validate task Structure
|
|
507
472
|
|
|
508
473
|
Use gsd-tools plan-structure verification (already run in Step 2):
|
|
509
474
|
|
|
510
475
|
```bash
|
|
511
|
-
PLAN_STRUCTURE=$(node
|
|
476
|
+
PLAN_STRUCTURE=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" verify plan-structure "$PLAN_PATH")
|
|
512
477
|
```
|
|
513
478
|
|
|
514
479
|
The `tasks` array in the result shows each task's completeness:
|
package/agents/gsd-planner.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gsd-planner
|
|
3
3
|
description: Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification. Spawned by /gsd-plan-phase orchestrator.
|
|
4
|
+
mode: subagent
|
|
4
5
|
tools:
|
|
5
6
|
read: true
|
|
6
7
|
write: true
|
|
@@ -10,6 +11,14 @@ tools:
|
|
|
10
11
|
webfetch: true
|
|
11
12
|
mcp__context7__*: true
|
|
12
13
|
color: "#008000"
|
|
14
|
+
skills:
|
|
15
|
+
- gsd-planner-workflow
|
|
16
|
+
# hooks:
|
|
17
|
+
# PostToolUse:
|
|
18
|
+
# - matcher: "write|edit"
|
|
19
|
+
# hooks:
|
|
20
|
+
# - type: command
|
|
21
|
+
# command: "npx eslint --fix $FILE 2>/dev/null || true"
|
|
13
22
|
---
|
|
14
23
|
|
|
15
24
|
<role>
|
|
@@ -40,7 +49,7 @@ Before planning, discover project context:
|
|
|
40
49
|
|
|
41
50
|
**Project instructions:** read `./AGENTS.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions.
|
|
42
51
|
|
|
43
|
-
**Project skills:** Check `.agents/skills/` directory if
|
|
52
|
+
**Project skills:** Check `.OpenCode/skills/` or `.agents/skills/` directory if either exists:
|
|
44
53
|
1. List available skills (subdirectories)
|
|
45
54
|
2. read `SKILL.md` for each skill (lightweight index ~130 lines)
|
|
46
55
|
3. Load specific `rules/*.md` files as needed during planning
|
|
@@ -164,21 +173,19 @@ Every task has four required fields:
|
|
|
164
173
|
- Good: "Create POST endpoint accepting {email, password}, validates using bcrypt against User table, returns JWT in httpOnly cookie with 15-min expiry. Use jose library (not jsonwebtoken - CommonJS issues with Edge runtime)."
|
|
165
174
|
- Bad: "Add authentication", "Make login work"
|
|
166
175
|
|
|
167
|
-
**<verify>:** How to prove the task is complete.
|
|
176
|
+
**<verify>:** How to prove the task is complete.
|
|
168
177
|
|
|
169
178
|
```xml
|
|
170
179
|
<verify>
|
|
171
180
|
<automated>pytest tests/test_module.py::test_behavior -x</automated>
|
|
172
|
-
<manual>Optional: human-readable description of what to check</manual>
|
|
173
|
-
<sampling_rate>run after this task commits, before next task begins</sampling_rate>
|
|
174
181
|
</verify>
|
|
175
182
|
```
|
|
176
183
|
|
|
177
184
|
- Good: Specific automated command that runs in < 60 seconds
|
|
178
185
|
- Bad: "It works", "Looks good", manual-only verification
|
|
179
|
-
- Simple format also accepted: `npm test` passes, `curl -X POST /api/auth/login` returns 200
|
|
186
|
+
- Simple format also accepted: `npm test` passes, `curl -X POST /api/auth/login` returns 200
|
|
180
187
|
|
|
181
|
-
**Nyquist Rule:** Every `<verify>` must include an `<automated>` command. If no test exists yet
|
|
188
|
+
**Nyquist Rule:** Every `<verify>` must include an `<automated>` command. If no test exists yet, set `<automated>MISSING — Wave 0 must create {test_file} first</automated>` and create a Wave 0 task that generates the test scaffold.
|
|
182
189
|
|
|
183
190
|
**<done>:** Acceptance criteria - measurable state of completion.
|
|
184
191
|
- Good: "Valid credentials return 200 + JWT cookie, invalid credentials return 401"
|
|
@@ -209,6 +216,16 @@ Each task: **15-60 minutes** OpenCode execution time.
|
|
|
209
216
|
|
|
210
217
|
**Combine signals:** One task sets up for the next, separate tasks touch same file, neither meaningful alone.
|
|
211
218
|
|
|
219
|
+
## Interface-First task Ordering
|
|
220
|
+
|
|
221
|
+
When a plan creates new interfaces consumed by subsequent tasks:
|
|
222
|
+
|
|
223
|
+
1. **First task: Define contracts** — Create type files, interfaces, exports
|
|
224
|
+
2. **Middle tasks: Implement** — Build against the defined contracts
|
|
225
|
+
3. **Last task: Wire** — Connect implementations to consumers
|
|
226
|
+
|
|
227
|
+
This prevents the "scavenger hunt" anti-pattern where executors explore the codebase to understand contracts. They receive the contracts in the plan itself.
|
|
228
|
+
|
|
212
229
|
## Specificity Examples
|
|
213
230
|
|
|
214
231
|
| TOO VAGUE | JUST RIGHT |
|
|
@@ -233,6 +250,26 @@ Each task: **15-60 minutes** OpenCode execution time.
|
|
|
233
250
|
|
|
234
251
|
**Why TDD gets own plan:** TDD requires RED→GREEN→REFACTOR cycles consuming 40-50% context. Embedding in multi-task plans degrades quality.
|
|
235
252
|
|
|
253
|
+
**task-level TDD** (for code-producing tasks in standard plans): When a task creates or modifies production code, add `tdd="true"` and a `<behavior>` block to make test expectations explicit before implementation:
|
|
254
|
+
|
|
255
|
+
```xml
|
|
256
|
+
<task type="auto" tdd="true">
|
|
257
|
+
<name>task: [name]</name>
|
|
258
|
+
<files>src/feature.ts, src/feature.test.ts</files>
|
|
259
|
+
<behavior>
|
|
260
|
+
- Test 1: [expected behavior]
|
|
261
|
+
- Test 2: [edge case]
|
|
262
|
+
</behavior>
|
|
263
|
+
<action>[Implementation after tests pass]</action>
|
|
264
|
+
<verify>
|
|
265
|
+
<automated>npm test -- --filter=feature</automated>
|
|
266
|
+
</verify>
|
|
267
|
+
<done>[Criteria]</done>
|
|
268
|
+
</task>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Exceptions where `tdd="true"` is not needed: `type="checkpoint:*"` tasks, configuration-only files, documentation, migration scripts, glue code wiring existing tested components, styling-only changes.
|
|
272
|
+
|
|
236
273
|
## User Setup Detection
|
|
237
274
|
|
|
238
275
|
For tasks involving external services, identify human-required configuration:
|
|
@@ -342,15 +379,15 @@ Plans should complete within ~50% context (not 80%). No context anxiety, quality
|
|
|
342
379
|
|
|
343
380
|
**CONSIDER splitting:** >5 files total, complex domains, uncertainty about approach, natural semantic boundaries.
|
|
344
381
|
|
|
345
|
-
##
|
|
382
|
+
## Granularity Calibration
|
|
346
383
|
|
|
347
|
-
|
|
|
348
|
-
|
|
349
|
-
|
|
|
384
|
+
| Granularity | Typical Plans/Phase | Tasks/Plan |
|
|
385
|
+
|-------------|---------------------|------------|
|
|
386
|
+
| Coarse | 1-3 | 2-3 |
|
|
350
387
|
| Standard | 3-5 | 2-3 |
|
|
351
|
-
|
|
|
388
|
+
| Fine | 5-10 | 2-3 |
|
|
352
389
|
|
|
353
|
-
Derive plans from actual work.
|
|
390
|
+
Derive plans from actual work. Granularity determines compression tolerance, not a target. Don't pad small work to hit a number. Don't compress complex work to look efficient.
|
|
354
391
|
|
|
355
392
|
## Context Per task Estimates
|
|
356
393
|
|
|
@@ -399,8 +436,8 @@ Output: [Artifacts created]
|
|
|
399
436
|
</objective>
|
|
400
437
|
|
|
401
438
|
<execution_context>
|
|
402
|
-
|
|
403
|
-
|
|
439
|
+
@$HOME/.config/opencode/get-shit-done/workflows/execute-plan.md
|
|
440
|
+
@$HOME/.config/opencode/get-shit-done/templates/summary.md
|
|
404
441
|
</execution_context>
|
|
405
442
|
|
|
406
443
|
<context>
|
|
@@ -454,6 +491,69 @@ After completion, create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
|
|
|
454
491
|
|
|
455
492
|
Wave numbers are pre-computed during planning. Execute-phase reads `wave` directly from frontmatter.
|
|
456
493
|
|
|
494
|
+
## Interface Context for Executors
|
|
495
|
+
|
|
496
|
+
**Key insight:** "The difference between handing a contractor blueprints versus telling them 'build me a house.'"
|
|
497
|
+
|
|
498
|
+
When creating plans that depend on existing code or create new interfaces consumed by other plans:
|
|
499
|
+
|
|
500
|
+
### For plans that USE existing code:
|
|
501
|
+
After determining `files_modified`, extract the key interfaces/types/exports from the codebase that executors will need:
|
|
502
|
+
|
|
503
|
+
```bash
|
|
504
|
+
# Extract type definitions, interfaces, and exports from relevant files
|
|
505
|
+
grep -n "export\|interface\|type\|class\|function" {relevant_source_files} 2>/dev/null | head -50
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
Embed these in the plan's `<context>` section as an `<interfaces>` block:
|
|
509
|
+
|
|
510
|
+
```xml
|
|
511
|
+
<interfaces>
|
|
512
|
+
<!-- Key types and contracts the executor needs. Extracted from codebase. -->
|
|
513
|
+
<!-- Executor should use these directly — no codebase exploration needed. -->
|
|
514
|
+
|
|
515
|
+
From src/types/user.ts:
|
|
516
|
+
```typescript
|
|
517
|
+
export interface User {
|
|
518
|
+
id: string;
|
|
519
|
+
email: string;
|
|
520
|
+
name: string;
|
|
521
|
+
createdAt: Date;
|
|
522
|
+
}
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
From src/api/auth.ts:
|
|
526
|
+
```typescript
|
|
527
|
+
export function validateToken(token: string): Promise<User | null>;
|
|
528
|
+
export function createSession(user: User): Promise<SessionToken>;
|
|
529
|
+
```
|
|
530
|
+
</interfaces>
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
### For plans that CREATE new interfaces:
|
|
534
|
+
If this plan creates types/interfaces that later plans depend on, include a "Wave 0" skeleton step:
|
|
535
|
+
|
|
536
|
+
```xml
|
|
537
|
+
<task type="auto">
|
|
538
|
+
<name>task 0: write interface contracts</name>
|
|
539
|
+
<files>src/types/newFeature.ts</files>
|
|
540
|
+
<action>Create type definitions that downstream plans will implement against. These are the contracts — implementation comes in later tasks.</action>
|
|
541
|
+
<verify>File exists with exported types, no implementation</verify>
|
|
542
|
+
<done>Interface file committed, types exported</done>
|
|
543
|
+
</task>
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### When to include interfaces:
|
|
547
|
+
- Plan touches files that import from other modules → extract those module's exports
|
|
548
|
+
- Plan creates a new API endpoint → extract the request/response types
|
|
549
|
+
- Plan modifies a component → extract its props interface
|
|
550
|
+
- Plan depends on a previous plan's output → extract the types from that plan's files_modified
|
|
551
|
+
|
|
552
|
+
### When to skip:
|
|
553
|
+
- Plan is self-contained (creates everything from scratch, no imports)
|
|
554
|
+
- Plan is pure configuration (no code interfaces involved)
|
|
555
|
+
- Level 0 discovery (all patterns already established)
|
|
556
|
+
|
|
457
557
|
## Context Section Rules
|
|
458
558
|
|
|
459
559
|
Only include prior plan SUMMARY references if genuinely needed (uses types/exports from prior plan, or prior plan made decision affecting this one).
|
|
@@ -760,15 +860,20 @@ grep -l "status: diagnosed" "$phase_dir"/*-UAT.md 2>/dev/null
|
|
|
760
860
|
</task>
|
|
761
861
|
```
|
|
762
862
|
|
|
763
|
-
**7.
|
|
863
|
+
**7. Assign waves using standard dependency analysis** (same as `assign_waves` step):
|
|
864
|
+
- Plans with no dependencies → wave 1
|
|
865
|
+
- Plans that depend on other gap closure plans → max(dependency waves) + 1
|
|
866
|
+
- Also consider dependencies on existing (non-gap) plans in the phase
|
|
867
|
+
|
|
868
|
+
**8. write PLAN.md files:**
|
|
764
869
|
|
|
765
870
|
```yaml
|
|
766
871
|
---
|
|
767
872
|
phase: XX-name
|
|
768
873
|
plan: NN # Sequential after existing
|
|
769
874
|
type: execute
|
|
770
|
-
wave:
|
|
771
|
-
depends_on: []
|
|
875
|
+
wave: N # Computed from depends_on (see assign_waves)
|
|
876
|
+
depends_on: [...] # Other plans this depends on (gap or existing)
|
|
772
877
|
files_modified: [...]
|
|
773
878
|
autonomous: true
|
|
774
879
|
gap_closure: true # Flag for tracking
|
|
@@ -836,7 +941,7 @@ Group by plan, dimension, severity.
|
|
|
836
941
|
### Step 6: Commit
|
|
837
942
|
|
|
838
943
|
```bash
|
|
839
|
-
node
|
|
944
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "fix($PHASE): revise plans based on checker feedback" --files .planning/phases/$PHASE-*/$PHASE-*-PLAN.md
|
|
840
945
|
```
|
|
841
946
|
|
|
842
947
|
### Step 7: Return Revision Summary
|
|
@@ -875,7 +980,8 @@ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "fix($PHASE): rev
|
|
|
875
980
|
Load planning context:
|
|
876
981
|
|
|
877
982
|
```bash
|
|
878
|
-
INIT=$(node
|
|
983
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init plan-phase "${PHASE}")
|
|
984
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
879
985
|
```
|
|
880
986
|
|
|
881
987
|
Extract from init JSON: `planner_model`, `researcher_model`, `checker_model`, `commit_docs`, `research_enabled`, `phase_dir`, `phase_number`, `has_research`, `has_context`.
|
|
@@ -931,7 +1037,7 @@ Apply discovery level protocol (see discovery_levels section).
|
|
|
931
1037
|
|
|
932
1038
|
**Step 1 — Generate digest index:**
|
|
933
1039
|
```bash
|
|
934
|
-
node
|
|
1040
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" history-digest
|
|
935
1041
|
```
|
|
936
1042
|
|
|
937
1043
|
**Step 2 — Select relevant phases (typically 2-4):**
|
|
@@ -963,6 +1069,16 @@ For phases not selected, retain from digest:
|
|
|
963
1069
|
- `patterns`: Conventions to follow
|
|
964
1070
|
|
|
965
1071
|
**From STATE.md:** Decisions → constrain approach. Pending todos → candidates.
|
|
1072
|
+
|
|
1073
|
+
**From RETROSPECTIVE.md (if exists):**
|
|
1074
|
+
```bash
|
|
1075
|
+
cat .planning/RETROSPECTIVE.md 2>/dev/null | tail -100
|
|
1076
|
+
```
|
|
1077
|
+
|
|
1078
|
+
read the most recent milestone retrospective and cross-milestone trends. Extract:
|
|
1079
|
+
- **Patterns to follow** from "What Worked" and "Patterns Established"
|
|
1080
|
+
- **Patterns to avoid** from "What Was Inefficient" and "Key Lessons"
|
|
1081
|
+
- **Cost patterns** to inform model selection and agent strategy
|
|
966
1082
|
</step>
|
|
967
1083
|
|
|
968
1084
|
<step name="gather_phase_context">
|
|
@@ -1028,7 +1144,7 @@ Apply goal-backward methodology (see goal_backward section):
|
|
|
1028
1144
|
</step>
|
|
1029
1145
|
|
|
1030
1146
|
<step name="estimate_scope">
|
|
1031
|
-
Verify each plan fits context budget: 2-3 tasks, ~50% target. Split if necessary. Check
|
|
1147
|
+
Verify each plan fits context budget: 2-3 tasks, ~50% target. Split if necessary. Check granularity setting.
|
|
1032
1148
|
</step>
|
|
1033
1149
|
|
|
1034
1150
|
<step name="confirm_breakdown">
|
|
@@ -1049,7 +1165,7 @@ Include all frontmatter fields.
|
|
|
1049
1165
|
Validate each created PLAN.md using gsd-tools:
|
|
1050
1166
|
|
|
1051
1167
|
```bash
|
|
1052
|
-
VALID=$(node
|
|
1168
|
+
VALID=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" frontmatter validate "$PLAN_PATH" --schema plan)
|
|
1053
1169
|
```
|
|
1054
1170
|
|
|
1055
1171
|
Returns JSON: `{ valid, missing, present, schema }`
|
|
@@ -1062,7 +1178,7 @@ Required plan frontmatter fields:
|
|
|
1062
1178
|
Also validate plan structure:
|
|
1063
1179
|
|
|
1064
1180
|
```bash
|
|
1065
|
-
STRUCTURE=$(node
|
|
1181
|
+
STRUCTURE=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" verify plan-structure "$PLAN_PATH")
|
|
1066
1182
|
```
|
|
1067
1183
|
|
|
1068
1184
|
Returns JSON: `{ valid, errors, warnings, task_count, tasks }`
|
|
@@ -1099,7 +1215,7 @@ Plans:
|
|
|
1099
1215
|
|
|
1100
1216
|
<step name="git_commit">
|
|
1101
1217
|
```bash
|
|
1102
|
-
node
|
|
1218
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs($PHASE): create phase plan" --files .planning/phases/$PHASE-*/$PHASE-*-PLAN.md .planning/ROADMAP.md
|
|
1103
1219
|
```
|
|
1104
1220
|
</step>
|
|
1105
1221
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gsd-project-researcher
|
|
3
3
|
description: Researches domain ecosystem before roadmap creation. Produces files in .planning/research/ consumed during roadmap creation. Spawned by /gsd-new-project or /gsd-new-milestone orchestrators.
|
|
4
|
+
mode: subagent
|
|
4
5
|
tools:
|
|
5
6
|
read: true
|
|
6
7
|
write: true
|
|
@@ -11,6 +12,14 @@ tools:
|
|
|
11
12
|
webfetch: true
|
|
12
13
|
mcp__context7__*: true
|
|
13
14
|
color: "#00FFFF"
|
|
15
|
+
skills:
|
|
16
|
+
- gsd-researcher-workflow
|
|
17
|
+
# hooks:
|
|
18
|
+
# PostToolUse:
|
|
19
|
+
# - matcher: "write|edit"
|
|
20
|
+
# hooks:
|
|
21
|
+
# - type: command
|
|
22
|
+
# command: "npx eslint --fix $FILE 2>/dev/null || true"
|
|
14
23
|
---
|
|
15
24
|
|
|
16
25
|
<role>
|
|
@@ -107,7 +116,7 @@ Always include current year. Use multiple query variations. Mark websearch-only
|
|
|
107
116
|
Check `brave_search` from orchestrator context. If `true`, use Brave Search for higher quality results:
|
|
108
117
|
|
|
109
118
|
```bash
|
|
110
|
-
node
|
|
119
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" websearch "your query" --limit 10
|
|
111
120
|
```
|
|
112
121
|
|
|
113
122
|
**Options:**
|
|
@@ -526,6 +535,8 @@ Run pre-submission checklist (see verification_protocol).
|
|
|
526
535
|
|
|
527
536
|
## Step 5: write Output Files
|
|
528
537
|
|
|
538
|
+
**ALWAYS use the write tool to create files** — never use `bash(cat << 'EOF')` or heredoc commands for file creation.
|
|
539
|
+
|
|
529
540
|
In `.planning/research/`:
|
|
530
541
|
1. **SUMMARY.md** — Always
|
|
531
542
|
2. **STACK.md** — Always
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gsd-research-synthesizer
|
|
3
3
|
description: Synthesizes research outputs from parallel researcher agents into SUMMARY.md. Spawned by /gsd-new-project after 4 researcher agents complete.
|
|
4
|
+
mode: subagent
|
|
4
5
|
tools:
|
|
5
6
|
read: true
|
|
6
7
|
write: true
|
|
7
8
|
bash: true
|
|
8
9
|
color: "#800080"
|
|
10
|
+
skills:
|
|
11
|
+
- gsd-synthesizer-workflow
|
|
12
|
+
# hooks:
|
|
13
|
+
# PostToolUse:
|
|
14
|
+
# - matcher: "write|edit"
|
|
15
|
+
# hooks:
|
|
16
|
+
# - type: command
|
|
17
|
+
# command: "npx eslint --fix $FILE 2>/dev/null || true"
|
|
9
18
|
---
|
|
10
19
|
|
|
11
20
|
<role>
|
|
@@ -125,7 +134,9 @@ Identify gaps that couldn't be resolved and need attention during planning.
|
|
|
125
134
|
|
|
126
135
|
## Step 6: write SUMMARY.md
|
|
127
136
|
|
|
128
|
-
|
|
137
|
+
**ALWAYS use the write tool to create files** — never use `bash(cat << 'EOF')` or heredoc commands for file creation.
|
|
138
|
+
|
|
139
|
+
Use template: $HOME/.config/opencode/get-shit-done/templates/research-project/SUMMARY.md
|
|
129
140
|
|
|
130
141
|
write to `.planning/research/SUMMARY.md`
|
|
131
142
|
|
|
@@ -134,7 +145,7 @@ write to `.planning/research/SUMMARY.md`
|
|
|
134
145
|
The 4 parallel researcher agents write files but do NOT commit. You commit everything together.
|
|
135
146
|
|
|
136
147
|
```bash
|
|
137
|
-
node
|
|
148
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: complete project research" --files .planning/research/
|
|
138
149
|
```
|
|
139
150
|
|
|
140
151
|
## Step 8: Return Summary
|
|
@@ -145,7 +156,7 @@ Return brief confirmation with key points for the orchestrator.
|
|
|
145
156
|
|
|
146
157
|
<output_format>
|
|
147
158
|
|
|
148
|
-
Use template:
|
|
159
|
+
Use template: $HOME/.config/opencode/get-shit-done/templates/research-project/SUMMARY.md
|
|
149
160
|
|
|
150
161
|
Key sections:
|
|
151
162
|
- Executive Summary (2-3 paragraphs)
|