warehouse-systems fleet · executive briefing

warehouse-planning

Tells a warehouse whether it can actually process the work coming its way
eight capabilitys7 events out · 7 in20 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

Planning turns people, stations and space into one capacity answer, so shortages surface early

1

It names the bottleneck step on each process path, not just a total capacity figure.

2

It plans from local copies of upstream facts, so it never waits on a live call.

3

Completed-task facts now feed back an advisory variance between plan and what happened.

The ask

Approve the order-management follow-up that acts on published plans, and re-check the dock-scheduling feed.

why it exists

A warehouse needs to know today if it can handle tomorrow's demand

Answers forward-looking warehouse capacity questions: given assigned demand and current labor, location, station and equipment constraints, can this warehouse process it? It computes normalized cross-process effective capacity, detects shortages and names bottlenecks, then publishes capacity plans the rest of the fleet (order-management, ops console) can act on…

Today

It reads shift plans, slots, orders and dock appointments from events, then computes orders-per-hour capacity per process and path.

The catch

Station and labour standards are typed in by hand, site naming is an unwritten rule, and no consumer acts on its plans yet.

what it does

Six capabilities turn constraints into a plan someone can act on

Effective process capacity

Turns every constraint into one comparable orders-per-hour figure.

Process-path bottlenecks

Finds which step, such as pick, rebin or pack, limits the whole path.

Capacity planning

Drafts a plan for a window, spots shortages against demand, and publishes it.

Event-fed demand and limits

Keeps local copies of staffing, slots, orders and appointments, with no live calls.

Inbound labour demand

Operator-set labour standards turn dock appointments into plan demand.

Station capacity

Multiplies station count by a declared standard, even when declarations arrive late.

who it talks to

Five contexts feed it, two build on what it publishes

LISTENS TO · 7 EVENT TYPESIS HEARD BY · 2 CONTEXTSfacility-layout2order-management2dock-scheduling1fulfillment-execution1workforce-management1order-management4network-inventory-planning1warehouseplanningbadge = event types on that edge · derived from the CloudEvents types each repo declares
the shared language

Capacity, plans and paths are the words everything here hangs on

