One rulebook for every AI coding agent.
Rules every agent reads, locks an agent cannot open, and spot checks that show whether the rules held. Explained in nine figures.
Why it exists
The problem
- Each agent keeps its rules in a different place. Claude Code reads a file in
~/.claude. Codex reads a file in ~/.codex. Cursor reads a setting inside the app. A cloud agent sees only the project folder.
- Copies drift. You change one by hand, and the others fall behind. Then no one knows which edition an agent has.
- Written rules are advice. A model can ignore them.
- A file in the right place does not prove that an agent follows it.
The answer
- Rules
- One policy, frozen as an approved release. Every agent gets the same text, and its first line names the edition:
Harness release 1.4.3.
- Locks
- A few actions are refused, or stopped for your OK, by the agent's own software. Today that is Claude Code only.
- Proof
- Three separate levels: configured, tested, behaviorally verified. A file check is never reported as proof of behavior.
The limit stays visible on every page of this project: rules guide a model. They cannot force it.
Set it up
You need Node.js 24 or later, npm, Git, and the command-line program of each agent you use. Run every command from the repo folder. You set it up once. After that, the agents read the rules by themselves at every start.
Clone, install, and test
git clone https://github.com/yeruvamaheswar/Agent-Harness-by-Uma.git
cd Agent-Harness-by-Uma
npm ci
npm test
You should seefail 0
Choose the rules
Use the rules as shipped:
npm run harness -- activate 1.4.3
Or write your own. Edit knowledge/core.md, then preview and publish a version number that is not in releases/ yet:
npm run harness -- preview
npm run harness -- publish 2.0.0 --approve-sha DIGEST --bootstrap
You should see"active": "1.4.3", or "version": "2.0.0"
Give the rules to Claude Code
npm run harness -- install claude
You should seea path that ends in .claude/CLAUDE.md
Give the rules to Codex
npm run harness -- install codex
You should seea path that ends in .codex/AGENTS.md
Give the rules to Cursor
npm run harness -- install cursor-files
Then paste releases/1.4.3/cursor/user-rules.md into Cursor's User Rules by hand, because no program can write that setting. Then record the paste:
npm run harness -- confirm cursor-user-rules
You should see"confirmed": "cursor-user-rules"
Add the reference search to Claude Code
claude mcp add --scope user agentic_harness -- "$(which node)" --experimental-strip-types "$PWD/src/mcp.ts"
You should seeagentic_harness in claude mcp list
Turn on the locks
npm run harness -- controls install claude
Run this one yourself. An agent is not allowed to change its own locks.
You should seea rules list with 19 deny and 8 ask entries
Check the files
npm run harness -- status
You should seeconfigurationVerified: true for every installation
Check real behavior
npm run harness -- eval run --platform claude --case release-line
This starts a real session and spends tokens.
You should see"taskSuccess": true
Checked on 13 October 2026 in a clean copy with an empty home folder: steps 2 to 4, the install command of step 5, and step 8. CI runs step 1 on every push. Not checked there: steps 6, 7, and 9, and the Cursor paste.
Use it in a project
| You want | Do this | Check |
| Local work in any project | Nothing more. The rules are already loaded for your user account. | Ask the agent for its harness release. |
| A cloud agent that follows the rules | npm run harness -- repo install PATH --pointer, then commit the new files in that project. | npm run harness -- repo verify PATH |
| To see if a project is set up safely | npm run harness -- repo bar PATH | 7 file checks, such as CI, a secret scan, and deny rules. |
| To take it out of a project | npm run harness -- repo uninstall PATH | Only the harness block is removed. |
Skills: one manual step
The policy names three skills: grill-me, html-explainer, and render-rules. A fourth, verify, loads only when you ask for it. The sources of all four are in tools/agents/skills/. No harness command installs them yet. Copy each folder to ~/.agents/skills/, and link each into ~/.claude/skills/ for Claude Code. The html-explainer skill also needs the page builder: copy tools/agents/bin/md-view.sh and md-view.template.html to ~/.agents/bin/. Without the skills, an agent still follows the policy. It only lacks the detailed procedures.
What is in the repo
knowledge/core.md- The policy text that you edit.
knowledge/references/- Longer documents that an agent can look up.
releases/- Every published edition, frozen.
controls/controls.json- The list of locks and ask rules.
evals/- The test tasks and the log of results.
src/, tests/- The command-line program, about 3,800 lines of TypeScript, and its own tests.
tools/agents/- The sources of the four skills and the page builder.
docs/- The full command list, platform notes, and recovery steps. This page lives here too.
.state/- Your private receipts and backups. Git ignores it.