DEV Community

Cover image for Memoteca: what I learn in one Claude Code project reaches the others
Thomas Casali
Thomas Casali

Posted on Edited on

Memoteca: what I learn in one Claude Code project reaches the others

Within a session, Claude Code remembers everything. That's what the context window is for. The problem is what happens between sessions: you close the terminal and everything it learned (the bug that took a day to find, the deploy quirk, the architectural decision) stays locked in that chat. Claude Code's auto-memory helps, but it is per project and per machine, so what I learned in one repo never reached the others. The model isn't forgetful; the knowledge just doesn't survive the session.

I'm a high-school CS teacher in Italy who ships software in the gaps of the day: live products ranging from tournament platforms and booking systems to a card game with ELO rankings and mobile apps on the App Store and Play Store. The long tail is the fun part: the ESP32+RFID system that opens the doors and meters the showers at beacharena.it (with a Telegram bot for ops), an industrial remote-control dashboard born from reverse-engineering a proprietary protocol, an AI assistant that reads school circulars over Telegram, and the portals parents use to sign school paperwork with an email OTP. All built and maintained with Claude Code, solo. At that scale, session amnesia is a tax on every working hour.

So I built a pipeline for it: an implementation of Karpathy's LLM Wiki pattern with a promotion exam on top. In August I open-sourced the result as Memoteca, a shared, curated knowledge base that every session and every project reads from and feeds.

The architecture: three tiers

Messy sessions        → LLM Wiki (living synthesis) → Stable KB (authoritative truth)
                       ↑                             ↑
                       /kb-ingest                    /kb-promote (only when mature)
Enter fullscreen mode Exit fullscreen mode

The promotion exam is what keeps the system honest. Everything goes into the wiki cheaply: session summaries, decisions, lessons. But knowledge only gets promoted to the stable KB when it has earned it: it is used by 2+ projects, or it is a gotcha already paid for, or a standard I declare, and in every case it is verified in production or on a real device. The wiki is allowed to be wrong. The KB is not. Without that exam, your knowledge base fills with junk and you stop trusting what it quotes back. (Ask me how I know.)

After four months, the wiki holds 80+ interlinked pages of projects, concepts, lessons, and decisions. Opened as an Obsidian graph: one cluster per project, half a dozen concepts acting as hubs, and a long tail of pages with two links each.

The LLM wiki after four months: 80+ interlinked pages, seen as an Obsidian graph

Three stories from running this

1. My multi-agent system was silently dead for months. I had 10 specialist subagents (backend, frontend, devops...). Claude Code registers agents from YAML frontmatter. An editor had escaped the delimiters (\--- instead of ---), so it registered none of them. No errors. Nothing. Multi-agent work still happened, because Claude Code's built-in generic agents kept running in parallel, which is exactly why nothing looked wrong. What was dead was the part I'd designed: the routing by domain and by model tier. The orchestra played; the sheet music I thought it was following didn't exist. Ten agents, no errors, months. The docs now open with a 30-second check: ask Claude which subagents it can see.

2. I recovered 3 months of lost knowledge from transcripts. I stopped ingesting sessions for a busy quarter. Instead of accepting the loss, I pointed 10 read-only agents at Claude Code's local transcript files (~/.claude/projects/**/*.jsonl), one per project, in parallel, each one cross-checking what it read against the repo's git history, because commit messages are the other half of the story. An hour later I had 15 project pages back, including two products I'd never documented. The transcripts are still on disk. So is the git log.

3. The reviewer caught its own boss. The system has a mandatory rule: before any work is declared done, a reviewer subagent (running on a stronger model) audits it. On its first run it produced 26 findings on a release I'd prepared, including a factual error in docs/orchestration.md, which the orchestrator had drafted (I claimed subagents can't delegate; the reviewer proved otherwise by having the delegation tool in its own hands). I corrected the doc and kept the rule.

What's in the repo

  • The wiki → KB pipeline: 5 slash commands (/kb-ingest, /kb-query, /kb-promote, /kb-lint, /kb-output) + templates
  • 13 orchestrated subagents (3 orchestrators on Haiku, Sonnet and Opus + 10 specialists, correct frontmatter included, see story #1)
  • 16 patterns generalized from production bugs: multi-tenant single-DB, payment webhooks that lie, sync-selector deadlocks, cold-cache page speed...
  • 6 methodological skills Claude picks up from their description, when the description matches (root-cause-before-fix, evidence-before-done, design-approval-first...)
  • Knowledge disaster recovery: repos for knowledge, a vault for secrets, and a restore test script, plus the write-up of my first dry-run, which failed with four silent gaps
  • Install: git clone + ./scripts/install.sh + restart Claude Code. First command to try after a session: /kb-ingest your-project

It's complementary to skills frameworks like Superpowers/GSD/gstack: they tell the agent how to run a session, while this decides what survives it. Install both.

Docs are bilingual: an English front door with native Italian alongside (I'm a teacher and built this partly for my students, and Italy has few native resources on this). Agent/skill content is still Italian: the architecture is language-neutral, and English translations are the most welcome contribution.

Repo: https://github.com/thomascasali/memoteca

I'm Thomas, a teacher by day and an indie dev in the gaps between, from the Italian Riviera. Why give this away? Because the method gets copied anyway; the experience doesn't. If you try the toolkit and something breaks or an approach seems wrong, open an issue: being proven wrong is how half of these patterns were born.


Update, 2026-11-05. I wrote this in August and some of it no longer holds, so I'm correcting it here. The original title and text called this a memory system, and that was the wrong word. Claude Code has its own auto-memory, which works, per project and per machine. What this toolkit adds is knowledge that crosses projects and outlives the session. I've changed the title and the text above to say that. The toolkit is now called Memoteca; it was claude-kb-workflow when I wrote this, and the old link redirects.

The repo is now at v0.4.1. The promotion rule is the one I actually apply: a page qualifies if it is used by 2+ projects, or it is a gotcha already paid for, or a declared standard, and in every case it is verified in production. The subagent pool has 13 agents, with a Haiku worker as the default. The patterns file has 16 patterns instead of 30, because I split the general ones from my personal conventions. There is also a secret scanner and a restore test. The three stories are as they were.

Top comments (0)