Skip to main content

Documentation Index

Fetch the complete documentation index at: https://na-36-merge-docs-v2-dev-draft-into-docs-v2-clean-20260525.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Workflow and Pipeline Governance Framework

This is the single canonical reference for workflows and pipelines in this repo. Read this before creating, renaming, or removing any workflow.

Outcome we are building

This repo is ownerless and self-governed. The product itself runs the rules: detects breaks, fixes what it can, raises issues for what it cannot, and documents every change without human babysitting. The framework below describes what that system must look like. Target end state:
  1. Six action workflows. One per concern. Maintenance scales with the number of concerns, not the number of scripts.
  2. Workflows are thin dispatchers. YAML answers when, where, with what permissions. All business logic lives in governed scripts under operations/scripts/. Inline JavaScript over 50 lines is a defect.
  3. Local CLI equivalence on every dispatcher. Any contributor (human or AI agent) can run any pipeline locally with --dry-run, with no CI trigger and no GitHub secrets, before pushing.
  4. Prevention at the earliest layer (D-GOV-08). Every governance rule fires at the earliest possible layer. Detection at later layers is a fail-safe, never the primary mechanism. The five-layer chain – write time (PreToolUse hook), commit time (pre-commit), PR time (validator), post-merge (auto-repair), schedule (drift scan) – applies to every governed surface. A rule that only catches violations on schedule is a rule that lets violations land.
  5. Detect, repair, escalate, verify. Every detection routes to a response. No headless scans. No findings die in a log. Remediators support --verify so successful fixes survive and only regressed files revert.
  6. Self-documenting. The actions library, script registry, and decisions registry regenerate from data on every change. No manual documentation sync.
  7. One taxonomy spine. 7 types times 7 concerns times 8 pipeline tags. Every workflow and every script declares all three. The system is searchable, mappable, and predictable.
  8. Bottom-up integrity. Every script has a verified purpose, a known caller, an SME endorsement, and a place in the taxonomy. Orphan scripts are archived, not preserved out of caution.
  9. Every folder is governed (D-GOV-08). No commit of files that do not belong. Every folder hosting repo-influencing files declares an explicit allowlist enforced through the five-layer prevention chain.
  10. Composable at every tier. Every script (atomic, pipeline, meta) is independently runnable via node with --dry-run. A developer can call any pipeline directly without going through CI.
If any of those properties is missing, the framework is not yet implemented.

What the product needs to do

  1. Protect itself. Detect breaks. Auto-fix what it can. Raise issues for what it cannot. Block bad changes at PR time.
  2. Keep itself current. Pull fresh external data. Regenerate derived files. Detect drift.
  3. Maintain its own standards. Enforce voice, grammar, spelling, terminology, visual identity.
  4. Make itself findable. Regenerate AI and search surfaces on every change.
  5. Document itself. Catalogues, indexes, registries regenerate from data.
  6. Govern itself. Rules enforced, issues managed, drift self-healed.
Every workflow is justified by one or more of those obligations. A workflow that does not is removed.

Pipeline architecture (D-ACT-08)

The dispatcher model

Every workflow YAML is a dispatcher. Workflows handle trigger, environment, permissions, secrets, concurrency, and orchestration. They do not contain business logic. Typed work lives in scripts.
LayerOwnsHas type?
Workflow YAMLWhen, where, permissions, concurrency, commit/push, issue creation, secrets injectionNo (every workflow is a dispatcher)
ScriptAll business logic, file I/O, exit codes, dry-run, verify, structured outputYes (7-type taxonomy)
The type prefix in the filename identifies what the script does, not what the workflow does. Tier 1 workflow classes: the 6 dispatch-{concern}.yml files are the concern dispatchers (the “actions” in this framework’s terminology – one per concern). The 5 interface-governance-*.yml files (assign-reviewers, close-linked-issues, index-issues, intake-discord-issues, label-issues) wrap interface type scripts that react to issue/PR/webhook events; they are tagged # pipeline: P7 distinct from the P2–P6 dispatcher taxonomy. Both classes live in .github/workflows/ for an active total of 11 workflows.

