Subject: Never debug the same thing twice
BRAINFILE #021 — Tue, Sep 29, 2026
Brainfile — Autopilot for Claude Code. Make Claude Code actually work for you. Free, Tue + Thu.
Preheader: A LEARNINGS.md ledger turns every painful bug into a rule your agent reads next run.
TEACH YOUR SETUP TO NEVER REPEAT A MISTAKE
Running agents daily, you hit the same class of failure again and again — until you write it down where the agent looks. A failure ledger is the cheapest reliability upgrade there is: every novel mistake becomes one line the next run reads before starting.
THE PATTERN
1. Append, same day, while it hurts
The rule is 'novel failure -> ledger line before you move on'. Symptom, root cause, the rule that prevents it. Next-day-you will write a vaguer, less useful entry.
2. Write the RULE, not the story
"2026-07-08: build died" is a diary. "Dev server caches .env — always restart it after env changes" is a rule an agent can obey.
3. Make the agent read it at start
One line in CLAUDE.md: "Before working, read LEARNINGS.md and follow every rule in it." Now the ledger compounds: every run starts smarter than the last.
COPY-PASTE THIS
----------------------------------------
LEARNINGS.md — failure rules (agent: read before working)
Dev server caches .env — restart it after ANY env change.
Never run db:migrate on a dirty git tree — stash first.
The staging API rate-limits at 60 req/min — batch, don't loop.
Long runs: if a lockfile is >1h old with no process, it's stale — delete it.
Rule for adding rules: novel failure -> one line here, SAME DAY.
----------------------------------------
WHY THIS WORKS
Agents don't learn between sessions — files do. Moving lessons out of your head and chat history into a start-of-run read is how a setup gets genuinely better every week instead of resetting. Months of our own uptime improvements are exactly this ledger, compounding.
(Our real failure classes (stale locks, env caching, rate limits) run through this exact mechanism daily.)
FROM THE WORKSHOP: What we shipped: Autopilot v1
Brainfile now leads with Autopilot: tell it what you want and how long it has — it does the work, proves it, and gets better. Six v1 features (the autopilot loop, never-empty backlog, never-forgets ledger, memory + interview onboarding, end-of-run brief, conversation history) ship as real files in the pull.
The lessons here are free, forever. Brainfile is the maintained layer —
everything it includes:
- The full Autopilot run protocol — tell it what you want and how long it has; it does the work and proves it
- All 10 pattern files (the structured plain-file playbooks the run pulls from)
- All 15 role packs (role-tuned setups; the free trial does not include these)
- The freshness feed — versioned updates every week as we learn
- 30-day money-back guarantee — cancel anytime
$99/mo · $999/yr · 30-day free trial, no card.
Start the free 30-day trial (no card): https://brainfile.io/trial
Vote on what we build next: https://brainfile.io/#vote-ladder
Brainfile · brainfile.io · Tue + Thu, always free · reply or [email protected]
Give your AI a working memory. See how Brainfile packages your context at brainfile.io.