Skip to main content

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:
TierWhereWhat runs
Hard gatesPre-commit hook + pre-push hookOnly checks that, if skipped, would cause irreversible breakage: MDX parse failures, broken redirects, unguarded deletions, protected file edits, branch isolation violations
Soft checksGitHub Actions (PR workflows)Style, governance, catalog freshness, link audits, content health — everything that can be fixed in a follow-up commit
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 to docs-v2. Forces AI work onto isolated codex/<issue-id>-<slug> branches.
TriggerAny commit on docs-v2 from a Codex session
BypassALLOW_MAIN_COMMIT=1 + --trailer "allow-main-commit=true" (humans only)
Also runsCodex task contract validation + lock ownership check on codex/* branches

Gate 2 — File Deletion Guard

Blocks commits that delete files without explicit human authorisation.
TriggerAny staged deletion (git diff --cached --diff-filter=D)
ExceptionDeletions of files with a matching staged copy in v2/x-archived/ (archive follow-up deletes)
Bypass--trailer "allow-deletions=true" (humans only)

Gate 3 — .allowlist Protection

Blocks edits to the .allowlist root-directory allowlist file.
TriggerStaged changes to .allowlist
Bypass--trailer "allowlist-edit=true" (humans only)

Gate 4 — docs.json Redirect Integrity

Blocks changes to docs.json that add or remove /redirect routes without matching the scoped navigation config.
Triggergit diff --cached -- docs.json contains /redirect
Validates againsttools/config/scoped-navigation/docs-gate-orch.json
BypassNone — redirect surfaces must stay aligned
Also enforces root directory allowlist: new root-level files or directories must be in .allowlist.
TriggerStaged new files or directories at repo root
BypassSKIP_STRUCTURE_CHECK=1

Gate 5 — v1/ Freeze

Blocks all changes to v1/. The v1 content tree is immutable.
TriggerAny staged change to v1/**
BypassSKIP_STRUCTURE_CHECK=1 (emergency only)

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.
CheckWhat it validates
AI stash policyNo stash-based isolation artifacts left in the working tree
Stale Codex locksNo locks that reference inactive/closed Codex sessions
Task contractcodex/* branches must have a valid task contract before push

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

WorkflowTriggerWhat it checks
check-docs-index.ymlPR / push to docs-v2, maindocs-guide/catalog/pages-catalog.mdx freshness
check-docs-guide-catalogs.ymlPR / push to docs-v2, mainAll docs-guide catalogs (pages, components, scripts, workflows, templates, UI templates)

Catalog Auto-Generation (Push → Main)

WorkflowTriggerWhat it generates
generate-docs-index.ymlPush to main (docs.json or v2/ changed)docs-guide/catalog/pages-catalog.mdx
generate-docs-guide-catalogs.ymlPush to main (workflows, templates, docs.json, v2/index.mdx changed)All docs-guide catalogs; auto-commits updated files

Content Quality

WorkflowTriggerWhat it checks
content-health.ymlPush / PRBroken internal links, missing frontmatter, page health
broken-links.ymlScheduled + PRExternal link audit
v2-external-link-audit.ymlScheduledExternal links in v2/ pages
openapi-reference-validation.ymlPR (api/ changed)OpenAPI spec validity
test-suite.ymlPR / pushFull test suite (MDX syntax, validator scripts)
test-v2-pages.ymlPRv2 page-level tests

SEO and AI Artifacts

WorkflowTriggerWhat it generates / validates
generate-llms-files.ymlPush to mainllms.txt, sitemap-ai.xml
verify-llms-files.ymlPRChecks llms files are current
generate-ai-sitemap.ymlPush to mainAI sitemap artifact
verify-ai-sitemap.ymlPRChecks AI sitemap is current
generate-ai-companions.ymlPush to mainAI companion config files
check-ai-companions.ymlPRChecks AI companion configs are current

Social Data Pipelines (Scheduled)

WorkflowScheduleWhat it fetches
update-youtube-data.ymlWeekly (Sun 00:00 UTC)YouTube channel data per product
update-ghost-blog-data.ymlDaily (00:00 UTC)Ghost blog posts (Livepeer Studio)
update-rss-blog-data.ymlDaily (03:00 UTC)RSS blog posts (Daydream, Streamplace)
update-discord-data.ymlDaily (01:00 UTC)Discord announcements per product
update-github-data.ymlDaily (02:00 UTC)GitHub discussions + releases per product
update-forum-data.ymlDailyDiscourse forum posts
Required secrets: see Solutions Secrets.

Governance and Repo Ops

WorkflowTriggerWhat it does
governance-sync.ymlPush / PRSyncs governance rules and policy compliance
repair-governance.ymlDispatchRepairs known governance drift patterns
codex-governance.ymlPR (codex/* branches)Validates Codex task contracts on PR open/update
tasks-retention.ymlScheduledWorkspace/ retention enforcement (TTL enforcement — stub, not yet fully implemented)
freshness-monitor.ymlScheduledFlags pages where lastVerified is past threshold

Developer Experience

WorkflowTriggerWhat it does
auto-assign-docs-reviewers.ymlPR openedAuto-assigns reviewers based on changed paths
issue-auto-label.ymlIssue openedAuto-labels issues by content area
discord-issue-intake.ymlIssue openedPosts new issues to Discord intake channel
close-linked-issues-docs-v2.ymlPR merged to docs-v2Closes linked issues
docs-v2-issue-indexer.ymlIssue eventsIndexes issues for search
translate-docs.ymlPush / dispatchTranslation pipeline
seo-refresh.ymlDispatchBatch SEO metadata refresh
sync-large-assets.ymlDispatchSyncs large binary assets from external storage

Override Reference

OverrideHowWho
Skip all pre-commit checksSKIP_ALL=1 git commitHumans only — emergency
Skip structure checksSKIP_STRUCTURE_CHECK=1 git commitHumans only
Allow file deletionsgit commit --trailer "allow-deletions=true"Humans only
Allow .allowlist editgit commit --trailer "allowlist-edit=true"Humans only
Allow AI commit to docs-v2ALLOW_MAIN_COMMIT=1 git commit --trailer "allow-main-commit=true"Humans only — explicit chat instruction required

  • 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
Last modified on April 7, 2026