<?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>Forem: Jeremy Mandile</title>
    <description>The latest articles on Forem by Jeremy Mandile (@jeremy_mandile_).</description>
    <link>https://forem.com/jeremy_mandile_</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3881382%2Fa9a3b89b-f004-42b8-b886-d2fdc468cf70.jpg</url>
      <title>Forem: Jeremy Mandile</title>
      <link>https://forem.com/jeremy_mandile_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jeremy_mandile_"/>
    <language>en</language>
    <item>
      <title>I Gave My AI Agents a Single Markdown File — It Cut Recurring Mistakes to Zero</title>
      <dc:creator>Jeremy Mandile</dc:creator>
      <pubDate>Mon, 11 May 2026 15:28:35 +0000</pubDate>
      <link>https://forem.com/jeremy_mandile_/i-gave-my-ai-agents-a-single-markdown-file-it-cut-recurring-mistakes-to-zero-2n47</link>
      <guid>https://forem.com/jeremy_mandile_/i-gave-my-ai-agents-a-single-markdown-file-it-cut-recurring-mistakes-to-zero-2n47</guid>
      <description>&lt;p&gt;Agent "invoice-bot" generated a PDF invoice with a € sign. DejaVu Sans didn't support it — the symbol rendered as a blank square in the customer email. I fixed invoice-bot and moved on.&lt;/p&gt;

&lt;p&gt;Two days later, "report-gen" produced a quarterly PDF with the same broken character. No connection between the two agents. Same mistake, different day.&lt;/p&gt;

&lt;p&gt;That was the moment I realized agents don't share a brain. They share a codebase, a tool set, and a prompt — but they have no persistent &lt;strong&gt;lessons‑learned&lt;/strong&gt; memory.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Fix: A Single File Called LESSONS.md
&lt;/h2&gt;

&lt;p&gt;Instead of building a vector database, a reinforcement‑learning pipeline, or a complex critique‑agent system, I did the simplest thing that could possibly work:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I gave them a LESSONS.md file.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A single Markdown file, checked into the repo, that any agent can read before acting and write to after a mistake. It has three sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DO NOT&lt;/strong&gt; — hard blocks. Agents abort immediately and substitute the safe alternative.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PITFALLS&lt;/strong&gt; — context‑dependent gotchas to watch for.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SUCCESS PATTERNS&lt;/strong&gt; — techniques that actually worked.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's what the invoice‑bot entry looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;### DO NOT use DejaVu Sans for currency symbols&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="gs"&gt;**Why:**&lt;/span&gt; Missing glyph for €, £, ¥.
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="gs"&gt;**Use instead:**&lt;/span&gt; Noto Sans or Liberation Sans.
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="gs"&gt;**First seen:**&lt;/span&gt; 2025-06-10 (agent: invoice‑bot)
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="gs"&gt;**Tags:**&lt;/span&gt; #pdf #fonts #unicode #currency
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The PR auto‑merges. Report‑gen's next PDF job hits the lesson-guard plugin, sees the #pdf tag, and automatically switches fonts. The error never appears again.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Pre‑Action Guard&lt;/strong&gt; — Before any non‑trivial task, agents read LESSONS.md. A matching DO NOT entry? Stop and substitute. No human needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Post‑Failure Write‑Back&lt;/strong&gt; — When a mistake happens, the agent formats a new entry and submits a PR. Auto‑merge, and every agent in the fleet learns from it within minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Retrieval Is Just Grep&lt;/strong&gt; — Tag matching via ripgrep. No vector DB, no embeddings, no RAG pipeline. A grep call is faster than any API round‑trip.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why It Works (When Fancy Systems Fail)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zero latency memory.&lt;/strong&gt; No embedding API call, no slow vector store. LESSONS.md is sitting in the file system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Human‑auditable.&lt;/strong&gt; Open the file and immediately understand what agents are avoiding and why. No hidden latent space.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent‑actionable.&lt;/strong&gt; Every DO NOT pairs with a concrete Use instead. Agents self‑correct without asking a human.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No prompt rot.&lt;/strong&gt; The main system prompt stays clean. All the urgent "don't do X because Y broke last Tuesday" lives in LESSONS.md, which ages out naturally.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Results
&lt;/h2&gt;

&lt;p&gt;After six months, my OpenClaw agent swarm went from &lt;strong&gt;~12 recurring mistake classes per month&lt;/strong&gt; to &lt;strong&gt;zero&lt;/strong&gt; of those same classes repeating. New mistakes still happen — but each one only happens once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond Agents: The LESSON.md Spec
&lt;/h2&gt;

&lt;p&gt;While building this, I realized the same philosophy — Markdown + YAML front matter = actionable knowledge — could solve a different problem: portability of programming lessons across platforms.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;LESSON.md&lt;/strong&gt;, a universal lesson container. Write a programming tutorial once, and any LMS, IDE, or LLM can ingest it. The spec covers title, language, difficulty, topics, prerequisites, and objectives in YAML front matter, plus standard body sections.&lt;/p&gt;

&lt;p&gt;Both specs are part of the &lt;strong&gt;md-knowledge-format&lt;/strong&gt; family — open‑source, MIT‑licensed, and framework‑agnostic.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Repo
&lt;/h2&gt;

&lt;p&gt;Everything is live at &lt;strong&gt;&lt;a href="https://github.com/jeremymandile/md-knowledge-format" rel="noopener noreferrer"&gt;github.com/jeremymandile/md-knowledge-format&lt;/a&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Formal specs for both formats (v1.0)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A single Python 3.6+ CLI — scaffold, validate, export (zero mandatory dependencies)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker wrapper for containerized use&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OpenClaw plugins (npm install @jeremymandile/openclaw-lessons)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Worked examples + LMS integration guide&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;The best systems are often just a file. A sticky note on a monitor. A logbook entry. An after‑action review. LESSONS.md is that pattern — made machine‑readable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What would make this more useful for your stack?&lt;/strong&gt; I'd love feedback — especially from anyone running multi‑agent systems or building LMS tooling.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>markdown</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
