Repository navigation
Description
Why
The maintainer's goal (2026-10-03): zero policy holds. Every hold means a human review on every release, and the plugin has already waited about three weeks on one. A portal Validate of release-preview @ 302e8f5 (#899 round 2) left two holds. One of them is:
Scripts the validator couldn't follow (
COMMAND_SCRIPT_NOT_FOLLOWED), policy hold onscripts/post-tool-hook.sh: "The plugin's commands run scripts that run … a further file the validator did not read … : scripts/post-tool-hook.sh, scripts/session-end-hook.sh, scripts/session-start-hook.sh, scripts/user-prompt-hook.sh." Remedy: "Point each command at a plain shell script by a literal path under CLAUDE_PLUGIN_ROOT … A file that script runs in turn isn't followed and always goes to a reviewer."
#899 removed the other triggers it used to list: the "." directory fallback, and script names written in comments. What remains is structural: each of the four hooks.json hooks does source "$_HOOK_DIR/lib-*.sh", resolve-paths.sh, detect-tools.sh, log.sh and so on.
Precedent
claude-jit-context cleared exactly this hold by compiling at release-build time: each shipped hook script gets the libraries it sources inlined, with whole-line comments stripped. Its library went from 274 KB to scripts of 61 to 98 KB. The repo keeps its source structure; only the release tree has self-contained hooks. Its tests run the hook suites against the compiled scripts. See https://github.com/Digital-Process-Tools/claude-jit-context/blob/feat/release-compile/docs/directory-validator.md.
Do
- Measure first: for each hooks.json hook, the full transitive
sourceclosure and the size it would reach once inlined, with and without whole-line comments. The per-file limit is 256 KiB;scripts/session-start-hook.shis already 147 KB. Report the numbers before building anything big. - In
.github/scripts/build_release_tree.py: inline each sourced file at itssource/.line, recursively and once per file (honour include guards); strip whole-line comments, not shebangs and not lines inside heredocs or quoted strings; and leave nothing in a shipped hook that sources, runs or names another shipped shell file. Python entry points that hooks call (python3 -m pipeline...) need a decision: report whether the validator counts them as "a further file". It names only shell scripts so far. - A guard in
check_release_tree.py: a hooks.json hook that still sources or runs another file → FAIL. - Run the hook test suites against the compiled release tree in CI, as jit-context's
tests/test-release-branch-461.shdoes, so what ships is what was tested. Every platform matters, Windows / Git Bash included. docs/releasing.md: describe the compile step and its size budget.
Verification: a portal Validate of a release-preview built from this branch shows no COMMAND_SCRIPT_NOT_FOLLOWED. The maintainer runs the push and the Validate.
[AI-generated]
Activity
fix(#900): compile hooks.json-registered hooks self-contained at buil…
fix(#900): correct source-statement detection missed by the first round
test(#900): pin the audit's remaining two findings directly
fix(#900): tree-shake unused functions and FAIL on typed heredocs
fix(#900): compile hooks.json-registered hooks self-contained at buil…
fix(#900): correct source-statement detection missed by the first round
test(#900): pin the audit's remaining two findings directly
fix(#900): tree-shake unused functions and FAIL on typed heredocs
fix(#900): compile hooks.json-registered hooks self-contained at buil…
fix(#900): correct source-statement detection missed by the first round
test(#900): pin the audit's remaining two findings directly
fix(#900): tree-shake unused functions and FAIL on typed heredocs
fix(#900): fix a multi-line command-substitution brace desync and a t…
66 remaining items
fix(#900): skip pins the compiled build cannot answer, not fail them
test(#900): skip the #898 transcript-selection pins on the compiled hook
test(#900): retire the byte-pin allowances #899 landed on main
fix(#900): compile hooks.json-registered hooks self-contained at buil…
fix(#913): avoid nested default expansion and a credential-like name;…
fix(#913): cache SESSION_DIR in post-tool-hook.sh to stop re-forking …
Follow-up #1003: fix tree-shaking, hook budget, doctor.sh scanner hol…
Fix #1003 (round 3): cover python3.9-3.13 in the versioned fallback, …
Shrink #1003 round-3 candidate list with brace expansion to hold the #…
Fix #1003: reject Python below the supported floor instead of reporti…
Fix #920 CI: rename duplicate top-level function, compact the new gua…
Fix #920: close three gaps in #902's REMEMBER_DIR safety guard (#1064)
Fix #1104 review: accept REG_SZ "0" and a case-insensitive value name…
Fix #1104: skip the hidden Windows detach route when WSH is disabled …