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.
Files changed (114) hide show
  1. package/agents/gsd-codebase-mapper.md +9 -1
  2. package/agents/gsd-debugger.md +66 -10
  3. package/agents/gsd-executor.md +36 -16
  4. package/agents/gsd-integration-checker.md +2 -0
  5. package/agents/gsd-nyquist-auditor.md +178 -0
  6. package/agents/gsd-phase-researcher.md +28 -34
  7. package/agents/gsd-plan-checker.md +42 -78
  8. package/agents/gsd-planner.md +139 -24
  9. package/agents/gsd-project-researcher.md +11 -1
  10. package/agents/gsd-research-synthesizer.md +13 -3
  11. package/agents/gsd-roadmapper.md +25 -15
  12. package/agents/gsd-verifier.md +29 -6
  13. package/bin/dm/lib/constants.js +6 -1
  14. package/bin/dm/src/services/file-ops.js +14 -1
  15. package/commands/gsd/gsd-add-phase.md +6 -6
  16. package/commands/gsd/gsd-add-tests.md +41 -0
  17. package/commands/gsd/gsd-add-todo.md +7 -7
  18. package/commands/gsd/gsd-audit-milestone.md +9 -9
  19. package/commands/gsd/gsd-check-profile.md +3 -3
  20. package/commands/gsd/gsd-check-todos.md +7 -7
  21. package/commands/gsd/gsd-cleanup.md +2 -2
  22. package/commands/gsd/gsd-complete-milestone.md +6 -6
  23. package/commands/gsd/gsd-debug.md +11 -7
  24. package/commands/gsd/gsd-discuss-phase.md +26 -19
  25. package/commands/gsd/gsd-execute-phase.md +13 -13
  26. package/commands/gsd/gsd-health.md +7 -7
  27. package/commands/gsd/gsd-help.md +2 -2
  28. package/commands/gsd/gsd-insert-phase.md +6 -6
  29. package/commands/gsd/gsd-join-discord.md +1 -1
  30. package/commands/gsd/gsd-list-phase-assumptions.md +6 -6
  31. package/commands/gsd/gsd-map-codebase.md +8 -8
  32. package/commands/gsd/gsd-new-milestone.md +12 -12
  33. package/commands/gsd/gsd-new-project.md +12 -12
  34. package/commands/gsd/gsd-pause-work.md +6 -6
  35. package/commands/gsd/gsd-plan-milestone-gaps.md +9 -9
  36. package/commands/gsd/gsd-plan-phase.md +14 -13
  37. package/commands/gsd/gsd-progress.md +8 -8
  38. package/commands/gsd/gsd-quick.md +17 -13
  39. package/commands/gsd/gsd-reapply-patches.md +19 -11
  40. package/commands/gsd/gsd-remove-phase.md +7 -7
  41. package/commands/gsd/gsd-research-phase.md +12 -11
  42. package/commands/gsd/gsd-resume-work.md +8 -8
  43. package/commands/gsd/gsd-set-profile.md +6 -6
  44. package/commands/gsd/gsd-settings.md +7 -7
  45. package/commands/gsd/gsd-update.md +5 -5
  46. package/commands/gsd/gsd-validate-phase.md +35 -0
  47. package/commands/gsd/gsd-verify-work.md +11 -11
  48. package/get-shit-done/bin/gsd-oc-commands/allow-read-config.cjs +235 -0
  49. package/get-shit-done/bin/gsd-oc-tools.cjs +11 -5
  50. package/get-shit-done/bin/gsd-tools.cjs +45 -6
  51. package/get-shit-done/bin/lib/commands.cjs +11 -19
  52. package/get-shit-done/bin/lib/config.cjs +8 -1
  53. package/get-shit-done/bin/lib/core.cjs +131 -16
  54. package/get-shit-done/bin/lib/init.cjs +28 -12
  55. package/get-shit-done/bin/lib/milestone.cjs +34 -8
  56. package/get-shit-done/bin/lib/phase.cjs +74 -50
  57. package/get-shit-done/bin/lib/roadmap.cjs +7 -7
  58. package/get-shit-done/bin/lib/state.cjs +294 -63
  59. package/get-shit-done/bin/lib/template.cjs +3 -3
  60. package/get-shit-done/bin/lib/verify.cjs +56 -8
  61. package/get-shit-done/bin/test/allow-read-config.test.cjs +262 -0
  62. package/get-shit-done/references/checkpoints.md +1 -1
  63. package/get-shit-done/references/decimal-phase-calculation.md +6 -6
  64. package/get-shit-done/references/git-integration.md +3 -3
  65. package/get-shit-done/references/git-planning-commit.md +2 -2
  66. package/get-shit-done/references/model-profile-resolution.md +1 -1
  67. package/get-shit-done/references/model-profiles.md +1 -0
  68. package/get-shit-done/references/phase-argument-parsing.md +4 -4
  69. package/get-shit-done/references/planning-config.md +10 -6
  70. package/get-shit-done/references/questioning.md +17 -0
  71. package/get-shit-done/references/verification-patterns.md +1 -1
  72. package/get-shit-done/templates/DEBUG.md +7 -2
  73. package/get-shit-done/templates/VALIDATION.md +18 -46
  74. package/get-shit-done/templates/codebase/structure.md +3 -3
  75. package/get-shit-done/templates/config.json +2 -2
  76. package/get-shit-done/templates/context.md +14 -0
  77. package/get-shit-done/templates/phase-prompt.md +10 -10
  78. package/get-shit-done/templates/retrospective.md +54 -0
  79. package/get-shit-done/templates/roadmap.md +1 -1
  80. package/get-shit-done/workflows/add-phase.md +3 -2
  81. package/get-shit-done/workflows/add-tests.md +351 -0
  82. package/get-shit-done/workflows/add-todo.md +4 -3
  83. package/get-shit-done/workflows/audit-milestone.md +40 -5
  84. package/get-shit-done/workflows/check-todos.md +3 -2
  85. package/get-shit-done/workflows/cleanup.md +1 -1
  86. package/get-shit-done/workflows/complete-milestone.md +69 -5
  87. package/get-shit-done/workflows/diagnose-issues.md +2 -2
  88. package/get-shit-done/workflows/discovery-phase.md +6 -6
  89. package/get-shit-done/workflows/discuss-phase.md +194 -58
  90. package/get-shit-done/workflows/execute-phase.md +29 -23
  91. package/get-shit-done/workflows/execute-plan.md +22 -18
  92. package/get-shit-done/workflows/health.md +5 -2
  93. package/get-shit-done/workflows/help.md +4 -1
  94. package/get-shit-done/workflows/insert-phase.md +3 -2
  95. package/get-shit-done/workflows/map-codebase.md +3 -2
  96. package/get-shit-done/workflows/new-milestone.md +12 -10
  97. package/get-shit-done/workflows/new-project.md +44 -49
  98. package/get-shit-done/workflows/oc-set-profile.md +24 -0
  99. package/get-shit-done/workflows/pause-work.md +2 -2
  100. package/get-shit-done/workflows/plan-milestone-gaps.md +3 -3
  101. package/get-shit-done/workflows/plan-phase.md +155 -73
  102. package/get-shit-done/workflows/progress.md +8 -7
  103. package/get-shit-done/workflows/quick.md +158 -10
  104. package/get-shit-done/workflows/remove-phase.md +5 -4
  105. package/get-shit-done/workflows/research-phase.md +5 -4
  106. package/get-shit-done/workflows/resume-project.md +3 -2
  107. package/get-shit-done/workflows/set-profile.md +3 -2
  108. package/get-shit-done/workflows/settings.md +6 -6
  109. package/get-shit-done/workflows/transition.md +5 -5
  110. package/get-shit-done/workflows/update.md +45 -19
  111. package/get-shit-done/workflows/validate-phase.md +167 -0
  112. package/get-shit-done/workflows/verify-phase.md +10 -9
  113. package/get-shit-done/workflows/verify-work.md +18 -4
  114. package/package.json +1 -1
