@opengsd/gsd-core 1.16.0 → 1.18.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 (211) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -2
  3. package/.opencode/plugins/gsd-core.js +251 -1
  4. package/.opencode/plugins/gsd-statusline/tui.tsx +55 -0
  5. package/GEMINI.md +1 -1
  6. package/agents/gsd-advisor-researcher.compact.md +1 -1
  7. package/agents/gsd-advisor-researcher.md +1 -1
  8. package/agents/gsd-assumptions-analyzer.compact.md +1 -1
  9. package/agents/gsd-assumptions-analyzer.md +1 -1
  10. package/agents/gsd-code-fixer.compact.md +1 -1
  11. package/agents/gsd-code-fixer.md +1 -1
  12. package/agents/gsd-code-reviewer.compact.md +1 -1
  13. package/agents/gsd-code-reviewer.md +1 -1
  14. package/agents/gsd-codebase-mapper.compact.md +1 -1
  15. package/agents/gsd-codebase-mapper.md +1 -1
  16. package/agents/gsd-debug-session-manager.compact.md +6 -0
  17. package/agents/gsd-debug-session-manager.md +6 -0
  18. package/agents/gsd-debugger.md +1 -1
  19. package/agents/gsd-doc-verifier.compact.md +4 -4
  20. package/agents/gsd-doc-verifier.md +4 -3
  21. package/agents/gsd-doc-writer.compact.md +23 -5
  22. package/agents/gsd-doc-writer.md +19 -6
  23. package/agents/gsd-eval-auditor.compact.md +1 -1
  24. package/agents/gsd-eval-auditor.md +1 -1
  25. package/agents/gsd-executor.md +7 -3
  26. package/agents/gsd-integration-checker.compact.md +1 -1
  27. package/agents/gsd-integration-checker.md +1 -1
  28. package/agents/gsd-nyquist-auditor.compact.md +1 -1
  29. package/agents/gsd-nyquist-auditor.md +1 -1
  30. package/agents/gsd-phase-researcher.md +1 -1
  31. package/agents/gsd-plan-checker.md +2 -1
  32. package/agents/gsd-planner.md +5 -4
  33. package/agents/gsd-project-researcher.compact.md +1 -1
  34. package/agents/gsd-project-researcher.md +1 -1
  35. package/agents/gsd-research-synthesizer.compact.md +5 -5
  36. package/agents/gsd-research-synthesizer.md +5 -5
  37. package/agents/gsd-roadmapper.compact.md +1 -1
  38. package/agents/gsd-roadmapper.md +1 -1
  39. package/agents/gsd-security-auditor.compact.md +1 -1
  40. package/agents/gsd-security-auditor.md +1 -1
  41. package/agents/gsd-ui-auditor.compact.md +1 -1
  42. package/agents/gsd-ui-auditor.md +1 -1
  43. package/agents/gsd-ui-checker.compact.md +1 -1
  44. package/agents/gsd-ui-checker.md +1 -1
  45. package/agents/gsd-ui-researcher.compact.md +13 -1
  46. package/agents/gsd-ui-researcher.md +28 -1
  47. package/agents/gsd-verifier.md +1 -1
  48. package/bin/gsd-mcp-server.js +3 -1
  49. package/bin/install.js +398 -95
  50. package/commands/gsd/code-review.md +8 -0
  51. package/commands/gsd/pause-work.md +1 -1
  52. package/gsd-core/bin/gsd-tools.cjs +34 -12
  53. package/gsd-core/bin/lib/adr-parser.cjs +37 -5
  54. package/gsd-core/bin/lib/capability-ledger.cjs +25 -0
  55. package/gsd-core/bin/lib/capability-lock.cjs +29 -7
  56. package/gsd-core/bin/lib/capability-registry.cjs +138 -80
  57. package/gsd-core/bin/lib/capability-source.cjs +3 -1
  58. package/gsd-core/bin/lib/capability-state.cjs +6 -3
  59. package/gsd-core/bin/lib/capability-validator.cjs +8 -5
  60. package/gsd-core/bin/lib/capability-writer.cjs +2 -1
  61. package/gsd-core/bin/lib/commands.cjs +33 -9
  62. package/gsd-core/bin/lib/config-loader.cjs +3 -3
  63. package/gsd-core/bin/lib/decision-coverage-support.cjs +19 -0
  64. package/gsd-core/bin/lib/gate-context-drift.cjs +5 -4
  65. package/gsd-core/bin/lib/gate-decision-coverage-plan.cjs +15 -0
  66. package/gsd-core/bin/lib/gate-decision-coverage-verify.cjs +13 -0
  67. package/gsd-core/bin/lib/gate-predicate-evaluator.cjs +23 -3
  68. package/gsd-core/bin/lib/gate-predicate.cjs +8 -12
  69. package/gsd-core/bin/lib/gate-tdd-review-checkpoint.cjs +60 -5
  70. package/gsd-core/bin/lib/gate-ui-safety.cjs +2 -1
  71. package/gsd-core/bin/lib/graphify.cjs +3 -2
  72. package/gsd-core/bin/lib/init.cjs +43 -16
  73. package/gsd-core/bin/lib/install-effort-resolver.cjs +2 -2
  74. package/gsd-core/bin/lib/install-engine.cjs +11 -0
  75. package/gsd-core/bin/lib/install-model-override-resolver.cjs +4 -3
  76. package/gsd-core/bin/lib/install-profiles.cjs +5 -3
  77. package/gsd-core/bin/lib/install-shadow-report.cjs +12 -0
  78. package/gsd-core/bin/lib/installer-migrations/011-opencode-mcp-no-prompts.cjs +99 -0
  79. package/gsd-core/bin/lib/installer-migrations.cjs +54 -1
  80. package/gsd-core/bin/lib/jsonc-edit.cjs +418 -0
  81. package/gsd-core/bin/lib/loop-host-contract.cjs +2 -1
  82. package/gsd-core/bin/lib/mcp-server.cjs +5 -1
  83. package/gsd-core/bin/lib/opencode-mcp-entry.cjs +39 -0
  84. package/gsd-core/bin/lib/opencode-version.cjs +486 -0
  85. package/gsd-core/bin/lib/phase.cjs +141 -11
  86. package/gsd-core/bin/lib/quick-batch-dispatch.cjs +2 -1
  87. package/gsd-core/bin/lib/report-parser.cjs +57 -1
  88. package/gsd-core/bin/lib/review-lane-invocation.cjs +40 -0
  89. package/gsd-core/bin/lib/review-reviewer-selection.cjs +20 -1
  90. package/gsd-core/bin/lib/roadmap.cjs +56 -5
  91. package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +142 -6
  92. package/gsd-core/bin/lib/runtime-homes.cjs +18 -0
  93. package/gsd-core/bin/lib/runtime-hooks-surface.cjs +58 -3
  94. package/gsd-core/bin/lib/runtime-slash.cjs +13 -0
  95. package/gsd-core/bin/lib/shell-command-projection.cjs +2 -0
  96. package/gsd-core/bin/lib/smart-entry.cjs +100 -53
  97. package/gsd-core/bin/lib/state-document.cjs +37 -3
  98. package/gsd-core/bin/lib/state-transition.cjs +98 -19
  99. package/gsd-core/bin/lib/state.cjs +544 -126
  100. package/gsd-core/bin/lib/task-command-router.cjs +2 -3
  101. package/gsd-core/bin/lib/tdd-red-evidence.cjs +5 -0
  102. package/gsd-core/bin/lib/tdd-test-files.cjs +42 -0
  103. package/gsd-core/bin/lib/update-context.cjs +18 -1
  104. package/gsd-core/bin/lib/verification.cjs +107 -17
  105. package/gsd-core/bin/lib/verify.cjs +36 -1
  106. package/gsd-core/references/agent-contracts.md +1 -1
  107. package/gsd-core/references/agent-skills-bootstrap.md +26 -7
  108. package/gsd-core/references/git-integration.md +3 -3
  109. package/gsd-core/references/planner-reversibility.md +18 -4
  110. package/gsd-core/references/planner-verify-command-grounding.md +18 -0
  111. package/gsd-core/references/tdd.md +4 -3
  112. package/gsd-core/references/verifier-phase-gates.md +8 -1
  113. package/gsd-core/workflows/add-backlog.md +10 -2
  114. package/gsd-core/workflows/add-phase.md +5 -1
  115. package/gsd-core/workflows/add-tests.md +5 -1
  116. package/gsd-core/workflows/add-todo.md +5 -1
  117. package/gsd-core/workflows/ai-integration-phase.md +5 -1
  118. package/gsd-core/workflows/audit-milestone.md +21 -9
  119. package/gsd-core/workflows/autonomous/templates/minimal-context.md +41 -0
  120. package/gsd-core/workflows/autonomous.md +52 -64
  121. package/gsd-core/workflows/check-todos.md +5 -1
  122. package/gsd-core/workflows/code-review-fix.md +5 -1
  123. package/gsd-core/workflows/code-review.md +21 -2
  124. package/gsd-core/workflows/complete-milestone/detail/elaboration.md +5 -1
  125. package/gsd-core/workflows/complete-milestone.md +25 -5
  126. package/gsd-core/workflows/debug.md +5 -1
  127. package/gsd-core/workflows/diagnose-issues.md +5 -1
  128. package/gsd-core/workflows/discuss-phase/modes/chain.md +5 -1
  129. package/gsd-core/workflows/discuss-phase-assumptions.md +11 -3
  130. package/gsd-core/workflows/discuss-phase.md +5 -1
  131. package/gsd-core/workflows/docs-update/detail/elaboration.md +7 -6
  132. package/gsd-core/workflows/docs-update.md +27 -5
  133. package/gsd-core/workflows/edit-phase.md +5 -1
  134. package/gsd-core/workflows/eval-review.md +11 -3
  135. package/gsd-core/workflows/execute-phase/steps/codebase-drift-gate.md +5 -1
  136. package/gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md +1 -1
  137. package/gsd-core/workflows/execute-phase/steps/post-merge-gate.md +12 -6
  138. package/gsd-core/workflows/execute-phase/steps/regression-gate-run.md +19 -2
  139. package/gsd-core/workflows/execute-phase/steps/regression-gate.md +18 -1
  140. package/gsd-core/workflows/execute-phase/steps/verify-phase-goal.md +5 -1
  141. package/gsd-core/workflows/execute-phase.md +40 -7
  142. package/gsd-core/workflows/execute-plan.md +8 -4
  143. package/gsd-core/workflows/extract-learnings.md +6 -2
  144. package/gsd-core/workflows/forensics.md +5 -1
  145. package/gsd-core/workflows/import.md +5 -1
  146. package/gsd-core/workflows/insert-phase.md +5 -1
  147. package/gsd-core/workflows/manager.md +10 -2
  148. package/gsd-core/workflows/map-codebase.md +5 -1
  149. package/gsd-core/workflows/milestone-summary.md +10 -2
  150. package/gsd-core/workflows/new-milestone.md +13 -5
  151. package/gsd-core/workflows/new-project.md +9 -5
  152. package/gsd-core/workflows/next.md +8 -4
  153. package/gsd-core/workflows/pause-work.md +3 -3
  154. package/gsd-core/workflows/plan-phase/steps/auto-advance-check.md +70 -0
  155. package/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md +5 -1
  156. package/gsd-core/workflows/plan-phase/steps/closed-phase-gate.md +6 -2
  157. package/gsd-core/workflows/plan-phase.md +41 -73
  158. package/gsd-core/workflows/plan-review-convergence.md +17 -5
  159. package/gsd-core/workflows/plant-seed.md +8 -4
  160. package/gsd-core/workflows/progress.md +6 -2
  161. package/gsd-core/workflows/quick-batch.md +5 -1
  162. package/gsd-core/workflows/quick.md +22 -7
  163. package/gsd-core/workflows/remove-phase.md +5 -1
  164. package/gsd-core/workflows/resume-project.md +19 -11
  165. package/gsd-core/workflows/review.md +6 -2
  166. package/gsd-core/workflows/scan.md +5 -1
  167. package/gsd-core/workflows/secure-phase.md +6 -2
  168. package/gsd-core/workflows/settings.md +3 -3
  169. package/gsd-core/workflows/ship.md +13 -10
  170. package/gsd-core/workflows/thread.md +10 -2
  171. package/gsd-core/workflows/transition.md +5 -1
  172. package/gsd-core/workflows/ui-phase.md +5 -1
  173. package/gsd-core/workflows/ui-review.md +6 -2
  174. package/gsd-core/workflows/ultraplan-phase.md +5 -1
  175. package/gsd-core/workflows/update.md +5 -1
  176. package/gsd-core/workflows/validate-phase.md +6 -2
  177. package/gsd-core/workflows/verify-work/detail/elaboration.md +1 -1
  178. package/gsd-core/workflows/verify-work/steps/mvp-uat-framing.md +5 -1
  179. package/gsd-core/workflows/verify-work.md +11 -3
  180. package/hooks/dist/gsd-agent-isolation-guard.js +3 -1
  181. package/hooks/dist/gsd-check-update.js +26 -20
  182. package/hooks/dist/gsd-context-monitor.js +14 -5
  183. package/hooks/dist/gsd-cursor-subagent-start.js +2 -1
  184. package/hooks/dist/gsd-secret-read-guard.js +189 -15
  185. package/hooks/dist/gsd-statusline.js +321 -22
  186. package/hooks/dist/gsd-validate-commit.sh +27 -5
  187. package/hooks/gsd-agent-isolation-guard.js +3 -1
  188. package/hooks/gsd-check-update.js +26 -20
  189. package/hooks/gsd-context-monitor.js +14 -5
  190. package/hooks/gsd-cursor-subagent-start.js +2 -1
  191. package/hooks/gsd-secret-read-guard.js +189 -15
  192. package/hooks/gsd-statusline.js +321 -22
  193. package/hooks/gsd-validate-commit.sh +27 -5
  194. package/package.json +1 -1
  195. package/scripts/audit-workflow-script-paths.cjs +1 -1
  196. package/scripts/diagnose-validate-commit-in-tier.cjs +270 -0
  197. package/scripts/diagnose-validate-commit-phases.cjs +348 -0
  198. package/scripts/diagnose-windows-spawn-watcher.cjs +317 -0
  199. package/scripts/docs-guard-registry.cjs +2 -0
  200. package/scripts/gen-capability-registry.cjs +7 -1
  201. package/scripts/gen-loop-host-contract.cjs +4 -1
  202. package/scripts/lib/macos-conformance-tier.generated.cjs +13 -0
  203. package/scripts/lib/platform-conformance-tier.generated.cjs +26 -0
  204. package/scripts/lint-phase-arg-assignment.cjs +2 -2
  205. package/scripts/lint-workflow-shellcheck-baseline.json +16 -16
  206. package/scripts/mutation-matrix.cjs +3 -1
  207. package/scripts/release-tarball-smoke.cjs +15 -7
  208. package/scripts/xtrace-phase-timing.cjs +205 -0
  209. package/skills/gsd-code-review/SKILL.md +8 -0
  210. package/skills/gsd-pause-work/SKILL.md +1 -1
  211. package/vscode/package.json +1 -1
