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:

# 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
0001Process Path Management as a new Generic Subdomain bounded contextAccepted
0002Cutting the fleet over from the static YAML catalogue to this service's eventsAccepted
0003Transactional outbox for the process-path Published LanguageAccepted (stored message format superseded by 0016; per-path ordering amended by 0030)
0004Adopting the fleet REST identity standardSuperseded by 0005
0005Removing the REST auth layerAccepted
0006MCP server as a second inbound adapterAccepted
0007Analytical data product (report) via a separate analytics topicAccepted (§1 analytics envelope superseded by 0016; trace-free note amended by 0029)
0008Seven new process-path families aligned to real FC labor-tracking vocabularyAccepted
0009Optional destination LocationRole on a ProcessPathAccepted
0010Process paths publish a fulfillment capability contract (cycle time, eligibility, CPT schedule)Accepted
0011Transactional Idempotency-Key middleware for POST /process-pathsAccepted
0012Analytics-consumer dead-letter queue and graceful shutdown hardeningAccepted; mark/apply split amended by 0032
0013Hash balancer for the outbound Kafka writers, closing a latent partition-affinity gapAccepted
0014Per-workload HorizontalPodAutoscaler and pgxpool MaxConns/statement_timeout tuningAccepted
0015Run golang-migrate against a direct Postgres connection, not PgBouncerAccepted
0016CloudEvents 1.0 as the mandatory event envelopeAccepted
0017Optimistic concurrency (version column) on ProcessPath and CPTScheduleAccepted
0018Outbox lag gauge and housekeeping sweeperAccepted
0019Adopting the fleet standard-metrics conventionAccepted
0020Adopting RFC 7807 Problem Details for all HTTP error responsesAccepted
0021The architecture fitness test suite as a merge gateAccepted
0022The operator console MFE remote and its chart componentAccepted
0023The MCP eval and governance harnessAccepted
0024Boot-time dial retry for the Istio native-sidecar warm-up raceAccepted
0025Schemathesis property-based contract testing against the live APIAccepted
0026Refuse to deactivate a process path that a CPT schedule still listsAccepted
0027Propagate W3C trace context in Kafka headersAccepted
0028Close the path / CPT-schedule race with row locksAccepted
0029Analytics binaries get telemetry and exit when the consumer loop diesAccepted
0030Outbox relay attempt capAccepted
0031The reports API has its own OpenAPI contractAccepted
0032The analytics consumer's dedupe claim and projection write commit in one transactionAccepted; amends 0012
0033A RELOCATE process path carries slot-plan moves as floor workAccepted; companion to slotting-optimization ADR 0010; routing amended by 0034
0034A process path declares its intake: which demand sources may route work onto itAccepted; amends 0033, extends 0010
0035A DISPATCH process path carries the transfer dispatch legAccepted; companion to fulfillment-execution ADR-0036; follows 0033, uses 0034's vocabulary
0036A REPLENISH process path and a REPLENISHMENT demand source carry pick-face top-upsAccepted; companion to wes-work-planning ADR 0042 and fulfillment-execution ADR 0050; follows 0033/0035, extends 0034's vocabulary
0037Postgres and Kafka are the only runtimeAccepted; supersedes the in-memory fallback, log publisher and optional outbox of 0001/0003/0006/0007/0011/0025
0038Republish the whole current catalogue at startupAccepted; extends 0003/0010; closes the replay-from-earliest vs. retention gap
0039A2A inbound adapter (third driving adapter): two curated READ-ONLY skills, get_process_path and list_process_paths, over the same use cases as REST and MCP; message-only, problems answered in-band, delegation onlyAccepted; follows 0006, mirrors the MCP read-only charter
0040Adopt the fleet REST API guideline: keyset-paged GET /process-paths, key reuse 409, Idempotency-ReplayedAccepted; amends 0011
0041Agent authority levels and complete MCP surface: every MCP tool and A2A skill declares one level (all L1 here; com.warehouse/authority meta, authority:L<n> tag), the MCP server is stateless (serves the 2026-07-28 revision), and the server gains one resource template and one promptAccepted; follows 0006, 0039
0042ProcessFlow: the ordered stages (path_id + process_type) a workload passes through; full-state versioned ProcessFlowDefined/Revised/Retired; a path an active flow uses cannot be deactivated; read by warehouse-planning (its ADR 0025)Accepted; extends 0001 next to 0034
0043Every problem type has a replay class: each RFC 7807 problem type this service can answer declares exactly one idempotency replay class (FINAL, OUTCOME, RETRYABLE) on its catalogue entry; a retryable refusal is not stored, so a retry is answered from the key row only when an outcome was stored.Accepted; amends 0011 and 0040
0044The deployment converges the declared catalogue: cmd/pathmgmt-seed embeds catalogue/paths.json and replicates scripts/seed_catalogue.py against the service's own REST API; a post-install,post-upgrade hook Job runs it, dark (catalogueSeed.enabled=false) until an image carrying the binary is liveAccepted; operationalizes 0033/0034, no contract change

Each of these reconstructs a decision that is actually visible in this repository's history or 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 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 bounded-context boundary decision; the integration transport and envelope; a quality gate that blocks merges.

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.