Orchestrata Ultimate › Gates › wiring

Gate: wiring

At a glance

Purpose Refuse an artifact this branch or working tree added but left inert: an unregistered .claude/hooks/ file, an uninstalled git hook, an unreachable src/ module, an uninvoked ruling-declared gate.
Where it runs The scripts/gates.py battery (registered as wiring); scripts/health_check.py.
Trigger A battery run whose fingerprint changed, or whose last cached verdict was not ok; a health check.
Exact command python scripts/check_wiring.py [--repo-root PATH] [--rulings-dir PATH] [--json]
Blocks Exit 1 on any W1–W4 finding; exit 0 clean or skipped with a printed reason (not a repo, no git, no master ref).
Ruling / ADR RUL-023 — a feature means the thing is wired; RUL-012 — done means wired and deployed; ADR-0042 — wiring gate supersession by the ruleset engine.
Last recorded verdict ok: true in the primary checkout's .cache/gates.json (file last written 2026-09-22 10:01 local). wt-MAP-PRECOMMIT has no .cache/gates.json.

What it refuses

An artifact this branch added but left inert: a .claude/hooks/ file registered nowhere, a git-hook script the installer never references, a new src/ module reachable from no production entrypoint, a ruling-declared gate script no runner invokes.

Why it exists

Module docstring, quoting the ruling verbatim and the incident:

"Wiring gate — RUL-023 ('when I ask for a feature that means wiring the damn thing not just code vomit', verbatim, 2026-07-27).

See ~/workspace/knowledge-wiki/rulings/RUL-023-feature-means-wired.md for the ruling text and the incident (in a single session three capabilities were built and reported complete while inert: a git hook whose core.hooksPath pointed elsewhere, a .claude/hooks/ script registered only in a worktree's tracked settings.json, and a gate no runner invoked). RUL-012 already defines done as wired+deployed; this mechanically checks it for the artifact classes that are easiest to leave inert."

The four checks

Check An artifact added in this diff… …must be
W1 under .claude/hooks/ registered in .claude/settings.json
W2 under scripts/hooks/ (other than the installer) referenced by scripts/hooks/install-git-hooks.sh
W3 a new .py module under src/ TRANSITIVELY reachable from a production entrypoint — "the same reachability BFS the AST toolkit's orphans query runs… An import from a file that is itself unreachable does not count — this does NOT hand-roll a second reachability engine"
W4 a scripts/*.py file some ruling declares as its gate mechanism invoked by scripts/health_check.py, a .claude/hooks/ file, a scripts/hooks/ file, or scripts/run_tests.py

How it runs

Typical failures and how to fix them

Wiring (of the wiring gate itself)