Living memory for AI‑assisted projects
The case for PROJECT.mdCHANGELOG.mdsession logs — their concrete benefits, their real costs, and how this practice compares to emerging alternatives.
The case for PROJECT.mdCHANGELOG.mdsession logs — their concrete benefits, their real costs, and how this practice compares to emerging alternatives.
The core problem: LLMs have no memory across sessions. Without persistent context documents, each AI assistant session wastes 20–40 minutes re-orienting — re-reading files, re-deriving constraints, re-discovering decisions already made.
Three documents, three jobs: PROJECT.md is the indexed living spec (load §0 first, then only the relevant sections — 2K tokens instead of 48K). CHANGELOG.md is the append-only chronicle of what changed and why. Session logs capture the full reasoning chain — what was tried, what was rejected, and why the winning approach was chosen.
The session-end ritual is codified in CLAUDE.md as a three-step obligation: write the session log, prepend the CHANGELOG, and update any PROJECT.md sections the session's changes made stale. Takes ~20 minutes. Skipping it compounds as debt.
Benefits are real and measurable: orientation time drops from 20–40 minutes to under 5; invariants short-circuit review debates; session logs answer "why?" without archaeology; CHANGELOG replaces async standups.
Costs are mostly discipline costs: the ritual takes ~20 min, skipping it compounds as debt, and a 1700-line monolith develops merge conflicts as the team grows. None of these are blockers at small scale — they're scaling signals.
Alternatives are additive: ADRs capture durable decisions but lack investigation trails. Git MCP answers what/when but cannot recover reasoning never committed. AI memory is opaque and provider-specific. LLMWiki is worth adopting when PROJECT.md exceeds ~100 pages or the team passes ~50 engineers.
ADRs are intentionally narrow: one record per decision, lightweight enough that engineers actually write them. Their killer feature is the status chain — a decision can be Proposed, Accepted, Deprecated, or Superseded, and the superseding ADR links back. You can trace the full evolution of any architectural choice across months or years.
Session logs are intentionally broad: one record per session, capturing the investigation, alternatives tried, implementation, and verified evidence. The Investigation and Verification sections are what ADRs lack — you know what was decided but not what was measured or what was tried and rejected.
The two are complementary at different granularities. A good workflow: write session logs during development; when a decision proves durable (survives two or more sessions unchanged), promote it to an ADR with the status chain. Session logs are the raw material; ADRs are the distillate.
ADRs track decision evolution (status chain); session logs capture reasoning evidence. Both together are more complete than either alone.
MCP-over-git is real and already deployed in tools like the official mcp-server-git and GitHub's own MCP server. They give an LLM structured access to the commit graph, file history, and diffs — without requiring the agent to shell out to git log manually.
The efficiency gain is real for archaeology and navigation: finding when a file changed, who touched it, or which commits mention a keyword. This directly reduces the value of a manually written CHANGELOG for those queries — git does it better and always stays up to date.
The hard limit is fundamental: git only stores what was committed. The reasoning chain, rejected alternatives, verified performance numbers, and system invariants were never in git to begin with. MCP-over-git provides a faster lookup into an incomplete record; it doesn't fill the gaps.
The right framing: adopt MCP-over-git alongside the three-document system. Let it handle "what changed when" so CHANGELOG entries can be shorter summaries. Keep PROJECT.md and session logs for the content that was never in git.
MCP-over-git answers the "what and when" half efficiently. It cannot answer the "why not X" half — that reasoning was never committed.
An LLMWiki is a wiki structured for LLM retrieval: semantically chunked pages, cross-linked for navigation, with search as the primary access pattern (rather than a hand-crafted index). Notion AI, Confluence with AI features, and Obsidian with vector-search plugins are the closest real implementations.
It occupies the same quadrant as PROJECT.md on the map — persistent reference, manually curated — but adds two things PROJECT.md lacks: multi-author without merge conflicts, and search-based discovery that scales as the corpus grows past what a single index table can represent. At 8-person scale and beyond, those two properties matter a lot.
The tradeoff is retrieval reliability. The kaldamus §0 Quick index is deterministic: the reader is told exactly which section to load. An LLMWiki uses probabilistic search: the right chunk must surface in the top-k results. For small, well-defined codebases, deterministic beats probabilistic. For large or multi-team contexts, search is the only viable approach.
An LLMWiki does not help with session logs or CHANGELOG — it is a replacement path for PROJECT.md only, and only at scale.
LLMWiki replaces the §0 index with search. That trade is unfavorable for a solo project; it becomes favorable past ~8 engineers or ~100 wiki pages.
At 8 people, the practice delivers new efficiencies that solo use doesn't surface: the CHANGELOG becomes a genuine async standup substitute, and PROJECT.md §13 invariants reduce code-review back-and-forth on architectural violations. Session logs answer "why did Alice make this call?" without a synchronous conversation.
The costs are also new. Merge conflicts on a 1700-line PROJECT.md are a real friction source when two engineers work simultaneously. Quality variance in session logs — one person writes thorough Investigation sections, another writes bullet points, a third skips — means the corpus becomes unreliable as a team resource.
The mitigations are structural, not cultural: add the session doc as a PR template checklist item (required for architectural changes, N/A for hotfixes); assign section owners in §0; consider splitting PROJECT.md into per-section files to reduce conflict surface; let MCP-over-git handle the "what changed when" queries that CHANGELOG currently serves.
The tipping point to an LLMWiki for PROJECT.md is around 50 engineers or 100+ sections — not at 8, where the deterministic §0 index still beats probabilistic search.
At 8 people, the three documents scale — with PR-template enforcement and section owners. Past ~50, replace PROJECT.md with an LLMWiki and session logs with ADRs.
Generating PROJECT.md is an AI job, not a typing job. Point an agent at the repo with the bootstrap prompt shown below-left: it crawls the source tree, mines git log for churn hotspots (the files that change most are your core modules), infers build/test commands and external deps, and drafts the §0 Quick index plus sections. You ratify — the AI proposes, you correct. Then seed CHANGELOG.md with one baseline entry and create an empty session-docs/ with a template.
The behavior change lives in copilot-instructions.md — Copilot's auto-loaded equivalent of CLAUDE.md (in .github/). Add a bootstrap rule ("read PROJECT.md §0 before planning") and the three-step session-end ritual, pointing session logs at session-docs/.
Phrase it as a hard mandate, not a suggestion. Agents reliably follow numbered Rules, not prose hints — a "please also update the docs" aside gets dropped under task pressure. Keep the file short; Copilot truncates long instruction files.
Brownfield adoption = a one-time AI bootstrap pass + a ~15-line edit to copilot-instructions.md. The hard part isn't writing the docs — it's the mandate that makes the agent maintain them.