warehouse-systems fleet · executive briefing

workforce-management

Shows supervisors where they are short of people, while leaving the call to them
six capabilitys2 events out · 2 in42 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

Workforce management makes staffing gaps visible per path while keeping every move a human decision

1

Rules block uncertified, on-break or over-hours assignments, so double-booking can't happen.

2

Headcount proposals use measured rates, but a human always commits the plan.

3

Agents can propose heads and assign labor over MCP and A2A, marked by authority level.

The ask

Approve exposing the staffing gap to fulfillment-execution's dispatch side as the sanctioned read seam.

why it exists

Staffing gaps should be obvious, but the move stays a human call

A Supporting bounded context that owns shift-start planning (a human commits a split of headcount across process paths) and intra-shift assignment tracking as backlogs deviate. It makes the staffing gap legible but never decides: the move itself stays a human call, and PathUnderstaffed is a flag, not a decision. It deliberately stops at the path boundary — never linking an associate to a task…

Today

Supervisors commit a headcount split across paths at shift start, then assign certified associates as backlogs shift.

The catch

The gap reflects what people recorded, not who is there, and a stale station count from callers can skew it.

what it does

Six capabilities take a shift from roster to a visible staffing gap

Shift roster

Starts and ends shifts, tracks breaks, certifications and hours against the cap.

Headcount planning

Proposes heads from measured rates; a supervisor commits under two capacity ceilings.

Certified assignment

Rejects unsafe assignments and ends the old one on reassign, so no double-booking.

Staffing-gap view

Compares planned heads with active assignments per path and flags understaffing.

Labor utilization report

Builds a labor utilization report from its own events, also open to AI tools.

Agent surfaces

MCP tools and A2A skills carry authority levels; agent assignments are stamped as such.

who it talks to

Two contexts feed it, one context builds on what it publishes

LISTENS TO · 4 EVENT TYPESIS HEARD BY · 1 CONTEXTSprocess-path-management3labor-performance1warehouse-planning1workforcemanagementbadge = event types on that edge · derived from the CloudEvents types each repo declares
the shared language

Shifts, plans and assignments are the three ideas everything uses

