A universal, indexable agent-governance corpus: a stack-agnostic, runtime-agnostic orchestration kernel plus opt-in packs. Extracted and generalized from a single project's AGENTS.md + .github/skills/ + .github/engram/ corpus so it can be reused across repositories, languages, cloud platforms, and agent harnesses (Claude Code, Gemini CLI, GPT-based agents, local-model harnesses, ...) without dragging along project-specific — or harness-specific — content.
Three independent problems, one manifest:
- Scale/indexability — a single giant
AGENTS.mdgets re-read in full every session regardless of what the task needs.core/splits the orchestration protocol into small, numbered modules;MANIFEST.jsonis the router an agent reads once to know what exists and where, then fetches only what a task's triggers require — the same lazy-load pattern this environment's ownToolSearchuses for deferred tools. - Reuse across stacks/languages — the original corpus hard-coded Terraform/GCP assumptions into otherwise-generic reasoning protocols.
stacks/isolates that: a stack pack is a self-contained bundle of skills + additive rows into core protocols, activated per consuming repo via a localgovernance-manifest.json— never baked intocore/. - Reuse across agent runtimes — some core rules (e.g. the Persistence Portability Gate in
core/02-memory-bootstrap.md) can be mechanically enforced with a hook, not just stated in prose — but how depends entirely on which agent harness is running the corpus, and most harnesses' capabilities have never been verified here.runtimes/isolates that the same waystacks/isolates language-specific content: a runtime pack documents one harness's verified capability and implements the mechanical side, whilecore/never assumes any specific harness's hook mechanism exists. Seeruntimes/CONTRACT.md.
MANIFEST.json # the index/router — read this first
core/
00-kernel.md .. 07-feedback-protocol.md # the numbered orchestration protocol (was AGENTS.md §0-§7)
skills/<name>/SKILL.md # domain-agnostic skills (system-foresight, sre-audit, gitops-pipeline, ...)
patterns/ # meta-governance: how to author/evolve rules and skills in this corpus
stacks/<name>/ # language/infra-specific authoring knowledge
PACK.md # what this pack activates, what core sections it extends
skills/<name>/SKILL.md # stack-specific skills (e.g. Terraform/HCL authoring)
runtimes/<name>/ # agent-harness-specific mechanical enforcement (hooks, config)
CAPABILITY.md # verified interception capability for this harness, or explicit "none"
hooks/, *.template # the actual hook scripts / config snippets, if any
templates/ # scaffolding a consuming repo copies on init (never read at runtime)
scripts/init-governance.sh # bootstrap: syncs core + active packs into a consuming repo
- In the consuming repo, copy
scripts/consumer-manifest.example.jsontogovernance-manifest.jsonand list whichstacksandruntimesto activate (empty lists are valid — core-only). - Run
./scripts/init-governance.sh /path/to/consuming-repo. This syncscore/,patterns/, any declared stack packs, and any declared runtime packs into<repo>/.github/governance/, and — only on first run — scaffoldsAGENTS.mdand.github/engram/{INDEX.md,agent-behavioral-preferences.md}fromtemplates/. Runtime pack config snippets (e.g. a.hook-snippet.template) are copied as files only — the script never auto-edits your agent runtime's own settings/config file; merge those by hand. - Re-run the script any time
agent-governance-coreupdates, or when you add/remove a pack in the manifest. It syncs.github/governance/idempotently; it never touches an existingAGENTS.mdbeyond the one-time scaffold, so your repo's "Project-Specific" section and any local architecture constraints are never clobbered. - Requires
jq(manifest parsing) andrsync.
A stack pack is warranted when a genuinely new language/platform/domain needs authoring guidance that core's domain-agnostic protocols can't derive from first principles (see patterns/pattern-skill-authoring.md → New Skill Gate before writing one). At minimum:
stacks/<name>/PACK.md— activation condition, skills registered, which core sections it adds rows/sections to (never forks them)stacks/<name>/skills/<skill>/SKILL.md— the actual authoring protocol(s)- Register the pack in
MANIFEST.jsonunderstacks.available
Keep stack-specific content out of core/ — if a core skill needs a tool-specific example, point to the stack pack instead of naming the tool inline (see patterns/pattern-agents-rule-authoring.md → Universal Scope test).
Read runtimes/CONTRACT.md in full before writing one — in particular, never fabricate a hook mechanism you have not verified against that harness's actual current documentation or behavior. A runtime pack that honestly documents "no interception capability" is a complete, valid pack — it is not a placeholder waiting to be filled in. Build one only when a real session on that harness needs it (same evidence bar as stack packs), not speculatively.
Project-specific decisions, incident postmortems, bugfix records, and architecture constraints (e.g. a specific data pipeline's PII-handling boundary) stay in the originating project's own .github/engram/ — they are facts about that project, not universal rules. Only the meta-governance patterns for how to write and evolve rules (patterns/) are universal and migrated here.