THE LANGUAGEOF THE DOMAINProcessCapacityCapacityPlanProcessPathStationStandardInbound labourObserved capacityRead models
REST21 operations over 18 paths: api :8080…
MCPMCP server (cmd/mcp, :8090, Streamable HTTP…
A2AA2A agent (cmd/a2a, :8093): 2 skills…
how it is built

Five small programs keep planning writes apart from report reads

DRIVERS · INBOUNDOUTBOUND · ADAPTERSREST API :808021 operations over 18 paths…MCP tools :8090MCP server (cmd/mcp, :8090…Kafka consumer · 7 eventsshiftplan.ShiftPlanCommittedLocationSlotRegisteredDOMAIN COREProcessCapacityCapacityPlanProcessPathStationStandardPostgreSQLPostgres OLTPKafka producer · 7 eventsCapacityPlanCreatedCapacityPlanPublishedTransactional outboxrelay · DLQ on x-dlq-*commands inevents inevents outstorage / infra
event traffic · CloudEvents 1.0 on Kafka

10 incoming events feed 6 planning signals for the fleet

CONSUMED · BY SOURCE · 7PUBLISHED · BY ENTITY · 7facility-layout 2order-management 2dock-scheduling 1fulfillment-execution 1workforce-management 14 capacityplan2 processcapacity1 warehouse-planning
how we know it is healthy

One plan counter, traces and strict gates show when planning goes wrong

OTel OTLP/gRPC traces+metrics (30 s push, no /metrics endpoint) -> otel-collector -> Jaeger + Prometheus exporter (fleet standard, ADR 0011)…

What we watch

  • One business instrument, warehouse_planning.capacity_plans.created (outcome created|rejected)…
  • Readiness endpoint and reports freshness endpoint (/reports/freshness)
  • Transactional outbox with relay attempt cap OUTBOX_MAX_ATTEMPTS default 20 (ADR 0013); DLQ with x-dlq-* headers for domain consumers…

What stops a bad change

  • make check-fast / check / check-all (fmt, vet, build, golangci-lint, test)
  • 90% coverage gate on domain+application+analytics
  • arch-test fitness rules incl. MCP adapter dependency rule, no-auth-middleware rule, consumer-group-never-hardcoded, testcontainers-mandatory…
by the numbers

20 decisions, 12 migrations and 18 feature files back it

20
Architecture decisions
#14 of 45 in the fleet
12
DB migrations
#7 of 45 in the fleet
18
BDD feature files
#13 of 45 in the fleet
7
Events published
#17 of 45 in the fleet

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

One-command workflows (make)

buildlinttestcoverageintegrationbddarch-testmutation-fastmutation-fullcheckcheck-allcheck-fastguide-lintvuln
competitive position

Against the market leaders, this is where we trail

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

Owns effective-capacity, bottleneck and shortage planning per warehouse.

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

  • Medium Station standards are operator-declared; no upstream publishes per-station throughput
  • Medium order-management does not yet consume CapacityPlanPublished / ShortageDetected
  • Low Analytics read side is off by default (analytics.enabled=false)

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

what comes next

Next we connect consumers and check the dock feed against reality

NOW1Haveorder-managementact onorder-managementfollow-up to consumeCapacityPlanPublished/CapacityShortageDetected(explicitly out ofscope in ADR 0001,separate repo/PR)NEXT2Re-check thedock-schedulingconsumerRe-check thedock-schedulingconsumer against theproducer's publishedasyncapi: ADR0020:38-42 says itwas tested onlyagainst fixtures …NEXT3Revisit theshift windowonce real startRevisit theCapacityWindowassumption derivedfrom event time +planned_hours ifworkforce-managementlater publishes areal shift-start …LATER4Turn analyticson by default,with SLOsPromote analyticsread side fromchart-off-by-default(analytics.enabled=false)to a default-ondeployment with SLOsonce report usagegrowsLATER5Switch on MCP,A2A and thefrontend inChart defaults alsokeep mcp, a2a andfrontend off(values.yaml:309,347,404);A2A messageId as anidempotency key is apossible follow-up(ADR 0018:134)LATER6Add contractand MCP evaljobs to CINo Schemathesiscontract job and noMCP evals jobevidenced in ci.yml(labor-performanceandworkforce-managementrun both); …
what could go wrong · and what we do about it

Plans are only as good as the numbers people type in

Site attribution rests on an unwritten naming rule

Site = building id = zone-id first segment is an undocumented-upstream convention…

→

The convention is written into a decision record; upstream naming drift still needs watching.

Auth is off by decision, even on six write tools

Every REST, MCP and A2A endpoint is unauthenticated by decision (fleet-wide revert 2026-09-11, TestNoAuthMiddlewareReintroduced)…

→

No mitigation on the roadmap yet: this one needs an owner.

Standards are typed in by hand

Station standards and inbound labour standards are operator-declared because no upstream publishes them…

→

Missing data raises warnings instead of invented throughput.

Plan accuracy depends on ten upstream event types

Ten consumed event types across five topics make plan accuracy depend on upstream publishers…

→

The dock-scheduling feed was tested only against fixtures; re-checking it is on the roadmap.

the decision we need

Approve the order-management follow-up that acts on published plans, and re-check the dock-scheduling feed.

WHAT ISIt reads shift plans, slots, ordersand dock appointments from events,then computes orders-per-hourcapacity per process and path.THE CATCHStation and labour standards aretyped in by hand, site naming is anunwritten rule, and no consumer actson its plans yet.WHAT COULD BEOrder-management reacts to shortagesbefore they reach the floor, and thedock-scheduling feed is provenagainst the real contract.
Why it matters

Planning turns people, stations and space into one capacity answer, so shortages surface early

appendix · for the engineers in the room

The fine print: how it is put together

StyleHexagonal / Ports & Adapters (DDD Core bounded context, 'wes' event subdomain tier); strict dependency rule CI-enforced by arch-go fitness tests
Layoutcmd/{api,mcp,a2a,planning-projector,planning-reports} +…
StoragePostgres OLTP (12 numbered golang-migrate migrations: process_capacity, kafka_read_models, capacity_plan+outbox, process_paths, station_standards…
Testingtable-driven unit tests with -race, 90% coverage gate on domain+application+analytics (Makefile:21-22), godog/Gherkin BDD (18 feature files)…
REST21 operations over 18 paths: api :8080 — /process-capacities, /process-paths, /process-paths/{id}/capacity, /capacity-plans, /capacity-plans/{id}…
Gochi HTTP routerpgx/v5 + pgxpool Postgresgolang-migratesegmentio/kafka-gocloudevents/sdk-go v2OpenTelemetrymodelcontextprotocol/go-sdk v1.8a2a-goarch-go fitness testsgodog BDDgremlins mutation testing