Skip to main content

Context map

This context's slice of the fleet map, following ddd-crew Context Mapping. Every edge is labelled U (upstream) / D (downstream) with the pattern on each side and the technology. Solid edges are live in code, dotted edges are wired but opt-in on the sibling's side or partly unused, and the grey nodes are deliberately absent relationships.

Source: internal/adapters/inbound/kafka/process_flow_consumer.go, labor_capacity_consumer.go, storage_capacity_consumer.go, order_demand_consumer.go, internal/adapters/outbound/kafka/encoder.go, cmd/api/main.go, cmd/api/runtime.go, internal/adapters/inbound/mcp/tools.go, web/src/api.ts, ADR 0001 and its Addendum, ADR 0004; on the sibling side order-management internal/adapters/inbound/kafka/planned_capacity_consumer.go, network-inventory-planning internal/adapters/inbound/kafka/consumers.go, warehouse-ops-agent internal/adapters/outbound/mcpclient/warehouse_planning.go and warehouse-console src/App.tsx (all on develop). Omits: this context's own analytics topic and projector (internal, not a context relationship), the dead-letter topics, and the Kafka broker, Kong and Nginx infrastructure. order-management and workforce-management are drawn twice only to keep the upstream and downstream edges readable; each is one context. wes-work-planning has no runtime edge: it handed its charge forecast and path plan to this context (ADR 0023, its ADR 0049) and keeps execution.

Relationships​

