Skip to main content

Context Map

Built, released at v0.1.4, applied to k3s (reduced footprint); MCP and A2A built, not deployed

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​

NeighbourDirectionPatternChannelMessagesWhy this pattern
dock-schedulingUpstreamCustomer/Supplier (this context is the Customer)Kafka warehouse.dock-scheduling.eventsDockAppointmentBooked, DockAppointmentRescheduled, DockAppointmentCancelled, DockAppointmentNoShow, DoorClosureScheduled, DoorClosureLiftedThe 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-schedulingDownstreamCustomer/Supplier (dock-scheduling is the Customer)Kafka warehouse.yard-management.eventsVisitCheckedIn, VisitRejected, TrailerDocked, TrailerUndockedPhysical 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-layoutUpstreamConformistKafka warehouse.facility.eventsLocationSlotRegistered, LocationSlotDecommissioned, ZoneRegisteredA 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-receivingUpstreamConformistKafka warehouse.inbound-receiving.eventsASNRegistered, ASNCancelled, ReceiptOpened, ReceiptClosedASNs say what an inbound trailer holds (AsnContentView); receipts at a door close the unload (AutoCompleteUnload, via ReceiptAtDoorView).
inbound-receivingDownstream (one event)Customer/Supplier (this pack's reading; the model names no pattern for this consumer)Kafka warehouse.yard-management.eventsVisitCheckedInThe 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-shippingDownstreamCustomer/Supplier (this pack's reading)Kafka warehouse.yard-management.eventsTrailerDocked, DoorWorkCompleted, TrailerDepartedShip-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-managementDownstreamCustomer/Supplier (this pack's reading)Kafka warehouse.yard-management.eventsVisitRejected, SealExceptionRaised, TrailerDwellExceeded, YardCheckClosedThe model lists it as consumer; fleet_changes records a new consumer that opens problem cases (one per yard-check discrepancy).
Gate clerk or kioskUpstream (person / device)UI on this context's RESTREST POST /visits, POST /visit-rejections, POST /visits/{visitId}/check-outsCheckInVisit, RejectAtGate, CheckOutVisitThe gate is operated by a person or issued by an adapter (kiosk, camera, ANPR) around CheckInVisit.
HostlerUpstream (person, floor client)UIREST POST /moves/claims, POST /moves/{moveId}/completionsClaimNextMove, CompleteMoveHostlers pull work; nothing is pushed.
Dock operatorUpstream (person, floor client)UIREST POST /trailers/{trailerId}/door-work-starts, .../door-work-completionsStartDoorWork, CompleteDoorWorkDoor work is recorded by the people doing it.
Yard supervisorUpstream (person, console)UIREST moves, holds, seals, yard policy, yard checksRequestMove, CancelMove, PlaceHold, ReleaseHold, RecordSeal, DeclareYardPolicy, OpenYardCheck, RecordObservation, CloseYardCheckSupervision and exceptions.
Scheduler (cron)Upstream (CronJob)UIREST POST /dwell-sweeps, POST /move-lease-sweepsDwellSweep, ExpireLeaseTime-driven rules; both sweeps are idempotent.
Any contextDownstreamOHSREST GET /visits, /trailers, /moves, /sites/{siteId}/yard-board, /sites/{siteId}/yard-policy, /reports/* (served by yard-reports)ListVisits, GetVisit, ListTrailers, GetTrailer, ListMoves, GetYardBoard, GetYardPolicyRead access for tools and diagnostics; no context depends on it for a decision (decision paths use events).
warehouse-console, warehouse-floor-clientDownstream clientsOHS (read) and UI (screens)RESTYard 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 clientDownstreamOHS / Customer with an ACL (the agent's MCP client adapter)MCP Streamable HTTP through the Agent Router, /api/mcp/yard-management rewritten to /mcpThis 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 clientDownstream (delegating a goal)OHS / Customer: the delegation carries the goal, never factsA2A 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-scheduling and 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-layout and inbound-receiving publish 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-visibility context would add one (ACL to an external ETA feed) on the dock-scheduling side, not here.
  • No synchronous call in either direction (sync_calls: []). The site of a door or spot comes from the LocationView join of LocationSlotRegistered.zoneId and ZoneRegistered{zoneId, siteCode}.