WES — Work Planning & Release
This documentation site is an educational Domain-Driven Design exercise. It follows real industry-standard patterns and terminology, but it is not a production system and is not affiliated with, endorsed by, or representative of any real-world company.
This is the core bounded context of the WES (Warehouse Execution System) tier
of the warehouse-systems platform. Its job in one sentence:
Release work continuously in priority order and flow-balance the floor from live buffer telemetry. (Turning a shift's charge into a plan moved to warehouse-planning, ADR-0049.)
It is the conductor: downstream of WMS planning and inventory truth, upstream of WCS equipment control and of task execution. It never owns inventory truth, never schedules a shift's workforce, and never drives a PLC — it decides when work enters the floor and in what order.
The three-layer position
| Layer | Horizon | Answers | This service |
|---|---|---|---|
| WMS | minutes → days | What needs to happen, and why | upstream of us |
| WES | seconds → minutes | Who does it, right now, in what order | this service |
| WCS | milliseconds → seconds | How the machine performs the next step | downstream of us |
What you'll find here
| Section | Contents |
|---|---|
| Overview | What the service does, its hexagonal layering, how to run it |
| Business Context | Domain vision, ubiquitous language, the reasoning behind waveless release and Drum-Buffer-Rope flow balancing |
| Domain-Driven Design | Subdomain classification, the ddd-crew artifact pack (core domain chart, bounded context canvas, aggregate design canvas, message flow, EventStorming, UML/ER/sequence diagrams), every domain event, read models |
| API Reference | The REST API generated from the real apis/openapi.yaml, the event contract from apis/asyncapi.yaml, and the RFC 7807 error model |
| Ecosystem | The context map, Kafka topics and REST lookups actually wired today, and the sibling services |
| AI Ecosystem (MCP) | The MCP governance charter this service's cmd/mcp server follows |
| Analytics (Data Product) | The Release Throughput & Backlog Health report contract |
| ADRs | Thirty-five architecture decision records |
At a glance
- Language / runtime: Go 1.26, module
github.com/claudioed/wes-work-planning - Architecture: hexagonal (ports & adapters), enforced by executable fitness tests (ADR-0007)
- Binaries:
cmd/wes(OLTP REST + Kafka),cmd/wes-projectorandcmd/wes-reports(analytics data product),cmd/mcp(MCP server) - Inbound adapters: REST (chi), Kafka consumer, MCP (Streamable HTTP)
- Outbound adapters: Postgres (pgx/v5, transactional outbox), the Kafka event publishers (outbox relay), in-memory repositories as unit-test doubles only, process-path catalogue (file or Kafka), product-master classification local copy (Kafka-fed)
- Aggregates:
WorkPool,WorkUnit(ChargeForecastandShiftPlan/PathPlanmoved to warehouse-planning, ADR-0049) - Read models (projections, not aggregates):
LaborPlanObserved(a pure projection of workforce-management's plan),UsableInventoryObserved, backlog telemetry, rebalance recommendation, and the analyticsthroughput_rollup - Integration: publishes
WorkReleased(consumed by fulfillment-execution) andPathCapacityChanged(consumed by order-management and network-fulfillment), plus six further domain events with no consumer today (three more are retired, ADR-0049); consumesShiftPlanCommitted,StockReserved,ReservationRevoked,TaskCompleted,OrderAllocated,OrderPartiallyAllocated,WorkDemandReleased,SlotPlanApproved,ReplenishmentRequested,ReplenishmentCancelled,ProductClassified,ProductPackLevelDeclared,ProductPackLevelRetired,ProductPackLevelMeasured, and — withPATH_CATALOGUE_SOURCE=kafka— process-path-management's catalogue events. Work enters theWorkPoolfrom four sources: allocated orders (one work unit per order line), released transfer demands, approved slot plans and replenishment requests
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.