Context Map
Built on develop (merged 2026-11-08) in IQVO/yard-management, released at v0.1.4 (first release v0.1.0 on 2026-11-09; applied to the k3s cluster on 2026-11-10 at v0.1.2 in a reduced footprint, and the image pinned to the v0.1.4 commit 44d605e in warehouse-infra since 2026-11-18, checked 2026-12-02): yard-management switches on its API and relay (at the check the relay was 1/1 and the API 0/1 Pending on the NotReady agent node k3s-agent2); dock-scheduling runs its API only (it relays inline). The MCP server (25 tools on develop 3bcfc22, 21 in v0.1.4) is registered in warehouse-infra but switched off until the cluster has room; the A2A agent (two skills) is built on develop (2026-12-02), not released and not deployed (the chart carries it off by default and warehouse-infra has no a2a block); the analytics projectors, report services and sweeps are registered but switched off, so the KPI reports of ADR 0011 are released, not yet served. The page still derives from yard/model/model.yaml; where the as-built service differs, the model and this page say so (see the as-built notes).
Following ddd-crew Context Mapping. This is yard-management's slice of the yard context map: every relationship it has, with the upstream (U) and downstream (D) side, the pattern and the channel. Abbreviations: OHS = Open Host Service, PL = Published Language, CF = Conformist, C/S = Customer/Supplier.
Derived from: model.yaml → contexts[yard-management].inbound,
.publishes[*].consumers, .consumes; the matching inbound rows of
contexts[dock-scheduling] (which list yard-management as a Customer/Supplier
source); fleet_changes.
Legend: arrows point from upstream to downstream. Solid = events or commands;
dotted = synchronous query. dock-scheduling and inbound-receiving appear twice because they are on both sides: they feed
this context and consume from it. inbound-receiving consumes only VisitCheckedIn; as built it does not consume
TrailerDocked.
People are rounded boxes.
Omitted: Kafka and Postgres as infrastructure; the analytics-only events
(warehouse.yard-management.analytics), which have no named consumer; the
fleet's other edges of dock-scheduling (warehouse-planning,
process-path-management), which this context has no message with. Retail
network: no edge at all. The model's hard_boundary forbids this context from
consuming any retailnetwork.* topic or calling a retail-network service; the
only channel to the network stays network-fulfillment and the Vendor API.
Relationships
| Neighbour | Direction | Pattern | Channel | Messages | Why this pattern |
|---|---|---|---|---|---|
dock-scheduling | Upstream | Customer/Supplier (this context is the Customer) | Kafka warehouse.dock-scheduling.events | DockAppointmentBooked, DockAppointmentRescheduled, DockAppointmentCancelled, DockAppointmentNoShow, DoorClosureScheduled, DoorClosureLifted | The model lists this context among the named consumers of these events. They feed AppointmentView and DoorClosureView, which gate check-in (ErrAppointmentRequired), direct a trailer to its door and refuse a closed door. |
dock-scheduling | Downstream | Customer/Supplier (dock-scheduling is the Customer) | Kafka warehouse.yard-management.events | VisitCheckedIn, VisitRejected, TrailerDocked, TrailerUndocked | Physical facts win (YD-0004): dock-scheduling applies arrival (ArrivalFromGate), the actual door (ActualDoorWins) and door release (CompleteOnDoorRelease) from them. Neither context writes into the other's aggregates. |
facility-layout | Upstream | Conformist | Kafka warehouse.facility.events | LocationSlotRegistered, LocationSlotDecommissioned, ZoneRegistered | A registry for every context; it does not adapt to this one. Roles Yard and Dock, dockFlow and zoneId to siteCode are taken as given into LocationView. |
inbound-receiving | Upstream | Conformist | Kafka warehouse.inbound-receiving.events | ASNRegistered, ASNCancelled, ReceiptOpened, ReceiptClosed | ASNs say what an inbound trailer holds (AsnContentView); receipts at a door close the unload (AutoCompleteUnload, via ReceiptAtDoorView). |
inbound-receiving | Downstream (one event) | Customer/Supplier (this pack's reading; the model names no pattern for this consumer) | Kafka warehouse.yard-management.events | VisitCheckedIn | The gate arrival feeds inbound-receiving's visit_arrivals local copy, joined to a receipt by appointment_id, for the dock-to-stock KPI (its ADR 0021, visit_arrival_consumer.go, group VISIT_ARRIVAL_CONSUMER_GROUP, set to inbound-receiving-visit-arrivals in helm-values/inbound-receiving.yaml). Every other type on the topic is committed past, a walk-in visit (no appointment_id) is ignored and nothing flows back. Both ends run on k3s (this service at v0.1.2, inbound-receiving at 484490f, whose ConfigMap carries the group; read-only, 2026-11-10), so the edge is registered and applied. |
outbound-shipping | Downstream | Customer/Supplier (this pack's reading) | Kafka warehouse.yard-management.events | TrailerDocked, DoorWorkCompleted, TrailerDeparted | Ship-confirm follows the physical departure: a closed load is confirmed shipped when its trailer leaves the site (outbound-shipping is released as v0.1.0, registered and image-pinned in warehouse-infra develop, PR 205, and applied to k3s on 2026-11-12 at 857edfd, with the consumer group outbound-shipping-yard set, so the edge is live: both ends run; the two door-work and departure events moved to the integration topic for it, service ADR 0010). The optional inbound-receiving consumer of TrailerDocked the model named was not built. |
exception-management | Downstream | Customer/Supplier (this pack's reading) | Kafka warehouse.yard-management.events | VisitRejected, SealExceptionRaised, TrailerDwellExceeded, YardCheckClosed | The model lists it as consumer; fleet_changes records a new consumer that opens problem cases (one per yard-check discrepancy). |
| Gate clerk or kiosk | Upstream (person / device) | UI on this context's REST | REST POST /visits, POST /visit-rejections, POST /visits/{visitId}/check-outs | CheckInVisit, RejectAtGate, CheckOutVisit | The gate is operated by a person or issued by an adapter (kiosk, camera, ANPR) around CheckInVisit. |
| Hostler | Upstream (person, floor client) | UI | REST POST /moves/claims, POST /moves/{moveId}/completions | ClaimNextMove, CompleteMove | Hostlers pull work; nothing is pushed. |
| Dock operator | Upstream (person, floor client) | UI | REST POST /trailers/{trailerId}/door-work-starts, .../door-work-completions | StartDoorWork, CompleteDoorWork | Door work is recorded by the people doing it. |
| Yard supervisor | Upstream (person, console) | UI | REST moves, holds, seals, yard policy, yard checks | RequestMove, CancelMove, PlaceHold, ReleaseHold, RecordSeal, DeclareYardPolicy, OpenYardCheck, RecordObservation, CloseYardCheck | Supervision and exceptions. |
| Scheduler (cron) | Upstream (CronJob) | UI | REST POST /dwell-sweeps, POST /move-lease-sweeps | DwellSweep, ExpireLease | Time-driven rules; both sweeps are idempotent. |
| Any context | Downstream | OHS | REST GET /visits, /trailers, /moves, /sites/{siteId}/yard-board, /sites/{siteId}/yard-policy, /reports/* (served by yard-reports) | ListVisits, GetVisit, ListTrailers, GetTrailer, ListMoves, GetYardBoard, GetYardPolicy | Read access for tools and diagnostics; no context depends on it for a decision (decision paths use events). |
warehouse-console, warehouse-floor-client | Downstream clients | OHS (read) and UI (screens) | REST | Yard Board remote; gate, hostler and dock operator screens (the console and floor-client work is not checked here) | fleet_changes names both; neither edge depends on an agent surface. |
warehouse-ops-agent (MCP client) and any AI client | Downstream | OHS / Customer with an ACL (the agent's MCP client adapter) | MCP Streamable HTTP through the Agent Router, /api/mcp/yard-management rewritten to /mcp | This service's cmd/mcp server: 25 tools on develop (11 L1 reads, 3 L2 recommendations, 11 L3 writes with initiated_by); the ops agent wires ten of the eleven L1 reads (get_yard_board, get_yard_policy, get_yard_dwell_report, list_moves, list_trailers, get_trailer, list_visits, get_visit, get_inspection, list_trailer_inspections) | Wired on develop (checked 2026-12-02 at abc8472, its ADR 0032): YARD_MANAGEMENT_MCP_ENDPOINT builds the client, read by YardDockBrief (its ADR 0035); unset, the brief's yard sections are omitted as not configured. Off in the cluster: helm-values/warehouse-ops-agent.yaml sets no endpoint, and this service's MCP server is off there (mcp.enabled: false in helm-values/yard-management.yaml). The agent never writes here: the gate, hostler and dock operator actions are on no MCP tool, and the L3 writes need a human approval held by the caller. |
warehouse-ops-agent (A2A delegating client) and any agent client | Downstream (delegating a goal) | OHS / Customer: the delegation carries the goal, never facts | A2A JSON-RPC 2.0 through the Agent Router, /api/a2a/yard-management rewritten to / | yard_status (L1) and request_yard_move (L3) | Built on develop (service ADR 0020, first commit 8705871, 2026-12-02), not in v0.1.4 and not deployed: the chart component is off by default and warehouse-infra has no a2a block. No client on warehouse-ops-agent develop calls either skill. |
Notes on the patterns
- A mutual Customer/Supplier pair, not a Shared Kernel.
dock-schedulingand this context consume each other's events and share no tables, code or write path. The flows are independent (plan versus physical), and each keeps an event-fed local copy of what it needs. - Conformist upstream for registries.
facility-layoutandinbound-receivingpublish one language for all consumers; this context takes it as given. - No Anti-Corruption Layer. All neighbours are in the same organization and
share the CloudEvents standard;
translation is limited to projecting events into local read models. A future
transport-visibilitycontext would add one (ACL to an external ETA feed) on thedock-schedulingside, not here. - No synchronous call in either direction (
sync_calls: []). The site of a door or spot comes from theLocationViewjoin ofLocationSlotRegistered.zoneIdandZoneRegistered{zoneId, siteCode}.