Lightweight, zero-dependency prompt that prevents AI agents from losing context A developer has discovered a lightweight, zero-dependency prompting convention that prevents AI coding agents from losing context across sessions. The technique uses an append-only design log where numbered, dated sections are never edited, and later sections supersede earlier ones by citation. The mandatory 'Not done' list at the end of each section further prevents optimistic completion reports. The append-only design log A prompting convention for working with coding agents over many sessions. --- The trick, in a paragraph Ask the agent to keep a design-and-work log, and make it append-only : numbered dated sections, never edited, later ones superseding earlier ones by citation. Require every section to end with a list of what was not done. Then state that convention in the file the agent loads on every session. What you get is a document that keeps its own refutations. When a belief turns out to be wrong, the wrong belief stays on the page and a new section says so by number — so a fresh session with no context can't reintroduce the mistake as an improvement, which is exactly what it would otherwise do whenever the refuted design is the more principled-looking one. The mechanism underneath is economic: append-only drops the cost of a correction from "find and rewrite everything that depended on this" to "write one new subsection," and lowering the price of admitting error is what raises the rate of it. The mandatory "Not done" list attacks the other characteristic failure — the optimistic completion report with the awkward 20% quietly dropped. How it was found By accident, and the accident is instructive. The opening message of the project this came from asked for something much smaller: it handed the agent a plan document, described as the file I am going to tell you to use , and said append your questions and answers to it . Two things in that sentence did the work, and only one was on purpose. "Append" became the operating verb for that whole file rather than for one task. And framing the document as the user's — a spec authored by someone else and handed over — made it read as not-mine-to-edit. That posture is what yields append-and-cite instead of quiet rewriting. The same message also asked do you have any questions? , which produced a tagged list of open decisions plus a subsection of "smaller things I'll decide unless told otherwise" — the direct ancestor of every later "Not done" list. The convention itself appeared in a section nobody asked for. Early on, a factual claim in the plan turned out to be wrong. The obvious move is to edit the sentence. Instead the agent appended a section titled "corrections to the body above," cited the wrong section by number, and left the false sentence standing. That step — from append the answers to append corrections too, and let earlier text stay wrong — is the entire convention, and it happened only because "append" was already the default verb for the file. What the accident did not produce is the steady rhythm that made it valuable: one numbered dated section per unit of work, each ending in a mandatory "Not done" list. That stabilized later, over dozens of sessions and about sixty sections. So the wording below states it outright rather than hoping it emerges again — which is the point of the next section. Copy this Two blocks. The first is what you say when you open the project; the second is what you paste into the file the agent loads every session. Both are needed — the first starts the convention, the second is what keeps it alive across sessions. The rest of this document is why. 1 — Say this at the start of the project replace DESIGN.md with whatever you want the log called; keep the file framed as yours , handed to the agent, not as its own scratchpad : Keep a design-and-work log at DESIGN.md. Write the plan first, in numbered sections. After that, the log is append-only: every unit of work appends a new numbered, dated section, and you never edit an earlier one. When you find that something earlier is wrong, do not fix it in place — append a section that names the section by number, states what you believed, what the evidence actually showed, and what changed. Earlier sections are allowed to stay wrong; the rule is that higher-numbered sections win. Every section ends with an explicit "Not done" list: what you deliberately skipped, what you deferred and why, and what's still unverified. Be specific enough that I could pick any item up without asking you a question. Attach evidence to claims. If something passed, say what ran and what the numbers were. If it's an assumption you couldn't check, say so in those words rather than writing it as a fact. 2 — Put this in CLAUDE.md / AGENTS.md once the log has a few sections: markdown DESIGN.md is the project's memory: §1–§N are the original plan, later sections are dated work entries. The convention is append-only — later sections supersede earlier ones rather than editing them , so earlier sections may contain claims that later ones refuted. When something looks contradictory, the higher-numbered section wins. New work appends a numbered, dated section with evidence and an explicit "Not done" list. Consult it before non-trivial work. Optional third block, in the same CLAUDE.md — a second append-only log at a coarser grain, greppable with git log -S : markdown Commit messages follow the same shape: a terse subject, then prose explaining what the evidence actually showed. Two rules for yourself, both easy to get wrong: - Never ask for the log to be cleaned up, condensed, or made consistent. A planning section that still says something false, with a later section pointing at it, is the artifact working. - Never let the always-loaded file become a log, or the log become a summary. Opposite policies: one is appended and never edited, the other is edited in place and always current. --- That's the whole thing. What follows is why each part is load-bearing, what it costs, and where the wording came from. Nothing below depends on the originating project's domain. --- 1. What the convention is Five rules: 1. One numbered, dated section per unit of work. Numbers are plain sequential integers, not semantic. Nobody has to decide where a section goes — new work goes at the end, always. 2. Append; never edit an earlier section. When a later finding contradicts an earlier one, the earlier text stays wrong and the later section says so, by number. 3. Every section ends with an explicit "Not done" / "Still open" list. 4. Corrections get their own titled subsection that names what they overturn. Headings that read like §7.4 WAS WRONG: