commit 53bd8dde0f140f9528f66b93e75b9e438cfab353 Author: Cathryn Lavery Date: Thu Apr 16 13:06:10 2026 -0500 Initial release: diagram-design v1.0 Thirteen editorial diagram types (architecture, flowchart, sequence, state, ER, timeline, swimlane, quadrant, nested, tree, layers, venn, pyramid) as self-contained HTML files with inline SVG. Progressive disclosure: lean SKILL.md points to per-type references. Neutral stone+rust default skin, first-run gate that prompts users to customize the style guide from their own website, URL-based onboarding, annotation-callout primitive, sketchy filter variant, live gallery at assets/index.html. diff --git a/README.md b/README.md new file mode 100644 index 0000000..41fbfac --- /dev/null +++ b/README.md @@ -0,0 +1,214 @@ +# Diagram Design + +**I wanted good-looking diagrams for my blog posts.** + +I write at [littlemight.com](https://littlemight.com). 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. 13 types, editorial quality, matches 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. + +--- + +## What it makes + +All 13 diagrams ship in three variants: minimal light, minimal dark, and full-editorial. Open any of them directly in a browser — no build step, no JS, no external images. + + + + + + + + + + + + + + + + + + + + + + + + + +
Architecture
Architecture
Components + connections
Flowchart
Flowchart
Decision logic
Sequence
Sequence
Messages over time
State machine
State machine
States + transitions
ER / data model
ER / data model
Entities + fields
Timeline
Timeline
Events on an axis
Swimlane
Swimlane
Cross-functional flow
Quadrant
Quadrant
Two-axis positioning
Nested
Nested
Hierarchy by containment
Tree
Tree
Parent → children
Layers
Layer stack
Stacked abstractions
Venn
Venn
Set overlap
Pyramid
Pyramid / funnel
Ranked hierarchy or conversion drop-off
+ +**Browse the live gallery:** open [`assets/index.html`](assets/index.html) in your browser to flip through all 13 types with light / dark / full-editorial tabs. + +--- + +## Install + +```bash +# Clone into your Claude Code skills directory +git clone git@github.com:cathrynlavery/diagram-design.git ~/.claude/skills/diagram-design + +# Or if you keep skills elsewhere, symlink it +git clone git@github.com:cathrynlavery/diagram-design.git ~/code/diagram-design +ln -s ~/code/diagram-design ~/.claude/skills/diagram-design +``` + +Restart Claude Code. The skill registers as `diagram-design` and activates whenever you ask Claude to make a diagram. + +--- + +## Onboarding — make it look like *your* brand + +The whole point: ship editorial-quality diagrams in **your** colors and typography, not a generic template. + +Out of the box, diagrams render in a neutral **stone + rust** palette (warm off-white paper, deep charcoal ink, rust-orange accent). Good enough to screenshot straight away. But 60 seconds of onboarding is better — the skill will pull your brand from your website and apply it across every diagram. + +### The flow + +``` +You: "onboard diagram-design to https://yoursite.com" +Claude: → fetches the homepage + → extracts the dominant palette + font stack + → maps detected values to semantic roles: + paper, ink, muted, accent, link + → shows a proposed diff + → writes your tokens to references/style-guide.md +You: "yes, apply it" +``` + +Every new diagram now uses your colors. Your website's paper color becomes the diagram background. Your CTA color becomes the focal accent. Your body font stack becomes the node label family. + +### What gets extracted + +| Detected from your site | Becomes | +|---|---| +| `` background | `paper` token | +| Primary text color | `ink` token | +| Secondary / caption text | `muted` token | +| Cards or containers | `paper-2` token | +| Most-used brand color (CTA, link, heading) | `accent` token | +| `

