* test(#3576): gate shipped reference citations on the canonical resolvable form
Failing-first gate for #3576: a backticked bare references/<name>.md cite
resolves from no install location (agents, workflows, and references all
install where a bare relative references/ path is dead). The gate walks the
runtime-loaded trees the issue prescribes, strips @~/ include tokens
PER-TOKEN (a line-skip guard would miss a bare cite sharing a line with an
include — the issue-named trap), pins the genuinely relative ../ href and
canonical forms as non-offenders, and checks canonical cite targets exist.
43 offenders today across 19 files.
* fix(#3576): repair all 43 dead references/ cites to the canonical resolvable form
Every backticked bare references/<name>.md cite across the 19 shipped files
rewritten to gsd-core/references/<name>.md — the form every required_reading
block and @~/ include already uses, and the only form that resolves from any
install location. All 20 cited targets verified to exist; the one genuinely
relative href (plan-phase.md's ../references/mvp-concepts.md) is untouched
(the repair is backtick-anchored). Growth acks: new fragment for the three
first-time paths, #3206-pattern appends to the five fragments already naming
the other grown files (two ack sources may never name the same path).
execute-phase.md lands at 93,391/93,400 and gsd-executor.md at 49,150/49,152
— exactly the issue's projections; every repair fits.
* fix(#3576): drop stale default.md growth ack (nested modes file is hash-attributed, not growth-ratcheted)
Review finding: the emitted-attribution ratchet covers only top-level
workflows/ + agents/ files; discuss-phase/modes/default.md's delta is
source-attributed, so acknowledging its growth is a stale entry the
differential lane fails on.
* chore(#3576): add changeset fragment
* chore(#3576): backfill changeset pr number
---------
Co-authored-by: sim <sim@local>
* fix(#3210): gate unmet preconditions as blocking-human and cap blocker retries at needs_human
* chore(#3210): add changeset fragment for PR #3528
* fix(#3210): restore blocking-human carve-out and CRLF-safe split
---------
Co-authored-by: sim <sim@local>
* fix(#3021): recognize worktree-wf_* branch namespace in all guards
The Claude-orchestration Workflow backend (#1143) creates per-plan
worktrees on branches named worktree-wf_<runid>-<n>. Four independent
copies of the agent branch allow-list regex (^(worktree-)?agent-...) never
learned this namespace:
- hooks/gsd-worktree-path-guard.js:176 — FAILED OPEN (process.exit(0)),
silently disabling path containment for exactly the concurrent dispatch
mode where cross-worktree writes are most likely
- src/worktree-safety.cts:21 — silently dropped cleanup-wave manifest
entries
- agents/gsd-executor.md:503 — FATAL halt on branch check
- gsd-core/references/worktree-branch-check.md:33 — same FATAL halt
Extended all four to ^((worktree-)?agent-|worktree-wf_)[A-Za-z0-9._/-]+$.
The path guard now correctly blocks cross-worktree writes for Workflow-
backend branches instead of no-op'ing.
* chore(#3021): backfill changeset PR number 3109
---------
Co-authored-by: sim <sim@local>
* test(#2943): parity guard against the nonexistent get-library-docs tool
Second context7 naming drift after #2017 (which guarded the plugin-marketplace
PREFIX). #2017's guard only checks tools: frontmatter lines, not prose bodies —
which is where the broken tool NAME (get-library-docs) lived. The context7 MCP
server registers only resolve-library-id and query-docs; get-library-docs is a
stale copy from upstream's own README.
Scans the shipped prose surface (agents/, gsd-core/references|workflows/,
commands/gsd/, skills/) and fails if any artifact instructs an agent to call
mcp__context7__get-library-docs. Excludes tests/ (a fixture may use the name as
a negative input) and CHANGELOG/RELEASE-NOTES-LEGACY (history).
Fails-first: 4 offenders today (gsd-executor.md:29,
research-documentation-lookup.md:5, discovery-phase.md:68 & :104).
* fix(#2943): rename get-library-docs to query-docs and correct the ctx7 fallback rationale
The context7 MCP server registers only resolve-library-id and query-docs
(verified against upstream packages/mcp/src/index.ts); get-library-docs is a
stale name copied from upstream's own README. Four shipped prose sites instructed
agents to call a tool the server does not register, so every research path that
loaded the canonical reference either errored, fell through to the ctx7 CLI
branch, or fabricated a result.
- research-documentation-lookup.md, gsd-executor.md, discovery-phase.md (x2):
get-library-docs -> query-docs, params context7CompatibleLibraryId/topic ->
libraryId/query (the registered contract).
- Same files' ctx7 CLI fallback rationale: the cited cause
(anthropics/claude-code#13898 'strips MCP tools from agents with a tools:
frontmatter restriction') was wrong on two counts — #13898 is closed and was
never about tools: frontmatter. Rewritten to describe the real mechanism
(custom subagents cannot see project-scoped .mcp.json; they only inherit
user-scoped ~/.claude/mcp.json). The fallback itself is kept.
- discovery-phase.md 'mode: code/info' dropped — query-docs takes libraryId +
query only; the code-vs-concepts intent is now expressed via the query text.
resolve-library-id is unchanged (still registered upstream). CHANGELOG and
RELEASE-NOTES-LEGACY citations are historical record, left as-is.
* chore(#2943): add changeset fragment (pr:0 placeholder)
* test(#2943): widen parity-guard scan surface to docs/ (isolated-review finding)
The isolated adversarial review flagged that SCAN_DIRS omitted docs/, which
ships docs/AGENTS.md — agent-consumed prose carrying 8 mcp__context7__* refs.
No false negative today (it uses only the wildcard), but a future banned-name
addition there would slip through, recreating the exact drift this guard exists
to prevent. Add docs/ to the scan surface, with an EXCLUDED_FILES set for
historical record (docs/RELEASE-NOTES-LEGACY.md, CHANGELOG.md) that must not be
rewritten to satisfy the guard.
* fix(#2943): update shifted PROSE_ALLOWLIST line + acknowledge gsd-executor.md growth
The gsd-test gate caught two real consequences of the rationale rewrite in
agents/gsd-executor.md (the +2-line corrected mechanism description shifted
line numbers below it):
1. tests/no-bare-gsd-tools-command-position.test.cjs: the legitimate
'gsd-tools query commit' descriptive mention moved from line 791 -> 793.
Update the PROSE_ALLOWLIST entry to the new line (the mention is unchanged,
just relocated by my edit above it). Without this the gate reports both a
stale allowlist entry (791) and a new offender (793) for the same mention.
2. tests/emitted-drift-acks/2943-context7-tool-name.json: gsd-executor.md grew
95 bytes (the accurate mechanism rationale is longer than the wrong one-line
#13898 attribution it replaces). Acknowledge the growth with the reason.
Both are mandated by the gate, not optional. The rename itself (get-library-docs
-> query-docs) is byte-neutral-ish; only the rationale rewrite grew the file.
* chore(#2943): backfill changeset PR number 2963
---------
Co-authored-by: sim <sim@local>