Skip to main content

Yard Management

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).

Supporting

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​

PageWhat it holdsddd-crew tool it follows
Business ContextThe problem, the actors, the decisions, what is out of scope— (narrative)
Ubiquitous LanguageYard, Yard Visit, Trailer, Spot, Dock Door, Hostler, Yard Move, Door Work, Dwell and the neighbour terms used here— (glossary)
Core Domain ChartWhy this context is Supportingcore-domain-charts
Bounded Context CanvasPurpose, classification, roles, every inbound and outbound messagebounded-context-canvas v5
Context MapEvery upstream and downstream neighbour with its pattern and channelcontext-mapping
Aggregate Design CanvasYardVisit, Trailer, YardMove, YardCheck and YardPolicy: states, invariants, commands, eventsaggregate-design-canvas v1.1
Domain EventsThe nineteen published (nine integration, ten analytics only) and thirteen consumed events, with full CloudEvents types and topics— (event catalogue)
Domain Message FlowLive unload, drop and later door call, gate rejection, hostler move with lease expiry, agent reads and a move delegated over A2Adomain-message-flow-modelling
EventStormingProcess-level boards with hotspotseventstorming-glossary-cheat-sheet
Use CasesOne section per command: trigger, adapter, flow, errors, events— (application layer)
Class DiagramDomain types and the hexagonal ports and adapters of the built service— (UML)
Entity RelationshipThe Postgres schema of the built service (OLTP and analytics)— (ER)
Sequence DiagramsThe 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 develop 2026-11-08 (door work and departure on the integration topic, and the KPI reports, 2026-11-09); develop read at 3bcfc22 on 2026-12-02. Registered in warehouse-infra develop (terraform/apps.yaml entry with a database and analytics, helm-values/yard-management.yaml, a dashboard, alert rules and the image pinned to the v0.1.4 commit 44d605e in terraform/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 commit da1e30e; checked 2026-12-02: yard-management-relay 1/1, yard-management 0/1 Pending on the agent node k3s-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 projector yard-management-analytics, Kong routes /api/yard-management and /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 no a2a block, 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.md in 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 under yard/apis/yard-management/ and scripts/check_model.py compares the model with them. Six binaries on develop: api, mcp, a2a, relay, yard-projector and yard-reports (v0.1.4 ships five, without a2a). Twenty-one ADRs on develop (0001 to 0021); 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 by yard-projector and read by yard-reports.
  • MCP: the service ships its own MCP server (cmd/mcp, ADR 0007: Streamable HTTP on port 8090, open GET /healthz, stateless, no auth; every tool declares its authority in tools/list _meta com.warehouse/authority, Agentic Standard v2) with 25 tools on develop (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 an idempotencyKey, a human approval held by the caller and initiated_by attribution with via mcp. 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-management through 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 (name yard-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) and request_yard_move (L3, "Request a yard move": the request_move use case behind the idempotency guard, the YardMoveRequested it raises stamped initiated_by with via a2a; the human approval is held by the caller and named by proposalId and approvedBy). Delegation only: the facts still leave as CloudEvents through the outbox and the relay. Route /api/a2a/yard-management through the Agent Router, rewritten to /. Built on develop (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. Catalogued on the fleet A2A Agents page; the authority levels are the fleet's Agentic Standard.
  • Agent clients: warehouse-ops-agent develop (abc8472, checked 2026-12-02) builds a yard-management MCP client from YARD_MANAGEMENT_MCP_ENDPOINT (cmd/agent/wire_clients.go, its ten read tools, its ADR 0032) and reads it in YardDockBrief (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 on develop and off in the cluster. No client there calls yard_status or request_yard_move: the agent's A2A writes are release_next_work, assign_labor and book_or_reschedule_appointment (dock-scheduling).
  • Edges named in the model (fleet_changes): warehouse-console gains a Yard Board remote (spot and door map, arrivals, at-risk appointments) and warehouse-floor-client the gate clerk check-in/out, hostler claim/complete move and dock operator door-work screens; neither was checked here. dock-scheduling consumes the yard's facts; exception-management and outbound-shipping consume its integration events; all are merged on develop.
  • Observability: the read model YardKpiReport is 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 by yard-reports.

Elsewhere​