{"slug": "wiki-driven-development", "title": "Wiki-Driven Development", "summary": "A practice called \"wiki-driven development\" proposes that coding agents maintain a short, linked wiki in the repository recording what they decided, rejected and left open, so each new session starts from the human's edit rather than from scratch. The author, adapting an idea from Andrej Karpathy's LLM Wiki, offers a cost formula for deciding when a page is worth writing: a page pays off when the savings from reuse exceed the cost of writing and maintaining it plus the per-session index cost, illustrated by a flaky-test example where a 40,000-token investigation is replaced by a 500-token read. The author argues the wiki complements AGENTS.md — which answers how the agent should work, while the wiki answers where the work stands — and warns that agent-written \"slop\" costs tokens and buries what matters.", "body_md": "Your agents make decisions all day. Then the session ends, and the decisions go with it. The next session starts from scratch, and unless you read the transcript, so do you.\n\n**Wiki-driven development** fixes that. Agents keep a short, linked wiki in the\nrepo, and they write it **for you**: what they decided, what they rejected and\nwhat’s still open. You read it and edit it to set direction. The next session\nstarts from your edit.\n\nOne set of pages does three jobs:\n\n- **You can see what the agent is doing** , without reading a transcript.\n- **The next session starts where the last one stopped** , instead of working\neverything out again.\n- **Your team gets the same context.** A teammate, or their agents, can pick up\nan area by reading its page instead of asking you.\n\nIt’s not a replacement for `AGENTS.md`. That file answers *how should the agent\nwork?* The wiki answers *where are we, and where are we going?*\n\nI’ve adapted the idea from Karpathy’s LLM Wiki,<sup>[1](#fn:1)</sup> where an LLM maintains\na knowledge base for you. His version tries to capture everything. This one\nkeeps only what you need to steer, so it stays short enough to read.\n\n## Writing the right amount[#](#writing-the-right-amount)\n\nAgents love to write. Ask one to keep notes and you’ll get a page for every file it touched and a summary of every summary. That’s slop, and it’s worse than no wiki: it costs tokens to load, it buries what matters, and nobody reads it.\n\nSo how much should the wiki hold? Here’s a formula for it. A page is worth writing when:\n\nLet’s break it down.\n\nSuppose an agent spends a while working out why a test is flaky. Call the cost\nof that work , for **find**. Say it’s 40,000 tokens. Without a page,\nevery session that hits the same test pays  again.\n\nNow suppose the agent writes it down. Reading the page costs , for\n**read**. Say that’s 500 tokens. Each time someone needs the answer, they pay\n instead of , so each use saves:\n\nIf the page gets used times, the total saving is:\n\nBut the page isn’t free. Writing it, and keeping it current, costs . So the page is worth it when:\n\nWe can expand this by adding the index. Every session reads the index before anything else, so every page also costs a little in every session, whether that session needs it or not. Call the cost of one index line , and the total number of future sessions . That gives the full formula:\n\nPlug in the flaky test. Say it’s needed 10 times over the next 200 sessions, writing costs 2,000 tokens, and the index line costs 30:\n\nWrite it down. It pays for itself the first time it’s used.\n\nYou won’t know the real numbers, and you don’t need them. Slop is any page where the right side is bigger than the left, and each variable tells you how to avoid it:\n\n- **Large : write it down.** Anything that took real work to find is worth\na page. For people,  is even bigger, because the alternative is reading\nold transcripts. Most won’t, so they guess.\n- **: don’t.** A fact that won’t be needed again belongs in the pull\nrequest.\n- **: don’t.** If the code already says it, a page adds nothing.\nWrite down what the code can’t say: decisions, rejected options, open\nquestions and where things stand.\n- **Large : shorten it.** Keep pages to one screen.\n- **Large : prune.** Every page costs every session a little. That adds\nup, which is why the wiki needs a hierarchy.\n\n## Keeping things readable[#](#keeping-things-readable)\n\nThe formula decides what goes in the wiki. It doesn’t decide how it’s written, and left alone, an agent writes like this:\n\nIt is important to note that the refund service leverages a robust retry mechanism, ensuring seamless handling of transient failures across the payment landscape.\n\nThat sentence costs tokens and says almost nothing. You’ve seen the tells: “delve”, “robust”, “seamless”, “it’s worth noting”, “not only X but also Y”, and a summary at the end of every section.\n\nWordy pages hurt the formula twice. They raise , because every read costs more. They also lower for people, because people stop reading pages that sound generated.\n\nThe fix is to give the agent a writing style, the same way you give it coding\nconventions. I use a skill based on ASD-STE100 Simplified Technical\nEnglish.<sup>[2](#fn:2)</sup> STE is a controlled language from the aerospace industry, designed so that\nmaintenance manuals can’t be misread by someone working on an aircraft,\nwhether or not English is their first language. It keeps sentences short,\ngives each word one meaning, and prefers active voice and common verbs.\n\nStrict STE reads like a manual. The skill uses a loose version:\n\n- **Short sentences** , about 10 to 25 words, with one main idea each.\n- **Common words.** Use, not utilize. Help, not facilitate. Keep real technical\nterms, and explain them if needed.\n- **The same word for the same thing** , every time.\n- **Explain why, not only what.** Add a plain-English sentence after anything\nhard.\n- **No filler and no AI tells.** No “in order to”, no “robust”, no em dashes,\nno summary paragraphs.\n- **Keep every fact.** Simplifying must never drop a number or a name.\n\nHere’s the refund sentence again, after the skill:\n\nThe refund service retries failed payment requests up to three times. This handles short outages without failing the refund.\n\nAnd a decision page, before:\n\nAfter careful consideration of several potential approaches, the team\nultimately decided to move forward with utilizing `ApiError`, which provides\na powerful and flexible foundation for error handling across the codebase.\n\nAfter:\n\nAll API errors use `ApiError`, because the frontend maps its error codes to\ncustomer messages. Rejected: plain `Error`, which would force the frontend\nto parse message strings.\n\nYou can use the skill as is: [technical-rewrite.txt](https://abduldavids.co.za/skills/technical-rewrite.txt).\nSave it as `.claude/skills/technical-rewrite/SKILL.md`, or paste it into any\nagent’s instructions, and add one line to `AGENTS.md`:\n\n| \n\n```\n1\n```\n\n | \n\n```\nWrite wiki pages using the technical-rewrite skill.\n```\n\n | \n\n## Click through it[#](#click-through-it)\n\nA folder of markdown files isn’t a wiki. Ward Cunningham’s first wiki, in 1995,\nwas a set of editable pages that linked to each other.[3](#fn:3)\n\nMost repos end up on the left: notes with names that made sense to whoever wrote them, opened until you get lucky. On the right, you start at the architecture, click down to Refunds, and land on one short page with that feature’s status, decisions and open questions.\n\n**For people,** a hierarchy is the difference between reading the wiki and\nnot. A flat\nfolder gets opened once and ignored. Make the top page a visual map of the\narchitecture where every box is a link, and have every page below it link up\nand across.\n\n**For agents,** it’s a cheap index. Walking a shallow, wide tree costs a few\nthousand tokens, where loading everything costs hundreds of thousands.<sup>[4](#fn:4)</sup> It\nalso shrinks : a session working on refunds reads only the index lines\non the path to refunds.\n\nLinks also make the wiki checkable. Link each decision to the session or pull request it came from, so you can confirm the agent’s summary matches what was actually said. And mark each decision as decided, proposed or replaced, so an agent doesn’t treat a half-finished idea as a rule.\n\n## Catching wrong pages[#](#catching-wrong-pages)\n\nThe formula assumes every page is right. A wrong page flips the sign. Instead of saving each time it’s read, it does damage, and it keeps doing damage until someone notices:\n\n| Variable | What it is | \n|---|---|\n|  | The total damage a wrong page does | \n|  | The harm each time a session acts on it, such as a wrong refactor someone has to undo | \n|  | How many sessions read the wrong page before someone fixes it | \n\nAgents trust the wiki, so they won’t lower on their own. People have to.\n\nThis is where being able to see the wiki pays off. Every person clicking through it is another chance to catch a wrong page early, fix it in a pull request, and have the next session read the fix.\n\nServe it as a site, so it’s one click away:\n\n- **From `main`:** what’s true now. This is the version for the team and new\nhires.\n- **From staging:** what the agents believe right now, including unmerged work.\nThis is the version for checking their reasoning in progress.\n\n## What goes wrong[#](#what-goes-wrong)\n\nThe biggest risk is a page that sounds right and isn’t. Agents write the wiki by summarising their own sessions, and now and then they’ll summarise a decision nobody made. Source links are the cheapest defence, because they put every claim one click away from where it came from. That keeps small.\n\nThe other risk is growth. Agents like writing, and a codebase is never finished, so a wiki left alone only gets longer until swamps everything else. Review wiki changes in the same pull request as the code, delete pages once they stop earning their place, and every so often have an agent check the wiki against the code for claims that are no longer true.\n\nNot every task needs a write-back. Let the agent skip it for small fixes.\n\n## How it compares[#](#how-it-compares)\n\nThe closest neighbour is spec-driven development, in tools like GitHub’s Spec\nKit and Amazon’s Kiro.<sup>[5](#fn:5)</sup> You write a spec before any code, the tool turns it\ninto a plan and tasks, and the agent implements them.\n\nThat works for a feature with clear edges. But the spec is written for the agent to execute, not for you to read, and it’s fixed at the moment you wrote it. Once the code starts moving, nobody goes back to it.\n\nWiki-driven development is simpler. There’s no up-front document and no required format. The agent writes the wiki after the work, from what actually happened, and writes it for you. When direction changes, you edit a page.\n\nThe two can work together. Write a spec for a large feature if you want one. The decisions you make while building it go in the wiki.\n\n1. Andrej Karpathy, [LLM Wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) , April 2026.[↩︎](#fnref:1)\n2. ASD, [ASD-STE100 Simplified Technical English](https://www.asd-ste100.org/) .[↩︎](#fnref:2)\n3. [WikiWikiWeb](https://en.wikipedia.org/wiki/WikiWikiWeb) , Wikipedia.[↩︎](#fnref:3)\n4. [Context engineering is memory management](https://abduldavids.co.za/posts/context-engineering/#fan-out-your-knowledge-base-is-a-b-tree) .[↩︎](#fnref:4)\n5. GitHub, [Spec Kit](https://github.com/github/spec-kit) , and Amazon,[Kiro](https://kiro.dev) .[↩︎](#fnref:5)", "url": "https://wpnews.pro/news/wiki-driven-development", "canonical_source": "https://abduldavids.co.za/posts/wiki-driven-development/", "published_at": "2026-11-30 11:06:06+00:00", "updated_at": "2026-11-30 11:15:38.434484+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Andrej Karpathy", "LLM Wiki"], "also_reported_by": [], "takeaway": "Keep a short, linked wiki in the repo that records decisions, rejected options and open questions, and write a page only when reuse savings exceed the write cost plus the per-session index cost — in the author's example, a 40,000-token flaky-test investigation replaced by a 500-token read pays off o", "recommendation": {"advice": "Have coding agents maintain a one-screen-per-page wiki of decisions, rejected options and open questions, and prune any page whose write and index cost exceeds its reuse savings.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/wiki-driven-development", "markdown": "https://wpnews.pro/news/wiki-driven-development.md", "text": "https://wpnews.pro/news/wiki-driven-development.txt", "jsonld": "https://wpnews.pro/news/wiki-driven-development.jsonld"}}