Skip to main content

Workforce Management

Study project

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:

  1. 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 the ShiftPlan aggregate, made of PathPlan lines.
  2. 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, the PathUnderstaffed flag). 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​

CapabilityWhere
Three aggregates — AssociateShift, ShiftPlan, LaborAssignmentAggregates
Four hard invariants, each with a dedicated red-path testInvariants
Ten domain eventsDomain events
Ten business REST endpoints plus /healthz and /readyz, RFC 7807 errorsAPI Reference
One outbound integration topic, warehouse.workforce.events (plus the internal analytics topic)Integration
Hexagonal layering, enforced by executable architecture testsArchitecture
The full ddd-crew artifact pack and UML / ER / sequence diagramsDDD artifacts

Where to go next​

Disclaimer

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.