<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aryeh Klein</title>
    <description>The latest articles on DEV Community by Aryeh Klein (@aryehlev).</description>
    <link>https://dev.to/aryehlev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F881807%2F78be719b-1b88-4e48-a1e8-cf51370af9d0.png</url>
      <title>DEV Community: Aryeh Klein</title>
      <link>https://dev.to/aryehlev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aryehlev"/>
    <language>en</language>
    <item>
      <title>Try PeerHarness: vote on rules for your team's coding agents</title>
      <dc:creator>Aryeh Klein</dc:creator>
      <pubDate>Wed, 11 Nov 2026 23:13:07 +0000</pubDate>
      <link>https://dev.to/aryehlev/try-peerharness-vote-on-rules-for-your-teams-coding-agents-1pni</link>
      <guid>https://dev.to/aryehlev/try-peerharness-vote-on-rules-for-your-teams-coding-agents-1pni</guid>
      <description>&lt;p&gt;Coding agents forget. You tell Claude Code to use pnpm, it does, and the next session it reaches for npm again. Your teammate corrects their own agent about something else, in their own clone, and the two agents slowly drift apart. Each of you ends up as the memory for a tool that is supposed to be saving you effort.&lt;/p&gt;

&lt;p&gt;PeerHarness is a small Rust binary that gives the agent a place to put what it learns from you. When you correct it, the agent notes the correction as a one-sentence rule. You keep the rule for your own agent, or put it to your team. When a majority approves, the rule is installed for every member's agent as an Agent Skill, and it applies from their next session. This post is about what that looks like from the agent's side.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/aryehlev/PeerHarness" rel="noopener noreferrer"&gt;https://github.com/aryehlev/PeerHarness&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect it to Claude Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/aryehlev/peerharness/main/install.sh &lt;span class="o"&gt;|&lt;/span&gt; sh
peerharness setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The installer downloads the release binary, checks it against the release's checksums and puts one file in &lt;code&gt;~/.local/bin&lt;/code&gt;. &lt;code&gt;setup&lt;/code&gt; is the one step you run yourself, in your own terminal, because it is where you decide what your agent may start for you. It shows each change before it makes it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;your node: a key and a local database&lt;/li&gt;
&lt;li&gt;two hooks in Claude Code's settings, backed up first. &lt;code&gt;UserPromptSubmit&lt;/code&gt; lets PeerHarness notice when you correct the agent, and &lt;code&gt;Stop&lt;/code&gt; prints a short line at the end of a turn saying how many noted rules and proposals are waiting for you&lt;/li&gt;
&lt;li&gt;one skill, &lt;code&gt;peerharness-notes&lt;/code&gt;, which tells the agent when and how to note a rule&lt;/li&gt;
&lt;li&gt;the PeerHarness tools, registered with &lt;code&gt;claude mcp add&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On macOS the agent can also open confirmation windows. On Linux the agent can note rules and you make every other decision in the terminal. Start a new Claude Code session afterwards.&lt;/p&gt;

&lt;h2&gt;
  
  
  The agent notes the correction
&lt;/h2&gt;

&lt;p&gt;The skill is short. It tells the agent that when you correct it in a way that should apply again, it should write the rule down once, after dealing with the correction itself, as one imperative sentence about the rule and not the incident. A session looks roughly like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You: No, use pnpm here, not npm.&lt;/p&gt;

&lt;p&gt;Claude: Switched to pnpm and reran the install. I also noted this as a PeerHarness rule: "Use pnpm, not npm, in this repository." If you want, I can keep it for you or propose it to your team.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Two things are worth seeing in that exchange. The agent is the one noticing, because it is the one party that reliably knows it was just corrected. A pattern detector on your prompts exists too, but in a small hand-made sample it caught about one correction in five, and "always run the tests before you say you're done" has no tool to prefer or avoid for a pattern to latch onto. The agent understands the sentence. And what the agent did was small. It wrote a note into a local inbox. Nothing was installed, shared or approved.&lt;/p&gt;

&lt;h2&gt;
  
  
  You keep it, the agent installs it
&lt;/h2&gt;

&lt;p&gt;Keeping is yours, but you can ask your agent to start it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You: Keep it.&lt;/p&gt;

