Yard Management
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).
Yard Management (yard-management, code YM, tier wms) owns everything
physically on site outside the four walls: the gate, the parking spots and
the dock doors. It records who passed the gate (visits), which trailer
is where (one spot, one door, or one open move), its load, seal and hold state,
the moves that hostlers and visiting drivers make, the door work done
while a trailer is docked, and yard checks. It is the source of dwell, door
occupancy and yard-truck productivity facts.
Its sibling dock-scheduling owns the future of a door (booked time);
yard-management owns the present of the yard. Neither records the other's
facts. Arrival, docking and door release are recorded only here
(YD-0004); dock-scheduling applies
them from events. Every location change of a trailer is a YardMove
(YD-0003).
The invariant that shapes the model: a trailer on site is at exactly one
place, and a spot or a door holds at most one trailer. It spans the Trailer
and YardMove aggregates and is enforced by a domain service
(Occupancy.CheckFree) under a per-location advisory lock plus a partial unique
index (uq_trailers_one_per_location).
This context's pages
| Page | What it holds | ddd-crew tool it follows |
|---|---|---|
| Business Context | The problem, the actors, the decisions, what is out of scope | — (narrative) |
| Ubiquitous Language | Yard, Yard Visit, Trailer, Spot, Dock Door, Hostler, Yard Move, Door Work, Dwell and the neighbour terms used here | — (glossary) |
| Core Domain Chart | Why this context is Supporting | core-domain-charts |
| Bounded Context Canvas | Purpose, classification, roles, every inbound and outbound message | bounded-context-canvas v5 |
| Context Map | Every upstream and downstream neighbour with its pattern and channel | context-mapping |
| Aggregate Design Canvas | YardVisit, Trailer, YardMove, YardCheck and YardPolicy: states, invariants, commands, events | aggregate-design-canvas v1.1 |
| Domain Events | The nineteen published (nine integration, ten analytics only) and thirteen consumed events, with full CloudEvents types and topics | — (event catalogue) |
| Domain Message Flow | Live unload, drop and later door call, gate rejection, hostler move with lease expiry, agent reads and a move delegated over A2A | domain-message-flow-modelling |
| EventStorming | Process-level boards with hotspots | eventstorming-glossary-cheat-sheet |
| Use Cases | One section per command: trigger, adapter, flow, errors, events | — (application layer) |
| Class Diagram | Domain types and the hexagonal ports and adapters of the built service | — (UML) |
| Entity Relationship | The Postgres schema of the built service (OLTP and analytics) | — (ER) |
| Sequence Diagrams | The four required scenarios, then one runtime sequence per significant command | — (UML) |
The sibling pack is Dock Scheduling. The industry basis for the capabilities is on Benchmarks.
Service and operations
- Service: IQVO/yard-management, merged on
develop2026-11-08 (door work and departure on the integration topic, and the KPI reports, 2026-11-09);developread at3bcfc22on 2026-12-02. Registered in warehouse-infra develop (terraform/apps.yamlentry with a database and analytics,helm-values/yard-management.yaml, a dashboard, alert rules and the image pinned to the v0.1.4 commit44d605einterraform/targets/k3s.images.yaml, since 2026-11-18). Applied to the k3s cluster since 2026-11-10 in a reduced footprint (first at v0.1.2, main commitda1e30e; checked 2026-12-02:yard-management-relay1/1,yard-management0/1 Pending on the agent nodek3s-agent2, which was NotReady): the api and the relay are the components switched on (this api does not relay), while the mcp, projector, reports and sweeps are switched off until the cluster has room, so the KPI reports of ADR 0011 are released but not served. The helm values give the api three consumer groups (yard-management-dock-scheduling,yard-management-facility,yard-management-inbound-receiving), the projectoryard-management-analytics, Kong routes/api/yard-managementand/api/yard-management/reports, the Agent Router route/api/mcp/yard-management(declared,mcp.enabled: false), a relay Deployment and the dwell (every five minutes) and move-lease (every minute) sweeps; there is noa2ablock, so the A2A agent is not deployed. The yard-domain Kafka topics must be pre-created before the first sync (docs/kafka-topics-yard-dock.mdin warehouse-infra). An edge is live only when both ends run: the dock-scheduling edges are live, the others depend on the other end's deployment. The contracts are copied underyard/apis/yard-management/andscripts/check_model.pycompares the model with them. Six binaries ondevelop:api,mcp,a2a,relay,yard-projectorandyard-reports(v0.1.4 ships five, withouta2a). Twenty-one ADRs ondevelop(0001to0021); the ADR page indexes the first eleven. - Runtime: Postgres and Kafka only (no in-memory mode). Every published
event leaves through a transactional outbox; every consumer is idempotent on
the CloudEvents
id. The analytics read side is a separate database written byyard-projectorand read byyard-reports. - MCP: the service ships its own MCP server (
cmd/mcp, ADR 0007: Streamable HTTP on port 8090, openGET /healthz, stateless, no auth; every tool declares its authority intools/list_metacom.warehouse/authority, Agentic Standard v2) with 25 tools ondevelop(21 in v0.1.4): eleven L1 reads (get_yard_board,list_trailers,get_trailer,list_moves,list_visits,get_visit,get_yard_policy,get_yard_dwell_report,get_inspection,list_trailer_inspections,check_time_on_site), three L2 recommendations that change nothing (recommend_next_door,propose_pickup_plan,list_gate_record_gaps, ADR 0021) and eleven L3 writes (request_move,cancel_move,place_hold,release_hold,record_seal,secure_trailer,release_securing,open_yard_check,open_inspection,record_inspection_item,complete_inspection), every write behind anidempotencyKey, a human approval held by the caller andinitiated_byattribution withviamcp. Two resource templates (warehouse://yard/sites/{siteId}/board,warehouse://yard/trailers/{trailerId}) and one prompt (review_yard). Registered in warehouse-infra and switched off until the cluster has room:mcp.enabled: false, route/api/mcp/yard-managementthrough the Agent Router, rewritten to/mcp. The gate, hostler and dock operator actions are on no agent surface. Catalogued on the fleet Agent Catalogue. - A2A:
cmd/a2a(ADR 0020, accepted 2026-12-02) is a third inbound adapter beside REST and MCP, over the same use cases: JSON-RPC 2.0 over HTTP on port 8093 (/and/a2a), message-only, the agent card at/.well-known/agent-card.json(nameyard-management, provider IQVO, no security schemes, no streaming), no auth. Two goal-shaped skills, each with its authority as a card tag:yard_status(L1, "Yard status and ranked exceptions": where one trailer is, or every trailer, spot, door, open move and exception of a site, the holds, overdue moves and expired hostler leases ranked by rule; changes nothing) andrequest_yard_move(L3, "Request a yard move": therequest_moveuse case behind the idempotency guard, theYardMoveRequestedit raises stampedinitiated_bywithviaa2a; the human approval is held by the caller and named byproposalIdandapprovedBy). Delegation only: the facts still leave as CloudEvents through the outbox and the relay. Route/api/a2a/yard-managementthrough the Agent Router, rewritten to/. Built ondevelop(first commit8705871, 2026-12-02), not in v0.1.4 and not deployed: the chart component is off by default and warehouse-infra has noa2ablock. Catalogued on the fleet A2A Agents page; the authority levels are the fleet's Agentic Standard. - Agent clients:
warehouse-ops-agentdevelop(abc8472, checked 2026-12-02) builds a yard-management MCP client fromYARD_MANAGEMENT_MCP_ENDPOINT(cmd/agent/wire_clients.go, its ten read tools, its ADR 0032) and reads it inYardDockBrief(internal/application/usecases/yard_dock_brief.go, its ADR 0035:get_yard_board,get_yard_policy,get_yard_dwell_report,list_moves), fail-open: with no endpoint the brief's yard sections are omitted as not configured. warehouse-infra sets no endpoint for it (helm-values/warehouse-ops-agent.yaml), so the edge is wired ondevelopand off in the cluster. No client there callsyard_statusorrequest_yard_move: the agent's A2A writes arerelease_next_work,assign_laborandbook_or_reschedule_appointment(dock-scheduling). - Edges named in the model (
fleet_changes):warehouse-consolegains a Yard Board remote (spot and door map, arrivals, at-risk appointments) andwarehouse-floor-clientthe gate clerk check-in/out, hostler claim/complete move and dock operator door-work screens; neither was checked here.dock-schedulingconsumes the yard's facts;exception-managementandoutbound-shippingconsume its integration events; all are merged ondevelop. - Observability: the read model
YardKpiReportis built: dwell by kind, door utilisation, moves per hostler hour, driver wait, and the KPI standard v1 of the service's ADR 0011 (gate-to-gate turn time per purpose, detention exposure over a 120 minute default threshold, exception rates), served byyard-reports.
Elsewhere
- Strategic context map and subdomain classification.
- Event standard (CloudEvents).
- Decisions: YD-0001 two contexts, YD-0002 appointment ownership, YD-0003 every location change is a move, YD-0004 physical facts win, YD-0005 pickups from CPT.
- Where the model was silent or contradicted itself, these pages first said proposed
or this pack's reading and tagged the point
YM-G<n>. The gaps were decided before the build (decisions Y-1 to Y-14, X1 to X7; see the Model Gap Register) and the pages now state the built rule; the hotspot table on EventStorming says how each was settled.