warehouse-systems fleet · executive briefing

network-inventory-planning

Suggests stock moves between our sites, and acts only once a person approves
eight capabilitys2 events out · 4 in23 recorded decisions

This project is a domain-driven design study. It is not associated with, endorsed by or affiliated with any company, and it uses no company's code, data, logos or trademarks. All names, figures and examples are illustrative or synthetic. · November 2026

the short version · read this if nothing else

Network inventory planning recommends explainable transfers and runs them end to end only after approval

1

The same inputs give the same proposal, with a score breakdown and reason codes.

2

Stale facts exclude a site, so it refuses to plan rather than guess.

3

Nothing moves until an operator approves and inventory storage confirms a reservation.

The ask

Raise mutation checks to 99/99 and give the MCP and A2A agents authority levels, so the repo meets the fleet bar.

why it exists

Moving stock between sites should be advised, explained and approved

Recommends stock transfers between warehouse sites: it builds a coherent planning snapshot from Kafka-fed facts (site capability, site-SKU demand, capacity plans), scores transfer proposals deterministically with reproducible inputs and reason codes, and — only after operator approval…

Today

It plans from site, demand and capacity facts, then after approval reserves stock and follows the transfer through to received.

The catch

Mutation checks sit at 83/88 against the 99/99 standard, and only the API binary exports telemetry; the other four emit logs.

what it does

Six capabilities take site facts all the way to a received transfer

Deterministic proposals

Stock targets, priority and lane costs give the same answer every time, in whole cases.

Fail-closed planning

Stale facts drop their site; closed lanes or negative scores stop planning.

Operator approval

Operators turn proposals into transfer plans, checked against current data.

Transfer saga

Approved plans reserve stock, release work, then follow facts to received.

Cancel with compensation

A transfer cancelled after allocation releases its reservation; later cancels are refused.

Rebalance policy and lanes

Versioned policy and lane catalogues drive observe-only runs and stuck-transfer checks.

who it talks to

Four contexts feed it, two build on what it publishes

LISTENS TO · 4 EVENT TYPESIS HEARD BY · 2 CONTEXTSfacility-layout1inventory-storage1order-management1warehouse-planning1inventory-storage1wes-work-planning1networkinventoryplanningbadge = event types on that edge · derived from the CloudEvents types each repo declares
the shared language

One 12-state transfer saga and one planning snapshot carry the model

