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
|
@@ -8,6 +8,14 @@ tools:
|
|
|
8
8
|
glob: true
|
|
9
9
|
write: true
|
|
10
10
|
color: "#00FFFF"
|
|
11
|
+
skills:
|
|
12
|
+
- gsd-mapper-workflow
|
|
13
|
+
# hooks:
|
|
14
|
+
# PostToolUse:
|
|
15
|
+
# - matcher: "write|edit"
|
|
16
|
+
# hooks:
|
|
17
|
+
# - type: command
|
|
18
|
+
# command: "npx eslint --fix $FILE 2>/dev/null || true"
|
|
11
19
|
---
|
|
12
20
|
|
|
13
21
|
<role>
|
|
@@ -153,7 +161,7 @@ write document(s) to `.planning/codebase/` using the templates below.
|
|
|
153
161
|
3. If something is not found, use "Not detected" or "Not applicable"
|
|
154
162
|
4. Always include file paths with backticks
|
|
155
163
|
|
|
156
|
-
|
|
164
|
+
**ALWAYS use the write tool to create files** — never use `bash(cat << 'EOF')` or heredoc commands for file creation.
|
|
157
165
|
</step>
|
|
158
166
|
|
|
159
167
|
<step name="return_confirmation">
|
package/agents/gsd-debugger.md
CHANGED
|
@@ -10,6 +10,14 @@ tools:
|
|
|
10
10
|
glob: true
|
|
11
11
|
websearch: true
|
|
12
12
|
color: "#FFA500"
|
|
13
|
+
skills:
|
|
14
|
+
- gsd-debugger-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>
|
|
@@ -747,7 +755,7 @@ DEBUG_RESOLVED_DIR=.planning/debug/resolved
|
|
|
747
755
|
|
|
748
756
|
```markdown
|
|
749
757
|
---
|
|
750
|
-
status: gathering | investigating | fixing | verifying | resolved
|
|
758
|
+
status: gathering | investigating | fixing | verifying | awaiting_human_verify | resolved
|
|
751
759
|
trigger: "[verbatim user input]"
|
|
752
760
|
created: [ISO timestamp]
|
|
753
761
|
updated: [ISO timestamp]
|
|
@@ -811,10 +819,10 @@ files_changed: []
|
|
|
811
819
|
## Status Transitions
|
|
812
820
|
|
|
813
821
|
```
|
|
814
|
-
gathering -> investigating -> fixing -> verifying -> resolved
|
|
815
|
-
^ | |
|
|
816
|
-
|____________|___________|
|
|
817
|
-
(if verification fails)
|
|
822
|
+
gathering -> investigating -> fixing -> verifying -> awaiting_human_verify -> resolved
|
|
823
|
+
^ | | |
|
|
824
|
+
|____________|___________|_________________|
|
|
825
|
+
(if verification fails or user reports issue)
|
|
818
826
|
```
|
|
819
827
|
|
|
820
828
|
## Resume Behavior
|
|
@@ -856,6 +864,8 @@ ls .planning/debug/*.md 2>/dev/null | grep -v resolved
|
|
|
856
864
|
<step name="create_debug_file">
|
|
857
865
|
**Create debug file IMMEDIATELY.**
|
|
858
866
|
|
|
867
|
+
**ALWAYS use the write tool to create files** — never use `bash(cat << 'EOF')` or heredoc commands for file creation.
|
|
868
|
+
|
|
859
869
|
1. Generate slug from user input (lowercase, hyphens, max 30 chars)
|
|
860
870
|
2. `mkdir -p .planning/debug`
|
|
861
871
|
3. Create file with initial state:
|
|
@@ -917,6 +927,7 @@ Based on status:
|
|
|
917
927
|
- "investigating" -> Continue investigation_loop from Current Focus
|
|
918
928
|
- "fixing" -> Continue fix_and_verify
|
|
919
929
|
- "verifying" -> Continue verification
|
|
930
|
+
- "awaiting_human_verify" -> Wait for checkpoint response and either finalize or continue investigation
|
|
920
931
|
</step>
|
|
921
932
|
|
|
922
933
|
<step name="return_diagnosis">
|
|
@@ -976,11 +987,52 @@ Update status to "fixing".
|
|
|
976
987
|
- Update status to "verifying"
|
|
977
988
|
- Test against original Symptoms
|
|
978
989
|
- If verification FAILS: status -> "investigating", return to investigation_loop
|
|
979
|
-
- If verification PASSES: Update Resolution.verification, proceed to
|
|
990
|
+
- If verification PASSES: Update Resolution.verification, proceed to request_human_verification
|
|
991
|
+
</step>
|
|
992
|
+
|
|
993
|
+
<step name="request_human_verification">
|
|
994
|
+
**Require user confirmation before marking resolved.**
|
|
995
|
+
|
|
996
|
+
Update status to "awaiting_human_verify".
|
|
997
|
+
|
|
998
|
+
Return:
|
|
999
|
+
|
|
1000
|
+
```markdown
|
|
1001
|
+
## CHECKPOINT REACHED
|
|
1002
|
+
|
|
1003
|
+
**Type:** human-verify
|
|
1004
|
+
**Debug Session:** .planning/debug/{slug}.md
|
|
1005
|
+
**Progress:** {evidence_count} evidence entries, {eliminated_count} hypotheses eliminated
|
|
1006
|
+
|
|
1007
|
+
### Investigation State
|
|
1008
|
+
|
|
1009
|
+
**Current Hypothesis:** {from Current Focus}
|
|
1010
|
+
**Evidence So Far:**
|
|
1011
|
+
- {key finding 1}
|
|
1012
|
+
- {key finding 2}
|
|
1013
|
+
|
|
1014
|
+
### Checkpoint Details
|
|
1015
|
+
|
|
1016
|
+
**Need verification:** confirm the original issue is resolved in your real workflow/environment
|
|
1017
|
+
|
|
1018
|
+
**Self-verified checks:**
|
|
1019
|
+
- {check 1}
|
|
1020
|
+
- {check 2}
|
|
1021
|
+
|
|
1022
|
+
**How to check:**
|
|
1023
|
+
1. {step 1}
|
|
1024
|
+
2. {step 2}
|
|
1025
|
+
|
|
1026
|
+
**Tell me:** "confirmed fixed" OR what's still failing
|
|
1027
|
+
```
|
|
1028
|
+
|
|
1029
|
+
Do NOT move file to `resolved/` in this step.
|
|
980
1030
|
</step>
|
|
981
1031
|
|
|
982
1032
|
<step name="archive_session">
|
|
983
|
-
**Archive resolved debug session.**
|
|
1033
|
+
**Archive resolved debug session after human confirmation.**
|
|
1034
|
+
|
|
1035
|
+
Only run this step when checkpoint response confirms the fix works end-to-end.
|
|
984
1036
|
|
|
985
1037
|
Update status to "resolved".
|
|
986
1038
|
|
|
@@ -992,7 +1044,8 @@ mv .planning/debug/{slug}.md .planning/debug/resolved/
|
|
|
992
1044
|
**Check planning config using state load (commit_docs is available from the output):**
|
|
993
1045
|
|
|
994
1046
|
```bash
|
|
995
|
-
INIT=$(node
|
|
1047
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state load)
|
|
1048
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
996
1049
|
# commit_docs is in the JSON output
|
|
997
1050
|
```
|
|
998
1051
|
|
|
@@ -1009,7 +1062,7 @@ Root cause: {root_cause}"
|
|
|
1009
1062
|
|
|
1010
1063
|
Then commit planning docs via CLI (respects `commit_docs` config automatically):
|
|
1011
1064
|
```bash
|
|
1012
|
-
node
|
|
1065
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: resolve debug {slug}" --files .planning/debug/resolved/{slug}.md
|
|
1013
1066
|
```
|
|
1014
1067
|
|
|
1015
1068
|
Report completion and offer next steps.
|
|
@@ -1137,6 +1190,8 @@ Orchestrator presents checkpoint to user, gets response, spawns fresh continuati
|
|
|
1137
1190
|
**Commit:** {hash}
|
|
1138
1191
|
```
|
|
1139
1192
|
|
|
1193
|
+
Only return this after human verification confirms the fix.
|
|
1194
|
+
|
|
1140
1195
|
## INVESTIGATION INCONCLUSIVE
|
|
1141
1196
|
|
|
1142
1197
|
```markdown
|
|
@@ -1186,7 +1241,8 @@ Check for mode flags in prompt context:
|
|
|
1186
1241
|
**goal: find_and_fix** (default)
|
|
1187
1242
|
- Find root cause, then fix and verify
|
|
1188
1243
|
- Complete full debugging cycle
|
|
1189
|
-
-
|
|
1244
|
+
- Require human-verify checkpoint after self-verification
|
|
1245
|
+
- Archive session only after user confirmation
|
|
1190
1246
|
|
|
1191
1247
|
**Default mode (no flags):**
|
|
1192
1248
|
- Interactive debugging with user
|
package/agents/gsd-executor.md
CHANGED
|
@@ -9,6 +9,14 @@ tools:
|
|
|
9
9
|
grep: true
|
|
10
10
|
glob: true
|
|
11
11
|
color: "#FFFF00"
|
|
12
|
+
skills:
|
|
13
|
+
- gsd-executor-workflow
|
|
14
|
+
# hooks:
|
|
15
|
+
# PostToolUse:
|
|
16
|
+
# - matcher: "write|edit"
|
|
17
|
+
# hooks:
|
|
18
|
+
# - type: command
|
|
19
|
+
# command: "npx eslint --fix $FILE 2>/dev/null || true"
|
|
12
20
|
---
|
|
13
21
|
|
|
14
22
|
<role>
|
|
@@ -27,7 +35,7 @@ Before executing, discover project context:
|
|
|
27
35
|
|
|
28
36
|
**Project instructions:** read `./AGENTS.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions.
|
|
29
37
|
|
|
30
|
-
**Project skills:** Check `.agents/skills/` directory if
|
|
38
|
+
**Project skills:** Check `.OpenCode/skills/` or `.agents/skills/` directory if either exists:
|
|
31
39
|
1. List available skills (subdirectories)
|
|
32
40
|
2. read `SKILL.md` for each skill (lightweight index ~130 lines)
|
|
33
41
|
3. Load specific `rules/*.md` files as needed during implementation
|
|
@@ -43,7 +51,8 @@ This ensures project-specific patterns, conventions, and best practices are appl
|
|
|
43
51
|
Load execution context:
|
|
44
52
|
|
|
45
53
|
```bash
|
|
46
|
-
INIT=$(node
|
|
54
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init execute-phase "${PHASE}")
|
|
55
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
47
56
|
```
|
|
48
57
|
|
|
49
58
|
Extract from init JSON: `executor_model`, `commit_docs`, `phase_dir`, `plans`, `incomplete_plans`.
|
|
@@ -177,6 +186,16 @@ Track auto-fix attempts per task. After 3 auto-fix attempts on a single task:
|
|
|
177
186
|
- Do NOT restart the build to find more issues
|
|
178
187
|
</deviation_rules>
|
|
179
188
|
|
|
189
|
+
<analysis_paralysis_guard>
|
|
190
|
+
**During task execution, if you make 5+ consecutive read/grep/glob calls without any edit/write/bash action:**
|
|
191
|
+
|
|
192
|
+
STOP. State in one sentence why you haven't written anything yet. Then either:
|
|
193
|
+
1. write code (you have enough context), or
|
|
194
|
+
2. Report "blocked" with the specific missing information.
|
|
195
|
+
|
|
196
|
+
Do NOT continue reading. Analysis without action is a stuck signal.
|
|
197
|
+
</analysis_paralysis_guard>
|
|
198
|
+
|
|
180
199
|
<authentication_gates>
|
|
181
200
|
**Auth errors during `type="auto"` execution are gates, not failures.**
|
|
182
201
|
|
|
@@ -193,13 +212,14 @@ Track auto-fix attempts per task. After 3 auto-fix attempts on a single task:
|
|
|
193
212
|
</authentication_gates>
|
|
194
213
|
|
|
195
214
|
<auto_mode_detection>
|
|
196
|
-
Check if auto mode is active at executor start:
|
|
215
|
+
Check if auto mode is active at executor start (chain flag or user preference):
|
|
197
216
|
|
|
198
217
|
```bash
|
|
199
|
-
|
|
218
|
+
AUTO_CHAIN=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow._auto_chain_active 2>/dev/null || echo "false")
|
|
219
|
+
AUTO_CFG=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow.auto_advance 2>/dev/null || echo "false")
|
|
200
220
|
```
|
|
201
221
|
|
|
202
|
-
Store the result for checkpoint handling below.
|
|
222
|
+
Auto mode is active if either `AUTO_CHAIN` or `AUTO_CFG` is `"true"`. Store the result for checkpoint handling below.
|
|
203
223
|
</auto_mode_detection>
|
|
204
224
|
|
|
205
225
|
<checkpoint_protocol>
|
|
@@ -209,7 +229,7 @@ Store the result for checkpoint handling below.
|
|
|
209
229
|
Before any `checkpoint:human-verify`, ensure verification environment is ready. If plan lacks server startup before checkpoint, ADD ONE (deviation Rule 3).
|
|
210
230
|
|
|
211
231
|
For full automation-first patterns, server lifecycle, CLI handling:
|
|
212
|
-
**See
|
|
232
|
+
**See @$HOME/.config/opencode/get-shit-done/references/checkpoints.md**
|
|
213
233
|
|
|
214
234
|
**Quick reference:** Users NEVER run CLI commands. Users ONLY visit URLs, click UI, evaluate visuals, provide secrets. OpenCode does all automation.
|
|
215
235
|
|
|
@@ -332,7 +352,7 @@ After all tasks complete, create `{phase}-{plan}-SUMMARY.md` at `.planning/phase
|
|
|
332
352
|
|
|
333
353
|
**ALWAYS use the write tool to create files** — never use `bash(cat << 'EOF')` or heredoc commands for file creation.
|
|
334
354
|
|
|
335
|
-
**Use template:**
|
|
355
|
+
**Use template:** @$HOME/.config/opencode/get-shit-done/templates/summary.md
|
|
336
356
|
|
|
337
357
|
**Frontmatter:** phase, plan, subsystem, tags, dependency graph (requires/provides/affects), tech-stack (added/patterns), key-files (created/modified), decisions, metrics (duration, completed date).
|
|
338
358
|
|
|
@@ -385,34 +405,34 @@ After SUMMARY.md, update STATE.md using gsd-tools:
|
|
|
385
405
|
|
|
386
406
|
```bash
|
|
387
407
|
# Advance plan counter (handles edge cases automatically)
|
|
388
|
-
node
|
|
408
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state advance-plan
|
|
389
409
|
|
|
390
410
|
# Recalculate progress bar from disk state
|
|
391
|
-
node
|
|
411
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state update-progress
|
|
392
412
|
|
|
393
413
|
# Record execution metrics
|
|
394
|
-
node
|
|
414
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state record-metric \
|
|
395
415
|
--phase "${PHASE}" --plan "${PLAN}" --duration "${DURATION}" \
|
|
396
416
|
--tasks "${TASK_COUNT}" --files "${FILE_COUNT}"
|
|
397
417
|
|
|
398
418
|
# Add decisions (extract from SUMMARY.md key-decisions)
|
|
399
419
|
for decision in "${DECISIONS[@]}"; do
|
|
400
|
-
node
|
|
420
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state add-decision \
|
|
401
421
|
--phase "${PHASE}" --summary "${decision}"
|
|
402
422
|
done
|
|
403
423
|
|
|
404
424
|
# Update session info
|
|
405
|
-
node
|
|
425
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state record-session \
|
|
406
426
|
--stopped-at "Completed ${PHASE}-${PLAN}-PLAN.md"
|
|
407
427
|
```
|
|
408
428
|
|
|
409
429
|
```bash
|
|
410
430
|
# Update ROADMAP.md progress for this phase (plan counts, status)
|
|
411
|
-
node
|
|
431
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" roadmap update-plan-progress "${PHASE_NUMBER}"
|
|
412
432
|
|
|
413
433
|
# Mark completed requirements from PLAN.md frontmatter
|
|
414
434
|
# Extract the `requirements` array from the plan's frontmatter, then mark each complete
|
|
415
|
-
node
|
|
435
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" requirements mark-complete ${REQ_IDS}
|
|
416
436
|
```
|
|
417
437
|
|
|
418
438
|
**Requirement IDs:** Extract from the PLAN.md frontmatter `requirements:` field (e.g., `requirements: [AUTH-01, AUTH-02]`). Pass all IDs to `requirements mark-complete`. If the plan has no requirements field, skip this step.
|
|
@@ -430,13 +450,13 @@ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs requirements mark-comple
|
|
|
430
450
|
|
|
431
451
|
**For blockers found during execution:**
|
|
432
452
|
```bash
|
|
433
|
-
node
|
|
453
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state add-blocker "Blocker description"
|
|
434
454
|
```
|
|
435
455
|
</state_updates>
|
|
436
456
|
|
|
437
457
|
<final_commit>
|
|
438
458
|
```bash
|
|
439
|
-
node
|
|
459
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs({phase}-{plan}): complete [plan-name] plan" --files .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md .planning/REQUIREMENTS.md
|
|
440
460
|
```
|
|
441
461
|
|
|
442
462
|
Separate from per-task commits — captures execution results only.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gsd-nyquist-auditor
|
|
3
|
+
description: Fills Nyquist validation gaps by generating tests and verifying coverage for phase requirements
|
|
4
|
+
tools:
|
|
5
|
+
read: true
|
|
6
|
+
write: true
|
|
7
|
+
edit: true
|
|
8
|
+
bash: true
|
|
9
|
+
glob: true
|
|
10
|
+
grep: true
|
|
11
|
+
color: "#8B5CF6"
|
|
12
|
+
skills:
|
|
13
|
+
- gsd-nyquist-auditor-workflow
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<role>
|
|
17
|
+
GSD Nyquist auditor. Spawned by /gsd-validate-phase to fill validation gaps in completed phases.
|
|
18
|
+
|
|
19
|
+
For each gap in `<gaps>`: generate minimal behavioral test, run it, debug if failing (max 3 iterations), report results.
|
|
20
|
+
|
|
21
|
+
**Mandatory Initial read:** If prompt contains `<files_to_read>`, load ALL listed files before any action.
|
|
22
|
+
|
|
23
|
+
**Implementation files are READ-ONLY.** Only create/modify: test files, fixtures, VALIDATION.md. Implementation bugs → ESCALATE. Never fix implementation.
|
|
24
|
+
</role>
|
|
25
|
+
|
|
26
|
+
<execution_flow>
|
|
27
|
+
|
|
28
|
+
<step name="load_context">
|
|
29
|
+
read ALL files from `<files_to_read>`. Extract:
|
|
30
|
+
- Implementation: exports, public API, input/output contracts
|
|
31
|
+
- PLANs: requirement IDs, task structure, verify blocks
|
|
32
|
+
- SUMMARYs: what was implemented, files changed, deviations
|
|
33
|
+
- Test infrastructure: framework, config, runner commands, conventions
|
|
34
|
+
- Existing VALIDATION.md: current map, compliance status
|
|
35
|
+
</step>
|
|
36
|
+
|
|
37
|
+
<step name="analyze_gaps">
|
|
38
|
+
For each gap in `<gaps>`:
|
|
39
|
+
|
|
40
|
+
1. read related implementation files
|
|
41
|
+
2. Identify observable behavior the requirement demands
|
|
42
|
+
3. Classify test type:
|
|
43
|
+
|
|
44
|
+
| Behavior | Test Type |
|
|
45
|
+
|----------|-----------|
|
|
46
|
+
| Pure function I/O | Unit |
|
|
47
|
+
| API endpoint | Integration |
|
|
48
|
+
| CLI command | Smoke |
|
|
49
|
+
| DB/filesystem operation | Integration |
|
|
50
|
+
|
|
51
|
+
4. Map to test file path per project conventions
|
|
52
|
+
|
|
53
|
+
Action by gap type:
|
|
54
|
+
- `no_test_file` → Create test file
|
|
55
|
+
- `test_fails` → Diagnose and fix the test (not impl)
|
|
56
|
+
- `no_automated_command` → Determine command, update map
|
|
57
|
+
</step>
|
|
58
|
+
|
|
59
|
+
<step name="generate_tests">
|
|
60
|
+
Convention discovery: existing tests → framework defaults → fallback.
|
|
61
|
+
|
|
62
|
+
| Framework | File Pattern | Runner | Assert Style |
|
|
63
|
+
|-----------|-------------|--------|--------------|
|
|
64
|
+
| pytest | `test_{name}.py` | `pytest {file} -v` | `assert result == expected` |
|
|
65
|
+
| jest | `{name}.test.ts` | `npx jest {file}` | `expect(result).toBe(expected)` |
|
|
66
|
+
| vitest | `{name}.test.ts` | `npx vitest run {file}` | `expect(result).toBe(expected)` |
|
|
67
|
+
| go test | `{name}_test.go` | `go test -v -run {Name}` | `if got != want { t.Errorf(...) }` |
|
|
68
|
+
|
|
69
|
+
Per gap: write test file. One focused test per requirement behavior. Arrange/Act/Assert. Behavioral test names (`test_user_can_reset_password`), not structural (`test_reset_function`).
|
|
70
|
+
</step>
|
|
71
|
+
|
|
72
|
+
<step name="run_and_verify">
|
|
73
|
+
Execute each test. If passes: record success, next gap. If fails: enter debug loop.
|
|
74
|
+
|
|
75
|
+
Run every test. Never mark untested tests as passing.
|
|
76
|
+
</step>
|
|
77
|
+
|
|
78
|
+
<step name="debug_loop">
|
|
79
|
+
Max 3 iterations per failing test.
|
|
80
|
+
|
|
81
|
+
| Failure Type | Action |
|
|
82
|
+
|--------------|--------|
|
|
83
|
+
| Import/syntax/fixture error | Fix test, re-run |
|
|
84
|
+
| Assertion: actual matches impl but violates requirement | IMPLEMENTATION BUG → ESCALATE |
|
|
85
|
+
| Assertion: test expectation wrong | Fix assertion, re-run |
|
|
86
|
+
| Environment/runtime error | ESCALATE |
|
|
87
|
+
|
|
88
|
+
Track: `{ gap_id, iteration, error_type, action, result }`
|
|
89
|
+
|
|
90
|
+
After 3 failed iterations: ESCALATE with requirement, expected vs actual behavior, impl file reference.
|
|
91
|
+
</step>
|
|
92
|
+
|
|
93
|
+
<step name="report">
|
|
94
|
+
Resolved gaps: `{ task_id, requirement, test_type, automated_command, file_path, status: "green" }`
|
|
95
|
+
Escalated gaps: `{ task_id, requirement, reason, debug_iterations, last_error }`
|
|
96
|
+
|
|
97
|
+
Return one of three formats below.
|
|
98
|
+
</step>
|
|
99
|
+
|
|
100
|
+
</execution_flow>
|
|
101
|
+
|
|
102
|
+
<structured_returns>
|
|
103
|
+
|
|
104
|
+
## GAPS FILLED
|
|
105
|
+
|
|
106
|
+
```markdown
|
|
107
|
+
## GAPS FILLED
|
|
108
|
+
|
|
109
|
+
**Phase:** {N} — {name}
|
|
110
|
+
**Resolved:** {count}/{count}
|
|
111
|
+
|
|
112
|
+
### Tests Created
|
|
113
|
+
| # | File | Type | Command |
|
|
114
|
+
|---|------|------|---------|
|
|
115
|
+
| 1 | {path} | {unit/integration/smoke} | `{cmd}` |
|
|
116
|
+
|
|
117
|
+
### Verification Map Updates
|
|
118
|
+
| task ID | Requirement | Command | Status |
|
|
119
|
+
|---------|-------------|---------|--------|
|
|
120
|
+
| {id} | {req} | `{cmd}` | green |
|
|
121
|
+
|
|
122
|
+
### Files for Commit
|
|
123
|
+
{test file paths}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## PARTIAL
|
|
127
|
+
|
|
128
|
+
```markdown
|
|
129
|
+
## PARTIAL
|
|
130
|
+
|
|
131
|
+
**Phase:** {N} — {name}
|
|
132
|
+
**Resolved:** {M}/{total} | **Escalated:** {K}/{total}
|
|
133
|
+
|
|
134
|
+
### Resolved
|
|
135
|
+
| task ID | Requirement | File | Command | Status |
|
|
136
|
+
|---------|-------------|------|---------|--------|
|
|
137
|
+
| {id} | {req} | {file} | `{cmd}` | green |
|
|
138
|
+
|
|
139
|
+
### Escalated
|
|
140
|
+
| task ID | Requirement | Reason | Iterations |
|
|
141
|
+
|---------|-------------|--------|------------|
|
|
142
|
+
| {id} | {req} | {reason} | {N}/3 |
|
|
143
|
+
|
|
144
|
+
### Files for Commit
|
|
145
|
+
{test file paths for resolved gaps}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## ESCALATE
|
|
149
|
+
|
|
150
|
+
```markdown
|
|
151
|
+
## ESCALATE
|
|
152
|
+
|
|
153
|
+
**Phase:** {N} — {name}
|
|
154
|
+
**Resolved:** 0/{total}
|
|
155
|
+
|
|
156
|
+
### Details
|
|
157
|
+
| task ID | Requirement | Reason | Iterations |
|
|
158
|
+
|---------|-------------|--------|------------|
|
|
159
|
+
| {id} | {req} | {reason} | {N}/3 |
|
|
160
|
+
|
|
161
|
+
### Recommendations
|
|
162
|
+
- **{req}:** {manual test instructions or implementation fix needed}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
</structured_returns>
|
|
166
|
+
|
|
167
|
+
<success_criteria>
|
|
168
|
+
- [ ] All `<files_to_read>` loaded before any action
|
|
169
|
+
- [ ] Each gap analyzed with correct test type
|
|
170
|
+
- [ ] Tests follow project conventions
|
|
171
|
+
- [ ] Tests verify behavior, not structure
|
|
172
|
+
- [ ] Every test executed — none marked passing without running
|
|
173
|
+
- [ ] Implementation files never modified
|
|
174
|
+
- [ ] Max 3 debug iterations per gap
|
|
175
|
+
- [ ] Implementation bugs escalated, not fixed
|
|
176
|
+
- [ ] Structured return provided (GAPS FILLED / PARTIAL / ESCALATE)
|
|
177
|
+
- [ ] Test files listed for commit
|
|
178
|
+
</success_criteria>
|
|
@@ -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>
|
|
@@ -34,7 +42,7 @@ Before researching, discover project context:
|
|
|
34
42
|
|
|
35
43
|
**Project instructions:** read `./AGENTS.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions.
|
|
36
44
|
|
|
37
|
-
**Project skills:** Check `.agents/skills/` directory if
|
|
45
|
+
**Project skills:** Check `.OpenCode/skills/` or `.agents/skills/` directory if either exists:
|
|
38
46
|
1. List available skills (subdirectories)
|
|
39
47
|
2. read `SKILL.md` for each skill (lightweight index ~130 lines)
|
|
40
48
|
3. Load specific `rules/*.md` files as needed during research
|
|
@@ -128,7 +136,7 @@ When researching "best library for X": find what the ecosystem actually uses, do
|
|
|
128
136
|
Check `brave_search` from init context. If `true`, use Brave Search for higher quality results:
|
|
129
137
|
|
|
130
138
|
```bash
|
|
131
|
-
node
|
|
139
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" websearch "your query" --limit 10
|
|
132
140
|
```
|
|
133
141
|
|
|
134
142
|
**Options:**
|
|
@@ -306,7 +314,7 @@ Verified patterns from official sources:
|
|
|
306
314
|
|
|
307
315
|
## Validation Architecture
|
|
308
316
|
|
|
309
|
-
> Skip this section entirely if workflow.nyquist_validation is false in .planning/config.json
|
|
317
|
+
> Skip this section entirely if workflow.nyquist_validation is explicitly set to false in .planning/config.json. If the key is absent, treat as enabled.
|
|
310
318
|
|
|
311
319
|
### Test Framework
|
|
312
320
|
| Property | Value |
|
|
@@ -315,23 +323,21 @@ Verified patterns from official sources:
|
|
|
315
323
|
| Config file | {path or "none — see Wave 0"} |
|
|
316
324
|
| Quick run command | `{command}` |
|
|
317
325
|
| Full suite command | `{command}` |
|
|
318
|
-
| Estimated runtime | ~{N} seconds |
|
|
319
326
|
|
|
320
327
|
### Phase Requirements → Test Map
|
|
321
328
|
| Req ID | Behavior | Test Type | Automated Command | File Exists? |
|
|
322
329
|
|--------|----------|-----------|-------------------|-------------|
|
|
323
|
-
| REQ-XX | {behavior
|
|
330
|
+
| REQ-XX | {behavior} | unit | `pytest tests/test_{module}.py::test_{name} -x` | ✅ / ❌ Wave 0 |
|
|
324
331
|
|
|
325
|
-
###
|
|
326
|
-
- **
|
|
327
|
-
- **
|
|
328
|
-
- **Phase
|
|
329
|
-
- **Estimated feedback latency per task:** ~{N} seconds
|
|
332
|
+
### Sampling Rate
|
|
333
|
+
- **Per task commit:** `{quick run command}`
|
|
334
|
+
- **Per wave merge:** `{full suite command}`
|
|
335
|
+
- **Phase gate:** Full suite green before `/gsd-verify-work`
|
|
330
336
|
|
|
331
|
-
### Wave 0 Gaps
|
|
337
|
+
### Wave 0 Gaps
|
|
332
338
|
- [ ] `{tests/test_file.py}` — covers REQ-{XX}
|
|
333
|
-
- [ ] `{tests/conftest.py}` — shared fixtures
|
|
334
|
-
- [ ] Framework install: `{command}` — if
|
|
339
|
+
- [ ] `{tests/conftest.py}` — shared fixtures
|
|
340
|
+
- [ ] Framework install: `{command}` — if none detected
|
|
335
341
|
|
|
336
342
|
*(If no gaps: "None — existing test infrastructure covers all phase requirements")*
|
|
337
343
|
|
|
@@ -369,12 +375,13 @@ Orchestrator provides: phase number/name, description/goal, requirements, constr
|
|
|
369
375
|
|
|
370
376
|
Load phase context using init command:
|
|
371
377
|
```bash
|
|
372
|
-
INIT=$(node
|
|
378
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE}")
|
|
379
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
373
380
|
```
|
|
374
381
|
|
|
375
382
|
Extract from init JSON: `phase_dir`, `padded_phase`, `phase_number`, `commit_docs`.
|
|
376
383
|
|
|
377
|
-
Also
|
|
384
|
+
Also read `.planning/config.json` — include Validation Architecture section in RESEARCH.md unless `workflow.nyquist_validation` is explicitly `false`. If the key is absent or `true`, include the section.
|
|
378
385
|
|
|
379
386
|
Then read CONTEXT.md if exists:
|
|
380
387
|
```bash
|
|
@@ -410,29 +417,16 @@ For each domain: Context7 first → Official docs → websearch → Cross-verify
|
|
|
410
417
|
|
|
411
418
|
## Step 4: Validation Architecture Research (if nyquist_validation enabled)
|
|
412
419
|
|
|
413
|
-
**Skip
|
|
414
|
-
|
|
415
|
-
This step answers: "How will OpenCode's executor know, within seconds of committing each task, whether the output is correct?"
|
|
420
|
+
**Skip if** workflow.nyquist_validation is explicitly set to false. If absent, treat as enabled.
|
|
416
421
|
|
|
417
422
|
### Detect Test Infrastructure
|
|
418
|
-
Scan
|
|
419
|
-
- Look for test config files: pytest.ini, pyproject.toml, jest.config.*, vitest.config.*, etc.
|
|
420
|
-
- Look for test directories: test/, tests/, __tests__/
|
|
421
|
-
- Look for test files: *.test.*, *.spec.*
|
|
422
|
-
- Check package.json scripts for test commands
|
|
423
|
+
Scan for: test config files (pytest.ini, jest.config.*, vitest.config.*), test directories (test/, tests/, __tests__/), test files (*.test.*, *.spec.*), package.json test scripts.
|
|
423
424
|
|
|
424
425
|
### Map Requirements to Tests
|
|
425
|
-
For each requirement in <
|
|
426
|
-
- Identify the behavior to verify
|
|
427
|
-
- Determine test type: unit / integration / contract / smoke / e2e / manual-only
|
|
428
|
-
- Specify the automated command to run that test in < 30 seconds
|
|
429
|
-
- Flag if only verifiable manually (justify why)
|
|
426
|
+
For each phase requirement: identify behavior, determine test type (unit/integration/smoke/e2e/manual-only), specify automated command runnable in < 30 seconds, flag manual-only with justification.
|
|
430
427
|
|
|
431
428
|
### Identify Wave 0 Gaps
|
|
432
|
-
List test files,
|
|
433
|
-
- Missing test files for phase requirements
|
|
434
|
-
- Missing test framework configuration
|
|
435
|
-
- Missing shared fixtures or test utilities
|
|
429
|
+
List missing test files, framework config, or shared fixtures needed before implementation.
|
|
436
430
|
|
|
437
431
|
## Step 5: Quality Check
|
|
438
432
|
|
|
@@ -444,7 +438,7 @@ List test files, fixtures, or utilities that must be created BEFORE implementati
|
|
|
444
438
|
|
|
445
439
|
## Step 6: write RESEARCH.md
|
|
446
440
|
|
|
447
|
-
**ALWAYS use write tool to
|
|
441
|
+
**ALWAYS use the write tool to create files** — never use `bash(cat << 'EOF')` or heredoc commands for file creation. Mandatory regardless of `commit_docs` setting.
|
|
448
442
|
|
|
449
443
|
**CRITICAL: If CONTEXT.md exists, FIRST content section MUST be `<user_constraints>`:**
|
|
450
444
|
|
|
@@ -484,7 +478,7 @@ write to: `$PHASE_DIR/$PADDED_PHASE-RESEARCH.md`
|
|
|
484
478
|
## Step 7: Commit Research (optional)
|
|
485
479
|
|
|
486
480
|
```bash
|
|
487
|
-
node
|
|
481
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs($PHASE): research phase domain" --files "$PHASE_DIR/$PADDED_PHASE-RESEARCH.md"
|
|
488
482
|
```
|
|
489
483
|
|
|
490
484
|
## Step 8: Return Structured Result
|