Architecture Decision Records
What these are
An Architecture Decision Record (ADR) captures a single architecturally significant decision, its context, and its consequences — at the moment it was made, in the words that were true then.
The value is not the decision; it is the context. Six months later, the code shows what was chosen and can never show why, or what the alternatives were, or what was known at the time. A reader who does not know the why has two bad options: assume the decision was arbitrary and change it, or assume it was sacred and work around it. An ADR gives them a third.
The format
These records use Michael Nygard's template — the de facto standard,
the same one every other warehouse-systems service uses:
# NNNN. Title (a short noun phrase)
## Status
Accepted | Proposed | Deprecated | Superseded by ADR-XXXX
## Context
The forces at play: technical, business, operational. What is true that makes
this a decision rather than an obvious default? Written in full sentences and
in the present tense, describing the situation as it is.
## Decision
The response to those forces, stated actively: "We will…"
## Consequences
What becomes easier and what becomes harder — both. A record with only
positive consequences has not been thought about.
One decision per file, numbered 0001-, 0002-, … Numbers are never
reused and files are never deleted.
Immutability
An accepted ADR is never edited to change its decision. If a decision is reversed, write a new ADR that supersedes it, and update the old one's Status line to point at the successor. The historical record of what was believed at the time is the entire asset.
Typos, broken links and formatting are of course fair game.
The records
| # | Title | Status |
|---|---|---|
| 0001 | Hexagonal (ports & adapters) architecture | Accepted |
| 0002 | HTTP consumer of inventory-storage and wes-work-planning, not shared code | Accepted; release portion partially superseded by ADR 0005 |
| 0003 | Ship-complete by default and fail-closed allocation | Accepted |
| 0004 | The cancellation boundary is release | Accepted, with a documented known gap |
| 0005 | Choreographed release via Kafka, folded allocate-then-release, and pathId goes internal-only | Accepted; envelope superseded by ADR 0030; no-confirmation-loop decision amended by ADR 0043 |
| 0006 | Per-service analytical data product (report) via a separate analytics topic | Accepted; Envelope v1 superseded by ADR 0030 |
| 0007 | Adopt the fleet's micro-frontend console architecture (order-mgmt-mfe) | Accepted |
| 0008 | FulfillmentClass — a demand-shape classifier, not a process-path name | Accepted |
| 0009 | Standard metrics convention across the fleet (telemetry.Setup, otelchi, Tier-2 business-metric naming) | Accepted |
| 0010 | Model Context Protocol as an inbound adapter, not a new service | Accepted; auth section superseded by ADR 0012 |
| 0011 | Adopt the fleet REST identity (static bearer keys, read/read-write scopes) | Superseded by ADR 0012 |
| 0012 | Remove the REST/MCP bearer auth layer | Accepted |
| 0013 | Process-path selection as a real domain policy, validated against a live catalogue | Accepted; extended by ADR 0021 |
| 0014 | The delivery promise is a CPT window derived from fulfillment capability, not a configured lead time | Accepted |
| 0015 | wes-work-planning's PathCapacityChanged is wired as the real PathCapacity adapter | Accepted; flat-envelope dispatch superseded by ADR 0030 |
| 0016 | Eligibility-driven process-path selection (ADR 0014 step B, routing only) | Accepted; extended by ADR 0021; live classification lookup superseded by ADR 0036 |
| 0017 | Per-shipment-group promising (ADR 0014 step B, the second half) | Accepted |
| 0018 | RepromiseOrder consumer and OrderRepromised — closing ADR 0014's feedback loop | Accepted; flat inbound envelope superseded by ADR 0030 |
| 0019 | Promise KPIs on the Order Funnel data product (ADR 0014 §6, order-management half) | Accepted; amended 2026-10 (Network basis bucket) |
| 0020 | Network-originated demand — release-on-allocation, deadline feasibility, and the Network promise basis | Accepted |
| 0021 | Multi-path attribute-driven routing — closes ADR-0013's original deferral | Accepted; candidate set amended by 0042 |
| 0022 | Transactional outbox for order-management's dual-topic event publishing | Accepted |
| 0023 | Transactional Idempotency-Key middleware for POST /orders | Accepted |
| 0024 | Optimistic concurrency (version column) for the Order aggregate | Accepted |
| 0025 | Resilience — circuit breakers, retry, DLQ, graceful shutdown | Accepted; product-classification breaker and retry superseded by ADR 0036 |
| 0026 | Horizontal autoscaling and pgxpool tuning | Accepted |
| 0027 | Partition key (OrderId) on the integration publisher's Kafka messages | Accepted |
| 0028 | Idempotency-Key on inventory-storage reservation calls | Accepted |
| 0029 | Migrations over a direct (non-PgBouncer) Postgres connection | Accepted |
| 0030 | CloudEvents 1.0 as the mandatory event envelope | Accepted |
| 0031 | Consume warehouse-planning's capacity plans into a local planned-capacity read model | Accepted |
| 0032 | Housekeeping sweeper for idempotency keys and published outbox rows | Accepted |
| 0033 | Boot-time first-dial retry, synchronous-writer BatchTimeout/acks, and DLQ topic-create retry | Accepted |
| 0034 | Raise OrderLineReleased and OrderReleased at the release transition | Accepted |
| 0035 | SiteSkuDemandChanged — an additive, PII-free site/SKU demand projection event | Accepted |
| 0036 | Product classification from a local copy of product-master events | Accepted |
| 0037 | Send the order line number (lineNo) on POST /reservations | Accepted |
| 0038 | The operator MFE sends an Idempotency-Key per order submission | Accepted |
| 0039 | The reports binary's routes are a contract: apis/openapi-reports.yaml | Accepted |
| 0040 | The outbox relay stops claiming a row after OUTBOX_MAX_ATTEMPTS failures | Accepted |
| 0041 | The W3C trace context crosses the outbox in outbox_events.headers (D27 reference) | Accepted |
| 0042 | Path selection considers only paths whose intake admits customer orders | Accepted; amends 0021 |
| 0043 | Confirm an order-line release from WorkUnitCreated, and flag OrderReleaseUnconfirmed | Accepted; amends 0005's no-confirmation-loop decision |
| 0044 | An order may carry an optional, caller-assigned fulfillment site | Accepted; amends 0035 §4 and lifts 0031's deferral |
| 0045 | A Kafka consumer that stops on its own takes the process down | Accepted |
| 0046 | A2A inbound adapter (third driving adapter, read-only) | Accepted |
| 0047 | An order is promised against its own fulfillment site | Accepted; amends 0044, 0014 step A and 0031 §5 |
| 0048 | Adopt the fleet REST API guideline | Accepted; amends 0023 and 0038 |
| 0049 | Agent authority levels and the complete MCP surface | Accepted; extends 0010 and 0046 |
| 0050 | OrderAllocated/OrderPartiallyAllocated carry the order's fulfillment site | Accepted; additively supersedes 0044 §7's freeze |
| 0051 | Consume ShipmentConfirmed/PackageMissedLoad: the Order ships | Accepted |
| 0052 | Consume CapacityPlanSuperseded: a superseded plan stops constraining orders | Accepted; extends 0031 §1 and §2 |
| 0053 | Match planned capacity to an order's site by the plan's site_id | Accepted; amends 0031 §5 and extends §1 |
| 0054 | Every problem type has an idempotency replay class; a retryable refusal is not stored | Accepted; narrows 0023 §7 and 0048's replay sentence |
Each of these reconstructs a decision that is actually visible in this
repository's CLAUDE.md and code — none is a generic placeholder.
Proposing a new one
- Copy the template above into
docs/docs/adr/NNNN-short-kebab-title.md, taking the next free number. - Open it with Status: Proposed.
- Write the Context before the Decision. If the context does not make the decision feel inevitable, the context is incomplete — or the decision is wrong.
- Fill in Consequences honestly, including the ones you dislike.
- Add it to the table above, to the ADR index and to
sidebars.ts. - Raise it as a pull request; the discussion belongs on the PR, not inside the record.
- On merge, flip the status to Accepted.
What deserves an ADR
Something is architecturally significant if reversing it later would be expensive — it constrains the structure of the code, pins a contract other teams depend on, or is costly to undo.
Yes: the layering rule; how allocation and release are orchestrated across two Suppliers; the fail-closed distinction between a business fact and an infrastructure failure; the cancellation boundary at release.
No: which linter rules are enabled; a library upgrade; a refactor with no external consequence. Padding the log with trivia makes the significant records harder to find.