<?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: Karel Test</title>
    <description>The latest articles on DEV Community by Karel Test (@kareltestspecial).</description>
    <link>https://dev.to/kareltestspecial</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%2F4011861%2Faa130906-e55b-4dda-b3e8-ec391d6feb42.png</url>
      <title>DEV Community: Karel Test</title>
      <link>https://dev.to/kareltestspecial</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kareltestspecial"/>
    <language>en</language>
    <item>
      <title>MACCHA: Give Claude Code, Antigravity &amp; OpenCode one shared brain — a secure, self-improving assistant with long-term memory</title>
      <dc:creator>Karel Test</dc:creator>
      <pubDate>Thu, 02 Jul 2026 07:43:04 +0000</pubDate>
      <link>https://dev.to/kareltestspecial/maccha-give-claude-code-antigravity-opencode-one-shared-brain-a-secure-self-improving-4cda</link>
      <guid>https://dev.to/kareltestspecial/maccha-give-claude-code-antigravity-opencode-one-shared-brain-a-secure-self-improving-4cda</guid>
      <description>&lt;p&gt;&lt;strong&gt;Multi-Agent Continuous Context Harness (MACCHA): give Claude Code, Antigravity and OpenCode one shared brain and turn them into one secure, real-world, self-improving digital assistant with long-term memory.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every new session, my AI coding agent forgets everything. My stack, my preferences, yesterday's hard-won lessons — gone. I got tired of re-explaining myself ten times a week, so I built a small system that fixes it. It's plain text files, it's MIT-licensed, and it runs on a Chromebook.&lt;/p&gt;

&lt;p&gt;I call it &lt;strong&gt;MACCHA&lt;/strong&gt; — Multi-Agent Continuous Context Harness. It just hit &lt;strong&gt;v1.0&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;If you use coding agents seriously, you know the tax:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Transient memory.&lt;/strong&gt; Close the terminal, lose the context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repetitive setup.&lt;/strong&gt; "Use pnpm, not npm." "This repo deploys via Netlify, not git push." Every. Single. Session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vendor lock-in.&lt;/strong&gt; Cloud "memory" features tie your brain to one tool. Switch agents and you start from zero again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I bounce between three agents — Claude Code, OpenCode, and Antigravity — depending on the task. None of them shared what they knew.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea: memory is just files
&lt;/h2&gt;

&lt;p&gt;Instead of a database or a cloud silo, MACCHA stores memory as &lt;strong&gt;plain markdown and JSON files in your home directory.&lt;/strong&gt; Any agent that can read and write files can plug into the same brain.&lt;/p&gt;

&lt;p&gt;That's the whole trick. A lesson Antigravity learns on Monday is a file Claude Code reads on Wednesday — in a completely different project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/BRAIN/
  AGENTS.md              # project-specific rules
  memanto/               # the memory engine (vector recall + decay)
  learned-lessons/       # curated, categorized lessons
  tms/                   # todo / in-progress / done (shared task state)
  hooks/                 # session-start / session-end automation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why not an always-on agent?
&lt;/h2&gt;

&lt;p&gt;The popular direction right now is autonomous, 24/7 agents (Hermes, OpenClaw, and friends). They're impressive, but they assume you have compute to burn.&lt;/p&gt;

&lt;p&gt;MACCHA goes the other way on purpose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No background daemon.&lt;/strong&gt; It only spends compute when &lt;em&gt;you&lt;/em&gt; invoke it. Session-start and session-end hooks do the bookkeeping; nothing runs in between.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weak-hardware friendly.&lt;/strong&gt; I genuinely run this on a Chromebook (Crostini/Debian). No GPU, no cloud worker.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human-in-the-loop by default.&lt;/strong&gt; The agent &lt;em&gt;proposes&lt;/em&gt;, you &lt;em&gt;approve&lt;/em&gt;. For anything sensitive — financial, personal, irreversible — that's a feature, not a limitation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The 7-tier context hierarchy
&lt;/h2&gt;

