« All posts

Preventing Context Loss in AI Agents with Two-Document Pattern

Two-document pattern for AI agents: append-only log and editable index. Prevents context loss, corrects errors.

A new two-document pattern is proposed for AI agents: an immutable, append-only log (DESIGN.md) and an editable index (CLAUDE.md). This approach helps prevent context loss across sessions. The agent appends new sections to the log without altering previous ones, making it easier to correct errors and preventing the reintroduction of refuted beliefs. The "Not done" list highlights skipped or deferred tasks, aiding engineers in managing work more effectively.

This synthesis was produced from its source by AI; there is no human editor or manual review step. How we work