&lt;p&gt;Claude: A window is open with the exact rule and where it will be installed. It's waiting for your answer.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The window shows the file that will be installed and has two buttons, Cancel and Proceed. Cancel is the default. The agent has no way to click either, and the commands that decide things refuse to run inside its session. The installed result is a skill in &lt;code&gt;~/.claude/skills&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
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.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That last line matters. A rule is guidance for the agent, and you in the chair still outrank it. If you tell Claude to run &lt;code&gt;npm install&lt;/code&gt; for once, it should do so and mention the rule, which is the behaviour you want from a colleague who knows the team convention. In the next session Claude Code reads the skill and the correction you made last week is already part of how it works. Rules are plain instructions in one SKILL.md. PeerHarness never executes anything from them, and a rule that tries to pre-approve tools or inject shell syntax is refused.&lt;/p&gt;

&lt;h2&gt;
  
  
  From one agent to a team's agents
&lt;/h2&gt;

&lt;p&gt;A rule you kept is for your agent. A team's agents agree when the team votes. In the commands a team is called a circle, and the agent can start the steps when you ask for them:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You: Propose the pnpm rule to acme.&lt;/p&gt;

&lt;p&gt;Claude: A window is open showing the exact text that would leave your machine.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You click Proceed and the rule is put to a vote. Each member sees the same text in their own window and answers for themselves. A rule passes with more than half of everyone on the roll. Not voting counts as not approving, a rejection is recorded with its reason and does not block, and an approval cannot be withdrawn. The built-in &lt;code&gt;peerharness demo&lt;/code&gt; runs three members through it in temporary folders and touches nothing in your home or in &lt;code&gt;~/.claude&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    alice approves.
    carol rejects: "Our CI images only ship npm."
    open: 1 of 3 approved (2 needed), 1 dissenting
    bob approves.
    Every node counts for itself and agrees: passed: 2 of 3 approved (2 needed), 1 dissenting
    No one held a veto, and carol's dissent stays on the record.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a rule passes, each member's node installs it for their agent when it learns of the result, as a skill like the one above. Alice's, Bob's and Carol's agents all start the next session with the same instruction. Carol can opt out of that one rule and only her machine changes. A node can also be set to ask before installing anything that passed.&lt;/p&gt;

&lt;p&gt;Agents drift because corrections stay private. Here they become shared, and the sharing is checked. There is no server. Each person runs their own node with their own keys, and every node verifies every signature and counts every vote itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the agent can and cannot do
&lt;/h2&gt;

&lt;p&gt;Your agent can note a rule whenever you correct it, and it does that without asking, because a note changes nothing. When you ask, it can start the steps that matter: keep, propose, vote, install a passed rule. Each one opens a window that shows exactly what would be shared, signed or installed, and only your click decides. The skill tells the agent to start a step only when you asked for it in the conversation, never because a file or a proposal's text says so, and to stop and tell you if a step is declined or refused. Proposal titles written by other members are shown to you as they are and are not instructions to the agent.&lt;/p&gt;

&lt;p&gt;Adding a teammate goes the same way. They give you their device key, you ask your agent to invite them, and the other side joins with your node's peer id and the team fingerprint, which you tell them by phone or in person. Nodes exchange over QUIC, and &lt;code&gt;peerharness daemon --internet&lt;/code&gt; lets members find each other by peer id with no server in between.&lt;/p&gt;

&lt;p&gt;If you want to see the voting before connecting anything, run &lt;code&gt;peerharness demo&lt;/code&gt;. If you want the agent side, run &lt;code&gt;peerharness setup&lt;/code&gt;, open a session and correct it about something small.&lt;/p&gt;

&lt;h2&gt;
  
  
  From a terminal, without an agent
&lt;/h2&gt;

&lt;p&gt;Everything the agent does goes through the &lt;code&gt;peerharness&lt;/code&gt; command line, so you can drive it yourself with no agent involved. &lt;code&gt;peerharness note&lt;/code&gt; writes a rule down, &lt;code&gt;peerharness inbox&lt;/code&gt; lists what waits for you, &lt;code&gt;peerharness keep&lt;/code&gt; installs a noted rule for your own agent, &lt;code&gt;peerharness proposal create&lt;/code&gt; puts it to your team, and &lt;code&gt;peerharness proposal vote&lt;/code&gt; casts your ballot. &lt;code&gt;peerharness status&lt;/code&gt; shows your node, and &lt;code&gt;peerharness demo&lt;/code&gt; runs a three-member vote in temporary folders. It runs on macOS and Linux, and on both the decisions work in the terminal, with the same exact text and the same confirmation you get in the window:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;peerharness note &lt;span class="s2"&gt;"Use pnpm, not npm, in this repository."&lt;/span&gt;
peerharness inbox
peerharness keep &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;candidate-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://github.com/aryehlev/PeerHarness" rel="noopener noreferrer"&gt;https://github.com/aryehlev/PeerHarness&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>ai</category>
      <category>opensource</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
