From b61ed10fb2f2295389cd2c2a66cadcde0d5e1d72 Mon Sep 17 00:00:00 2001 From: Mihaela Mihaljevic Date: Fri, 5 Jun 2026 10:50:13 +0200 Subject: [PATCH] docs(roadmap): collapse completed epic diagrams --- README.md | 21 --------------------- docs/rules/mermaid.md | 11 +++++++++++ scripts/check-roadmap.sh | 6 ++++++ 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index b37fe31..37a1f4f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/rules/mermaid.md b/docs/rules/mermaid.md index f425dfd..a4ecf7e 100644 --- a/docs/rules/mermaid.md +++ b/docs/rules/mermaid.md @@ -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. diff --git a/scripts/check-roadmap.sh b/scripts/check-roadmap.sh index 4f7db2f..900f271 100755 --- a/scripts/check-roadmap.sh +++ b/scripts/check-roadmap.sh @@ -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() {