ForgeKitFORGEKIT

Build Log

Commit-push gate redesign — preparatory, not reactive

July 21, 2026

Redesigned the commit-push gate and the retro pipeline's clean-tree check from fail-then-remediate to preparatory — a real Git pre-commit hook now produces machine-owned evidence bound to HEAD SHA + staged index tree SHA before Claude ever attempts the commit, eliminating a routine wasted first-failure ritual across two gates.

OSGatesCrucibleAlloy
2
gates redesigned (commit-push, retro clean-tree)
18
real tests added, all passing
3
real bugs found and fixed live during verification (PreToolUse re-block, .trim() truncation, --no-verify false-positive)

What shipped

.claude/hooks/pre-commit-check.mjs (new — real Git pre-commit hook logic, runs the check plan and writes machine-owned transcript evidence)

.claude/hooks/lib/commit-checks.mjs (new — derives a check plan from staged files; one real rule wired: session-JSON structural validity)

.claude/hooks/lib/marker.mjs (added computeIndexTreeSha/currentHeadSha/writeCommitTranscript/checkCommitTranscript — index-tree-bound evidence, not working-tree-bound)

.claude/hooks/gate-dispatch.mjs (commit gate's PreToolUse check demoted to anti-bypass backstop: blocks --no-verify, verifies the hook is installed — no longer the evidence producer)

.claude/hooks/gates.config.mjs (split combined 'commit-push' gate slug into separate 'commit' and 'push' — push left unchanged this session)

forgekit-os/scripts/install-git-hooks.mjs (new — installs the repo-managed pre-commit hook; wired to package.json's prepare script so it survives a fresh clone)

forgekit-os/scripts/retro.mjs (clean-tree check no longer blocks on the target session file itself; fixed a pre-existing .trim()-on-whole-blob parsing bug; extracted classifyStatusLines() as a pure, testable, exported function)

forgekit-os/scripts/crucible.mjs (replaced dead gpt-4o model with gpt-5.1-chat-latest; fixed council mode's fixed 1400-token budget to scale with persona count; added max_completion_tokens/temperature-retry handling for the new model family)

.claude/hooks/tests/commit-gate.test.mjs (new — 11 real tests against real scratch git repos)

forgekit-os/scripts/tests/retro-gate.test.mjs (new — 7 real tests including a regression test for the .trim() bug)

package.json (prepare + install-git-hooks scripts; wired both new test files into test:os)

forgekit-os/journal/strikes.md, anvils.md (2026-07-21 entries — the reframe and its two confirmed instances)

please give me the prompt you sent

Zeb, checking the in-session Crucible call's actual input before comparing it against his own separately-run ChatGPT session — this question is what surfaced the dead-model+token-starvation bug
Commit-push gate redesign — preparatory, not reactive — July 21, 2026 · ForgeKit