@@ -6,7 +6,7 @@ Execute a phase prompt (PLAN.md) and create the outcome summary (SUMMARY.md).
6
6
  read STATE.md before any operation to load project context.
7
7
  read config.json for planning behavior settings.
8
8
 
9
- @~/.config/opencode/get-shit-done/references/git-integration.md
9
+ @$HOME/.config/opencode/get-shit-done/references/git-integration.md
10
10
  </required_reading>
11
11
 
12
12
  <process>
@@ -15,7 +15,8 @@ read config.json for planning behavior settings.
15
15
  Load execution context (paths only to minimize orchestrator context):
16
16
 
17
17
  ```bash
18
- INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init execute-phase "${PHASE}")
18
+ INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init execute-phase "${PHASE}")
19
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
19
20
  ```
20
21
 
21
22
  Extract from init JSON: `executor_model`, `commit_docs`, `phase_dir`, `phase_number`, `plans`, `summaries`, `incomplete_plans`, `state_path`, `config_path`.
@@ -118,11 +119,13 @@ Pattern B only (verify-only checkpoints). Skip for A/C.
118
119
  cat .planning/phases/XX-name/{phase}-{plan}-PLAN.md
119
120
  ```
120
121
  This IS the execution instructions. Follow exactly. If plan references CONTEXT.md: honor user's vision throughout.
122
+
123
+ **If plan contains `<interfaces>` block:** These are pre-extracted type definitions and contracts. Use them directly — do NOT re-read the source files to discover types. The planner already extracted what you need.
121
124
  </step>
122
125
 
123
126
  <step name="previous_phase_check">
124
127
  ```bash
125
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs phases list --type summaries --raw
128
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" phases list --type summaries --raw
126
129
  # Extract the second-to-last summary from the JSON result
