Concrete finding, not just a generic audit request
hooks/tdd-pretool-check.sh here shares filenames and structure with claude-sdlc-wizard's
hooks (_find-sdlc-root.sh, precompact-seam-check.sh, instructions-loaded-check.sh,
model-effort-check.sh, sdlc-prompt-check.sh) -- this looks like a port from an earlier
point in that repo's history, not an independent reimplementation. Checked it directly:
if [[ "$FILE_PATH" == *"/src/"* ]]; then
This is the exact bug claude-sdlc-wizard#436 found and fixed: */src/* requires a slash
before src, so a cwd-relative path like src/app.js (common output shape, no leading
slash) never matches -- the TDD nudge silently never fires for it. The current
claude-sdlc-wizard/hooks/tdd-pretool-check.sh fix is one line:
[[ "$FILE_PATH" == *"/src/"* || "$FILE_PATH" == "src/"* ]] && SRC_MATCH=1
It also picked up a second improvement this repo's copy doesn't have: priority detection for a
test file touched earlier in the session, so the gate unlocks once TDD RED has actually
happened, instead of nagging on every subsequent src/ edit regardless of test state.
Why this is worth fixing by diff, not by independent audit
This is the strongest evidence yet (from a parallel cross-model review asking whether Codex/
OpenCode siblings need independent Fable-led audits) for the cheaper answer: when a hook is
a direct port, diff it against the upstream fix rather than re-auditing from scratch. The bug
was already found, root-caused, and fixed once -- porting the fix is strictly cheaper than
rediscovering it.
Proposal
- Diff
hooks/tdd-pretool-check.sh here against the current
claude-sdlc-wizard/hooks/tdd-pretool-check.sh and pull forward both fixes above.
- Same check for the other 5 ported hooks (
precompact-seam-check.sh,
instructions-loaded-check.sh, model-effort-check.sh, sdlc-prompt-check.sh,
_find-sdlc-root.sh) -- if one hook drifted from a stale snapshot, the others plausibly did
too.
- After that diff pass, a host-native black-box smoke test per hook is still worth adding
(drive the actual PreToolUse event through OpenCode's own hook loader, not just a direct
script invocation) -- this repo already has 10 test scripts and CI, so it's the
best-positioned sibling to do this properly, and the only one where a further scoped Fable
pass (limited to hooks/) is worth spending on, once the smoke tests exist to tell it where
to look.
Submitted as part of a cross-repo self-enforcement review pass
(see claude-sdlc-wizard#236 -> PR #440, and codex-sdlc-wizard#58).
Concrete finding, not just a generic audit request
hooks/tdd-pretool-check.shhere shares filenames and structure withclaude-sdlc-wizard'shooks (
_find-sdlc-root.sh,precompact-seam-check.sh,instructions-loaded-check.sh,model-effort-check.sh,sdlc-prompt-check.sh) -- this looks like a port from an earlierpoint in that repo's history, not an independent reimplementation. Checked it directly:
This is the exact bug
claude-sdlc-wizard#436found and fixed:*/src/*requires a slashbefore
src, so a cwd-relative path likesrc/app.js(common output shape, no leadingslash) never matches -- the TDD nudge silently never fires for it. The current
claude-sdlc-wizard/hooks/tdd-pretool-check.shfix is one line:It also picked up a second improvement this repo's copy doesn't have: priority detection for a
test file touched earlier in the session, so the gate unlocks once TDD RED has actually
happened, instead of nagging on every subsequent
src/edit regardless of test state.Why this is worth fixing by diff, not by independent audit
This is the strongest evidence yet (from a parallel cross-model review asking whether Codex/
OpenCode siblings need independent Fable-led audits) for the cheaper answer: when a hook is
a direct port, diff it against the upstream fix rather than re-auditing from scratch. The bug
was already found, root-caused, and fixed once -- porting the fix is strictly cheaper than
rediscovering it.
Proposal
hooks/tdd-pretool-check.shhere against the currentclaude-sdlc-wizard/hooks/tdd-pretool-check.shand pull forward both fixes above.precompact-seam-check.sh,instructions-loaded-check.sh,model-effort-check.sh,sdlc-prompt-check.sh,_find-sdlc-root.sh) -- if one hook drifted from a stale snapshot, the others plausibly didtoo.
(drive the actual PreToolUse event through OpenCode's own hook loader, not just a direct
script invocation) -- this repo already has 10 test scripts and CI, so it's the
best-positioned sibling to do this properly, and the only one where a further scoped Fable
pass (limited to
hooks/) is worth spending on, once the smoke tests exist to tell it whereto look.
Submitted as part of a cross-repo self-enforcement review pass
(see
claude-sdlc-wizard#236-> PR #440, andcodex-sdlc-wizard#58).