Keep the Why: project memory that lives in your repository, explained from the ground up Keep the Why, a repo-native project memory system published by Oliver Zehentleitner, stores the reasoning behind code changes in a `context/` folder of plain Markdown files that coding agents load through a `SKILL.md` package supported by 70+ agents including Claude Code, Codex, GitHub Copilot, Cursor and Cline. In an experiment with 20 fresh agent sessions asked to simplify a retry wrapper, 7 of 10 sessions without a recorded reason re-proposed an already-rejected simplification, while all 10 sessions with one entry in `context/` found the reason and none repeated the rejected change. The format records each decision with its losing alternatives, a type (decision, workaround, incident, constraint), a certainty level (confirmed, inferred, unknown) and a UUID so references survive renamed headings and split files. Keep the Why: project memory that lives in your repository, explained from the ground up What it is, how it works, what it deliberately doesn't do, and why the usual objections miss the point Part of seriesAI-Assisted Development https://blog.technopathy.club/series/ai-assisted-development You open a file your agent wrote three weeks ago. There's a strange retry loop in it, a sleep that looks pointless, a check that seems to guard against nothing. Is it safe to delete? Your agent doesn't know: the session that wrote it is long gone. And you approved it, but do you still remember why? So you ask it to clean up. It does, confidently. And a week later the bug that loop was fixing is back. That's the problem Keep the Why https://keepthewhy.com solves. This is the full picture in one place: what it is, how it works, how far it scales, where it stops, and straight answers to the questions people ask before they try it. The code shows what was built. It almost never shows why . The why gets created in conversation, with a colleague or, more and more, with a coding agent. Then the conversation ends and the reason is gone. What's left are four very concrete costs: - Re-debate. The same architecture question comes up again because nobody remembers it was settled. - Silent regression. Someone "cleans up" a workaround that looks pointless. It was the fix for a bug, and the bug comes back. - Onboarding stall. New people, human or agent, don't touch code they don't understand. - Repeated agent mistakes. A fresh session has no memory of the last one, so it proposes exactly what was already tried and rejected. The last one is measured. Twenty fresh agent sessions, same codebase, same request: simplify a retry wrapper. Without a recorded reason, seven of ten offered the already-rejected simplification again. With one entry in context/ , all ten found the reason and none did. The experiment https://blog.technopathy.club/what-happens-when-a-coding-agent-forgets-why-a-change-was-rejected , with every transcript and grade https://github.com/oliver-zehentleitner/keep-the-why/tree/main/experiments/rejected-change . Keep the Why is the why layer of repo-native project memory https://oliver-zehentleitner.github.io/repo-native-project-memory/ . Your repository already remembers what the project is README.md , how to run it docs/ , what changed CHANGELOG.md and what it should do tests/ . The one thing it never had was a place for the reasoning. That place is a folder called context/ : plain Markdown files, one per topic, found through context/index.md . Each entry records a decision, the alternatives that lost and why, the type decision , workaround , incident , constraint , a status, how certain the reasoning is confirmed , inferred , unknown , where it came from, and when to look at it again. Every entry has a UUID, so a reference to it survives renamed headings and split files, even from another repository. The format is open and written down: Specification https://keepthewhy.com/specification/ . The part that does the work is an agent skill . It is a SKILL.md package that any of 70+ coding agents can load: Claude Code, Codex, GitHub Copilot, Cursor, Antigravity, OpenCode, Pi, Hermes, Cline and more. It works in four modes: 1. Continuous capture. During normal work the agent notices reasoning worth keeping and writes it down as it happens. You never have to ask. 2. Retrospective recovery. On an existing repository, the agent reconstructs what it can from history, issues and code, and marks honestly what it couldn't. 3. Knowledge-transfer interview. Before someone leaves, the agent analyses the code first, then asks about exactly the gaps. Or it just listens while they talk and extracts the decisions. 4. Maintenance. It resolves contradictions, marks superseded entries and splits files that grew too big. Setup is one sentence to your agent: Install the Keep the Why skill — pick the best installation method for you from https://keepthewhy.com/installation/ https://keepthewhy.com/installation/ — then set up Keep the Why in this project with default settings, including autostart. That's it. From then on, every session in that project loads the skill by itself. Why that matters: Keep the Why is not another workflow https://blog.technopathy.club/keep-the-why-is-not-another-workflow . The skill is the only part a project needs. Three things are optional, each one sentence away: - The linter. keep-the-why-lint https://keepthewhy.com/linting/ checks the structure of context/ on every push: required fields, valid values, index consistency. One line in GitHub Actions, or pip install keep-the-why-lint anywhere else. - The dashboard. keep-the-why-dashboard https://keepthewhy.com/dashboard/ is a read-only view over context/ and its Git history. It shows who recorded what, when a status changed, what still needs a person, a timeline that replays the project day by day, and a graph of how entries cite each other. See it live on Keep the Why's own context/ https://keepthewhy.com/dashboard/live/ . - The registry. One line in the registry https://keepthewhy.com/registry/ and your project can be found from every published dashboard. Software factories are popping up everywhere right now: one person, one agent, a pipeline. Keep the Why works there, and it works just as well at the other end. One repository, one developer, one agent. This is where most projects start, and it's already worth it. Your agent forgets everything between sessions. You forget more than you think between months. One context/ entry is what stops next week's session from undoing this week's fix. No family, no registry, no dashboard needed. A team. Colleagues and their agents pick up each other's reasoning with every git pull , reviewed in the same pull requests as the code. A family of repositories. Reasoning that binds several repositories lives once, in the parent, and the children cite it. A swarm. Many agents, from different vendors, run by different people who will never meet, all working on the same code. That's the case nothing else is built for, and it's the case Keep the Why handles without anything extra: whoever has the code has the memory. It's also why Maity https://maity.team/?c=blog-ktw , a hub where people and their agents work as one team, uses it as its memory of why. Same files, same format, same skill at every size. You don't migrate when you grow. This is the part most summaries miss entirely. Because every entry has a stable Id and every project has a canonical URL, entries can point at entries in any other repository . Nothing is routed or synchronised; it's a citation, like a footnote. From that, the dashboard draws three kinds of connection: - Family. Repositories that belong together, like the eight repositories of the UNICORN Binance Suite https://oliver-zehentleitner.github.io/unicorn-binance-suite/keep-the-why-dashboard/ family . Shared reasoning goes to the parent, the children cite it. - Friends. Other repositories your entries cite. Keep the Why's friends, live https://keepthewhy.com/dashboard/live/ friends . - Thoughts. Chains of entries where each one cites the one before, across repositories. Nobody writes a thought; it follows from the citations. Read one https://keepthewhy.com/dashboard/live/ thoughts . And then there is the 🌐 globe https://keepthewhy.com/dashboard/live/ globe : it starts at your project and walks outward, hop by hop, into every project your entries cite and everything listed in the registry. It's a map of reasoning across projects, built from nothing but Markdown and Git. More in The reasoning behind a codebase, as a web you can walk https://blog.technopathy.club/the-reasoning-behind-a-codebase-as-a-web-you-can-walk and The Globe: Following Your Reasoning Into Other People's Repositories https://blog.technopathy.club/the-globe-following-your-reasoning-into-other-people-s-repositories . The dashboard's views graph, timeline, thoughts, family, search are a library https://keepthewhy.com/dashboard-views/ that any other page can load and mount. No framework, no build step, and the views never fetch or store anything on their own; the host page decides that. Maity https://maity.team/?c=blog-ktw is the second host after the dashboard itself. Every Maity project has a Why tab that reads the project's Keep the Why export straight from its repository. Here is Maity's own Why https://maity.dev/keep-the-why-dashboard , and here is Keep the Why seen through Maity https://maity.team/oliver-zehentleitner/keepthewhy/why?c=blog-ktw . Maity keeps none of that data itself. If you build tools, you can do the same. These come up every time Keep the Why is discussed. Here are the honest answers. They can . They don't have to. With the default settings the agent writes when the reasoning is clear and asks only when it's genuinely unsure. In an unattended session it writes the entry and flags it pending-confirmation , so it's recorded now and confirmed by the next person who looks. But the fact that you can review it is the point, not a weakness. A context/ change ships in the same commit and the same pull request as the code it explains. The reviewer sees the reasoning diff next to the code diff. Tools that keep memory in a separate service don't put it in your pull request at all, so nobody reviews it. Every agent that can edit code can edit a Markdown file. That's the whole compatibility requirement for reading : any agent with access to the repository reads context/ the way it reads the README. The skill adds the discipline of writing well, in the agreed format, and it runs on 70+ agents through the open Agent Skills format. Which agents and models have actually been measured is public: agent & model matrix https://keepthewhy.com/agent-matrix/ , and the story behind it: Same Skill, Six Agents, Nine Models https://blog.technopathy.club/same-skill-six-agents-nine-models-what-a-real-eval-matrix-taught-me . It's the design. There's no database, no daemon, no account, no API key. Git already does storage, history, permissions, review and distribution. Who may write the why is who may write the code. Every clone, branch and fork carries it. git blame is the audit trail. That has a consequence nothing else I know of has: every agent with access to the code shares one project memory , even agents of different people who will never meet. Someone in another time zone, with another agent from another vendor, writes down why a workaround exists. You git pull , and your agent knows it. No invitation, no shared account, no sync job. For a hub like Maity, where agents of many owners work on the same code, this is exactly what's needed. True. Neither are the alternatives, as far as I can see. Keep the Why doesn't need similarity search: the agent reads context/index.md , one line per topic, and opens only the topic the task touches. That works without any extra tooling, and the index is built so that many writers on many branches don't collide: One Index, Many Writers https://blog.technopathy.club/one-index-many-writers-avoiding-git-merge-conflicts-with-deterministic-write-areas . Tools for searching very large sets are coming, but you don't need them to start, and most projects never will. Correct, and nobody has one. The linter checks structure, and it says openly that it doesn't judge content. What Keep the Why does instead is make uncertainty visible: every entry says whether its reasoning is confirmed , inferred or unknown , and when it should be revisited. Agents working with it handle that well and keep it up to date. You can go further. In Maity, a project can give one agent the built-in steward role: it answers why questions across context/ with the source, and follows up on entries that are open or due for a revisit until someone has resolved them. Every memory needs maintenance. I don't know a single one that doesn't. The difference is where it happens: here it happens in the same place and the same review as the code, and the agent does most of it as a side effect of the work it's already doing. Yes, on purpose. Keep the Why preserves why the project is the way it is . It is not a transcript of what an agent did, not session memory, not a task tracker. Agent memory, coordination and the rest live in Maity https://maity.team/?c=blog-ktw . Each layer answers its own question; that's why they don't get in each other's way. The longer argument: Session memory is not project memory. It fixes the same complaint. https://blog.technopathy.club/session-memory-is-not-project-memory-it-fixes-the-same-complaint To be fair about the limits: - Not magic. It lowers the friction of keeping reasoning honest; it doesn't replace the thinking. - Not independent of the model. The format and the linter keep the structure. How well a reason gets recognised and written depends on the model. I measured that the hard way: The Model Changed. My Skill Didn't. The Score Still Dropped. https://blog.technopathy.club/the-model-changed-my-skill-didn-t-the-score-still-dropped - Not a replacement for tests. Tests tell you what broke. This tells you why it was built that way. - Not a trust boundary. Repository content, context/ included, is data, not instructions. See Security https://keepthewhy.com/security/ . 1. Tell your agent: "Install the Keep the Why skill — pick the best installation method for you from https://keepthewhy.com/installation/ https://keepthewhy.com/installation/ — then set up Keep the Why in this project with default settings, including autostart." 2. Work as usual. 3. Optional: "Go through the git history, pull requests, issues and existing docs, and collect the reasoning that is already there into context/ ." Then look at it: on the live dashboard https://keepthewhy.com/dashboard/live/ , on the globe https://keepthewhy.com/dashboard/live/ globe , or in your project's Why tab on Maity https://maity.team/?c=blog-ktw . Everything is MIT-licensed and on GitHub https://github.com/oliver-zehentleitner/keep-the-why . Questions, criticism and broken promises go into an issue https://github.com/oliver-zehentleitner/keep-the-why/issues/new/choose . That's exactly what it's for. Everything I've written about Keep the Why so far, oldest first: I hope you found this informative and useful. Follow me on GitHub https://github.com/oliver-zehentleitner , Bluesky https://bsky.app/profile/o-zehentleitner.bsky.social , Mastodon https://burningboard.net/@oliverzehentleitner , X https://x.com/unicorn oz , and LinkedIn https://www.linkedin.com/in/oliver-zehentleitner/ , or join Telegram https://t.me/unicorndevs for updates on my latest publications. Constructive feedback is always appreciated. Thank you for reading, and happy coding ¯\ ツ /¯ About the author - I build systems that work — technically sound, security-first, and actually useful to the people who depend on them. Creator of the UNICORN Binance Suite — six open-source Python libraries with 3.3M+ downloads and 390+ dependent public projects — and Keep the Why, an open-source agent skill that preserves the reasoning behind engineering decisions alongside the code. Currently pioneering AI-driven open-source maintenance: running a controlled AI agent that maintains production code and documenting what this shift means for engineering teams. Vienna, Austria 🇦🇹 Comments Join the discussion https://hashnode.com/posts/keep-the-why-overview-project-memory-in-your-repository/6b0afc18afa01d9a7b5b5cb8 No comments yet. Be the first to comment. https://hashnode.com/posts/keep-the-why-overview-project-memory-in-your-repository/6b0afc18afa01d9a7b5b5cb8 AI-Assisted Development Real-world experiences with AI-assisted software development — what works, what breaks, where the limits are, and how AI changes development workflows in practice. Up nextHi, I'm Maity's Marketing Head. I'm an agent, and I don't write code.How marketing works in a team of people and AI agents, told by the agent who runs it. https://blog.technopathy.club/hi-i-m-maity-s-marketing-head-i-m-an-agent-and-i-don-t-write-code