| name | diagram-design |
| description | Create technical and product diagrams โ architecture, flowchart, sequence, state machine, ER / data model, timeline, swimlane, quadrant, nested, tree, org chart, layer stack, venn, pyramid โ as HTML with inline SVG. Use whenever a slide or doc needs a structural-relationship visual (์์คํ
๊ตฌ์ฑ๋/์ํคํ
์ฒ/ํ๋ก์ฐ์ฐจํธ/์์๋/์ํ์ค/์ํ๋/ER/ํ์๋ผ์ธ/์ค์๋ ์ธ/์ฌ๋ถ๋ฉด/ํธ๋ฆฌ/์กฐ์ง๋/๊ณ์ธต๋/๋ฒค๋ค์ด์ด๊ทธ๋จ/ํผ๋ผ๋ฏธ๋ยทํผ๋). Inside the slide-html PPTX pipeline this is the canonical diagram author โ it emits a diagram-only HTML that gets rendered to a PNG <img> slot and skinned to the active /slide preset (see ยง0.5). Standalone, ships a neutral editorial skin + annotation-callout and sketchy primitives. |
| license | MIT |
| metadata | {"version":"1.0"} |
Diagram Design
Create visual diagrams as self-contained HTML files with inline SVG and CSS, following an opinionated editorial design system.
Fourteen diagram types. One shared design system, complexity budget, and taste gate. Type-specific conventions live in references/ and are loaded only when you pick a type.
0.5 slide-html ์์์ ์คํ๋ ๋ (์ด ๋ฆฌํฌ ์ ์ฉ โ ํ๋
, ์ต์ฐ์ )
์ด ์คํฌ์ slide-html(editable PPTX ๋น๋)์ ํตํฉ๋ผ ์๋ค. /slide ํ์ดํ๋ผ์ธ ์์์, ๋๋ ์ด ๋ฆฌํฌ์ ๋ฐํฌ(output/<project>-pptx/)์ ๋ค์ด์ด๊ทธ๋จ์ ๋ฃ์ผ๋ ค๊ณ ํธ์ถ๋๋ค๋ฉด, ์๋๊ฐ ยง0~ยง11๋ณด๋ค ์ฐ์ ํ๋ค:
- ์จ๋ณด๋ฉ/first-run ๊ฒ์ดํธ(ยง0)๋ฅผ ๊ฑด๋๋ด๋ค. ๋ธ๋๋๋ ์ด๋ฏธ ์ ํด์ ธ ์๋ค โ ํ์ฑ ํ๋ฆฌ์
(
../slide/assets/design-systems/active.json, /slide Step 0๊ฐ ์ ์ธ)์ด ๊ณง ์คํจ์ด๋ค. style-guide.md๋ฅผ ์น์ฌ์ดํธ์์ ์๋ก ๊ตฝ์ง ์๋๋ค.
- ์ยทํฐํธ๋ฅผ hex๋ก ์ฐ์ง ์๋๋ค. ๋ฐํฌ์
design-system/colors_and_type.css๋ฅผ <link> ํ๊ณ , SVG์์ style="fill:var(--accent)" ์์ผ๋ก ํ๋ฆฌ์
CSS ๋ณ์๋ง ์ฐธ์กฐํ๋ค(๋ ๋ ์์ ์ ํ์ฑ ํ๋ฆฌ์
๊ฐ์ผ๋ก ํด์). ์๋ฏธ์ญโ๋ณ์ ๋งคํํ๋ ํตํฉ ๊ณ์ฝ ๋ฌธ์์ ์๋ค.
- ์ฐ์ถ๋ฌผ์ standalone ์๋ํ ๋ฆฌ์ผ ํ์ด์ง๊ฐ ์๋๋ผ "๋ค์ด์ด๊ทธ๋จ๋ง ๋ HTML" ์ด๋ค(์ฌ๋ผ์ด๋ ์ ๋ชฉ/์นด๋/ํธํฐ chrome ๊ธ์ง, ์ ์ฒด paper ๋ฐฐ๊ฒฝ ์ฌ๊ฐํ ๊ธ์ง=ํฌ๋ช
). ๊ทธ HTML์ Playwright๋ก PNG๋ก ๋ ๋ํด
<img> ์ฌ๋กฏ์ผ๋ก ์ฌ๋ผ์ด๋์ ์๋ฒ ๋ํ๋ค โ inline <svg>๋ html2pptx๊ฐ ๋ฒ๋ฆฌ๊ธฐ ๋๋ฌธ(ํธ์ง ๊ฐ๋ฅํ ๋ํ์ผ๋ก ์ ๋ค์ด๊ฐ).
- ์๊ตฌ ๋ฝ ์ค์: ๋จ์ผ ์ก์ผํธ(focal โค2) ยท ์ด๋ชจ์ง ๊ธ์ง ยท ๊ทธ๋ผ๋์ธํธ/๊ธ๋ก์ฐ ๊ธ์ง. diagram-design ์์ฒด ๊ทธ๋ผ๋ง(๋ณต์ก๋ ์์ฐยท4px ๊ทธ๋ฆฌ๋ยท๋ฐ์ค ์ ํ์ดํยท๋ผ๋ฒจ ๋ง์คํนยทํ๋จ legend stripยท๊ทธ๋ฆผ์ ๊ธ์ง)๋ ํจ๊ป.
๋จ์ผ ์ง์
์ โ ์ ์ฒด ๊ณ์ฝยท๋จ๊ณยท๋งคํํยท๋ ๋ ๋ช
๋ น์ ์ฌ๊ธฐ ํ ๊ณณ:
../slide/references/diagram-slots.md
๊ทธ ๋ฌธ์๋ฅผ ๋จผ์ Read ํ๊ณ ๋ฐ๋ฅธ๋ค. ํ์
๋ณ ๋ ์ด์์ ๊ด๋ก๋ ํ์๋๋ก references/type-<name>.md์์ ๊ฐ์ ธ์จ๋ค.
๋ฆฌํฌ ๋ฐ(์ผ๋ฐ ๋ฌธ์ยทREADMEยท๋ธ๋ก๊ทธ์ฉ standalone ๋ค์ด์ด๊ทธ๋จ)์์ ํธ์ถ๋๋ค๋ฉด ์ด ยง0.5๋ฅผ ๋ฌด์ํ๊ณ ยง0๋ถํฐ ํ์๋๋ก ์งํํ๋ค.
0. First-time setup โ style guide gate
slide-html ์์์๋ ์ด ๊ฒ์ดํธ๋ฅผ ๊ฑด๋๋ด๋ค (ยง0.5 ์ฐธ์กฐ). ์๋๋ standalone ์ฌ์ฉ ์์๋ง.
Before generating your first diagram in a new project, verify the style guide has been customized.
Open references/style-guide.md and check the default tokens. If they're still the shipped defaults (paper #faf7f2, ink #1c1917, accent #b5523a rust), pause and ask the user:
"This is your first Schematic in this project. The style guide is still at the default (neutral stone + rust). Do you want to customize it to match your brand first? Options: (a) run onboarding โ I'll pull colors and fonts from your website, (b) paste your tokens manually, (c) proceed with the default for now."
Then branch:
- (a) โ follow
references/onboarding.md to fetch the site, extract palette + fonts, propose a diff, and write style-guide.md.
- (b) โ accept the user's tokens and write them into
style-guide.md under a new "Custom tokens" section.
- (c) โ proceed; optionally remind the user they can run onboarding later.
Once the style guide has been customized (or the user explicitly opted for default), skip this gate on subsequent runs. A simple way to detect customization: if the accent value in style-guide.md differs from #b5523a, assume custom.
Don't silently ship default-skinned diagrams into a branded project โ that's the failure mode this gate exists to prevent.
1. Philosophy
The highest-quality move is usually deletion.
From .impeccable.md: "Confident restraint. Earn every element. One color accent, two families, a small spacing vocabulary. If removing it wouldn't hurt the page, remove it."
Applied to schematics:
- Every node represents a distinct idea. Two nodes that always travel together are one node.
- Every connection carries information. If the relationship is obvious from layout, remove the line.
- Coral is editorial, not a flag. 1โ2 focal nodes per diagram. Using it on 5 nodes erases the signal.
- The schematic isn't done when everything is added. It's done when nothing can be removed.
Target density: 4/10. Enough to be technically complete. Not so dense it needs a guide. Above 9 nodes, it's probably two diagrams.
2. When to Use
Use for any of the 14 diagram types (ยง3) when a reader will learn more from a visual than from prose, a table, or a bulleted list.
Don't use for:
- Quick unicode diagrams โ use wiretext.
- Lists of things โ table or bullets.
- Simple before/after โ table.
- One-shape "diagrams" โ just write the sentence.
Before drawing, ask: Would the reader learn more from this than from a well-written paragraph? If no, don't draw.
3. Diagram Types
Selection guide
Rules of thumb:
- If a 3-column table communicates the same thing, pick the table.
- If you're combining two types, pick the dominant axis โ don't hybridize grammars.
- If you're past the complexity budget (
references/diagram-grammar.md), split into an overview + detail.
Always load the relevant references/type-*.md before drawing โ it contains layout conventions, anti-patterns, and example files for that type.
4. Universal Anti-patterns
These mark "AI slop" schematics of any type:
| Anti-pattern | Why it fails |
|---|
| Dark mode + cyan/purple glow | Looks "technical" without design decisions |
| JetBrains Mono as blanket "dev" font | Mono is for technical content โ ports, commands, URLs. Names go in Geist sans. |
| Identical boxes for every node | Erases hierarchy |
| Legend floating inside the diagram area | Collides with nodes |
| Arrow labels with no masking rect | Bleeds through the line |
Vertical writing-mode text on arrows | Unreadable |
| 3 equal-width summary cards as default | Generic grid โ vary widths |
| Shadow on any element | Shadows are out. Borders are in. |
rounded-2xl on boxes | Max radius 6โ10px or none |
| Coral on every "important" node | Coral is 1โ2 editorial accents, not a signaling system |
Type-specific anti-patterns live in each references/type-*.md.
5. Design System
The design system is skinnable. All colors, typography, and tokens live in a single source of truth โ references/style-guide.md. This file describes semantic roles (paper, ink, muted, accent, link, โฆ). The default skin is a cool editorial palette (white-smoke paper, jet-black ink, atomic-tangerine accent, blue-slate muted, silver hairlines); to apply your own brand, either edit style-guide.md directly or run the URL-based flow described in references/onboarding.md.
When specs below or in type references mention "ink", "accent", "muted", etc., look up the current hex value in style-guide.md.
The full design-vocabulary tables โ semantic roles, node type โ fill/stroke treatment, typography spec, and the font stack โ live in references/style-guide.md. Read it before assigning colors or fonts.
Focal rule: accent goes on 1โ2 elements max. Everything else is ink / muted / soft. If you're tempted to accent 4 things, you haven't decided what's focal yet.
6โ8. Universal Diagram Grammar
์๊ณก(๋๋ก์) ์ ์ references/diagram-grammar.md๋ฅผ ๋ฐ๋์ ์ฝ๋๋ค. Core SVG primitives (background, arrow markers, node-box pattern, arrow-label masking, bottom legend strip), the 4px grid, the complexity budget, page layout, and the summary-card pattern all live there โ every rule binds exactly as before.
9. Pre-Output Checklist (Taste Gate)
Run before producing any diagram.
Type fit:
Remove test:
Signal:
Technical:
Typography:
10. Templates & Variants
Every diagram ships in three variants (see assets/):
| Variant | File pattern | When to use |
|---|
| Minimal light (default) | template.html, example-<type>.html | Screenshot-ready. Diagram + title. Warm paper. |
| Minimal dark | template-dark.html, example-<type>-dark.html | Dark mode sites, slides, high-contrast posts. |
| Full editorial | template-full.html, example-<type>-full.html | Long-form posts where the diagram is the hero. |
| Consultant special (quadrant only) | example-quadrant-consultant.html | BCG/McKinsey-style 2ร2 scenario matrix. Clinical sans-serif, white bg, bold blue double-ended axes, named scenario cells. See type-quadrant.md. |
Sketchy variant (optional, applied to any of the above) โ see primitive-sketchy.md. SVG turbulence filter wobbles strokes for a hand-drawn feel. Good for essays, not for technical docs.
To create a new diagram
- Copy the variant closest to what you want (
template.html for minimal, template-full.html for cards).
- Load the matching
references/type-<name>.md for layout conventions.
- Replace the eyebrow, h1, and SVG body.
- Run the ยง9 taste gate.
11. Output
Always produce a single self-contained .html file:
- Embedded CSS (no external except Google Fonts)
- Inline SVG (no external images)
- No JavaScript required
Renders correctly in any modern browser.