127
130
  ```
128
131
  If previous SUMMARY has unresolved "Issues Encountered" or "Next Phase Readiness" blockers: question(header="Previous Issues", options: "Proceed anyway" | "Address first" | "Review previous").
@@ -220,7 +223,7 @@ For `type: tdd` plans — RED-GREEN-REFACTOR:
220
223
 
221
224
  Errors: RED doesn't fail → investigate test/existing feature. GREEN doesn't pass → debug, iterate. REFACTOR breaks → undo.
222
225
 
223
- See `~/.config/opencode/get-shit-done/references/tdd.md` for structure.
226
+ See `$HOME/.config/opencode/get-shit-done/references/tdd.md` for structure.
224
227
  </tdd_plan_execution>
225
228
 
226
229
  <task_commit>
@@ -272,7 +275,7 @@ Display: `CHECKPOINT: [Type]` box → Progress {X}/{Y} → task name → type-sp
272
275
 
273
276
  After response: verify if specified. Pass → continue. Fail → inform, wait. WAIT for user — do NOT hallucinate completion.
274
277
 
275
- See ~/.config/opencode/get-shit-done/references/checkpoints.md for details.
278
+ See $HOME/.config/opencode/get-shit-done/references/checkpoints.md for details.
276
279
  </step>
277
280
 
278
281
  <step name="checkpoint_return_for_orchestrator">
@@ -310,11 +313,11 @@ fi
310
313
  grep -A 50 "^user_setup:" .planning/phases/XX-name/{phase}-{plan}-PLAN.md | head -50
311
314
  ```
312
315
 
313
- If user_setup exists: create `{phase}-USER-SETUP.md` using template `~/.config/opencode/get-shit-done/templates/user-setup.md`. Per service: env vars table, account setup checklist, dashboard config, local dev notes, verification commands. Status "Incomplete". Set `USER_SETUP_CREATED=true`. If empty/missing: skip.
316
+ If user_setup exists: create `{phase}-USER-SETUP.md` using template `$HOME/.config/opencode/get-shit-done/templates/user-setup.md`. Per service: env vars table, account setup checklist, dashboard config, local dev notes, verification commands. Status "Incomplete". Set `USER_SETUP_CREATED=true`. If empty/missing: skip.
314
317
  </step>
315
318
 
316
319
  <step name="create_summary">
317
- Create `{phase}-{plan}-SUMMARY.md` at `.planning/phases/XX-name/`. Use `~/.config/opencode/get-shit-done/templates/summary.md`.
320
+ Create `{phase}-{plan}-SUMMARY.md` at `.planning/phases/XX-name/`. Use `$HOME/.config/opencode/get-shit-done/templates/summary.md`.
318
321
 
319
322
  **Frontmatter:** phase, plan, subsystem, tags | requires/provides/affects | tech-stack.added/patterns | key-files.created/modified | key-decisions | requirements-completed (**MUST** copy `requirements` array from PLAN.md frontmatter verbatim) | duration ($DURATION), completed ($PLAN_END_TIME date).
320
323
 
@@ -332,13 +335,13 @@ Update STATE.md using gsd-tools:
332
335
 
333
336
  ```bash
334
337
  # Advance plan counter (handles last-plan edge case)
335
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state advance-plan
338
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state advance-plan
336
339
 
337
340
  # Recalculate progress bar from disk state
338
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state update-progress
341
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state update-progress
339
342
 
340
343
  # Record execution metrics
341
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state record-metric \
344
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state record-metric \
342
345
  --phase "${PHASE}" --plan "${PLAN}" --duration "${DURATION}" \
343
346
  --tasks "${TASK_COUNT}" --files "${FILE_COUNT}"
344
347
  ```
@@ -349,11 +352,12 @@ From SUMMARY: Extract decisions and add to STATE.md:
349
352
 
350
353
  ```bash
351
354
  # Add each decision from SUMMARY key-decisions
352
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state add-decision \
353
- --phase "${PHASE}" --summary "${DECISION_TEXT}" --rationale "${RATIONALE}"
355
+ # Prefer file inputs for shell-safe text (preserves `$`, `*`, etc. exactly)
356
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state add-decision \
357
+ --phase "${PHASE}" --summary-file "${DECISION_TEXT_FILE}" --rationale-file "${RATIONALE_FILE}"
354
358
 
355
359
  # Add blockers if any found
356
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state add-blocker "Blocker description"
360
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state add-blocker --text-file "${BLOCKER_TEXT_FILE}"
357
361
  ```
358
362
  </step>
359
363
 
@@ -361,7 +365,7 @@ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state add-blocker "Block
361
365
  Update session info using gsd-tools:
362
366
 
363
367
  ```bash
364
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state record-session \
368
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state record-session \
365
369
  --stopped-at "Completed ${PHASE}-${PLAN}-PLAN.md" \
366
370
  --resume-file "None"
367
371
  ```
@@ -375,7 +379,7 @@ If SUMMARY "Issues Encountered" ≠ "None": yolo → log and continue. Interacti
375
379
 
376
380
  <step name="update_roadmap">
377
381
  ```bash
378
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs roadmap update-plan-progress "${PHASE}"
382
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" roadmap update-plan-progress "${PHASE}"
379
383
  ```
380
384
  Counts PLAN vs SUMMARY files on disk. Updates progress table row with correct count and status (`In Progress` or `Complete` with date).
381
385
  </step>
@@ -384,7 +388,7 @@ Counts PLAN vs SUMMARY files on disk. Updates progress table row with correct co
384
388
  Mark completed requirements from the PLAN.md frontmatter `requirements:` field:
