For teams that work with AI coding agents
Your team votes on how its AI coding agents behave.
You correct your coding agent. PeerHarness turns the correction into a one-sentence rule. Keep it for your own agent, or propose it to your team: once a majority approves, every member's agent follows it.
Early and not audited. For Claude Code on macOS, and it connects 14 other coding agents too, Codex, Gemini CLI, Cursor and Copilot CLI among them. On Linux it works from a terminal, without the windows. Windows is not supported. Read the limits before you rely on it.
Proposal · adopt rule3 members
Use pnpm, not npm, in this repository.
- aliceapproves.
- carolrejects: “Our CI images only ship npm.”
- open: 1 of 3 approved (2 needed), 1 dissenting
- bobapproves.
passed: 2 of 3 approved (2 needed), 1 dissenting
No one held a veto, and carol's dissent stays on the record.
§ 1 · Try it in your agent
Say it to your agent.
Start a new session of your agent and say these, one at a time. You need no teammate for it.
-
“From now on, use pnpm here, not npm.”
Your agent notes the rule (“Use pnpm, not npm, in this repository.”) and tells you it did. It does the same when you correct it in the middle of work.
-
“Keep it.”
A window shows the exact rule. Click Proceed: the rule is installed for your own agent, which reads it from its next session. Nothing is shared.
-
“Create a PeerHarness team called acme.”
You are its only member for now.
-
“Propose the pnpm rule to acme.”
A window shows the exact text that would leave your machine. Click Proceed: the rule is put to your team's vote.
-
“Vote approve on it.”
A window shows your ballot. Click Proceed: one of one members approved, so the rule passed and is now your team's.
From now on, use pnpm here, not npm.
Skill(peerharness-notes)
⎿ Successfully loaded skill
Got it: pnpm instead of npm in this repo from now on, and I've saved that to memory so it holds in future sessions.
I also noted it in PeerHarness as candidate cand_9fcb4b167df089ee. You can ask me to keep it for yourself or to propose it to your team.
PeerHarness
Your coding agent started this step. Nothing happens unless you choose Proceed.
You are about to sign a ballot in acme: approve on "Use pnpm, not npm, in this repository." (adopt rule use-pnpm-not-npm-repository) An approval cannot be withdrawn. The rule, exactly as proposed: --- name: use-pnpm-not-npm-repository description: Use pnpm, not npm, in this repository. --- # Rule Use pnpm, not npm, in this repository. If this conflicts with what the user asks for in the current session, follow the user and say that it conflicts with this rule.
Agents suggest, people decide.
Your agent can note a rule and open a window on your screen that shows the exact text. It cannot answer the window: inside its session, keeping a rule, sharing one, voting, inviting and joining take your click. Every window has two buttons, Cancel and Proceed, and Cancel is the default.
That stops an agent that is trying to help. It is not a sandbox.
Then ask what is new
“What is in my PeerHarness inbox?” lists the rules your agent noted and the proposals that wait for your vote. “Anything new in PeerHarness?” exchanges with the other members first.
And add a teammate
Dana asks her agent for her device key and its fingerprint, and sends you the key. It is a public key, not a secret. You say “Invite Dana to acme. Her device key is ed25519:…” and a window shows the fingerprint of the device you would admit: have Dana read hers to you, by phone or in person, and click Proceed if they match. She joins with your node's peer id and the team's fingerprint, which you tell her the same way. From then on a rule needs both of your votes, and so does admitting a third member.
§ 2 · The vote
A majority of everyone, and nobody's veto.
- One person, one vote, however many devices they have.
- A majority of everyone entitled to vote. Not voting counts as not approving. Nobody has a veto: a
rejectis recorded with its reason and does not block. - No deadlines and no coordinator. A member cannot withdraw an approval, and counting reads no clock, so two nodes that hold the same records always agree.
- Membership is voted too. Admitting or removing a member and changing the thresholds need a vote. The founder's key signs the resulting charter, and nodes refuse any charter that a passed vote does not justify.
- A passed rule takes effect. It is installed for every member's agent, and any member can opt out of a single rule on their own machine.
No vote and no charter can switch these off
- Nothing leaves your machine without you seeing the exact text and confirming it.
- PeerHarness never executes a rule. A rule is one instruction-only
SKILL.md; tool pre-approval and shell-injection syntax are refused outright. - No vote grants read access.
- A rule with high-risk content is never installed without asking you.
- You can refuse a rule and you can leave.
§ 3 · No server
Every node counts for itself.
There is no server. Each person runs their own node with their own keys, and every node checks every signature and counts every vote for itself.
The founder's key signs the charter that a vote produced. It cannot stand in for the vote.
6. The charter is binding, so the rule is installed for every member's agent.
7. Carol opts out of this one rule. That is her right, and only her machine changes.
8. What cannot happen:
Mallory signs a ballot. She is not on the roll: refused.
The founder's root key signs a charter that adds Mallory without a vote.
The signature is valid and every node still refuses it: the key is a notary, not a ruler.
§ 4 · Set it up
Paste this into your coding agent.
Claude Code, Codex, Gemini CLI, Cursor, Copilot CLI or another one PeerHarness connects. If you use goose term init, run setup from a shell without it.
Set up PeerHarness for me: https://github.com/aryehlev/peerharness 1. Install it: curl -fsSL https://raw.githubusercontent.com/aryehlev/peerharness/main/install.sh | sh 2. The next step is mine. It is where I allow what you may start for me, so do not run it yourself: it would be refused. Ask me to run this in my own terminal: ~/.local/bin/peerharness setup Then tell me to start a new session, and what I can ask you there.
Your agent installs it
The install line downloads the release binary for your machine, checks it against the release's SHA256SUMS and puts it in ~/.local/bin. No sudo, and nothing else is changed.
You run setup, once
It is where you allow what your agent may start for you, so your agent is refused it. It creates your key and database and connects PeerHarness to Claude Code (two hooks, one skill and its tools) and to the other agents it finds. It shows each change before it makes it and asks you to confirm.
What it stores
One hook keeps a redacted copy of each prompt you type, so that corrections can be noticed. The copies stay on your machine, for 14 days by default, in a database that is not encrypted.
Then start a new session of your agent and try it. More: what setup adds and stores, and how to take it out again.
§ 5 · Limits
What it does not do.
PeerHarness is early and has not been audited. Read these before you rely on it.
- The agent guard is not a sandbox. A session is recognized by an environment variable that the agent sets, and Antigravity documents none. A process running as you that hides it can run the same commands with
--yes. Your agent chooses when a window appears: reading it before you click is your part. - A rule is text that your agent acts on, and your agent can run commands. The risk scanner and the redaction are heuristics. Read a rule as you would a script.
- Joining installs rules you have not read. The join window shows the charter and how many rules it carries, not their text. You can opt out of any afterwards.
- The founder can revoke a device without a vote, for a lost laptop. Its ballots stop counting, so a result that needed one is undone. The founder's key also signs every change of the roll: if it is lost, nobody can be admitted or removed.
- No secret ballot, and at most 64 members. A member who never votes makes every threshold harder to reach.
- A node is reachable only while a daemon runs: yours, or the one your agent runs while its session is open. There is no background service yet.
- Internet mode shows your node's public key and IP address to servers run by volunteers.
The full list is in docs/limits.md, and how each part was checked in docs/checked.md.
§ 6 · Questions
Short answers.
What is PeerHarness?
PeerHarness is an open-source tool for teams that work with AI coding agents: Claude Code, Codex, Gemini CLI, Cursor, Copilot CLI and ten more. It turns a correction you give your coding agent into a one-sentence rule. You keep the rule for your own agent, or propose it to your team: once a majority approves, it is installed for every member's agent.
How do I share a Claude Code rule with my team?
Say the rule to your agent, then ask it to propose the rule to your team. Every member sees the exact text and votes. Once a majority of all members approves, the rule is installed for every member's agent as an Agent Skill, and any member can opt out of it on their own machine.
Does it need a server or an account?
No. There is no server and nothing to sign up for. Each person runs their own node with their own keys, and every node checks every signature and counts every vote for itself. To find each other across the internet, nodes can use a public network, which shows a node's public key and IP address to servers run by volunteers.
Can my agent vote or share a rule for me?
No. Your agent can note a rule and open a window on your screen that shows the exact text. It cannot answer the window: keeping a rule, sharing one, voting, inviting and joining take your click. That stops an agent that is trying to help. It is not a sandbox.
Which agents and systems does it work with?
Claude Code on macOS. It also connects Codex, opencode, Pi, Google Antigravity, DeepSeek Harness, Gemini CLI, Qwen Code, GitHub Copilot CLI, Cursor, Amp, Factory's Droid, Crush, Kilo and goose, which were set up from their documentation and source and, all but Amp, checked against their programs, but not yet tried in a session with a model. On Linux it works from a terminal, without the windows. Windows is not supported. A rule is one instruction-only SKILL.md file, an Agent Skill, and PeerHarness never executes it.
What does it cost, and how far along is it?
PeerHarness is free and open source, under MIT or Apache-2.0 at your option, and written in Rust. It is early and has not been audited: read the limits before you rely on it.
Why not a CLAUDE.md in git?
If the rule is about one repository and your team already reviews pull requests, commit the file. You need nothing else.
PeerHarness is for rules that follow people across repositories, for groups with no shared repository or nobody who administers one, and for members who want to see the exact text they vote on and to opt out of a rule alone.
It is also more dynamic and more democratic. A rule starts as a correction in the middle of work, with no file to edit and no pull request to open. And it passes by a majority of everyone, not by the say of whoever can merge.