warehouse-systems fleet · executive briefing

wes-work-planning

Releases warehouse work one piece at a time so trucks leave on time
eight capabilitys2 events out · 8 in48 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

Work planning releases work by truck deadline, one unit at a time, so the floor never drowns in backlog

1

Waveless release keeps work flowing by deadline instead of in big batches.

2

Work kinds now include relocation per approved slot-plan move and replenishment per request.

3

Live backlog checks recommend throttling upstream or moving labor before a path backs up.

The ask

Approve live travel-distance lookups and the Kafka path catalogue, then prove the pick-batching handoff end to end.

why it exists

Trucks leave on schedule, so work should be released by their deadline

The core bounded context of a Warehouse Execution System. It turns a shift's charge (volume due by each CPT truck-departure deadline) into a plan (rate x heads per process path), releases work continuously in priority order instead of batching it into waves, and performs flow balancing off live backlog telemetry - Drum-Buffer-Rope with CPT as the drum…

Today

It turns a shift's volume due by each truck departure into a rate-and-heads plan, then releases work in deadline order under a cap.

The catch

Travel-distance hints are off by default, flow-fed admission is not built, and its write tools sit open by decision.

what it does

Six capabilities carry work from forecast to finished unit

Charge forecasting

Takes in how much volume is due by each truck departure, per path.

Shift planning

Commits rate and heads per path, never more people than installed stations.

Waveless work release

Hands out one unit at a time by earliest deadline, capped so the floor isn't flooded.

Work unit lifecycle

Tracks each unit from queued to done, closing it when the floor task completes.

Pack- and site-aware work

Case-pick, each-pick and break-case units carry the site and the pick bin.

Relocate and replenish work

Creates units for approved slot-plan moves and for pick-face replenishment requests.

who it talks to

Five contexts feed it, two build on what it publishes

LISTENS TO · 8 EVENT TYPESIS HEARD BY · 2 CONTEXTSproduct-master3process-path-management2network-inventory-planning1order-management1pick-face-replenishment1exception-management1order-management1wes-workplanningbadge = event types on that edge · derived from the CloudEvents types each repo declares
the shared language

Charge, plan, pool and work unit are the words the floor runs on

