<?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: fagugon283</title>
    <description>The latest articles on DEV Community by fagugon283 (@fagugon283).</description>
    <link>https://dev.to/fagugon283</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%2F4235626%2Fbfc090ca-1878-4b53-a515-890f6ff50c7b.png</url>
      <title>DEV Community: fagugon283</title>
      <link>https://dev.to/fagugon283</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fagugon283"/>
    <language>en</language>
    <item>
      <title>My AI coding agents kept forgetting why they did things — so I built them a shared memory</title>
      <dc:creator>fagugon283</dc:creator>
      <pubDate>Mon, 09 Nov 2026 17:44:57 +0000</pubDate>
      <link>https://dev.to/fagugon283/my-ai-coding-agents-kept-forgetting-why-they-did-things-so-i-built-them-a-shared-memory-o5n</link>
      <guid>https://dev.to/fagugon283/my-ai-coding-agents-kept-forgetting-why-they-did-things-so-i-built-them-a-shared-memory-o5n</guid>
      <description>&lt;p&gt;If you code with AI agents — Claude Code, Cursor, Codex, Copilot — you've probably hit these two walls:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Every session starts from zero.&lt;/strong&gt; The agent has no idea what happened yesterday, what you already decided, or what it was in the middle of.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The &lt;em&gt;why&lt;/em&gt; evaporates.&lt;/strong&gt; Three months later you stare at a function and have no clue why it's built that way. The reasoning lived in a chat that's gone.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We solved "where does the code live" with git decades ago. We never solved "where does the &lt;em&gt;reasoning&lt;/em&gt; live" — and now that agents generate the code, that gap hurts more than ever.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;rational-agnostic&lt;/strong&gt;: a small, vendor-neutral layer that lives inside your repo as plain markdown files. No SaaS, no account, no database.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it actually does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Decisions.&lt;/strong&gt; Every non-trivial choice is recorded ADR-style (context / decision / why / consequences). One file per decision, git-diffable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traceability.&lt;/strong&gt; Functions get a &lt;code&gt;// @why: D-ab12cd&lt;/code&gt; tag. You can take any function, hash its body, and jump straight to the decision behind it — and detect drift when the body later changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared memory + task state.&lt;/strong&gt; Agents of &lt;em&gt;any&lt;/em&gt; vendor read and write the same context, so Cursor picks up where Claude Code left off instead of starting cold.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token-aware retrieval.&lt;/strong&gt; &lt;code&gt;get_context&lt;/code&gt; hands the agent only the relevant slice within a token budget, instead of dumping the whole history.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything is persisted in English and in markdown, so it stays portable, searchable, reviewable in PRs, and diffable in git.&lt;/p&gt;

&lt;h2&gt;
  
  
  Zero-config for every agent
&lt;/h2&gt;

&lt;p&gt;Each AI client reads a &lt;em&gt;different&lt;/em&gt; file for MCP config and project instructions. So &lt;code&gt;init&lt;/code&gt; writes (and safely merges into) the right file for each one:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Agent&lt;/th&gt;
&lt;th&gt;MCP config&lt;/th&gt;
&lt;th&gt;Instructions&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.mcp.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cursor&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.cursor/mcp.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.codex/config.toml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini CLI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.gemini/settings.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;GEMINI.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Copilot&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.vscode/mcp.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.github/copilot-instructions.md&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx rational-agnostic init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open any of those agents in the repo and the MCP server + protocol are already wired. The CLI works with zero MCP setup too — every operation is also a command.&lt;/p&gt;

&lt;h2&gt;
  
  
  Already have a codebase?
&lt;/h2&gt;

&lt;p&gt;Don't start from a blank slate. &lt;code&gt;adopt&lt;/code&gt; inventories the project (languages, manifests, entry points, largest files) and lays out an onboarding plan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rational-agnostic init
rational-agnostic adopt          &lt;span class="c"&gt;# read-only inventory + plan&lt;/span&gt;
rational-agnostic adopt &lt;span class="nt"&gt;--write&lt;/span&gt;  &lt;span class="c"&gt;# baseline decision + adoption task&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Legacy untagged code is fine — &lt;code&gt;verify&lt;/code&gt; only flags &lt;code&gt;@why&lt;/code&gt; tags pointing to a &lt;em&gt;missing&lt;/em&gt; decision, never existing code. And a core rule: &lt;strong&gt;never invent rationale&lt;/strong&gt;. If the agent can't tell why something exists, it asks instead of fabricating.&lt;/p&gt;

&lt;h2&gt;
  
  
  Boring on purpose (the good kind)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;MIT, &lt;strong&gt;zero native dependencies&lt;/strong&gt;, &lt;code&gt;npm audit&lt;/code&gt; clean.&lt;/li&gt;
&lt;li&gt;The optional local-embedding model is opt-in; by default it uses a dependency-free lexical embedder, so there's nothing to download and no native build at install time.&lt;/li&gt;
&lt;li&gt;The vector index is just a rebuildable cache — the markdown files are always the source of truth.&lt;/li&gt;
&lt;/ul&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i &lt;span class="nt"&gt;-g&lt;/span&gt; rational-agnostic
&lt;span class="nb"&gt;cd &lt;/span&gt;your-repo &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; rational-agnostic init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 &lt;strong&gt;npm:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/rational-agnostic" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/rational-agnostic&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd genuinely love feedback — especially on whether the &lt;code&gt;@why → decision&lt;/code&gt; traceability is useful in your workflow or overkill. What do you do today to keep your AI agents from forgetting context?&lt;/p&gt;

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