Four-tier composable dispatch architecture

The repo orchestrates work through four tiers. Every script at every tier is independently runnable via node with --dry-run. A developer can call any pipeline, any meta-bundle, or any atomic directly without going through CI.
TierWhat it isCount (live 2026-05-25)Composability
1. ActionThin workflow YAML files in .github/workflows/. Fires on event, calls a meta dispatcher (or pipeline directly).6 dispatch- actions + 5 interface-governance workflows = 11 activeTriggered by GitHub events only – not runnable locally.
2. Meta dispatcherOptional script that bundles related pipelines into a higher-level entry point (for example: “all health PR pipelines”).~20 (3 per concern average)node dispatch-{concern}-{verb}.js --dry-run
3. Pipeline dispatcherOwns one full detect-repair-verify-escalate cycle for one niche. Accepts --mode pr|scheduled|manual.~80 (one per niche; tier 2 + tier 3 = 100 dispatch scripts total)node dispatch-{niche}.js --mode pr --dry-run
4. Atomic scriptSingle-purpose, type-pure (validator, audit, remediator, generator, integrator, or interface).230 wirednode {type}-{thing}.js --files {paths}
Naming rules:
  • Action YAMLs: dispatch-{concern}.yml. Concern from the 7-enum.
  • Meta dispatchers: dispatch-{concern}-{verb}.js. Verb from the 11-enum and indicates which kind of pipelines are bundled (check for PR-time bundles, scan for scheduled bundles, repair for manual bundles, generate for post-merge bundles, update for scheduled integrator bundles, react/intake/index for event handlers).
  • Pipeline dispatchers: dispatch-{niche}.js. Verb dispatch because the pipeline orchestrates a full cycle (not a single verb’s work). Niche is the second-level grouping inside a concern (wcag, page-integrity, em-dashes, contract-addresses, folder-allowlist, etc.).
  • Atomic scripts: verb-noun where verb matches the script’s type (check-* for validators, scan-*/audit-* for audits, repair-* for remediators, generate-* for generators, fetch-*/update-* for integrators). One concern per atomic.
Type-purity is enforced at the atomic and meta levels. Pipeline dispatchers are deliberately mixed-type because they implement a full cycle (a WCAG pipeline calls a validator, a remediator, and an audit – that is the cycle, not type-mixing). The dispatcher’s verb is dispatch to signal this is intentional orchestration. Composability worked example:
# Run one pipeline (full WCAG lifecycle)
node operations/scripts/dispatch/content/health/dispatch-wcag.js --dry-run

# Run WCAG in scheduled mode (audit + repair + verify + escalate)
node operations/scripts/dispatch/content/health/dispatch-wcag.js --mode scheduled --dry-run

# Run all health PR pipelines via meta
node operations/scripts/dispatch/content/health/dispatch-health-check.js --dry-run