` font family | `title` font | +| `` font family | `node-name` font | +| `` / `
` font | `sublabel` font |
+
+### Contrast checks happen automatically
+
+Before writing tokens, the skill verifies WCAG AA contrast on `ink` over `paper`. If your site has a color that fails contrast at diagram sizes (9–12px), it proposes an adjusted value and explains why.
+
+### Manual override
+
+Prefer to set tokens by hand? Open [`references/style-guide.md`](references/style-guide.md) and edit the table. Everything downstream reads from there — the 13 types, the annotation primitive, and the gallery all inherit semantic role names (`accent`, not `#b5523a`).
+
+### First-run gate
+
+The skill won't silently ship default-skinned diagrams into a branded project. On first use in a new project, it checks if `style-guide.md` has been customized. If not, it pauses and asks:
+
+> *"This is your first diagram in this project. The style guide is still at the default. Want to run onboarding, paste tokens manually, or proceed with default?"*
+
+See [`references/onboarding.md`](references/onboarding.md) for the full spec.
+
+---
+
+## Quickstart
+
+```bash
+# Open the gallery to see all 13 types
+open ~/.claude/skills/diagram-design/assets/index.html
+
+# In Claude Code, just ask:
+# "Make me an architecture diagram of my app: frontend, backend, database, Redis cache."
+# "I need a quadrant showing Q2 projects by impact vs effort."
+# "Give me a sequence diagram of the OAuth handshake."
+```
+
+Claude will pick the right type, build the HTML, and save it. You can also start from a template directly:
+
+```bash
+cp assets/template.html my-diagram.html        # minimal light
+cp assets/template-full.html my-diagram.html   # editorial with summary cards
+```
+
+---
+
+## Architecture
+
+Progressive disclosure. `SKILL.md` is a lean index — it tells Claude how to pick a type and where to look for detail. Every type lives in its own reference file, loaded only when relevant.
+
+```
+diagram-design/
+├── SKILL.md                         — top-level: philosophy, selection guide, checklist
+├── references/                      — loaded only when a type or primitive is chosen
+│   ├── style-guide.md               — single source of truth for colors + fonts
+│   ├── onboarding.md                — the URL-to-tokens flow
+│   ├── type-architecture.md
+│   ├── type-flowchart.md
+│   ├── type-sequence.md
+│   ├── type-state.md
+│   ├── type-er.md
+│   ├── type-timeline.md
+│   ├── type-swimlane.md
+│   ├── type-quadrant.md
+│   ├── type-nested.md
+│   ├── type-tree.md
+│   ├── type-layers.md
+│   ├── type-venn.md
+│   ├── type-pyramid.md
+│   ├── primitive-annotation.md      — italic-serif editorial callouts
+│   └── primitive-sketchy.md         — hand-drawn SVG filter variant
+├── assets/
+│   ├── index.html                   — live gallery, tabbed
+│   ├── template*.html               — scaffolds for new diagrams
+│   └── example-.html          — 3 variants × 13 types
+└── docs/screenshots/                — the images in this README
+```
+
+This keeps Claude's working context tight (only load what you need) and makes the skill easy to extend — drop a new `type-.md` and wire it into the selection guide.
+
+### What loads when
+
+The top-level `SKILL.md` is always in context. Everything else is pulled in only when relevant — this is what keeps the skill fast even with 15 reference files.
+
+| You ask for… | Claude loads |
+|---|---|
+| "Make me a flowchart" | `SKILL.md` + `references/type-flowchart.md` |
+| "Build an architecture diagram" | `SKILL.md` + `references/type-architecture.md` |
+| "Onboard this skill to my site" | `SKILL.md` + `references/onboarding.md` + `references/style-guide.md` |
+| "Add an editorial callout to this diagram" | `SKILL.md` + `references/primitive-annotation.md` |
+| "Give me a hand-drawn version" | `SKILL.md` + `references/primitive-sketchy.md` |
+| Routine diagram-making (any of the 13 types) | Only `SKILL.md` + that one type's reference |
+
+No matter how many types exist, Claude only reads the one you need. Add a new type tomorrow and nothing else changes.
+
+---
+
+## The design system (in one paragraph)
+
+One accent color, 1–2 focal elements per diagram. Three font families: Instrument Serif (title + italic callouts), Geist sans (node names), Geist Mono (technical sublabels). 1px hairline borders, no shadows, max border-radius 10px. Every coord, width, and gap divisible by 4 — non-negotiable, it's what keeps the diagrams from feeling AI-generated. Mono is for technical content (ports, URLs, field types), not a blanket "dev" aesthetic. Coral-tinted focal nodes draw the eye to the 1–2 things that matter. Full spec in [`SKILL.md`](SKILL.md#5-design-system).
+
+---
+
+## Primitives
+
+- **Annotation callout** — italic Instrument Serif + dashed Bézier leader, for editorial asides that sit in the margins. See [`references/primitive-annotation.md`](references/primitive-annotation.md).
+- **Sketchy filter** — SVG turbulence + displacement map for a hand-drawn variant. Good for essays, not for technical docs. See [`references/primitive-sketchy.md`](references/primitive-sketchy.md).
+
+---
+
+## When *not* to use this skill
+
+- **Quick unicode diagrams** for tweets or terminal output → wiretext-style skill.
+- **Lists of anything** → a table or bullets.
+- **Before/after comparisons** → a table.
+- **One-shape "diagrams"** — a single box with a label → just write the sentence.
+
+Before drawing, ask: *would a reader learn more from this than from a well-written paragraph?* If no, don't draw.
+
+---
+
+## About
+
+Made by **Cathryn Lavery** — founder of [BestSelf.co](https://bestself.co?utm_source=diagram-design&utm_medium=readme&utm_campaign=github&utm_content=bio). I write about AI, entrepreneurship, and designing nice-looking things at [littlemight.com](https://littlemight.com?utm_source=diagram-design&utm_medium=readme&utm_campaign=github&utm_content=bio) — blog + newsletter.
+
+If this is useful, **star the repo** and come [say hi on X](https://x.com/cathrynlavery).
diff --git a/SKILL.md b/SKILL.md
new file mode 100644
index 0000000..8eabed6
--- /dev/null
+++ b/SKILL.md
@@ -0,0 +1,390 @@
+---
+name: diagram-design
+description: Create technical and product diagrams — architecture, flowchart, sequence, state machine, ER / data model, timeline, swimlane, quadrant, nested, tree, layer stack, venn, pyramid — as standalone HTML files with inline SVG. Ships with a neutral editorial skin and a first-run gate that prompts users to customize the style guide (colors, fonts) from their own website before generating. Includes annotation-callout primitive and optional sketchy variant.
+license: MIT
+metadata:
+  version: "1.0"
+  author: Cocoon AI (hello@cocoon-ai.com)
+---
+
+# Diagram Design
+
+Create visual diagrams as self-contained HTML files with inline SVG and CSS, following an opinionated editorial design system.
+
+Thirteen 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. First-time setup — style guide gate
+
+**Before generating your first diagram in a new project, verify the style guide has been customized.**
+
+Open [`references/style-guide.md`](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 diagram 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`](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 diagrams:
+- 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 diagram 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 13 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
+
+| If you're showing… | Use | Reference |
+|---|---|---|
+| Components + connections in a system | **Architecture** | [type-architecture.md](references/type-architecture.md) |
+| Decision logic with branches | **Flowchart** | [type-flowchart.md](references/type-flowchart.md) |
+| Time-ordered messages between actors | **Sequence** | [type-sequence.md](references/type-sequence.md) |
+| States + transitions + guards | **State machine** | [type-state.md](references/type-state.md) |
+| Entities + fields + relationships | **ER / data model** | [type-er.md](references/type-er.md) |
+| Events positioned in time | **Timeline** | [type-timeline.md](references/type-timeline.md) |
+| Cross-functional process with handoffs | **Swimlane** | [type-swimlane.md](references/type-swimlane.md) |
+| Two-axis positioning / prioritization | **Quadrant** | [type-quadrant.md](references/type-quadrant.md) |
+| Hierarchy through containment / scope | **Nested** | [type-nested.md](references/type-nested.md) |
+| Parent → children relationships | **Tree** | [type-tree.md](references/type-tree.md) |
+| Stacked abstraction levels | **Layer stack** | [type-layers.md](references/type-layers.md) |
+| Overlap between sets | **Venn** | [type-venn.md](references/type-venn.md) |
+| Ranked hierarchy or conversion drop-off | **Pyramid / funnel** | [type-pyramid.md](references/type-pyramid.md) |
+
+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 (§7), 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" diagrams 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`](references/style-guide.md). This file describes semantic roles (`paper`, `ink`, `muted`, `accent`, `link`, …). The default skin is littlemight.com (warm paper, ink, coral); to apply your own brand, either edit `style-guide.md` directly or run the URL-based flow described in [`references/onboarding.md`](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`.
+
+### Semantic roles (at a glance)
+
+| Role | Purpose |
+|---|---|
+| `paper`, `paper-2` | Page bg and container bg |
+| `ink` | Primary text / stroke |
+| `muted`, `soft` | Secondary text, default arrows, sublabels |
+| `rule`, `rule-solid` | Hairline borders |
+| `accent`, `accent-tint` | 1–2 focal elements per diagram |
+| `link` | HTTP/API calls, external arrows |
+
+**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.
+
+### Node type → treatment
+
+| Type | Fill | Stroke |
+|---|---|---|
+| **Focal** (1–2 max) | `accent-tint` | `accent` |
+| **Backend / API / Step** | white | `ink` |
+| **Store / State** | `ink @ 0.05` | `muted` |
+| **External / Cloud** | `ink @ 0.03` | `ink @ 0.30` |
+| **Input / User** | `muted @ 0.10` | `soft` |
+| **Optional / Async** | `ink @ 0.02` | `ink @ 0.20` dashed `4,3` |
+| **Security / Boundary** | `accent @ 0.05` | `accent @ 0.50` dashed `4,4` |
+
+### Typography (summary — full spec in style-guide.md)
+
+- **Title** — Instrument Serif, 1.75rem, 400 — H1 only
+- **Node name** — Geist (sans), 12px, 600 — human-readable labels
+- **Sublabel** — Geist Mono, 9px — ports, URLs, field types
+- **Eyebrow / tag** — Geist Mono, 7–8px, uppercase, tracked — type tags, axis labels
+- **Arrow label** — Geist Mono, 8px — annotation on arrows
+- **Editorial aside** — Instrument Serif *italic*, 14px — callouts only
+
+**Mono is for technical content.** Names are Geist sans. Page title is Instrument Serif. Italic Instrument Serif is reserved for annotation callouts. Never JetBrains Mono as a blanket "dev" font.
+
+```html
+
+```
+
+---
+
+## 6. Core SVG Primitives
+
+Universal building blocks. Type-specialized primitives (lifeline, activation bar, region) live in the relevant `references/type-*.md`. Optional primitives:
+- Editorial callouts → [primitive-annotation.md](references/primitive-annotation.md)
+- Hand-drawn variant → [primitive-sketchy.md](references/primitive-sketchy.md)
+
+### Background
+
+```svg
+
+  
+    
+  
+
+
+
+```
+
+### Arrow markers (define all three, always)
+
+```svg
+
+  
+
+
+  
+
+
+  
+
+```
+
+| Arrow | Stroke | When |
+|---|---|---|
+| Default | muted `#52534e` | Internal, generic |
+| Accent | coral `#f7591f` | Primary / highlighted / headline |
+| Link-blue | `#1a70c7` | HTTP/API calls, external systems |
+| Dashed | `stroke-dasharray="5,4"` + any color | Optional, passive, return, async |
+
+**Draw arrows before boxes** so z-order puts lines behind nodes.
+
+### Node box — full pattern
+
+```svg
+
+
+
+
+
+
+API
+
+Node Name
+
+tech:port
+```
+
+### Arrow labels — always mask
+
+Every arrow label needs an opaque rect behind it. Without one it bleeds through the line.
+
+```svg
+
+WRITE
+```
+
+Rules: ≤14 characters, all-caps, centered on segment midpoint, 8–10px above line. Never `writing-mode` vertical.
+
+### Legend — horizontal strip at the bottom
+
+**Never put the legend inside the diagram area.** Place as a horizontal strip after all nodes, with a hairline separator:
+
+```svg
+
+LEGEND
+
+```
+
+Expand SVG `viewBox` height by ~60px.
+
+---
+
+## 7. Layout & Spacing
+
+### 4px grid
+
+**All values — font sizes, padding, node dimensions, gaps, x/y coords — divisible by 4.** Non-negotiable.
+
+| Category | Allowed values |
+|---|---|
+| Font sizes | 8, 12, 16, 20, 24, 28, 32, 40 |
+| Node width / height | 80, 96, 112, 120, 128, 140, 144, 160, 180, 200, 240, 320 |
+| x / y coordinates | multiples of 4 |
+| Gap between nodes | 20, 24, 32, 40, 48 |
+| Padding inside boxes | 8, 12, 16 |
+| Border radius | 4, 6, 8 |
+
+Exempt: stroke widths (0.8, 1, 1.2), opacity values, and the 22×22 dot-pattern.
+
+Quick check: if a coordinate ends in 1, 2, 3, 5, 6, 7, 9 — fix it.
+
+### Complexity budget (per diagram)
+
+| Limit | Rule |
+|---|---|
+| Max nodes | 9 |
+| Max arrows / transitions | 12 |
+| Max coral elements | 2 |
+| Max lifelines (sequence) | 5 |
+| Max lanes (swimlane) | 5 |
+| Max items (quadrant) | 12 |
+| Max entities (ER) | 8 |
+| Max nesting levels (nested) | 6 |
+| Max tree depth | 4 |
+| Max layers (layer stack) | 6 |
+| Max circles (venn) | 3 |
+| Max layers (pyramid) | 6 |
+| Max annotation callouts | 2 |
+
+If you exceed, split into two diagrams (overview + detail).
+
+### Page layout
+
+1. **Header** — eyebrow (Geist Mono), title (Instrument Serif), optional subtitle (Geist muted).
+2. **Diagram container** — `#efeee5` bg, 1px `rgba(11,13,11,0.12)` border, 8px radius, `overflow-x: auto`.
+3. **Summary cards** — 2–3 col grid with *varied* widths (e.g., `1.1fr 1fr 0.9fr`).
+4. **Footer** — colophon in Geist Mono, muted, hairline top border.
+
+---
+
+## 8. Summary Card Pattern
+
+Don't use 3 identical generic cards. Vary the treatment:
+
+```html
+
+

SECTION LABEL

+
+ +

Card Title

+
+
  • Item
+
+``` + +Rules: +- `background: #ffffff` (not paper — slight lift without shadow) +- `border: 1px solid rgba(11,13,11,0.12)` +- `border-radius: 6px`, `padding: 1.25rem` +- **No `box-shadow`** +- Card dots: 7px, `border-radius: 50%` — ink / muted / coral / link / soft variants + +--- + +## 9. Pre-Output Checklist (Taste Gate) + +Run before producing any diagram. + +**Type fit:** +- [ ] Right type for what I'm showing? (§3 selection guide) +- [ ] Would a table / paragraph do the same job? (If yes — don't draw.) +- [ ] Loaded the matching `references/type-*.md`? + +**Remove test:** +- [ ] Can I remove any node? (Would a reader still understand?) +- [ ] Can I merge any two nodes? (Do they always travel together?) +- [ ] Can I remove any arrow? (Is the relationship obvious from layout?) +- [ ] Can I remove any label? (Does color or shape already signal it?) + +**Signal:** +- [ ] Coral used on ≤2 elements? If more, which actually deserve focal status? +- [ ] Legend covers every type used — and nothing extra? +- [ ] Within the type's complexity budget (§7)? + +**Technical:** +- [ ] Arrows drawn before boxes? +- [ ] Every arrow label has an opaque `fill="#f5f4ed"` rect behind it? +- [ ] Legend is a horizontal bottom strip, not floating? +- [ ] No vertical `writing-mode` text? +- [ ] `viewBox` expanded for the legend strip (~60px)? +- [ ] Every font size, coord, width, height, gap divisible by 4? + +**Typography:** +- [ ] Human-readable names in Geist sans, not Geist Mono? +- [ ] Technical sublabels (ports, commands, URLs) in Geist Mono? +- [ ] Page title in Instrument Serif? +- [ ] Annotation callouts (if any) in *italic* Instrument Serif? (see [primitive-annotation.md](references/primitive-annotation.md)) +- [ ] No JetBrains Mono anywhere? + +--- + +## 10. Templates & Variants + +Every diagram ships in three variants (see `assets/`): + +| Variant | File pattern | When to use | +|---|---|---| +| **Minimal light** (default) | `template.html`, `example-.html` | Screenshot-ready. Diagram + title. Warm paper. | +| **Minimal dark** | `template-dark.html`, `example--dark.html` | Dark mode sites, slides, high-contrast posts. | +| **Full editorial** | `template-full.html`, `example--full.html` | Long-form posts where the diagram is the hero. | + +**Sketchy variant** (optional, applied to any of the above) — see [primitive-sketchy.md](references/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 + +1. Copy the variant closest to what you want (`template.html` for minimal, `template-full.html` for cards). +2. Load the matching `references/type-.md` for layout conventions. +3. Replace the eyebrow, h1, and SVG body. +4. 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. diff --git a/assets/example-architecture-dark.html b/assets/example-architecture-dark.html new file mode 100644 index 0000000..03bcd71 --- /dev/null +++ b/assets/example-architecture-dark.html @@ -0,0 +1,162 @@ + + + + + + littlemight.com · Architecture + + + + +
+

Architecture · Diagram Design

+

littlemight.com in production

+ + + + + + + + + + + + + + + + + + + + + + + HTTPS + + + SSR + + + READ MDX + + + QUERY + + + + + + EXT + Reader + Browser + + + + + + EDGE + 01 + Cloudflare + Pages · cache + + + + + + ORIG + 02 + Astro Origin + SSR + MDX + + + + + + BUN + MDX Bundle + src/content/*.mdx + + + + + + CMS + Content CMS + assets · og images + + + + LEGEND + + + Focal / origin + + + Backend / bundle + + + Store + + + Cloud + + + External + + + HTTP request + + + Primary flow + +
+ + diff --git a/assets/example-architecture-full.html b/assets/example-architecture-full.html new file mode 100644 index 0000000..695fea2 --- /dev/null +++ b/assets/example-architecture-full.html @@ -0,0 +1,174 @@ + + + + + + littlemight.com · Architecture + + + + +
+
+

Architecture · Diagram Design

+

littlemight.com in production

+

The static-first stack: Cloudflare's edge absorbs most reads, Astro renders MDX on misses, content is checked into the repo.

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + HTTPS + + + SSR + + + READ MDX + + + QUERY + + + + + + EXT + Reader + Browser + + + + + + EDGE + 01 + Cloudflare + Pages · cache + + + + + + ORIG + 02 + Astro Origin + SSR + MDX + + + + + + BUN + MDX Bundle + src/content/*.mdx + + + + + + CMS + Content CMS + assets · og images + + + + LEGEND + + + Focal / origin + + + Backend / bundle + + + Store + + + Cloud + + + External + + + HTTP request + + + Primary flow + +
+ +
+
+

THE HEADLINE

+

Edge absorbs the reads

+

Nearly every reader is served by Cloudflare's edge cache. The Astro origin only wakes on a cold slug or a revalidation.

+
+
+

Content lives in the repo

+
  • Posts are MDX files
  • Checked in, reviewed in PRs
  • No runtime database
+
+
+

CMS holds the big stuff

+

Images, OG art, and downloadable assets live in a separate bucket keyed by slug. Astro links them at render time.

+
+
+ + +
+ + diff --git a/assets/example-architecture.html b/assets/example-architecture.html new file mode 100644 index 0000000..53e67d2 --- /dev/null +++ b/assets/example-architecture.html @@ -0,0 +1,162 @@ + + + + + + littlemight.com · Architecture + + + + +
+

Architecture · Diagram Design

+

littlemight.com in production

+ + + + + + + + + + + + + + + + + + + + + + + HTTPS + + + SSR + + + READ MDX + + + QUERY + + + + + + EXT + Reader + Browser + + + + + + EDGE + 01 + Cloudflare + Pages · cache + + + + + + ORIG + 02 + Astro Origin + SSR + MDX + + + + + + BUN + MDX Bundle + src/content/*.mdx + + + + + + CMS + Content CMS + assets · og images + + + + LEGEND + + + Focal / origin + + + Backend / bundle + + + Store + + + Cloud + + + External + + + HTTP request + + + Primary flow + +
+ + diff --git a/assets/example-er-dark.html b/assets/example-er-dark.html new file mode 100644 index 0000000..0ab5c73 --- /dev/null +++ b/assets/example-er-dark.html @@ -0,0 +1,200 @@ + + + + + + littlemight content model · ER + + + + +
+

ER · Diagram Design

+

littlemight content model

+ + + + + + + + + + + + + + + + + + + + + + + 1 + + + N + + + 1 + + + N + + + 1 + + + N + + + + WRITES + + + TAGGED + + + + + + + ENTITY + Author + # id + uuid + handle + text + name + text + bio + text + site_url + text + + + + + + + ENTITY · AGGREGATE ROOT + Article + # id + uuid + title + text + slug + text · unique + body_mdx + text + published_at + timestamp + → author_id + uuid + status + enum + og_image + text · url + + + + + + + ENTITY + Tag + # id + uuid + slug + text · unique + name + text + description + text + + + + + + + JOIN + ArticleTag + → article_id + uuid + → tag_id + uuid + + + + LEGEND + + + Aggregate root + + + Entity + + + Join table + + # + Primary key + + → + Foreign key + + 1 / N + Cardinality + +
+ + diff --git a/assets/example-er-full.html b/assets/example-er-full.html new file mode 100644 index 0000000..7b2717f --- /dev/null +++ b/assets/example-er-full.html @@ -0,0 +1,203 @@ + + + + + + littlemight content model · ER + + + + +
+
+

ER · Diagram Design

+

littlemight content model

+

The four entities behind the site. Article is the aggregate root — everything else exists to describe or classify it. `#` marks primary keys, `→` marks foreign keys.

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + 1 + + + N + + + 1 + + + N + + + 1 + + + N + + + + WRITES + + + TAGGED + + + + + + + ENTITY + Author + # id + uuid + handle + text + name + text + bio + text + site_url + text + + + + + + + ENTITY · AGGREGATE ROOT + Article + # id + uuid + title + text + slug + text · unique + body_mdx + text + published_at + timestamp + → author_id + uuid + status + enum + og_image + text · url + + + + + + + ENTITY + Tag + # id + uuid + slug + text · unique + name + text + description + text + + + + + + + JOIN + ArticleTag + → article_id + uuid + → tag_id + uuid + + + + LEGEND + + + Aggregate root + + + Entity + + + Join table + + # + Primary key + + → + Foreign key + + 1 / N + Cardinality + +
+ +
+
+

THE HEADLINE

+

Article is the root

+

Author, Tag, and the join table only exist to describe Article. If you're thinking about a feature, start here and trace outward.

+
+
+

Many-to-many via a join

+
  • Tags aren't embedded on Article
  • ArticleTag is a pure join — no metadata
  • Dashed border signals it's not a primary entity
+
+
+

Cardinality over arrows

+

Plain lines with 1/N at the ends read cleaner than crow's feet at this size. Every relationship carries both numbers.

+
+
+ + +
+ + diff --git a/assets/example-er.html b/assets/example-er.html new file mode 100644 index 0000000..7f0155f --- /dev/null +++ b/assets/example-er.html @@ -0,0 +1,200 @@ + + + + + + littlemight content model · ER + + + + +
+

ER · Diagram Design

+

littlemight content model

+ + + + + + + + + + + + + + + + + + + + + + + 1 + + + N + + + 1 + + + N + + + 1 + + + N + + + + WRITES + + + TAGGED + + + + + + + ENTITY + Author + # id + uuid + handle + text + name + text + bio + text + site_url + text + + + + + + + ENTITY · AGGREGATE ROOT + Article + # id + uuid + title + text + slug + text · unique + body_mdx + text + published_at + timestamp + → author_id + uuid + status + enum + og_image + text · url + + + + + + + ENTITY + Tag + # id + uuid + slug + text · unique + name + text + description + text + + + + + + + JOIN + ArticleTag + → article_id + uuid + → tag_id + uuid + + + + LEGEND + + + Aggregate root + + + Entity + + + Join table + + # + Primary key + + → + Foreign key + + 1 / N + Cardinality + +
+ + diff --git a/assets/example-flowchart-dark.html b/assets/example-flowchart-dark.html new file mode 100644 index 0000000..02efd3f --- /dev/null +++ b/assets/example-flowchart-dark.html @@ -0,0 +1,154 @@ + + + + + + Should you write this as a skill? + + + + +
+

Flowchart · Diagram Design

+

Should you write this as a skill?

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NO + + + YES + + + NO + + + YES + + + + New workflow + + + + Do it manually once + + + + Will you repeat + it >3 times? + + + + One-off + keep manual + + + + Reusable across + projects? + + + + CLAUDE.md note + project-scoped + + + + Write a skill + reusable + assets + + + + LEGEND · SHAPE CARRIES TYPE + + + Start / end (oval) + + + Step (rectangle) + + + Decision (diamond) + + + Happy path + + + Branch + +
+ + diff --git a/assets/example-flowchart-full.html b/assets/example-flowchart-full.html new file mode 100644 index 0000000..de7f061 --- /dev/null +++ b/assets/example-flowchart-full.html @@ -0,0 +1,157 @@ + + + + + + Should you write this as a skill? + + + + +
+
+

Flowchart · Diagram Design

+

Should you write this as a skill?

+

A three-decision triage for turning a one-off workflow into something reusable. Shape carries type — ovals bracket the flow, rectangles are steps, diamonds are decisions.

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + NO + + + YES + + + NO + + + YES + + + + New workflow + + + + Do it manually once + + + + Will you repeat + it >3 times? + + + + One-off + keep manual + + + + Reusable across + projects? + + + + CLAUDE.md note + project-scoped + + + + Write a skill + reusable + assets + + + + LEGEND · SHAPE CARRIES TYPE + + + Start / end (oval) + + + Step (rectangle) + + + Decision (diamond) + + + Happy path + + + Branch + +
+ +
+
+

WHY THIS FLOWCHART

+

Most things aren't skills

+

The happy path is narrow on purpose. Only workflows that clear all three gates earn the overhead of a reusable skill — everything else is better as a project note.

+
+
+

Shape, not color

+
  • Oval bookends the flow
  • Rectangle is a step
  • Diamond is a decision
  • Color reserved for the happy path
+
+
+

Every branch gets a label

+

Unlabeled branches turn a flowchart into a maze. Yes/No is fine; conditions in mono when the logic is richer.

+
+
+ + +
+ + diff --git a/assets/example-flowchart.html b/assets/example-flowchart.html new file mode 100644 index 0000000..995f96c --- /dev/null +++ b/assets/example-flowchart.html @@ -0,0 +1,154 @@ + + + + + + Should you write this as a skill? + + + + +
+

Flowchart · Diagram Design

+

Should you write this as a skill?

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NO + + + YES + + + NO + + + YES + + + + New workflow + + + + Do it manually once + + + + Will you repeat + it >3 times? + + + + One-off + keep manual + + + + Reusable across + projects? + + + + CLAUDE.md note + project-scoped + + + + Write a skill + reusable + assets + + + + LEGEND · SHAPE CARRIES TYPE + + + Start / end (oval) + + + Step (rectangle) + + + Decision (diamond) + + + Happy path + + + Branch + +
+ + diff --git a/assets/example-layers-dark.html b/assets/example-layers-dark.html new file mode 100644 index 0000000..dc9a300 --- /dev/null +++ b/assets/example-layers-dark.html @@ -0,0 +1,121 @@ + + + + + + AI app stack · Layer hierarchy + + + + +
+

Layer stack · Diagram Design

+

AI app stack · Where the work actually happens

+ + + + + + + + + + + + + ABSTRACTION + + + SILICON + + + + + + + + + L5 + UI surface + chat, editor, canvas + + + + + L4 + Agent harness + tools, memory, loop + + + + + L3 + Prompt layer + system, few-shot, caching + + + + + L2 + SDK / client + auth, retries, streaming + + + + L1 + Model weights + opus, sonnet, haiku + + + FOCAL LAYER + The harness is where most product differentiation actually lives — tools, memory, and the loop that stitches model calls into useful work. + +
+ + diff --git a/assets/example-layers-full.html b/assets/example-layers-full.html new file mode 100644 index 0000000..bb01f87 --- /dev/null +++ b/assets/example-layers-full.html @@ -0,0 +1,124 @@ + + + + + + AI app stack · Layer hierarchy + + + + +
+
+

Layer stack · Diagram Design

+

AI app stack · Where the work actually happens

+

Five layers between silicon and the user. Most teams over-invest in the model and under-invest in the harness — which is the layer that decides whether the app feels magical or flaky.

+
+ +
+ + + + + + + + + + + + ABSTRACTION + + + SILICON + + + + + + + + + L5 + UI surface + chat, editor, canvas + + + + + L4 + Agent harness + tools, memory, loop + + + + + L3 + Prompt layer + system, few-shot, caching + + + + + L2 + SDK / client + auth, retries, streaming + + + + L1 + Model weights + opus, sonnet, haiku + + + FOCAL LAYER + The harness is where most product differentiation actually lives — tools, memory, and the loop that stitches model calls into useful work. + +
+ +
+
+

THE HEADLINE

+

Coral marks the layer that pays rent

+

Swapping models is a knob. Rewriting the harness is a product decision. The coral band says: this is the layer where you out-execute the competition, not the one where you chase leaderboards.

+
+
+

Reading the stack

+
  • Abstraction rises up the left column
  • L-index on the left, note on the right
  • Hairlines between layers, no shadows
  • Fill shade shifts from paper-2 to white
+
+
+

Why only five

+

Six-plus layers become a legend, not a diagram. Five holds the whole thing on one screen — every band readable without squinting, every note a scan away.

+
+
+ + +
+ + diff --git a/assets/example-layers.html b/assets/example-layers.html new file mode 100644 index 0000000..809d5cf --- /dev/null +++ b/assets/example-layers.html @@ -0,0 +1,121 @@ + + + + + + AI app stack · Layer hierarchy + + + + +
+

Layer stack · Diagram Design

+

AI app stack · Where the work actually happens

+ + + + + + + + + + + + + ABSTRACTION + + + SILICON + + + + + + + + + L5 + UI surface + chat, editor, canvas + + + + + L4 + Agent harness + tools, memory, loop + + + + + L3 + Prompt layer + system, few-shot, caching + + + + + L2 + SDK / client + auth, retries, streaming + + + + L1 + Model weights + opus, sonnet, haiku + + + FOCAL LAYER + The harness is where most product differentiation actually lives — tools, memory, and the loop that stitches model calls into useful work. + +
+ + diff --git a/assets/example-nested-dark.html b/assets/example-nested-dark.html new file mode 100644 index 0000000..95a37b4 --- /dev/null +++ b/assets/example-nested-dark.html @@ -0,0 +1,130 @@ + + + + + + The CLAUDE.md Hierarchy + + + + +
+

Nested · Diagram Design

+

The CLAUDE.md Hierarchy

+ + + + + + + + + + + + + + + + + + + + + + + + + ~/.claude/ (global) + + + ~/vault/ (notes) + + + /business + + + /marketing + + + /project + + + + + + + + + + + + + + + + + + + + + CLAUDE.md + inherits every level above + + + no imports, no configuration + + + + + structure IS the index + +
+ + diff --git a/assets/example-nested-full.html b/assets/example-nested-full.html new file mode 100644 index 0000000..17c08e8 --- /dev/null +++ b/assets/example-nested-full.html @@ -0,0 +1,133 @@ + + + + + + The CLAUDE.md Hierarchy + + + + +
+
+

Nested · Diagram Design

+

The CLAUDE.md Hierarchy

+

How Claude Code composes context from every folder level above. Each outer ring is a broader scope; the innermost box is where the work happens — inheriting every instruction above it without a single import statement.

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + ~/.claude/ (global) + + + ~/vault/ (notes) + + + /business + + + /marketing + + + /project + + + + + + + + + + + + + + + + + + + + + CLAUDE.md + inherits every level above + + + no imports, no configuration + + + + + structure IS the index + +
+ +
+
+

THE HEADLINE

+

Containment is the config

+

Every CLAUDE.md inside a parent folder implicitly wraps the one below. No manifest, no import graph — the file tree itself declares scope, so renaming a folder is the only migration you'll ever run.

+
+
+

Reads outside-in

+
  • Global rules load first
  • Each parent narrows context
  • Innermost file gets the last word
  • Conflicts resolve by specificity
+
+
+

Five levels is the ceiling

+

Past five rings the diagram stops teaching — and so does the filesystem. If you need six levels of instruction, you probably need two projects instead.

+
+
+ + +
+ + diff --git a/assets/example-nested.html b/assets/example-nested.html new file mode 100644 index 0000000..fa2de9e --- /dev/null +++ b/assets/example-nested.html @@ -0,0 +1,134 @@ + + + + + + The CLAUDE.md Hierarchy + + + + +
+

Nested · Diagram Design

+

The CLAUDE.md Hierarchy

+ + + + + + + + + + + + + + + + + + + + + + + + + ~/.claude/ (global) + + + ~/vault/ (notes) + + + /business + + + /marketing + + + /project + + + + + + + + + + + + + + + + + + + + + + + + + CLAUDE.md + inherits every level above + + + no imports, no configuration + + + + + structure IS the index + +
+ + diff --git a/assets/example-pyramid-dark.html b/assets/example-pyramid-dark.html new file mode 100644 index 0000000..375b44e --- /dev/null +++ b/assets/example-pyramid-dark.html @@ -0,0 +1,117 @@ + + + + + + Content pyramid · what compounds + + + + +
+

Pyramid · Diagram Design

+

Content pyramid · what compounds

+ + + + + + + + + + + + + + + RARER · FEWER · COMPOUNDS ↑ + + + + Short posts + daily · ~200 words + ~240/yr + + + + Essays + weekly · 800–1,500 words + ~48/yr + + + + Long-form guides + quarterly · 4,000+ words + ~4/yr + + + + Flagship book + every 3–5 years + the apex + + + The base funds the apex. The apex defines the base. + + + + LEGEND + + + Apex — rarest, highest leverage + + + Supporting layer — the volume work + + Layer width is honest: narrower = rarer shipping cadence. + +
+ + diff --git a/assets/example-pyramid-full.html b/assets/example-pyramid-full.html new file mode 100644 index 0000000..622a076 --- /dev/null +++ b/assets/example-pyramid-full.html @@ -0,0 +1,120 @@ + + + + + + Content pyramid · what compounds + + + + +
+
+

Pyramid · Diagram Design

+

Content pyramid · what compounds

+

Four layers of output, ordered by how rarely they ship and how far they travel. The base keeps you present. The apex defines the body of work — and it's the only layer anyone quotes back a decade later.

+
+ +
+ + + + + + + + + + + + + + RARER · FEWER · COMPOUNDS ↑ + + + + Short posts + daily · ~200 words + ~240/yr + + + + Essays + weekly · 800–1,500 words + ~48/yr + + + + Long-form guides + quarterly · 4,000+ words + ~4/yr + + + + Flagship book + every 3–5 years + the apex + + + The base funds the apex. The apex defines the base. + + + + LEGEND + + + Apex — rarest, highest leverage + + + Supporting layer — the volume work + + Layer width is honest: narrower = rarer shipping cadence. + +
+ +
+
+

THE HEADLINE

+

One coral layer, on purpose

+

A five-colour pyramid is a children's diagram. Reserving coral for the apex makes the whole structure actually say something: this is the rarest thing you'll make, and it's the one the rest of the pyramid is feeding.

+
+
+

Width tells the truth

+
  • ~240 short posts a year
  • ~48 essays
  • ~4 long-form guides
  • 1 flagship every 3–5 years
+
+
+

Pyramids only work for hierarchy

+

If your four categories don't have a rarity order — if a bullet list would communicate it — use bullets. Pyramids promise you're trading volume for value as you climb.

+
+
+ + +
+ + diff --git a/assets/example-pyramid.html b/assets/example-pyramid.html new file mode 100644 index 0000000..3592abb --- /dev/null +++ b/assets/example-pyramid.html @@ -0,0 +1,117 @@ + + + + + + Content pyramid · what compounds + + + + +
+

Pyramid · Diagram Design

+

Content pyramid · what compounds

+ + + + + + + + + + + + + + + RARER · FEWER · COMPOUNDS ↑ + + + + Short posts + daily · ~200 words + ~240/yr + + + + Essays + weekly · 800–1,500 words + ~48/yr + + + + Long-form guides + quarterly · 4,000+ words + ~4/yr + + + + Flagship book + every 3–5 years + the apex + + + The base funds the apex. The apex defines the base. + + + + LEGEND + + + Apex — rarest, highest leverage + + + Supporting layer — the volume work + + Layer width is honest: narrower = rarer shipping cadence. + +
+ + diff --git a/assets/example-quadrant-dark.html b/assets/example-quadrant-dark.html new file mode 100644 index 0000000..128cc5a --- /dev/null +++ b/assets/example-quadrant-dark.html @@ -0,0 +1,133 @@ + + + + + + Content ideas · Impact × Effort + + + + +
+

Quadrant · Diagram Design

+

Content ideas · Impact × Effort

+ + + + + + + + + + + + + + + + + + + + HIGH EFFORT → + ← LOW EFFORT + ↑ HIGH IMPACT + ↓ LOW IMPACT + + + DO FIRST + MAJOR PROJECTS + QUICK WINS + AVOID + + + + + diagram-design + + + Update changelog + + + + Design v4 refresh + + + New publication + + + + Fix footer link + + + Update OG tags + + + + Rewrite build pipeline + + + Port to Nuxt + + + + LEGEND + + + Start tomorrow + + + Candidate project + + Position is the signal. Colour is reserved for the single action item. + +
+ + diff --git a/assets/example-quadrant-full.html b/assets/example-quadrant-full.html new file mode 100644 index 0000000..dcb634b --- /dev/null +++ b/assets/example-quadrant-full.html @@ -0,0 +1,136 @@ + + + + + + Content ideas · Impact × Effort + + + + +
+
+

Quadrant · Diagram Design

+

Content ideas · Impact × Effort

+

Eight candidate projects mapped by the pay-off they'd generate against the cost to ship. Position is the signal — color is reserved for the one item worth starting tomorrow.

+
+ +
+ + + + + + + + + + + + + + + + + + + HIGH EFFORT → + ← LOW EFFORT + ↑ HIGH IMPACT + ↓ LOW IMPACT + + + DO FIRST + MAJOR PROJECTS + QUICK WINS + AVOID + + + + + diagram-design + + + Update changelog + + + + Design v4 refresh + + + New publication + + + + Fix footer link + + + Update OG tags + + + + Rewrite build pipeline + + + Port to Nuxt + + + + LEGEND + + + Start tomorrow + + + Candidate project + + Position is the signal. Colour is reserved for the single action item. + +
+ +
+
+

THE HEADLINE

+

One coral dot, on purpose

+

A 2×2 with four coloured quadrants is a poster, not a decision tool. Reserving coral for the single item you commit to tomorrow makes the matrix actually prioritise.

+
+
+

Axes labelled at ends

+
  • HIGH / LOW at the extremes
  • Arrows show direction
  • No labels at midpoints
  • The cross is 1px ink, not a box
+
+
+

Empty BR isn't wasted

+

Two items in "Avoid" is informative — it says the team considered them and rejected them. A blank quadrant would leave you wondering.

+
+
+ + +
+ + diff --git a/assets/example-quadrant.html b/assets/example-quadrant.html new file mode 100644 index 0000000..9521c42 --- /dev/null +++ b/assets/example-quadrant.html @@ -0,0 +1,133 @@ + + + + + + Content ideas · Impact × Effort + + + + +
+

Quadrant · Diagram Design

+

Content ideas · Impact × Effort

+ + + + + + + + + + + + + + + + + + + + HIGH EFFORT → + ← LOW EFFORT + ↑ HIGH IMPACT + ↓ LOW IMPACT + + + DO FIRST + MAJOR PROJECTS + QUICK WINS + AVOID + + + + + diagram-design + + + Update changelog + + + + Design v4 refresh + + + New publication + + + + Fix footer link + + + Update OG tags + + + + Rewrite build pipeline + + + Port to Nuxt + + + + LEGEND + + + Start tomorrow + + + Candidate project + + Position is the signal. Colour is reserved for the single action item. + +
+ + diff --git a/assets/example-sequence-dark.html b/assets/example-sequence-dark.html new file mode 100644 index 0000000..0e2cc51 --- /dev/null +++ b/assets/example-sequence-dark.html @@ -0,0 +1,220 @@ + + + + + + Article request · Sequence + + + + +
+

Sequence · Diagram Design

+

Article request, cold cache

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GET /ARTICLES/SLUG + + + + CACHE MISS · ORIGIN + + + + RENDER MDX + + + + 200 · HTML + MAX-AGE + + + + 200 · EDGE-CACHED + + + + PAGEVIEW BEACON + + + + + + + + EXT + Reader + Browser + + + + + + EDGE + Cloudflare + Pages · cache + + + + + + ORIG + Astro Origin + SSR + MDX + + + + + + ASY + Analytics + Beacon · async + + + + LEGEND + + + + Focal actor + + + + Activation + + + + HTTP request + + + + Return / async + + + + Primary response + + +
+ + diff --git a/assets/example-sequence-full.html b/assets/example-sequence-full.html new file mode 100644 index 0000000..ab65e1e --- /dev/null +++ b/assets/example-sequence-full.html @@ -0,0 +1,386 @@ + + + + + + Article Request · Sequence + + + + +
+ + +
+

Sequence · Diagram Design

+

Article request, cold cache

+

How littlemight.com serves a reader when the requested slug isn't already sitting in Cloudflare's edge cache — origin render, beacon, and back in one round trip.

+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GET /ARTICLES/SLUG + + + + CACHE MISS · ORIGIN + + + + RENDER MDX + + + + 200 · HTML + MAX-AGE + + + + 200 · EDGE-CACHED + + + + PAGEVIEW BEACON + + + + + + + + EXT + Reader + Browser + + + + + + EDGE + Cloudflare + Pages · cache + + + + + + ORIG + Astro Origin + SSR + MDX + + + + + + ASY + Analytics + Beacon · async + + + + LEGEND + + + + Focal actor + + + + Activation + + + + HTTP request + + + + Return / async + + + + Primary response + + +
+ + +
+
+

THE HEADLINE

+
+ +

Edge handles the hot path

+
+

On subsequent reads the whole exchange collapses to M1 → M5. Cloudflare serves the cached HTML without waking the origin. The coral arrow is the only one the reader ever perceives.

+
+ +
+
+ +

Origin render on miss

+
+
    +
  • Astro SSRs MDX on cold cache
  • +
  • Returns HTML + cache headers
  • +
  • Edge stores the result
  • +
  • Next reader skips the origin trip
  • +
+
+ +
+
+ +

Analytics is fire-and-forget

+
+

The pageview beacon is dashed for a reason: the reader never waits on it, and a failed beacon never breaks the page.

+
+
+ + + + +
+ + diff --git a/assets/example-sequence.html b/assets/example-sequence.html new file mode 100644 index 0000000..9ac52a7 --- /dev/null +++ b/assets/example-sequence.html @@ -0,0 +1,220 @@ + + + + + + Article request · Sequence + + + + +
+

Sequence · Diagram Design

+

Article request, cold cache

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GET /ARTICLES/SLUG + + + + CACHE MISS · ORIGIN + + + + RENDER MDX + + + + 200 · HTML + MAX-AGE + + + + 200 · EDGE-CACHED + + + + PAGEVIEW BEACON + + + + + + + + EXT + Reader + Browser + + + + + + EDGE + Cloudflare + Pages · cache + + + + + + ORIG + Astro Origin + SSR + MDX + + + + + + ASY + Analytics + Beacon · async + + + + LEGEND + + + + Focal actor + + + + Activation + + + + HTTP request + + + + Return / async + + + + Primary response + + +
+ + diff --git a/assets/example-state-dark.html b/assets/example-state-dark.html new file mode 100644 index 0000000..bbe827e --- /dev/null +++ b/assets/example-state-dark.html @@ -0,0 +1,145 @@ + + + + + + Article lifecycle · State machine + + + + +
+

State machine · Diagram Design

+

Article lifecycle

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CREATE + + + SUBMIT + + + APPROVE + + + EXPIRE + + + PURGE + + + + REJECT · REVISE + + + + + + + + STATE + Draft + unpublished + + + + + STATE + In Review + awaiting approval + + + + + STATE + Published + live on site + + + + + STATE + Archived + noindex · hidden + redirect retained + + + + + +
+ + diff --git a/assets/example-state-full.html b/assets/example-state-full.html new file mode 100644 index 0000000..3979b94 --- /dev/null +++ b/assets/example-state-full.html @@ -0,0 +1,148 @@ + + + + + + Article lifecycle · state machine + + + + +
+
+

State machine · Diagram Design

+

Article lifecycle

+

The four states a post passes through from draft to archive, with the rejection loop made explicit. Published is the state the team optimizes for — hence coral.

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + CREATE + + + SUBMIT + + + APPROVE + + + EXPIRE + + + PURGE + + + + REJECT · REVISE + + + + + + + + STATE + Draft + unpublished + + + + + STATE + In Review + awaiting approval + + + + + STATE + Published + live on site + + + + + STATE + Archived + noindex · hidden + redirect retained + + + + + +
+ +
+
+

THE HEADLINE

+

Published is the win state

+

Everything flows toward Published. The rejection loop is dashed because it's a detour, not a failure — the article is still in-progress.

+
+
+

Reject is a loop, not a dead-end

+
  • Dashed to signal detour
  • Returns to Draft, not a new state
  • Review feedback is the action
+
+
+

Archive keeps the URL

+

Archived preserves the redirect map so inbound links survive. Only Purge removes the record entirely.

+
+
+ + +
+ + diff --git a/assets/example-state.html b/assets/example-state.html new file mode 100644 index 0000000..02276fa --- /dev/null +++ b/assets/example-state.html @@ -0,0 +1,145 @@ + + + + + + Article lifecycle · State machine + + + + +
+

State machine · Diagram Design

+

Article lifecycle

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CREATE + + + SUBMIT + + + APPROVE + + + EXPIRE + + + PURGE + + + + REJECT · REVISE + + + + + + + + STATE + Draft + unpublished + + + + + STATE + In Review + awaiting approval + + + + + STATE + Published + live on site + + + + + STATE + Archived + noindex · hidden + redirect retained + + + + + +
+ + diff --git a/assets/example-swimlane-dark.html b/assets/example-swimlane-dark.html new file mode 100644 index 0000000..34048fc --- /dev/null +++ b/assets/example-swimlane-dark.html @@ -0,0 +1,170 @@ + + + + + + Publishing an article · Swimlane + + + + +
+

Swimlane · Diagram Design

+

Publishing an article

+ + + + + + + + + + + + + + + + + + + + + + + + + AUTHOR + REVIEWER + EDITOR + CI / CD + + + + + + + + + + + + + + + + + + HANDOFF + + + REVISE + + + DEPLOY TRIGGER + + + + + Draft MDX + src/content/… + + + + Open PR + gh pr create + + + + Review content + fact-check · voice + + + + Polish copy + style · line edits + + + + Approve merge + squash · main + + + + Build + astro build + + + + Deploy + cloudflare pages + + + + LEGEND + + + Step + + + Focal outcome + + + Within-lane step + + + Revision loop + + + Critical handoff + +
+ + diff --git a/assets/example-swimlane-full.html b/assets/example-swimlane-full.html new file mode 100644 index 0000000..9650a71 --- /dev/null +++ b/assets/example-swimlane-full.html @@ -0,0 +1,173 @@ + + + + + + Publishing an article · Swimlane + + + + +
+
+

Swimlane · Diagram Design

+

Publishing an article

+

Four actors, seven steps, three handoffs. The step each person owns lives in their lane — arrows crossing lanes are where coordination happens.

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + AUTHOR + REVIEWER + EDITOR + CI / CD + + + + + + + + + + + + + + + + + + HANDOFF + + + REVISE + + + DEPLOY TRIGGER + + + + + Draft MDX + src/content/… + + + + Open PR + gh pr create + + + + Review content + fact-check · voice + + + + Polish copy + style · line edits + + + + Approve merge + squash · main + + + + Build + astro build + + + + Deploy + cloudflare pages + + + + LEGEND + + + Step + + + Focal outcome + + + Within-lane step + + + Revision loop + + + Critical handoff + +
+ +
+
+

THE HEADLINE

+

The deploy trigger is the risky edge

+

Every other step lives inside one person's head. The Editor→CI/CD handoff is where automation takes over and humans lose the ability to undo — hence coral.

+
+
+

One owner per step

+
  • No step crosses two lanes
  • Handoffs are arrows, not shared steps
  • Dashed arrow = revision detour
+
+
+

Uneven step counts are fine

+

The Reviewer lane has one step; CI/CD has two. Lanes don't need to match — they exist to make ownership unambiguous.

+
+
+ + +
+ + diff --git a/assets/example-swimlane.html b/assets/example-swimlane.html new file mode 100644 index 0000000..af2ad80 --- /dev/null +++ b/assets/example-swimlane.html @@ -0,0 +1,170 @@ + + + + + + Publishing an article · Swimlane + + + + +
+

Swimlane · Diagram Design

+

Publishing an article

+ + + + + + + + + + + + + + + + + + + + + + + + + AUTHOR + REVIEWER + EDITOR + CI / CD + + + + + + + + + + + + + + + + + + HANDOFF + + + REVISE + + + DEPLOY TRIGGER + + + + + Draft MDX + src/content/… + + + + Open PR + gh pr create + + + + Review content + fact-check · voice + + + + Polish copy + style · line edits + + + + Approve merge + squash · main + + + + Build + astro build + + + + Deploy + cloudflare pages + + + + LEGEND + + + Step + + + Focal outcome + + + Within-lane step + + + Revision loop + + + Critical handoff + +
+ + diff --git a/assets/example-timeline-dark.html b/assets/example-timeline-dark.html new file mode 100644 index 0000000..ce688e8 --- /dev/null +++ b/assets/example-timeline-dark.html @@ -0,0 +1,133 @@ + + + + + + littlemight milestones · Timeline + + + + +
+

Timeline · Diagram Design

+

littlemight, fourteen months

+ + + + + + + + + + + + + 2025 + 2026 + + + + + + + JAN '26 + + + + + + + + + FEB 2025 + First post + + + + + APR 2025 + Design v1 + + + + + SEP 2025 + Design v2 + typography pass + + + + + JAN 2026 + Design v3 + complexity budget + + + + + APR 2026 · NOW + diagram-design + eight diagram types + + + + LEGEND + + + Event + + + Major milestone + + Spacing is proportional to real elapsed time. + +
+ + diff --git a/assets/example-timeline-full.html b/assets/example-timeline-full.html new file mode 100644 index 0000000..5f94d35 --- /dev/null +++ b/assets/example-timeline-full.html @@ -0,0 +1,136 @@ + + + + + + littlemight milestones · Timeline + + + + +
+
+

Timeline · Diagram Design

+

littlemight, fourteen months

+

Five design moments from the first post to the current diagram-design overhaul. Spacing is proportional to calendar time — the five-month gap between v1 and v2 is genuinely wider on the page.

+
+ +
+ + + + + + + + + + + + 2025 + 2026 + + + + + + + JAN '26 + + + + + + + + + FEB 2025 + First post + + + + + APR 2025 + Design v1 + + + + + SEP 2025 + Design v2 + typography pass + + + + + JAN 2026 + Design v3 + complexity budget + + + + + APR 2026 · NOW + diagram-design + eight diagram types + + + + LEGEND + + + Event + + + Major milestone + + Spacing is proportional to real elapsed time. + +
+ +
+
+

THE HEADLINE

+

v3 set the complexity budget

+

January's design overhaul is the pivot — the rule that no diagram exceeds nine components comes from there, and it's why this skill exists in the form it does.

+
+
+

Honest spacing

+
  • 5 months between v1 and v2
  • 4 months between v2 and v3
  • 3 months between v3 and now
  • Cadence is tightening, not gaming the axis
+
+
+

Alternate label placement

+

Above / below flipping prevents label collision without forcing a second row. Five events on one baseline stays legible.

+
+
+ + +
+ + diff --git a/assets/example-timeline.html b/assets/example-timeline.html new file mode 100644 index 0000000..9a361e4 --- /dev/null +++ b/assets/example-timeline.html @@ -0,0 +1,133 @@ + + + + + + littlemight milestones · Timeline + + + + +
+

Timeline · Diagram Design

+

littlemight, fourteen months

+ + + + + + + + + + + + + 2025 + 2026 + + + + + + + JAN '26 + + + + + + + + + FEB 2025 + First post + + + + + APR 2025 + Design v1 + + + + + SEP 2025 + Design v2 + typography pass + + + + + JAN 2026 + Design v3 + complexity budget + + + + + APR 2026 · NOW + diagram-design + eight diagram types + + + + LEGEND + + + Event + + + Major milestone + + Spacing is proportional to real elapsed time. + +
+ + diff --git a/assets/example-tree-dark.html b/assets/example-tree-dark.html new file mode 100644 index 0000000..eafadd4 --- /dev/null +++ b/assets/example-tree-dark.html @@ -0,0 +1,171 @@ + + + + + + Claude Code skill taxonomy · Tree + + + + +
+

Tree · Diagram Design

+

Claude Code skill taxonomy

+ + + + + + + + + + + + + TIER 0 · ROOT + TIER 1 + TIER 2 + + + + + + + + + + + + + + + + + + + + + + + ROOT + Skills + + + + + + CAT + Design + ui · visual · ux + + + + + + CAT + Engineering + ship · review · test + + + + + + CAT + Research + investigate · analyze + + + + + polish + align · space · rhythm + + + + + critique + hierarchy · density + + + + + review + pre-land diff · sql + + + + + ship + merge · deploy · verify + + + + + investigate + root cause · evidence + + + + LEGEND + + + Root · focal + + + Category branch + + + Leaf skill + + Orthogonal connectors only. Coral marks the root — every branch descends from one idea. + +
+ + diff --git a/assets/example-tree-full.html b/assets/example-tree-full.html new file mode 100644 index 0000000..4dfdda2 --- /dev/null +++ b/assets/example-tree-full.html @@ -0,0 +1,174 @@ + + + + + + Claude Code skill taxonomy · Tree + + + + +
+
+

Tree · Diagram Design

+

Claude Code skill taxonomy

+

Three tiers, one root. The full skill library fans out from a single idea — and every leaf descends through exactly one category. Orthogonal connectors, one coral accent, nothing else.

+
+ +
+ + + + + + + + + + + + TIER 0 · ROOT + TIER 1 + TIER 2 + + + + + + + + + + + + + + + + + + + + + + + ROOT + Skills + + + + + + CAT + Design + ui · visual · ux + + + + + + CAT + Engineering + ship · review · test + + + + + + CAT + Research + investigate · analyze + + + + + polish + align · space · rhythm + + + + + critique + hierarchy · density + + + + + review + pre-land diff · sql + + + + + ship + merge · deploy · verify + + + + + investigate + root cause · evidence + + + + LEGEND + + + Root · focal + + + Category branch + + + Leaf skill + + Orthogonal connectors only. Coral marks the root — every branch descends from one idea. + +
+ +
+
+

THE HEADLINE

+

One root, one coral dot

+

A taxonomy is a promise: every child has exactly one parent. Coral lives on the root because that's the only node the tree is actually about — everything else is a descent.

+
+
+

Connectors are orthogonal

+
  • Parent drops vertical
  • Horizontal bus connects siblings
  • Each child drops into its top edge
  • No diagonals, no curves
+
+
+

Uneven breadth is honest

+

Design and Engineering fan to two leaves; Research drops to one. The layout reflects the real shape of the library, not a forced symmetry.

+
+
+ + +
+ + diff --git a/assets/example-tree.html b/assets/example-tree.html new file mode 100644 index 0000000..33248d9 --- /dev/null +++ b/assets/example-tree.html @@ -0,0 +1,171 @@ + + + + + + Claude Code skill taxonomy · Tree + + + + +
+

Tree · Diagram Design

+

Claude Code skill taxonomy

+ + + + + + + + + + + + + TIER 0 · ROOT + TIER 1 + TIER 2 + + + + + + + + + + + + + + + + + + + + + + + ROOT + Skills + + + + + + CAT + Design + ui · visual · ux + + + + + + CAT + Engineering + ship · review · test + + + + + + CAT + Research + investigate · analyze + + + + + polish + align · space · rhythm + + + + + critique + hierarchy · density + + + + + review + pre-land diff · sql + + + + + ship + merge · deploy · verify + + + + + investigate + root cause · evidence + + + + LEGEND + + + Root · focal + + + Category branch + + + Leaf skill + + Orthogonal connectors only. Coral marks the root — every branch descends from one idea. + +
+ + diff --git a/assets/example-venn-dark.html b/assets/example-venn-dark.html new file mode 100644 index 0000000..3dd57c9 --- /dev/null +++ b/assets/example-venn-dark.html @@ -0,0 +1,130 @@ + + + + + + Good design · Desirable × Feasible × Viable + + + + +
+

Venn · Diagram Design

+

Good design · Desirable × Feasible × Viable

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Desirable + PEOPLE WANT IT + + Feasible + WE CAN BUILD IT + + Viable + BUSINESS SUSTAINS + + + Prototype + no business model + + Vaporware + can't build it + + Internal tool + nobody wants it + + + Shippable + THE SWEET SPOT + + + + LEGEND + + + All three — ship it + + + Two of three — incomplete + + Coral marks the intersection that earns the work. The others name the traps. + +
+ + diff --git a/assets/example-venn-full.html b/assets/example-venn-full.html new file mode 100644 index 0000000..9bd94ea --- /dev/null +++ b/assets/example-venn-full.html @@ -0,0 +1,133 @@ + + + + + + Good design · Desirable × Feasible × Viable + + + + +
+
+

Venn · Diagram Design

+

Good design · Desirable × Feasible × Viable

+

Three tests every product has to pass before it earns the word "shippable." Miss one and you get a prototype, a vaporware demo, or an internal tool nobody asked for. Coral marks the intersection worth the work.

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Desirable + PEOPLE WANT IT + + Feasible + WE CAN BUILD IT + + Viable + BUSINESS SUSTAINS + + + Prototype + no business model + + Vaporware + can't build it + + Internal tool + nobody wants it + + + Shippable + THE SWEET SPOT + + + + LEGEND + + + All three — ship it + + + Two of three — incomplete + + Coral marks the intersection that earns the work. The others name the traps. + +
+ +
+
+

THE HEADLINE

+

One sweet spot, in coral

+

Three overlapping circles create seven regions. Six of them are diagnostic — they name the failure mode. Only the center earns the coral. If every region is colored, the diagram stops prioritizing anything.

+
+
+

The three tests

+
  • Desirable — someone pulls for it
  • Feasible — the team can actually build it
  • Viable — the economics hold up over time
  • All three, or you don't ship
+
+
+

The named traps

+

Prototype (loved, buildable, no model). Vaporware (loved, profitable, un-buildable). Internal tool (buildable, profitable, unloved). Labeling each one makes the map more useful than the center alone.

+
+
+ + +
+ + diff --git a/assets/example-venn.html b/assets/example-venn.html new file mode 100644 index 0000000..4bc13b7 --- /dev/null +++ b/assets/example-venn.html @@ -0,0 +1,137 @@ + + + + + + Good design · Desirable × Feasible × Viable + + + + +
+

Venn · Diagram Design

+

Good design · Desirable × Feasible × Viable

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Desirable + PEOPLE WANT IT + + + Feasible + WE CAN BUILD IT + + + Viable + BUSINESS SUSTAINS + + + + Prototype + no business model + + + Vaporware + can't build it + + + Internal tool + nobody wants it + + + Shippable + THE SWEET SPOT + + + + LEGEND + + + All three — ship it + + + Two of three — incomplete + + Coral marks the intersection that earns the work. The others name the traps. + +
+ + diff --git a/assets/index.html b/assets/index.html new file mode 100644 index 0000000..b8336b0 --- /dev/null +++ b/assets/index.html @@ -0,0 +1,206 @@ + + + + + + Diagram Design · Gallery + + + + +
+
+

Diagram Design · gallery

+ open in new tab ↗ +
+ +
+ + + + + + + + + + + + + +
+ +
+ + + +
+
+ +
+ +
+ + + + diff --git a/assets/template-dark.html b/assets/template-dark.html new file mode 100644 index 0000000..bbc10cd --- /dev/null +++ b/assets/template-dark.html @@ -0,0 +1,79 @@ + + + + + + Diagram + + + + +
+

[Type] · Diagram Design

+

[Diagram title]

+ + + + + + + + + + + + + + + + + +
+ + diff --git a/assets/template-full.html b/assets/template-full.html new file mode 100644 index 0000000..fab791d --- /dev/null +++ b/assets/template-full.html @@ -0,0 +1,403 @@ + + + + + + [PROJECT NAME] Architecture + + + + +
+ + +
+

Architecture · [Date]

+

[Project Name]

+

[One-sentence description of what this diagram shows.]

+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HTTPS + + + + + + + + + + JWT + + + + TLS + + + + + + + + + + EXT + + Users + Browser / Mobile + + + + + + AUTH + Auth Provider + OAuth 2.0 + + + + AWS REGION · US-WEST-2 + + + + + + 01 + + CDN + CloudFront + AWS CDN + + + + + 02 + + S3 + S3 Buckets + bucket-assets + bucket-uploads + OAI PROTECTED + + + + SG · :443 + + + + + + LB + Load Balancer + HTTPS :443 + + + + + + API + API Server + FastAPI :8000 + + + + + + DB + Database + PostgreSQL + + + + + + UI + Web App + React + TypeScript + Astro SSG + + app.example.com + + + + LEGEND + + + Frontend / UI + + + Backend / API + + + Cloud / Service + + + Database + + + External / User + + + + HTTP / API call + + + Auth flow + + + Internal connection + + + Security group + + +
+ + +
+
+
+ +

Card Title 1

+
+
    +
  • Item one
  • +
  • Item two
  • +
  • Item three
  • +
  • Item four
  • +
+
+ +
+
+ +

Card Title 2

+
+
    +
  • Item one
  • +
  • Item two
  • +
  • Item three
  • +
  • Item four
  • +
+
+ +
+
+ +

Card Title 3

+
+
    +
  • Item one
  • +
  • Item two
  • +
  • Item three
  • +
  • Item four
  • +
+
+
+ + + + +
+ + diff --git a/assets/template.html b/assets/template.html new file mode 100644 index 0000000..1a9fefe --- /dev/null +++ b/assets/template.html @@ -0,0 +1,79 @@ + + + + + + Diagram + + + + +
+

[Type] · Diagram Design

+

[Diagram title]

+ + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/screenshots/architecture.png b/docs/screenshots/architecture.png new file mode 100644 index 0000000..ce6c002 Binary files /dev/null and b/docs/screenshots/architecture.png differ diff --git a/docs/screenshots/er.png b/docs/screenshots/er.png new file mode 100644 index 0000000..b0c8823 Binary files /dev/null and b/docs/screenshots/er.png differ diff --git a/docs/screenshots/flowchart.png b/docs/screenshots/flowchart.png new file mode 100644 index 0000000..24de235 Binary files /dev/null and b/docs/screenshots/flowchart.png differ diff --git a/docs/screenshots/layers.png b/docs/screenshots/layers.png new file mode 100644 index 0000000..a7b91fa Binary files /dev/null and b/docs/screenshots/layers.png differ diff --git a/docs/screenshots/nested.png b/docs/screenshots/nested.png new file mode 100644 index 0000000..8d1fff3 Binary files /dev/null and b/docs/screenshots/nested.png differ diff --git a/docs/screenshots/pyramid.png b/docs/screenshots/pyramid.png new file mode 100644 index 0000000..dfbddbf Binary files /dev/null and b/docs/screenshots/pyramid.png differ diff --git a/docs/screenshots/quadrant.png b/docs/screenshots/quadrant.png new file mode 100644 index 0000000..9c4b3d0 Binary files /dev/null and b/docs/screenshots/quadrant.png differ diff --git a/docs/screenshots/sequence.png b/docs/screenshots/sequence.png new file mode 100644 index 0000000..b2c0a1d Binary files /dev/null and b/docs/screenshots/sequence.png differ diff --git a/docs/screenshots/state.png b/docs/screenshots/state.png new file mode 100644 index 0000000..d9c7197 Binary files /dev/null and b/docs/screenshots/state.png differ diff --git a/docs/screenshots/swimlane.png b/docs/screenshots/swimlane.png new file mode 100644 index 0000000..e8bd90c Binary files /dev/null and b/docs/screenshots/swimlane.png differ diff --git a/docs/screenshots/timeline.png b/docs/screenshots/timeline.png new file mode 100644 index 0000000..16aca27 Binary files /dev/null and b/docs/screenshots/timeline.png differ diff --git a/docs/screenshots/tree.png b/docs/screenshots/tree.png new file mode 100644 index 0000000..eb07877 Binary files /dev/null and b/docs/screenshots/tree.png differ diff --git a/docs/screenshots/venn.png b/docs/screenshots/venn.png new file mode 100644 index 0000000..609a67e Binary files /dev/null and b/docs/screenshots/venn.png differ diff --git a/references/onboarding.md b/references/onboarding.md new file mode 100644 index 0000000..06f3f92 --- /dev/null +++ b/references/onboarding.md @@ -0,0 +1,139 @@ +# Onboarding — generate your skin from a website + +**Goal:** point the skill at a site you like (your own, a competitor, a reference), and have it extract the palette + typography, then rewrite `style-guide.md` so every future diagram inherits that skin. + +Takes about 60 seconds. + +--- + +## The flow + +``` +URL you provide + ↓ +[1] fetch homepage (headless browser or HTTP) + ↓ +[2] extract dominant colors + fonts + ↓ +[3] map to semantic roles (paper, ink, muted, accent, …) + ↓ +[4] propose a style-guide.md diff + ↓ +[5] write the diff (with your approval) + ↓ +future diagrams use your tokens +``` + +--- + +## Invocation + +Ask the skill: + +> *"Onboard diagram-design to my site — `https://example.com`"* + +Or run it with an explicit URL and the skill reads this file and executes the steps below. + +--- + +## Step 1 — fetch the page + +Use `agent-browser` (preferred) or a plain `fetch`. If the site has multiple pages worth sampling (landing + blog + product), fetch 2–3 and merge the palette signals. + +```bash +agent-browser navigate https://example.com --screenshot out.png --html out.html +``` + +--- + +## Step 2 — extract colors and fonts + +### Colors + +Parse the rendered CSS and screenshot: + +- **Background color** of `` or the dominant large region → `paper` +- **Primary text color** (body text) → `ink` +- **Secondary text color** (captions, meta) → `muted` +- **Most-used brand color** (CTA button, link, heading accent) → `accent` +- **Container / card background** slightly darker than paper → `paper-2` +- **Border / hairline color** → `rule` (convert to rgba of ink at ~0.12 opacity) + +Prefer CSS custom properties when the site exposes them (`:root { --accent: …; }`). Otherwise pull via rendered `getComputedStyle` samples or a color-histogram pass over the screenshot. + +### Fonts + +Read the rendered `font-family` stack of: +- `

` → `title` family +- `` → `node-name` family +- ``, `
`, or any mono-styled element → `sublabel` family
+
+If the site has only one family, keep the diagram-design defaults for the missing roles (Instrument Serif for title, Geist Mono for mono). Don't force-pick a mono font that isn't on the site.
+
+---
+
+## Step 3 — map to semantic roles
+
+Propose a diff by filling this table:
+
+| Role | Detected | Confidence |
+|---|---|---|
+| paper | `#f8f6f0` | high |
+| ink | `#111111` | high |
+| muted | `#6b6b68` | medium |
+| accent | `#c73a2b` | high |
+| … | … | … |
+
+Flag low-confidence guesses so the user can correct before applying.
+
+### Constraint checks
+
+Before writing, validate:
+
+- **AA contrast**: `ink` on `paper` ≥ 4.5:1. `muted` on `paper` ≥ 4.5:1 for body text.
+- **Accent is the most saturated color**: not muted-ish, not near-grey.
+- **paper ≠ pure white**: if the site uses `#ffffff`, fall back to `#fafaf7` to preserve diagram-design's warm-neutral feel — or ask the user to confirm pure-white is intentional.
+
+If any check fails, propose an adjusted value and explain why.
+
+---
+
+## Step 4 — preview the diff
+
+Show the user what will change in `style-guide.md`. Only the tokens table — everything else stays the same.
+
+```diff
+-| `paper`  | `#f5f4ed` | `#1c1a17` |
+-| `ink`    | `#0b0d0b` | `#f1efe7` |
+-| `accent` | `#f7591f` | `#ff6a30` |
++| `paper`  | `#f8f6f0` | `#1a1815` |
++| `ink`    | `#111111` | `#efeee7` |
++| `accent` | `#c73a2b` | `#e05440` |
+```
+
+Also regenerate the dark variant via the inversion rule (`rgba(11,13,11, X)` → `rgba(ink-rgb, X)`).
+
+---
+
+## Step 5 — apply
+
+Write the new tokens to `style-guide.md`. Suggest running the `/regenerate-examples` flow (if it exists) or rebuilding one example to verify the new skin reads cleanly.
+
+After onboarding, the user should:
+1. Open `assets/index.html` (gallery) and confirm the new palette feels coherent across all 13 types.
+2. If any type looks off, they usually need to tune `muted` (often too dark or too light against the new `paper`).
+
+---
+
+## When onboarding fails
+
+- **Site uses webfonts you can't replicate** (custom-hosted, paid): keep the diagram-design defaults for typography and skin only the colors.
+- **Brand has 6+ colors** and you can't identify a clear hierarchy: pick one as `accent`, demote the rest to `muted` variants or ignore them. The diagram grammar only uses 5–7 roles.
+- **Site is dark-mode first**: flip the inversion — treat their dark paper as the default `paper`, and generate a light variant via inversion.
+- **Homepage is all imagery, no text**: ask for a blog or docs URL instead — text-heavy pages expose the type hierarchy.
+
+---
+
+## Future: per-project skins
+
+If the user wants multiple skins (one per project), duplicate `style-guide.md` as `style-guides/.md` and add a header comment pointing the build to the active one. That's a v1.1 feature — for now, one skin per skill install.
diff --git a/references/primitive-annotation.md b/references/primitive-annotation.md
new file mode 100644
index 0000000..b7ac36c
--- /dev/null
+++ b/references/primitive-annotation.md
@@ -0,0 +1,36 @@
+# Annotation Callout (italic-serif aside)
+
+Use for editorial asides — the "italic pointer" that marks a detail without competing with the primary diagram grammar. Think marginalia: *"structure IS the index"*, *"no imports, no configuration"*.
+
+## Grammar
+
+```svg
+
+no imports, no configuration
+
+
+
+
+```
+
+## Rules
+- Italic + serif together signal "editorial voice" against the diagram's sans/mono body. Don't substitute italic sans or italic mono — the combination is load-bearing.
+- Dashed path (`stroke-dasharray="4,3"`) distinguishes the callout leader from primary arrows (which are solid).
+- Place callouts in margins (top-right, bottom-left). Never inside the active diagram area.
+- Max 2 callouts per diagram. More becomes commentary, not signal.
+
+## Colors
+
+| Intent | Text | Leader |
+|---|---|---|
+| Neutral aside | ink `#0b0d0b` | `rgba(11,13,11,0.40)` |
+| Focal / accent | coral `#f7591f` | `rgba(247,89,31,0.50)` |
+| Tertiary (muted) | muted `#52534e` | `rgba(11,13,11,0.30)` |
+
+## Anti-patterns
+- Solid arrow leader (reads as a flow arrow).
+- Italic sans or italic mono — the serif is load-bearing.
+- Callouts crossing primary arrows / lifelines — offset to a clear margin.
+- Using a callout to label something the diagram should label directly — put the label on the element.
diff --git a/references/primitive-sketchy.md b/references/primitive-sketchy.md
new file mode 100644
index 0000000..a279024
--- /dev/null
+++ b/references/primitive-sketchy.md
@@ -0,0 +1,43 @@
+# Sketchy Filter (hand-drawn variant)
+
+Optional displacement filter that wobbles every stroke and edge slightly — turns any minimal variant into a hand-drawn "editorial" register without changing layout. Use when the diagram accompanies an essay rather than technical docs.
+
+## Grammar
+
+```svg
+
+  
+    
+    
+  
+
+
+
+
+  
+
+
+
+Labels go here
+```
+
+## Tuning
+
+| Parameter | Range | Effect |
+|---|---|---|
+| `baseFrequency` | 0.01–0.04 | Lower = lazy wavy lines; higher = jittery. 0.02 default. |
+| `numOctaves` | 1–3 | More = more noise detail. 2 is plenty. |
+| `scale` | 1–6 | 1 barely-there, 1.5 default, 2 visible, 4+ cartoon. |
+| `seed` | integer | Swap for a different random pattern. |
+
+## Critical rule
+Filter shapes, NOT text. Displacement-mapped text becomes illegible. Structure your SVG so text is in a sibling group outside the filtered group.
+
+## When to use
+- Essay / blog post / newsletter where the diagram is the hero of a narrative page.
+- "Working sketch" register — showing something is mid-thought, not final architecture.
+
+## When not to use
+- Technical documentation (precision matters).
+- Diagrams with dense labels or tight alignments (filter reads as noise).
+- Dark variants — wobble reads as artifact on dark backgrounds. Test first.
diff --git a/references/style-guide.md b/references/style-guide.md
new file mode 100644
index 0000000..717bc59
--- /dev/null
+++ b/references/style-guide.md
@@ -0,0 +1,104 @@
+# Style Guide
+
+**The single source of truth for colors, typography, and tokens.** Every diagram draws from this — not from hex values inlined in other reference files. If you want to change the visual skin of diagram-design, change this file.
+
+Default skin is a neutral editorial palette — warm stone paper, deep charcoal ink, rust accent. It's designed to look good out of the box for any open-source user without matching any specific brand. Swap these values (or run [`onboarding.md`](onboarding.md)) and every new diagram inherits the new skin without touching any type-specific logic.
+
+To generate your own from a website URL, see [`onboarding.md`](onboarding.md).
+
+---
+
+## Tokens
+
+### Semantic roles
+
+Every token is referred to by **semantic role**, not by its hex value. Type references (`type-*.md`) and SKILL.md say `accent`, not `#f7591f`.
+
+| Role | Purpose | Default (light) | Default (dark) |
+|---|---|---|---|
+| `paper` | Page background, default node fill | `#faf7f2` | `#1c1917` |
+| `paper-2` | Diagram container bg, secondary fill | `#f2ede4` | `#292524` |
+| `ink` | Primary text, primary stroke | `#1c1917` | `#faf7f2` |
+| `muted` | Secondary text, default arrow stroke | `#57534e` | `#a8a29e` |
+| `soft` | Sublabels, boundary labels | `#78716c` | `#8e8680` |
+| `rule` | Hairline borders | `rgba(28,25,23,0.12)` | `rgba(250,247,242,0.12)` |
+| `rule-solid` | Stronger borders, baselines | `rgba(120,113,108,0.25)` | `rgba(168,162,158,0.25)` |
+| `accent` | Focal / 1–2 max per diagram | `#b5523a` | `#d6724a` |
+| `accent-tint` | Fill for accent-bordered boxes | `rgba(181,82,58,0.08)` | `rgba(214,114,74,0.10)` |
+| `link` | HTTP/API calls, external arrows | `#2563eb` | `#60a5fa` |
+
+> **Note:** The pre-baked example HTML files in `assets/` were built under an earlier skin. Regenerating them against the current `style-guide.md` is a v1.1 task. New diagrams the skill produces will use the tokens above.
+
+### Inversion rule (light → dark)
+
+Any `rgba(28,25,23, X)` in light becomes `rgba(250,247,242, X)` in dark. Same opacities, RGB flipped. The accent gets a slight hue-shift brighter to read on dark paper.
+
+---
+
+## Typography
+
+| Role | Family | Size | Weight | Usage |
+|---|---|---|---|---|
+| `title` | Instrument Serif | 1.75rem | 400 | Page H1 |
+| `node-name` | Geist (sans) | 12px | 600 | Human-readable labels |
+| `sublabel` | Geist Mono | 9px | 400 | Port, protocol, URL, field type |
+| `eyebrow` | Geist Mono | 7–8px | 500, tracked 0.18em, uppercase | Type tags, axis labels |
+| `arrow-label` | Geist Mono | 8px | 400, tracked 0.06em | Arrow annotations |
+| `callout` | Instrument Serif *italic* | 14px | 400 | Editorial asides only |
+
+### Font stack
+
+```html
+
+```
+
+**Load-bearing rule:** Mono is for *technical* content (ports, commands, URLs, field types). Names go in Geist sans. Page title is Instrument Serif. Italic Instrument Serif is reserved for annotation callouts (see [primitive-annotation.md](primitive-annotation.md)). **Never JetBrains Mono** as a blanket "dev" font.
+
+---
+
+## Stroke, radius, spacing
+
+| Token | Value | Use |
+|---|---|---|
+| `stroke-thin` | `0.8` | Tag-box outlines, leaf nodes |
+| `stroke-default` | `1` | Most strokes |
+| `stroke-strong` | `1.2` | Emphasis strokes |
+| `radius-sm` | `4` | Small tags |
+| `radius-md` | `6` | Node boxes |
+| `radius-lg` | `8` | Containers, rings |
+| `grid` | `4` | Every coord, size, and gap is divisible by 4 (hard rule) |
+
+---
+
+## Node type → treatment
+
+Semantic role combinations — reference these by name in type specs.
+
+| Type | Fill | Stroke |
+|---|---|---|
+| `focal` (1–2 max) | `accent-tint` | `accent` |
+| `backend` | `#ffffff` (white) | `ink` |
+| `store` | `ink @ 0.05` | `muted` |
+| `external` | `ink @ 0.03` | `ink @ 0.30` |
+| `input` | `muted @ 0.10` | `soft` |
+| `optional` | `ink @ 0.02` | `ink @ 0.20` dashed `4,3` |
+| `security` | `accent @ 0.05` | `accent @ 0.50` dashed `4,4` |
+
+---
+
+## Customizing the skin
+
+Three options:
+
+1. **Run onboarding** — see [`onboarding.md`](onboarding.md). Drop a URL; the skill extracts the palette + fonts and rewrites this file.
+2. **Edit by hand** — change the hex values in the tables above. Run the pre-output taste gate afterward to verify the accent still reads as "focal" against the new paper color.
+3. **Brand handoff** — paste your existing design-token JSON into a new section here and map its tokens to the semantic roles above.
+
+### Constraints (don't break these)
+
+- **Contrast**: `ink` must hit WCAG AA on `paper`. `muted` must hit AA on `paper` for 11px+ text.
+- **One accent**: pick one color for `accent`. Two accents erases the focal signal.
+- **No rainbow palette**: if your brand ships 8 colors, pick 3 (paper, ink, accent). The rest become `muted` variants.
+- **Serif + sans + mono**: three families, not more. If brand typography is all sans, keep Instrument Serif for `title` and `callout` anyway — the contrast is load-bearing.
+- **Paper is warm-neutral, not pure white**: pure white turns the design sterile. Pick a cream, bone, or light grey with a hint of warmth.
+- **Dot pattern survives**: the 22×22 dot pattern on the diagram background needs to sit at ~10% opacity of `ink` on `paper` — verify it's visible but quiet after a skin change.
diff --git a/references/type-architecture.md b/references/type-architecture.md
new file mode 100644
index 0000000..d3b70a6
--- /dev/null
+++ b/references/type-architecture.md
@@ -0,0 +1,20 @@
+# Architecture
+
+**Best for:** system overviews, data-flow diagrams, integration maps, infra topology.
+
+## Layout conventions
+- Group components by tier or trust boundary (frontend → backend → data; public → private).
+- Primary flow runs left→right or top→down. Pick one and hold it.
+- Draw arrows before boxes so z-order puts connections behind components.
+- 1–2 coral focal nodes: the primary integration point, the primary data store, or the key decision node.
+- Dashed boundary rectangles mark regions (VPC, security group, trust zone); labels sit on a paper-colored mask over the boundary line.
+
+## Anti-patterns
+- Every box in coral ("this is important too") — hierarchy collapses.
+- Bidirectional arrow when one direction is obvious from context.
+- Legend floating inside the diagram area.
+
+## Examples
+- `assets/example-architecture.html` — minimal light
+- `assets/example-architecture-dark.html` — minimal dark
+- `assets/example-architecture-full.html` — full editorial
diff --git a/references/type-er.md b/references/type-er.md
new file mode 100644
index 0000000..7d91ffe
--- /dev/null
+++ b/references/type-er.md
@@ -0,0 +1,23 @@
+# ER / Data Model
+
+**Best for:** database schemas, API resource relationships, domain models.
+
+## Layout conventions
+- Each entity is a two-section box:
+  - **Header**: type tag (`ENTITY`) + entity name in Geist.
+  - **Body**: field list in Geist Mono, one per line. PK prefixed with `#`, FK prefixed with `→`.
+- Relationships: lines between entities with cardinality at each end:
+  - `1`, `N`, `0..1`, `1..*` in Geist Mono, 8px, placed 10–12px from the entity edge.
+  - Optional relationship label ("has", "belongs to") centered on the line.
+- Group related entities close; lay out so most relationships are straight lines, not tangles.
+- Coral on the aggregate root or central entity of the model.
+
+## Anti-patterns
+- Drawing an arrow for every FK on a model with dozens — lay out by cluster instead.
+- Inconsistent cardinality notation between ends of the same relationship.
+- Fields padded to equal-height boxes — natural height by content is fine.
+
+## Examples
+- `assets/example-er.html` — minimal light
+- `assets/example-er-dark.html` — minimal dark
+- `assets/example-er-full.html` — full editorial
diff --git a/references/type-flowchart.md b/references/type-flowchart.md
new file mode 100644
index 0000000..1042be7
--- /dev/null
+++ b/references/type-flowchart.md
@@ -0,0 +1,23 @@
+# Flowchart
+
+**Best for:** decision logic, algorithms, user-facing branching flows ("Should I…?"), onboarding routing, support-triage trees.
+
+## Layout conventions
+- Shape carries type, not color:
+  - **Oval** (`rx=20`) — start / end
+  - **Rectangle** (`rx=6`) — step / action
+  - **Diamond** — decision (≤3 exits)
+  - **Small filled ink dot** (`r=4`) — merge point where branches rejoin
+- Flow runs top→down. From a diamond, conventional exits: Yes to the right, No below — but label every outgoing arrow regardless.
+- Use coral on the happy path *or* on the single most consequential decision — never on every decision.
+- If two arrows must cross, use a small arc jump on one so the crossing is readable.
+
+## Anti-patterns
+- Using fill color to signal node type (shape does that).
+- Decision diamond with 4+ exits — refactor into nested diamonds.
+- Unlabeled decision branches.
+
+## Examples
+- `assets/example-flowchart.html` — minimal light
+- `assets/example-flowchart-dark.html` — minimal dark
+- `assets/example-flowchart-full.html` — full editorial
diff --git a/references/type-layers.md b/references/type-layers.md
new file mode 100644
index 0000000..9777b7b
--- /dev/null
+++ b/references/type-layers.md
@@ -0,0 +1,26 @@
+# Layer Stack
+
+**Best for:** OSI model, CSS cascade, context hierarchy, tech stack, abstraction layers, memory hierarchy.
+
+## Layout conventions
+- Horizontal bands stacked vertically. Each layer is a full-width rectangle (same x, same width). 4–6 layers total.
+- Layer height 56–72px, width typically 800–880px inside a 1000px viewBox.
+- Each row contains (left→right):
+  1. **Index tag** on the far left (`L3`, `07`, `APPLICATION`) — Geist Mono 8–9px eyebrow.
+  2. **Layer name** slightly right of center-left — Geist 14–16px 600.
+  3. **Sublabel / note** on the far right — Geist Mono 9–10px muted.
+- Border between layers: 1px hairline `rgba(11,13,11,0.12)`. Outer silhouette 1px ink or muted.
+- Fills: either alternating subtle shades (paper / paper-2) OR all paper with hairline dividers. Pick one and hold it.
+- Direction indicator on the LEFT margin (outside the stack): small up/down arrow + Geist Mono label (`abstraction ↑`, `packets ↓`).
+- Coral on **one** focal layer (stroke + subtle tint fill) — the bottleneck, the pay-rent layer, the one under discussion.
+
+## Anti-patterns
+- Layers that aren't actually hierarchical (use swimlane or architecture).
+- Skipped numbering (missing L4 between L3 and L5 without explanation).
+- Every layer a different color — hierarchy invisible.
+- Inconsistent layer heights without reason.
+
+## Examples
+- `assets/example-layers.html` — minimal light
+- `assets/example-layers-dark.html` — minimal dark
+- `assets/example-layers-full.html` — full editorial
diff --git a/references/type-nested.md b/references/type-nested.md
new file mode 100644
index 0000000..e13134f
--- /dev/null
+++ b/references/type-nested.md
@@ -0,0 +1,22 @@
+# Nested Containment
+
+**Best for:** hierarchy through containment — scope boundaries, CLAUDE.md cascade, trust zones, folder nesting, blast radius. Outer = broader, inner = more specific.
+
+## Layout conventions
+- 3–5 rounded rectangles (`rx=8`), nested with consistent inset padding (24–32px horizontal, 32–36px vertical recommended).
+- Each level labeled at the top-left in Geist Mono eyebrow style (7–8px, letter-spacing 0.14em). Labels sit on a paper-colored mask rect over the ring's top border.
+- Stroke hierarchy: outer rings faint (`rgba(..,0.30–0.45)`), progressing to muted, to ink, to coral at the innermost focal.
+- Fills step up in opacity from outer to inner: `rgba(..,0.015)` → `rgba(..,0.025)` → accent-tint on the innermost.
+- Optional file-icon glyph (folded-corner rect) inside each level hints at scope content.
+- Italic Instrument Serif callouts (see `references/primitive-annotation.md`) — 1–2 max.
+
+## Anti-patterns
+- More than 6 levels (information disappears inward).
+- Irregular padding between levels — unaligned nesting looks accidental.
+- Content inside rings that isn't part of the hierarchy — use a sibling diagram.
+- Coral on multiple levels — hierarchy collapses.
+
+## Examples
+- `assets/example-nested.html` — minimal light
+- `assets/example-nested-dark.html` — minimal dark
+- `assets/example-nested-full.html` — full editorial
diff --git a/references/type-pyramid.md b/references/type-pyramid.md
new file mode 100644
index 0000000..f3f98ef
--- /dev/null
+++ b/references/type-pyramid.md
@@ -0,0 +1,33 @@
+# Pyramid / Funnel
+
+**Best for:** hierarchy of needs, prioritization ranks, value pyramids, conversion funnels, content importance stacks.
+
+## Two orientations — pick one
+- **Pyramid** (point up) — narrow apex = most important / rarest / most valuable. Base is broadest / foundational.
+- **Funnel** (point down) — narrow end = conversion (smallest group). Top is widest / audience.
+
+Don't mix orientations on one diagram.
+
+## Layout conventions
+- 4–6 layers. Each layer is a trapezoid built from an SVG `` with 4 points.
+- Consistent layer height (56–72px).
+- Widths decrease linearly from base to apex (pyramid) or top to bottom (funnel). When showing real funnel data, widths must be honest (proportional to count/percentage).
+- Each layer has:
+  - **Name label** centered inside the trapezoid — Geist 12–14px 600.
+  - **Sublabel** below or beside the name — Geist Mono 9–10px.
+  - **Side annotation** (right or left) — optional. For funnels: drop-off percentage here (`−40%`).
+- Fill: subtle graded tints OR all paper-2 with hairline dividers (cleaner). Pick one.
+- Stroke: 1px hairline between layers; outer silhouette 1px muted or ink.
+- **Coral on ONE layer only**: apex of pyramid, conversion layer of funnel, or critical bottleneck.
+- Optional left-margin axis arrow + Geist Mono label (`rarer ↑`, `drop-off ↓`).
+
+## Anti-patterns
+- 7+ layers (illegible — compress or split).
+- Pyramid for non-hierarchical data (use a tree or bar chart).
+- Dishonest widths (fake equal spacing when drops are unequal).
+- Coral on the base layer (dilutes the "apex = rare" signal).
+
+## Examples
+- `assets/example-pyramid.html` — minimal light
+- `assets/example-pyramid-dark.html` — minimal dark
+- `assets/example-pyramid-full.html` — full editorial
diff --git a/references/type-quadrant.md b/references/type-quadrant.md
new file mode 100644
index 0000000..1cc9ac4
--- /dev/null
+++ b/references/type-quadrant.md
@@ -0,0 +1,20 @@
+# Quadrant
+
+**Best for:** prioritization (Impact × Effort), positioning (Reach × Frequency), portfolio maps, 2×2 decision frames.
+
+## Layout conventions
+- 2×2 grid. Axis lines: 1px ink cross through the center.
+- Axis labels at the *ends* of each axis (e.g., `HIGH IMPACT →` on the right, `LOW IMPACT ←` on the left — Geist Mono eyebrow). Never label at the midpoint.
+- Items: small labeled dots (`r=4`) positioned in the quadrants. Labels 8–10px away; don't let labels cross axis lines.
+- Coral on the "do first" item (typically top-right).
+- Limit to ~12 items; cluster or split beyond that.
+
+## Anti-patterns
+- Four filled quadrants in different colors — position + label does the work; color noise weakens it.
+- Items placed on axis lines (ambiguous quadrant).
+- Missing axis names.
+
+## Examples
+- `assets/example-quadrant.html` — minimal light
+- `assets/example-quadrant-dark.html` — minimal dark
+- `assets/example-quadrant-full.html` — full editorial
diff --git a/references/type-sequence.md b/references/type-sequence.md
new file mode 100644
index 0000000..7006714
--- /dev/null
+++ b/references/type-sequence.md
@@ -0,0 +1,35 @@
+# Sequence
+
+**Best for:** request/response flows, protocol exchanges, multi-actor interactions over time, API call traces, incident reconstructions.
+
+## Layout conventions
+- Actors as boxes in a horizontal row at the top.
+- **Lifelines**: dashed vertical lines descending from each actor to the bottom.
+- Messages: horizontal arrows between lifelines; time flows top→down.
+- **Activation bar**: narrow rectangle (`w=8`, muted fill, 0.8 hairline stroke) on a lifeline spanning the interval that actor holds control. Stack for nested calls.
+- Self-messages: short U-shaped loop returning to the same lifeline; label right of the loop.
+- Return messages: dashed line in the same color as the originating call.
+- Coral on the primary success response or headline message — one, maybe two.
+
+## Anti-patterns
+- Message arrow pointing *upward* (reverses time — never).
+- Activation bars that never close.
+- Labels sitting over another lifeline — shorten or shift y into a gap.
+- Swimlane-style lanes instead of lifelines (different grammar).
+
+## Lifeline primitive
+```svg
+
+```
+
+## Activation bar primitive
+```svg
+
+```
+
+## Examples
+- `assets/example-sequence.html` — minimal light
+- `assets/example-sequence-dark.html` — minimal dark
+- `assets/example-sequence-full.html` — full editorial
diff --git a/references/type-state.md b/references/type-state.md
new file mode 100644
index 0000000..c5fe97a
--- /dev/null
+++ b/references/type-state.md
@@ -0,0 +1,21 @@
+# State Machine
+
+**Best for:** finite state logic — order status, auth state, connection lifecycle, form wizard, job queue status.
+
+## Layout conventions
+- States are rounded rectangles (`rx=8`), labeled in Geist.
+- **Start**: filled ink dot (`r=6`). **End**: ringed dot (outer `r=8` outline, inner filled `r=5`).
+- Transitions: curved arrows labeled in Geist Mono as `event [guard] / action` (omit sections you don't need).
+- Self-loops curve above the state.
+- Orient along the dominant flow direction (left→right or top→down); rearrange before crossing transitions.
+- Coral on the state the reader should notice — typically the error state, or "happy completion".
+
+## Anti-patterns
+- More transitions than states × 2 → likely two state machines.
+- "From any state" transitions drawn from every state — use a single annotation (`* → Error on timeout`) instead.
+- Unlabeled transitions (the whole point is *what triggers this*).
+
+## Examples
+- `assets/example-state.html` — minimal light
+- `assets/example-state-dark.html` — minimal dark
+- `assets/example-state-full.html` — full editorial
diff --git a/references/type-swimlane.md b/references/type-swimlane.md
new file mode 100644
index 0000000..93f78e1
--- /dev/null
+++ b/references/type-swimlane.md
@@ -0,0 +1,20 @@
+# Swimlane
+
+**Best for:** cross-functional processes, RACI-style flows, vendor handoffs, multi-team shipping workflows.
+
+## Layout conventions
+- Horizontal lanes (or vertical columns) — one per actor/team. Label each lane in the left margin (or top) with a Geist Mono eyebrow.
+- Lane dividers: 1px hairlines.
+- Process steps are rectangles placed inside the lane of the actor performing them; arrows show flow.
+- Handoffs (arrows crossing lane boundaries) are the most important edges — consider coral on the handoff that introduces the most coupling or latency.
+- Don't force equal step count per lane; a lane with one step is fine.
+
+## Anti-patterns
+- Lanes without labels.
+- A step drawn across two lanes (pick one owner).
+- Arrows that snake back and forth — reorder steps so the flow is mostly straight.
+
+## Examples
+- `assets/example-swimlane.html` — minimal light
+- `assets/example-swimlane-dark.html` — minimal dark
+- `assets/example-swimlane-full.html` — full editorial
diff --git a/references/type-timeline.md b/references/type-timeline.md
new file mode 100644
index 0000000..29eb92f
--- /dev/null
+++ b/references/type-timeline.md
@@ -0,0 +1,20 @@
+# Timeline
+
+**Best for:** release history, project milestones, incident timelines, roadmaps, changelog visualizations.
+
+## Layout conventions
+- Horizontal hairline baseline across the middle (`stroke-width=1`).
+- Tick marks at time boundaries (quarters, months, sprints) with date labels below in Geist Mono.
+- Events: small filled circles (`r=4`) on the baseline. Labels alternate above and below to prevent collision, connected to the circle with a 1px hairline drop.
+- Major milestones: coral circle (`r=6`) + bold Geist label.
+- Time scale must be honest: if intervals are non-equal, space the circles non-equally. Don't fake linear spacing for aesthetics. Break the axis visibly if a region is too dense.
+
+## Anti-patterns
+- Equal-spacing events that aren't equally spaced in time.
+- Missing axis labels ("what unit is this?").
+- Crowded labels without vertical offset — illegible.
+
+## Examples
+- `assets/example-timeline.html` — minimal light
+- `assets/example-timeline-dark.html` — minimal dark
+- `assets/example-timeline-full.html` — full editorial
diff --git a/references/type-tree.md b/references/type-tree.md
new file mode 100644
index 0000000..f03baee
--- /dev/null
+++ b/references/type-tree.md
@@ -0,0 +1,24 @@
+# Tree / Hierarchy
+
+**Best for:** org charts, dependency trees, taxonomy, file trees, decision breakdowns, skill trees.
+
+## Layout conventions
+- Root at top, children fan out below (or root at left, children to right).
+- Nodes are small labeled rectangles (`rx=6`), Geist 12px 600 name + optional Geist Mono 9px sublabel. Width 120–180px, height 40–52px.
+- **Connectors are orthogonal (elbow-style), never diagonal.** Parent drops a short vertical line, then a horizontal bus connects siblings, then each child has a short vertical drop into its top edge. 1px muted stroke.
+- Leaf indicator: thinner stroke (0.8) or different fill — OR let terminal position do the work.
+- Max depth: 4 (root + 3 tiers). Max breadth per level: 5.
+- Coral on **one** node: root OR critical leaf. Not both.
+- Draw connectors before nodes.
+
+## Anti-patterns
+- Tree 5+ levels deep on a single page (illegible — split).
+- Nodes of wildly varying widths — pick 2 widths max.
+- Diagonal connector lines.
+- Skipped levels (parent connected to grandchild with no middle).
+- Coral on root AND a leaf.
+
+## Examples
+- `assets/example-tree.html` — minimal light
+- `assets/example-tree-dark.html` — minimal dark
+- `assets/example-tree-full.html` — full editorial
diff --git a/references/type-venn.md b/references/type-venn.md
new file mode 100644
index 0000000..738fc8b
--- /dev/null
+++ b/references/type-venn.md
@@ -0,0 +1,26 @@
+# Venn / Set Overlap
+
+**Best for:** intersection of concepts/domains, shared attributes between categories, "where A meets B", ikigai-style frames (desirable × feasible × viable).
+
+## Layout conventions
+- **Prefer 2 or 3 circles.** Avoid 4+ (unreadable — use a matrix instead).
+- Circle stroke: 1px hairline, color per-set (ink, muted, soft).
+- Circle fill: very low-opacity tint — `rgba(11,13,11,0.04)` for ink set, `rgba(82,83,78,0.05)` for muted. Tints compound naturally in overlap regions.
+- Radii: equal when sets are comparable in size; proportional when sets are meaningfully different. Don't fake equal sizes for aesthetics.
+- **Set labels** placed outside the circle, NEVER crossing the stroke. Geist 12–14px 600 for the set name, optional Geist Mono 9px sublabel.
+- **Intersection labels** placed inside the overlap region, Geist 12px 600, centered. For small overlaps, use a leader line to a label in clear space.
+- **Coral accent** on the ONE focal intersection — the "sweet spot". Either coral label stroke OR clipPath-bounded coral fill tint (`rgba(247,89,31,0.10)`).
+- Circle centers and radii divisible by 4.
+
+## Anti-patterns
+- Unlabeled regions — reader can't tell which set is which.
+- Circles that don't overlap when overlap is the point.
+- Equal-sized circles when sets are obviously different (dishonest).
+- Coral on multiple overlap regions (focal signal dies).
+- Labels sitting on top of circle strokes (illegible).
+- 4+ circles where 2–3 would do.
+
+## Examples
+- `assets/example-venn.html` — minimal light
+- `assets/example-venn-dark.html` — minimal dark
+- `assets/example-venn-full.html` — full editorial