docs(roadmap): collapse completed epic diagrams

This commit is contained in:
Mihaela Mihaljevic 2026-06-05 10:50:13 +02:00
parent e127cc1f1e
commit b61ed10fb2
3 changed files with 17 additions and 21 deletions

View File

@ -59,27 +59,6 @@ flowchart TB
Epic12 --> Epic13
```
Parse core detailed roadmap:
```mermaid
flowchart TB
classDef done fill:#ddf9e4,stroke:#34c759,color:#111827
classDef review fill:#fff7d6,stroke:#ffcc00,color:#111827
classDef epic fill:#f2e5ff,stroke:#af52de,color:#111827
classDef todo fill:#f2f4f7,stroke:#8e8e93,color:#111827
Issue2["#2 Event Model and Golden Tests"]:::done
Issue3["#3 UTF-8 Reader and Scanner"]:::done
Issue4["#4 Token Stream to Events"]:::done
Issue5["#5 Events to PureYAML Values"]:::done
Issue6["#6 Scalars Tags and Aliases"]:::done
Issue7["#7 macOS Linux and WASM Hardening"]:::done
Issue2 --> Issue3
Issue3 --> Issue4
Issue4 --> Issue5
Issue5 --> Issue6
Issue6 --> Issue7
```
Emitter detailed roadmap:
```mermaid

View File

@ -38,3 +38,14 @@ already defined in that block.
The README must start its Mermaid section with the shared legend. Run
`bash scripts/check-roadmap.sh` after changing roadmap diagrams.
## Rule 3: Collapse completed epics
Completed epics must not be expanded into their child issues in Mermaid
roadmaps. Once every child in an epic is `done`, remove that detailed Mermaid
block and show the completed epic as one `done` node in its parent or
super-epic roadmap.
Do not keep all-green detailed roadmap diagrams. The issue checklist can retain
the historical child issue list, but Mermaid must stay focused on active or
upcoming work.

View File

@ -117,6 +117,12 @@ validate_block() {
fail "mermaid block $index has unclassed node: $trimmed"
fi
done < "$block"
if [ "$index" -gt 1 ] &&
grep -Fq ':::done' "$block" &&
! grep -Eq ':::(todo|review|epic)' "$block"; then
fail "mermaid block $index expands completed work; collapse completed epics to one done node"
fi
}
repo_name() {