Skip to main content

DDD artifacts (ddd-crew)

This is the ddd-crew artifact pack for warehouse-ops-agent, plus UML class / ER / sequence diagrams, all derived from the code on develop.

Read this first

warehouse-ops-agent is not a bounded context in the aggregate-and-invariant sense (see Subdomain classification and ADR 0001). It owns no aggregate, has no Postgres, no migrations, and no Kafka I/O. Several artifacts below therefore record an honest absence and then document what the service does hold instead (pure policy value objects, in-memory read models, process-local caches). They are kept under the standard file names so the fleet aggregator can sync them mechanically.

The pack​

Artifactddd-crew tool / notationWhat it shows here
Core domain chartCore Domain ChartsPlacement as Supporting (fleet map), with the "not a bounded context" caveat.
Bounded context canvasBounded Context Canvas v5Purpose, classification, every inbound route/tool and outbound tool/endpoint.
Context mapContext MappingUpstream/downstream edges with OHS / CF / Separate Ways patterns (kept in ecosystem/).
Aggregate design canvasAggregate Design Canvas v1.1Records that there is no aggregate root, and lists the read models / decision objects instead.
Domain message flowDomain Message Flow ModellingFour scenarios with qry: messages only (this service issues no commands and no events).
EventStormingEventStorming glossary / cheat sheetDesign-level boards with read models, policies, external systems and hotspots; no domain events, by design.
Ubiquitous languageGlossaryEvery term mapped to its code identifier (kept in business-context/).
Class diagramUML class diagraminternal/domain/policy types plus the hexagonal ports/adapters view.
Entity relationshipER diagramStates that there is no database; documents the in-memory state instead.
Sequence diagramsUML sequence diagramsEvery inbound use case: daily brief, flow balance (+ LLM arbitration), travel factor, stranded reservation, console-bff, runtime signals.
Domain eventsEvent catalogueRecords that no event is published or consumed, with the evidence.

Sources of truth​

Code wins over every page here. The diagrams were derived from:

  • internal/domain/policy/*.go — the pure decision-policy layer.
  • internal/application/usecases/*.go — the use cases.
  • internal/ports/*.go — outbound port interfaces and DTOs.
  • internal/adapters/inbound/http/router.go, internal/adapters/inbound/mcp/{server,tools}.go — the inbound surface.
  • internal/adapters/outbound/{mcpclient,restclient,telemetry,logs,llm/anthropic} — who this service calls.
  • cmd/agent/{main,reasoner}.go, internal/config/config.go — wiring and configuration.
  • go.mod (no Kafka, CloudEvents or database driver) and the absence of migrations/ and apis/.

Hand-maintained companions: API surface, Governance note, and the ADRs.