Introduction

This is a small, opinionated convention for how a software project keeps track of:

  • What the code does today, area by area
  • Why non-obvious choices were made
  • What's next and in what order
  • What's been tried that didn't pan out
  • What's in flight right now that someone else (or future-you) needs to pick up

Five document kinds, five homes, one inviolable rule: every load-bearing piece of information has exactly one canonical home, and only the handoff gets deleted. Finished plans and superseded decisions move to an archive/ directory. Nothing else leaves the repo.

Who this is for

  • Solo developers using Claude Code who want their project to stay coherent across many sessions, without context drift, without re-discovering decisions, and without scrolling back through transcripts.
  • Small teams who want a low-overhead alternative to Notion / Confluence / Linear sprawl. Markdown in docs/, version-controlled, reviewable in PRs.
  • Maintainers of long-running projects who've felt the pain of "what was the rationale for X?" being unanswerable.

What this isn't

  • Not a project management framework. No tickets, no statuses, no burn-downs.
  • Not a documentation site generator. It is rendered as one (mdBook), but the discipline is fundamentally a habit, not a tool.
  • Not specific to Claude Code. Claude Code happens to be where this discipline crystallised, and there are tooling integrations described later, but a human team using only git and vim could follow this verbatim.

How to read this book

  1. Read Overview: five kinds of document first. It sketches the whole shape in one page.
  2. Read Architecture reference and Decision records together. The split between what the code does now and why it got that way is the spine of the discipline.
  3. Read Handoff documents. It's the most distinctive part of the discipline and the most easily abused.
  4. Skim spikes and plans as you need them.
  5. Use Adopting this in a new project as the actionable checklist.

A note on style

These docs are short on purpose. Every word is load-bearing. If a sentence reads as filler, file an issue or a PR — it's a bug.

Overview: five kinds of document

A project carries five kinds of document. Each has a different lifetime, a different tense, and a different failure mode if it ends up in the wrong place.

KindAnswersLifetimeLives inFailure mode if mis-stored
Architecture reference"What does the code do now?"Living; edited in place as the code movesdocs/architecture/<area>.mdCurrent state scattered across decision records; readers build on stale claims
Decision"Why did we choose X?"Forever; immutable; archived when supersededdocs/architecture/decisions/NNNN-*.mdBuried in commit messages or chat history; future contributors re-litigate
Spike"Did this idea work?"Forever, marked Resolveddocs/architecture/decisions/spikes/<topic>.mdQuietly forgotten; ideas re-attempted years later
Plan"What's next, in what order?"Long-lived; updated in place; archived when finisheddocs/plans/<topic>.mdScattered across TODOs, draft Pull Requests (PRs), the latest handoff; nobody knows the truth
Handoff"What's in flight right now?"Ephemeral; folded, then deleteddocs/handoffs/<topic>-handoff.mdSurvives past resolution; "STATUS: RESOLVED" piles up; new contributors mistake it for current

Spikes sit under decisions/ because a spike is the evidence a decision rested on. A decision cites its spike; the spike is a dated record that doesn't get rewritten.

Two supporting homes already exist in most projects:

KindLives in
What shipped, whenCHANGELOG.md + git tags
How-to guides and user docsFree-form docs/<topic>.md

The migration pattern

The discipline lives or dies by one rule:

Every load-bearing piece of a handoff migrates into its proper home (area doc / decision / spike / plan / CHANGELOG) before the handoff file is deleted.

This forces every handoff to ask "where does this actually belong?" at resolution time. The answer is almost always one of the other kinds. The handoff was just the temporary workspace.

Why the strict separation

Decisions never go stale, because they're history. The reference goes stale whenever the code moves, so it's kept current. Plans go stale fast. Handoffs go stale instantly. Mixing them creates a class of bug where a doc says one thing and the code says another, and the only way to know which is current is by reading commit dates.

By giving each kind its own directory and lifetime rule, you can answer "is this still true?" by looking at the kind, not by reading the contents.

You're asking…Look at…Why you can trust it
"How does X work today?"The area doc in docs/architecture/It's edited whenever the code moves
"Why does X work this way?"The decision it links toIt's a record of the choice, and records don't change
"Did anyone try Y already?"docs/architecture/decisions/spikes/Spikes are kept forever and marked Resolved
"What's the project doing this quarter?"The active plans in docs/plans/Plans are kept current; finished ones move to archive/
"What's the next concrete action on thread Z?"docs/handoffs/z-handoff.mdOne live handoff per thread, deleted when resolved

If docs/handoffs/ holds more than about 2× as many files as there are people actively working, the team is running more threads than it can hold context on. That's the smell test.

Concrete shape on disk

your-project/
├── CLAUDE.md                          ← project conventions, points at this discipline
├── CHANGELOG.md
├── docs/
│   ├── architecture/
│   │   ├── README.md                  ← the map: area → reference doc → decisions
│   │   ├── <area>.md                  ← one per area, present tense
│   │   └── decisions/
│   │       ├── README.md              ← decision conventions + index
│   │       ├── 0001-some-decision.md
│   │       ├── 0002-another-decision.md
│   │       ├── archive/               ← superseded and withdrawn decisions
│   │       └── spikes/
│   │           └── <topic>.md
│   ├── plans/
│   │   ├── <active-plan>.md
│   │   └── archive/                   ← finished plans
│   ├── handoffs/
│   │   └── <topic>-handoff.md         ← one per active thread of work
│   ├── scripts/
│   │   └── doctool.py                 ← archive / lint / new: keeps the layout honest
│   ├── handoff-discipline.md          ← the migration rule, in full
│   ├── prose-style.md                 ← optional: house writing style
│   ├── release-process.md             ← optional: how releases get cut
│   └── <guides>.md                    ← how-tos, user docs
└── ...

The next chapters cover each kind in detail.

Architecture reference

The architecture reference describes the project's current design, one document per area, as it stands in the code today. It's the entry point. A reader (or an agent) who wants to know "how does X work right now" starts here, not in the decision log.

Each area doc lives at docs/architecture/<area>.md. A map at docs/architecture/README.md lists every area with its reference doc and the decisions behind it.

Why a separate layer

Without it, the only place current state can live is the decision record. So the record has to be edited every time the code moves, and it ends up mixing why we chose this with what the code does now and what we still intend. That mix is what makes decision records go stale. (See Three kinds of claim.)

Splitting the two lets each one keep a simple rule:

LayerHoldsTenseMutability
Architecture referenceWhat the code does nowPresentEdited in place whenever the code moves
Decision logWhy it got that wayPastImmutable; replaced by a new record when the decision changes

Diátaxis names the same split. Its reference type (factual, present-tense, structured for lookup) is the architecture layer. Its explanation type (background and rationale, written for study) is the decision log. Diátaxis also names the failure mode: explanation bleeds into reference and drags time-bound claims into a doc that's supposed to state what is.

The rules for an area doc

  • Present tense means "true today". Every present-tense sentence is a verifiable claim about the code. Check it before you write it. If it's stale, the code moved and the doc didn't. That's a bug.
  • No rationale. "We chose X because Y" goes in a decision record. The area doc says "X does Y" and links to the decision.
  • No dead history. Don't keep "previously this used Z" paragraphs. git log and the archived decisions hold history.
  • Unbuilt work goes in ## Implementation status. Split implemented (with file references) from deferred (with the specific gap and a link to its plan or issue). Items move out of this section and into the body as they land.
  • Link both ways. Each section names the decisions behind it. Each decision has a **Current architecture:** line pointing back here.
  • Keep sections self-contained. A reader, or a model retrieving one section, should understand it without "as described above". Restate the subject.

Anatomy

# <Area name>

*Reference: the current design as it stands in the code. The why lives
in the decision records linked from each section. The not-yet-built work
is under Implementation status.*

One paragraph: what this area does and where it sits in the system.
Rationale for the overall shape: [Decision NNNN](decisions/NNNN-….md).

## <Component or concept>

What it does today. File references where they help. Decision links
where a reader will ask "why?".

## Constraints

Hard limits a contributor needs to know (sizes, supported platforms,
unsupported inputs).

## Implementation status

**Implemented:**

| Part | Where |
|---|---|
| <part> | `src/…` |

**Deferred:**

| Part | Gap | Tracking |
|---|---|---|
| <part> | <what's missing> | `docs/plans/<plan>.md`, issue #N |

