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