#UpstreamDownstreamPatterns (U / D)TechnologyStatusEvidence
1workforce-managementwarehouse-planningOHS + Published Language / Anti-Corruption Layer: the payload is hand-mirrored (shiftPlanCommittedData) and translated into a LABOR CapacityConstraint with an assumed UNIT/HOUR unit and a derived window, and, for a line with a shift_id, into the committed heads of (site, shift, path) that the labour plan drift compares (ADR 0023 decision 3)Kafka warehouse.workforce.events, com.warehouse.wes.workforce-management.shiftplan.ShiftPlanCommittedLive (group LABOR_CAPACITY_CONSUMER_GROUP)internal/adapters/inbound/kafka/labor_capacity_consumer.go, internal/application/usecases/labour_plan_drift.go
2facility-layoutwarehouse-planningOHS + PL / ACL: slots are folded into a tally, never into a capacity (ADR 0002)Kafka warehouse.facility.events, com.warehouse.wms.facility-layout.locationslot.LocationSlotRegistered and ...LocationSlotDecommissionedLive (group STORAGE_CAPACITY_CONSUMER_GROUP)internal/adapters/inbound/kafka/storage_capacity_consumer.go
3order-managementwarehouse-planningOHS + PL / ACL: an order becomes a demand.Order attributed to its event's site_id, else to the fallback DEMAND_SITE_ID (ADR 0021)Kafka warehouse.order-management.events, com.warehouse.wes.order-management.order.OrderAllocated and ...OrderPartiallyAllocatedWired, always on (ADR 0004; ADR 0016 removed the off switch): DEMAND_CONSUMER_GROUP and DEMAND_SITE_ID are required at bootinternal/adapters/inbound/kafka/order_demand_consumer.go, cmd/api/runtime.go
4warehouse-planningorder-managementOHS + PL / ACL (local read model, per order-management's own context map)Kafka warehouse.warehouse-planning.events, com.warehouse.wes.warehouse-planning.capacityplan.*Wired, opt-in on the consumer side (PLANNED_CAPACITY_CONSUMER_GROUP in order-management); it acts on Created, Published and ShortageDetected and ignores BottleneckDetectedthis repo: internal/adapters/outbound/kafka/encoder.go; order-management: planned_capacity_consumer.go (its ADR 0031)
5adock-schedulingwarehouse-planningOHS + PL / ACL: an INBOUND appointment becomes an inbound.Appointment (window start, ASN count) attributed to the site_id of its events; labour comes only from the operator-declared inbound standardKafka warehouse.dock-scheduling.events, com.warehouse.wms.dock-scheduling.dockappointment.DockAppointmentBooked, ...DockAppointmentRescheduled, ...DockAppointmentCancelled and ...DockAppointmentNoShowLive, always on (ADR 0017, source switched by ADR 0020; it was inbound-receiving): DOCK_APPOINTMENT_CONSUMER_GROUP required at boot, the retired INBOUND_DEMAND_CONSUMER_GROUP refusedinternal/adapters/inbound/kafka/dock_appointment_consumer.go, cmd/api/runtime.go
5bfulfillment-executionwarehouse-planningOHS + PL / ACL: a completion becomes a minute bucket of observed_capacity (location, upper-cased task_type); advisory only, never feeds a plan backKafka warehouse.fulfillment.events, com.warehouse.wes.fulfillment-execution.task.TaskCompletedLive, always on (ADR 0017): OBSERVED_CAPACITY_CONSUMER_GROUP required at bootinternal/adapters/inbound/kafka/observed_capacity_consumer.go, cmd/api/runtime.go
5warehouse-planningwarehouse-ops-agentOHS / Customer with an ACL (its MCP client adapter)MCP Streamable HTTP, read tools onlyLive for get_process_path_capacity (the agent's daily-brief capacity outlook); get_capacity_plan, get_storage_capacity, list_station_standards wired but unused (its ADR 0013)internal/adapters/inbound/mcp/tools.go; ops-agent internal/adapters/outbound/mcpclient/warehouse_planning.go
6warehouse-planningwarehouse-consoleOHS; the console only hosts this context's own Module Federation remote capacity_mfe, which calls this service's REST API through KongREST (/api/warehouse-planning)Liveweb/src/api.ts, web/vite.config.ts; console src/App.tsx
7process-path-managementwarehouse.process-path-management.events: ProcessFlowDefined, ProcessFlowRevised, ProcessFlowRetired (each the FULL flow state with a version)Customer/Supplier with an anti-corruption layer: the consumer translates a flow's stages into this context's ordered steps; a message applies only when its version is greater than the stored oneKafka consumer ProcessFlowConsumer (PROCESS_FLOW_CONSUMER_GROUP, required; the process_flows copy)Live, always on (ADR 0025 stage 1; stages 2-3 decided, not built: the local POST /process-paths retires once every local path has a flow)internal/adapters/inbound/kafka/process_flow_consumer.go, cmd/api/runtime.go
8inventory-storagenoneSeparate Ways: stock is not capacitynoneDeliberately absent (ADR 0001)no consumer, no client
9fulfillment-execution, wes-work-planning (observed capacity), network-fulfillment (demand)warehouse-planningPublished Language intendedKafka (intended)Planned, not implemented (ADR 0001 context map)none
10product-masternoneNo relationship: SKU master data (handling classification, unit dimensions and weight) is not a capacity input; product-master publishes warehouse.product-master.events and calls no siblingnoneAbsentno consumer of warehouse.product-master.events and no client in this repo; product-master (its ADR 0001) has no outbound client and consumes nothing from this context
11warehouse-planningnetwork-inventory-planningOHS + PL / ACL on NIP's side (it folds each published plan into its own PublishedCapacityPlan read model and refuses to plan from a stale or missing one)Kafka warehouse.warehouse-planning.events, com.warehouse.wes.warehouse-planning.capacityplan.CapacityPlanPublished; NIP needs the additive canonical site_id this context adds in ADR 0012Live on NIP's side (its CAPACITY_PLAN_CONSUMER_GROUP); exercised by the e2e inter-warehouse-transfer scenario, where plans created through this service's REST API and relayed by its outbox are what let NIP approve a transferthis context: capacityplan.CapacityPlanPublished and its site_id (ADR 0012); NIP: internal/adapters/inbound/kafka/consumers.go (capacity-plan consumer)
12labor-performancewarehouse-planningOHS + PL / ACL: each standard event becomes an immutable labour-standard fact (one per standard_id); the standard in force for a plan's site, step and window is resolved at read time; only labor-performance's INTEGRATION topic is readKafka warehouse.labor-performance.events, com.warehouse.wes.labor-performance.standard.LaborStandardDefined and ...LaborStandardRevisedLive, always on (ADR 0022; producer side labor-performance ADR 0038): LABOR_STANDARD_CONSUMER_GROUP required at bootinternal/adapters/inbound/kafka/labor_standard_consumer.go, cmd/api/runtime.go
13warehouse-planningworkforce-managementOHS + PL / ACL on workforce-management's side (a labour_requirements copy, applied only when version is greater; it proposes heads from it and shows them as requiredHeads, its ADR 0043). Requirement here, supply there: workforce-management does not refuse a commitment below the requirement, this context surfaces the difference as LabourPlanDriftDetectedKafka warehouse.warehouse-planning.events, com.warehouse.wes.warehouse-planning.labourplan.LabourPlanCommittedLive on workforce-management's side (group workforce-management-labour-plans, env LABOUR_PLAN_CONSUMER_GROUP there)this context: internal/domain/labourplan/events.go, internal/application/usecases/labour_plan.go; workforce-management: cmd/workforce/labour_plan.go
14wes-work-planningnoneNo runtime relationship: its ChargeForecast and PathPlan were handed over (this context's ADR 0023, its ADR 0049; its /paths/{pathId}/charge and /paths/{pathId}/plan answer 410). No importer: both facts are shift-scoped and sent again every shiftnoneAbsent (hand-over done)internal/domain/workloadforecast, internal/domain/labourplan

There is no Shared Kernel, no Partnership and no Conformist relationship: no sibling Go package is imported (hard rule 5 in CLAUDE.md) and every upstream payload is translated locally.