## Decisions behind this

- [Decision NNNN — <title>](decisions/NNNN-….md)
- [Decision MMMM — <title>](decisions/MMMM-….md)

Choosing the areas

An area is a part of the system a contributor could own: the simulation engine, the timing stack, distribution, a runtime. Aim for somewhere between three and eight. Fewer than three and each doc gets too long to retrieve usefully. More than eight and the map stops being a map.

A decision that cuts across areas is listed under each area it shaped. That's fine. The map's "Decisions behind it" column will show the overlap.

Don't create an area doc speculatively. Write one when there's code to describe, or when a contributor has asked "how does X work" and the answer was spread across three decision records.

The map

docs/architecture/README.md is the first page a reader hits. Keep it to a short intro and one table:

| Area | Reference | Decisions behind it |
|---|---|---|
| Timing | [timing](timing.md) | 0001, 0002, 0005 |
| Simulation engine | [simulation-engine](simulation-engine.md) | 0014, 0015 |
| Distribution | [distribution](distribution.md) | 0018 |

Template

Copy-paste-ready templates live at starter/docs/architecture/README.md (the map) and starter/docs/architecture/_template.md (an area doc).

Decision records

A decision record is a short, numbered markdown file that captures the why behind a non-obvious choice, so future contributors don't re-litigate it. Records live at docs/architecture/decisions/NNNN-<short-name>.md and are cited as "Decision NNNN".

The format descends from the Architecture Decision Record (ADR) in Michael Nygard's 2011 post. This book used the term "ADR" in earlier versions and dropped it. The phrase doesn't tell a newcomer what's inside, and enough people bounce off it that "decision" works better. The Nygard rule survives intact: a decision record is immutable and written in past tense. It records a choice at the moment it was made. It doesn't describe the system now. That's the architecture reference's job.

When to write one

Write a decision record whenever you make a non-trivial choice that future-you (or a future contributor, or a future Claude session) would want to understand the reasoning behind. Examples that qualify:

  • Picking one tool / library / format over another
  • Choosing a particular architectural boundary
  • Adopting a multi-piece convention that spans several files
  • Deciding not to do something obvious-looking

Skip them for:

  • Mechanical changes (renames, typo fixes, dependency bumps)
  • Choices the code itself makes self-evident (a small refactor, a chosen variable name)
  • Things adequately captured by a commit message

A useful test: if someone asked "why is it like this?" six months from now, would the answer be in the code, the commit, or a decision record? If the answer is "a decision record", write it.

Three kinds of claim, aged differently

A decision is usually written against a codebase it's about to change, often because of the decision. Three kinds of claim end up near each other, and they age at different rates:

  1. Why the decision was made. The rationale, and the problem that prompted it. This is the record's lasting value. The code and git log show the what; only the record holds the why. It's written as the state at decision time, in past tense, and never rewritten when the code moves. The problem is worth keeping even after it's solved.
  2. What the current architecture is. What the code does today. This is a verifiable present-tense claim that has to be kept in step with the code. It's what goes stale, so it lives in the architecture reference, not in the decision record. Each what links back to the why that produced it.
  3. What's decided but not built yet. The gap between a decision and the code. It lives in the area doc's ## Implementation status section, with a plan or issue so the unbuilt half isn't lost, and drains into (2) as each piece lands.

The failure mode is writing all three in the same present tense, so a reader can't tell whether a sentence is why we did it, what the code does, or what we still intend. "BATCH_SIZE is 1024" reads as current fact. "The fixed BATCH_SIZE of 1024 was what this replaced" reads as the starting point the decision moved past. A human skims past a wrong present-tense claim. A model repeats it as generated code. So the reference layer stays ruthlessly current and the decision layer stays rationale-only.

Format

# Decision NNNN — Short title

**Status:** Accepted (YYYY-MM-DD).

**Current architecture:** [<Area>](../<area>.md).

**TL;DR.** In the context of <use case>, facing <concern>, we chose
<option> to achieve <quality>, accepting <downside>.

## Context

What was the situation? What constraints forced a decision?
Be concrete: name the systems, the data formats, the friction.
Past tense. This is the world at decision time.

## Decision

What we chose, with enough specificity to act on.
Numbered sub-points if multiple commitments.

## Alternatives considered

The options we looked at and rejected, with the reason for each.
Tie each reason to this project's constraints, not generic preference.

## Consequences

What this bought us, what it cost us, and what would trigger a walk-back.
Be honest about the costs.

## Walk-back options

(Optional, but strongly encouraged.) Conditions under which this
decision should be revisited, and how to revisit it cheaply.

## Links

Spikes this rested on, related decisions, the area doc.

The TL;DR is a single-sentence summary in the (WH)Y form: "in the context of X, facing Y, we chose Z to achieve Q, accepting D". It forces the author to name the trade-off out loud. It also gives skim-readers the shape of the decision before they commit to the prose.

The Alternatives considered section is the one most often skipped, and the one future readers most often need. Without it, the next person to hit the same fork has to rediscover that Option B was already tried. Or they assume it wasn't, and re-propose it.

The Current architecture line is the forward-link to the area doc this decision shaped. The area doc links back from its "Decisions behind this" section. A reader on either side reaches the other in one hop.

Prefer durable abstractions

When the decision is meant to last, prefer platform-neutral patterns over framework-of-the-month. If the choice is tightly coupled to a tool or library that may be replaced in 12–18 months, say so in Consequences and add a Walk-back option for the day the dependency goes away. This doesn't ban new tools. It asks you to be honest about which decisions are load-bearing for the long term and which are situational.

What's mutable, and what isn't

The body of a decision record (Context, Decision, Alternatives, Consequences) is never edited after the decision is accepted. Only two lines change:

  • The Status: line, as the decision moves through its lifecycle.
  • The Current architecture: forward-link, if the area doc it points at is renamed or split.

When the code moves, edit the area reference doc, not the decision. When the decision itself changes, write a new record:

  1. Write Decision M, which says what it replaces and why.
  2. Set the old record's status to Superseded by Decision M (YYYY-MM-DD).
  3. Move the old file to docs/architecture/decisions/archive/. Keep its number.
  4. Update the area doc to describe the new current state.

This is what stops decision records from rotting: history can't go stale.

Why not amend in place?

An earlier version of this discipline let records accrete dated ## Amendment blocks when their scope grew, with the original text relegated below. It kept the audit trail, but it made each record a mix of three tenses that a reader had to untangle. And the amendments existed only because the record was the sole place current state could live. Once the reference layer carries current state, nothing pushes you to edit a decision record. A refinement that changes what the code does is an area-doc edit. A refinement that changes why is a new decision.

Status lifecycle

  • Proposed — drafted, not yet ratified. Everything a Proposed record describes is unbuilt, so open the body with one line saying what the code does today ("nothing built; the code today is X"). Then the rest of the record can describe the proposal in the present without a reader mistaking it for reality.
  • Accepted (YYYY-MM-DD) — the decision is in effect in the code.
  • Accepted (partial) (YYYY-MM-DD) — ratified, and only some of it is built. The area doc's ## Implementation status section says which parts.
  • Superseded by Decision NNNN (YYYY-MM-DD) — replaced. The record moves to archive/.
  • Withdrawn (YYYY-MM-DD) — abandoned without replacement (rare). Also moves to archive/.

Status must match the code

A Status: line is a claim about the codebase, not a statement of intent. Before you set or change it, verify the claim against the implementation. Read the code. Don't trust the previous status, or the fact that a feature "shipped". The same applies to every present-tense sentence in the reference layer, and to user-facing docs and --help text. A sentence describing how the tool behaves is a checkable claim, so check it before writing it.

  • Don't bump Proposed → Accepted just because a design merged. Confirm the decision is actually in effect in the code.
  • A ratified, partly built design is Accepted (partial). Don't inflate it to a clean Accepted, and don't leave it at Proposed. Record which parts are real in the area doc's Implementation status, with file references for what's built and the specific gap for what isn't.
  • Deferred work gets a home. A plan under docs/plans/ and a tracking issue, linked from the Implementation status section, so the unbuilt half isn't lost. When the last deferred piece lands, the status moves to a plain Accepted.

