- Home
- Skills
- Agents & Orchestration
- repository-governance
Works with the AI Agents you already use
Repository Governance
Installs a strict, repo-agnostic rulebook for AI coding agents into any repository.
$15
repository-governance
Example session with this skill installed
Set up agent governance in ~/Code_Projects/invoice-cli — I want an AGENTS.md and rules that every coding agent follows. The license is MIT. Don't commit anything.
- Read your context and instructions
- Compiled the repository-governance
Governance is installed in ~/Code_Projects/invoice-cli, the profile is filled from the repository, and the check passes. Nothing was committed and no existing file was overwritten.
Install plan (dry run) and result
Installed into /home/dill/Code_Projects/invoice-cli
governance version 1.0.0
created .agent_tools/00_master_directives.md
created .agent_tools/01_style_guide.md
created .agent_tools/02_architecture.md
created .agent_tools/03_testing_rules.md
created .agent_tools/04_doc_updater.md
created .agent_tools/05_session_log.md
created .agent_tools/06_project_profile.md
created .agent_tools/07_project_memory.md
created AGENTS.md
created CHANGELOG.md
created CLAUDE.md
Profile values read from the repository (pyproject.toml, .github/workflows/ci.yml, LICENSE)
| Field | Value | Source |
|---|---|---|
| License | MIT | LICENSE, pyproject.toml |
| Lint / Format | ruff check . / ruff format --check . | CI workflow |
| Type check | mypy src (strict) | [tool.mypy], CI |
| Tests | pytest | [tool.pytest.ini_options], CI |
| Build | none | no build step in CI |
| Versioning | Semantic Versioning | tag v0.3.1 matches version = "0.3.1" |
| Session log / Changelog | file / file | single-branch repo, default modes |
| Tree | README.md, heading "Repository Structure", depth:2 | added below the Usage section |
| Agents may commit | no | your instruction |
Set from your answers or left for you: invariant "Ledger totals: ledger.total() sums the amount column as floats and never rounds"; layer boundary src/invoice_cli/ holds library and CLI code, no test code; decision records in docs/decisions/.
Repository tree written to README.md
.
├── .agent_tools/
│ ├── 00_master_directives.md
│ ├── 01_style_guide.md
│ ├── 02_architecture.md
│ ├── 03_testing_rules.md
│ ├── 04_doc_updater.md
│ ├── 05_session_log.md
│ ├── 06_project_profile.md
│ └── 07_project_memory.md
├── .github/
│ └── workflows/ (1 file)
├── src/
│ └── invoice_cli/ (4 files)
├── tests/
│ └── test_ledger.py
├── .gitignore
├── AGENTS.md
├── CHANGELOG.md
├── CLAUDE.md
├── LICENSE
├── README.md
└── pyproject.toml
Governance check
ok all governance files present
ok no unfilled placeholders
ok profile fields valid
ok session log valid (1 entries, mode file)
ok changelog has an Unreleased section (CHANGELOG.md)
ok project memory within cap (22/100 lines)
ok tree current in README.md
warn decision records folder docs/decisions/ does not exist yet (created with the first record)
result: ok
Quality checks from the profile, run as the rules require
| Check | Result |
|---|---|
ruff check . | passed |
ruff format --check . | failed, pre-existing: tests/test_ledger.py would be reformatted |
mypy src | passed, 4 source files |
pytest | passed, 1 test |
The format failure predates this task and was not touched; it is noted for you rather than masked.
Session log entry appended
- [2026-10-26] AGENTS.md, CLAUDE.md, CHANGELOG.md, .agent_tools/, README.md: installed repository-governance 1.0.0, filled profile from pyproject.toml and CI, added README tree
Next steps
- Review
.agent_tools/06_project_profile.md, especially the invariant and the layer boundary, which came from you rather than from files. - Run
ruff format tests/test_ledger.pyif you want the format check green before the first governed commit. - Commit when you are ready;
git statusshows the new files and the README change. Suggested message:docs: add agent governance (repository-governance 1.0.0). - Optional: add
check.pyandtree.py --checkto CI so the rules are enforced, not just documented.
Connects securely to your tools. The creator never sees your data.
About this skill
Most "agent rules" files are written once for one project and rot. This skill separates the two things that get mixed up in them: the rules, which are the same for every repository, and the facts, which are not.
What gets installed
AGENTS.md— the entry point every agent reads first. It routes to the rule files, states the repository-mapping rule, caps how much history an agent may read, and requires one log entry per finished task.CLAUDE.md— three@imports so Claude Code loadsAGENTS.md, the profile and the memory. Skipped with--no-claude-md..agent_tools/00–05— master directives, style guide, architecture boundaries, testing rules (lint → format → type → tests → build, all mandatory where the repo has them), documentation updater, session log..agent_tools/06_project_profile.md— the only file with repo-specific values: languages, quality-check commands, layer boundaries, invariants, license, environment variables, and the modes below..agent_tools/07_project_memory.md— gotchas, decisions in force and non-obvious facts, hard-capped at 100 lines so it is read in full every session.CHANGELOG.md— Keep a Changelog skeleton.
Modes the profile chooses, so the layer scales from a weekend script to a monorepo
| Field | Options |
|---|---|
| Session log | file (one line per task), fragments (one file per task, no merge conflicts), git (the commit is the record), none |
| Changelog | file (bullets under Unreleased) or fragments (changelog.d/, compiled at release) |
| Tree | kept in README.md, in a dedicated file, or none (agents map with git ls-files) |
| Decision records | a folder of numbered ADR-style files, or none |
Bundled scripts (Python 3 standard library, no dependencies)
install.py <repo> [--dry-run] [--license ID] [--versioning TEXT] [--no-claude-md]— creates what is missing, appends a marked routing block to an existingAGENTS.md/CLAUDE.md, never overwrites, idempotent.check.py <repo>— one line per check (files, placeholders, profile values, log and changelog shape, memory cap, tree freshness), exit 1 on failure. Drop it into CI or pre-commit.tree.py <repo> [--check | --write]— deterministic repository tree at the detail level the profile sets;--checkfor CI.release.py <repo> <version> [--dry-run] [--archive-log]— moves Unreleased and changelog fragments under a dated version heading; archives old log fragments monthly.
How the agent uses it
Confirm the target, read the LICENSE, preview with --dry-run, install, fill the profile from pyproject.toml / package.json / Cargo.toml / CI workflows, build the tree, run check.py until it prints result: ok, run the repo's own quality checks, write the first log line. The owner is asked only for what files cannot tell: invariants, layer boundaries, whether agents may commit.
Built from a governance layer that ran a production FastAPI project for 300+ commits, then generalised so nothing project-specific remains in the rules.
- A skill cannot enforce anything. The rules are text. Enforcement needs
check.pyandtree.py --checkwired into CI or a pre-commit hook by the owner. The skill offers this; it does not configure it. - The installer refuses to merge into an existing
.agent_tools/setup. If a repo already routesAGENTS.mdto.agent_tools/, the installer keeps that file untouched and prints the two routing lines to add by hand. - The profile is filled by an agent and must be reviewed. Commands are read from config files, but invariants and boundaries come from the owner's answers.
- Existing long log entries are not rewritten. The 200-character cap is enforced only on the newest entry; older ones produce a warning, because the log is append-only by rule.
release.pydeletes compiled changelog fragments by default (as towncrier does). Git keeps their history;--keep-fragmentsand--dry-runexist.- Agents without this skill follow rules 04 and 05 by hand. The process is written out in words, but a hand-built tree has to match
tree.py's output exactly or the check fails. - Claude Code's native
AGENTS.mdreading is version-dependent, so aCLAUDE.mdis created by default. Use--no-claude-mdif you know your version readsAGENTS.md. - No automatic triggers. Nothing runs at session start unless the owner adds a hook; the memory file is loaded through
CLAUDE.mdimports instead. - Tested on one operating system and one Python version; see the compatibility note.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 21 days ago
Requires
Permissions
File Scopes