Context map
This page is a copy of docs/docs/ecosystem/context-map.md on develop, derived from that repository's code. Edit it there, then re-sync.
This is warehouse-ops-agent's slice of the fleet context map, in
ddd-crew Context Mapping
notation. It is part of the DDD artifact pack.
The per-edge operational detail (exact calls, configuration, failure
behaviour) is on Integration.
warehouse-ops-agent carries three distinct relationships to the rest
of the fleet, added in different phases and never merged into one:
- MCP Customer (ADR 0001, extended by
ADR 0007) — the
daily-brief, flow-balance-exception, explain-travel-factor and
stranded-reservation use cases read each context's published MCP Open
Host Service, synchronously, at request time. Clients exist for
twenty-six contexts: the five original ones plus
labor-performance(consumed by the ADR 0008 utilization overlay),order-managementandprocess-path-management(wired, not yet consumed by any use case), andwarehouse-planning(ADR 0013: read tools only;get_process_path_capacityfeeds the daily brief's optional capacity outlook, the other three read tools are wired but unconsumed),product-master(ADR 0020: read+write server (eight tools);list_productsfeeds the master-data gaps report, the other five read tools are unwired and the two pack-level write tools are never called; deployed and switched on in the kind cluster),inbound-receiving(ADR 0021: read-only server;list_asns,list_appointmentsandlist_receiptsfeed the inbound outlook, the other four read tools are wired but unconsumed; off untilINBOUND_RECEIVING_MCP_ENDPOINTis set) andnetwork-inventory-planning(ADR 0019: read tools only; they feed the transfer watch), plusreturns-processingandexception-management(read-only servers; wired, not yet consumed by any use case), and the twelve ADR 0025 clients: the ten retail-network contexts (customer-ordering,delivery-promise,last-mile-delivery,linehaul-transportation,node-performance,node-topology,offer-availability,order-sourcing,shipping-and-tracking,vendor-connectivity) plustask-interleavingandpick-face-replenishment— read-only servers, each client pinned to its published registry golden, wired but not yet consumed by any use case). - REST fan-out host for
console-bff(ADR 0002, ADR 0003) — a separate driving use case on behalf of thewarehouse-consolebrowser SPA:GET /console/orders/{id}/lifecyclecalls four contexts' OLTP REST APIs (order-management,inventory-storage,wes-work-planning,fulfillment-execution), andGET /console/reports/wms//wescall seven contexts' separate*-reportsanalytics binaries. - Telemetry reader —
GET /runtime-signalsqueries the fleet's Prometheus (Istio request metrics) and Loki (error log lines) directly; neither is a bounded context.
The first two are deliberately kept as separate outbound adapter families
(internal/adapters/outbound/mcpclient/ and
internal/adapters/outbound/restclient/) rather than unified, because
they answer different questions for different callers: an LLM host
asking "what needs attention right now" versus a browser rendering "what
happened to order X" for a human.
Source: cmd/agent/main.go, cmd/agent/reasoner.go,
internal/adapters/outbound/{mcpclient,restclient,telemetry,logs,llm/anthropic}/*.go,
internal/adapters/inbound/http/router.go, internal/config/config.go.
Omits: the tool-by-tool list for wired-but-unconsumed tools (see the
table), the /freshness calls that accompany every report call, and
relationships between the other contexts.
Arrows point from upstream (U) to downstream (D), i.e. in the direction
facts flow; every call goes the other way, from this agent outward. A
solid arrow is live; a dashed arrow is wired-but-unconsumed, or (for the
LLM) off unless LLM_MODE is set; the undirected dashed link to
network-fulfillment marks a deliberate absence. Every edge is a read — nothing here ever gains write access to any
context.
Relationship table
| Upstream | Pattern | Technology | Status | Evidence |
|---|---|---|---|---|
wes-work-planning (Core) | OHS / Conformist | MCP get_backlog_telemetry, get_rebalance_recommendation; REST GET /work-units?reference=; reports /reports/throughput | live | mcpclient/wes_work_planning.go, restclient/clients.go, restclient/reports_clients.go |
fulfillment-execution (Core) | OHS / Conformist | MCP get_queue_status, diagnose_stuck_tasks (live); REST GET /tasks?orderRef= (joined via each WorkUnit's id, not the plain order id — see ADR 0002); reports /reports/throughput | live | mcpclient/fulfillment_execution.go, restclient/clients.go |
inventory-storage (Core) | OHS / Conformist | MCP check_availability, get_bin_occupancy (E2, exposed as the MCP tool detect_stranded_reservation); REST GET /reservations?demandRef=; reports /reports/flow-accuracy | live | mcpclient/inventory_storage.go, usecases/stranded_reservation.go |
warehouse-planning (Core) | OHS / Conformist, read tools only (its MCP server is read+write) | MCP get_process_path_capacity (live, daily-brief capacity outlook) | live, only when WAREHOUSE_PLANNING_MCP_ENDPOINT is set | mcpclient/warehouse_planning.go, usecases/capacity_outlook.go, zerowrite/mcpclient_tools_test.go |
product-master (Supporting) | OHS / Conformist (read+write server, eight tools; contract pinned to its published registry golden; only the read tool list_products is called) | MCP list_products (live, master-data gaps) | live, only when PRODUCT_MASTER_MCP_ENDPOINT is set (warehouse-infra sets it in the kind cluster: product-master-mcp:8090/mcp) | mcpclient/product_master.go, mcpclient/testdata/product_master_tools.golden.json, usecases/master_data_gaps.go |
network-inventory-planning | OHS / Conformist, read tools only | MCP find_stuck_transfers, get_transfer, simulate_transfer_options (live, transfer watch, ADR 0019) | live, only when NETWORK_INVENTORY_PLANNING_MCP_ENDPOINT is set | mcpclient/network_inventory_planning.go, usecases/transfer_watch.go |
workforce-management (Supporting) | OHS / Conformist | MCP get_staffing_gap (live); reports /reports/labor | live | mcpclient/workforce_management.go |
labor-performance (Supporting) | OHS / Conformist | MCP get_task_type_utilization (live, ADR 0008) + 3 wired tools; reports /reports/performance | live | mcpclient/labor_performance.go, usecases/flow_balance_advisory.go |
facility-layout (Generic) | OHS / Conformist | MCP list_sites, estimate_travel_distance (live); reports /reports/catalog-growth | live | mcpclient/facility_layout.go, usecases/explain_travel_factor.go |
order-management (Generic/Supporting) | OHS / Conformist | REST GET /orders/{id} and reports /reports/funnel (live); MCP get_promise_health (live, daily-brief promise-health section, ADR 0024) | REST live; MCP live, only when ORDER_MANAGEMENT_MCP_ENDPOINT is set | restclient/clients.go, mcpclient/order_management.go, usecases/promise_health.go |
slotting-optimization (Supporting) | OHS / Conformist (read-only server; contract pinned to its published registry golden) | MCP list_slot_plans, get_slot_plan (live, daily-brief slot-plan watch, ADR 0024); get_forward_slots, get_sku_velocity deliberately unwired | live, only when SLOTTING_OPTIMIZATION_MCP_ENDPOINT is set | mcpclient/slotting_optimization.go, mcpclient/testdata/slotting_optimization_tools.golden.json, usecases/slot_plan_watch.go |
returns-processing (Supporting) | OHS / Conformist (read-only server; contract pinned to its published registry golden) | MCP get_return, list_returns_by_order, get_disposition_policy (all three read tools wired; no use case consumes them yet) | wired, only when RETURNS_PROCESSING_MCP_ENDPOINT is set | mcpclient/returns_processing.go, mcpclient/testdata/returns_processing_tools.golden.json |
exception-management (Supporting) | OHS / Conformist (read-only server; contract pinned to its published registry golden) | MCP list_open_exceptions, get_exception, get_exception_policies, get_sla_report (all four read tools wired; no use case consumes them yet) | wired, only when EXCEPTION_MANAGEMENT_MCP_ENDPOINT is set | mcpclient/exception_management.go, mcpclient/testdata/exception_management_tools.golden.json |
| customer-ordering (retail network) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP get_order, get_order_tracking, get_ship_to (all three read tools wired; no use case consumes them yet) | wired, only when CUSTOMER_ORDERING_MCP_ENDPOINT is set | mcpclient/customer_ordering.go, mcpclient/testdata/customer_ordering_tools.golden.json |
| delivery-promise (retail network) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP get_current_policy, get_delivery_offer, get_promise, list_promise_books, list_promises_by_order (all five read tools wired; no use case consumes them yet) | wired, only when DELIVERY_PROMISE_MCP_ENDPOINT is set | mcpclient/delivery_promise.go, mcpclient/testdata/delivery_promise_tools.golden.json |
| last-mile-delivery (retail network) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP list_waves, get_wave_stops, get_route (all three read tools wired; no use case consumes them yet) | wired, only when LAST_MILE_DELIVERY_MCP_ENDPOINT is set | mcpclient/last_mile_delivery.go, mcpclient/testdata/last_mile_delivery_tools.golden.json |
| linehaul-transportation (retail network) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP get_departure, list_departures (both read tools wired; no use case consumes them yet) | wired, only when LINEHAUL_TRANSPORTATION_MCP_ENDPOINT is set | mcpclient/linehaul_transportation.go, mcpclient/testdata/linehaul_transportation_tools.golden.json |
| node-performance (retail network) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP get_scorecard, list_scorecards_by_grade (both read tools wired; no use case consumes them yet) | wired, only when NODE_PERFORMANCE_MCP_ENDPOINT is set | mcpclient/node_performance.go, mcpclient/testdata/node_performance_tools.golden.json |
| node-topology (retail network) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP get_node, get_region, list_nodes, list_regions, list_lanes, resolve_service_area (all six read tools wired; no use case consumes them yet) | wired, only when NODE_TOPOLOGY_MCP_ENDPOINT is set | mcpclient/node_topology.go, mcpclient/testdata/node_topology_tools.golden.json |
| offer-availability (retail network) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP browse_catalog, get_catalog_item, list_listings, get_inventory_feed (all four read tools wired; no use case consumes them yet) | wired, only when OFFER_AVAILABILITY_MCP_ENDPOINT is set | mcpclient/offer_availability.go, mcpclient/testdata/offer_availability_tools.golden.json |
| order-sourcing (retail network) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP get_assignment, list_assignments (both read tools wired; no use case consumes them yet) | wired, only when ORDER_SOURCING_MCP_ENDPOINT is set | mcpclient/order_sourcing.go, mcpclient/testdata/order_sourcing_tools.golden.json |
| shipping-and-tracking (retail network) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP get_journey (its one read tool wired; no use case consumes it yet) | wired, only when SHIPPING_AND_TRACKING_MCP_ENDPOINT is set | mcpclient/shipping_and_tracking.go, mcpclient/testdata/shipping_and_tracking_tools.golden.json |
| seller-inbound (retail network) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0027) | MCP get_seller_scorecard, get_inbound_plan, get_shipment_labels, get_inbound_shipment (all four read tools wired; no use case consumes them yet) | wired, only when SELLER_INBOUND_MCP_ENDPOINT is set | mcpclient/seller_inbound.go, mcpclient/testdata/seller_inbound_tools.golden.json |
| vendor-connectivity (retail network) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP get_vendor, get_vendor_node, list_vendor_nodes, get_purchase_order, poll_purchase_orders, get_inbound_shipment, poll_inbound_shipments, get_transaction, get_node_scorecard (all nine read tools wired; no use case consumes them yet) | wired, only when VENDOR_CONNECTIVITY_MCP_ENDPOINT is set | mcpclient/vendor_connectivity.go, mcpclient/testdata/vendor_connectivity_tools.golden.json |
| task-interleaving (Supporting) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP get_hint, get_site_policy, get_station, list_hints (all four read tools wired; no use case consumes them yet) | wired, only when TASK_INTERLEAVING_MCP_ENDPOINT is set | mcpclient/task_interleaving.go, mcpclient/testdata/task_interleaving_tools.golden.json |
| pick-face-replenishment (Supporting) | OHS / Conformist (read-only server; contract pinned to its published registry golden, ADR 0025) | MCP get_policy, list_policies, get_replenishment, list_replenishments, list_pick_faces (all five read tools wired; no use case consumes them yet) | wired, only when PICK_FACE_REPLENISHMENT_MCP_ENDPOINT is set | mcpclient/pick_face_replenishment.go, mcpclient/testdata/pick_face_replenishment_tools.golden.json |
| process-path-management (Generic) | none | client REMOVED (ADR 0024, gap A9): catalogue configuration is not an ops signal | deliberately absent | no client in internal/adapters/outbound |
| network-fulfillment (Supporting) | Separate Ways | none | deliberately absent | no client in internal/adapters/outbound |
| Prometheus / Loki | Conformist (not a bounded context) | HTTP /api/v1/query, /loki/api/v1/query_range | live | telemetry/prometheus_reader.go, logs/loki_reader.go |
| Anthropic Messages API (external) | Conformist, with policy.ValidatePlan / Arbitrate as the anti-corruption gate | HTTP POST /v1/messages | off by default (LLM_MODE=off) | llm/anthropic/reasoner.go, cmd/agent/reasoner.go |
| Downstream | Pattern | Technology | Status | Evidence |
|---|---|---|---|---|
warehouse-console | Customer/Supplier (this agent is the BFF supplier; DTOs hand-kept in sync with the console's types) | REST /console/orders/{id}/lifecycle, /console/reports/wms, /console/reports/wes, plus /daily-brief | live | inbound/http/router.go |
| Agentic / LLM hosts | OHS / Published Language (MCP tool schemas) | MCP /mcp: up to 10 read-only tools (7 registered in tools.go, of which find_master_data_gaps and get_inbound_outlook only when their upstream is configured; 3 transfer-watch tools in transfer_watch.go only when network-inventory-planning is configured) | live | inbound/mcp/tools.go, inbound/mcp/transfer_watch.go |
Every *-reports read also calls that report's /freshness endpoint. MCP
and REST calls carry no credentials — the fleet's auth was removed
(ADR 0006).
What is deliberately absent
This agent has no Kafka integration — it reads exclusively via synchronous MCP tool calls, REST calls and Prometheus/Loki queries, at request time. It does not subscribe to any context's domain events, and it publishes none of its own (see Domain events).
It also has no cross-repo Go dependency on any upstream context:
internal/architecture/architecture_test.go's
TestNoDirectDependencyOnBoundedContexts fails the build if one of the
five original contexts' modules (or warehouse-planning's, product-master's or inbound-receiving's) is ever
introduced, and the domain-layer types in internal/domain/policy
(RebalanceAction, TaskType, and so on) are hand-mirrored copies of the
upstream enums, validated at the tool-boundary rather than imported.
Why this agent, and not one of the five contexts, owns the correlation
See Domain vision and ADR 0001: none of the upstream contexts is the natural owner of cross-context correlation, and embedding it in any one of them would invert that context's dependency direction and blur its boundary.