Valid function-hook gate fixture

A highly resilient, declarative dotfiles setup using Chezmoi, Mise, and Python, optimized for Linux-based devcontainers.
mise install # Install all tools
mise run lint # Run lint checks (read-only ≡ CI; `mise run fmt` auto-fixes)
uv run --project python pytest tests/ -x -q # Run all 190 tests
docker buildx bake dev-load # Build devcontainer locally
curl -fsSL https://raw.githubusercontent.com/sortakool/dotfiles/main/install.sh | bash
install.sh bootstraps mise.mise installs git, chezmoi, and uv.chezmoi init clones the repo and applies templated configs.uv run) handle complex orchestration and tool installations.DotfilesConfig centralizes 16 env vars; hk.pkl for git hooks with shared hk-common.pkl checks.dotfiles_setup).noqa, type: ignore, or pylint: disable — enforced by no_lint_skip hk step.changes path-gate → base-prep → p2996-prep → build → smoke-test (smoke + Dive); promote retags on main; benchmark + Trivy run async in image-analysis.yml. Docs-only changes skip the build chain.All tools are declared in mise.toml and installed via mise install. Python dependencies are managed via uv with python/pyproject.toml.
uv run --project python pytest tests/ -x -q # All tests
uv run --project python dotfiles-setup verify run # Contract verification
mise run pin-actions # Verify GHA SHA-pinning
mise run lint-docs # Validate agent documentationhooks/register.ts 17 lines1import type { Register } from "claude-code";
2
3// Every module registering classic.PreToolUse must permit these, consulted —
4// asserted by `assert_escape_hatch_permitted`. This fixture denies nothing, and
5// carries the set anyway: the invariant is deliberately exception-free.
6const ESCAPE_HATCH_TOOLS = new Set(["AskUserQuestion", "SendUserMessage"]);
7
8export const register: Register = (on) => {
9 on("classic.PreToolUse", { tool: "Read" }, async (_$, e, next) => {
10 const result = await next(e);
11 if (ESCAPE_HATCH_TOOLS.has(e.tool)) {
12 return result;
13 }
14 return { ...result, additionalContext: ["fixture-valid"] };
15 });
16};
17