This keeps the record trustworthy. A reader can rely on Accepted meaning "in effect", and Accepted (partial) sends them to the exact list of what's real. The failure mode it prevents is a design that reads as shipped but is ~40% built. The next contributor takes it at face value and builds on vapour.

Numbering and the index

Use sequential zero-padded numbers: 0001-foo.md, 0002-bar.md. The number is a stable ID cited from docs, code, and commits. Don't reuse numbers and don't renumber, even when a record moves to archive/.

Keep the number out of the reading title. The # H1 and the SUMMARY.md link text are what readers see.

Maintain docs/architecture/decisions/README.md as the index:

| # | Title | Status |
|---|---|---|
| [0001](0001-external-oracle.md) | External tool X as correctness oracle | Accepted (2026-04-15) |
| [0002](0002-ir-format.md) | Intermediate representation format | Accepted (2026-04-20) |
| [0003](archive/0003-in-process-reference.md) | Tool Y as in-process reference | Superseded (2026-05-01), spike failed |

Never delete a decision

A superseded record moves to archive/. It doesn't leave the repo. Future readers tracing the history of a decision need both the old one and the new one.

This is uncomfortable when the old record is wrong; that's the point. A wrong decision marked Superseded is more useful than a clean repo with no record of the wrong turn.

A worked example

The cleanest sequence is one where a decision proposes a path, a spike tests it, the spike fails, and a new decision replaces the old one:

  • Decision 0001: "Use external tool X as our oracle." Accepted.
  • Decision 0003: "Add tool Y as our in-process reference." Proposed.
  • Spike decisions/spikes/tool-y-on-real-inputs.md: time-boxed validation of Y on real workloads. Resolved NO. Y can't parse our inputs.
  • Decision 0003 status set to Superseded (2026-05-01), spike failed. The file moves to archive/.
  • Decision 0004: "X is both oracle and sole analysis path." Accepted. It cites the spike as evidence and says it replaced 0003.
  • The area doc for the analysis stack is edited to describe X as the only path, and lists 0001 and 0004 under "Decisions behind this".

A reader asking "why are we using X out of process?" lands on the area doc, follows the link to Decision 0004, and from there to the spike and the archived 0003. They get the full story without anything having been rewritten.

Template

A copy-paste-ready template lives at starter/docs/architecture/decisions/0000-template.md. Drop it into your project's docs/architecture/decisions/ and rename it to the next available number.

Spike documents

A spike is a time-boxed experiment with a binary outcome ("did this idea work?"). It's written down before it's answered, resolved with a clear yes/no, and kept forever as the historical answer. The term comes from XP / agile usage and just means a short, sharp investigation. Here it's formalised into its own document kind so the question and the answer are findable later.

Spikes live at docs/architecture/decisions/spikes/<topic>.md, under the decision log, because a spike is the evidence a decision rested on. It's neither a what nor a why. It's the experiment.

Spikes pair naturally with decision records. A Proposed decision names a direction, a spike tests the foundational assumption, and the outcome decides whether the decision is accepted as written or replaced by a new one. The decision cites the spike in its Links; the spike is never rewritten.

When to write one

Write a spike when you're about to invest non-trivial effort in validating an assumption that the project's direction depends on. Examples:

  • "Will library X parse our actual production inputs without re-engineering?"
  • "Can we hit the throughput target on the available hardware?"
  • "Does the proposed schema handle the edge cases we know about?"

The signal: the answer determines whether a decision proceeds, gets superseded, or pivots. If there's no decision (or Proposed decision) the spike informs, you might be doing exploratory research instead. That's fine, but it doesn't need a spike doc.

Anatomy

# Spike — <One-line question this spike answers>

**Status:** <Open | Resolved (YYYY-MM-DD) — <one-line outcome>>

**Time-box:** <e.g. "≤ 3 days; abort if Q1 hasn't passed by EOD day 1">

## Question

The single binary question this spike answers. If you find yourself
writing two questions, that's two spikes.

## Why this is in question

What we don't know, that we'd need to know to accept Decision NNNN
(or to replace it with a different decision).

## Approach

The plan for the time-box. Be specific:
- Q1 (sub-question 1, the cheapest first):
  - Step 1: <thing>
  - Step 2: <thing>
- Q2 (only attempted if Q1 passes):
  - ...

## Decision matrix

What we'll do under each outcome:

| Outcome | Means | Action |
|---|---|---|
| Q1 fails | Approach unworkable on our inputs | Spike resolves NO; Decision NNNN superseded and archived |
| Q1 passes, Q2 fails | Partially viable, but blocking gap | Spike resolves PARTIAL; new narrower decision supersedes NNNN |
| Both pass | Fully viable | Spike resolves YES; Decision NNNN accepted as written |

## Findings

(Filled in as the spike runs. Written terse — these are evidence, not narrative.)

## Outcome

(Single short paragraph at resolution. The conclusion sentence
becomes the Status line.)

Time-boxing

A spike that runs longer than its box has lost the discipline. When the box expires:

  • If the answer is clear → resolve.
  • If the answer needs another N days → write that down, extend the box once, and proceed. Don't extend twice. If it needs that much investigation, it's no longer a spike. It's a research thread that probably needs its own plan.
  • If you've gotten side-tracked → resolve as inconclusive, capture the side-track as a follow-up.

Resolving a spike

A resolved spike is never deleted and doesn't move to an archive. The Status line gets updated and the Outcome section is filled in. The decision that follows from it (accepting the Proposed one, or a new one that supersedes it) cites the spike.

**Status:** Resolved (2026-05-01) — Q2 fail; Decision 0003 superseded by 0004.

The spike file becomes a permanent part of the repo's "we tried this" record. Future contributors who find an archived decision follow its link to the spike to understand why it was dropped.

Spike vs. walk-back

These look similar but serve different purposes:

  • A decision's walk-back section is a prediction: "if X happens, we'd revisit." Written before the fact.
  • A spike is an experiment: "we don't yet know if X works; here's how we'll find out." Written before the fact, resolved after.

A spike is cheap insurance against accepting a decision whose foundational assumption hasn't been tested.

Template

A copy-paste-ready template lives at starter/docs/architecture/decisions/spikes/_template.md.

Plan documents

Plan documents schedule the work a decision, or a set of decisions, has committed to. They answer the question "what's next, in what order?" — and they answer it durably, in a place that doesn't rot the way a TODO list or a draft Pull Request (PR) description does.

What a plan is

A plan doc is a scheduling doc, not a design doc. The current design lives in the architecture reference and the rationale in decision records. The plan organises the implementation of those decisions into:

  • Phases with entry and exit criteria
  • Workstreams (often abbreviated WS with a numeric or alphabetic suffix, e.g. WS1, WS-P1.1) that can sometimes run in parallel
  • A status section that's updated in place as work lands

The shape varies. A small project might have a single docs/plans/roadmap.md. A larger one accumulates per-phase plans and a top-level roadmap that orders them.

What a plan is not

  • Not a decision. "We chose X over Y because Z" → a decision record. The plan consumes that decision and slices it into work.
  • Not a handoff. "What needs to happen tomorrow morning, with verification commands" → a handoff. The plan is the persistent layer the handoff folds into at resolution.
  • Not an area doc. "How the X subsystem works today" → the architecture reference. The plan refers to it; it doesn't reproduce it.

Anatomy of a good plan

Plans tend to settle into this shape:

# Plan — <Phase / topic>: <one-line goal>

**Status:** <Proposed | Active | Implemented (YYYY-MM-DD)>. <Latest dated update.>

## Goal

What this phase / topic delivers, in 1–3 sentences.

## Prerequisites

What must be true / accepted / merged before this can start. Decisions
that need to be Accepted, fixtures that need to be in place.

## Where things stand (YYYY-MM-DD)

The single most-recent status snapshot. Updated in place.
Past states are in `git log`, not stacked here.

## Workstreams

### WS1 — <Name>

**Status:** <In flight | Shipped commit `abc1234` | Blocked on X>

<Concrete scope. Reference decisions and area docs; don't duplicate them.>

**Deliverables:**
- Specific artefacts: a binary, a schema, a CI gate, a test fixture.

**Exit criteria:**
- Verifiable conditions for declaring this workstream done.

### WS2 — <Name>

...

## Phase exit criteria

A short checklist of bullets. When all are true, the phase closes.

Why entry/exit criteria matter