THE LANGUAGEOF THE DOMAINAssociateShiftShiftPlan aggregate with…LaborAssignmentPath catalogue from…
REST13 operations over 13 paths on :8080
MCPMCP server (cmd/mcp, :8090, Streamable HTTP…
A2AA2A agent (cmd/a2a, :8093, a2a-go v2): 2 skills…
how it is built

Five programs share one core that stops at the path boundary

DRIVERS · INBOUNDOUTBOUND · ADAPTERSREST API :808013 operations over 13 pathsMCP tools :8090MCP server (cmd/mcp, :8090…Kafka consumer · 2 eventsProcessPathCreated/Updated/De…TaskPerformanceRecordedDOMAIN COREAssociateShiftShiftPlan aggregate with…LaborAssignmentPath catalogue from…PostgreSQLPostgres 16Kafka producer · 2 eventsShiftPlanCommittedLaborReassignedTransactional outboxrelay · DLQ on x-dlq-*commands inevents inevents outstorage / infra
event traffic · CloudEvents 1.0 on Kafka

Every committed plan goes out as one fact per path line

CONSUMED · BY SOURCE · 4PUBLISHED · BY ENTITY · 2process-path-management 3labor-performance 12 domain eventsProcessPathCreatedUpdatedDeactivatedTaskPerformanceRecordedShiftPlanCommittedShiftPlanProposedPathUnderstaffedAssociateShiftStartedEndedAssociateCertifiedAssociateBreakStartedEndedLaborAssignedLaborReassigned
how we know it is healthy

Metrics count real staffing outcomes, not just web requests

OTLP/gRPC push (30 s) to an OpenTelemetry Collector (no /metrics endpoint); traces with one server span per route pattern (bounded cardinality), otelpgx client spans and mcp.tool spans…

What we watch

  • workforce.labor_assignments counter instrumented in the use case (not the handler) with outcome=accepted|rejected and rejection reason attributes…
  • workforce.outbox.lag_seconds gauge and circuit_breaker.state (labor-performance, fulfillment-execution; http-mode clients only)…

What stops a bad change

  • make check / check-all: fmt-check, vet, build, lint, test -race, 90% coverage gate, arch-test, bdd; vuln (govulncheck)…
  • CI jobs: lint, guide-lint, complexity, file-length, test, bdd, contract (Schemathesis), evals-tests, pinned-contracts, integration, arch-test…
by the numbers

42 decisions, 5 migrations and 22 feature files back it

42
Architecture decisions
#6 of 45 in the fleet
5
DB migrations
#20 of 45 in the fleet
22
BDD feature files
#3 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)

checkcheck-allcheck-fasttestcoveragebddintegrationarch-testcontractchart-testmutationmutation-fullvulnguide-lint
competitive position

Against the market leaders, we cover part of the ground

PartialLabor & Workforce vs Manhattan (Active Labor), Blue Yonder, Körber

Owns certification-gated assignment and headcount planning.

Where we match or lead

  • Append-only engineered LaborStandards per task type, scored against the standard active at completion
  • Certification-gated assignment; double-booking impossible by construction
  • Headcount proposal heads = ceil(charge / measured rate) with human commit
  • Per-associate scorecards, coaching flags and idle/utilization derivation

Gaps to close

  • High Headcount plan is a deterministic formula; no ML demand-to-labor forecast
  • Medium Staffing gap is derived from recorded assignments, not physical presence
  • Low Idle-share staffing signal exists only in kafka-cache mode

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

what comes next

Next we hand the gap to dispatch and make assignment safe to retry

NOW1Document thepath-to-certificationnaming ruleDocument orproductize thepath-to-certificationnaming convention(path 'pack'requirescertification'pack') if more …NEXT2Extend theidle-sharesignal beyondExtend theidle-share staffingsignal (ADR-0020)beyond kafka-cachemode — kafka-cacheis the only modethat supplies it(configuration.md:46)NEXT3Move the twoREST sync edgesoff REST, orMove the two RESTsync edges(INSTALLED_CAPACITY_MODE,LABOR_PERFORMANCE_MODE=httprollback) off RESTor leave themdeliberately; ADR0038 lists them as …LATER4Makeassign_laboridempotent overassign_labor is notidempotent over MCPand A2A (ADR0039:99-101): usingthe A2A messageId asan idempotency keyis a possiblefollow-upLATER5Widenmutation-fastbeyond themutation-fast gatesonly./internal/domain/shiftplan(ci.yml:292); otherdomain packages aremutated only in theweekly./internal/domain …LATER6Expose thestaffing gap todispatchSurfaceGetStaffingGap tofulfillment-execution'sdispatch side as thesanctioned read seam(documented inpath-boundary.md)
what could go wrong · and what we do about it

The gap shows what people recorded, not who is actually there

Gap reflects recorded assignments, not physical presence

Staffing gap is eventually consistent — derived from assignments a human recorded, not physical presence…

→

The path-boundary doc names the sanctioned read seam with fulfillment-execution for task answers.

Two capacity ceilings can drift apart

Two independent capacity ceilings (installedStations from caller, live installed capacity from fulfillment-execution) can drift if the…

→

The live capacity check fails loud, rather than guessing, when it cannot answer.

A permissive capacity default rejects every plan commit

INSTALLED_CAPACITY_MODE defaults to permissive in the binary and fails every CommitShiftPlan…

→

Only the chart sets http mode; the binary's permissive default fails loud.

Auth is off by decision, even on assign_labor

Every REST, MCP and A2A endpoint is unauthenticated by decision (ADR 0018 removed ADR 0017's identity layer)…

→

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

the decision we need

Approve exposing the staffing gap to fulfillment-execution's dispatch side as the sanctioned read seam.

WHAT ISSupervisors commit a headcount splitacross paths at shift start, thenassign certified associates asbacklogs shift.THE CATCHThe gap reflects what peoplerecorded, not who is there, and astale station count from callers canskew it.WHAT COULD BEDispatch sees understaffed paths asit hands out tasks, and agent-drivenassignment becomes safe to retry.
Why it matters

Workforce management makes staffing gaps visible per path while keeping every move a human decision

appendix · for the engineers in the room

The fine print: how it is put together

StyleHexagonal / Ports & Adapters (domain depends on nothing, application on domain, adapters on application/domain); Supporting bounded context that stops at the path boundary (ADR 0002)…
Layoutcmd/workforce (OLTP), cmd/workforce-projector (analytics writer :8091 admin), cmd/workforce-reports (read-only :8092), cmd/mcp (Streamable HTTP :8090), cmd/a2a (:8093)…
StoragePostgres 16 (pgxpool; golang-migrate at boot: 5 OLTP *.up.sql migrations — init, outbox, version, idempotency_keys, associate_shift.site_code…
Testinggodog/Gherkin BDD (22 *.feature) driving the real REST API over httptest with in-memory adapters; table-driven unit tests with -race and a 90% coverage gate…
REST13 operations over 13 paths on :8080: /healthz, /readyz, /associates/{id}/shift-starts, /associates/{id}/certifications…
Gochipgxpool / Postgres 16golang-migratesegmentio/kafka-goCloudEvents 1.0OpenTelemetrymodelcontextprotocol/go-sdk v1.8a2a-go v2arch-go fitness testsReact/Vite Module Federation…Helm chart with optional MCP