# Run a single atomic validator (skip dispatchers)
node operations/scripts/validators/content/health/check-wcag.js --files v2/page.mdx
The full structure across all 6 actions. Each action expands to its meta dispatchers; each meta expands to its pipeline dispatchers; each pipeline expands to every atomic script needed for its full lifecycle (detect + repair + verify + escalate). Atomics marked (NEW – Phase 3) do not exist yet and will be created during implementation. A pipeline is not composable if any of its lifecycle atomics is missing – every pipeline shown here is targeted at full closure. The implicit verify step: after a pipeline runs its repair atomics, it re-runs its detect atomics on the affected files. This is the same script invocation with --verify flag rather than a separate atomic. Only files that pass re-detection survive; regressed files revert. The implicit escalate step: every pipeline includes lib/rolling-issue.js to open, update, or close a rolling GitHub issue per residual finding. Auto-fixable findings never reach escalation; only what cannot be repaired by the cycle gets human attention.
dispatch-health.yml (action)
Phase 3 NEW atomic scripts (created during implementation; this Tree commits to the full closure of every pipeline):
PipelineNew atomicTypePurpose
dispatch-page-structurerepair-anchor-usage.jsremediatorPairs with check-anchor-usage
dispatch-page-structurerepair-description-quality.jsremediatorPairs with check-description-quality
dispatch-page-structurerepair-lint-structure.jsremediatorPairs with lint-structure
dispatch-page-renderingcheck-broken-links.js, repair-broken-links.jsvalidator + remediatorReplace mintlify integration with first-party atomic
dispatch-content-qualityrepair-content-quality.jsremediatorFor deterministic content fixes
dispatch-openapi-referencerepair-openapi-reference.jsremediatorRegenerate from spec source, open PR
dispatch-banned-wordsrepair-banned-words.jsremediatorFor replaceable terms
dispatch-ownerless-languagecheck-ownerless-language.jsvalidatorCurrently only repair atomic exists
dispatch-social-feedsvalidate-social-feed-schema.jsvalidatorSchema verification on fetched data
dispatch-changelogsvalidate-changelog-schema.jsvalidatorSchema verification
dispatch-showcasevalidate-showcase-schema.jsvalidatorSchema verification
dispatch-og-imagescheck-og-images.jsvalidatorVerify all v2 pages have OG image
dispatch-seo-metadataaudit-seo-metadata.jsauditDetect missing/stale SEO metadata
dispatch-component-registryrepair-component-imports.js, repair-component-css.js, repair-naming-conventions.js, repair-component-pattern-compliance.js, repair-component-layout.jsremediatorsPairs with component validators
dispatch-sdk-clientsvalidate-sdk-schema.jsvalidatorSchema verification
dispatch-contract-shadowcompare-shadow-to-production.jsvalidatorShadow-vs-production diff
dispatch-release-versionvalidate-release-version.jsvalidatorSchema/format check
dispatch-config-flagsvalidate-config-flags-schema.jsvalidatorSchema verification
dispatch-exchanges-datavalidate-exchanges-schema.jsvalidatorSchema verification
dispatch-folder-allowlistcheck-folder-allowlist.js, audit-folder-allowlist.js, repair-folder-allowlist.jsvalidator + audit + remediatorFull triplet per D-GOV-08
dispatch-codex-compliancerepair-codex-task-contract.jsremediatorFor deterministic contract fixes
dispatch-script-locationsrepair-script-locations.jsremediatorAuto-move via git mv
dispatch-workspace-retentionrepair-workspace-retention.jsremediatorAuto-archive drift
dispatch-action-docscheck-actions-library.jsvalidatorVerify catalog-index integrity
dispatch-script-registrycheck-script-registry.jsvalidatorVerify registry coverage
About 30 new atomic scripts to build in Phase 3 to close every pipeline’s lifecycle. Layer-1 hooks (Claude Code PreToolUse / PostToolUse / SessionStart) are atomic scripts invoked outside the CI dispatcher tree. They live in operations/scripts/dispatch/governance/ and are wired via .claude/settings.json. The CI dispatchers above never call them; they run in the local editor session before code reaches git. What the PR sees with this architecture:
  • PR touching v2/*.mdx triggers up to 6 action workflows (one per concern, filtered by paths:)
  • Each workflow runs ONE job per relevant trigger, with sequential steps inside calling pipeline dispatchers
  • Each job appears as ONE PR check named “Concern · PR Check” (for example, “Health · PR Check”)
  • A failed step in any job fails the entire concern check with a clear log entry showing which pipeline dispatcher caught what
This delivers six clear PR checks for full coverage, replacing the current 24-plus checks. Each pipeline dispatcher remains independently runnable locally via node operations/scripts/dispatch/{content|governance}/{concern}/dispatch-{niche}.js --dry-run.

Pipeline patterns

Every pipeline takes one of seven shapes.
PatternShapeExample
A: IntegrateFetch external data, diff check, commitSocial feed updates, contract address sync
B: GenerateBuild from internal data, commitdocs-index.json, llms.txt, AI sitemap
C: CheckValidate on PR, report pass or failBroken links, content quality, governance
D: Scan, report, actScheduled monitoring with routed responseData freshness, external link audit, content quality scan
E: RepairFix broken state, commit or open PREN-GB style homogenisation, governance repair
F: ReactIssue or PR lifecycle events with no file changesLabel, assign reviewer, intake from Discord
G: OrchestrateDispatch children, aggregate resultsPost-merge sync, catalog generation

Generate/verify pairs

Every Pattern B generator must have a matching Pattern C verifier that runs with --check on PR. The verifier compares the committed file to what the generator would produce. Drift fails the PR. Every Pattern E remediator must accept --verify. After applying fixes the script re-runs the matching validator on affected files and reverts only files that regressed. Successful fixes survive even when one file fails.

Detect, repair, escalate, verify (D-GOV-03)

No headless scans. Every detection routes to one of four responses:
DetectionRouteAuthority
Auto-fixableApply fix silently in CIHighest preference
Auto-fixable but high blast radiusOpen auto-fix PRMedium
External dependency or human decision neededOpen rolling issueLower
Schema or syntax breakage on PRBlock merge with clear errorLast resort
Rolling issues auto-close when the underlying finding clears. The pattern is implemented in operations/scripts/interfaces/governance/lib/rolling-issue.js.

Local CLI equivalence (D-GOV-07)

Every dispatcher has a matching local script that can run the same pipeline without a CI trigger. The workflow is the CI orchestrator; the script is the portable logic. Three requirements:
  1. Every script accepts --dry-run (preview without writing)
  2. Secrets-dependent scripts degrade gracefully when secrets are absent
  3. The actions-library page documents the local invocation command
This makes the repo testable by any contributor, anywhere, before pushing.

Prevention at the earliest layer (D-GOV-08)

Every governance rule fires at the earliest possible layer. Detection at later layers is a fail-safe, not the primary mechanism. A rule that only catches violations on schedule is a rule that lets violations land. The five enforcement layers, from earliest to latest:
LayerTriggerOwnerWhat it does
1. Write timeClaude PreToolUse hookpre-tool-guard.js and siblings in operations/scripts/dispatch/governance/Blocks Edit/Write before the file lands. Allowlist, render gate, em-dash sanitiser, frontmatter sanitiser.
2. Commit time.githooks/pre-commitPre-commit hookRejects unauthorised paths and structural violations in the staged diff. Works for contributors not running Claude Code.
3. PR timedispatch-{concern}.yml PR job → dispatch-{concern}-check.js metaPR validator pipelinesServer-side check on every PR. Fails the check on violations. Posts advisory comment for soft gates.
4. Post-mergedispatch-{concern}.yml post-merge job → dispatch-{concern}-sync.js or dispatch-{concern}-generate.js metaPost-merge remediators and generatorsIf something landed despite layers 1-3 (direct push, hook bypassed), auto-archive or auto-fix on merge.
5. Scheduledispatch-{concern}.yml scheduled job → dispatch-{concern}-scan.js metaScheduled audit pipelinesLast-resort drift scan with rolling issue. Fail-safe only – anything caught here represents an upstream gate that failed.
Every dispatcher this framework targets must declare which layer it serves and confirm that earlier layers exist for the same rule. A PR validator without a write-time hook is acceptable only when the violation cannot be detected before the file is written. A scheduled scan without a PR validator is a governance gap, not a design.

Every folder is governed (D-GOV-08)

No commit of files that do not belong. Every folder hosting repo-influencing files declares an explicit allowlist enforced through the five-layer prevention chain above. Allowlist rules:
  • Explicit, closed list (exact paths or globs)
  • Stored at {folder}/.allowlist for portability
  • One entry per line, documented purpose per entry
  • Registered in operations/governance/config/repo-governance-surfaces.json (D-ACT-10)
Each governed folder has the full triplet wired: dispatch-folder-allowlist.js --mode pr (layer 3), --mode post-merge (layer 4), --mode scheduled (layer 5), plus the pre-tool-guard.js extension for layer 1 and the pre-commit gate for layer 2. The allowlist files themselves are governed by the same chain – they are the source of truth, not generated.

Taxonomy

7 types (D-ACT-01, D-ACT-07)

TypePurpose
integratorPulls external data into the repo
generatorProduces files from internal repo data
validatorEnforces rules with pass/fail gate on PR
auditRead-only scheduled monitoring and reporting
remediatorAuto-fixes broken state with optional commit
dispatchOrchestrates multiple scripts or workflows
interfaceReacts to issue, PR, or external events

7 concerns (D-ACT-05)

ConcernWhat it covers
copyWritten text, data standards, spelling, grammar
healthSite integrity, links, rendering, freshness, assets
maintenanceIndexes, catalogues, registries, changelogs
discoverabilitySEO, AEO, AI indexing, translation
governanceSystem rules, compliance, issue and PR management
brandStyle, formatting, page structure, voice
integrationsExternal data feeds and APIs
Concerns name the part of the system the pipeline operates on. Every script and every workflow declares one.

8 pipeline tags (D-ACT-02)

TagTriggerAuthority
P2PR (required check)Blocks merge
P3PR (advisory)Reports only
P4Push to deploy branchAuto-commit
P5Schedule (read-only)Advisory, rolling issue
P5-autoSchedule plus auto-commitWrites to repo
P6Schedule plus auto-fixSelf-heal, may open PR
manualworkflow_dispatch onlyHuman-triggered
event-drivenrepository_dispatch or issuesReactive

Naming convention (D-ACT-04)

Pattern: type-concern-verb-name.yml Example: integrator-maintenance-update-contract-addresses.yml The verb is one of a closed enum of 11: update, generate, check, scan, repair, dispatch, label, index, intake, close, assign. The name segment describes what the workflow does, not how it is implemented. If someone unfamiliar with the repo cannot guess the purpose from the filename, the name is bad. In the four-tier architecture, action workflows use dispatch-{concern}.yml (verb is dispatch, name is the concern). Pre-existing single-script workflows that have not yet been consolidated may still use type-prefixed names (e.g. integrator-maintenance-update-contract-addresses.yml) until they fold into their concern’s action.

Required standards

Every active workflow meets these. Violations block the PR via validator-governance-check-workflow-governance.yml.
StandardSourceEnforcement
Filename follows type-concern-verb-name.ymlD-ACT-04check-workflow-governance
Governance comment headers (# type:, # concern:, # pipeline:)D-ACT-08check-workflow-governance
Listed in actions-audit.jsonD-ACT-08check-workflow-governance
Has matching docs page in .github/workspace/actions-library/D-ACT-08check-workflow-governance
Generator workflows declare concurrency: blockD-ACT-03check-workflow-governance
Auto-commit workflows declare concurrency:D-ACT-03check-workflow-governance
All called scripts live under operations/scripts/ with 11-tag JSDocD-ACT-06, script frameworkcheck-jsdoc-headers
Output locations follow D-ACT-09 (reports in workspace/reports/{concern}/, data in snippets/data/{domain}/)D-ACT-09manual review at audit
Workflows are pure dispatchers; inline scripts under 50 linesD-ACT-08manual review
Local CLI equivalent documented in actions-libraryD-GOV-07manual review
Required labels read from .github/config/labels.jsonD-GOV-04manual review

Self-documenting pipeline

The actions library at .github/workspace/actions-library/ regenerates from actions-audit.json whenever workflows change. No manual sync.
Workflow change (push to docs-v2)
  -> generator-governance-generate-action-docs.yml fires
  -> Scans .github/workflows/*.yml
  -> Regenerates actions-audit.json
  -> Runs generate-action-pages.js
  -> Writes one .mdx per workflow under actions-library/{type}/{concern}/
  -> Updates catalog-index.mdx
The actions-audit.json registry is the source of truth. Documentation is derived. Editing the .mdx pages directly is wrong.

Locked decisions

18 decisions constrain the framework. Read the full text in .github/workspace/decisions-log.mdx and .github/workspace/design/governance/design-overview.md.
IDTopicEffect
D-ACT-01interface is the 7th typeEvent-reactive workflows are not pipeline-shaped
D-ACT-02P5-auto distinct from P5Read-write vs read-only have different error handling
D-ACT-03Data-feed consolidation patternMany similar feeds collapse into one matrix dispatcher
D-ACT-04Naming conventiontype-concern-verb-name.yml with closed verb enum
D-ACT-057 concernsReplaces earlier 4-concern model
D-ACT-06Scripts live in operations/scripts/No business logic in .github/scripts/
D-ACT-07automation renamed integratorNames what it does, not what it is
D-ACT-08Workflows are dispatchersType reflects the script
D-ACT-09Output location conventionsReports, data, indexes, config each have a fixed home
D-ACT-10Unified governance registryoperations/governance/config/repo-governance-surfaces.json is canonical
D-GOV-01Governance is enforcement infrastructureConcerns own rules; governance owns pipelines
D-GOV-02Categories are enforcement layersPre-commit, PR, post-merge, scheduled, self-heal, hooks, issue lifecycle
D-GOV-03Every detection self-repairs or escalatesNo headless scans
D-GOV-04Tooling makes correct the defaultTemplates, scaffolds, labels
D-GOV-05Advisory before hard gateNew enforcement starts at P3
D-GOV-06Script framework aligned to actions framework7 types, 7 concerns
D-GOV-07Workflow dispatchers have local CLI equivalentsTestable without CI
D-GOV-08Every folder is governed; prevention at earliest layerFive-layer chain, no commit of files that do not belong

What this framework supersedes

DocStatusAuthority
.github/workspace/design/governance/consolidated-architecture.mdSupersededHistorical 47-workflow target. Current target is 6 actions + composable dispatcher tiers. Kept for design history.
.github/workspace/framework-canonical.mdWorking specDeeper internal detail. Synced from this published doc.
.github/workspace/outcomes.mdReference onlyVisual maps and Mermaid diagrams. Snapshot in time.
The current consolidation execution plan lives at /Users/alisonhaire/.claude/plans/soft-gliding-falcon.md for the active session. When the plan completes, its outcomes fold into this framework and the plan is archived.

Canonical sources

SourceRole
This pagePublished canonical framework. Read before any workflow change.
.github/workspace/decisions-log.mdxLocked decisions (D-ACT-01..10, D-GOV-01..08). Edit only via new decision that explicitly supersedes.
.github/workspace/framework-canonical.mdInternal working spec. Deeper pattern detail.
.github/workspace/actions-library/actions-audit.jsonWorkflow registry. Source for auto-generated docs.
.github/workspace/actions-library/Auto-generated per-workflow documentation. Read, do not edit.
docs-guide/frameworks/script-framework.mdxCompanion framework for scripts under operations/scripts/
docs-guide/policies/governance-index.mdxIndex of all governed surfaces. Entry point.
operations/governance/config/repo-governance-surfaces.jsonUnified governance registry. Single source for governed surfaces.

How to use this framework

Before creating a workflow:
  1. Confirm the work cannot be done by an existing dispatcher (consolidate first – there are only 6 actions, one per concern)
  2. Identify the concern, the niche, and the trigger pattern
  3. Add or extend a pipeline dispatcher (dispatch-{niche}.js) under the right concern folder
  4. Add the atomic scripts as needed under the matching type folders, each with 11-tag JSDoc
  5. Add --dry-run and --verify to every script per D-GOV-07
  6. Register the workflow in actions-audit.json
  7. Open a PR. validator-governance-check-workflow-governance.yml confirms compliance.
Before renaming or removing a workflow:
  1. Check who references it (grep -rE workflow-name across yml, js, json, mdx)
  2. Update every reference in the same PR
  3. Archive the old file under .github/workflows/x-archive/ (D2 no-deletions policy)
  4. Update actions-audit.json and re-run the action docs generator
Last modified on May 26, 2026