diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d82af3a7..dd784c684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **`/gsd-ingest-docs` command** — Scan a repo containing mixed ADRs, PRDs, SPECs, and DOCs and bootstrap or merge the full `.planning/` setup from them in a single pass. Parallel classification (`gsd-doc-classifier`), synthesis with precedence rules and cycle detection (`gsd-doc-synthesizer`), three-bucket conflicts report (`INGEST-CONFLICTS.md`: auto-resolved, competing-variants, unresolved-blockers), and hard-block on LOCKED-vs-LOCKED ADR contradictions in both new and merge modes. Supports directory-convention discovery and `--manifest ` YAML override with per-doc precedence. v1 caps at 50 docs per invocation; `--resolve interactive` is reserved. Extracts shared conflict-detection contract into `references/doc-conflict-engine.md` which `/gsd-import` now also consumes (#2387) ### Fixed +- **`gsd-read-injection-scanner` hook now ships to users** — the scanner was added in 1.37.0 (#2201) but was never added to `scripts/build-hooks.js`' `HOOKS_TO_COPY` allowlist, so it never landed in `hooks/dist/` and `install.js` skipped it with "Skipped read injection scanner hook — gsd-read-injection-scanner.js not found at target". Effectively disabled the read-time prompt-injection scanner for every user on 1.37.0/1.37.1. Added to the build allowlist and regression test. Also dropped a redundant non-absolute `.claude/hooks/` path check that was bypassing the installer's runtime-path templating and leaking `.claude/` references into non-Claude installs (#2406) - **SDK `checkAgentsInstalled` is now runtime-aware** — `sdk/src/query/init.ts::checkAgentsInstalled` only knew where Claude Code put agents (`~/.claude/agents`). Users running GSD on Codex, OpenCode, Gemini, Kilo, Copilot, Antigravity, Cursor, Windsurf, Augment, Trae, Qwen, CodeBuddy, or Cline got `agents_installed: false` even with a complete install, which hard-blocked any workflow that gates subagent spawning on that flag. `sdk/src/query/helpers.ts` now resolves the right directory via three-tier detection (`GSD_RUNTIME` env → `config.runtime` → `claude` fallback) and mirrors `bin/install.js::getGlobalDir()` for all 14 runtimes. `GSD_AGENTS_DIR` still short-circuits the chain. `init-runner.ts` stays Claude-only by design (#2402) - **`init` query agents-installed check looks at the correct directory** — `checkAgentsInstalled` in `sdk/src/query/init.ts` defaulted to `~/.claude/get-shit-done/agents/`, but the installer writes GSD agents to `~/.claude/agents/`. Every init query therefore reported `agents_installed: false` on clean installs, which made workflows refuse to spawn `gsd-executor` and other parallel subagents. The default now matches `sdk/src/init-runner.ts` and the installer (#2400) - **Installer now installs `@gsd-build/sdk` automatically** so `gsd-sdk` lands on PATH. Resolves `command not found: gsd-sdk` errors that affected every `/gsd-*` command after a fresh install or `/gsd-update` to 1.36+. Adds `--no-sdk` to opt out and `--sdk` to force reinstall. Implements the `--sdk` flag that was previously documented in README but never wired up (#2385) diff --git a/hooks/gsd-read-injection-scanner.js b/hooks/gsd-read-injection-scanner.js index 33ffd2b0d..80f9e30b0 100644 --- a/hooks/gsd-read-injection-scanner.js +++ b/hooks/gsd-read-injection-scanner.js @@ -56,8 +56,7 @@ function isExcludedPath(filePath) { /CHECKPOINT/i.test(path.basename(p)) || /[/\\](?:security|techsec|injection)[/\\.]/i.test(p) || /security\.cjs$/.test(p) || - p.includes('/.claude/hooks/') || - p.includes('.claude/hooks/') + p.includes('/.claude/hooks/') ); } diff --git a/scripts/build-hooks.js b/scripts/build-hooks.js index a2f136d47..f4e2f3ec1 100644 --- a/scripts/build-hooks.js +++ b/scripts/build-hooks.js @@ -20,6 +20,7 @@ const HOOKS_TO_COPY = [ 'gsd-context-monitor.js', 'gsd-prompt-guard.js', 'gsd-read-guard.js', + 'gsd-read-injection-scanner.js', 'gsd-statusline.js', 'gsd-workflow-guard.js', // Community hooks (bash, opt-in via .planning/config.json hooks.community) diff --git a/tests/install-hooks-copy.test.cjs b/tests/install-hooks-copy.test.cjs index 422a2ff24..2eb821a9b 100644 --- a/tests/install-hooks-copy.test.cjs +++ b/tests/install-hooks-copy.test.cjs @@ -35,6 +35,7 @@ const EXPECTED_ALL_HOOKS = [ 'gsd-context-monitor.js', 'gsd-prompt-guard.js', 'gsd-read-guard.js', + 'gsd-read-injection-scanner.js', 'gsd-statusline.js', 'gsd-workflow-guard.js', ...EXPECTED_SH_HOOKS,