<?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: Antonio Bergoños</title>
    <description>The latest articles on DEV Community by Antonio Bergoños (@crbro).</description>
    <link>https://dev.to/crbro</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%2F4086920%2F0317f12f-f722-46bb-be3d-a3c1fa161577.png</url>
      <title>DEV Community: Antonio Bergoños</title>
      <link>https://dev.to/crbro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/crbro"/>
    <language>en</language>
    <item>
      <title>A prompt can't see the second copy of a bug. A program can.</title>
      <dc:creator>Antonio Bergoños</dc:creator>
      <pubDate>Mon, 16 Nov 2026 01:15:41 +0000</pubDate>
      <link>https://dev.to/crbro/a-prompt-cant-see-the-second-copy-of-a-bug-a-program-can-1okj</link>
      <guid>https://dev.to/crbro/a-prompt-cant-see-the-second-copy-of-a-bug-a-program-can-1okj</guid>
      <description>&lt;p&gt;A coding agent got a ticket: a customer with exactly 100 points can't redeem the 100-point reward. It found &lt;code&gt;redeemable()&lt;/code&gt; in &lt;code&gt;src/loyalty/redeem.js&lt;/code&gt;, changed a &lt;code&gt;&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;gt;=&lt;/code&gt; and reported it fixed. Four turns, one line, no test.&lt;/p&gt;

&lt;p&gt;The same comparison was also in &lt;code&gt;src/emails/points.js&lt;/code&gt;. It stayed wrong.&lt;/p&gt;

&lt;p&gt;That wasn't bad luck. On that ticket, with no tool, the second copy was fixed in 0 sessions of 5. With one note at the moment of the edit, in 15 of 15.&lt;/p&gt;

&lt;p&gt;I'm building Ockham, a plugin for Claude Code, to find out what you can and can't get from a coding agent by telling it things. These are the measurements so far. Most of what they say applies whether you use Ockham or not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1v93tn7qd8o4rkt1s0ko.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1v93tn7qd8o4rkt1s0ko.jpg" alt="The same ticket, without Ockham and with it" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it's measured
&lt;/h2&gt;

&lt;p&gt;Every number below is one headless agent session on a fresh copy of a project of about forty source files. The agent gets a ticket and nothing else. What it leaves behind is scored by checks it never saw: whether it works, whether it holds on input the ticket left out, whether it reached every place the bug was in, whether it reused what the project already had, whether it left a test where the logic needs one.&lt;/p&gt;

&lt;p&gt;There are 44 tasks: 39 to tune on and 5 held out. Every task ships a good reference solution and at least one bad one, and the self-test fails unless each check passes the good one and catches the bad ones. The reference arm is &lt;a href="https://github.com/DietrichGebert/ponytail" rel="noopener noreferrer"&gt;ponytail&lt;/a&gt; (MIT), the ruleset that made "make the agent write less" popular. Ockham is written from scratch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 1: rules move a lot, but not everything
&lt;/h2&gt;

&lt;p&gt;Seven rules, 314 words, tuned one change at a time. On the 22 tasks they were tuned on, five sessions a task:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;No tool&lt;/th&gt;
&lt;th&gt;ponytail&lt;/th&gt;
&lt;th&gt;Ockham rules&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Passed every hidden check&lt;/td&gt;
&lt;td&gt;87/110&lt;/td&gt;
&lt;td&gt;86/110&lt;/td&gt;
&lt;td&gt;105/110&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Held on input the ticket left out&lt;/td&gt;
&lt;td&gt;103/110&lt;/td&gt;
&lt;td&gt;100/110&lt;/td&gt;
&lt;td&gt;110/110&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reached every place the bug was in&lt;/td&gt;
&lt;td&gt;14/25&lt;/td&gt;
&lt;td&gt;11/25&lt;/td&gt;
&lt;td&gt;20/25&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Left a test where the logic needs one&lt;/td&gt;
&lt;td&gt;0/70&lt;/td&gt;
&lt;td&gt;7/70&lt;/td&gt;
&lt;td&gt;60/70&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost per session&lt;/td&gt;
&lt;td&gt;$0.030&lt;/td&gt;
&lt;td&gt;$0.036&lt;/td&gt;
&lt;td&gt;$0.054&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The first rule says which half wins: "the smallest change that does the whole job. If they pull apart, the whole job wins." It's there because of what a plain "do less" rule does. In the baseline, the agent with that rule reused everything, then left out part of the job and reported the omission as a saving: a CSV export with no quoting, five times out of five.&lt;/p&gt;

&lt;p&gt;What no wording fixed was the copy of a bug in another module. One wording made it worse: the agent started saying it had looked for other copies. Four sessions of five closed with a search or a check that the project contradicts, and three of those had run nothing.&lt;/p&gt;

&lt;p&gt;If you keep one thing from this post: &lt;strong&gt;a rule can't make an agent find what it doesn't know exists.&lt;/strong&gt; That's a job for a program.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 2: tell it at the moment of the edit
&lt;/h2&gt;

&lt;p&gt;So Ockham keeps an index of the project. When a session starts, the agent is told which helpers the files share and where the tests are. When an edit replaces a line that another file also has, it's told which file and which line.&lt;/p&gt;

