Agent harness generator
Give every agent a harness that knows your team's decisions.
Run one command in your repo. Decree generates a harness for Claude Code, MCP, TypeScript and Python, and a dashboard you host keeps every version and eval run.
npx decree-harness[ harnesses ]
Acme Orders Agent
v7
18
2
92%
Runs
- 11/12 passed92%
- 10/12 passed83%
- 12/12 passed100%
- 8/12 passed67%
$ npx decree-harness✓ Scanned acme-orders · 214 files✓ Planned Acme Orders Agent · 18 tools✓ Found 41 decisions: 12 live, 27 proposed, 2 superseded✓ Wrote agent/ · claude-code, mcp-server, typescript, python $ npx decree-harness push✓ Pushed acme-orders-agent v7 · decree.acme.dev
01CLI
One command in your repo. Decree scans it and writes the harness.
$ npx decree-harness
✓ Scanned acme-orders · 214 files
✓ Planned Acme Orders Agent · 18 tools · asks before 5 risky tools
✓ Found 41 decisions: 12 live, 27 proposed, 2 superseded.
Confirm with decree-harness decisions confirm02Scoped decisions
Agents get the decisions for the files they touch. The rest stay out of context.
Most teams keep their rules in one AGENTS.md or CLAUDE.md file and load all of it into every session.
A February 2026 study from ETH Zurich tested repository context files like these on real coding tasks. The files did not generally improve task success, and they raised inference cost by over 20% on average. The authors suggest keeping them to minimal requirements.
Decree keeps each decision separate, with globs for the paths it governs. Before an agent edits src/ledger/adjust.ts, it calls get_decisions and gets two decisions: the ledger ADR and the repo-wide rule on money. The other 39 in decree.json stay out of its context.
// the agent is about to edit a ledger adjustment get_decisions { "paths": ["src/ledger/adjust.ts"] } // result (text) 2 decisions govern these paths, most specific first. Follow them, and cite the id when one constrains your change. [adr-0014-ledger-writes-go-through-ledgerservice] Ledger writes go through LedgerService Rule: Write to `ledger_entries` only through `LedgerService`, in the same transaction as the change that caused the entry. Governs: src/payments/**, src/ledger/** | Source: docs/adr/0014-ledger-writes-go-through-ledgerservice.md [adr-0021-store-money-as-integer-minor-units] Store money as integer minor units Rule: Store and pass amounts as integer minor units with a currency code. Never use floating point for money. Governs: ** | Source: docs/adr/0021-store-money-as-integer-minor-units.md
03Dashboard
Every version of your harness in one place. Host it yourself, synced from the CLI and CI.
[ harnesses ]
Acme Orders Agent
v7
18
2
92%
Versions
- v7Confirm refund rulelatest
- v6Supersede decimal money ADR
- v5Add cancel_order and events tools
- v4Initial harness
Version history
Each push of a changed decree.json is a new version, with its commit, branch and what changed.
$ decree-harness pushEval runs
Scores and per-case checks, attached to the version they ran against. Watch a change move the score.
$ decree-harness eval --pushCLI and CI
Approve a login from the browser once, or add an API token to CI and push on every merge.
$ decree-harness login --url <dashboard>04decree.json
One file in your repo is the source of truth. Reviewed like any other code.
{
"name": "acme-orders-agent",
"targets": ["typescript", "python", "mcp", "claude-code"],
"tools": [ /* 18 tools from routes and scripts, plus get_decisions */ ],
"decisions": [
{
"id": "adr-0021-store-money-as-integer-minor-units",
"title": "Store money as integer minor units",
"constraint": "Store and pass amounts as integer minor units with a currency code. Never use floating point for money.",
"status": "live",
"governs": ["**"],
"source": "docs/adr/0021-store-money-as-integer-minor-units.md"
},
{
"id": "adr-0009-store-amounts-as-decimal-strings",
"title": "Store amounts as decimal strings",
"constraint": "Store amounts as decimal strings with two places.",
"status": "superseded",
"governs": ["**"],
"source": "docs/adr/0009-store-amounts-as-decimal-strings.md",
"supersededBy": "adr-0021-store-money-as-integer-minor-units"
}
]
}Every decision has a status.
- liveServed by get_decisions for paths its governs globs match. Accepted ADRs start here.
- proposedRules-file bullets and post-mortem lessons. Not served until someone confirms them.
- supersededReplaced or rejected. Kept for history, never served. supersededBy names the replacement.
$ npx decree-harness generate --targets all decree.json tools, guardrails, targets, decisions .decree/ profile.json, manifest.json, schema.json agent/ claude-code/ CLAUDE.md, .claude/ agents and skills, .mcp.json mcp-server/ MCP server with get_decisions and decisions.json typescript/ standalone agent (Anthropic TypeScript SDK) python/ standalone agent (Anthropic Python SDK) evals.json eval cases
Run it on your repo. Then push it to your dashboard.
Needs Node 20.12 or newer. Set ANTHROPIC_API_KEY to have Claude plan the harness, or pass --offline to plan from the scan alone.
npx decree-harnessWant the cross-repo decision workspace early? Apply as a design partner.