385
389
 
386
390
  ```bash
387
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs requirements mark-complete ${REQ_IDS}
391
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" requirements mark-complete ${REQ_IDS}
388
392
  ```
389
393
 
390
394
  Extract requirement IDs from the plan's frontmatter (e.g., `requirements: [AUTH-01, AUTH-02]`). If no requirements field, skip.
@@ -394,7 +398,7 @@ Extract requirement IDs from the plan's frontmatter (e.g., `requirements: [AUTH-
394
398
  task code already committed per-task. Commit plan metadata:
395
399
 
396
400
  ```bash
397
- node ~/.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
401
+ 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
398
402
  ```
399
403
  </step>
400
404
 
@@ -409,7 +413,7 @@ git diff --name-only ${FIRST_TASK}^..HEAD 2>/dev/null
409
413
  Update only structural changes: new src/ dir → STRUCTURE.md | deps → STACK.md | file pattern → CONVENTIONS.md | API client → INTEGRATIONS.md | config → STACK.md | renamed → update paths. Skip code-only/bugfix/content changes.
410
414
 
411
415
  ```bash
412
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "" --files .planning/codebase/*.md --amend
416
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "" --files .planning/codebase/*.md --amend
413
417
  ```
414
418
  </step>
415
419
 
@@ -25,7 +25,7 @@ fi
25
25
  **Run health validation:**
26
26
 
27
27
  ```bash
28
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs validate health $REPAIR_FLAG
28
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" validate health $REPAIR_FLAG
29
29
  ```
30
30
 
31
31
  Parse JSON output:
@@ -112,7 +112,7 @@ If yes, re-run with --repair flag and display results.
112
112
  Re-run health check without --repair to confirm issues are resolved:
113
113
 
114
114
  ```bash
115
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs validate health
115
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" validate health
116
116
  ```
117
117
 
118
118
  Report final status.
@@ -136,6 +136,8 @@ Report final status.
136
136
  | W005 | warning | Phase directory naming mismatch | No |
137
137
  | W006 | warning | Phase in ROADMAP but no directory | No |
138
138
  | W007 | warning | Phase on disk but not in ROADMAP | No |
139
+ | W008 | warning | config.json: workflow.nyquist_validation absent (defaults to enabled but agents may skip) | Yes |
140
+ | W009 | warning | Phase has Validation Architecture in RESEARCH.md but no VALIDATION.md | No |
139
141
  | I001 | info | Plan without SUMMARY (may be in progress) | No |
140
142
 
141
143
  </error_codes>
@@ -147,6 +149,7 @@ Report final status.
147
149
  | createConfig | Create config.json with defaults | None |
148
150
  | resetConfig | Delete + recreate config.json | Loses custom settings |
149
151
  | regenerateState | Create STATE.md from ROADMAP structure | Loses session history |
152
+ | addNyquistKey | Add workflow.nyquist_validation: true to config.json | None — matches existing default |
150
153
 
151
154
  **Not repairable (too risky):**
152
155
  - PROJECT.md, ROADMAP.md content
@@ -99,6 +99,8 @@ Create detailed execution plan for a specific phase.
99
99
  Usage: `/gsd-plan-phase 1`
100
100
  Result: Creates `.planning/phases/01-foundation/01-01-PLAN.md`
101
101
 
102
+ **PRD Express Path:** Pass `--prd path/to/requirements.md` to skip discuss-phase entirely. Your PRD becomes locked decisions in CONTEXT.md. Useful when you already have clear acceptance criteria.
103
+
102
104
  ### Execution
103
105
 
104
106
  **`/gsd-execute-phase <phase-number>`**
@@ -296,7 +298,7 @@ Usage: `/gsd-plan-milestone-gaps`
296
298
  Configure workflow toggles and model profile interactively.
297
299
 
298
300
  - Toggle researcher, plan checker, verifier agents
299
- - Select model profile (simple/smart/custom)
301
+ - Select model profile (simple/smart/genius)
300
302
  - Updates `.planning/config.json`
301
303
 
302
304
  Usage: `/gsd-settings`
@@ -351,6 +353,7 @@ Usage: `/gsd-join-discord`
351
353
  ├── PROJECT.md # Project vision
352
354
  ├── ROADMAP.md # Current phase breakdown
353
355
  ├── STATE.md # Project memory & context
356
+ ├── RETROSPECTIVE.md # Living retrospective (updated per milestone)
354
357
  ├── config.json # Workflow mode & gates
355
358
  ├── todos/ # Captured ideas and tasks
356
359
  │ ├── pending/ # Todos waiting to be worked on
@@ -34,7 +34,8 @@ Validate first argument is an integer.
34
34
  Load phase operation context:
35
35
 
36
36
  ```bash
37
- INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init phase-op "${after_phase}")
37
+ INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init phase-op "${after_phase}")
38
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
38
39
  ```
39
40
 
40
41
  Check `roadmap_exists` from init JSON. If false:
@@ -48,7 +49,7 @@ Exit.
48
49
  **Delegate the phase insertion to gsd-tools:**
