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
| # | Title | Status |
|---|---|---|
| 0001 | Process Path Management as a new Generic Subdomain bounded context | Accepted |
| 0002 | Cutting the fleet over from the static YAML catalogue to this service's events | Accepted |
| 0003 | Transactional outbox for the process-path Published Language | Accepted (stored message format superseded by 0016; per-path ordering amended by 0030) |
| 0004 | Adopting the fleet REST identity standard | Superseded by 0005 |
| 0005 | Removing the REST auth layer | Accepted |
| 0006 | MCP server as a second inbound adapter | Accepted |
| 0007 | Analytical data product (report) via a separate analytics topic | Accepted (§1 analytics envelope superseded by 0016; trace-free note amended by 0029) |
| 0008 | Seven new process-path families aligned to real FC labor-tracking vocabulary | Accepted |
| 0009 | Optional destination LocationRole on a ProcessPath | Accepted |
| 0010 | Process paths publish a fulfillment capability contract (cycle time, eligibility, CPT schedule) | Accepted |
| 0011 | Transactional Idempotency-Key middleware for POST /process-paths | Accepted |
| 0012 | Analytics-consumer dead-letter queue and graceful shutdown hardening | Accepted; mark/apply split amended by 0032 |
| 0013 | Hash balancer for the outbound Kafka writers, closing a latent partition-affinity gap | Accepted |
| 0014 | Per-workload HorizontalPodAutoscaler and pgxpool MaxConns/statement_timeout tuning | Accepted |
| 0015 | Run golang-migrate against a direct Postgres connection, not PgBouncer | Accepted |
| 0016 | CloudEvents 1.0 as the mandatory event envelope | Accepted |
| 0017 | Optimistic concurrency (version column) on ProcessPath and CPTSchedule | Accepted |
| 0018 | Outbox lag gauge and housekeeping sweeper | Accepted |
| 0019 | Adopting the fleet standard-metrics convention | Accepted |
| 0020 | Adopting RFC 7807 Problem Details for all HTTP error responses | Accepted |
| 0021 | The architecture fitness test suite as a merge gate | Accepted |
| 0022 | The operator console MFE remote and its chart component | Accepted |
| 0023 | The MCP eval and governance harness | Accepted |
| 0024 | Boot-time dial retry for the Istio native-sidecar warm-up race | Accepted |
| 0025 | Schemathesis property-based contract testing against the live API | Accepted |
| 0026 | Refuse to deactivate a process path that a CPT schedule still lists | Accepted |
| 0027 | Propagate W3C trace context in Kafka headers | Accepted |
| 0028 | Close the path / CPT-schedule race with row locks | Accepted |
| 0029 | Analytics binaries get telemetry and exit when the consumer loop dies | Accepted |
| 0030 | Outbox relay attempt cap | Accepted |
| 0031 | The reports API has its own OpenAPI contract | Accepted |
| 0032 | The analytics consumer's dedupe claim and projection write commit in one transaction | Accepted; amends 0012 |
| 0033 | A RELOCATE process path carries slot-plan moves as floor work | Accepted; companion to slotting-optimization ADR 0010; routing amended by 0034 |
| 0034 | A process path declares its intake: which demand sources may route work onto it | Accepted; amends 0033, extends 0010 |
| 0035 | A DISPATCH process path carries the transfer dispatch leg | Accepted; companion to fulfillment-execution ADR-0036; follows 0033, uses 0034's vocabulary |
| 0036 | A REPLENISH process path and a REPLENISHMENT demand source carry pick-face top-ups | Accepted; companion to wes-work-planning ADR 0042 and fulfillment-execution ADR 0050; follows 0033/0035, extends 0034's vocabulary |
| 0037 | Postgres and Kafka are the only runtime | Accepted; supersedes the in-memory fallback, log publisher and optional outbox of 0001/0003/0006/0007/0011/0025 |
| 0038 | Republish the whole current catalogue at startup | Accepted; extends 0003/0010; closes the replay-from-earliest vs. retention gap |
| 0039 | A2A 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 only | Accepted; follows 0006, mirrors the MCP read-only charter |
| 0040 | Adopt the fleet REST API guideline: keyset-paged GET /process-paths, key reuse 409, Idempotency-Replayed | Accepted; amends 0011 |
| 0041 | Agent 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 prompt | Accepted; follows 0006, 0039 |
| 0042 | ProcessFlow: 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 |
| 0043 | Every 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 |
| 0044 | The 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 live | Accepted; 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
- 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 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 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.