Orchestrata Ultimate › Gates › Process-level gates

Gate family: Process-level gates

At a glance

Purpose Say no to a workflow step (dispatching, landing evidence, folding, committing, pushing, ratifying, merging) rather than to a tree, a run or a tool call.
Where it runs Workflow law, the tracked git hooks under scripts/hooks/, scripts/health_check.py, and Mohamed's ratification.
Trigger The workflow step itself: git commit (pre-commit, commit-msg), git push (pre-push), a dispatch, a fold, a merge.
Exact command Per row below; the mechanical ones are scripts/hooks/pre-commit, scripts/hooks/commit-msg, scripts/hooks/pre-push, check_ai_attribution.py, check_adr_graph_sync.py and gen_plugin.py --check.
Blocks pre-commit and commit-msg: exit 1 refuses the commit; pre-push: exit 1 refuses the push; process-law rows have no exit code.
Ruling / ADR RUL-007, RUL-008 — review before commit, RUL-022, RUL-040; ADR-0046 — three synchronized ADR homes; ADR-0101 — the real hook stages are measured first; ADR-0120 — test subprocesses import from the installed environment.

The battery gates say no to a tree; the suite preflight says no to a run; the session hooks say no to an action. This family says no to a workflow step — dispatching a reviewer, landing evidence, folding findings, committing, ratifying, merging. Some of these resolve to a script (and are cross-referenced to their own pages); some are process law whose "command" is a git practice; one is a person.

The canonical 14-row table lives on Ruleset Engine — The Complete Picture, section 5 and (in inventory form) on the ruleset design-review page (§2.4). This page expands the rows.


1. Briefs-before-dispatch

2. Evidence-on-landing

3. Author sweep

4. Per-id ledger

5. Fold-verifier

6. RUL-007 attribution — scripts/check_ai_attribution.py

7. ADR drift — scripts/check_adr_graph_sync.py

8. Ruling authority

9. RUL-022 design-before-build

10. F13's traceability battery

11. The suite

12. Plugin currency

13. Session honesty

14. Mohamed


The git-hook moments (where process gates bite mechanically)

The tracked hooks under scripts/hooks/ (installed by scripts/hooks/install-git-hooks.sh, which sets core.hooksPath to the relative path scripts/hooks so every worktree runs its own branch's hooks). Read from wt-MAP-PRECOMMIT on 2026-10-23; the commits cited are on origin/master (a4cbc2bdf) unless marked otherwise.

Hook Runs, in order
commit-msg exec python scripts/check_ai_attribution.py --message-file "$1" (row 6).
pre-commit 1. check_staged_secrets.py with the repo .venv/bin/python (plaintext-secret refusal). 2. If no .py file is staged: the map refresh, then exit 0. 3. ruff check --fix on each staged .py file, then git add it (never blocks). 4. "$PY" scripts/gate.py review-staged: the verdict is derived in Prolog by commit_review.pl (8e0df6ff3, 2026-10-11, "no verdict is not a pass"); exit 1 = blocking issues, any other non-zero = "a review produced no verdict", both refuse the commit. 5. _refresh_maps: regenerate and stage docs/CODEBASE_MAP.md and docs/CODEBASE_MAP_FULL.md when the commit stages Python (b5468cb1c, 2026-10-22; a failure prints one WARN line and never blocks). The hook no longer calls code-review.py or test-review.py directly; review-staged runs them. With PRECOMMIT_WALLS_FILE set it appends per-stage walls to reports/precommit-walls.ndjson (ADR-0101 rule 2).
pre-push 1. Refuses when master or main is checked out in the pushing worktree ("Push from a feature-branch worktree instead"). 2. Skips the suite when reports/.ship-verified matches this exact source and reports/run-tests-latest.json shows zero failures at that commit. 3. Refuses, fail-closed, when origin/master does not resolve (2669f4882, 2026-10-21: the old "BASE not found → FULL suite" arm is gone, RUL-040). 4. Builds the range from the commit being pushed, origin/master...<pushed sha> (e27c12b50, 2026-10-21); no committed change → exit 0. 5. .venv/bin/python scripts/run_tests.py --affected "$RANGE" (949c1628c, 2026-10-21: the venv python, not uv run, because uv run re-syncs the package editable and source provenance rejects it, ADR-0120).
post-checkout, post-merge scripts/hooks/_materialise-env.sh for the worktree (branch checkouts only for post-checkout).

The ruff step's uv run flag differs by branch. On origin/master (a4cbc2bdf) the pre-commit ruff line is a plain uv run ruff check --fix. On feat/maps-via-codetools it is uv run --no-sync ruff check --fix, with the comment "a plain uv run makes the install editable and the pre-push provenance gate then refuses"; that change is commit 8a2cb42ad, which is not on origin/master (checked with git merge-base --is-ancestor, 2026-10-23).

Typical failures and how to fix them