49
50
 
50
51
  ```bash
51
- RESULT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs phase insert "${after_phase}" "${description}")
52
+ RESULT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" phase insert "${after_phase}" "${description}")
52
53
  ```
53
54
 
54
55
  The CLI handles:
@@ -26,7 +26,8 @@ Documents are reference material for OpenCode when planning/executing. Always in
26
26
  Load codebase mapping context:
27
27
 
28
28
  ```bash
29
- INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init map-codebase)
29
+ INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init map-codebase)
30
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
30
31
  ```
31
32
 
32
33
  Extract from init JSON: `mapper_model`, `commit_docs`, `codebase_dir`, `existing_maps`, `has_maps`, `codebase_dir_exists`.
@@ -250,7 +251,7 @@ Continue to commit_codebase_map.
250
251
  Commit the codebase map:
251
252
 
252
253
  ```bash
253
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs: map existing codebase" --files .planning/codebase/*.md
254
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: map existing codebase" --files .planning/codebase/*.md
254
255
  ```
255
256
 
256
257
  Continue to offer_next.
@@ -27,8 +27,9 @@ read all files referenced by the invoking prompt's execution_context before star
27
27
 
28
28
  **If no context file:**
29
29
  - Present what shipped in last milestone
30
- - Ask: "What do you want to build next?"
31
- - Use question to explore features, priorities, constraints, scope
30
+ - Ask inline (freeform, NOT question): "What do you want to build next?"
31
+ - Wait for their response, then use question to probe specifics
32
+ - If user selects "Other" at any point to provide freeform input, ask follow-up as plain text — not another question
32
33
 
33
34
  ## 3. Determine Milestone Version
34
35
 
@@ -71,13 +72,14 @@ Keep Accumulated Context section from previous milestone.
71
72
  Delete MILESTONE-CONTEXT.md if exists (consumed).
72
73
 
73
74
  ```bash
74
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs: start milestone v[X.Y] [Name]" --files .planning/PROJECT.md .planning/STATE.md
75
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: start milestone v[X.Y] [Name]" --files .planning/PROJECT.md .planning/STATE.md
75
76
  ```
76
77
 
77
78
  ## 7. Load Context and Resolve Models
78
79
 
79
80
  ```bash
80
- INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init new-milestone)
81
+ INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init new-milestone)
82
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
81
83
  ```
82
84
 
83
85
  Extract from init JSON: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `research_enabled`, `current_milestone`, `project_exists`, `roadmap_exists`.
@@ -92,10 +94,10 @@ question: "Research the domain ecosystem for new features before defining requir
92
94
 
93
95
  ```bash
94
96
  # If "Research first": persist true
95
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs config-set workflow.research true
97
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-set workflow.research true
96
98
 
97
99
  # If "Skip research": persist false
98
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs config-set workflow.research false
100
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-set workflow.research false
99
101
  ```
100
102
 
101
103
  **If "Research first":**
@@ -138,7 +140,7 @@ Focus ONLY on what's needed for the NEW features.
138
140
 
139
141
  <output>
140
142
  write to: .planning/research/{FILE}
141
- Use template: ~/.config/opencode/get-shit-done/templates/research-project/{FILE}
143
+ Use template: $HOME/.config/opencode/get-shit-done/templates/research-project/{FILE}
142
144
  </output>
143
145
  ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="{DIMENSION} research")
144
146
  ```
@@ -167,7 +169,7 @@ Synthesize research outputs into SUMMARY.md.
167
169
  </files_to_read>
168
170
 
169
171
  write to: .planning/research/SUMMARY.md
170
- Use template: ~/.config/opencode/get-shit-done/templates/research-project/SUMMARY.md
172
+ Use template: $HOME/.config/opencode/get-shit-done/templates/research-project/SUMMARY.md
171
173
  Commit after writing.
172
174
  ", subagent_type="gsd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
173
175
  ```
@@ -253,7 +255,7 @@ If "adjust": Return to scoping.
253
255
 
254
256
  **Commit requirements:**
255
257
  ```bash
256
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs: define milestone v[X.Y] requirements" --files .planning/REQUIREMENTS.md
258
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: define milestone v[X.Y] requirements" --files .planning/REQUIREMENTS.md
257
259
  ```
258
260
 
259
261
  ## 10. Create Roadmap
@@ -330,7 +332,7 @@ Success criteria:
330
332
 
331
333
  **Commit roadmap** (after approval):
332
334
  ```bash
333
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs: create milestone v[X.Y] roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
335
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: create milestone v[X.Y] roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
334
336
  ```
335
337
 
336
338
  ## 11. Done
@@ -14,7 +14,7 @@ Check if `--auto` flag is present in $ARGUMENTS.
14
14
  **If auto mode:**
15
15
  - Skip brownfield mapping offer (assume greenfield)
16
16
  - Skip deep questioning (extract context from provided document)
17
- - Config: YOLO mode is implicit (skip that question), but ask depth/git/agents FIRST (Step 2a)
17
+ - Config: YOLO mode is implicit (skip that question), but ask granularity/git/agents FIRST (Step 2a)
18
18
  - After config: run Steps 6-9 automatically with smart defaults:
