Enforcement Map
Every gate that can block or auto-fix a commit, PR, or push — what it checks, where it lives, and how to override it.
Design Principle
Enforcement is split into two tiers:
This separation keeps local commit latency low while still surfacing quality issues in PR review.
Pre-Commit Hook
File:.githooks/pre-commit
Pipeline stage: P1 (commit entry point)
Install: bash .githooks/install.sh or lpd hooks install
Gate 1 — Codex Branch Isolation
Blocks Codex AI sessions from committing directly todocs-v2. Forces AI work onto isolated codex/<issue-id>-<slug> branches.
Gate 2 — File Deletion Guard
Blocks commits that delete files without explicit human authorisation.Gate 3 — .allowlist Protection
Blocks edits to the.allowlist root-directory allowlist file.
Gate 4 — docs.json Redirect Integrity
Blocks changes todocs.json that add or remove /redirect routes without matching the scoped navigation config.
Also enforces root directory allowlist: new root-level files or directories must be in
.allowlist.
Gate 5 — v1/ Freeze
Blocks all changes tov1/. The v1 content tree is immutable.
Global Bypass
SKIP_ALL=1 — skips all pre-commit checks. Emergency use only. Emits a warning in all cases.
Pre-Push Hook
File:.githooks/pre-push
Pipeline stage: Pre-push (before git push)
Validates that no AI stash artifacts, stale Codex locks, or invalid task contracts are present before pushing to remote. Complements the pre-commit Codex isolation gate.
GitHub Actions — CI Workflows
All CI workflows live in.github/workflows/. They are the enforcement layer for quality, governance, and catalog freshness checks that are too slow or too soft to run in pre-commit.
Catalog Freshness Gates
Catalog Auto-Generation (Push → Main)
Content Quality
SEO and AI Artifacts
Social Data Pipelines (Scheduled)
Required secrets: see Solutions Secrets.
Governance and Repo Ops
Developer Experience
Override Reference
Related
- Repo Config Map — configuration files read by hooks and workflows
- Solutions Secrets — GitHub Actions secrets for the social data pipeline
docs-guide/policies/generated-artifact-and-hook-governance.mdx— policy governing what may run in hooks vs. CI.githooks/pre-commit— pre-commit hook implementation.githooks/pre-push— pre-push hook implementation