An architecture decision on one page: preserving the reason without bureaucracy

A short ADR for a synthetic catalog: context, two alternatives, the cost of the choice and an actual independent reread with a changed requirement.

A record preserves the reason for the chosen path.

After several changes, code can still show what was built while explaining less about why it was chosen. Why is the catalog read from a file? Why not from a table? Which constraint mattered at the time? Without those answers, the next person may preserve an accidental choice for too long or remove something that protected a useful property.

A short architecture decision record, or ADR, can preserve this context. Its usefulness can be tested with a concrete question: can another reader recover the reason for the decision and understand when to reconsider it? The following local catalog is a new teaching example, rather than a history of changes to a production system.

One decision that can be named

A document called “catalog architecture” can easily become an explanation of the entire application. “Read the local catalog from a complete JSON snapshot” names one choice and immediately establishes what can be discussed. The reader sees the boundary between processes, the data format and the update approach before reaching implementation details.

Michael Nygard describes an ADR as a short record of a significant decision, its context, status and consequences. This structure helps preserve the reasoning through larger changes. A few connected paragraphs are enough for my example. A single page is a readability target, rather than a reason to omit a material constraint.

A useful title does not need to list every technology. It matters more that the record explains what has been decided within the model, which facts supported that choice and what remains unverified. A short document can still be explicit about uncertainty.

The initial catalog task

The fictional Lantern catalog contains up to 2000 short records. Two CLI consumers read the entire catalog without changing it. One builder process receives the complete source set and prepares a new snapshot. Its runs do not overlap: an external organizer provides that sequencing.

Readers need a completed set. Partial editing, change history and independent concurrent writers are outside the task. In this context, a transparent file holding the complete set may be sufficient. That does not mean it is always simpler or more reliable than a database.

These are the conditions the ADR needs to retain. Writing only “we use JSON because it is simple” leaves the future reader guessing which kind of simplicity mattered: installation, inspection, updates or maintenance. Concrete constraints make the choice open to reasoned discussion.

A compact decision record

The teaching ADR has the following structure. Its “accepted” status applies only to the synthetic model; the implementation and operational properties remain unverified.

Part Recorded content
Scope Passing a local catalog from one builder process to two readers
Context Complete reads, complete replacement, sequential runs, up to 2000 records
Alternatives A complete JSON file or MySQL 8.4/InnoDB with a schema and transactions
Decision A versioned JSON snapshot with structural and key-uniqueness checks
Cost Reading the entire set into memory, full replacement and a separate publication protocol
Unknowns Memory budget and replacement behavior on the target filesystem
Reconsideration triggers A second independent writer, partial changes, history or an oversized set

The builder should write a temporary file in the same directory and replace the active file after preparation finishes. A consumer opens it once, reads the set and checks the format version. An invalid or unavailable file produces an explicit error. It does not become a successful empty catalog.

The record also says that an old snapshot is retained for diagnosis but is not substituted automatically by a reader. That sentence preserves a product behavior that could otherwise change silently during implementation. At the same time, it does not claim that atomic replacement or resilience to power loss has been verified. Those properties still need an experiment in the target environment.

MySQL 8.4/InnoDB is not a “bad option” in this comparison. It offers a different collection of capabilities and responsibilities. Under the initial conditions, a database server, schema, migrations and connection conventions do not help the two readers enough to justify them in this small exercise. When the conditions change, the weight of that argument can change as well.

Why consequences matter more than adjectives

Phrases such as “flexible solution” and “easy to maintain” do little for the next developer. The consequences here are testable: the whole set is loaded into memory, the entire file is replaced, there is one writer, and readers do not fall back to old data automatically. These statements produce concrete questions for future acceptance.

It is equally important to describe the cost of the alternative without exaggeration. This exercise provides no benchmark of JSON against MySQL 8.4/InnoDB, so there is no basis for declaring a speed winner. The decision rests on the current shape of the task. If indexes or partial changes become necessary, the comparison should start from those new requirements.

An ADR does not replace a runbook either. Installation commands, exact dependencies and test results have their own place. The short record retains the reason for the choice, its scope and links to evidence when evidence exists. This lets the reproduction procedure evolve without silently rewriting the original motivation.

A reread with a changed requirement

The ADR, controlled requirement change and review criteria were frozen before the reread. A separate model session without the earlier conversation received only the record and a new condition: two independent editors now submit partial changes concurrently, and an accepted change must not be silently lost. The review criteria were not supplied to that reader.

The response recovered the original reason for JSON: complete snapshots, sequential writing and reading the entire set. It identified that the new requirement removes both the single writer and the complete-input assumption. It also explained lost updates: completing a file replacement does not prevent two writers from preparing their results from the same old copy.

For the changed requirement, the next ADR could consider MySQL 8.4/InnoDB, short transactions and an explicit conflict policy. This is an option for further consideration, not a verified outcome of the reread. The response also described an alternative for retaining JSON: coordinate the entire cycle of reading the current state, applying a change and publishing the result. It retained questions about the filesystem, waiting, retries and durability of accepted changes without presenting them as verified.

This was one actual reread of one synthetic record. It showed which arguments this reader recovered, but did not measure general model quality or human comprehension. The exercise did not run a JSON store or database implementation or test concurrent writing; it does not validate the proposed MySQL option. The original ADR was not adjusted after receiving the response.

What to do with the next decision

The new conclusion deserves its own record: which requirement changed, what no longer fits and which option is now selected. AWS describes superseding an accepted ADR with a new record while preserving the earlier one. The history can then show a change in context without making the original choice look arbitrary.

For Lantern, the next record needs to address concurrent changes, conflicts over a single record, waiting limits and the required checks. Merely mentioning MySQL 8.4/InnoDB does not settle those questions. Until the requirements are agreed and the implementation is verified, the outcome is a reasoned proposal rather than a completed transition.

Before finishing a short ADR, I check whether it names a specific choice, explains the reason without requiring an old chat, makes the accepted cost visible and identifies a reconsideration trigger. The record is doing useful work when the next change can begin from those clear grounds.

  1. Repository governance Rules that survive the next development session
  2. Architecture Shared model, different use cases: public reading and editorial writes
  3. Knowledge & AI A retrieved document is not yet a current decision: freshness in knowledge search