19
19
  - Research: Always yes
20
20
  - Requirements: Include all table stakes + features from provided document
@@ -46,7 +46,8 @@ The document should describe what you want to build.
46
46
  **MANDATORY FIRST STEP — Execute these checks before ANY user interaction:**
47
47
 
48
48
  ```bash
49
- INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init new-project)
49
+ INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init new-project)
50
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
50
51
  ```
51
52
 
52
53
  Parse JSON for: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`, `project_path`.
@@ -90,13 +91,13 @@ YOLO mode is implicit (auto = YOLO). Ask remaining config questions:
90
91
  ```
91
92
  question([
92
93
  {
93
- header: "Depth",
94
- question: "How thorough should planning be?",
94
+ header: "Granularity",
95
+ question: "How finely should scope be sliced into phases?",
95
96
  multiSelect: false,
96
97
  options: [
97
- { label: "Quick (Recommended)", description: "Ship fast (3-5 phases, 1-3 plans each)" },
98
- { label: "Standard", description: "Balanced scope and speed (5-8 phases, 3-5 plans each)" },
99
- { label: "Comprehensive", description: "Thorough coverage (8-12 phases, 5-10 plans each)" }
98
+ { label: "Coarse (Recommended)", description: "Fewer, broader phases (3-5 phases, 1-3 plans each)" },
99
+ { label: "Standard", description: "Balanced phase size (5-8 phases, 3-5 plans each)" },
100
+ { label: "Fine", description: "Many focused phases (8-12 phases, 5-10 plans each)" }
100
101
  ]
101
102
  },
102
103
  {
@@ -158,7 +159,7 @@ question([
158
159
  options: [
159
160
  { label: "Smart (Recommended)", description: "Two models: one for reseach and planing, other for execution and verification" },
160
161
  { label: "Simple", description: Description: "One model for all agents (not flexible)" },
161
- { label: "Custom (most flexible)", description: "Three models: different for every stage" }
162
+ { label: "Genius (most flexible)", description: "Three models: different for every stage" }
162
163
  ]
163
164
  }
164
165
  ])
@@ -169,14 +170,15 @@ Create `.planning/config.json` with mode set to "yolo":
169
170
  ```json
170
171
  {
171
172
  "mode": "yolo",
172
- "depth": "[selected]",
173
+ "granularity": "[selected]",
173
174
  "parallelization": true|false,
174
175
  "commit_docs": true|false,
175
- "model_profile": "simple|smart|custom",
176
+ "model_profile": "simple|smart|genius",
176
177
  "workflow": {
177
178
  "research": true|false,
178
179
  "plan_check": true|false,
179
180
  "verifier": true|false,
181
+ "nyquist_validation": depth !== "quick",
180
182
  "auto_advance": true
181
183
  }
182
184
  }
@@ -188,13 +190,13 @@ Create `.planning/config.json` with mode set to "yolo":
188
190
 
189
191
  ```bash
190
192
  mkdir -p .planning
191
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "chore: add project config" --files .planning/config.json
193
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "chore: add project config" --files .planning/config.json
192
194
  ```
193
195
 
194
- **Persist auto-advance to config (survives context compaction):**
196
+ **Persist auto-advance chain flag to config (survives context compaction):**
195
197
 
196
198
  ```bash
197
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs config-set workflow.auto_advance true
199
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-set workflow._auto_chain_active true
198
200
  ```
199
201
 
200
202
  Proceed to Step 4 (skip Steps 3 and 5).
@@ -338,7 +340,7 @@ Do not compress. Capture everything gathered.
338
340
 
339
341
  ```bash
340
342
  mkdir -p .planning
341
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs: initialize project" --files .planning/PROJECT.md
343
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: initialize project" --files .planning/PROJECT.md
342
344
  ```
343
345
 
344
346
  ## 5. Workflow Preferences
@@ -379,13 +381,13 @@ questions: [
379
381
  ]
380
382
  },
381
383
  {
382
- header: "Depth",
383
- question: "How thorough should planning be?",
384
+ header: "Granularity",
385
+ question: "How finely should scope be sliced into phases?",
384
386
  multiSelect: false,
385
387
  options: [
386
- { label: "Quick", description: "Ship fast (3-5 phases, 1-3 plans each)" },
387
- { label: "Standard", description: "Balanced scope and speed (5-8 phases, 3-5 plans each)" },
388
- { label: "Comprehensive", description: "Thorough coverage (8-12 phases, 5-10 plans each)" }
388
+ { label: "Coarse", description: "Fewer, broader phases (3-5 phases, 1-3 plans each)" },
389
+ { label: "Standard", description: "Balanced phase size (5-8 phases, 3-5 plans each)" },
390
+ { label: "Fine", description: "Many focused phases (8-12 phases, 5-10 plans each)" }
389
391
  ]
390
392
  },
391
393
  {
@@ -457,7 +459,7 @@ questions: [
457
459
  options: [
458
460
  { label: "Smart (Recommended)", description: "Two models: one for reseach and planing, other for execution and verification" },
459
461
  { label: "Simple", description: Description: "One model for all agents (not flexible)" },
460
- { label: "Custom (most flexible)", description: "Three models: different for every stage" }
462
+ { label: "Genius (most flexible)", description: "Three models: different for every stage" }
461
463
  ]
462
464
  }
463
465
  ]
@@ -468,14 +470,15 @@ Create `.planning/config.json` with all settings:
468
470
  ```json
469
471
  {
470
472
  "mode": "yolo|interactive",
471
- "depth": "quick|standard|comprehensive",
473
+ "granularity": "coarse|standard|fine",
472
474
  "parallelization": true|false,
473
475
  "commit_docs": true|false,
474
- "model_profile": "simple|smart|custom",
476
+ "model_profile": "simple|smart|genius",
475
477
  "workflow": {
476
478
  "research": true|false,
477
479
  "plan_check": true|false,
478
- "verifier": true|false
480
+ "verifier": true|false,
481
+ "nyquist_validation": depth !== "quick"
479
482
  }
480
483
  }
481
484
  ```
@@ -490,7 +493,7 @@ Create `.planning/config.json` with all settings:
490
493
  **Commit config.json:**
491
494
 
492
495
  ```bash
493
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "chore: add project config" --files .planning/config.json
496
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "chore: add project config" --files .planning/config.json
494
497
  ```
495
498
 
496
499
  **Note:** Run `/gsd-settings` anytime to update these preferences.
@@ -544,9 +547,7 @@ Display spawning indicator:
544
547
  Spawn 4 parallel gsd-project-researcher agents with path references:
545
548
 
546
549
  ```
547
- task(prompt="First, read ~/.config/opencode/agents/gsd-project-researcher.md for your role and instructions.
548
-
549
- <research_type>
550
+ task(prompt="<research_type>
550
551
  Project Research — Stack dimension for [domain].
551
552
  </research_type>
552
553
 
@@ -580,13 +581,11 @@ Your STACK.md feeds into roadmap creation. Be prescriptive:
580
581
 
581
582
  <output>
582
583
  write to: .planning/research/STACK.md
583
- Use template: ~/.config/opencode/get-shit-done/templates/research-project/STACK.md
584
+ Use template: $HOME/.config/opencode/get-shit-done/templates/research-project/STACK.md
584
585
  </output>
585
- ", subagent_type="general", model="{researcher_model}", description="Stack research")
586
-
587
- task(prompt="First, read ~/.config/opencode/agents/gsd-project-researcher.md for your role and instructions.
586
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Stack research")
588
587
 
589
- <research_type>
588
+ task(prompt="<research_type>
590
589
  Project Research — Features dimension for [domain].
591
590
  </research_type>
592
591
 
@@ -620,13 +619,11 @@ Your FEATURES.md feeds into requirements definition. Categorize clearly:
620
619
 
621
620
  <output>
622
621
  write to: .planning/research/FEATURES.md
623
- Use template: ~/.config/opencode/get-shit-done/templates/research-project/FEATURES.md
622
+ Use template: $HOME/.config/opencode/get-shit-done/templates/research-project/FEATURES.md
624
623
  </output>
625
- ", subagent_type="general", model="{researcher_model}", description="Features research")
624
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Features research")
626
625
 
627
- task(prompt="First, read ~/.config/opencode/agents/gsd-project-researcher.md for your role and instructions.
628
-
629
- <research_type>
626
+ task(prompt="<research_type>
630
627
  Project Research — Architecture dimension for [domain].
631
628
  </research_type>
632
629
 
@@ -660,13 +657,11 @@ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
660
657
 
661
658
  <output>
662
659
  write to: .planning/research/ARCHITECTURE.md
663
- Use template: ~/.config/opencode/get-shit-done/templates/research-project/ARCHITECTURE.md
660
+ Use template: $HOME/.config/opencode/get-shit-done/templates/research-project/ARCHITECTURE.md
664
661
  </output>
665
- ", subagent_type="general", model="{researcher_model}", description="Architecture research")
666
-
667
- task(prompt="First, read ~/.config/opencode/agents/gsd-project-researcher.md for your role and instructions.
662
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Architecture research")
668
663
 
669
- <research_type>
664
+ task(prompt="<research_type>
670
665
  Project Research — Pitfalls dimension for [domain].
671
666
  </research_type>
672
667
 
@@ -700,9 +695,9 @@ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
700
695
 
701
696
  <output>
702
697
  write to: .planning/research/PITFALLS.md
703
- Use template: ~/.config/opencode/get-shit-done/templates/research-project/PITFALLS.md
698
+ Use template: $HOME/.config/opencode/get-shit-done/templates/research-project/PITFALLS.md
704
699
  </output>
705
- ", subagent_type="general", model="{researcher_model}", description="Pitfalls research")
700
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Pitfalls research")
706
701
  ```
707
702
 
708
703
  After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
@@ -722,7 +717,7 @@ Synthesize research outputs into SUMMARY.md.
722
717
 
723
718
  <output>
724
719
  write to: .planning/research/SUMMARY.md
725
- Use template: ~/.config/opencode/get-shit-done/templates/research-project/SUMMARY.md
720
+ Use template: $HOME/.config/opencode/get-shit-done/templates/research-project/SUMMARY.md
726
721
  Commit after writing.
727
722
  </output>
728
723
  ", subagent_type="gsd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
@@ -887,7 +882,7 @@ If "adjust": Return to scoping.
887
882
  **Commit requirements:**
888
883
 
889
884
  ```bash
890
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs: define v1 requirements" --files .planning/REQUIREMENTS.md
885
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: define v1 requirements" --files .planning/REQUIREMENTS.md
891
886
  ```
892
887
 
893
888
  ## 8. Create Roadmap
@@ -911,7 +906,7 @@ task(prompt="
911
906
  - .planning/PROJECT.md (Project context)
912
907
  - .planning/REQUIREMENTS.md (v1 Requirements)
913
908
  - .planning/research/SUMMARY.md (Research findings - if exists)
914
- - .planning/config.json (Depth and mode settings)
909
+ - .planning/config.json (Granularity and mode settings)
915
910
  </files_to_read>
916
911
 
917
912
  </planning_context>
@@ -1017,7 +1012,7 @@ Use question:
1017
1012
  **Commit roadmap (after approval or auto mode):**
1018
1013
 
1019
1014
  ```bash
1020
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
1015
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
1021
1016
  ```
1022
1017
 
1023
1018
  ## 9. Done
@@ -1098,7 +1093,7 @@ Exit skill and invoke command("/gsd-discuss-phase 1 --auto")
1098
1093
  - [ ] Brownfield detection completed
1099
1094
  - [ ] Deep questioning completed (threads followed, not rushed)
1100
1095
  - [ ] PROJECT.md captures full context → **committed**
1101
- - [ ] config.json has workflow mode, depth, parallelization → **committed**
1096
+ - [ ] config.json has workflow mode, granularity, parallelization → **committed**
1102
1097
  - [ ] Research completed (if selected) — 4 parallel agents spawned → **committed**
1103
1098
  - [ ] Requirements gathered (from research or conversation)
1104
1099
  - [ ] User scoped each category (v1/v2/out of scope)
@@ -5,6 +5,7 @@ You are executing the `/gsd-set-profile` command. Switch the project's active mo
5
5
  This command reads/writes:
6
6
  - `.planning/oc_config.json` — source of truth for profile state (profile_type, stage-to-model mapping)
7
7
  - `opencode.json` — agent model assignments (derived from profile; updated automatically by CLI)
8
+ - `opencode.json` — external_directory permissions for reading GSD config folder (added automatically)
8
9
 
9
10
  Do NOT modify agent .md files. Profile switching only updates these two JSON files.
10
11
  </role>
@@ -48,6 +49,27 @@ Active profile: **{profile_name}**
48
49
 
49
50
  <behavior>
50
51
 
52
+ ## Step 0: Ensure GSD config read permission
53
+
54
+ Before any profile operations, ensure opencode.json has permission to read the GSD config folder:
55
+
56
+ ```bash
57
+ node ~/.config/opencode/get-shit-done/bin/gsd-oc-tools.cjs allow-read-config --dry-run
58
+ ```
59
+
60
+ Parse the response:
61
+ - **`success: true` with `action: "permission_exists"`** — Permission already configured. Continue to Step 1.
62
+ - **`success: true` with `action: "add_permission"`** — Permission would be added. Execute without `--dry-run`:
63
+
64
+ Attempt to switch to the saved profile:
65
+ ```bash
66
+ node ~/.config/opencode/get-shit-done/bin/gsd-oc-tools.cjs allow-read-config
67
+ ```
68
+
69
+ - **`success: false`** — Handle error appropriately.
70
+
71
+ This ensures gsd-opencode can access workflow files, templates, and configuration from `~/.config/opencode/get-shit-done/`.
72
+
51
73
  ## Step 1: Load current profile
52
74
 
53
75
  Run `get-profile` to read the current state from `.planning/oc_config.json`:
@@ -148,6 +170,8 @@ Done! Updated {profile_name} profile:
148
170
 
149
171
  We just updated the `./opencode.json` file. Apply the agent settings you need to **restart your opencode**.
150
172
 
173
+ Note: GSD config read permission has been configured to allow access to `~/.config/opencode/get-shit-done/`.
174
+
151
175
  </behavior>
152
176
 
153
177
  <notes>
@@ -86,13 +86,13 @@ Be specific enough for a fresh OpenCode to understand immediately.
86
86
 
87
87
  Use `current-timestamp` for last_updated field. You can use init todos (which provides timestamps) or call directly:
88
88
  ```bash
89
- timestamp=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs current-timestamp full --raw)
89
+ timestamp=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" current-timestamp full --raw)
90
90
  ```
91
91
  </step>
92
92
 
93
93
  <step name="commit">
94
94
  ```bash
95
- node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "wip: [phase-name] paused at task [X]/[Y]" --files .planning/phases/*/.continue-here.md
95
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "wip: [phase-name] paused at task [X]/[Y]" --files .planning/phases/*/.continue-here.md
96
96
  ```
97
97
  </step>
98
98