claude-governance / plugin
CLAUDE.md4 starsChanged 6 months agoMITView on GitHub
claude-governance is a Claude Code and Codex plugin that provides governance skills for AI-assisted development. It has no build system — it consists of declarative config files, Markdown skills, Claude Code shell-based hooks, and example templates. Install: claude plugin marketplace add pitimon/claude-governance Codex install: codex plugin marketplace add pitimon/claude-governance && codex plugin add claude-governance@pitimon-claude-governance Every task is classified by AI autonomy level: Four-stage automated checks (defined in examples/rules/governance.md): Five-phase workflow defined in skills/spec-driven-dev/SKILL.md: Understand → Specify (write spec.md) → Plan…
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- plugin/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- create-adrSkill
- eu-ai-act-checkSkill
- governance-checkSkill
- governance-setupSkill
- iso-42001-checkSkill
- spec-driven-devSkill
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 55
Every task is classified by AI autonomy level:
- Distinctive: line 66
Pre-commit: No secrets, input validated, files <800 lines, functions <50 lines
- Very specific: line 84
Place Markdown templates in examples/.
- Very specific: line 95
Run bash tests/validate-plugin.sh --skip-install-check to verify plugin structure integrity.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
claude-governance is a Claude Code and Codex plugin that provides governance skills for AI-assisted development. It has no build system — it consists of declarative config files, Markdown skills, Claude Code shell-based hooks, and example templates.
Install: claude plugin marketplace add pitimon/claude-governance
Codex install: codex plugin marketplace add pitimon/claude-governance && codex plugin add claude-governance@pitimon-claude-governance
Repository Structure
.claude-plugin/
plugin.json # Plugin metadata (name, version, author, skills, keywords)
marketplace.json # Marketplace listing schema
.codex-plugin/
plugin.json # Codex plugin metadata (skills only; hooks are Claude Code-specific)
.agents/plugins/
marketplace.json # Codex marketplace listing schema
plugin -> . # Codex marketplace child source path
hooks/
hooks.json # Hook registrations (SessionStart, PreToolUse)
session-start.sh # Governance context injection (~300 tokens per session)
secret-scanner.sh # Blocks file writes containing hardcoded secrets
session-start.ps1 # PowerShell port of session-start.sh (native Windows, no Git Bash)
secret-scanner.ps1 # PowerShell port of secret-scanner.sh (parity-tested on Windows CI)
skills/
spec-driven-dev/SKILL.md # /spec-driven-dev — spec-first development workflow
governance-check/SKILL.md # /governance-check — fitness function runner
create-adr/SKILL.md # /create-adr — ADR generator
governance-setup/SKILL.md # /governance-setup — project initialization wizard
eu-ai-act-check/SKILL.md # /eu-ai-act-check — EU AI Act Arts 9-15 readiness checklist
iso-42001-check/SKILL.md # /iso-42001-check — ISO/IEC 42001:2023 AIMS readiness checklist
agents/
governance-reviewer.md # Compliance review agent (auto-triggered)
examples/
rules/ # 5 rules for ~/.claude/rules/ (governance, coding-style, git-workflow, testing, security)
DOMAIN.md.example # Template for project domain models
adr-template.md # ADR template with governance loop field
project-claude-md.example # Example CLAUDE.md with governance sections
scripts/
install-rules.sh # Installs rules to ~/.claude/rules/ with backup
tests/
validate-plugin.sh # Structural integrity validation (100+ checks)
.github/workflows/
validate.yml # CI/CD — runs validate-plugin.sh on push/PRKey Concepts
Three Loops Decision Model
Every task is classified by AI autonomy level:
- Out-of-Loop: AI executes autonomously (formatting, lint fixes)
- On-the-Loop: AI proposes, human approves (features, API changes)
- In-the-Loop: Human drives, AI assists (architecture, security, breaking changes)
Governance Fitness Functions
Four-stage automated checks (defined in examples/rules/governance.md):
- Pre-implementation: Spec exists, domain impact assessed, autonomy classified
- Pre-commit: No secrets, input validated, files <800 lines, functions <50 lines
- Pre-PR: Conventional commits, 80%+ test coverage, DOMAIN.md current
- Architecture: Service boundaries, rate limiting, auth on endpoints
Spec-Driven Development (/spec-driven-dev)
Five-phase workflow defined in skills/spec-driven-dev/SKILL.md:
Understand → Specify (write spec.md) → Plan → Implement → Verify
How to Add a New Skill
- Create
skills/<skill-name>/SKILL.md - Include YAML frontmatter with
name,description,user-invocable: true, andallowed-tools - The
descriptionfield controls when the skill is auto-invoked — write it as trigger conditions - Skill body is Markdown that Claude follows as instructions when the skill is invoked
How to Add a New Example Template
Place Markdown templates in examples/. Update the README.md file structure section to document the new file.
Plugin Config
.claude-plugin/plugin.json: Must havename,version,description,author,repository,license,skills,keywords.claude-plugin/marketplace.json: Followshttps://anthropic.com/claude-code/marketplace.schema.json— lists plugins withsourcepointing to the plugin root.codex-plugin/plugin.json: Codex manifest. Keepskills: "./skills/"; do not add Claude Codehookshere..agents/plugins/marketplace.json: Codex marketplace. Keep marketplace namepitimon-claude-governanceand plugin source path./plugin.
Validation
Run bash tests/validate-plugin.sh --skip-install-check to verify plugin structure integrity. The script checks JSON validity, cross-file naming consistency, Claude and Codex manifests, file integrity, hooks, examples, agents, compliance references, and keyword coverage.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

