Editorial diagram design for Claude Code, Codex, GitHub Copilot, Cursor, Factory Droid, Qoder, and Pi. 45 diagram types. Self-contained HTML + SVG. No shadows. No Mermaid slop.
docs(readme): point at the type taxonomy instead of a stale count, and gate it (#212)
Wu Shuwena4a8726cd60b
diff --git a/README.md b/README.mdindex 178798c..7a12a61 100644--- a/README.md+++ b/README.md@@ -14,7 +14,7 @@*New in 2.5.10: ten more layout grammars — Sankey, fishbone, Wardley map, kanban, user journey, deployment, dependency graph, UML class, story map, and database schema.*-39 editorial diagram types for Claude Code, Codex, Factory Droid, Pi, and Agent Skills-compatible hosts. Self-contained HTML + SVG. No shadows. No Mermaid slop. Semantic patterns describe behavior separately from layout, so a queue, policy trace, or trust boundary can use the nearest existing type without expanding the type count. Static HTML remains the default; optional motion is available for ordered explanations. The skill also redraws draw.io, Mermaid, or Excalidraw sources at a chosen format, size, and detail level.+Editorial diagram types for Claude Code, Codex, Factory Droid, Pi, and Agent Skills-compatible hosts. Self-contained HTML + SVG. No shadows. No Mermaid slop. Semantic patterns describe behavior separately from layout, so a queue, policy trace, or trust boundary can use the nearest existing type without expanding the type count. Static HTML remains the default; optional motion is available for ordered explanations. The skill also redraws draw.io, Mermaid, or Excalidraw sources at a chosen format, size, and detail level.No Figma. No generic rounded boxes. No 30-minute color-picking sessions.@@ -24,7 +24,7 @@ No Figma. No generic rounded boxes. No 30-minute color-picking sessions.I write at [littlemight.com](https://littlemight.com?utm_source=diagram-design&utm_medium=readme&utm_campaign=github&utm_content=intro) (and run [BestSelf.co](https://bestself.co?utm_source=diagram-design&utm_medium=readme&utm_campaign=github&utm_content=intro) on the side). Every time I needed a diagram — an architecture sketch, a flowchart, a pyramid of what matters most — I'd ask Claude and get back a generic rounded-box thing that looked nothing like the rest of the site. I'd either fight with Figma for 30 minutes or just skip the diagram.-So I built a Claude Code skill for it. Thirty-nine visual types, editorial quality, matches your brand in 60 seconds by reading your website.+So I built a Claude Code skill for it. Editorial-quality visual types, matched to your brand in 60 seconds by reading your website.> *The highest-quality move is usually deletion.* Every node earns its place. The accent color is reserved for the 1–2 things the reader should look at first. Target density: 4/10.@@ -32,7 +32,7 @@ So I built a Claude Code skill for it. Thirty-nine visual types, editorial quali## What it makes-All 39 visual types ship in three static variants: minimal light, minimal dark, and full-editorial. Open any of them directly in a browser. There is no build step, JavaScript, or external image dependency.+Every visual type ships in three static variants: minimal light, minimal dark, and full-editorial. Open any of them directly in a browser. There is no build step, JavaScript, or external image dependency.<table><tr>@@ -109,7 +109,7 @@ All 39 visual types ship in three static variants: minimal light, minimal dark,The v2.5.10 release added the final ten types above. Compare their light, dark, and full-editorial variants in the [30-variant contact sheet](.github/pr-previews/editorial-diagrams-2.5.10.jpg).-**Browse the live gallery:** [cathrynlavery.github.io/diagram-design](https://cathrynlavery.github.io/diagram-design/) — or open [`skills/diagram-design/assets/index.html`](skills/diagram-design/assets/index.html) locally to flip through all 39 diagrams with light / dark / full-editorial tabs.+**Browse the live gallery:** [cathrynlavery.github.io/diagram-design](https://cathrynlavery.github.io/diagram-design/) — or open [`skills/diagram-design/assets/index.html`](skills/diagram-design/assets/index.html) locally to flip through every diagram with light / dark / full-editorial tabs.---@@ -246,7 +246,7 @@ Every diagram template gives the inline SVG an accessible name and description:### Manual override-Prefer to set tokens by hand? Open [`skills/diagram-design/references/style-guide.md`](skills/diagram-design/references/style-guide.md) and edit the table. Everything downstream reads from there — all 39 diagrams, the annotation primitive, and the gallery all inherit semantic role names (`accent`, not `#eb6c36`).+Prefer to set tokens by hand? Open [`skills/diagram-design/references/style-guide.md`](skills/diagram-design/references/style-guide.md) and edit the table. Everything downstream reads from there — every diagram, the annotation primitive, and the gallery all inherit semantic role names (`accent`, not `#eb6c36`).### First-run gate@@ -267,7 +267,7 @@ The profile library is shared across Claude Code, Codex, Factory Droid, and Pi.## Quickstart```bash-# From a cloned checkout, open the gallery to see all 39 diagrams+# From a cloned checkout, open the gallery to see every diagramopen skills/diagram-design/assets/index.html # macOSxdg-open skills/diagram-design/assets/index.html # Linux@@ -457,7 +457,7 @@ diagram-design/│ └── assets/│ ├── index.html — live gallery, tabbed│ ├── template*.html — scaffolds for new diagrams-│ ├── example-<type>.html — 3 variants × 39 types+│ ├── example-<type>.html — 3 variants per type│ ├── example-loop-terminal.html│ ├── example-quadrant-consultant.html│ ├── example-import-drawio.html@@ -468,7 +468,7 @@ diagram-design/├── scripts/│ ├── build-readme-thumbs.py — regenerates docs/screenshots/thumbs/│ ├── bump-plugin-version.py — synchronized Claude/Codex/Factory version bump-│ ├── render-canonical-screenshots.py — deterministic 39-type PNG catalog renderer+│ ├── render-canonical-screenshots.py — deterministic per-type PNG catalog renderer│ ├── verify-screenshot-freshness.py — source + screenshot digest gate│ ├── verify-plugin-package.py — version + marketplace package gate│ ├── test-plugin-package.py — adversarial package-gate tests@@ -576,7 +576,7 @@ At startup, the agent sees only the skill name and description. When a request m| "Redraw this .drawio file for my deck" | `SKILL.md` + `references/import-drawio.md` + `references/output-spec.md` + the chosen type's reference || "Redraw this Mermaid block for my deck" | `SKILL.md` + `references/import-mermaid.md` + `references/output-spec.md` + the chosen type's reference || "Redraw this Excalidraw sketch for my deck" | `SKILL.md` + `references/import-excalidraw.md` + `references/output-spec.md` + the chosen type's reference |-| Routine static diagram-making (any of the 39 visual types) | Only `SKILL.md` + that one type's reference |+| Routine static diagram-making (any visual type) | Only `SKILL.md` + that one type's reference |No matter how many types exist, the agent only reads the one you need. Add a new type tomorrow and nothing else changes.diff --git a/scripts/test-verify-docs-sync.py b/scripts/test-verify-docs-sync.pyindex 92e7bf8..03688d3 100644--- a/scripts/test-verify-docs-sync.py+++ b/scripts/test-verify-docs-sync.py@@ -1192,6 +1192,78 @@ diagram-design/f"a count unrelated to the taxonomy was rejected for {benign!r}: {errors}")+ # README is the same surface by another route: it carries the count in+ # prose a user reads before installing, and it went stale there — it+ # said 39 while the selection table shipped 40 — because nothing checked+ # it. It points at SKILL.md §3 instead, and the two phrasings the real+ # file used are covered so the wording cannot come back.+ readme_routed = (+ "# Diagram Design\n\n"+ "Every visual type ships in three static variants; see `SKILL.md` §3.\n"+ )+ readme.write_text(readme_routed, encoding="utf-8")+ errors = []+ verify.check_type_counts(errors, root)+ if errors:+ raise AssertionError(f"a count-free README failed: {errors}")++ for stale in (+ "39 editorial diagram types for Claude Code.\n",+ "All 39 visual types ship in three static variants.\n",+ "Open the gallery to see all 39 diagrams.\n",+ "deterministic 39-type PNG catalog renderer\n",+ "any of the 39 visual types\n",+ ):+ readme.write_text(readme_routed + stale, encoding="utf-8")+ errors = []+ verify.check_type_counts(errors, root)+ if (+ len(errors) != 1+ or "README.md" not in errors[0]+ or "hardcodes the visual-type count" not in errors[0]+ ):+ raise AssertionError(+ f"a hardcoded README count was not reported for {stale!r}: {errors}"+ )++ # README carries ordinary numbers that are not the taxonomy count, and+ # the two added phrasings must not start rejecting them. The last four+ # are the shapes those phrasings would overmatch without their+ # single-digit floor: `2-type` and `all 3 diagrams` are ordinary prose+ # in a repository that ships 40 types, and this gate blocks a pull+ # request, so rejecting them is worse than missing a stale count. The+ # two-digit cases prove the guard is contextual rather than relying on+ # a numeral-length heuristic.+ for benign in (+ "Renders all 3 variants from one source.\n",+ "The gallery lists 2 file types.\n",+ "Allows 24 nodes per diagram.\n",+ "Runs on Python 3.11 and 3.12.\n",+ "A 2-type system is enough here.\n",+ "A 10-type taxonomy is enough here.\n",+ "See all 3 diagrams in the appendix.\n",+ "See all 12 diagrams in the appendix.\n",+ "The 4-type taxonomy of joins.\n",+ "All 5 diagrams are inlined.\n",+ ):+ readme.write_text(readme_routed + benign, encoding="utf-8")+ errors = []+ verify.check_type_counts(errors, root)+ if errors:+ raise AssertionError(+ f"a README count unrelated to the taxonomy was rejected for {benign!r}: "+ f"{errors}"+ )++ # A missing README is named rather than skipped, the way a missing+ # command is.+ readme.unlink()+ errors = []+ verify.check_type_counts(errors, root)+ if errors != ["type-count surface is missing: README.md"]:+ raise AssertionError(f"a missing README surface was not reported: {errors}")+ readme.write_text(readme_routed, encoding="utf-8")+# Restore the routed wording first: leaving a stale count behind lets# this case pass on the wrong error and never names the missing surface.mermaid.write_text(routed, encoding="utf-8")diff --git a/scripts/verify-docs-sync.py b/scripts/verify-docs-sync.pyindex 4a07877..1303be0 100644--- a/scripts/verify-docs-sync.py+++ b/scripts/verify-docs-sync.py@@ -20,7 +20,9 @@ Fourteen drift classes, each of which has shipped before:8. Every support path a strict skill bundler can extract from SKILL.md must bea literal file shipped inside the skill package.9. Import command surfaces must route to the visual-type taxonomy instead of- hardcoding a count that becomes stale when a type is added.+ hardcoding a count that becomes stale when a type is added. README is the+ same surface by another route — it carries the count in prose a user reads+ before installing — so it is held to the same rule.10. The High-Level reproducibility checklist must agree with its canvas formulaand retain sequential numbering.11. The canonical dark Line example must keep the dark-skin tokens and canvas.@@ -478,12 +480,17 @@ def check_factory_install_surface(errors: list[str], root: Path) -> None:# adds a type, and is the one file such a PR has no reason to open. Both import# commands were left at 27 while the selection table moved on.# The phrasing varies, so match the count rather than the one sentence it went-# stale in. Two forms carry it: the bare count standing in for the table-# (`one of the 27`), and a count attached to the taxonomy noun with room for+# stale in. Four forms carry it: the bare count standing in for the table+# (`one of the 27`), a count attached to the taxonomy noun with room for# adjectives between, in either order (`28 visual types`, `28 supported visual-# diagram types`, `28 types of visual diagrams`). Those clauses insist on that-# noun so an unrelated quantity — `accepts 2 file types` — is not rejected by a-# gate about the visual taxonomy.+# diagram types`, `28 types of visual diagrams`), a count bound to the noun as+# a hyphenated modifier (`39-type catalog`), and a count quantifying the whole+# set (`all 39 diagrams`). The first three insist on that noun so an unrelated+# quantity — `accepts 2 file types` — is not rejected by a gate about the+# visual taxonomy. The last two are checked only in a sentence with a nearby+# visual-taxonomy cue (`catalog`, `gallery`, `render`, `shipped`, and so on),+# so ordinary prose such as `a 10-type taxonomy` and `all 12 diagrams in the+# appendix` remains valid while the README's stale phrases stay covered.## Every gap is whitespace-tolerant because both commands already wrap the# sentence that carried the stale count, so a count can land just after the@@ -492,16 +499,23 @@ def check_factory_install_surface(errors: list[str], root: Path) -> None:## Word-form numerals (`Twenty-eight visual types`) are out of scope; README and# the docstring say "numeral" so the gate does not claim more than it checks.+# README carried one of those (`Thirty-nine visual types`); it is count-free now+# but nothing here would catch it coming back in words.+_COUNT_CONTEXT = r"visual|catalog|gallery|render(?:er|ing)?|example|shipped|static|variant"+_COUNT_SENTENCE = rf"[^.!?\n]*\b(?:{_COUNT_CONTEXT})\b"HARDCODED_COUNT_RE = re.compile(r"one\s+of\s+(?:the\s+)?\d+\b"r"|\b\d+\s+(?:[\w-]+\s+){0,2}?(?:visual|diagram)[\s-]+types?\b"- r"|\b\d+\s+types?\s+of\s+(?:[\w-]+\s+){0,2}?diagrams?\b",+ r"|\b\d+\s+types?\s+of\s+(?:[\w-]+\s+){0,2}?diagrams?\b"+ rf"|(?={_COUNT_SENTENCE})[^.!?\n]*?\b\d+-type\b"+ rf"|(?={_COUNT_SENTENCE})[^.!?\n]*?\ball\s+\d+\s+diagrams?\b",re.IGNORECASE,)COUNT_SURFACES = (Path("commands/import-drawio.md"),Path("commands/import-mermaid.md"),Path("commands/import-excalidraw.md"),+ Path("README.md"),)