Plans without exit criteria become forever documents. Someone always thinks of one more thing to add. The exit criteria are the contract: when these are met, the phase closes and a new plan (or follow-up roadmap) takes over.

A useful pattern: the next plan's prerequisites and the current plan's exit criteria mirror each other. That makes the handoff between phases explicit.

Archiving a finished plan

When a plan's exit criteria are all met, set its status to Implemented (YYYY-MM-DD) and move it to docs/plans/archive/. Don't delete it. The phasing and the commit trail are worth recovering later. But a finished plan sitting next to the active ones makes a reader work out which is which, so it moves out of the way.

Moving a file breaks every relative link to it, and every relative link from it. Use the archive tool so both directions get repointed in one step:

uv run docs/scripts/doctool.py archive docs/plans/<plan>.md

It git mvs the file into archive/, rewrites links across docs/, CLAUDE.md, and README.md, and re-depths the moved file's own links. Then update the plans index (and SUMMARY.md, if you render a book) to list the plan under a "Completed plans" heading. Before the move, fold anything still live in the plan into its successor or into the area doc's Implementation status.

The same tool archives a superseded decision (docs/architecture/decisions/NNNN-….md).

Workstream sizing

The right workstream size is "a contributor can pick this up cold and start within an hour." Anything larger and it's really a phase. Anything smaller and it's really a task that belongs in a handoff.

A workstream typically has:

  • A short name (WS-P1.1, WS2.4, WS-RH.1 — whatever scheme fits)
  • 1–3 deliverables
  • An exit criterion you can test for
  • An effort estimate ("~2 days", "~1 week")

Updating a plan

Plans are updated in place as work lands. A common pattern:

### WS-P1.1 — Structured timing output

- **WS-P1.1.a — Symbolic violation messages.** **Shipped 2026-05-02 in commit `0432d9a`.** New `WordSymbolMap` ...
- **WS-P1.1.b — `--timing-report <path.json>`.** **Shipped 2026-05-02 in commit `58a7a04`.** ...
- **WS-P1.1.c — `--timing-summary` text output.** **Shipped 2026-05-02 in commit `44e70a0`.** ...
- **WS-P1.1.d — Per-DFF worst-slack ranking.** Partially shipped in `58a7a04`. Remaining: ...

The pattern: bold the status, name the commit, say what shipped. The plan becomes a readable history once enough of it is filled in.

Scheduling vs. design split

A subtle but load-bearing rule: plans schedule; decisions decide; the reference describes.

When you find yourself writing "we chose X over Y because Z" inside a plan, that paragraph belongs in a decision record. When you find yourself writing "the system works by …" inside a plan, that belongs in the area doc.

The plan should reference both without reproducing them: "per Decision 0007, Pillar B Stage 3 lands only if measurement justifies it."

Multiple plans, one roadmap

Once a project has more than two or three active plans, add a roadmap.md that orders them, and a docs/plans/README.md index that lists active plans first and completed ones (in archive/) after. The roadmap doesn't replace the per-phase plans; it sequences them. See Jacquard's post-phase-0-roadmap.md as a real example.

Template

A copy-paste-ready plan template lives at starter/docs/plans/_template.md.

Handoff documents

A handoff is an ephemeral working-memory document that bridges a single session boundary — when you stop working and someone else (Claude or human) picks up — and is deleted once the work it describes is resolved. The name is literal: it's what you hand to the next session.

This is the most distinctive part of the discipline, and the one most easily abused without it.

Why this discipline exists

Decision rationale, technical context, and project state all already have natural homes:

  • Area docs in the architecture reference capture what the code does now.
  • Decision records capture why it got that way.
  • Plan docs capture what's left and the next workstream slices.

When that content lives in a handoff instead, two things go wrong:

  1. It's not where contributors look. A new contributor reading the README → architecture map → decisions chain shouldn't have to dig through a stack of resolved handoff docs to find load-bearing decisions.
  2. It rots out of sync with reality. Handoffs are point-in-time snapshots. A "STATUS: RESOLVED" banner doesn't help when the thing referenced has moved or changed; the canonical doc is what should hold the current truth.

The discipline closes this gap by forcing migration before deletion. Every load-bearing piece of a handoff lands in its proper home (area doc / decision / spike / plan / CHANGELOG) before the handoff file is removed.

What a handoff IS

A single markdown file at docs/handoffs/<topic>-handoff.md containing exactly what the next session needs to pick up where you left off:

  • Goal & next-up — what this session was trying to do, and what the very next concrete action is.
  • Done this session — commits landed, with one-line summaries.
  • Open follow-ups — the work that wasn't done, with enough scope detail to start cold.
  • Critical context — gotchas, surprising findings, environment specifics that aren't obvious from the code or docs yet.
  • Verification — the command(s) the next session runs to confirm the work is in the state you say it is.

Keep one handoff per active thread of work, not one globally. A thread is a distinct arc that someone could pick up cold, such as a migration, a feature, or a triage sweep. Concurrent threads get concurrent handoffs, each named by topic. There's still no chain. A thread holds at most one live handoff, and a resolved one is folded and deleted, not archived behind its successor.

Treat the handoff count as a WIP signal. If live handoffs climb past roughly 2× the number of people actively working, the team is running more parallel threads than it can hold context on. Read that as a prompt to resolve, consolidate, or drop threads. Don't open more.

Earlier versions of this discipline required exactly one handoff at a time. That didn't match engineering reality, where several independent arcs are often legitimately in flight at once. The per-thread rule plus the WIP heuristic replaced it.

What a handoff IS NOT

  • Not a decision log. If you find yourself writing "we chose X over Y because Z" in a handoff, that paragraph belongs in a decision record.
  • Not a design doc. "How subsystem A works" belongs in subsystem A's area doc, not in a handoff's "Critical context" section.
  • Not a status dashboard for the project. Workstream status lives in plan docs. A handoff cites a plan; it doesn't reproduce one.
  • Not a historical record. git log is the historical record. Handoffs that survive past their resolution turn into noise that misleads new contributors.

When to write one

Write a handoff at the end of any session that:

  1. Leaves work in a partial state that someone else might pick up cold.
  2. Captures non-obvious context the next session needs (e.g. "the find_timing proc rejects -full_update; use ::sta::find_timing_cmd 1 directly").
  3. Documents the next concrete step with enough scope to start without re-discovering it.

If the session ended at a clean stopping point (everything merged, all decisions recorded, area docs current, nothing surprising), don't write a handoff. The plan doc already says what's next.

Before you hand off: sweep for undocumented decisions

A handoff is written at the moment your session context is richest and about to evaporate. That makes it the right checkpoint for one deliberate question:

Did I make any architectural decision this session that isn't yet captured in a decision record, or change the code in a way the area docs don't yet describe?

Run the sweep before writing the handoff, not after. Walk the session's diffs and discussion for choices that pass the decision test: "if someone asked 'why is it like this?' six months from now, would the answer be in the code, the commit, or a decision record?" For each one whose answer is "a decision record":

  • No decision covers it → write a new one now, while the rationale and the alternatives you weighed are still in working memory.
  • It changes an existing decision → write a new record that supersedes the old one, and archive the old one. Don't edit the old record's body.

Then check the area docs. If the session changed what the code does, edit the area doc now, so its present-tense claims stay true.

Only then write the handoff. This keeps the decision out of the handoff's "Critical context" (where it doesn't belong) and puts it in its permanent home at the moment you can write it best.

Why at handoff time? Two failure modes this closes:

  1. Decisions captured nowhere. Without the sweep, a choice made mid-session lives only in the chat transcript and the diff. The transcript is gone next session; the diff shows what changed, never why this and not that.
  2. Decisions smuggled into the handoff. The tempting shortcut is to jot "we went with X because Y" into the handoff and move on. But the handoff is deleted at resolution — if the fold-and-delete step misses that paragraph, the rationale dies with the file. Writing the decision up front means there's nothing to migrate later.

The sweep is cheap when decisions are fresh and expensive to reconstruct later. Treat "I'm about to open a handoff" as the trigger to do it.

Resolution: fold, then delete

The two-location split is deliberate: handoffs live at docs/handoffs/<topic>-handoff.md while in flight; their content migrates into the persistent docs (docs/architecture/, docs/plans/) at resolution. The handoff file then gets removed; nothing about the work is lost because everything load-bearing has a permanent home elsewhere.