&lt;p&gt;On six tasks nothing had been tuned on:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;No tool&lt;/th&gt;
&lt;th&gt;Rules alone&lt;/th&gt;
&lt;th&gt;Rules and index&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Passed every hidden check&lt;/td&gt;
&lt;td&gt;21/30&lt;/td&gt;
&lt;td&gt;26/30&lt;/td&gt;
&lt;td&gt;27/30&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reached every place the bug was in&lt;/td&gt;
&lt;td&gt;9/15&lt;/td&gt;
&lt;td&gt;14/15&lt;/td&gt;
&lt;td&gt;15/15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost per session&lt;/td&gt;
&lt;td&gt;$0.030&lt;/td&gt;
&lt;td&gt;$0.050&lt;/td&gt;
&lt;td&gt;$0.047&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Time per session&lt;/td&gt;
&lt;td&gt;16 s&lt;/td&gt;
&lt;td&gt;25 s&lt;/td&gt;
&lt;td&gt;21 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Across every run so far, the note about a copy went to 70 sessions, all on tasks where a bug is written twice, and all 70 fixed both places. No false warning in 546 sessions with the index.&lt;/p&gt;

&lt;p&gt;The part I didn't expect: the index doesn't make a session cheaper. It makes it shorter. A shorter list and no list at all were tried, and they cost the same. What the text saves on every call, the agent spends on more calls.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 3: check once at the end, and say what you found
&lt;/h2&gt;

&lt;p&gt;When the agent means to stop, Ockham compares the files the task changed with what they were. Seven checks: a dependency the request didn't name, a second version of something another file exports, a copy that's still wrong in another file, a check the code used to make and no longer makes, risky logic with no test, tests not run after the last change, and a summary that says the tests pass when none ran.&lt;/p&gt;

&lt;p&gt;If one fires, the agent is told once and goes on.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Of 64 sessions stopped so far, 63 fixed what they were told. The other one was right: the check was wrong.&lt;/li&gt;
&lt;li&gt;On five tasks with a bug written twice, a session with no tool fixed the second place once in 25. With the checks alone, 15 of 15.&lt;/li&gt;
&lt;li&gt;Two of the mistakes the checks look for, this model doesn't make. In 1,673 sessions nobody added a package or dropped a check while shortening a function.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it costs, and what's open
&lt;/h2&gt;

&lt;p&gt;It costs more: about $0.05 a session against $0.03 with no tool. Most of that is the tests it asks for. Without the rule that asks for them, a session costs a quarter less and passes the same hidden checks. I kept the rule, because "checked" is the promise. &lt;code&gt;OCKHAM_TESTS=off&lt;/code&gt; leaves it out.&lt;/p&gt;

&lt;p&gt;Still open:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One task nothing helps on: a redirect after sign-in that three sessions of five leave open to another site, with the rules or without.&lt;/li&gt;
&lt;li&gt;A second version of a helper written inline is rarely caught at the end: 1 of 7 planted ones.&lt;/li&gt;
&lt;li&gt;Review, memory and the status band (phases 5 to 7) aren't built yet, and the Codex side is still open.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;In Claude Code, with Node.js 20 or later:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude plugin marketplace add Octonove/ockham
claude plugin install ockham@ockham
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every table above, the harness and the 44 tasks are in the repo: &lt;a href="https://github.com/Octonove/ockham" rel="noopener noreferrer"&gt;https://github.com/Octonove/ockham&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you run the benchmark on your own setup and get different numbers, I want to see them.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>llm</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I built a file-based 'brain' so my AI assistant stops forgetting everything</title>
      <dc:creator>Antonio Bergoños</dc:creator>
      <pubDate>Thu, 20 Aug 2026 15:32:38 +0000</pubDate>
      <link>https://dev.to/crbro/i-built-a-file-based-brain-so-my-ai-assistant-stops-forgetting-everything-39n3</link>
      <guid>https://dev.to/crbro/i-built-a-file-based-brain-so-my-ai-assistant-stops-forgetting-everything-39n3</guid>
      <description>&lt;p&gt;If you work with Claude Code or Cursor daily, you know the ritual: open a new session, and the assistant has no idea who you are, what you were building yesterday, or why you made that one weird architectural decision three weeks ago. Every conversation is a cold start. &lt;/p&gt;

&lt;p&gt;You re-paste context, re-explain your stack, re-justify decisions you already justified. The model is smart within a session and amnesiac between them — which means the real bottleneck in AI-assisted development isn't reasoning, it's continuity.&lt;/p&gt;

&lt;p&gt;I ran into this constantly while juggling multiple client projects, infrastructure work, and side builds. So I built &lt;strong&gt;CRBRO&lt;/strong&gt;, a &lt;strong&gt;local MCP server&lt;/strong&gt; that gives an AI assistant a memory that actually survives across sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is MCP, in 3 Lines
&lt;/h2&gt;

