Skip to content

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.

feat(output-spec): add print-a3-landscape size preset (#248)

Rosen Velikovda6c92c14b29
diff --git a/README.md b/README.md
index 7a12a61..ce16b61 100644
--- a/README.md
+++ b/README.md
@@ -327,7 +327,7 @@ The point isn't conversion, it's **fitting the output to where it's going**. Sam
| Dial | Options | What it changes |
|---|---|---|
| **Format** | `html` · `svg` · `png` · `html+png` | The deliverable. SVG for Figma, PNG for slides, HTML for the web. |
-| **Size** | `doc-inline` · `doc-wide` · `slide-16x9` · `slide-4x3` · `social-og` · `social-square` · `print-a4-landscape` · `print-letter-landscape` · `fit` | The `viewBox` **and the type ramp** — a projected slide gets 16px node names, not 12px. |
+| **Size** | `doc-inline` · `doc-wide` · `slide-16x9` · `slide-4x3` · `social-og` · `social-square` · `print-a4-landscape` · `print-a3-landscape` · `print-letter-landscape` · `fit` | The `viewBox` **and the type ramp** — a projected slide gets 16px node names, not 12px. |
| **Detail** | `faithful` (≤24 nodes, zoned) · `balanced` (≤12) · `simplified` (≤7) | How much of the source survives, via a fixed degrade ladder — decorations, then duplicates, then leaf clusters, then infrastructure. |
| **Audience** | `engineer` · `mixed` · `executive` | The *wording*, not the count. `Auth Service / JWT · RS256 · :8443` → `Auth Service / token check` → `Sign-in`. |
diff --git a/commands/import-drawio.md b/commands/import-drawio.md
index 403727a..2db8879 100644
--- a/commands/import-drawio.md
+++ b/commands/import-drawio.md
@@ -28,7 +28,7 @@ Accepts `.drawio`, `.drawio.xml`, `.xml`, `.drawio.png`, and `.drawio.svg`.
## Flags
- `--format` — `html` (default), `svg`, `png`, or `html+png`. Non-HTML formats are produced from the HTML via `references/export.md`, never hand-authored.
-- `--size` — any preset in `output-spec.md` §2: `doc-inline`, `doc-wide`, `slide-16x9`, `slide-4x3`, `social-og`, `social-square`, `print-a4-landscape`, `print-letter-landscape`, `fit`.
+- `--size` — any preset in `output-spec.md` §2: `doc-inline`, `doc-wide`, `slide-16x9`, `slide-4x3`, `social-og`, `social-square`, `print-a4-landscape`, `print-a3-landscape`, `print-letter-landscape`, `fit`.
- `--detail` — `faithful` (≤24 nodes, zoned), `balanced` (≤12), `simplified` (≤7).
- `--audience` — `engineer`, `mixed`, `executive`. Governs wording, not element count.
- `--type` — force a diagram type instead of inferring it.
diff --git a/commands/import-excalidraw.md b/commands/import-excalidraw.md
index 4663a16..801feb2 100644
--- a/commands/import-excalidraw.md
+++ b/commands/import-excalidraw.md
@@ -28,7 +28,7 @@ Accepts `.excalidraw` and `.excalidraw.json` scenes. PNG/SVG exports are rejecte
## Flags
- `--format` — `html` (default), `svg`, `png`, or `html+png`. Non-HTML formats are produced from HTML through `references/export.md`.
-- `--size` — any preset in `output-spec.md` §2: `doc-inline`, `doc-wide`, `slide-16x9`, `slide-4x3`, `social-og`, `social-square`, `print-a4-landscape`, `print-letter-landscape`, `fit`.
+- `--size` — any preset in `output-spec.md` §2: `doc-inline`, `doc-wide`, `slide-16x9`, `slide-4x3`, `social-og`, `social-square`, `print-a4-landscape`, `print-a3-landscape`, `print-letter-landscape`, `fit`.
- `--detail` — `faithful` (≤24 nodes, zoned), `balanced` (≤12), `simplified` (≤7).
- `--audience` — `engineer`, `mixed`, `executive`. Governs wording, not element count.
- `--type` — force a diagram type instead of inferring it.
diff --git a/commands/import-mermaid.md b/commands/import-mermaid.md
index 5579da2..37bb43a 100644
--- a/commands/import-mermaid.md
+++ b/commands/import-mermaid.md
@@ -28,7 +28,7 @@ Accepts `.mmd`, `.mermaid`, and Markdown files containing fenced `mermaid` block
## Flags
- `--format` — `html` (default), `svg`, `png`, or `html+png`. Non-HTML formats are produced from HTML through `references/export.md`.
-- `--size` — any preset in `output-spec.md` §2: `doc-inline`, `doc-wide`, `slide-16x9`, `slide-4x3`, `social-og`, `social-square`, `print-a4-landscape`, `print-letter-landscape`, `fit`.
+- `--size` — any preset in `output-spec.md` §2: `doc-inline`, `doc-wide`, `slide-16x9`, `slide-4x3`, `social-og`, `social-square`, `print-a4-landscape`, `print-a3-landscape`, `print-letter-landscape`, `fit`.
- `--detail` — `faithful` (≤24 nodes, zoned), `balanced` (≤12), `simplified` (≤7).
- `--audience` — `engineer`, `mixed`, `executive`. Governs wording, not element count.
- `--type` — force a diagram type instead of inferring it.
diff --git a/scripts/test-verify-docs-sync.py b/scripts/test-verify-docs-sync.py
index 2bf0b2a..25ae832 100644
--- a/scripts/test-verify-docs-sync.py
+++ b/scripts/test-verify-docs-sync.py
@@ -429,6 +429,82 @@ def check_heading_syntax(verify) -> None:
print("OK heading syntax: closing hashes stripped, fenced lines skipped")
+# Spelled out here rather than read from the verifier, with the separator each
+# surface puts between presets: a surface dropped from the verifier's own list
+# must fail a test, not shrink it.
+SIZE_SURFACES = {
+ "skills/diagram-design/SKILL.md": " · ",
+ "README.md": " · ",
+ "commands/import-drawio.md": ", ",
+ "commands/import-mermaid.md": ", ",
+ "commands/import-excalidraw.md": ", ",
+}
+OUTPUT_SPEC = "skills/diagram-design/references/output-spec.md"
+LETTER_ROW = "| `print-letter-landscape` | `0 0 1056 816` |"
+A2_ROW = "| `print-a2-landscape` | `0 0 2244 1584` | ~1.41:1 | @3 | print | A2 |\n"
+
+
+def size_drift(relative: str, drift: str) -> str:
+ return f"{relative} size presets drift from the output-spec.md size table: {drift}"
+
+
+def check_size_preset_surfaces(verify) -> None:
+ """Every size-selection surface names exactly the output-spec presets."""
+ with tempfile.TemporaryDirectory(prefix="verify-docs-sync-sizes-") as temp_dir:
+ root = Path(temp_dir)
+ for relative in (OUTPUT_SPEC, *SIZE_SURFACES):
+ target = root / relative
+ target.parent.mkdir(parents=True, exist_ok=True)
+ target.write_bytes((ROOT / relative).read_bytes())
+ errors = run_checks(root, verify.check_size_preset_surfaces)
+ if errors:
+ raise AssertionError(f"shipped size-preset surfaces failed: {errors}")
+
+ for relative, separator in SIZE_SURFACES.items():
+ path = root / relative
+ original = mutate(path, f"{separator}`print-letter-landscape`", "")
+ errors = run_checks(root, verify.check_size_preset_surfaces)
+ expected = [size_drift(relative, "missing print-letter-landscape")]
+ if errors != expected:
+ raise AssertionError(f"{relative} dropping a preset was not reported: {errors}")
+ path.write_bytes(original)
+
+ spec = root / OUTPUT_SPEC
+ original = mutate(spec, LETTER_ROW, A2_ROW + LETTER_ROW)
+ errors = run_checks(root, verify.check_size_preset_surfaces)
+ expected = [
+ size_drift(relative, "missing print-a2-landscape") for relative in SIZE_SURFACES
+ ]
+ if errors != expected:
+ raise AssertionError(f"a new output-spec preset was not propagated: {errors}")
+ spec.write_bytes(original)
+
+ command = root / "commands/import-mermaid.md"
+ original = mutate(command, "`fit`.", "`fit`, `print-a2-landscape`.")
+ errors = run_checks(root, verify.check_size_preset_surfaces)
+ expected = [size_drift("commands/import-mermaid.md", "extra print-a2-landscape")]
+ if errors != expected:
+ raise AssertionError(f"an unknown preset on a surface was not reported: {errors}")
+ command.write_bytes(original)
+
+ readme = root / "README.md"
+ original = mutate(readme, "`doc-inline` · `doc-wide`", "`doc-wide` · `doc-inline`")
+ errors = run_checks(root, verify.check_size_preset_surfaces)
+ expected = [size_drift("README.md", "presets out of output-spec.md order")]
+ if errors != expected:
+ raise AssertionError(f"reordered presets were not reported: {errors}")
+ readme.write_bytes(original)
+
+ skill = root / "skills/diagram-design/SKILL.md"
+ original = mutate(skill, "| **Size** |", "| **Canvas** |")
+ errors = run_checks(root, verify.check_size_preset_surfaces)
+ expected = ["skills/diagram-design/SKILL.md has no size-preset list"]
+ if errors != expected:
+ raise AssertionError(f"a lost size-preset list was not reported: {errors}")
+ skill.write_bytes(original)
+ print("OK size presets: every size-selection surface names the output-spec presets")
+
+
def main() -> int:
verify = load_verify_module()
@@ -1503,11 +1579,12 @@ diagram-design/
check_title_font_link(verify)
check_style_guide_anchors(verify)
check_heading_syntax(verify)
+ check_size_preset_surfaces(verify)
print(
"PASS: docs sync checks references, style-guide anchors, asset citations, "
"strict-bundler packaging, "
- "routing surfaces, Factory install contract, type-count routing, High-Level invariants, "
+ "routing surfaces, size-preset surfaces, Factory install contract, type-count routing, High-Level invariants, "
"font-link parity, the Cyrillic title fallback order, the type-ramp contract, "
"and gallery guards (parent/variant model, contiguous ordinals)"
)
diff --git a/scripts/verify-docs-sync.py b/scripts/verify-docs-sync.py
index 9e1895f..69248b2 100644
--- a/scripts/verify-docs-sync.py
+++ b/scripts/verify-docs-sync.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python3
"""Verify that routing and browsing surfaces stay in sync with the skill.
-Fourteen drift classes, each of which has shipped before:
+Fifteen drift classes. The first fourteen have each shipped before; the
+fifteenth nearly did (#217):
1. The SKILL.md frontmatter description is the only text an agent sees before
deciding to load the skill — every visual type in the selection table must
@@ -36,6 +37,9 @@ Fourteen drift classes, each of which has shipped before:
14. Every --font-serif in a template must reach 'Noto Serif' before any CJK
serif face, which Google Fonts also slices Cyrillic into, and the
template's own font link must request it.
+15. Every surface that lists the size presets for selection — the SKILL.md
+ and README output-dial tables and the three import commands — must name
+ exactly the presets in the output-spec.md size table, in its order.
"""
from __future__ import annotations
@@ -79,6 +83,16 @@ ROUTING_SURFACES = {
Path("prompts/profile.md"): "references/profiles.md",
Path("prompts/doctor.md"): "references/doctor.md",
}
+# Surfaces that enumerate every size preset for selection, and the marker of
+# the line that carries the list. The output-spec.md size table is the source.
+SIZE_PRESET_TABLE_HEADING = "## 2. Size"
+SIZE_PRESET_SURFACES = {
+ Path("skills/diagram-design/SKILL.md"): "| **Size** |",
+ Path("README.md"): "| **Size** |",
+ Path("commands/import-drawio.md"): "- `--size` — any preset in `output-spec.md` §2:",
+ Path("commands/import-mermaid.md"): "- `--size` — any preset in `output-spec.md` §2:",
+ Path("commands/import-excalidraw.md"): "- `--size` — any preset in `output-spec.md` §2:",
+}
FACTORY_MANIFEST = Path(".factory-plugin/plugin.json")
FACTORY_MARKETPLACE = Path(".factory-plugin/marketplace.json")
SUPPORT_DIRECTORIES = frozenset(
@@ -446,6 +460,54 @@ def check_routing_surfaces(errors: list[str], root: Path) -> None:
)
+def spec_size_presets(spec_markdown: str) -> list[str]:
+ """Preset names from the output-spec.md size table, in table order."""
+ presets: list[str] = []
+ for cells in table_rows(section(spec_markdown, SIZE_PRESET_TABLE_HEADING)):
+ name = re.match(r"`([a-z0-9-]+)`", cells[0])
+ if name:
+ presets.append(name.group(1))
+ return presets
+
+
+def surface_size_presets(markdown: str, marker: str) -> list[str] | None:
+ """Presets named on the surface line that starts with *marker*."""
+ for line in markdown.splitlines():
+ if line.startswith(marker):
+ listed = line[len(marker) :].split("|")[0]
+ return re.findall(r"`([a-z0-9-]+)`", listed)
+ return None
+
+
+def check_size_preset_surfaces(errors: list[str], root: Path) -> None:
+ spec = root / "skills/diagram-design/references/output-spec.md"
+ presets = spec_size_presets(spec.read_text(encoding="utf-8"))
+ if not presets:
+ errors.append("output-spec.md size table names no presets")
+ return
+ for relative, marker in SIZE_PRESET_SURFACES.items():
+ path = root / relative
+ if not path.is_file():
+ errors.append(f"size-preset surface is missing: {relative.as_posix()}")
+ continue
+ listed = surface_size_presets(path.read_text(encoding="utf-8"), marker)
+ if listed is None:
+ errors.append(f"{relative.as_posix()} has no size-preset list")
+ continue
+ if listed == presets:
+ continue
+ missing = [name for name in presets if name not in listed]
+ extra = [name for name in listed if name not in presets]
+ drift = [f"missing {name}" for name in missing]
+ drift += [f"extra {name}" for name in extra]
+ if not drift:
+ drift = ["presets out of output-spec.md order"]
+ errors.append(
+ f"{relative.as_posix()} size presets drift from the output-spec.md size table: "
+ + ", ".join(drift)
+ )
+
+
def check_factory_install_surface(errors: list[str], root: Path) -> None:
markdown = (root / "README.md").read_text(encoding="utf-8")
manifest = json.loads((root / FACTORY_MANIFEST).read_text(encoding="utf-8"))
@@ -1433,6 +1495,7 @@ def main() -> int:
errors, OUTPUT_SPEC_REFERENCE.read_text(encoding="utf-8"), ROOT
)
check_routing_surfaces(errors, ROOT)
+ check_size_preset_surfaces(errors, ROOT)
check_export_font_parity(errors, ROOT)
check_title_fallback_order(errors, ROOT)
if errors:
@@ -1443,7 +1506,7 @@ def main() -> int:
print(
"OK docs sync: description hooks, gallery reachability, README tree, "
"reference links and style-guide anchors, asset citations, packaged support "
- "files, routing surfaces, "
+ "files, routing surfaces, size-preset surfaces, "
"manifest descriptions, Factory install contract, type-count routing, "
"High-Level invariants, onboarding trust boundary, Line dark-skin contract, "
"font-link parity, title fallback order, type-ramp contract, registered legacy "
diff --git a/scripts/verify-drawio-import.py b/scripts/verify-drawio-import.py
index 38c27eb..93569d2 100644
--- a/scripts/verify-drawio-import.py
+++ b/scripts/verify-drawio-import.py
@@ -476,6 +476,7 @@ def check_docs() -> None:
"social-og",
"social-square",
"print-a4-landscape",
+ "print-a3-landscape",
"print-letter-landscape",
"`fit`",
):
diff --git a/skills/diagram-design/SKILL.md b/skills/diagram-design/SKILL.md
index 2c9eb02..4e5adc3 100644
--- a/skills/diagram-design/SKILL.md
+++ b/skills/diagram-design/SKILL.md
@@ -547,7 +547,7 @@ Set these four import decisions **before** drawing. Full spec: [output-spec.md](
| Dial | Options | Default |
|---|---|---|
| **Format** | `html` · `svg` · `png` · `html+png` | `html` |
-| **Size** | `doc-inline` · `doc-wide` · `slide-16x9` · `slide-4x3` · `social-og` · `social-square` · `print-a4-landscape` · `print-letter-landscape` · `fit` | `doc-inline` |
+| **Size** | `doc-inline` · `doc-wide` · `slide-16x9` · `slide-4x3` · `social-og` · `social-square` · `print-a4-landscape` · `print-a3-landscape` · `print-letter-landscape` · `fit` | `doc-inline` |
| **Detail** | `faithful` (≤24 nodes, zoned) · `balanced` (≤12) · `simplified` (≤7) | `balanced` |
| **Audience** | `engineer` · `mixed` · `executive` — governs wording, not count | `mixed` |
diff --git a/skills/diagram-design/references/output-spec.md b/skills/diagram-design/references/output-spec.md
index 4829df2..90a1c8b 100644
--- a/skills/diagram-design/references/output-spec.md
+++ b/skills/diagram-design/references/output-spec.md
@@ -50,6 +50,7 @@ The preset sets the SVG `viewBox`. Every value below is divisible by 4, so the g
| `social-og` | `0 0 1200 632` | ~1.9:1 | 2400×1264 | presentation | Link preview card |
| `social-square` | `0 0 1080 1080` | 1:1 | 2160×2160 | presentation | Feed post, carousel |
| `print-a4-landscape` | `0 0 1120 792` | ~1.41:1 | @3 → 3360×2376 | print | A4 landscape, ~10mm margins at 96dpi |
+| `print-a3-landscape` | `0 0 1584 1120` | ~1.41:1 | @3 → 4752×3360 | print | A3 landscape, ~10mm margins at 96dpi |
| `print-letter-landscape` | `0 0 1056 816` | ~1.29:1 | @3 → 3168×2448 | print | US Letter landscape |
| `fit` | derived from content | any | @2 | standard | Vector hand-off; no fixed frame |