@@ -11,18 +11,27 @@ Two targets: `DHModels` (Linux-safe value types) and `DHKit`
1111```
1212DHModels/
1313├── Sources/
14- │ ├── DHModels/ # Foundation-only; no Apple-only frameworks
14+ │ ├── DHModels/
15+ │ │ └── DaggerheartModels.docc/
16+ │ │ └── Resources/ # SVG diagrams (generated by Scripts/render-diagrams.sh)
1517│ ├── DHKit/
18+ │ │ ├── DHKit.docc/
19+ │ │ │ └── Resources/ # SVG diagrams (generated by Scripts/render-diagrams.sh)
1620│ │ └── Resources/ # adversaries.json, environments.json (SRD data)
1721│ └── validate-dhpack/
1822├── Tests/
1923│ ├── DHModelsTests/ # Linux-compatible; runs in Linux CI
2024│ │ └── Fixtures/ # adversaries.json, environments.json, sample-homebrew.dhpack
2125│ └── DHKitTests/ # Apple-platform only
26+ ├── diagrams/
27+ │ ├── DHModels/ # catalog.mmd, encounter.mmd, content.mmd
28+ │ └── DHKit/ # participants.mmd, stores.mmd, usage.mmd
2229├── schemas/ # dhpack.schema.json (JSON Schema for .dhpack files)
2330├── Package.swift
2431├── .swift-format # Formatting rules (matches gwillish/encounter)
25- └── Scripts/format.sh # Format all tracked Swift files
32+ └── Scripts/
33+ ├── format.sh # Format all tracked Swift files
34+ └── render-diagrams.sh # Render .mmd sources to SVG
2635```
2736
2837---
@@ -159,6 +168,23 @@ declaration to opt out of the default `@MainActor` isolation.
159168
160169---
161170
171+ ## Diagrams
172+
173+ Source files live in ` diagrams/DHModels/*.mmd ` and ` diagrams/DHKit/*.mmd ` .
174+
175+ ** Whenever a diagram source is added or modified, re-run the render script** to
176+ keep the DocC Resources in sync:
177+
178+ ``` bash
179+ ./Scripts/render-diagrams.sh
180+ ```
181+
182+ Output goes to ` Sources/DHModels/DaggerheartModels.docc/Resources/ ` and
183+ ` Sources/DHKit/DHKit.docc/Resources/ ` .
184+ Commit the generated SVGs alongside the source ` .mmd ` files.
185+
186+ ---
187+
162188## Git
163189
164190- ** Never commit on behalf of the user.** Wait for an explicit request.
0 commit comments