Skip to main content

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​

#TitleStatus
0001Hexagonal (ports & adapters) architectureAccepted
0002HTTP consumer of inventory-storage and wes-work-planning, not shared codeAccepted; release portion partially superseded by ADR 0005
0003Ship-complete by default and fail-closed allocationAccepted
0004The cancellation boundary is releaseAccepted, with a documented known gap
0005Choreographed release via Kafka, folded allocate-then-release, and pathId goes internal-onlyAccepted; envelope superseded by ADR 0030; no-confirmation-loop decision amended by ADR 0043
0006Per-service analytical data product (report) via a separate analytics topicAccepted; Envelope v1 superseded by ADR 0030
0007Adopt the fleet's micro-frontend console architecture (order-mgmt-mfe)Accepted
0008FulfillmentClass — a demand-shape classifier, not a process-path nameAccepted
0009Standard metrics convention across the fleet (telemetry.Setup, otelchi, Tier-2 business-metric naming)Accepted
0010Model Context Protocol as an inbound adapter, not a new serviceAccepted; auth section superseded by ADR 0012
0011Adopt the fleet REST identity (static bearer keys, read/read-write scopes)Superseded by ADR 0012
0012Remove the REST/MCP bearer auth layerAccepted
0013Process-path selection as a real domain policy, validated against a live catalogueAccepted; extended by ADR 0021
0014The delivery promise is a CPT window derived from fulfillment capability, not a configured lead timeAccepted
0015wes-work-planning's PathCapacityChanged is wired as the real PathCapacity adapterAccepted; flat-envelope dispatch superseded by ADR 0030
0016Eligibility-driven process-path selection (ADR 0014 step B, routing only)Accepted; extended by ADR 0021; live classification lookup superseded by ADR 0036
0017Per-shipment-group promising (ADR 0014 step B, the second half)Accepted
0018RepromiseOrder consumer and OrderRepromised — closing ADR 0014's feedback loopAccepted; flat inbound envelope superseded by ADR 0030
0019Promise KPIs on the Order Funnel data product (ADR 0014 §6, order-management half)Accepted; amended 2026-10 (Network basis bucket)
0020Network-originated demand — release-on-allocation, deadline feasibility, and the Network promise basisAccepted
0021Multi-path attribute-driven routing — closes ADR-0013's original deferralAccepted; candidate set amended by 0042
0022Transactional outbox for order-management's dual-topic event publishingAccepted
0023Transactional Idempotency-Key middleware for POST /ordersAccepted
0024Optimistic concurrency (version column) for the Order aggregateAccepted
0025Resilience — circuit breakers, retry, DLQ, graceful shutdownAccepted; product-classification breaker and retry superseded by ADR 0036
0026Horizontal autoscaling and pgxpool tuningAccepted
0027Partition key (OrderId) on the integration publisher's Kafka messagesAccepted
0028Idempotency-Key on inventory-storage reservation callsAccepted
0029Migrations over a direct (non-PgBouncer) Postgres connectionAccepted
0030CloudEvents 1.0 as the mandatory event envelopeAccepted
0031Consume warehouse-planning's capacity plans into a local planned-capacity read modelAccepted
0032Housekeeping sweeper for idempotency keys and published outbox rowsAccepted
0033Boot-time first-dial retry, synchronous-writer BatchTimeout/acks, and DLQ topic-create retryAccepted
0034Raise OrderLineReleased and OrderReleased at the release transitionAccepted
0035SiteSkuDemandChanged — an additive, PII-free site/SKU demand projection eventAccepted
0036Product classification from a local copy of product-master eventsAccepted
0037Send the order line number (lineNo) on POST /reservationsAccepted
0038The operator MFE sends an Idempotency-Key per order submissionAccepted
0039The reports binary's routes are a contract: apis/openapi-reports.yamlAccepted
0040The outbox relay stops claiming a row after OUTBOX_MAX_ATTEMPTS failuresAccepted
0041The W3C trace context crosses the outbox in outbox_events.headers (D27 reference)Accepted
0042Path selection considers only paths whose intake admits customer ordersAccepted; amends 0021
0043Confirm an order-line release from WorkUnitCreated, and flag OrderReleaseUnconfirmedAccepted; amends 0005's no-confirmation-loop decision
0044An order may carry an optional, caller-assigned fulfillment siteAccepted; amends 0035 §4 and lifts 0031's deferral
0045A Kafka consumer that stops on its own takes the process downAccepted
0046A2A inbound adapter (third driving adapter, read-only)Accepted
0047An order is promised against its own fulfillment siteAccepted; amends 0044, 0014 step A and 0031 §5
0048Adopt the fleet REST API guidelineAccepted; amends 0023 and 0038
0049Agent authority levels and the complete MCP surfaceAccepted; extends 0010 and 0046
0050OrderAllocated/OrderPartiallyAllocated carry the order's fulfillment siteAccepted; additively supersedes 0044 §7's freeze
0051Consume ShipmentConfirmed/PackageMissedLoad: the Order shipsAccepted
0052Consume CapacityPlanSuperseded: a superseded plan stops constraining ordersAccepted; extends 0031 §1 and §2
0053Match planned capacity to an order's site by the plan's site_idAccepted; amends 0031 §5 and extends §1
0054Every problem type has an idempotency replay class; a retryable refusal is not storedAccepted; 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​

  1. Copy the template above into docs/docs/adr/NNNN-short-kebab-title.md, taking the next free number.
  2. Open it with Status: Proposed.
  3. 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.
  4. Fill in Consequences honestly, including the ones you dislike.
  5. Add it to the table above, to the ADR index and to sidebars.ts.
  6. Raise it as a pull request; the discussion belongs on the PR, not inside the record.
  7. 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.