Workforce Management
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.
Workforce Management is one of the twelve Go backend bounded contexts that
make up the warehouse-systems platform. It is a Supporting bounded
context, and it owns exactly one question:
Who is on shift, on which process path, at what rate — and how many of those hours are direct versus indirect?
It covers two horizons that people often (wrongly) fuse into one:
- The shift-start planning horizon. A human commits a split of headcount
across process paths for a site's shift. The software proposes
(
heads = ceil(charge ÷ plannedRate)); a human commits. That commitment is theShiftPlanaggregate, made ofPathPlanlines. - Intra-shift assignment tracking. As backlogs deviate from plan,
associates get moved between paths. The move itself is always a human call.
This context records it (
LaborAssignment) and makes the resulting gap legible (GetStaffingGap, thePathUnderstaffedflag). It does not decide the rebalance.
Where the boundary stops
This context never links an associate to a specific task. It stops at "this associate is on this path, for this interval," full stop. Dispatching an individual unit of work to a claiming station is fulfillment-execution's job, and it happens on a completely different cadence — seconds, versus the minutes-to-hours on which headcount moves between paths.
This is not an omission. It is the design decision that lets task-dispatch policy change without touching workforce planning, and vice versa. The reasoning is spelled out in Why it stops at the path boundary and recorded as ADR 0002.
What is actually built
| Capability | Where |
|---|---|
Three aggregates — AssociateShift, ShiftPlan, LaborAssignment | Aggregates |
| Four hard invariants, each with a dedicated red-path test | Invariants |
| Ten domain events | Domain events |
Ten business REST endpoints plus /healthz and /readyz, RFC 7807 errors | API Reference |
One outbound integration topic, warehouse.workforce.events (plus the internal analytics topic) | Integration |
| Hexagonal layering, enforced by executable architecture tests | Architecture |
| The full ddd-crew artifact pack and UML / ER / sequence diagrams | DDD artifacts |
Where to go next
- New here? Read Domain vision, then Ubiquitous language.
- Integrating with this service? Go straight to the REST API and the Events catalog.
- Wondering why something is shaped the way it is? Every consequential decision has an ADR.
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.