THE LANGUAGEOF THE DOMAINInterWarehouseTransfer…Local read modelsPlanning snapshot as…RebalancePolicy and…CaseRoundingAnalytics occurrences
REST17 operations over 15 paths on :8080 (reports on :8092)
MCPRead-only MCP server (cmd/mcp, Streamable HTTP…
A2ARead-only A2A agent (cmd/a2a, JSON-RPC over HTTP…
how it is built

Five binaries share one codebase and integrate only through events

DRIVERS · INBOUNDOUTBOUND · ADAPTERSREST API :808017 operations over 15 pathsMCP tools :8090Read-only MCP server…Kafka consumer · 4 eventsSiteCapabilityChangedSiteSkuDemandChangedDOMAIN COREInterWarehouseTransfer…Local read modelsPlanning snapshot as…RebalancePolicy and…PostgreSQLOLTP Postgres: read models…Kafka producer · 2 eventsTransferPlanApprovedTransferAllocationRequestedTransactional outboxrelay · DLQ on x-dlq-*commands inevents inevents outstorage / infra
event traffic · CloudEvents 1.0 on Kafka

Seven events go out and sixteen come in, all as versioned facts

CONSUMED · BY SOURCE · 4PUBLISHED · BY ENTITY · 2facility-layout 1inventory-storage 1order-management 1warehouse-planning 12 domain eventsSiteCapabilityChangedSiteSkuDemandChangedCapacityPlanPublishedTransferStockAllocatedTransferPlanApprovedTransferAllocationRequested
how we know it is healthy

Only the API binary exports telemetry; the other four emit logs only

Only the API binary sets up OpenTelemetry: OTLP/gRPC traces and metrics (otelhttp request histograms + Go runtime, no custom instruments, no /metrics endpoint)…

What we watch

  • processed_events dedupe claimed in-transaction per consumer
  • outbox relay records attempts/last_error, caps attempts (OUTBOX_MAX_ATTEMPTS, default 20, ADR 0016) and logs the excluded row at ERROR
  • poison replies and facts are dead-lettered (warehouse.inventory.events.dlq, ...fulfillment.events.dlq, ADR 0013)…

What stops a bad change

  • make check-all local gate; make check-fast for the agent Stop hook
  • CI jobs: lint, guide-lint, complexity, file-length, test (90% coverage), bdd, integration, mutation-fast, api-lint, vuln, chart-tests, arch-test, web
  • mutation gate efficacy 83 / mutant-coverage 88 (.gremlins.yaml), below the 99/99 fleet standard
by the numbers

Twenty-three decisions and 17 feature files show a well-tested repo

23
Architecture decisions
#13 of 45 in the fleet
9
DB migrations
#10 of 45 in the fleet
17
BDD feature files
#15 of 45 in the fleet
2
Events published
#30 of 45 in the fleet

Ranked against all 45 briefed repositories (dot = one repository, highest on the left).

One-command workflows (make)

checkcheck-allcheck-fasttestcoveragebddintegrationarch-testmutationmutation-fullvulnhelm-lintguide-lintharness-test
competitive position

Against the market leaders, this is where we trail

GapNetwork & Capacity Planning vs Blue Yonder (multi-echelon planning), Manhattan (future inventory)

Owns network position and deterministic transfer proposals.

Where we match or lead

  • Deterministic, explainable transfer proposals (score breakdown, policy version…
  • Transfer saga with allocation replies driving ALLOCATED / UNFULFILLABLE
  • Anti-corruption layer and capability offers toward an external retail network
  • Effective-capacity and bottleneck detection per process path with shortage detection

Gaps to close

  • High No forecasting, MEIO or dynamic safety stock
  • High Lifecycle after ALLOCATED still being built; single-line transfers only
  • Medium No scenario planning before committing a plan

Leader capabilities are vendor-published; gaps reflect repo docs reviewed in November 2026.

what comes next

Next we widen transfers to many lines and raise the mutation bar

NOW1Define a damageor short-pickflow for pickedCancellation fromPICKED onwards isrefused (stock inmotion): a damage orshort-pick exceptionflow is out of scopeper ADR 0022 and thecanvas open …NEXT2Move fromsingle-line tomulti-lineMove fromsingle-linetransfers(transfer_line_id =<transfer_id>:1,'v1's single-linesaga') to multi-lineNEXT3Plan scheduledruns from realper-site stockPlan scheduled runsfrom per-site stockpositions: today asite-levelapproximation(capacity headroomand demand) becauseno sibling publishe…LATER4Make thestate-dwellreport trueMake/reports/state-dwelltrue time-in-state:age_seconds is agesince creation(bounded-context-canvasopen question)LATER5Prune oldidempotencykeys on aPrune idempotencykeys: a sweep bycreated_at is'future work' (ADR0021, runbook.md),the table growsuntil thenLATER6Raise mutationthresholds from83/88 to theRaise mutationthresholds from83/88(efficacy/mutant-coveragein .gremlins.yaml)to the 99/99 fleetstandard; blockingmutation-fast…
what could go wrong · and what we do about it

Our biggest risk is quality gates and telemetry that trail the fleet

Read models are eventually consistent

Read models are eventually consistent; a stale fact excludes its site from the snapshot and approval is refused only when its origin…

→

Stale facts fail closed: approval is refused when its origin or destination site is excluded.

Every endpoint is unauthenticated, by decision

Every REST, MCP and A2A endpoint is unauthenticated BY DECISION (README 'No authentication', MCP tools.md…

→

Decision fleet-wide: the cluster-internal network boundary is the only access control.

Each Kafka consumer group is its own off switch

Each of the six Kafka consumer groups is its own off switch with no default: an unset group means that consumer silently does not run…

→

Group ids come from env with no default, so local runs never join the live cluster group.

Mutation gate is below the 99/99 fleet standard

Mutation gate 83/88 is below the 99/99 fleet standard; the blocking job covers two packages and the full-domain run is weekly/advisory…

→

The blocking mutation job covers two packages; the full-domain run is weekly and advisory.

the decision we need

Raise mutation checks to 99/99 and give the MCP and A2A agents authority levels, so the repo meets the fleet bar.

WHAT ISIt plans from site, demand andcapacity facts, then after approvalreserves stock and follows thetransfer through to received.THE CATCHMutation checks sit at 83/88 againstthe 99/99 standard, and only the APIbinary exports telemetry; the otherfour emit logs.WHAT COULD BEMulti-line transfers planned fromreal site stock positions, with truetime-in-state reports and tidyidempotency data.
Why it matters

Network inventory planning recommends explainable transfers and runs them end to end only after approval

appendix · for the engineers in the room

The fine print: how it is put together

StyleHexagonal bounded context (WES-core) integrating exclusively via versioned CloudEvents facts — no synchronous sibling calls…
Layoutcmd/{network-inventory-planning,mcp,a2a,nip-projector,nip-reports}; internal/{domain/{packlevel,planning,transfer}, application/{ports,usecases}, analytics/report…
StorageOLTP Postgres: read models, transfer saga, rebalance catalogues, idempotency keys, outbox (migrations embedded in the postgres adapter)…
Testingmake check-all (90% coverage over domain, application and analytics; arch-test; bdd); 17 godog feature files, testcontainers integration, 11 test files in internal/architecture…
REST17 operations over 15 paths on :8080 (reports on :8092): /healthz, /v1/transfer-proposal-runs, /v1/transfer-simulations, /v1/transfer-approvals…
Gochi routerCloudEvents sdk-go v2 via…segmentio/kafka-goPostgrestransactional outbox with FOR…MCP Go SDK and a2a-goOpenTelemetry OTLP/gRPCgodogSpectral-linted OpenAPI/AsyncAPIHelm chart