&lt;p&gt;The risk with "give the agent memory" is context bloat: stuff 50KB of history into every prompt and the model drowns. MACCHA organizes context into &lt;strong&gt;seven isolated tiers&lt;/strong&gt; so each session loads only what matters, most-critical first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             ┌─────────────────────────────────────────────────────────┐
             │                      USER REQUEST                       │
             └────────────────────────────┬────────────────────────────┘
                                          │
                                          ▼
                      ┌───────────────────────────────────────┐
                      │    TIER 0: ~/AGENTS.md (Bootstrap)    │
                      └───────────────────┬───────────────────┘
                                          │
                                          ▼
                      ┌───────────────────────────────────────┐
                      │  TIER 1: ~/BRAIN/AGENTS.md (Mandates) │
                      └───────────────────┬───────────────────┘
                                          │
                                          ▼
                      ┌───────────────────────────────────────┐
                      │  TIER 2: ~/.gemini/GEMINI.md (Global) │
                      └───────────────────┬───────────────────┘
                                          │
                                          ▼
        ┌─────────────────────────────────┴─────────────────────────────────┐
        ▼                                 ▼                                 ▼
┌──────────────┐                  ┌──────────────┐                  ┌──────────────┐
│    TIER 3    │                  │    TIER 4    │                  │    TIER 5    │
│    SITUATION │                  │  LIVE STATE  │                  │ AUTO-IMPROVE │
│    ~/INFO    │                  │ ~/BRAIN/tms  │                  │~/IMPROVEMENT │
└──────────────┘                  └──────────────┘                  └──────────────┘
        │                                 │                                 │
        └─────────────────────────────────┼─────────────────────────────────┘
                                          │
                                          ▼
                      ┌───────────────────────────────────────┐
                      │  TIER 6: ~/BRAIN/learned-lessons/     │
                      └───────────────────┬───────────────────┘
                                          │
                                          ▼
             ┌─────────────────────────────────────────────────────────┐
             │              FULLY CONTEXTUALIZED AI AGENT              │
             └─────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One routing rule keeps it sane: &lt;strong&gt;a piece of information lives in exactly one tier.&lt;/strong&gt; On conflict, higher tiers win. Lower tiers are loaded eagerly; deep knowledge (learned lessons) is indexed and pulled in only when relevant. The agent stays focused instead of re-reading its entire history every turn.&lt;/p&gt;

&lt;h2&gt;
  
  
  The memory engine: Memanto
&lt;/h2&gt;

&lt;p&gt;The working-memory layer is a small engine called &lt;strong&gt;Memanto&lt;/strong&gt;. It does four things I couldn't get from "just append to a file":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vector recall&lt;/strong&gt; — semantic search over past facts and lessons, not keyword grep.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confidence decay&lt;/strong&gt; — old, unreinforced memories fade; durable facts stay. Noise doesn't accumulate forever.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conflict detection&lt;/strong&gt; — when a new fact contradicts an old one, it flags it instead of silently storing both.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repo-state-wins verification&lt;/strong&gt; — if a memory says "the flag is &lt;code&gt;--foo&lt;/code&gt;" but the code no longer has it, the &lt;em&gt;code&lt;/em&gt; wins. Memory reflects what &lt;em&gt;was&lt;/em&gt; true; it gets checked against reality before it's trusted.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Show, don't tell
&lt;/h2&gt;

&lt;p&gt;A real example from this week. In one session I taught the agent a deploy quirk: &lt;em&gt;"this site doesn't deploy on git push — you must run &lt;code&gt;netlify deploy --prod&lt;/code&gt; and curl-verify the result."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That became one lesson file. Two days later, in a different agent, I asked it to ship a change to that same site. It pulled the lesson, ran the right deploy command, and verified the URL — without me saying a word about Netlify. That's the entire point: &lt;strong&gt;learn once, apply everywhere.&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;It's MIT-licensed, PII-free, and installs with a single setup script. &lt;strong&gt;v1.0 was released this week&lt;/strong&gt; — fully documented, with hard PII and language gates on the publish pipeline:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/KarelTestSpecial/real-agent-setup" rel="noopener noreferrer"&gt;https://github.com/KarelTestSpecial/real-agent-setup&lt;/a&gt;&lt;/strong&gt; (&lt;a href="https://github.com/KarelTestSpecial/real-agent-setup/releases/tag/v1.0" rel="noopener noreferrer"&gt;release notes&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;I'd genuinely love feedback — especially on the hard parts: &lt;strong&gt;what do you use for cross-session memory, and how do you handle decay and conflicting facts?&lt;/strong&gt; That's the part I'm least sure I've gotten right.&lt;/p&gt;

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