Covener
Spec-driven development for AI agent teams.
Governance for regulated domains and large projects: traceable, auditable, human-approved.
pip install covener && covener init
Covener is a repository layout, a deterministic checker and a set of agent definitions that turn
Claude Code, Cursor or any tool that reads AGENTS.md into a development team you can govern.
- Specifications, bugs and tasks are files with a status. What the product is, where it deviates, and what has to be done never mix and never grow.
- Sprints hold the work: one work log per item with a checklist, the agents' summaries, decisions and reviews, and your feedback. Closed sprints are archived; nothing is stored twice.
- Built for teams, reviewed at agent speed. Every developer runs their own sprint with their own agents, in parallel, without colliding. Nobody reads thousands of generated lines: you review the work log and the reviewer's findings, and open the diff only where they point.
- Approval is a rule in a file. An item is
doneonly when a human wroteApproved: Yesin its work log.covener status --strictfails CI when that rule, or any consistency rule, is broken. - Knowledge is evidence. Regulations, contracts and procedures in
knowledge/become a page-anchored corpus with a citation graph and an optional semantic graph; agents citefile#page-N, reviewers verify, andstatusflags dangling references. - Nothing runs a server, calls a model or needs the package once initialised. Two commands for the method, one for knowledge, one to expose both as MCP tools.
Why Covener
Spec-driven development tools stop at the spec. spec-kit generates a pile of Markdown per feature and numbers features so that two developers branching on the same day collide. Kiro writes requirements, design and tasks, then treats them as launch documents that drift as soon as code changes. BMAD answers the problem with a dozen personas and the process overhead that comes with them. OpenSpec tracks changes well, but a spec is still just text an agent can declare done. None of them keeps the decisions made while building, none makes human approval something a machine can verify, and none can tell you which article of which regulation a requirement comes from.
Covener does all three. Every decision, review and human comment is written next to the item it
belongs to, so a new session starts from the record instead of from zero. An item is done only
when a person wrote Approved: Yes, and covener status --strict fails CI otherwise, which makes
the approval something an auditor can rely on rather than a line in a prompt. Requirements that
come from regulations cite their evidence page by page, backed by a citation graph built without a
model, so nothing about a law can be hallucinated.
And it scales to a team. When every developer drives agents that write more code in a day than a person can read in a week, the pull request stops being a review tool. Covener moves the review to where the meaning is: a work log that says what was built, what was decided, what QA proved and what the independent reviewer flagged, next to the requirement it serves. A lead reviews a whole sprint in minutes and spends their attention on the three lines that matter. All of it with two files per item, five roles with hard boundaries, and a layout you can explain in a minute.
How it works
cd my-project
covener init # links the agents into Claude Code and Cursor; never overwrites your files
Then talk to the team in your IDE. Take a bank:
Customers must be able to close their account and have their personal data erased.
A naive agent deletes the customer. That breaks the law: GDPR grants the right to erasure, but EU anti-money-laundering rules require the bank to keep identity and transaction records for five years after the relationship ends, and GDPR itself exempts data kept to meet a legal obligation. This is the kind of requirement Covener is built for.
| Step | Role | What happens in the repository |
|---|---|---|
| 1 | product | Asks the Knowledge Oracle, finds both obligations and the exemption, and drafts specs/account-closure.md: erase marketing, profiling and app data at once; keep KYC and transaction records for five years with restricted access, then erase them. Every criterion cites its article in references:. You set status: approved. |
| 2 | planner | Opens sprints/account-closure/ with the spec (open bugs first) and writes the checklist in the work log. |
| 3 | engineer, qa, reviewer | Implement, test each criterion, and review architecture, security and compliance: the reviewer opens every cited page and checks the code against its wording. |
| 4 | planner | Sets the sprint to review and tells you what to evaluate. |
| 5 | you | Approved: No with what to change, or Approved: Yes. |
| 6 | planner | Reworks until you approve, marks the spec done, archives the sprint. Six months later an auditor asks why a closed customer's passport scan still exists: the spec, the citations, the review and your approval are all in the repository. |
covener status # backlog, sprints, inconsistencies, what to do next
Repository layout
specs/vision.md product intent
specs/<id>.md what the product is: one living file per spec (draft -> approved -> done)
bugs/<id>.md what is wrong (open -> done)
tasks/<id>.md work that changes neither: migrations, refactors, upgrades (open -> done)
sprints/<name>/sprint.md owner, status, specs, bugs and tasks in scope (active -> review -> closed)
sprints/<name>/<kind>s/<id>.md the item's work log: checklist, summary, decisions, QA, review, feedback
sprints/archive/YYYY-MM-DD-<name>/ closed sprints
knowledge/ optional: domain documents, their Markdown, INDEX.md, CITATIONS.md
agents/<name>.md one file per agent; .claude/agents and .cursor/agents link here
AGENTS.md a small block every coding agent reads (CLAUDE.md imports it)
.covener/config.yaml role to agent mapping and tools; nothing else
Domain folders are fine: specs/privacy/account-closure.md has the id privacy/account-closure.
Which folder? If in a year someone must read it to know what the product is, it is a spec. If
it describes something that is wrong today, it is a bug. If they only need to know it was done, it
is a task. Specs are living documents: to extend, change or remove a requirement, edit the spec, it
goes back to draft, approve it again, and a sprint carries the change. Its history is the sprints
that touched it.
No backlog file. The backlog is every open bug, approved spec and open task that is not in an
open sprint: bugs first, then everything by two optional front matter fields, priority and epic.
Reprioritising is a one-line change in one file, so a team never fights over a list.
The work log
sprints/<name>/specs/<id>.md (or bugs/<id>.md, tasks/<id>.md) is a chronological log. Agents
add entries; you add one.
# account-closure
## Checklist
- [x] closure request endpoint with strong customer authentication
- [x] immediate erasure of marketing, profiling and app data
- [x] KYC and transaction records moved to restricted retention with a five-year expiry
- [x] scheduled erasure job at retention expiry
- [x] erasure notice to processors (GDPR Art. 19)
- [ ] customer-facing explanation of what is retained and why
## Summary
Closure flow in accounts/closure.py; retention store in compliance/retention.py; nightly expiry job.
14 tests in tests/test_closure.py, one per acceptance criterion.
## Decisions
- 2026-09-14 Retention clock starts at the closure date, not the last transaction (AMLD Art. 40(1)).
- 2026-09-14 Retained records are readable only by the compliance role; every read is audited.
## QA
Verdict: pass
- AC1 test_marketing_data_erased_immediately, AC2 test_kyc_retained_five_years,
AC3 test_retained_records_erased_at_expiry, AC4 test_processors_notified.
## Review
Verdict: pass with notes
- high: compliance/retention.py:88 lets the support role read retained records; restrict to compliance.
- Compliance: criteria match knowledge/gdpr.md#page-43 and knowledge/amld.md#page-31.
## Feedback
Approved: No
Restrict retained records as the review says, and show customers what is kept and until when.
## Rework
Support role removed from retention access; retention summary added to the closure confirmation.
## Feedback
Approved: Yes
The last entry is the state: awaiting feedback, changes requested or approved (the checklist does
not count). covener status derives everything from this file.
covener status
Covener
Product
Vision: OK
Specs
Total: 4
Draft: 1
Approved: 2
Done: 1
Bugs
Total: 2
Open: 2
Done: 0
Tasks
Total: 1
Open: 1
Done: 0
Backlog
Items: 3
[bugs]
- erasure-skips-backups (priority 1)
[aml]
- task kyc-archive-eu-region (priority 1)
[privacy]
- spec consent-management (priority 2)
Sprints
account-closure (review, ana): approved 1/2
- spec account-closure: awaiting feedback, checklist 5/6
- bug consent-default-on: approved, checklist 2/2
Done
- spec audit-trail (2026-09-01-audit-trail 2026-09-01)
Governance
Pending human review: 1
Pending spec approval: 1
Errors: 0
Warnings: 0
Next
* Review and approve specs/transaction-monitoring.md (draft)
* Give feedback on spec account-closure in sprints/account-closure/specs/account-closure.md
--json for machines, --verbose for warnings, --strict to fail CI on errors. No model is
involved; it only reads files.
Errors are the rules that protect your authority and the repository's consistency: an item done
without your Approved: Yes; a sprint closed with unapproved work; an item in two open sprints; a
draft spec, a done item or an unknown id in an open sprint; an open sprint in the archive; invalid
statuses or unparsable files; a missing vision; a configured agent without a definition. Closed
sprints are history: only the approval rule applies to them, so a spec that later changes never
breaks CI. A second open sprint for the same owner is a warning, not an error: that is what a
hotfix looks like.
Teams and review
Agents write code faster than people can read it. A sprint of three developers with agents easily produces tens of thousands of changed lines; reviewing that line by line is theatre. Covener makes the unit of review the work, not the diff.
What a reviewer reads. For each item in a sprint, one file: the checklist (what was done), the summary (where), the decisions (why), the QA entry (which test proves which acceptance criterion), and the reviewer agent's findings ordered by severity with file and line. Critical and high findings are where you open the code. Everything else you approve from the record, and your approval is in the same file, dated, for anyone who asks later.
What a lead sees. covener status across the repository: every open sprint, its owner, each
item's state and checklist progress, what is waiting for a human, and what is inconsistent. It is
the stand-up, generated from the files.
How a team works in parallel.
- One sprint, one owner, one branch, one pull request. Git isolates parallel work; Covener makes the rules checkable.
- Name sprints by what they deliver (
account-closure), never by number: sequential numbers collide the moment two people branch. - The owner is a field in
sprint.md. One open sprint per owner is the norm; an item is in at most one open sprint.covener statusflags both after a merge. - Specs, bugs and tasks are one file each, so two people rarely touch the same one. There is no shared backlog file to fight over.
- History is the archive of closed sprints plus
status: donein the item. Archive after the pull request merges. Everything is committed.
The reviewer in CI. The same reviewer agent that works in the IDE can review a pull request headlessly and publish its findings, so the human reviewer starts from a severity-ordered summary instead of a diff:
# .github/workflows/review.yml (excerpt)
- run: pip install covener && covener status --strict
- run: npm install -g @anthropic-ai/claude-code
- env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
claude -p --agent reviewer --output-format text \
--allowedTools "Read" "Bash(git diff *)" "Bash(git log *)" \
"Review this pull request against the work logs of the sprint it closes. \
Report findings by severity with file and line, and compliance against cited references." \
>> "$GITHUB_STEP_SUMMARY"
Bugs, tasks and hotfixes
A bug is a deviation from the product. A fix is the change that corrects it. A hotfix is a fix that cannot wait. A task is work that leaves no requirement behind. The words stay apart; the flow stays the same.
| Situation | Flow |
|---|---|
| Trivial fix (one place, no design decision) | "Fix this." The engineer fixes it with a test and tells you. No file, no sprint. |
| Bug worth tracking | "This is the problem." Product registers bugs/<id>.md (symptom, reproduction, cause if known, expected behaviour), open from the start: a bug is reported, not approved. It waits at the top of the backlog for the next sprint; an active sprint's scope does not change. |
| Hotfix | Same, but the planner opens a one-bug sprint now (sprints/hotfix-<slug>/) and the cycle runs in an hour: regression test, fix, QA, review, your Approved: Yes, archive. |
| Technical work | "Move the KYC archive to an EU region." The planner registers tasks/<id>.md (goal, why, scope, done-when, risk and rollback), open from the start. Same cycle; QA verifies the done-when and that no spec regressed. If the work leaves a durable requirement ("customer data never leaves the EU"), it is a spec instead. |
Bugs and tasks never touch a spec. If a bug reveals the spec was wrong, or a task changes what the product promises, that is a separate change to the spec.
Project Knowledge
Regulated products depend on documents nobody reads twice: laws, contracts, procedures, internal standards. Covener makes them a first-class input with evidence, so an agent never writes "the regulation says" from memory.
pip install "covener[oracle]" # "covener[knowledge]" for the deterministic layer only
cp ~/regulations/*.pdf knowledge/
covener knowledge build # incremental: only new or changed documents are processed
Deterministic layer, no model, no network. Every source becomes Markdown with ## Page N
headings next to it; knowledge/INDEX.md lists the corpus; knowledge/CITATIONS.md is the graph of
explicit cross-references between documents, resolved to the documents in the corpus. Patterns cover
EU regulations and directives and Spanish-language public law today; adding a jurisdiction is one
regular expression. Nothing in this layer can be hallucinated.
Knowledge Oracle, optional. A graph of entities and relationships plus vector retrieval over the
same Markdown, built with a frontier model and stored as local files (LightRAG: NetworkX graph,
nano-vectordb, no server). One tool, search_knowledge, returns answer, relations and evidence with
knowledge/<file>.md#page-N references. Without evidence it says so instead of guessing.
covener knowledge ask "A customer closes their account and asks us to delete everything. What must we erase and what must we keep?"
Erase personal data without undue delay once it is no longer necessary [gdpr.md#page-43], except
data you must keep to comply with a legal obligation [gdpr.md#page-44]. Customer due diligence
documents and transaction records must be retained for five years after the end of the business
relationship [amld.md#page-31] and deleted afterwards [amld.md#page-31]. Recipients of the data
must be told about the erasure [gdpr.md#page-45].
Evidence
- knowledge/gdpr.md#page-43: Article 17(1) ... the controller shall have the obligation to erase ...
- knowledge/gdpr.md#page-44: Article 17(3)(b) ... for compliance with a legal obligation ...
- knowledge/amld.md#page-31: Article 40 ... for a period of five years after the end of the business relationship ...
- knowledge/gdpr.md#page-45: Article 19 ... communicate any rectification or erasure ...
Relations
- data-retention-policy -> gdpr (citation)
- data-retention-policy -> amld (citation)
- personal data -> customer due diligence (graph)
How the team uses it. Product asks the Oracle before drafting a governed spec and cites the
evidence in references:. Engineer reads the cited pages before implementing. Reviewer opens every
citation, checks the implementation against the wording, and asks the Oracle whether an uncited
document contradicts the spec: a contradiction is a fail. covener status warns when a reference
points to a file that does not exist.
# specs/account-closure.md
references: [knowledge/gdpr.md#page-43, knowledge/gdpr.md#page-44, knowledge/amld.md#page-31]
Models: claude-sonnet-5 for extraction and answers, voyage-4-large for retrieval, both
multilingual; the Oracle answers in the language of the question. Override with COVENER_LLM_MODEL
and COVENER_EMBED_MODEL (voyage-law-2 is tuned for legal text). Keys (ANTHROPIC_API_KEY,
VOYAGE_API_KEY) live in the environment, never in the repository. Indexing costs cents to a few
dollars per hundred documents. The graph lives in .covener/knowledge/ (ignored by git,
rebuildable); the Markdown and both index files are committed and reviewable.
Tools: CLI and MCP
The same implementation has two doors: the CLI for people and CI, and a local MCP server for the
model. AGENTS.md tells the agents when to use which.
| Level | For | Registered in | Covener |
|---|---|---|---|
| CLI | people, CI | installed | covener init, status, knowledge build, knowledge ask, serve |
| Instructions | the model, at session start | AGENTS.md, agents/*.md |
when to use each tool or command |
| MCP tools | the model, any time | .mcp.json, .cursor/mcp.json, written by init |
status, search_knowledge, list_knowledge_sources |
| Chat commands | you, as shortcuts | .claude/commands, .cursor/commands |
roadmap |
pip install "covener[mcp]" # included in covener[oracle]
covener init # registers the server; re-run after installing the extra
Claude Code reads .mcp.json (project scope, committed) and asks you to accept the server once.
Cursor reads .cursor/mcp.json; enable it under Settings, MCP. Codex, Windsurf and others: point
their MCP config at covener serve (stdio). The server exposes nothing that changes the repository.
The agents
Five roles with explicit boundaries, one Markdown file each in agents/, in the front matter
format Claude Code and Cursor read natively. init links .claude/agents and .cursor/agents to
that folder, so there is exactly one copy of each agent and editing it is editing the file.
| Role | Owns | Never |
|---|---|---|
| product | vision, impact analysis, specs, bug intake, evidence in references: |
code, approving its own specs |
| planner | tasks, sprint scope, briefs, feedback requests, closing and archiving | code, writing ## Feedback, marking done without approval |
| engineer | implementation, fixes (regression test first), tasks, infrastructure | editing specs, expanding scope |
| qa | tests from acceptance criteria, acceptance verification, regressions | changing application code |
| reviewer | architecture, security, quality, compliance against citations; also on pull requests | editing anything |
The prompts follow current Anthropic and OpenAI guidance for frontier coding models: clear objective,
just-in-time reads, explicit outputs, explicit human gates, no permission-seeking for work already
requested. The model is a property of the agent (model: claude-sonnet-5 or inherit); defaults are
a fast model for QA, a balanced one for the engineer, a strong one for the rest.
Extending the team. Roles are the contract; agents are files. Rename or disable a role in
.covener/config.yaml; add an agent by adding a file (a frontend-engineer.md next to
engineer.md is visible to every tool through the links). For stack-specific know-how, prefer
skills over more roles: Claude Code and Cursor load a skill only when the task needs it, so one
engineer with frontend, backend and infra skills stays cheaper and more consistent than three
engineers with three prompts. Keep agents/ for boundaries and skills/ for expertise.
# .covener/config.yaml
agents:
reviewer: security-reviewer # agents/security-reviewer.md
qa: off
tools: [claude, cursor]
Install
pip install covener # or: uv tool install covener / pipx install covener
covener init # --tools claude,cursor --dry-run --install-agents
covener status # --json --verbose --strict
covener knowledge build # --no-graph --dry-run (covener[knowledge] or [oracle])
covener knowledge ask "..." # --json
covener serve # MCP over stdio (covener[mcp])
Python 3.10+. One runtime dependency (PyYAML). No network. -C <dir> works on every command.
Existing files are safe. An existing AGENTS.md keeps its content and gets the Covener block
between <!-- covener:start --> and <!-- covener:end -->; an existing CLAUDE.md gets an
@AGENTS.md import; existing .claude/agents/ or .cursor/agents/ directories keep their files
and get per-agent links; a legacy .cursorrules is reported.
Windows. Links become directory junctions when symlinks are not permitted. Clone with
git config core.symlinks true, or run covener init after cloning to repair the links.
CI.
- run: pip install covener && covener status --strict
What Covener does not do
No project-management UI. No orchestration engine. No MCP requirement. No autonomous deployment. No user stories, requirement layers or profiles. Updating the package never touches your files. The repository works without the package installed.
FAQ
Do I need MCP, hooks or a server? No. The repository provides the context. covener serve is
optional and runs locally over stdio, for IDEs that prefer tools to shell commands.
Can I use my own agents or skills? Yes. Drop a file in agents/; it is visible to every tool
through the links. Rename or disable roles in .covener/config.yaml. Put stack-specific expertise
in skills rather than in more roles.
What if I uninstall the package? Everything keeps working. The method is in the files;
covener status is only a checker.
Does it work with Codex, Copilot or Windsurf? They read AGENTS.md, so the instructions and
the layout work. Agent files are linked for Claude Code and Cursor today; other adapters are a few
lines each.
Why not just a good CLAUDE.md? A CLAUDE.md tells an agent how to behave. It does not keep decisions between sessions, does not separate what must be true from what happened, cannot stop an agent from calling something done, and cannot cite a regulation with a page number. Covener adds exactly those four things.
Roadmap
- Codex and Windsurf link adapters;
skills/linked likeagents/. /covenerchat commands for approving and requesting changes from the conversation.- A packaged reviewer GitHub Action that posts the findings as a pull request comment and a sprint review digest for leads.
- Knowledge Oracle: DOCX and HTML sources, more citation jurisdictions, compliance reports per spec.
Contributing
Issues and pull requests are welcome; see CONTRIBUTING.md.
pip install -e ".[dev]" && pytest && ruff check . && mypy
Standards used: AGENTS.md, Claude Code subagents and CLAUDE.md imports, Cursor subagents and rules; conventions from OpenSpec, spec-kit and Kiro; LightRAG and Voyage AI for the Oracle.
License
MIT. Built by @ajmorenodelarosa.
Release files for covener 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| covener-0.1.1.tar.gz | 61.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| covener-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 128.8 kB
Release files / covener-0.1.1.tar.gz
| Download URL | covener-0.1.1.tar.gz |
|---|---|
| Size | 61.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
588f1d3bf0e94b1e3f45ce86edff0a099ff692bbe5f67029fa2b050c75b2fb82
|
|
BLAKE2b-256 checksum How to use checksums |
430d30ab9339e872a4eacc0745486a68b3b16a4dc7766065b03e5bdb474a603e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / covener-0.1.1-py3-none-any.whl
| Download URL | covener-0.1.1-py3-none-any.whl |
|---|---|
| Size | 67.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df8e8087f49ceac4f238cec8c115249c66d3e29b96ad530fe39db6ea30d7e3c4
|
|
BLAKE2b-256 checksum How to use checksums |
b1c617dff0ac63734bb51e948659ca6df686f40d9fe3d42f604ecc37d50f5d57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency log