Skip to content

C4 diagrams in D2

Modulecraft.09 · practice · docs · Pass 11 · 1 to 2 h
You builddocs/c4/context.d2, docs/c4/containers.d2, docs/c4/components-engine.d2
Testscourse/tests/craft.09 (named below, with why each exists)
Needsnone
Used byno code call site; this is an independent artifact
MilestoneMS-P11
  • Tie each claim to the exact platform evidence that C4 diagrams in D2 produces.
  • State the owner, success condition, and recovery action before declaring the work complete.
  • Record unresolved assumptions so the next review can test them.
Terminal window
ol start craft.09
ol tests craft.09
ol check craft.09

The architecture is now too large to hold in one view. A C4 set lets a new maintainer move from users and external systems to containers and then to engine components.

Keep the context diagram about people and external dependencies. Show deployable processes at container level. Put internal services and stores in the component view. Every arrow names a protocol or file boundary from DESIGN 2.3.

Trace one completion request from CLI through gateway, engine, artifact storage, and telemetry. Draw one view per abstraction level; check that the same system boundary is preserved and the engine subcomponents appear only in the component view.

TestKINDChecksWhy it matters downstream
test_artifact_paths_are_declaredartifactConfirms the submitted paths and required evidence exist, so a plausible narrative cannot pass without the reviewable deliverable.
#PitfallSymptomCaught by
1The artifact names a decision without the evidence that supports itReviewers cannot verify the claim against the repository or system.test_artifact_paths_are_declared
2The failure or rollback case is omittedThe happy path passes while an operator has no safe response under failure.test_artifact_paths_are_declared
3The owner, threshold, or scope is implicitTwo reviewers can reach different release or risk decisions from the same evidence.test_artifact_paths_are_declared
DirectionModuleConnection
Backcraft.02Read this declared prerequisite before producing the artifact; use it to verify the relevant contract or evidence.
Backreview.03Read this declared prerequisite before producing the artifact; use it to verify the relevant contract or evidence.
ResourceWhat to inspect
C4 model and architecture rules, section 2.3Compare the submitted views with the course system boundary and its process/file interfaces.