@@ -43,7 +43,7 @@ incrementally — only what each check requires, not the full codebase upfront.
43
43
 
44
44
  **Project skills:** check `.claude/skills/` or `.agents/skills/` if either exists.
45
45
 
46
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
46
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-doc-writer`)
47
47
  1. List available skills (subdirectories)
48
48
  2. Read `SKILL.md` for each (lightweight index ~130 lines)
49
49
  3. Load specific `rules/*.md` as needed during implementation
@@ -128,9 +128,11 @@ anything else. Surgical precision: change the minimum characters to fix each fai
128
128
  pnpm), `setup.py`/`pyproject.toml` (pip), `Cargo.toml` (cargo), `go.mod` (go get). Include all
129
129
  applicable if multiple runtimes.
130
130
  - Quick start — shortest install→working-output path (2-4 steps). Check `scripts.start`/
131
- `scripts.dev`, `.bin` entry, `examples/`/`demo/` runnable entry.
131
+ `scripts.dev`, `.bin` entry, `examples/`/`demo/` runnable entry. None exists → critical rule 10
132
+ (test/build fallback, then "no standalone run mode"), not an invented run step.
132
133
  - Usage examples — 1-3 concrete examples with expected output. Read entry points (`bin/`,
133
- `src/index.*`, `lib/index.*`) for API/CLI surface; check `examples/`.
134
+ `src/index.*`, `lib/index.*`) for API/CLI surface; check `examples/`. Event-triggered service
135
+ with no CLI/HTTP surface → "no standalone run mode" (rule 10), no fabricated examples.
134
136
  - Contributing link — one line, only if CONTRIBUTING.md exists or is in the generation queue.
135
137
  - License — one line + link; read LICENSE first line, fall back to `package.json` `.license`.
136
138
 
@@ -169,7 +171,11 @@ directory structure as a tree-indented code block.
169
171
  - Installation steps — clone → cd → install (detected package manager). Check `package.json`,
170
172
  `Pipfile`/`requirements.txt`, `Makefile` install targets.
171
173
  - First run — single command producing working output. `scripts.start`/`scripts.dev`, `Makefile`
172
- `run`/`serve`, existing README quick-start.
174
+ `run`/`serve`, existing README quick-start. Cannot start from repo contents alone (config from a
175
+ secrets manager or deploy-time env, no `.env.example`) or no local entry point (event-triggered
176
+ handlers) → fall back: test command, then build command, then an explicit "no standalone run mode"
177
+ statement (rule 10); put the blocked start-the-server path under Common setup issues. Before citing
178
+ a `Makefile`/`package.json` script as the run path, confirm its referenced inputs exist (rule 11).
173
179
  - Common setup issues — known new-contributor problems + solutions. Check `.env.example`
174
180
  (missing env var errors), `engines` constraints, existing troubleshooting, port conflicts.
175
181
  ≥2 issues; placeholder list if none discoverable.
@@ -328,7 +334,9 @@ Used when `scope: per_package` is set.
328
334
  heading (scoped name, e.g. `@myorg/core`).
329
335
  - Installation — scoped install command from `.name`; omit if `"private": true`.
330
336
  - Usage — key exports/CLI specific to this package only (1-2 examples). Read
331
- `{package_dir}/src/index.*` or `.main`/`.module`/`.exports`.
337
+ `{package_dir}/src/index.*` or `.main`/`.module`/`.exports`. Event-triggered handler (Lambda
338
+ behind SNS/Kinesis, queue consumer) with no CLI/HTTP surface → a "Run Locally" note stating "no
339
+ standalone run mode" plus the test/build commands (rule 10); no fabricated usage examples.
332
340
  - API summary (if applicable) — top-level exports with one-liners (grep `export (function|class|
333
341
  const|type|interface)`). Omit if package has no public exports.
334
342
  - Testing — `{package_dir}/package.json` `scripts.test`; also show workspace-scoped command if a
@@ -424,6 +432,16 @@ type. Create `docs/` if missing. No frontmatter added.
424
432
  5. Use `<!-- VERIFY: {claim} -->` for infrastructure claims not verifiable from the repo alone.
425
433
  6. Update mode: PRESERVE accurate user-authored content. Only rewrite inaccurate/missing sections.
426
434
  7. Supplement mode: NEVER modify existing content. Only append missing sections. No GSD marker.
435
+ 10. Not every target runs locally. No runnable entry point (event-triggered handlers with no CLI/HTTP
436
+ surface) or cannot start from repo contents alone (config from a secrets manager/deploy-time env)
437
+ → no literal run step or fabricated output. Fall back: test command, then build command, then an
438
+ explicit "no standalone run mode" statement. Normal entry points (`scripts.start`, CLI bin,
439
+ `go run`, `docker compose up`) keep the normal run step.
440
+ 11. Before citing a Makefile target or `package.json` script as a quick-start/run path, confirm the
441
+ inputs it references (event fixtures, SAM/CloudFormation templates, config files) exist in the
442
+ repo. A script that only looks like the answer is not proof it works: if an input is missing,
443
+ document the target as-is with `<!-- VERIFY: {target} references {missing input}, which is not in
444
+ the repository -->`, not as working.
427
445
 
428
446
  </critical_rules>
429
447
 
@@ -35,7 +35,7 @@ If the prompt contains a `<required_reading>` block, you MUST use the `Read` too
35
35
 
36
36
  **Project skills:** Check `.claude/skills/` or `.agents/skills/` directory if either exists:
37
37
 
38
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
38
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-doc-writer`)
39
39
  1. List available skills (subdirectories)
40
40
  2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
41
41
  3. Load specific `rules/*.md` files as needed during implementation
@@ -120,10 +120,12 @@ Fix mode must correct ONLY the lines listed in the failures array. Do not modify
120
120
  Use the applicable package manager command; include all required ones if multiple runtimes are involved.
121
121
  - Quick start — The shortest path from install to working output (2-4 steps maximum).
122
122
  Discover: `package.json` `scripts.start` or `scripts.dev`; primary CLI bin entry from `package.json` `.bin`;
123
- look for a `examples/` or `demo/` directory with a runnable entry point.
123
+ look for a `examples/` or `demo/` directory with a runnable entry point. If none exists, apply critical
124
+ rule 10 (build/test fallback, then "no standalone run mode") instead of inventing a run step.
124
125
  - Usage examples — 1-3 concrete examples showing common use cases with expected output or result.
125
126
  Discover: Read entry-point files (`bin/`, `src/index.*`, `lib/index.*`) for exported API surface or CLI
126
- commands; check `examples/` directory for existing runnable examples.
127
+ commands; check `examples/` directory for existing runnable examples. For an event-triggered service with
128
+ no CLI or HTTP surface, state "no standalone run mode" (critical rule 10) rather than fabricating examples.
127
129
  - Contributing link — One line: "See CONTRIBUTING.md for guidelines." Include only if CONTRIBUTING.md exists
128
130
  in the project root or is in the current doc generation queue.
129
131
  - License — One line stating the license type and a link to the LICENSE file.
@@ -195,7 +197,12 @@ Fix mode must correct ONLY the lines listed in the failures array. Do not modify
195
197
  or `requirements.txt` for pip, `Makefile` for custom install targets.
196
198
  - First run — The single command that produces working output (a running server, a CLI result, a passing
197
199
  test). Discover: `package.json` `scripts.start` or `scripts.dev`; `Makefile` `run` or `serve` target;
198
- `README.md` quick-start section if it exists.
200
+ `README.md` quick-start section if it exists. When the project cannot be started from repository contents
201
+ alone (required config comes from a secrets manager or deploy-time environment, no `.env.example`), or has
202
+ no local entry point (event-triggered handlers), fall back in this order: the test command (`go test`,
203
+ `npm test`, `pytest`, or equivalent), then the build command (`go build` or equivalent), then an explicit
204
+ "no standalone run mode" statement (critical rule 10). Mention the blocked start-the-server path in
205
+ Common setup issues instead of presenting it as the first run.
199
206
  - Common setup issues — Known problems new contributors encounter with solutions. Discover: Check for
200
207
  `.env.example` (missing env var errors), `package.json` `engines` version constraints (wrong runtime
201
208
  version), `README.md` existing troubleshooting section, common port conflict patterns.
@@ -209,7 +216,8 @@ Fix mode must correct ONLY the lines listed in the failures array. Do not modify
209
216
  - `.env.example` or `.env.sample` — required environment variables
210
217
  - `Dockerfile` `FROM` line — base runtime version
211
218
  - `package.json` `scripts.start` and `scripts.dev` — first run command
212
- - `Makefile` targets — alternative install/run commands
219
+ - `Makefile` targets — alternative install/run commands. Before citing one (or a `package.json` script) as
220
+ the quick-start path, confirm its referenced inputs exist in the repository (critical rule 11).
213
221
 
214
222
  **Format Notes:**
215
223
  - Use numbered lists for sequential steps
@@ -476,7 +484,10 @@ Used when `scope: per_package` is set in `doc_assignment`.
476
484
  Omit if the package is private (`"private": true` in package.json).
477
485
  - Usage — Key exports or CLI commands specific to this package only. Show 1-2 realistic usage examples.
478
486
  Discover: Read `{package_dir}/src/index.*` or `{package_dir}/index.*` for the primary export surface.
479
- Check `{package_dir}/package.json` `.main`, `.module`, `.exports` for the entry point.
487
+ Check `{package_dir}/package.json` `.main`, `.module`, `.exports` for the entry point. For an
488
+ event-triggered handler (a Lambda behind SNS/Kinesis, a queue consumer) with no CLI or HTTP surface, add a
489
+ "Run Locally" note stating there is no standalone run mode, plus the test/build commands (critical rule 10);
490
+ do not fabricate usage examples.
480
491
  - API summary (if applicable) — Top-level exported functions, classes, or types with one-line descriptions.
481
492
  Discover: Grep for `export (function|class|const|type|interface)` in the package entry point.
482
493
  Omit if the package has no public exports (private internal package with `"private": true`).
@@ -603,6 +614,8 @@ change — only location and metadata change.
603
614
  5. Use `<!-- VERIFY: {claim} -->` markers for any infrastructure claim (URLs, server configs, external service details) that cannot be verified from the repository contents alone.
604
615
  6. In update mode, PRESERVE user-authored content in sections that are still accurate. Only rewrite inaccurate or missing sections.
605
616
  7. In supplement mode, NEVER modify existing content. Only append missing sections. Do NOT add the GSD marker to hand-written files.
617
+ 10. Not every target can be run locally. When a project or package has no runnable entry point (event-triggered handlers with no CLI or HTTP surface) or cannot start from repository contents alone (required config comes from a secrets manager or deploy-time environment), do NOT write a literal run step or fabricated usage output. Fall back in this order: the test command, then the build command, then an explicit "no standalone run mode" statement. Targets with a normal entry point (`scripts.start`, a CLI bin, `go run`, `docker compose up`) keep the normal run step.
618
+ 11. Before citing a Makefile target or `package.json` script as a quick-start or run path, confirm the inputs it references (event fixtures, SAM/CloudFormation templates, config files) exist in the repository. A script that only looks like the answer is not proof it works: if an input is missing, document the target as-is but flag it with `<!-- VERIFY: {target} references {missing input}, which is not in the repository -->` instead of presenting it as working.
606
619
 
607
620
  </critical_rules>
608
621
 
@@ -30,7 +30,7 @@ Read `~/.claude/gsd-core/references/ai-evals.md` before auditing. This is your s
30
30
 
31
31
  **Context budget:** load project skills first (lightweight); read implementation files incrementally — only what each check requires.
32
32
 
33
- **Project skills:** check `.claude/skills/` or `.agents/skills/`. **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md — list skill subdirectories, read each `SKILL.md` (lightweight index ~130 lines), load specific `rules/*.md` as needed. Do NOT load full `AGENTS.md` files (100KB+ context cost). Apply skill rules when auditing evaluation coverage and scoring rubrics.
33
+ **Project skills:** check `.claude/skills/` or `.agents/skills/`. **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-eval-auditor`) — list skill subdirectories, read each `SKILL.md` (lightweight index ~130 lines), load specific `rules/*.md` as needed. Do NOT load full `AGENTS.md` files (100KB+ context cost). Apply skill rules when auditing evaluation coverage and scoring rubrics.
34
34
 
35
35
  <input>
36
36
  - `ai_spec_path`: path to AI-SPEC.md (planned eval strategy)
@@ -40,7 +40,7 @@ Read `~/.claude/gsd-core/references/ai-evals.md` before auditing. This is your s
40
40
 
41
41
  **Project skills:** Check `.claude/skills/` or `.agents/skills/` directory if either exists:
42
42
 
43
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
43
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-eval-auditor`)
44
44
  1. List available skills (subdirectories)
45
45
  2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
46
46
  3. Load specific `rules/*.md` files as needed during implementation
@@ -66,7 +66,7 @@ Before executing, discover project context:
66
66
  - Load `rules/*.md` as needed during **implementation**.
67
67
  - Follow skill rules relevant to the task you are about to commit.
68
68
 
69
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
69
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-executor`)
70
70
 
71
71
  **CLAUDE.md enforcement:** If `./CLAUDE.md` exists, treat its directives as hard constraints during execution. Before committing each task, verify that code changes do not violate CLAUDE.md rules (forbidden patterns, required conventions, mandated tools). If a task action would contradict a CLAUDE.md directive, apply the CLAUDE.md rule — it takes precedence over plan instructions. Document any CLAUDE.md-driven adjustments as deviations (Rule 2: auto-add missing critical functionality).
72
72
  </project_context>
@@ -503,7 +503,11 @@ if [ "$IS_PROTECTED" != "false" ]; then
503
503
  echo "Re-home onto a phase/agent branch (#2924, #3819); override: git.allow_default_branch_commits:true in .planning/config.json." >&2
504
504
  exit 1
505
505
  fi
506
- if [ -f .git ]; then # worktree
506
+ # #4799: set SEQUENTIAL=true ONLY if your prompt has a `<sequential_execution>` block (the
507
+ # orchestrator dispatched you onto its own working tree, which may be a linked phase worktree on
508
+ # the configured branch). Otherwise leave it false: the allow-list below applies (fails closed).
509
+ SEQUENTIAL=false
510
+ if [ -f .git ] && [ "$SEQUENTIAL" != "true" ]; then # agent-isolated worktree
507
511
  # Positive allow-list: HEAD must be on a per-agent branch (`agent-<id>` or
508
512
  # legacy `worktree-agent-<id>`). This catches feature/* and any other
509
513
  # arbitrary branch that the deny-list would silently allow (#2924, #1995).
@@ -620,7 +624,7 @@ back, those deletions appear on the main branch, destroying prior-wave work (#20
620
624
  touching `refs/stash`:
621
625
 
622
626
  - **Move WIP off the working tree:** commit it to a throwaway branch you own
623
- (e.g. `git checkout -b scratch-/<task>-wip && git add -A && git commit -m "wip"`),
627
+ (e.g. `git checkout -b scratch-/<task>-wip && git add -A && git commit -m "chore(wip): scratch"`),
624
628
  then `git checkout <your-worktree-branch>` to return to your task. The
625
629
  throwaway branch lives in the per-worktree branch namespace and never
626
630
  collides with sibling worktrees.
@@ -44,7 +44,7 @@ incrementally — only what each check requires, not the full codebase upfront.
44
44
 
45
45
  **Project skills:** check `.claude/skills/` or `.agents/skills/` if either exists.
46
46
 
47
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
47
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-integration-checker`)
48
48
  1. List available skills (subdirectories)
49
49
  2. Read `SKILL.md` for each (lightweight index ~130 lines)
50
50
  3. Load specific `rules/*.md` as needed during implementation
@@ -36,7 +36,7 @@ Every expected cross-phase connection must resolve to WIRED (verified end-to-end
36
36
 
37
37
  **Project skills:** Check `.claude/skills/` or `.agents/skills/` directory if either exists:
38
38
 
39
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
39
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-integration-checker`)
40
40
  1. List available skills (subdirectories)
41
41
  2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
42
42
  3. Load specific `rules/*.md` files as needed during implementation
@@ -46,7 +46,7 @@ Read ALL files from `<required_reading>`. Extract: implementation exports/API/co
46
46
  **Context budget:** Load project skills first (lightweight). Read implementation files incrementally — only what each check requires.
47
47
 
48
48
  **Project skills:** Check `.claude/skills/` or `.agents/skills/`.
49
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
49
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-nyquist-auditor`)
50
50
  1. List available skills 2. Read each `SKILL.md` (~130 lines) 3. Load specific `rules/*.md` as needed 4. Do NOT load full `AGENTS.md` (100KB+) 5. Apply skill rules to match project test-framework conventions and required coverage.
51
51
  </step>
52
52
 
@@ -52,7 +52,7 @@ Read ALL files from `<required_reading>`. Extract:
52
52
 
53
53
  **Project skills:** Check `.claude/skills/` or `.agents/skills/` directory if either exists:
54
54
 
55
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
55
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-nyquist-auditor`)
56
56
  1. List available skills (subdirectories)
57
57
  2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
58
58
  3. Load specific `rules/*.md` files as needed during implementation
@@ -54,7 +54,7 @@ Before researching, discover project context:
54
54
  - Load `rules/*.md` as needed during **research**.
55
55
  - Research output should account for project skill patterns and conventions.
56
56
 
57
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
57
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-phase-researcher`)
58
58
 
59
59
  **CLAUDE.md enforcement:** If `./CLAUDE.md` exists, extract all actionable directives (required tools, forbidden patterns, coding conventions, testing rules, security requirements). Include a `## Project Constraints (from CLAUDE.md)` section in RESEARCH.md listing these directives so the planner can verify compliance. Treat CLAUDE.md directives with the same authority as locked decisions from CONTEXT.md — research should not recommend approaches that contradict them.
60
60
  </project_context>
@@ -59,7 +59,7 @@ Before verifying, discover project context:
59
59
 
60
60
  **Project skills:** Check `.claude/skills/` or `.agents/skills/` directory if either exists:
61
61
 
62
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
62
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-plan-checker`)
63
63
  1. List available skills (subdirectories)
64
64
  2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
65
65
  3. Load specific `rules/*.md` files as needed during verification
@@ -695,6 +695,7 @@ issue:
695
695
  1. For each `<automated>` block piping a package-manager list command into grep with a `^` anchor: BLOCKER.
696
696
  2. For each `<automated>` block containing `2>/dev/null || echo` where the result feeds a `[ "$VAR" = ... ]` comparison: BLOCKER.
697
697
  3. For each `<automated>` block asserting a specific numeric count not cited as measured in this plan: WARNING.
698
+ 4. For each count/match gate (`grep -c`, `grep -q`, `rg`), run it — read-only commands only — against the current tree (#4927). It already passes at HEAD with no recorded baseline: BLOCKER (it measures nothing). A literal differing in case from the heading/key the task writes: BLOCKER. Never run a gate that builds, installs, or writes. See `planner-verify-command-grounding.md`.
698
699
 
699
700
  ## Dimension: Verify Command Path Resolvability (#2401)
700
701
 
@@ -47,7 +47,7 @@ Before planning, discover project context:
47
47
  - Load `rules/*.md` as needed during **planning**.
48
48
  - Ensure plans account for project skill patterns and conventions.
49
49
 
50
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
50
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-planner`)
51
51
  </project_context>
52
52
 
53
53
  <context_fidelity>
@@ -192,7 +192,7 @@ Every task has four required fields:
192
192
 
193
193
  **Inherit the command that already worked (#2401):** reuse `prior_verify_commands` verbatim, prefer `npm --prefix <dir> run <script>`, ground every path you author. @~/.claude/gsd-core/references/planner-verify-command-grounding.md
194
194
 
195
- **Grep gate hygiene:** `grep -c` counts comments, so header prose can be self-invalidating. Use `grep -v '^#' | grep -c token`. Bare `== 0` gates on unfiltered files are forbidden.
195
+ **Grep gate hygiene:** `grep -c` counts comments, so header prose can be self-invalidating. Use `grep -v '^#' | grep -c token`. Bare `== 0` gates on unfiltered files are forbidden. Run every count/match gate against the current tree and record its baseline (#4927): a gate that already passes at HEAD, or whose literal differs in case from the deliverable, is wrong. @~/.claude/gsd-core/references/planner-verify-command-grounding.md
196
196
 
197
197
  <comment_text_discipline>
198
198
  **Comment-text discipline (HARD GATE, #429):** A literal an acceptance criterion negative-greps for must NOT appear verbatim in any `<action>` body. Rules + `<!-- planner-discipline-allow: LIT -->` allowlist + examples: @~/.claude/gsd-core/references/planner-antipatterns.md ("Comment-Text Discipline").
@@ -208,7 +208,7 @@ Every task has four required fields:
208
208
 
209
209
  **<precondition>** (optional, one prose line): a runnable/checkable fact the task assumes that plan ordering does not guarantee — external setup (`user_setup`), a prior-phase artifact, or an env var. The executor asserts it before running the task and halts on unmet. Emission rules + the contract triad (precondition ↔ `<verify>`/`<done>` ↔ `must_haves.truths`): @~/.claude/gsd-core/references/planner-preconditions.md.
210
210
 
211
- **<reversibility>** (optional): `rating="reversible|costly|one-way"` + one-line rationale for a decision this task implements. `one-way` inserts a `checkpoint:decision` before this task; `costly` is flagged only; unsure means `reversible`. Rules: @~/.claude/gsd-core/references/planner-reversibility.md
211
+ **<reversibility>** (optional): `rating="reversible|costly|one-way"` + one-line rationale for a decision this task implements. A newly surfaced `one-way` decision inserts a `checkpoint:decision` before this task; one the human already settled (CONTEXT.md, an ingested ADR, an answered checkpoint) keeps its rating and gets no new checkpoint; `costly` is flagged only; unsure means `reversible`. Rules: @~/.claude/gsd-core/references/planner-reversibility.md
212
212
 
213
213
  See @~/.claude/gsd-core/references/planner-guidance.md for Task Types table, Task Sizing rules, Interface-First Task Ordering, and Specificity guidance.
214
214
 
@@ -817,7 +817,8 @@ These PLAN.md files are the canonical output of this agent. The orchestrator rea
817
817
  - `Write` the file with only the first section, ending with the sentinel line `<!-- gsd:write-continue -->`.
818
818
  - `Read` the file, then `Edit` it, replacing `<!-- gsd:write-continue -->` with the next section followed by the sentinel again. Repeat, one section per `Edit`.
819
819
  - On the final section, replace the sentinel with the closing content and no trailing sentinel.
820
- 5. **If writing still fails, surface the actual error in your return message.** **Do NOT silently fall back to returning content** — that hides the failure from the orchestrator and truncates identically.
820
+ 5. **Verify the write landed (#4927).** A `Write` that returns success can still have stored a truncated payload. After writing each PLAN.md, run `verify.plan-structure` on it (see below) and `tail -n 5` the file: it must end with the closing `</output>` (or the last closing tag of the template) and must not contain `<!-- gsd:write-continue -->`. If it ends mid-tag, rewrite it with the incremental method in rule 4.
821
+ 6. **If writing still fails, surface the actual error in your return message.** **Do NOT silently fall back to returning content** — that hides the failure from the orchestrator and truncates identically.
821
822
 
822
823
  **CRITICAL — File naming convention (enforced):**
823
824
 
@@ -33,7 +33,7 @@ Your files feed the roadmap:
33
33
 
34
34
  @~/.claude/gsd-core/references/untrusted-input-boundary.md
35
35
 
36
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
36
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-project-researcher`)
37
37
 
38
38
  <documentation_lookup>
39
39
  @~/.claude/gsd-core/references/research-documentation-lookup.md
@@ -34,7 +34,7 @@ Your files feed the roadmap:
34
34
 
35
35
  @~/.claude/gsd-core/references/untrusted-input-boundary.md
36
36
 
37
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
37
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-project-researcher`)
38
38
 
39
39
  <documentation_lookup>
40
40
  @~/.claude/gsd-core/references/research-documentation-lookup.md
@@ -29,7 +29,7 @@ Job: create a unified research summary that informs roadmap creation — extract
29
29
 
30
30
  @~/.claude/gsd-core/references/untrusted-input-boundary.md
31
31
 
32
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
32
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-research-synthesizer`)
33
33
 
34
34
  <downstream_consumer>
35
35
  SUMMARY.md is consumed by gsd-roadmapper:
@@ -96,11 +96,11 @@ Identify gaps that couldn't be resolved and need attention during planning.
96
96
  **This is the canonical output. The orchestrator depends on `.planning/research/SUMMARY.md` existing on disk after you return; it does NOT read your return message for content.**
97
97
 
98
98
  **Hard rules (must follow):**
99
- 1. **Use the `Write` tool.** It's in your `tools:` allowlist with no restrictions — don't assume any.
100
- 2. **Do NOT return the SUMMARY.md content in your response.** Return message is a brief confirmation (see `<structured_returns>`); content lives on disk.
99
+ 1. **Use the `Write` tool, and try it FIRST.** It's in your `tools:` allowlist and GSD places no restriction on it — assume none you haven't hit; only an error returned by your `Write` call counts (rule 5).
100
+ 2. **Do NOT return the SUMMARY.md content in your response.** Return message is a brief confirmation (see `<structured_returns>`); content lives on disk. The one exception is rule 5's runtime refusal.
101
101
  3. **Do NOT ask permission to write.** Writing `.planning/research/SUMMARY.md` is this agent's explicit purpose. Asking the orchestrator to do it instead is a failure mode causing downstream `SUMMARY.md not found` failures.
102
102
  4. **Never use `Bash(cat << 'EOF')` or heredoc** for file creation. Use the `Write` tool.
103
- 5. **If Write errors,** surface the actual error in your return message. Do not silently fall back to returning content — that hides the failure.
103
+ 5. **If Write errors,** surface the actual error in your return message. Do not silently fall back to returning content — that hides the failure. **Exception — the runtime's own refusal of this filename:** Claude Code refuses a subagent's `Write` to a few exact basenames, `SUMMARY.md` among them, with `Subagents should return findings as text, not write report files` (observed on 2.1.301; name-based, not tied to your tools or effort). If your `Write` returns that error the restriction is real, not the #222 false-refusal: **do not retry, do not write the content under another name, do not use Bash.** Finish Step 7, then in Step 8 append the complete SUMMARY.md document under `### SUMMARY.md (returned inline — runtime refused the write)` so the orchestrator persists it.
104
104
  6. **Large-file / truncation fallback.** Default: write the whole file in one `Write` call. Some runtimes (e.g. OpenCode) cap tool-call output and truncate an oversized `Write` mid-payload (error like `JSON Parse error: Expected '}'`). If `Write` fails with a truncation/invalid-tool error, **do NOT retry the same oversized call** (loops forever). Instead build incrementally so no single call carries the whole payload:
105
105
  - `Write` the file with only the first section, ending with sentinel `<!-- gsd:write-continue -->`.
106
106
  - `Read` the file, then `Edit` it, replacing the sentinel with the next section + sentinel again. Repeat, one section per `Edit`.
@@ -120,7 +120,7 @@ gsd_run query commit "docs: complete project research" --files .planning/researc
120
120
 
121
121
  ## Step 8: Return Summary
122
122
 
123
- Return brief confirmation with key points for the orchestrator.
123
+ Return brief confirmation with key points for the orchestrator. If rule 5's runtime refusal applied, add the complete document as rule 5 describes.
124
124
 
125
125
  </execution_flow>
126
126
 
@@ -34,7 +34,7 @@ If the prompt contains a `<required_reading>` block, you MUST use the `Read` too
34
34
 
35
35
  @~/.claude/gsd-core/references/untrusted-input-boundary.md
36
36
 
37
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
37
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-research-synthesizer`)
38
38
 
39
39
  <downstream_consumer>
40
40
  Your SUMMARY.md is consumed by the gsd-roadmapper agent which uses it to:
@@ -136,11 +136,11 @@ Identify gaps that couldn't be resolved and need attention during planning.
136
136
 
137
137
  **Hard rules (must follow):**
138
138
 
139
- 1. **Use the `Write` tool** to write the file. The `Write` tool is in your `tools:` allowlist; there are no restrictions on it. Do not assume restrictions that the frontmatter does not impose.
140
- 2. **Do NOT return the SUMMARY.md content in your response.** Your return message is a brief confirmation (see `<structured_returns>` below); the content lives on disk.
139
+ 1. **Use the `Write` tool** to write the file, and try it FIRST. The `Write` tool is in your `tools:` allowlist and GSD places no restriction on it. Do not assume a restriction you have not hit: only an error actually returned by your `Write` call counts (rule 5).
140
+ 2. **Do NOT return the SUMMARY.md content in your response.** Your return message is a brief confirmation (see `<structured_returns>` below); the content lives on disk. The one exception is rule 5's runtime refusal.
141
141
  3. **Do NOT ask permission to write.** Writing `.planning/research/SUMMARY.md` is the explicit purpose of this agent. Asking the orchestrator to do it instead is a failure mode that can cause downstream `SUMMARY.md not found` failures.
142
142
  4. **Do NOT use `Bash(cat << 'EOF')` or heredoc** for file creation. Use the `Write` tool. In short: **never use `Bash(cat << 'EOF')` or heredoc**.
143
- 5. **If the Write tool errors,** surface the actual error in your return message. Do not silently fall back to returning content; that hides the failure from the orchestrator.
143
+ 5. **If the Write tool errors,** surface the actual error in your return message. Do not silently fall back to returning content; that hides the failure from the orchestrator. **The one exception is the runtime's own refusal of this filename.** Claude Code refuses a subagent's `Write` to a few exact basenames, `SUMMARY.md` among them, with `Subagents should return findings as text, not write report files` (observed on Claude Code 2.1.301; it depends on the file name, not on your tools or effort). If your `Write` call returns that error, the restriction is real, not the #222 false-refusal: **do not retry, do not write the content under another name, and do not use Bash**. Finish Step 7 (commit the research files that exist), then in Step 8 append the complete SUMMARY.md document after the confirmation, under the heading `### SUMMARY.md (returned inline — runtime refused the write)`, so the orchestrator persists it.
144
144
  6. **Large-file / truncation fallback.** Default: write the whole file in a single `Write` call — that is correct and reliable on most runtimes. But some runtimes (e.g. OpenCode) cap tool-call output, and a single oversized `Write` is truncated mid-payload — surfacing a tool error such as `JSON Parse error: Expected '}'`. If a `Write` fails with a truncation / invalid-tool error, **do NOT retry the same oversized call** (that loops forever). Instead build the file incrementally so no single tool call carries the whole payload:
145
145
  - `Write` the file with only the first section, ending with the sentinel line `<!-- gsd:write-continue -->`.
146
146
  - `Read` the file, then `Edit` it, replacing `<!-- gsd:write-continue -->` with the next section followed by the sentinel again. Repeat, one section per `Edit`.
@@ -161,7 +161,7 @@ gsd_run query commit "docs: complete project research" --files .planning/researc
161
161
 
162
162
  ## Step 8: Return Summary
163
163
 
164
- Return brief confirmation with key points for the orchestrator.
164
+ Return brief confirmation with key points for the orchestrator. If rule 5's runtime refusal applied, add the complete document as rule 5 describes.
165
165
 
166
166
  </execution_flow>
167
167
 
@@ -23,7 +23,7 @@ Job: transform requirements into a phase structure that delivers the project. Ev
23
23
  **Context budget:** load project skills first (lightweight); read implementation files incrementally, only what each check requires.
24
24
 
25
25
  **Project skills:** check `.claude/skills/` or `.agents/skills/`:
26
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
26
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-roadmapper`)
27
27
  1. List available skills (subdirectories)
28
28
  2. Read `SKILL.md` per skill (lightweight index ~130 lines)
29
29
  3. Load specific `rules/*.md` as needed
@@ -27,7 +27,7 @@ If the prompt contains a `<required_reading>` block, you MUST use the `Read` too
27
27
 
28
28
  **Project skills:** Check `.claude/skills/` or `.agents/skills/` directory if either exists:
29
29
 
30
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
30
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-roadmapper`)
31
31
  1. List available skills (subdirectories)
32
32
  2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
33
33
  3. Load specific `rules/*.md` files as needed during implementation
@@ -44,7 +44,7 @@ Read ALL `<required_reading>` files. Extract:
44
44
 
45
45
  **Project skills:** check `.claude/skills/` or `.agents/skills/` if either exists.
46
46
 
47
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md — list skill subdirs, read each `SKILL.md` (~130-line index), load `rules/*.md` as needed. NEVER load full `AGENTS.md` (100KB+ cost). Apply skill rules to spot project-specific security patterns, required wrappers, forbidden patterns.
47
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-security-auditor`) — list skill subdirs, read each `SKILL.md` (~130-line index), load `rules/*.md` as needed. NEVER load full `AGENTS.md` (100KB+ cost). Apply skill rules to spot project-specific security patterns, required wrappers, forbidden patterns.
48
48
  </step>
49
49
 
50
50
  <step name="analyze_threats">
@@ -50,7 +50,7 @@ Read ALL files from `<required_reading>`. Extract:
50
50
 
51
51
  **Project skills:** Check `.claude/skills/` or `.agents/skills/` directory if either exists:
52
52
 
53
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
53
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-security-auditor`)
54
54
  1. List available skills (subdirectories)
55
55
  2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
56
56
  3. Load specific `rules/*.md` files as needed during implementation
@@ -48,7 +48,7 @@ Before auditing, discover project context:
48
48
  **Project instructions:** Read `./CLAUDE.md` if present; follow all project-specific guidelines.
49
49
 
50
50
  **Project skills:** Check `.claude/skills/` or `.agents/skills/`.
51
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
51
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-ui-auditor`)
52
52
  1. List available skills 2. Read `SKILL.md` for each 3. Do NOT load full `AGENTS.md` (100KB+ context cost)
53
53
  </project_context>
54
54
 
@@ -50,7 +50,7 @@ Before auditing, discover project context:
50
50
 
51
51
  **Project skills:** Check `.claude/skills/` or `.agents/skills/` directory if either exists:
52
52
 
53
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
53
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-ui-auditor`)
54
54
  1. List available skills (subdirectories)
55
55
  2. Read `SKILL.md` for each skill
56
56
  3. Do NOT load full `AGENTS.md` files (100KB+ context cost)
@@ -63,7 +63,7 @@ Before verifying: read `./CLAUDE.md` if present, follow project-specific guideli
63
63
 
64
64
  Check `.claude/skills/` or `.agents/skills/` if either exists.
65
65
 
66
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md — list
66
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-ui-checker`) — list
67
67
  skills, read each `SKILL.md` (~130 lines), load `rules/*.md` as needed during verification. Do
68
68
  NOT load full `AGENTS.md` (100KB+ cost). This ensures verification respects project-specific
69
69
  design conventions.
@@ -62,7 +62,7 @@ Before verifying, discover project context:
62
62
 
63
63
  **Project skills:** Check `.claude/skills/` or `.agents/skills/` directory if either exists:
64
64
 
65
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
65
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-ui-checker`)
66
66
  1. List available skills (subdirectories)
67
67
  2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
68
68
  3. Load specific `rules/*.md` files as needed during verification
@@ -29,7 +29,7 @@ GSD UI researcher, spawned by `/gsd:ui-phase`. Answer "What visual and interacti
29
29
  <project_context>
30
30
  Before researching: read `./CLAUDE.md` if it exists (follow project guidelines/security/conventions). Check `.claude/skills/` or `.agents/skills/`:
31
31
 
32
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md — list skill subdirectories; read each `SKILL.md` (~130 lines); load `rules/*.md` as needed; do NOT load full `AGENTS.md` (100KB+ cost); account for project skill patterns in the design contract.
32
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-ui-researcher`) — list skill subdirectories; read each `SKILL.md` (~130 lines); load `rules/*.md` as needed; do NOT load full `AGENTS.md` (100KB+ cost); account for project skill patterns in the design contract.
33
33
  </project_context>
34
34
 
35
35
  <upstream_input>
@@ -99,6 +99,18 @@ node -p "require('<pkg>/package.json').version" # RES
99
99
  ```
100
100
  A first-party CLI with a JSON mode, or an MCP tool the design system ships, beats all three. What matters: the command is **recorded and re-runnable**. Take the version from the installed package, not the range in your dependent's `package.json` (a caret range hides staleness).
101
101
 
102
+ **Cross-check the first answer — always.** A tool's count is a claim: `npx shadcn info` reports "No components installed" on projects with hand-authored or pre-CLI primitives. After the first command answers, count component files on disk as a second source (shadcn: the `aliases.ui` dir in `components.json`, else `components/ui` / `src/components/ui`):
103
+ ```bash
104
+ ls <ui-dir>/*.tsx 2>/dev/null | wc -l # filesystem count
105
+ ```
106
+ If they disagree (including a tool reporting none while files exist), do not pick silently: record the larger filesystem-backed count with the command that produced it, and add directly under the provenance line `Mismatch: <tool> reported <A>, filesystem has <B>.`
107
+
108
+ **A failed lookup is a failure, never a pass-through.** `2>/dev/null` hides why `node -p` died: treat empty output, a non-zero exit, or the literal `undefined` as that step failing. With `node_modules` absent the `require()` version lookup fails; resolve from the lockfile instead (still not the caret range):
109
+ ```bash
110
+ node -p "(require('./package-lock.json').packages['node_modules/<pkg>']||{}).version"
111
+ ```
112
+ For `pnpm-lock.yaml` / `yarn.lock`, read `<pkg>`'s resolved version from that file. If the lockfile cannot answer, write `<version unresolved: <reason>>` in the version slot instead of leaving it empty or guessing.
113
+
102
114
  Record it as the first line of the section, verbatim:
103
115
  ```
104
116
  Enumerated by `<command>` — <N> components — <package>@<version> — <YYYY-MM-DD>.
@@ -41,7 +41,7 @@ Before researching, discover project context:
41
41
 
42
42
  **Project skills:** Check `.claude/skills/` or `.agents/skills/` directory if either exists:
43
43
 
44
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
44
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-ui-researcher`)
45
45
  1. List available skills (subdirectories)
46
46
  2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
47
47
  3. Load specific `rules/*.md` files as needed during research
@@ -166,6 +166,33 @@ A first-party CLI with a JSON mode, or an MCP tool the design system ships, beat
166
166
  matters is that the command is **recorded and re-runnable**. Take the version from the installed
167
167
  package, not the range in your dependent's `package.json` — a caret range hides staleness.
168
168
 
169
+ **Cross-check the first answer — always.** A tool's count is a claim, not a fact: `npx shadcn info`
170
+ reports "No components installed" on a project whose primitives were hand-authored or predate the
171
+ CLI's tracking. After the first command answers, count the component files on disk as an independent
172
+ second source (for shadcn, the `aliases.ui` directory in `components.json`, else `components/ui` or
173
+ `src/components/ui`):
174
+
175
+ ```bash
176
+ ls <ui-dir>/*.tsx 2>/dev/null | wc -l # filesystem count
177
+ ```
178
+
179
+ If the two disagree — including a tool that reports none while files exist — do not pick one
180
+ silently. Record the larger, filesystem-backed count with the command that produced it, and add a
181
+ line directly under the provenance line: `Mismatch: <tool> reported <A>, filesystem has <B>.`
182
+
183
+ **A failed lookup is a failure, never a pass-through.** `2>/dev/null` hides why a `node -p` call died,
184
+ so treat empty output, a non-zero exit, or the literal `undefined` as that step failing. When
185
+ `node_modules` is absent the `require()` version lookup fails; resolve the version from the lockfile
186
+ instead — still not the caret range:
187
+
188
+ ```bash
189
+ node -p "(require('./package-lock.json').packages['node_modules/<pkg>']||{}).version"
190
+ ```
191
+
192
+ For `pnpm-lock.yaml` or `yarn.lock`, read the resolved version for `<pkg>` from that file. If the
193
+ lockfile cannot answer either, say `<version unresolved: <reason>>` in the version slot rather than
194
+ leaving it empty or guessing.
195
+
169
196
  Record it as the first line of the section, verbatim:
170
197
 
171
198
  ```
@@ -55,7 +55,7 @@ Before verifying, discover project context:
55
55
  - Load `rules/*.md` as needed during **verification**.
56
56
  - Apply skill rules when scanning for anti-patterns and verifying quality.
57
57
 
58
- **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
58
+ **agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md (agent type: `gsd-verifier`)
59
59
  </project_context>
60
60
 
61
61
  <core_principle>
@@ -24,7 +24,9 @@ const { runServer } = require('../gsd-core/bin/lib/mcp-server.cjs');
24
24
  runServer({
25
25
  input: process.stdin,
26
26
  output: process.stdout,
27
- ctx: { cwd: process.cwd() },
27
+ // --no-prompts: do not advertise the prompt catalog (hosts that turn MCP prompts into slash commands
28
+ // would list every GSD command twice).
29
+ ctx: { cwd: process.cwd(), prompts: !process.argv.includes('--no-prompts') },
28
30
  }).catch((err) => {
29
31
  process.stderr.write(String((err && err.message) || err) + '\n');
30
32
  process.exit(1);