Your agent remembers the project because everything is written in files

Between sessions an agent remembers only what is in the project. So the rules, the knowledge and the history live in files: the agent reads them at the start of work and updates them after every step.

If there are many documents, an LLM wiki or RAG joins the wiki. That is the “Long-term memory” choice in the setup.

Files and what they do

my-project
AGENTS.mdRules, tone and the order of work. The agent reads it first, and Codex reads it directly.
CLAUDE.mdOne line, @AGENTS.md, so Claude Code loads the same rules.
spec.mdWhat we build, what is out of scope and examples of acceptance.
tasks.mdTasks and statuses: you see where the work stopped.
docs/wiki/Stable knowledge: how the project works and why it was decided this way.
LOG.mdThe log: what was done, what was decided and what is next. Newest at the bottom.
HANDOFF.mdWhere we stopped: the checked version, the gap and the next step.
.claude/MEMORY.mdOptional: a short list of key facts that the agent checks before work.

The cycle after every step

  1. 1An entry at the end of LOG.md
  2. 2A wiki page if there is new stable knowledge
  3. 3New statuses in tasks.md
  4. 4HANDOFF.md before a pause
  5. 5A commit of the working state

The loop comes alive here: the step the agent is doing right now lights up.

Done is not the same as checked

An agent can write “done” while nothing works. The protocol asks for one scenario from start to finish and three checks: a normal case, an edge case and a wrong input. The agent says what it ran and what it saw.

First aid: symptom and remedy

The agent forgot a decision

LOG.md and HANDOFF.md: decisions are written down and read at the start

It touches files it should not

A plan before code and clear boundaries in AGENTS.md

It says “done”, but nothing works

One scenario and three checks before “done”

It burns through tokens

A knowledge map, narrow reading and a fresh session for each task

The same procedure again and again

A skill, at level 2

Dangerous commands

A read ban for .env and, at level 3, a hook

You need a second pair of eyes

The reviewer role, and at level 3 a reviewer subagent

A long task for the night

A long-task brief with stop conditions, at level 4

Levels: add a layer when it treats a real problem

1Level 1: start

One agent, rules, wiki and log. Enough for most projects.

2Level 2: growing project

Adds an architecture page and turns repeated procedures into skills.

3Level 3: team of agents

A reviewer subagent and a critics-and-judge pass for important changes.

4Level 4: autonomy

Long tasks with a brief, stop conditions and reports by checked results.

Levels 3 and 4 open for those who support turboboy. Test mode: open to everyone for now. Support turboboy

Build your BOOTSTRAP