&lt;p&gt;The Model Context Protocol (MCP) is an open standard for connecting AI applications to external systems — data sources, tools, and workflows — instead of forcing every integration to be a custom one-off. Anthropic describes it as "a USB-C port for AI applications": one standardized interface that lets Claude, Cursor, Windsurf, and other clients plug into the same servers. That standardization is exactly what makes a portable, cross-client memory layer like CRBRO possible — write the server once, and any MCP-compatible client can use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Architecture of CRBRO
&lt;/h2&gt;

&lt;p&gt;CRBRO borrows its structure from neuroscience rather than from vector databases, and the metaphor isn't just cosmetic — it maps cleanly onto how the tools actually behave.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Neurons:&lt;/strong&gt; each unit of knowledge — a fact, a decision, a project detail — is stored as an individual, human-readable JSON file on disk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Synapses:&lt;/strong&gt;neurons that get referenced together or relate to the same topic are linked, so recalling one can surface the others, similar to associative memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hippocampus:&lt;/strong&gt;acts as the encoding and retrieval layer — the process that decides what gets written into long-term storage and what gets pulled back out when the assistant needs context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Heat scores:&lt;/strong&gt; a ranking signal that determines what's "top of mind" right now, so the assistant doesn't have to sift through everything you've ever told it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Heat scores work like a decaying-relevance score:&lt;/strong&gt; a neuron's heat rises every time it's accessed or reinforced, and decays over time if it's left untouched, similar to how frequently-used memories stay sharp while unused ones fade. A simple version of that logic looks like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;heat = base_weight×𝑒−𝜆⋅Δ𝑡+∑access_boosts&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Picture a real example:&lt;/strong&gt;you tell your assistant on Monday that "the staging DB uses Postgres 15 with a read replica." That neuron gets an initial heat value. If you reference staging-DB details again on Tuesday and Thursday, each access adds a boost, keeping the neuron "hot" and near the top of recall results. &lt;/p&gt;

&lt;p&gt;Meanwhile, a neuron about a one-off npm package version you mentioned once a month ago decays toward the bottom — still stored, still inspectable, just no longer competing for the assistant's limited attention. That's the mechanism that keeps recall fast and relevant instead of dumping the assistant's entire history into every prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Files, Not a Vector Database
&lt;/h2&gt;

&lt;p&gt;It would have been easy to bolt on a vector store and call it memory. I deliberately didn't, for three reasons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inspectable:&lt;/strong&gt;every neuron is a plain JSON file. You can open it in a text editor, grep it, or diff it — no embeddings to decode, no black box.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git-friendly:&lt;/strong&gt; because memory is just files, it versions naturally. Commit your assistant's "brain" alongside your project, branch it, roll it back.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zero dependencies:&lt;/strong&gt; no cloud account, no external database, no API keys, no vendor lock-in. Everything lives on your machine.&lt;/p&gt;

&lt;p&gt;That's consistent with CRBRO's broader design goal: a fully local, portable memory layer that works identically whether you're using Claude Code, Claude Desktop, Cursor, Windsurf, or any other MCP-compatible client.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo: Install, Register, and the Boot → Learn → Recall Flow
&lt;/h2&gt;

&lt;p&gt;Getting started takes three commands:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;bash&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
npx crbro-memory init  # initialize the brain + auto-detect installed IDEs
npx crbro-memory status # inspect the current state of the brain
npx crbro-memory # start the MCP server (stdio transport)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;init&lt;/strong&gt; scaffolds the neuron/synapse storage on disk and detects which MCP-compatible clients you have installed so it can offer to register itself automatically. Once registered — for example inside Claude Code's MCP server config — the assistant picks up CRBRO as a tool source on startup.&lt;/p&gt;

&lt;p&gt;From there, the working loop is simple:&lt;/p&gt;

&lt;p&gt;Boot — on session start, the assistant queries CRBRO for the highest-heat neurons, effectively loading "what matters right now" instead of a full history dump.&lt;/p&gt;

&lt;p&gt;Learn — as you work, new facts and decisions get written as neurons, and related ones get wired together via synapses.&lt;/p&gt;

&lt;p&gt;Recall — when you ask a question that touches prior context, the assistant queries the hippocampus layer, which returns the relevant neurons ranked by heat and relevance instead of a brute-force keyword search.&lt;/p&gt;

&lt;p&gt;The result is that a Thursday session actually remembers what you decided on Monday, without you re-explaining it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd Do Differently, and What's Next
&lt;/h2&gt;

&lt;p&gt;If I rebuilt this from scratch, I'd design the synapse-linking logic earlier instead of bolting it on after neurons were already stable — relationships between facts turned out to matter as much as the facts themselves. On the roadmap: smarter synapse pruning so stale links don't clutter recall, better heat-score tuning per project type, and deeper multi-project isolation so CRBRO doesn't blur memory across unrelated codebases.&lt;/p&gt;

&lt;p&gt;CRBRO is open source and runs entirely on your machine — no cloud, no accounts, no lock-in, compatible with Claude Code, Claude Desktop, Cursor, Windsurf, and any other MCP client. If it saves you from re-explaining your own project for the tenth time, check out the &lt;a href="https://github.com/Octonove/crbro-memory" rel="noopener noreferrer"&gt;CRBRO repo&lt;/a&gt; and drop a star if it's useful.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>llm</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