When a handoff's work is done — whether in the next session or several sessions later — every load-bearing piece of it must be migrated before the handoff file is deleted:

If the handoff says...It belongs in...
"We chose approach X over Y because Z"A new decision record (superseding an old one if it changes it)
"Subsystem A now does B"Subsystem A's area doc
"Future scope for WS-N: do A then B then C"The plan doc's WS-N section
"Gotcha: tool Z's API X behaves Y"A code comment near the call site, or the area doc if the gotcha cuts across files
"Build dep Z is required on Linux"The build script's apt-suggestion / Brewfile / README install section
"Subsystem A doesn't yet do B"The area doc's Implementation status, plus a plan item or issue
"Run cargo test --feature foo to verify"The verification block in the relevant plan doc, or a test-running section in CLAUDE.md

After migration, the handoff file is removed in the same commit as the migration:

git rm docs/handoffs/<topic>-handoff.md
git add <files-receiving-the-migrated-content>
git commit -m "docs: resolve <topic> handoff — fold into <where-it-went>"

The commit message records what migrated where — that's the audit trail. git log -- docs/handoffs/ then shows the project's handoff history (one add, one delete per thread) without needing the files themselves to live forever.

Template

When you do need to write one, use this skeleton, shipped as starter/docs/handoffs/_template.md (or run uv run docs/scripts/doctool.py new handoff "<topic>"). Replace placeholders inline; delete sections that don't apply (better to omit a section than fill it with "N/A").

# Handoff — <Topic> (one-line summary of what this session left open)

**Created:** YYYY-MM-DD
**Working tree:** clean | <state if not clean>
**Branch:** main | <branch>

<!--
Reminder: a handoff is ephemeral. At resolution, every load-bearing piece
below migrates into a docs/architecture/ (area doc, decision, spike) or
docs/plans/ home, and this file is then `git rm`'d in the same commit as the migration.

See docs/handoff-discipline.md for the migration table.
-->

## Goal & next-up

**Goal of this session:** <what you were trying to do, in 1–3 sentences>

**Next session should pick up:** <the very next concrete action, by name. Reference the plan doc section if applicable.>

**Verification command:**

```sh
<commands the next session runs to confirm this handoff's claimed state>
# Expect: <what success looks like>
```

## Done this session

| Commit | Subject | Notes |
|---|---|---|
| `<sha>` | <subject> | <one-line note> |

## Open follow-ups (priority-ordered)

### 1. <Item name> (<rough size>)

<Concrete scope. Enough detail to start cold. Link to existing plan / decision / area-doc sections rather than reproducing them.>

### 2. <Item name> (<rough size>)

(...)

## Critical context

<Things the next session needs to know that aren't yet in the code/docs.
Be honest about what's truly load-bearing — anything obvious from
`git log` or a quick `grep` doesn't belong here.>

## References

- [`<predecessor-handoff if any>`](<topic>-handoff.md) — predecessor (rare; usually a smell)
- [`<plan doc>`](../plans/<plan>.md) — current workstream state
- [`<decision>`](../architecture/decisions/<NNNN-name>.md) — relevant decision

## Migration note

<When this resolves, what migrates where. Helps the next session do the
fold-and-delete cleanly. Example:

- Open follow-up 1 → docs/plans/<plan>.md as new WS-X.Y
- Critical context bullet 2 → code comment near <file:line>
- Verification command → docs/plans/<plan>.md verification block
- Then `git rm docs/handoffs/<this-file>.md` in the migration commit>

Tooling

The create_handoff and resume_handoff skills (from various Claude Code orchestration toolkits) generate and consume handoffs. They're optional — the discipline above is the load-bearing artefact. A handoff written by hand following the template is just as valid.

If you use one of those skills, expect it to default to YAML format under thoughts/shared/handoffs/ with database indexing. That doesn't apply here. Override it: produce markdown at docs/handoffs/<topic>-handoff.md and skip the database step. The skill activation is informational; the project's convention takes precedence.

The CLAUDE.md snippet in this repo's starter/CLAUDE.md.snippet includes the override note so Claude Code picks it up automatically.

A worked example

A real handoff resolution from Jacquard:

  1. Session 1: deep-investigation work on a vendored dependency revealed a license-tagging bug upstream. The session ended with the bug filed but not yet fixed, plus a list of follow-ups blocked on different self-hosted runners coming back online. A handoff pre-release-runners-handoff.md was written.
  2. Session 2 (days later): one of the open follow-ups was unblocked. The fix was implemented, and the Critical context gotcha (an OpenSTA Tcl quirk) was migrated into a code comment near the Tcl call site. The HIP/CUDA routing notes from the handoff's open follow-ups migrated into the plan doc as a new "WS-RH.2" workstream.
  3. At resolution: git rm docs/handoffs/pre-release-runners-handoff.md in the same commit as the plan-doc edit. The commit message: "docs: resolve pre-release-runners handoff — fold HIP/CUDA routing into post-phase-0-roadmap WS-RH.2."

git log -- docs/handoffs/ now shows: one add, one delete. The audit trail is intact; the handoff itself is gone.

Release process

A lightweight release process complements the rest of the discipline. It doesn't have to live alongside decisions, plans, and handoffs, but the same instincts apply: keep it short, version-control the steps, make the punch-list visible.

Shape

Two distinct documents are useful:

  1. CHANGELOG.md at the repo root, in Keep a Changelog format. The historical record of what shipped when.
  2. docs/release-process.md describing how releases are cut. Short, prescriptive, version-controlled. Includes a pre-release punch list of one-time items that block the first numbered release.

Why a pre-release punch list

Most release processes on the internet assume v1.0 has already shipped. The trickiest moment is before that, when "we should release at some point" turns into "what's actually blocking us?"

A visible, version-controlled punch list makes that explicit:

## Pre-release checklist (one-time, before the first numbered release)

- [x] Phase 1 closed (per `docs/plans/phase-1.md`).
- [x] License posture confirmed; `NOTICE` file in place.
- [ ] All CI jobs green on `main`.
- [ ] End-to-end test for the headline feature.
- [ ] User-facing docs cover the install path.

Each item is a check-box. As they land, they're checked off in the same PR that landed them. When all are checked, you cut a release.

When to release

Cut a release when:

  • A user-visible feature or fix lands that you want consumers to be able to pin against.
  • Schema or CLI changes happened and consumers need a stable reference point.
  • A meaningful chunk of work in docs/plans/ is closed (e.g. a phase exits all criteria).

There is no fixed cadence. Time-based releases force releases when there's nothing user-visible to release; demand-driven releases avoid the noise.

Versioning

SemVer, starting once the first numbered release ships. Pre-1.0 versions (0.x.0) carry the standard SemVer caveat: minor bumps may include breaking changes; specific stable contracts (a JSON schema, a binary format) are documented in their own decision records and follow stricter rules.

A useful pattern is to declare the stable contracts explicitly:

Stable contracts (additive-only, breaking changes require a major
bump and a deprecation window):

- `--report` JSON schema — `src/report.rs::SCHEMA_VERSION`,
  governed by Decision 0008.
- IR FlatBuffers schema — `crates/ir/schemas/ir.fbs`,
  governed by Decision 0002.

Everything not listed is fair game to evolve.

Steps for cutting a release

1. **Verify CI is green** on `main` for all jobs. If a job is offline, hold the release until it's restored.

2. **Roll the `[Unreleased]` section in `CHANGELOG.md` into a numbered version block.** Update the link references at the bottom. Leave a fresh empty `[Unreleased]` section.

3. **Bump version** in your project's manifest (`Cargo.toml`, `package.json`, etc.). Re-build to update the lockfile.

4. **Commit:** `chore: release v<X.Y.Z>` with whatever attribution conventions your project uses.

5. **Tag:** `git tag -a v<X.Y.Z> -m "v<X.Y.Z>"` then `git push --tags`.

6. **Create a release** on the platform of your choice from the tag. Body = the CHANGELOG section for that version.

Release notes lead with what changed for the user

Write the release notes in [Unreleased] as work lands, not at release time. Open them with a short "What this means for you" block before the technical ### Added / ### Changed sections:

## [Unreleased]

### What this means for you

- You can now simulate designs with multiple clock domains.
- Install is one command on macOS: `brew install org/tap/tool`.

### Added
- Multi-clock scheduler (`docs/architecture/simulation-engine.md`).

