{
  "markdown": "# genesis-governance\n\nA governance framework genesis protocol for [Claude Code](https://claude.ai/code) projects.\n\nRun `/genesis-governance` once on a new project. Walk out with a constitution, CLAUDE.md, governance.config.yaml, document registry, CI pipeline, and a passing first audit — all derived from your actual project context.\n\n---\n\n## What it produces\n\n| Artifact | What it is |\n|----------|-----------|\n| `docs/core/spec.[project].core.constitution.md` | Project principles, system invariants, architecture rules |\n| `governance.config.yaml` | Parameterizes automated checks: packages, thresholds, risk flags |\n| `CLAUDE.md` | AI operating instructions — how Claude Code should behave in this repo |\n| `docs/_registry/document-registry.md` | Inventory of all governed artifacts |\n| `.github/workflows/ci.yml` | CI pipeline derived from your governance profile |\n| `docs/governance/governance-audit-[date].md` | Result of the first governance audit |\n\nEverything is derived from your answers in the intake — not from a generic template.\n\n---\n\n## Prerequisites\n\n- [Claude Code](https://claude.ai/code) installed and running\n- A project directory with `git init` done\n- A `CLAUDE.md` file (can be empty, or copy `bootstrap.CLAUDE.md` as a starting point)\n\n---\n\n## Installation\n\n### Via Claude Code plugin (recommended)\n\nRequires Claude Code v2.1 or later.\n\n```\n/plugin install genesis-governance\n```\n\nThe plugin installs both `/genesis-governance` and `/genesis-sync`, plus the\n`bootstrap.CLAUDE.md` template as an asset. No further setup required.\n\nIf your project doesn't have a `CLAUDE.md` yet, copy the bootstrap template\nafter install:\n\n```bash\ncp ~/.claude/plugins/*/genesis-governance*/skills/genesis-governance/assets/bootstrap.CLAUDE.md CLAUDE.md\n```\n\n### Manual install (legacy, pre-v3.0.0)\n\nOlder Claude Code versions can still clone this repo and copy the skills\ndirectly into `.claude/skills/` — see the v2.1.0 branch for that layout.\nNew users should prefer the plugin flow above.\n\n---\n\n## Usage\n\nOpen Claude Code in your project directory and run:\n\n```\n/genesis-governance\n```\n\nThe protocol runs in two sessions:\n\n**Session 1 (~45-75 min):** Intake (5 layers) → Constitution → governance.config.yaml → CLAUDE.md → Document registry\n\n**Session 2 (~45-60 min):** CI pipeline → First governance audit\n\nYou can stop after Session 1 and continue later — the checkpoint system resumes from where you left off.\n\n### Resuming an interrupted session\n\nIf a session was interrupted:\n\n```\n/genesis-governance\n```\n\nSame command. The skill automatically reads `docs/intake/genesis-checkpoint.json` and resumes from the last completed phase.\n\n### Quick mode\n\nFor prototypes or short-lived projects, answer \"quick\" when the skill asks. Produces a minimal CLAUDE.md and governance.config.yaml in ~15 minutes. The generated CLAUDE.md includes a 30-day expiry reminder to complete governance later.\n\n### Drift detection (post-genesis)\n\nAfter the initial genesis run, use `/genesis-sync` to detect divergence between the baseline recorded in `docs/intake/genesis-checkpoint.json` and the current project state:\n\n```\n/genesis-sync\n```\n\nChecks 8 dimensions: package drift, Dockerfile parity, env var drift, agent drift, constitution path, registry integrity, MUST NOT invariants in code, and checkpoint schema version. Reports findings by severity (HIGH/MEDIUM/LOW) and offers auto-fixes. Analogous to `terraform plan` — shows what changed since genesis.\n\n---\n\n## How it works\n\nThe protocol collects business context through 5 intake layers before writing a single file:\n\n| Layer | What it collects |\n|-------|-----------------|\n| L1 | Business problem, sector, model, actors, scope |\n| L2 | Actor profiles, critical path |\n| L3 | System capabilities, structural flags (multitenancy, RBAC, AI outputs, etc.) |\n| L4 | Risk profile across 8 dimensions — requires naming primary risk in your own words |\n| L5 | Technical stack, constraints, external dependencies |\n\nEverything written in Phases 2-7 is derived from this intake. The constitution's invariants come from L4 risks. The governance.config.yaml activates checks based on L3 flags. The CI pipeline derives from the config. No generic boilerplate.\n\n### Safeguards and flow control\n\n- **CRITICAL RULES** — 7 always-on rules enforced throughout (checkpoint-first, brownfield precedence, never-overwrite-without-backup, write-before-announce, Handler 11 resume allowlist, batch gate, MANDATORY READ GATE at phase transitions).\n- **Brownfield detection** — invoking on a repo with existing governance artifacts auto-activates brownfield mode with impact announcement, backups before overwrites, and APPEND vs REPLACE options for existing CI.\n- **Backtrack Protocol** — correct confirmed info at any time (Sub-case A during intake; Sub-case B once phases wrote docs, with option to regenerate only affected sections).\n- **Handler system** — 11 handlers cover deviations: vague answers, rejected derivations, phase skips, conflicts, resume with lost checkpoint, help/manual/overview navigation.\n- **Active state recap** — compact working-memory block after each phase so long sessions (20+ turns) stay anchored to earlier decisions.\n- **Emergency exit** — hard gate that stops the session (not a warning) if the project isn't ready for formal governance, writing `[project].incomplete.md` with what to resolve first.\n\nSee the [user manual](docs/guides/runbook.genesis-governance.user-manual.md) for the full flow.\n\n---\n\n## Self-test\n\nVerify the skill is correctly installed:\n\n```bash\nnpm install      # or pnpm install / yarn\nnpm test         # runs scripts/test-genesis-governance.ts\n```\n\nExpected: `328/328 passed — All invariants PASS ✅`\n\nAlso run the integration smoke test:\n\n```bash\nnpx tsx scripts/smoke-test-genesis.ts\n```\n\nExpected: `9/9 passed — All smoke tests PASS ✅`\n\n---\n\n## Compatibility\n\n**Claude Code:** full support (native).\n\n**Other tools (Cursor, Windsurf, Copilot):** partial or none. See [docs/compatibility.md](docs/compatibility.md).\n\n---\n\n## License\n\nMIT\n",
  "bytes": 6029,
  "sha": "cae33bc38cdcb70a38e23372448b2603df271ee4374bbd3f4e5f9bc6fcba164d",
  "repo_slug": "siliconbrokers/genesis-governance-claude",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_siliconbrokers_genesis_governance_claude_f74e3729/readme"
}