← All work
CASE STUDYAI engineering · Developer workflow

Personal Memory Bank

AI coding assistants can remember a lot and still forget the one decision that made yesterday's code make sense. PMB keeps a small project memory useful without letting stale notes become accidental law.

The problem

AI coding sessions can understand a complicated file and still miss why the team chose that design. Repeating the entire project story at every start is tedious. Dumping a growing pile of notes into the prompt creates a different problem: old assumptions, conflicting instructions, and task state that sounds current long after it has changed.

Five files with different jobs

PMB keeps a compact memory bank: a project brief for durable intent, system patterns for architecture, technical context for the stack, active context for current work, and progress for what has happened. They are not five interchangeable notebooks. The brief has higher authority than a volatile task note; conflicts should be surfaced rather than silently reconciled.

The mb CLI scaffolds a project, checks status, queries tagged context, diagnoses problems, and upgrades governance templates. It is meant to reduce the cost of keeping the memory accurate, not merely create more files for the assistant to read.

Trust requires maintenance

  • Freshness metadata and provenance record when a file was reviewed and whether content has been compacted through an AI summary.
  • mb doctor checks structural health, drift, integrity, and the size of the context loaded at startup.
  • Hooks enforce local command rules; CI catches repository-wide invariants. Semantic review has its own focused roles.
  • Task contracts and review workflows give the assistant explicit scope and a place to challenge its own conclusions.
What context visibility looks like
Startup Context
Files loaded:      6
Estimated tokens:  ~4500
Largest contributors:
  CLAUDE.md                             ~2500 tokens
  memory-bank/systemPatterns.md         ~780 tokens
  memory-bank/techContext.md             ~420 tokens
30-day growth:     +8% [OK]
Stale but loaded:  none [OK]
Documented mb doctor example from the repository README, not a fresh measurement of this website. It shows the questions the diagnostic makes visible: how much context loads, what contributes to it, and whether stale material is still included. Read the source example →

A failure that changed the tool

A deprecated validation command once printed a helpful redirect and exited successfully. A caller read that zero exit code as “validation passed,” though no validation had run. Moved commands now exit non-zero. It is a small fix with a larger lesson: clear prose does not repair a broken automation contract.

Why I keep working on it

I do not want an assistant with a giant scrapbook. I want the small amount it carries into a session to be worth trusting. Ownership, stale-state detection, handoffs, conflict resolution, and deterministic checks are the real engineering work here. The model can help reason about a decision; it should not be the only witness that the system is healthy.

More things I've built

Different project, different mess.

I am not trying to force every project into one architecture story. Each one has its own weird edges. The useful part is seeing what I chose to do about them.

Explore all work →