A few benefit-framed bullets say what a user can now do. The technical changelog then gives the detail. If your release notes come from the CHANGELOG (a release workflow that extracts the section for the tag), this block becomes the first thing a reader sees on the release page.

Release candidates: main is the candidate

If you cut release candidates (X.Y.Z-rc.N) to validate install paths before a final release, don't roll main to the final version before the candidate validates. During the RC window, main stays at X.Y.Z-rc.N with the notes still under [Unreleased]. Each new RC is a main commit bumped to the next -rc.N, so main always matches the latest RC tag. Only the promote step rolls [Unreleased] into a dated [X.Y.Z] block and bumps to X.Y.Z.

Rolling first leaves main advertising a version that has no release. The dated changelog entry and the manifest version both claim X.Y.Z shipped while only the RC tag exists. Tools that read main's version to find a release tarball then fetch one that doesn't exist.

A GitHub (or equivalent) prerelease makes a good staging tier for binary channels: it's never shown as "Latest", and an install-validation job can run the documented install commands against it before promotion.

What does NOT need to change at release time

Be explicit about this — it stops well-meaning maintainers from sweeping in changes that should land in their own PRs:

  • Vendored / submodule pins (unless deliberately bumping a vendored dep).
  • License files (unless re-licensing).
  • Area docs in docs/architecture/ (unless the release changes the design they describe).

Template

A copy-paste-ready release-process.md with placeholders lives at starter/docs/release-process.md.

Adopting this in a new project

Three steps. Five minutes if your project is fresh. Longer for an existing project, where you'll backfill a few decision records and write the first area docs.

Step 1 — Drop in the templates