THE LANGUAGEOF THE DOMAINChargeForecastShiftPlan + PathPlan…WorkPool aggregate +…WorkUnitRead models fed from Kafka
REST14 operations over 14 paths on :8080
MCPMCP server (cmd/mcp, :8090, Streamable HTTP…
A2AA2A agent (cmd/a2a, :8093, JSON-RPC 2.0…
how it is built

A clean core sits behind five binaries and swappable adapters

DRIVERS · INBOUNDOUTBOUND · ADAPTERSREST API :808014 operations over 14 pathsMCP tools :8090MCP server (cmd/mcp, :8090…Kafka consumer · 8 eventsevents: WorkforceShiftPlanCom…events: TaskCompletedDOMAIN COREChargeForecastShiftPlan + PathPlan…WorkPool aggregate +…WorkUnitPostgreSQLPostgres OLTPKafka producer · 2 eventswork-planning.eventsanalytics: the same 11 as…Transactional outboxrelay · DLQ on x-dlq-*commands inevents inevents outstorage / infra
event traffic · CloudEvents 1.0 on Kafka

11 domain events go out, each with an analytics twin; 17 come in

CONSUMED · BY SOURCE · 11PUBLISHED · BY ENTITY · 2product-master 3unattributed 3process-path-management 2network-inventory-plann… 1order-management 1pick-face-replenishment 11 wes1 work-planning
how we know it is healthy

OpenTelemetry traces, an outbox-lag metric and blocking gates watch it

OpenTelemetry traces and metrics pushed over OTLP/gRPC to the Collector (telemetry.Setup in all five binaries; no /metrics endpoint), W3C traceparent + baggage across HTTP and Kafka headers (otelkafka)…

What we watch

  • Business instruments wes.work_units.released and wes.outbox.lag_seconds plus circuit_breaker.state…
  • Kafka hash balancer with partition affinity (ADR 0024)
  • Circuit breakers, retry with capped backoff, DLQ, graceful shutdown (ADR 0023)

What stops a bad change

  • make check / check-all / check-fast (fmt, vet, build, golangci-lint, test)
  • 90% coverage gate on internal/domain + internal/application (Makefile:16)
  • arch-test hexagonal fitness; Spectral api-lint, docs-api drift, evals-tests, contract (Schemathesis), helm-lint and chart-tests jobs
by the numbers

48 decisions, 16 migrations and 18 feature files back it

48
Architecture decisions
#4 of 45 in the fleet
16
DB migrations
#3 of 45 in the fleet
18
BDD feature files
#13 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)

buildlinttestcoverageintegrationbddcontractarch-testmutationmutation-allvuln
competitive position

Against the market leaders, we cover part of the ground

PartialExecution (WES) & Automation vs Manhattan (Order Streaming), Blue Yonder (embedded WES), SSI Schäfer, Geek+, Locus

Owns waveless release, flow balancing and shift planning.

Where we match or lead

  • Waveless CPT-ordered release bounded by per-pool WIP limit (architecturally aligned with Manhattan/Blue…
  • Pull-based dispatch: station claims best-fit task under a time-boxed lease
  • Flow balancing as a domain service from live backlog telemetry
  • Operator-configurable process-path catalogue and CPT schedule as published language

Gaps to close

  • Medium Single-dimensional CPT priority; tiering / cold-chain needs a ReleasePolicy change
  • Medium Hazmat and travel-distance hints omitted from WorkReleased until http lookups are enabled
  • Medium Rebalance decisions do not yet act on PathPlanDriftDetected

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

what comes next

Next we switch on the real lookups and prove the batching handoff

NOW1Load the pathcatalogue fromKafka, not YAMLPATH_CATALOGUE_SOURCEstill defaults to file(configuration.md:71);flipping it to the kafkareplay (ADR 0030) wouldremove the boot-timeYAML dependencyNEXT2Switchtravel-distancelookups to liveTRAVEL_DISTANCE_MODEstill defaults topermissive(configuration.md:81):WorkReleased omitstravel-distance hintsuntil http mode isenabled against …NEXT3Build flow-fedadmission andactual-rateFlow-fed admission andactual-rate projectionsare deferred, not built(ADR-0020:101,182);PathPlanDriftDetectedreconciliation listsdeferred items(ADR-0019:210)LATER4Validate thepick-batchinghandoff end to endPick-batching handoff:WorkReleased now carriessite_id and from_bin(ADR 0048) forfulfillment-execution'sProposed WorkBatch wave;validate end-to-end withPICK_BATCH_MODELATER5Switch on MCP,A2A, analytics andthe frontendChart defaults keep mcp,a2a, analytics andfrontend off(values.yaml)
what could go wrong · and what we do about it

Released work still travels without travel-distance hints by default

Auth is off by decision, even on the write tools

Every REST, MCP and A2A endpoint is unauthenticated by decision (fleet-wide ADR 0016 removal)…

→

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

Waveless release gives up natural travel batching

Waveless release gives up natural travel batching and single-dimensional CPT priority…

→

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

Postgres and Kafka are the only runtime

Postgres and Kafka are the only runtime (ADR 0044): no in-memory mode, mandatory variables are boot errors

→

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

Travel hints are omitted unless the lookup is enabled

TRAVEL_DISTANCE_MODE=permissive default means WorkReleased omits travel-distance hints unless enabled…

→

Promote the travel lookup to live http mode against facility-layout.

the decision we need

Approve live travel-distance lookups and the Kafka path catalogue, then prove the pick-batching handoff end to end.

WHAT ISIt turns a shift's volume due byeach truck departure into arate-and-heads plan, then releaseswork in deadline order under a cap.THE CATCHTravel-distance hints are off bydefault, flow-fed admission is notbuilt, and its write tools sit openby decision.WHAT COULD BEEvery released unit carries travelhints, the path catalogue replaysfrom Kafka, and pick batching isproven end to end.
Why it matters

Work planning releases work by truck deadline, one unit at a time, so the floor never drowns in backlog

appendix · for the engineers in the room

The fine print: how it is put together

StyleHexagonal / Ports & Adapters, strict dependency rule (domain depends on nothing outside stdlib); GitFlow develop/main; spec-first contracts…
Layoutcmd/{wes,wes-projector,wes-reports,mcp,a2a} +…
StoragePostgres OLTP (16 *.up.sql migrations: work units, outbox, idempotency_keys, work_pool_version, labor_plan_view drift…
Testingtable-driven unit tests with -race, 90% coverage gate on domain+application, per-endpoint httptest tests, testcontainers Postgres+Kafka integration, godog BDD (18 *.feature)…
REST14 operations over 14 paths on :8080: /healthz, /readyz, /paths/{pathId}/charge, /paths/{pathId}/plan, /paths/{pathId}/work-units…
Gochi/v5pgx/v5 + pgxpoolgolang-migratesegmentio/kafka-gocloudevents/sdk-go v2OTelmodelcontextprotocol/go-sdka2a-gogodog BDDarch-go fitness testsgremlins mutation testing