Play · History as memory
Agents forget. The repo doesn't.
Every session starts from zero, and people move on. Four pillars make what stays behind readable.
Trunk-based developmentCommit conventionsIssues to roadmapLean docs & ADRsThe team, files and commits on this page are invented to illustrate.
The question, three months later
Why does a checkout retry reuse the idempotency key?
The author has left. The agent that wrote the fix remembers nothing. Same four lookups, two repos.
1git log
Long-lived branches$ git log --oneline -- src/cart/retry.ts 3f9e1d0 Merge branch 'feat/checkout'
One merge. Two weeks of work inside it.
Context recovered: 0 / 4
Trunk + conventions$ git log --oneline -- src/cart/retry.ts a41c2e9 fix(cart): stop double-charging on retry 7be0f13 feat(cart): retry failed charges once
The titles already answer half of it.
Context recovered: 1 / 4
2git show
Long-lived branches$ git show 3f9e1d0 --stat 47 files changed, 1812 insertions(+) # messages inside the branch: wip fix 2 try again
Eighteen hundred lines, and no reason given.
Context recovered: 0 / 4
Trunk + conventions$ git show a41c2e9 fix(cart): stop double-charging on retry It now reuses the original idempotency key. Refs: PROJ-123
One idea, and why.
Context recovered: 2 / 4
3The issue
Long-lived branches# no issue linked # the request was in a chat thread
The reason lived in someone's head.
Context recovered: 0 / 4
Trunk + conventionsPROJ-123 Customers charged twice on slow networks Check: e2e "slow-network retry" passes Decision: ADR 0007
The bug, the proof, and a pointer to the decision.
Context recovered: 3 / 4
4The ADR
Long-lived branches$ ls docs/decisions/ No such file or directory
Someone will propose a lock again.
Context recovered: 0 / 4
Trunk + conventionsADR 0007 Idempotency keys for payments Status: accepted Rejected: a distributed lock
The decision, and the alternative that lost.
Context recovered: 4 / 4
The chain
Each pillar adds one link
- Trunk-based developmentSmall commitsin the order they happenedWithout it: one big squash
- Commit conventionsThe whyin the commit bodyWithout it: "fix 2"
- Issues to roadmapThe goaland the checks that prove itWithout it: a lost chat thread
- Lean docs & ADRsThe decisionand what it beatWithout it: argued again next quarter
The gains
For the agent
- Context on demand, not loaded up front
- Fewer tokens spent guessing intent
- No re-proposing what was rejected
For the team
- Reviews of one idea at a time
- Release notes with nobody writing them
- New joiners learn from history
Try it on your repo
Five files. Five minutes each. Count the misses.
Pick files at random. Answer "why is it like this?" from git log, the issue and the ADRs alone.