Subdomain Classification
Verdict: Supporting subdomain
Labor Performance does not define the fulfillment work itself — it only
measures how well it is executed against a standard someone else configures.
It is genuinely useful (both Manhattan and Blue Yonder ship it as a
first-class capability), but it is not what differentiates a fulfillment
operation the way fulfillment-execution's Pick/Pack/SLAM task lifecycle or
inventory-storage's chaotic-storage inventory truth do.
| Context | Classification | Reasoning |
|---|---|---|
fulfillment-execution | Core | The Pick/Pack/SLAM task lifecycle; throughput and accuracy at scale. |
inventory-storage | Core | Owns inventory truth: bin-accurate location + usable inventory. |
wes-work-planning | Core | The conductor — waveless release and flow balance. |
workforce-management | Supporting | Labor & workforce allocation: important, industry-common, not the differentiator. |
labor-performance | Supporting | Measures execution quality against a configured standard — valuable, but not the differentiator itself. |
facility-layout | Generic | Physical warehouse structure, extracted once rather than duplicated. |
What "Supporting" buys and obliges
Classifying a subdomain Supporting (not Core, not Generic) means:
- It is genuinely part of the business, unlike a Generic subdomain — engineered labor standards are a real competitive-adjacent capability (Manhattan and Blue Yonder both ship it), not a commodity integration surface.
- It does not carry Core-level investment, but it is not skipped either — this service still carries the full fleet-standard rigor (BDD, mutation testing, arch-fitness tests, 90%+ domain/application coverage) because "Supporting" is a business-differentiation classification, not a quality bar.
- It is a pure Customer of a Core context's Open Host Service — it never
gets write access to
fulfillment-execution's Task aggregate, and it never influences that context's decisions (no gating, no blocking). It is in turn a Supplier toworkforce-management, which consumes itsTaskPerformanceRecordedintegration event (ADR 0013).
Aggregates & invariants
LaborStandard
The aggregate root for "how long a task TYPE should take."
ExpectedSecondsmust be > 0 — a standard that says a task should take zero or negative seconds is not a business fact.- An optional, caller-supplied
TravelComponentSecondsbreakdown must be>= 0and<= ExpectedSecondswhen present. This service never computes or validates it against a live distance lookup — see ADR 0015. - Append-only history.
DefineStandardfor a TaskType that already has an active standard does NOT overwrite it in place — it closes the prior standard's effective range (EffectiveTo) and starts a new one. This keeps already-recordedTaskPerformancerows' frozenStandardSecondsAtCompletionvalues historically accurate even after a later revision. Mirrorsworkforce-management's own "AssignLabor ends the prior assignment rather than rejecting" pattern — a revision closes the old record rather than erroring. See ADR 0004. - ONE ACTIVE standard per TaskType at any given time.
TaskPerformance
The aggregate root for one scored, already-completed task — an event-sourced fact from Kafka, not something a human edits.
- Immutable once recorded. No update/delete use case anywhere in the application layer.
- Idempotent on the CloudEvents
id(ADR 0021), notTaskId(which could in principle be reused after a very long time). Recording the same eventidtwice is a no-op, never a double-count — mirrors theProcessedEventsidempotency-gate pattern every analytics projector in this fleet already uses. EfficiencyPctnever divides by zero.ActualSeconds<=0(an unmeasurable completion — e.g. aTaskCompletedwhoseduration_secondsis 0 because no claim-timestamp existed to compute it from) orStandardSecondsAtCompletion<=0(no active standard existed for that TaskType at completion time) both yieldnull, not an error and not a fabricated number.StandardSecondsAtCompletionis frozen at ingestion time. Resolved once — the standard active "as ofCompletedAt," not "active right now" — and never recomputed later from a since-changed standard.- An empty
AssociateIdis legitimate, not an error — aTaskCompletedfrom a station with no checked-in occupant (e.g. a robot station) is still recorded and counted inGetTaskTypePerformance, just excluded from any per-associate scorecard.
Scorecard (read model, not a stored aggregate)
A projection over TaskPerformance rows, per associate: task count, mean
EfficiencyPct across tasks that have one, breakdown by TaskType. A 404
means "this service has never recorded a row for this associate" — distinct
from "the associate has rows but no numeric score yet" (which is a 200 with
meanEfficiencyPct: null). It also carries a trend
(IMPROVING/DECLINING/STABLE/INSUFFICIENT_DATA) and a coachingFlag
computed from the associate's most recent (up to 10) scored tasks — see
ADR 0005.
IdlePeriod
The aggregate root for one associate's between-task wait
(ADR 0014), derived when a
TaskCompleted arrives: from the associate's previous completion to this
task's claim instant (CompletedAt − ActualSeconds).
- Rejects an empty
AssociateIdand a non-positive gap. Both are routine on an unordered stream, so the use case skips them rather than failing the enclosingRecordTaskPerformance. - Capped at
IDLE_GAP_CAP_SECONDS(default 3600) inside the constructor; a clipped gap is stored withCapped: true. - A still-running open gap (an associate idle right now) is computed
at read time only and never persisted. Decided 2026-10-06: it is
reported per associate only; at task-type scope
openGapSecondsis always 0 by design.
Ubiquitous language
The full glossary — every term mapped to its code identifier, with the
terms whose code name differs flagged — lives on the
Ubiquitous Language page. The core terms are
LaborStandard, TaskPerformance, StandardSecondsAtCompletion,
EfficiencyPct, TaskType (PICK, PACK, SLAM — mirrors
fulfillment-execution's task.Type exactly), Scorecard,
TaskTypePerformance, Idle Gap (IdlePeriod) and Utilization.
Domain events (past tense)
LaborStandardDefined, LaborStandardRevised, TaskPerformanceRecorded.
The default publisher only logs them. With EVENT_PUBLISHER=kafka all three
go to warehouse.labor-performance.analytics, which feeds this service's
own analytical projector (ADR 0007). TaskPerformanceRecorded, and since
ADR 0038 LaborStandardDefined and LaborStandardRevised, also go to
the integration topic warehouse.labor-performance.events (ADR 0013), which
workforce-management (performance) and warehouse-planning (standards)
consume. TaskPerformanceRecorded carries an additive, nullable
idle_seconds_before field (ADR 0014). With Postgres configured, both
topics are fed through the transactional outbox (ADR 0010). Full type
strings, keys and payloads: Domain Events. Where
this classification sits on a ddd-crew Core Domain Chart:
Core Domain Chart.