# from this repo's root
cp -r starter/docs/* /path/to/your-project/docs/
cp -n starter/CHANGELOG.md /path/to/your-project/   # skip if you already have one

That gives your project:

docs/
├── architecture/
│   ├── README.md              ← the map: area → reference doc → decisions
│   ├── _template.md           ← copy for each area doc
│   └── decisions/
│       ├── README.md          ← decision conventions + index
│       ├── 0000-template.md   ← copy for each new decision
│       ├── archive/           ← superseded and withdrawn decisions
│       └── spikes/
│           └── _template.md
├── plans/
│   ├── _template.md
│   └── archive/               ← finished plans
├── handoffs/
│   └── _template.md
├── scripts/
│   └── doctool.py             ← lint / archive / new
├── handoff-discipline.md      ← the migration rule, in full
├── prose-style.md             ← house writing style
└── release-process.md         ← optional companion

The empty directories signal intent. Even if they stay empty for a while, the structure is there.

Step 2 — Append the CLAUDE.md snippet

cat starter/CLAUDE.md.snippet >> /path/to/your-project/CLAUDE.md

This adds a section to your project's CLAUDE.md that:

  • Tells Claude where each kind of doc lives, and that the architecture map is the entry point.
  • States the immutable-decision rule, so Claude edits area docs instead of rewriting decisions.
  • Points Claude at doctool.py for linting, archiving, and creating docs.
  • Overrides the default thoughts/shared/handoffs/ location used by some Claude Code skill toolkits.

If your project doesn't have a CLAUDE.md yet, the snippet works as a complete starter.

Step 3 — Backfill (existing projects only)

If you're adopting this on a project that already has months of decisions baked into the code:

  1. Pick the areas. Three to eight parts of the system a contributor could own. Add a row per area to docs/architecture/README.md.
  2. Write one area doc first, for the area people ask about most. Describe what the code does today, with file references. Check every sentence against the code.
  3. Skim recent commits and PRs for "we decided to …" / "we chose …" rationales. Each one is a candidate decision record. Backfill only the decisions that are currently load-bearing: the ones a new contributor needs to know.
  4. Backdate the Status: line when you backfill: Accepted (2025-08-15, retroactive). Be honest about it being retroactive.
  5. Write the first plan doc capturing what's actually in flight right now.

A reasonable backfill is one or two area docs, 3–5 decisions, and 1 plan doc. If you find yourself writing 30 decisions, you're treating them as documentation rather than load-bearing choices. That content probably belongs in an area doc.

Migrating from the docs/adr/ layout

Earlier versions of this discipline used docs/adr/ and docs/spikes/, with records amended in place. To move a project onto the current layout:

  1. Move the files. git mv docs/adr/*.md docs/architecture/decisions/, and git mv docs/spikes/* docs/architecture/decisions/spikes/. Keep the four-digit numbers; they're stable IDs. Superseded records go to decisions/archive/.
  2. Repoint every reference. Resolve each link relative to its source file. Blind search-and-replace misses the subtle case: a file that moved deeper also needs its links to files that didn't move re-depthed (../plans/ becomes ../../plans/). For single files later on, doctool.py archive does this for you.
  3. Rename the term. ADR NNNN becomes Decision NNNN across docs, CLAUDE.md, CI config, and source comments.
  4. Write the area docs. Move each decision's present-tense current state claims into the area doc for its part of the system, and add a **Current architecture:** forward-link to every active decision. This is the bulk of the work.
  5. Leave old Amendment blocks alone unless they actively mislead. Stripping them from cited records is risky for a modest gain once the area docs carry current state. New changes follow the immutable rule.
  6. Run uv run docs/scripts/doctool.py lint until it's clean, and build the book if you render one.

Optional — wire up a docs site

If you want the docs rendered as a navigable site (not just files in docs/), the simplest path is mdBook (matches how this very repo is built):

cd /path/to/your-project
cargo install mdbook              # or: brew install mdbook
mdbook init --title "<Project>"   # creates book.toml + src/

Point book.toml's src at docs/, write a SUMMARY.md, and you're done. A good nav order puts Architecture first (Overview → area docs → Decisions → Archive → Spikes), then active plans, then a "Completed plans" part for plans/archive/. See this repo's book.toml and src/SUMMARY.md for a working example.

For projects that prefer Python-flavoured tooling, MkDocs (with the Material theme) is an equally good choice and renders the same content with no changes.

Optional — lint in CI

- uses: astral-sh/setup-uv@v6
- run: uv run docs/scripts/doctool.py lint

Add --strict once the warnings are cleared, so they can't creep back.

What "good adoption" looks like a month later

  • docs/architecture/README.md maps every area, and each area doc's present-tense claims match the code.
  • 2–8 decision records, each with a clear Status line and a forward-link. At least one superseded and moved to archive/.
  • 1–3 active plan docs, updated in place. Finished ones in plans/archive/.
  • A handful of resolved spikes, each Resolved with a one-line outcome.
  • docs/handoffs/ holds about one file per active thread, and never more than ~2× the people working.
  • git log -- docs/handoffs/ shows a clean rhythm of one-add-one-delete commits.
  • doctool.py lint is clean.

What "bad adoption" looks like

  • docs/handoffs/ has stacks of files with STATUS: RESOLVED banners. → The fold-then-delete rule isn't being followed.
  • Every commit gets a new decision record. → Decisions are being written for trivial choices.
  • Decision records describe what the code does today. → Current state belongs in the area doc.
  • Plans are written once and never updated. → Plans are being treated as decisions.
  • Decision records include "step 1: do X, step 2: do Y". → Decisions are being treated as plans.

If you see these patterns, re-read the Overview and the migration table in Handoff documents. The kinds want to bleed into each other; the discipline is the dam.

Working with Claude Code

This discipline emerged from many months of human-and-Claude-Code collaboration. A few patterns are worth calling out specifically because they're load-bearing to how the discipline survives long sessions.

What Claude Code does well with this convention

  • Reading the architecture map before suggesting changes. Once CLAUDE.md points at docs/architecture/README.md, Claude starts there, reads the area doc for what the code does now, and follows its links to the decisions behind it. Decisions become guard rails that prevent re-litigating settled questions.
  • Updating plan docs in place. "Mark WS-P1.1.b as shipped in commit <sha>" is a low-friction request that produces a clean diff.
  • Writing handoffs at session end. When asked, Claude produces a handoff that follows the template. The discipline of "what's in flight, what's blocked" is a natural fit for end-of-session reflection.
  • Folding handoffs at session start. "Resume from docs/handoffs/foo-handoff.md" can be combined with "and migrate any resolved items into the plan doc, then delete the handoff if everything's resolved."

What Claude Code needs explicit help with

  • Skill toolkit defaults. Various Claude Code skill toolkits (the create_handoff / resume_handoff family) default to YAML under thoughts/shared/handoffs/ with database indexing. These overrides need to be in CLAUDE.md so Claude picks the project convention over the skill default. The starter snippet handles this.
  • Knowing when not to write a handoff. Without a hint, Claude tends to write one at every session end. The CLAUDE.md snippet says "skip the handoff if the session ended at a clean stopping point."
  • Distinguishing decision-worthy from commit-message-worthy. Without a hint, Claude tends to write decision records for trivial choices. The CLAUDE.md snippet includes the test: would someone six months from now wonder why this was chosen?
  • Leaving decision records alone. Claude's instinct when the code moves is to "update the docs", which means editing the decision. The snippet says to edit the area doc instead and write a new record if the why changed.
  • Moving files. Claude will happily git mv a finished plan and leave a trail of broken links. The snippet tells it to use doctool.py archive, which repoints them.

The CLAUDE.md snippet

The full text is in starter/CLAUDE.md.snippet in this repo. Append it verbatim to your project's CLAUDE.md.

The snippet covers:

  1. Where each kind of doc lives.
  2. The immutable-decision rule and the doctool.py commands.
  3. The smell tests (handoff overflow, current state in decisions, plans in the wrong place, plan stagnation).
  4. Override notes for the YAML/database default of various skill toolkits.
  5. A pointer to docs/prose-style.md and back to this repo for the long-form discipline.

Useful one-shot prompts

A few prompts that work well with this convention:

At session start (resuming work):

Read docs/handoffs/{topic}-handoff.md. Run its verification command and confirm the result matches, then proceed with the next-up item.

At session end (work in progress, partial state):

Write a handoff at docs/handoffs/{topic}-handoff.md. Use the template at docs/handoffs/_template.md. Goal: {X}. Open follow-ups: {list}. Critical context: {gotchas}.

At session end (work fully resolved):

Migrate the contents of docs/handoffs/{topic}-handoff.md into docs/plans/{plan}.md, the {area} area doc, and a new decision record if one is needed, then git rm the handoff. Run doctool.py lint. Combine into a single commit.

Mid-session (decision point):

Before we decide on {X} vs {Y}, run uv run docs/scripts/doctool.py new decision "{title}" and draft it proposing {X}. Status: Proposed. Open the Context with what the code does today.

Mid-session (validating an assumption):

Run uv run docs/scripts/doctool.py new spike "{topic}" and write it up with the question {Q}, a time-box of 2 days, and a decision matrix for the three plausible outcomes. Status: Open.

After a plan's exit criteria are met:

Set docs/plans/{plan}.md to Implemented ({date}), archive it with uv run docs/scripts/doctool.py archive docs/plans/{plan}.md, move its row under Completed in the index, and run lint.

Anti-patterns to watch for

Claude has a few biases that this discipline mostly resists, but watch for:

  • Reaching for handoffs as the universal output format. A handoff is for ephemeral working memory. If Claude proposes writing a "handoff" that contains Why we chose X over Y, redirect to a decision record.
  • Reproducing plan content inside decisions. "Decision 0007 — Roadmap for the Q3 work" is a plan doc, not a decision. Redirect.
  • Present-tensing a decision. "The scheduler batches 1024 edges" in a decision record will be wrong the day someone changes the batch size. That sentence belongs in the area doc.
  • Mixing decision and rationale into commit messages. Commit messages should reference the decision, not embed it. "Per Decision 0006, …" is the right shape.

Pairing this with other Claude Code conventions

Nothing here conflicts with the broader Claude Code conventions you might already use:

  • CLAUDE.md as the primary instructions file. Yes — this discipline lives in CLAUDE.md.
  • Memory systems (the ~/.claude/memory/ user-memory pattern). Memory and decision records cover different things: memory is cross-project, about the user and their preferences; decisions are project-specific, about the code and its design. They don't compete.
  • Skill toolkits (create_handoff etc.). These work fine with the convention as long as the directory and format overrides are in CLAUDE.md.

Prose style

The layout keeps claims in the right place. A house prose style keeps them readable once they're there. Two readers matter: a contributor skimming for the answer, and a model that retrieves one section and repeats what it says. Both are served by the same rules. Put the point first, write in specific terms, and make sure every present-tense sentence is true of the code.

The starter kit ships the style below as starter/docs/prose-style.md. Copy it, adjust it to taste, and point CLAUDE.md at it so Claude reads it before writing docs. The CLAUDE.md snippet already does that.

House style for this project's prose docs: the architecture reference, decision records, plans, and guides. It covers how sentences read. How docs are structured (the reference / decision / spike split, the three kinds of claim, stable-ID cross-links) lives in docs/architecture/decisions/README.md; this page is only about the writing.

Voice

Be direct and have opinions. State the point first, then support it. Use specific names and numbers, not vague claims (BATCH_SIZE = 1024, not "a fixed batch size"). Trust the reader to see what matters without labels like "significant" or "important".

Write to be understood by a non-native speaker and by a model reading a single retrieved section. Keep each section self-contained and restate its subject rather than leaning on "as described above".

Claims track the code

A present-tense sentence in a reference doc is a verifiable claim about the code. Check it before writing it, and keep it current when the code moves. Rationale is past-tense and lives in decision records, which don't get rewritten when the code changes. That split is the point of the layout.

Sentences

  • Use contractions: "it's", "don't", "won't".
  • Vary sentence and paragraph length. Don't write uniform blocks.
  • Avoid mid-sentence interjections. Don't bracket a qualifier inside a sentence with paired dashes or parentheses. Promote it to its own sentence or move it to the end. Write "Only X-capable partitions run the X-aware kernel. After reset, under 5% are X-capable." Not "partitions — typically under 5% after reset — run the kernel".
  • A single dash introducing an appositive or definition is fine: "a hierarchical binary tree — the boomerang". Keep it at the end of a clause, not the middle of one.

Lists

Bold-term definition lists suit a genuine enumeration where the reader should weigh each item:

  • Parser reads structural Verilog into a flat netlist.
  • Mapper rewrites logic to one uniform node type.

Use them when the terms are the subject. Don't use them to avoid writing a paragraph, and don't pad a two-item list into bullets.

Banned words and tics

These are the most flagged AI-writing markers. Don't use them:

delve, dive into, navigate (figurative), underscore, bolster, foster, harness (figurative), leverage, unpack (figurative), shed light on, pave the way, pivotal, groundbreaking, cutting-edge, transformative, game-changing, seamless, intricate, multifaceted, holistic, testament, landscape (figurative), realm.

And these structures, which mimic insight without providing it:

  • "It's not just X — it's Y" / "Not only X, but Y"
  • "This isn't about X. It's about Y."
  • "It's important / worth noting that…", "At its core…", "When it comes to…"
  • Opening with a sweeping statement about the field, or closing with an inspirational wrap-up. Start and end on substance.

Before committing a doc

  1. Read it aloud. Does a sentence sound like a press release or a marketing page? Rewrite it.
  2. Are you saying the same thing twice in different words? Say it once.
  3. Is every present-tense claim true of the code as it stands today?
  4. Does uv run docs/scripts/doctool.py lint pass?

FAQ

Why five kinds of doc? Isn't that a lot?

The five kinds correspond to genuinely different lifetimes:

  • Living, rewritten as the code moves (architecture reference)
  • Forever, immutable (decision)
  • Forever, marked Resolved (spike)
  • Long-lived, kept current, archived when done (plan)
  • Ephemeral, deleted at resolution (handoff)

Collapsing any pair leads to a class of bug. Reference + decision collapsed → records that mix why with what the code does now, and go stale the moment the code moves. Decision + plan collapsed → "decisions" that get rewritten as scope changes. Plan + handoff collapsed → can't tell what's committed from last week's brainstorm. Handoff + decision collapsed → handoffs survive forever and pile up.

The cost of five kinds is low, because each has a clear template and doctool.py checks the layout. The cost of fewer kinds is high: the ones that remain get overloaded.

Why drop the term "ADR"?

"Architecture Decision Record" doesn't tell a newcomer what's inside, and enough people bounce off the acronym that it costs more than it buys. "Decision" says what the record is. The format is still Nygard's, and the numbers carry over unchanged.

Why did decisions stop being amended in place?

Because amending was a workaround. When the decision record was the only doc, it had to carry current state, so it had to be edited whenever the code moved. The result mixed three tenses in one file. With an architecture reference to hold current state, the decision record can go back to being a plain record of a choice. See Why not amend in place?.

Why mdBook over MkDocs / Docusaurus / VitePress?

No strong reason. mdBook is what this repo uses because (a) it's Rust-native and matches the Jacquard project the discipline was extracted from, (b) it has zero JavaScript and a fast build, and (c) the default theme is good enough out of the box. MkDocs (especially with the Material theme) is an equally fine choice and the underlying Markdown content needs no changes.

The discipline itself doesn't care. Plain docs/ files in your repo, viewed on GitHub, work fine.

What if my project genuinely doesn't have any non-obvious decisions yet?

Then don't write any decision records yet. The discipline doesn't require backfilling decisions that aren't there.

That said, "we deliberately chose not to use X" is itself worth a decision record. If your project's shape was influenced by an explicit choice — even a "we'll keep it simple and not bring in framework Y" — write that down.

How do I handle a decision that was made before this discipline was adopted?

Backfill a decision record with Status: Accepted (YYYY-MM-DD, retroactive). Be honest about the retroactive nature. Don't invent commitments that weren't actually made; just record what's currently true.

Can a handoff reference a previous handoff?

Yes, in the ## References section. But it's a smell — handoffs aren't supposed to chain. If you find yourself referencing a previous handoff, ask whether the previous one's content should have been folded into a plan or decision instead of carried forward.

What if the next session needs context from three previous handoffs?

That context belongs in the plan doc, not in a chain of handoffs. Migrate it.

How many handoffs is too many?

One per active thread is normal. Past roughly twice the number of people actively working, you have more threads open than anyone can hold context on. doctool.py lint --people N warns at that point. Resolve or drop threads rather than opening more.

Do I need a release-process.md?

Only if your project produces releases (libraries, binaries, services with versions consumers can pin against). For internal services with continuous deployment, you probably don't.

Does the same person who creates a handoff have to resolve it?

No. The whole point of the handoff template is that it captures enough context for someone else (Claude, a colleague, future-you) to pick up cold. The verification command at the top is the safety net — it confirms the handoff's claimed state matches reality before the new session starts work.

Does this work for non-software projects?

Probably. The five kinds (reference, decision, spike, plan, handoff) are general enough. The templates would need light adjustment (verification commands wouldn't be cargo test). If you try it for, say, a writing project or a research project, file an issue with what worked and what didn't.

What's the relationship between this and the arc42 / diátaxis / C4 / RFC frameworks?

Adjacent but different scopes:

  • arc42 is a software architecture documentation template. It would fit inside this as the structure of your area docs. It doesn't address the lifecycle question.
  • Diátaxis classifies documentation into tutorials, how-tos, references, and explanations. This discipline borrows its reference/explanation split directly: the architecture reference is Diátaxis reference, and the decision log is explanation. Tutorials and how-tos sit alongside as ordinary guides.
  • C4 model describes diagram conventions for software architecture. Orthogonal; use C4 inside your area docs if you want.
  • IETF RFCs are similar in spirit to decision records but for cross-team standards. A decision record is an RFC scoped to a single project.

Nothing here conflicts with any of those; they fill in different parts of the documentation surface area.

Is this proprietary to Claude Code?

No. The discipline is plain-Markdown, plain-git, and tool-agnostic. The CLAUDE.md snippet is Claude-specific because Claude Code happens to read that file by convention; an analogous snippet for any other AI coding assistant (or none at all) would work equally well. The core convention is older than AI coding assistants.

Glossary

Terms and acronyms used throughout this book.

Architecture reference / area doc

The current design of one part of the system, at docs/architecture/<area>.md. Present tense, kept in step with the code, no rationale and no dead history. Unbuilt work sits in its ## Implementation status section. The map at docs/architecture/README.md lists every area.

See: Architecture reference.

Decision record

A short, numbered markdown file capturing a non-obvious choice and the rationale behind it, at docs/architecture/decisions/NNNN-<short-name>.md and cited as "Decision NNNN". Written in past tense and immutable once accepted: only its Status line and **Current architecture:** forward-link change. When a decision changes, a new record supersedes it and the old one moves to archive/.

See: Decision records.

ADR — Architecture Decision Record

The original name for a decision record, from Michael Nygard's 2011 post, which also gave the basic Context / Decision / Consequences structure. Earlier versions of this book used the term and the docs/adr/ directory. See Migrating from the docs/adr/ layout.

Plan doc

A scheduling document at docs/plans/<topic>.md that orders the work a decision (or set of decisions) has committed to. Organised into phases and workstreams with explicit entry/exit criteria. Updated in place as work lands, then moved to docs/plans/archive/ when Implemented.

See: Plan documents.

Spike

A time-boxed experiment, written up at docs/architecture/decisions/spikes/<topic>.md, that answers a single binary question — "did this approach work?" — before the project commits to it. The term comes from XP / agile usage. Resolved with a clear yes/no/partial outcome and kept forever as the historical answer.

See: Spike documents.

Handoff

An ephemeral working-memory document at docs/handoffs/<topic>-handoff.md that bridges a session boundary for one thread of work. Folded into area docs / decisions / spikes / plans at resolution and then deleted in the same commit as the migration. One per active thread; more than ~2× the people working is a WIP smell.

See: Handoff documents.

Workstream (WS)

A unit of scoped work within a plan doc, typically named with a numeric or alphabetic suffix (WS1, WS-P1.1, WS-RH.2). Sized roughly so a contributor can pick it up cold and start within an hour. Each workstream has 1–3 deliverables and an exit criterion.

Phase

A coarse-grained grouping of workstreams within a plan, with explicit entry and exit criteria. A plan typically has one or more phases; phases close when their exit criteria are met.

Fold-then-delete

The migration rule for handoffs: every load-bearing piece of a handoff must be migrated to its proper home (area doc / decision / spike / plan / CHANGELOG.md) before the handoff file is git rm'd. The migration and deletion go in the same commit so the audit trail is intact.

Archive

The archive/ subdirectory under docs/plans/ (finished plans) and docs/architecture/decisions/ (superseded and withdrawn decisions). Archived docs stay in the repo and keep their names and numbers. Move files there with doctool.py archive, which repoints every reference.

doctool.py

The stdlib-only helper at docs/scripts/doctool.py: lint checks the layout's rules, archive moves a finished doc and repoints links, new creates a doc from its template.

Walk-back

A section in a decision record that names the conditions under which the decision should be revisited, and how to revisit it cheaply. Distinct from a spike: walk-backs are predictions about future re-evaluation; spikes are experiments run before committing.

CI — Continuous Integration

The automated build/test pipeline that runs on every push or pull request. Used in the release process as a gating signal ("don't release if CI is red").

PR — Pull Request

A proposed change to a repository, reviewed before merge. Used loosely throughout this book to mean "a unit of reviewed change," regardless of platform (GitHub PR, GitLab MR, Gerrit changeset, etc.).

SemVer — Semantic Versioning

The SemVer 2.0.0 spec for MAJOR.MINOR.PATCH version numbers, where breaking changes bump MAJOR, additive changes bump MINOR, and bugfixes bump PATCH. Pre-1.0 (0.x.y) versions carry the standard caveat that minor bumps may include breaking changes.

CLI — Command-Line Interface

The set of subcommands, flags, and arguments a binary exposes. Distinct from internal APIs: a project's CLI is a user-facing contract and gets versioned accordingly.

Status (decision / spike / plan)

A line near the top of a decision, spike, or plan that names its lifecycle state. It's a claim about the code, so verify it before setting it. Decision statuses: Proposed → Accepted (YYYY-MM-DD) or Accepted (partial) (YYYY-MM-DD) → Superseded by Decision NNNN (YYYY-MM-DD) or Withdrawn (YYYY-MM-DD). Plan statuses: Proposed → Active → Implemented (YYYY-MM-DD), plus Deferred and Withdrawn (YYYY-MM-DD). Spike statuses: Open → Resolved (YYYY-MM-DD) — <one-line outcome>.

Migration table

The table inside the handoff chapter (and in docs/handoff-discipline.md in adopting projects) mapping each kind of handoff content to its destination home. The single most important reference for resolving a handoff.