Prove
Measure whether your agents follow your team's rules.
Count what was used, not what was stored. Harbor counts how many of your team’s rules reached your coding agents and how many the agent said it used. Read the second number as an upper bound, not a verdict: agents claim more uses than really changed their work.
How do I know my agent follows our rules?
You count it. Harbor numbers every rule it hands an agent, the agent names the numbers it used on a harbor-applied: line at the end of its answer, and Harbor keeps both counts: what was sent, and what was cited. A rules file gives you neither. You can read what you wrote, but nothing tells you which lines reached the session or which ones the agent acted on.
You can see it three ways. Under each answer in Claude Code and Codex, the receipt lists the team rules that answer cites. harbor doctor prints the counts for the repo you are in. And Insights, in the web app, shows them for the whole workspace. Each is below.
What a count cannot tell you is whether the agent was right. A cited rule is one the agent says it used, which is the next section’s point. For a rule that must hold every time, do not rely on the agent at all: block the command with a PreToolUse hook guardrail.
Why does my agent ignore CLAUDE.md?
Because CLAUDE.md is context, not enforcement. The agent reads it into its window with everything else, and nothing checks that it acted on a line, or reports which lines it used. The same goes for AGENTS.md, Cursor rules and copilot-instructions.md (CLAUDE.md vs AGENTS.md vs Cursor rules, compared).
A rules file is also the same for every task, so most of it is beside the point of any one task, and every line is paid for on every turn whether it applies or not. The one careful measurement of context files is the study at the end of this page, and it found they barely moved task success.
Harbor works the other way round. Every time you prompt an agent, Harbor looks up the rules that fit and sends those, each with a number, and the agent says which numbers it used. A rule that is sent often and never cited shows up as exactly that, and you can retire it. A rule that must never be broken belongs in a hook, which refuses the call instead of asking the agent to remember.
The two numbers
Every rule Harbor hands to an agent is numbered: the rules sent with your prompt, and the results of a harbor_get_knowledge search. The agent sends those numbers back when it says its work was based on one. When an answer cites rules that came with your prompt, Claude Code and Codex print a receipt under it, in your own window, naming only those. A rule cited from the agent’s own search is left off it, so an answer that cites only search results prints no receipt.
⚓ Harbor: your agent used 2 team rules
#1 Migrations are files, never db push
rule · via GitHub · acme/acme-api#412
#3 Background work goes on the queue, never in a request handler
pattern · via SlackThe #1 and #3 are the numbers on the answer’s own harbor-applied: line, just above. The receipt lists five rules at most, then + N more. A turn that cites nothing prints nothing, so a rule the agent was sent and ignored never appears. Cursor and Copilot have no line to show it in, and harbor doctor’s Receipt line says so on a machine that runs them. harbor off --receipt hides it and harbor on --receipt brings it back; the rules still reach the agent either way. When the agent saves a learning, a second line says what happened to it, such as ⚓ Harbor saved a rule or ⚓ Harbor held a rule for review.
| Served | Cited | |
|---|---|---|
| What it counts | Rules handed to an agent, every delivery. | Rules the agent said it based its work on. |
| What moves it | How well retrieval matched the task. | Whether the rule was any use once it arrived. |
| What a low number means | Nothing is reaching the session. Check that the repo is bound. | The rules sent were not what the task needed, or the agent used them without saying so. |
A cite is not a proof
Read the cited count as an upper bound. Agents tell us which rules they applied, and they claim more than really changed their work: a rule the agent read and did not need is easy to name on the way out. Insights says the same under How we count: Agents tell us which facts they applied, and they claim more than really changed their work, so read the usage numbers as upper bounds.
The other half follows from it. A cited rule is not a proven rule. The agent said it based its work on that line; whether the work was correct, and whether the line deserved to be followed, are questions this instrument does not ask and cannot answer.
An agent can also say a rule was wrong. In Claude Code, harbor_get_knowledge takes the numbers the agent applied, the ones that were noise, and the ones that were wrong, with a reason. A rule called wrong is marked disputed for the next agent that gets it and waits in Review for its owner, and Insights counts it under Rules found wrong.
Reading harbor doctor
The command line reports the loop for the repo you are standing in, over the last 7 days unless you pass --days. Recall names the window and whether the numbers are this project’s or the whole workspace’s, and the lines under it share that window. Corpus and Cost are always workspace-wide. A reader who assumes the wrong scope is reading a smaller number than they think.
| Line | Reads | The denominator |
|---|---|---|
Recall | How many sessions there were, and how many received anything at all. It is the line that names the window and the scope: last 7 days, and this project or workspace-wide. | Sessions in the window. |
Fit | The average bundle size, and how many served rules went uncited. | Served rules in the window. Warns when fewer than half were cited. |
Attribution | Whether every session here carried a key we could count it by. | Recalls in the window. Anything under 100% is a broken instrument, not a bad result. |
Surfaces | Which way the recalls arrived, CLI, MCP, Desktop app or Web, and how many on each could be counted. | Recalls on that surface. |
Contributed | What this repo captured: how many learnings, approved and pending. | None. It is a count. |
Corpus | What the brain added and retired, and the commonest reason a rule left. | None, and always workspace-wide. |
Cost | What the model calls that write your rules cost, per rule an agent cited. Doctor says "per cited atom"; an atom is one rule. | Rules cited in the window, workspace-wide. With none cited it says there is no denominator rather than print a price. |
Fit is the one worth staring at
Fit exists in the command line and nowhere else in the product, and the reason is that precision is the binding constraint. Serving more is easy. Serving fewer, better rules is the hard problem, and the only number that shows whether you are solving it is the share of what you sent that went unused.
It prints two things together for that reason: the average bundle size beside the uncited share. A bundle of twelve with half uncited and a bundle of two with half uncited are not the same situation, and a single percentage would hide which one you are in.
Attribution is not the cite rate
The two get confused because both are ratios about recall. Attribution asks whether a session could be counted; Fit asks what happened inside the sessions that could. An unkeyed recall is invisible to the loop, so Attribution below 100% means the measurement is broken and the fix is to re-run harbor init.
Reading Insights
Insights, in the web app, reports the same loop for the whole workspace. It opens for anyone who can approve rules somewhere in the workspace, which is admins and curators; members and viewers do not see it (roles and Spaces). Pick 7, 30 or 90 days beside the first heading. The numbers are counted overnight, so a new workspace reads Nothing measured yet. We count this overnight, so it fills in after your agents have run for a day.
- Did your brain help in the last 7 days? The heading names the range you picked. Under it, Last updated says when the count ran, and How we count opens the two sentences the page rests on: Harbor looks up the rules that fit each prompt and sends them, and when the session ends the agent says which ones it used, read as upper bounds.
- The strip, four numbers in the loop’s own order. Sessions that got rules: the share of sessions that got at least one. Rules your agents used: how many different rules were cited, out of how many were sent. Rules nobody got: live rules no agent was sent in the range, with See which ones to open them in Knowledge. Rules found wrong: rules agents flagged, plus rules a person replaced with a correction in a session, with Review them when agents flagged any.
- Your brain. Over the same range: Rules learned, Rules dropped, Net change and Brain size now, with why rules arrived and why they left. Its footer says whether unused rules are archived on their own, and links to See every rule, and archive the ones nobody uses.
- Over time, which the range does not change. Week by week, counted every Monday: sessions that got rules or got none, rules sent, learned against dropped, and brain size. Are your rules still true?, over all time: rules checked against real work as Still true, Looks wrong or Unclear. And What changed, newest first, the rules whose answer flipped.
One rule at a time, on Knowledge
Every rule on Knowledge carries three numbers, counted overnight. Served is every time it was sent to an agent in the window. Cited is how often an agent cited it, out of the times it could have been, so it is always a pair, cited of could have been, or a dash with none could be cited when no delivery could be. Last used is the last time an agent cited it, not the last time it was sent, and the two can be weeks apart on a rule nobody uses.
What to do with a low cite rate
Subtract. A rule served every day and cited never is not a rule to reword, it is a rule to retire, and the Your brain card is built to make that a normal thing to do rather than an admission. Net change can go down and that is not a bad sign: a rule that stopped being true should leave.
This is the opposite of the usual instinct, which is to add. Every rule you keep is paid for on every turn it is sent, and a rule nobody gets still competes for room every time rules are sent. Run harbor context to see what every turn carries.
You do not have to do it by hand. In Brain settings, under Unused rules, an admin can set Archive rules agents don’t use to after 60, 90 or 180 days. A rule no agent has been sent in that long is archived: agents stop getting it, nothing is deleted, and anyone can restore it from Knowledge. The check runs every Sunday. On Never, the default, unused rules are suggested in Review instead.
Why anyone should believe the gap exists
Not from our numbers. Over 138 tasks and four agents, ETH Zürich and LogicStar measured that a hand-written context file moved task success 2.4 points, a gain they could not tell from noise, a generated one moved it down, and either way the run cost about 20% more inference (arXiv:2602.11988, v2). That is the objection to Harbor as much as to anyone: context is not free and more of it is not better.
Which is why the answer here is a count rather than a claim. Harbor reads its rules out of work people already did. On the default setting, Hybrid, your team’s rules, gotchas, patterns and memories go live on their own, marked as not yet reviewed, and the rest wait in Review for a person (who approves what an agent learns). Then the loop reports how many of them were any use. Publishing our own figure for that would be asking you to trust the party with the most to gain.