geneseed 4.28.0 → 4.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +4 -2
  3. package/SHIPPED.md +2 -2
  4. package/adapters/bob/README.md +1 -1
  5. package/adapters/claude-code/README.md +4 -2
  6. package/adapters/opencode/HOW-OPENCODE-LOADS.md +2 -2
  7. package/adapters/opencode/README.md +18 -2
  8. package/adapters/opencode/plugins/geneseed-activity.js +22 -20
  9. package/adapters/opencode/plugins/geneseed-context.js +155 -18
  10. package/adapters/opencode/plugins/geneseed-guard.js +59 -8
  11. package/adapters/opencode/plugins/geneseed-workflow.js +18 -1
  12. package/adapters/opencode/workflows/_runtime.js +14 -3
  13. package/docs/concepts/enforcement-table.md +5 -4
  14. package/docs/concepts/exclusions.md +3 -3
  15. package/docs/concepts/hooks.md +12 -4
  16. package/docs/concepts/ownership.md +9 -8
  17. package/docs/concepts/skills.md +1 -0
  18. package/docs/guides/set-up-ownership.md +22 -6
  19. package/docs/reference/environment.md +1 -0
  20. package/docs/reference/plugin-activity.md +1 -1
  21. package/docs/reference/plugin-context.md +3 -1
  22. package/docs/reference/plugin-guard.md +1 -1
  23. package/docs/understand/enforced-vs-asked.md +3 -3
  24. package/docs/understand/machine-bob.md +1 -1
  25. package/docs/understand/machine-claude.md +1 -1
  26. package/docs/understand/machine-opencode.md +1 -1
  27. package/harness.config.json +1 -1
  28. package/js/README.md +3 -1
  29. package/js/build/driver.mjs +29 -9
  30. package/js/build/emit-opencode.mjs +12 -10
  31. package/js/build/render.mjs +9 -0
  32. package/js/hosts/done-checks.mjs +134 -0
  33. package/js/hosts/geneseed-dir.mjs +116 -0
  34. package/js/hosts/hooks-context.mjs +19 -0
  35. package/js/hosts/hooks-done.mjs +82 -38
  36. package/js/hosts/hooks-learn.mjs +9 -2
  37. package/js/hosts/hooks-prims.mjs +4 -0
  38. package/js/hosts/hooks.mjs +139 -6
  39. package/js/hosts/hosts.mjs +6 -0
  40. package/js/hosts/native.mjs +1 -1
  41. package/js/hosts/owned.mjs +19 -0
  42. package/js/hosts/ownership-gate.mjs +64 -10
  43. package/js/hosts/settings.mjs +115 -74
  44. package/js/inspect/checks-constitution.mjs +5 -1
  45. package/js/inspect/cost.mjs +1 -1
  46. package/js/inspect/doctor.mjs +2 -1
  47. package/js/inspect/inventory.mjs +1 -1
  48. package/js/inspect/status.mjs +2 -1
  49. package/js/inspect/validate.mjs +2 -1
  50. package/js/lib/json.mjs +70 -0
  51. package/js/maintain/uninstall.mjs +18 -5
  52. package/js/web/gates-api.mjs +2 -2
  53. package/package.json +1 -1
  54. package/registry.json +14 -0
  55. package/src/AGENT.md.tmpl +2 -2
  56. package/src/licenses/i-have-adhd.txt +21 -0
  57. package/src/skills/_checkpoints.md +28 -5
  58. package/src/skills/adhd.md +40 -0
  59. package/src/skills/diagram-design/LICENSE +21 -0
  60. package/src/skills/diagram-design/SKILL.md +392 -0
  61. package/src/skills/diagram-design/THIRD_PARTY_LICENSES.md +134 -0
  62. package/src/skills/diagram-design/VENDOR.md +81 -0
  63. package/src/skills/diagram-design/assets/example-architecture.html +183 -0
  64. package/src/skills/diagram-design/assets/example-venn.html +110 -0
  65. package/src/skills/diagram-design/assets/template-dark.html +99 -0
  66. package/src/skills/diagram-design/assets/template-full.html +421 -0
  67. package/src/skills/diagram-design/assets/template-motion.html +448 -0
  68. package/src/skills/diagram-design/assets/template-terminal.html +188 -0
  69. package/src/skills/diagram-design/assets/template.html +100 -0
  70. package/src/skills/diagram-design/references/animation.md +135 -0
  71. package/src/skills/diagram-design/references/layout-budget.md +97 -0
  72. package/src/skills/diagram-design/references/onboarding.md +368 -0
  73. package/src/skills/diagram-design/references/output-spec.md +277 -0
  74. package/src/skills/diagram-design/references/primitive-annotation.md +36 -0
  75. package/src/skills/diagram-design/references/primitive-icons.md +782 -0
  76. package/src/skills/diagram-design/references/primitive-sketchy.md +43 -0
  77. package/src/skills/diagram-design/references/primitive-terminal.md +76 -0
  78. package/src/skills/diagram-design/references/primitives-core.md +144 -0
  79. package/src/skills/diagram-design/references/profiles.md +183 -0
  80. package/src/skills/diagram-design/references/semantic-patterns.md +154 -0
  81. package/src/skills/diagram-design/references/style-guide.md +232 -0
  82. package/src/skills/diagram-design/references/type-architecture-delta.md +143 -0
  83. package/src/skills/diagram-design/references/type-architecture.md +117 -0
  84. package/src/skills/diagram-design/references/type-axonometric-plan.md +83 -0
  85. package/src/skills/diagram-design/references/type-bar.md +108 -0
  86. package/src/skills/diagram-design/references/type-data-flow.md +371 -0
  87. package/src/skills/diagram-design/references/type-db-schema.md +48 -0
  88. package/src/skills/diagram-design/references/type-dependency.md +44 -0
  89. package/src/skills/diagram-design/references/type-deployment.md +45 -0
  90. package/src/skills/diagram-design/references/type-dp-integration.md +407 -0
  91. package/src/skills/diagram-design/references/type-dp-security-matrix.md +379 -0
  92. package/src/skills/diagram-design/references/type-er.md +25 -0
  93. package/src/skills/diagram-design/references/type-exploded.md +115 -0
  94. package/src/skills/diagram-design/references/type-fishbone.md +75 -0
  95. package/src/skills/diagram-design/references/type-flowchart.md +23 -0
  96. package/src/skills/diagram-design/references/type-gantt.md +45 -0
  97. package/src/skills/diagram-design/references/type-heatmap.md +80 -0
  98. package/src/skills/diagram-design/references/type-high-level.md +470 -0
  99. package/src/skills/diagram-design/references/type-it-state.md +468 -0
  100. package/src/skills/diagram-design/references/type-journey.md +55 -0
  101. package/src/skills/diagram-design/references/type-kanban.md +49 -0
  102. package/src/skills/diagram-design/references/type-layers.md +26 -0
  103. package/src/skills/diagram-design/references/type-line.md +337 -0
  104. package/src/skills/diagram-design/references/type-loop.md +223 -0
  105. package/src/skills/diagram-design/references/type-medallion.md +356 -0
  106. package/src/skills/diagram-design/references/type-nested.md +22 -0
  107. package/src/skills/diagram-design/references/type-org-chart.md +44 -0
  108. package/src/skills/diagram-design/references/type-polar.md +136 -0
  109. package/src/skills/diagram-design/references/type-process.md +490 -0
  110. package/src/skills/diagram-design/references/type-pyramid.md +33 -0
  111. package/src/skills/diagram-design/references/type-quadrant.md +81 -0
  112. package/src/skills/diagram-design/references/type-radar.md +82 -0
  113. package/src/skills/diagram-design/references/type-sankey.md +75 -0
  114. package/src/skills/diagram-design/references/type-scatter.md +276 -0
  115. package/src/skills/diagram-design/references/type-sequence.md +130 -0
  116. package/src/skills/diagram-design/references/type-service-blueprint.md +103 -0
  117. package/src/skills/diagram-design/references/type-state.md +30 -0
  118. package/src/skills/diagram-design/references/type-story-map.md +46 -0
  119. package/src/skills/diagram-design/references/type-swimlane.md +22 -0
  120. package/src/skills/diagram-design/references/type-timeline.md +20 -0
  121. package/src/skills/diagram-design/references/type-tree.md +24 -0
  122. package/src/skills/diagram-design/references/type-treemap.md +137 -0
  123. package/src/skills/diagram-design/references/type-uml-class.md +65 -0
  124. package/src/skills/diagram-design/references/type-venn.md +26 -0
  125. package/src/skills/diagram-design/references/type-wardley.md +39 -0
  126. package/src/skills/diagram-design/references/type-waterfall.md +75 -0
  127. package/src/skills/document-project.md +4 -1
  128. package/src/skills/learn-mode.md +11 -11
  129. package/src/skills/ownership.md +41 -18
  130. package/src/upstreams.json +14 -0
  131. package/themes/_TEMPLATE.json +1 -0
  132. package/themes/biker.json +1 -0
  133. package/themes/commentator.json +1 -0
  134. package/themes/cyberpunk.json +1 -0
  135. package/themes/gamer.json +1 -0
  136. package/themes/imperial.json +1 -0
  137. package/themes/joker.json +1 -0
  138. package/themes/marvin.json +1 -0
  139. package/themes/mean.json +1 -0
  140. package/themes/military.json +1 -0
  141. package/themes/neutral.json +1 -0
  142. package/themes/pirate.json +1 -0
  143. package/themes/sports.json +1 -0
  144. package/themes/verstappen.json +1 -0
  145. package/themes/wizard.json +1 -0
@@ -0,0 +1,100 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Diagram</title>
7
+ <link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&family=Noto+Serif:ital@0;1&family=Noto+Sans+KR:wght@400;500;600&family=Noto+Serif+KR:wght@400&family=Noto+Sans+TC:wght@400;500;600&family=Noto+Serif+TC:wght@400&display=swap" rel="stylesheet">
8
+ <style>
9
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
10
+ :root {
11
+ --color-paper: #f5f5f5; /* white-smoke */
12
+ --color-ink: #2d3142; /* jet-black */
13
+ --color-muted: #4f5d75; /* blue-slate */
14
+ --color-accent: #bf4520; /* burnt-tangerine */
15
+ --font-sans: 'Geist', system-ui, sans-serif;
16
+ --font-serif: 'Instrument Serif', 'Noto Serif', 'Noto Serif KR', serif;
17
+ --font-mono: 'Geist Mono', ui-monospace, monospace;
18
+ }
19
+
20
+ body {
21
+ font-family: var(--font-sans);
22
+ background: var(--color-paper);
23
+ color: var(--color-ink);
24
+ min-height: 100vh;
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+ padding: 3rem 2rem;
29
+ }
30
+
31
+ .frame { max-width: 1200px; width: 100%; }
32
+ /* The SVG holds its readable width (min-width == the viewBox width, so the
33
+ type ramp is never silently scaled down). This wrapper lets a narrow
34
+ screen scroll the diagram instead of the whole page. */
35
+ .diagram-container { width: 100%; overflow-x: auto; }
36
+
37
+ .eyebrow {
38
+ font-family: var(--font-mono);
39
+ font-size: 0.66rem;
40
+ font-weight: 500;
41
+ letter-spacing: 0.18em;
42
+ text-transform: uppercase;
43
+ color: var(--color-muted);
44
+ margin-bottom: 0.5rem;
45
+ }
46
+
47
+ h1 {
48
+ font-family: var(--font-serif);
49
+ font-size: clamp(1.5rem, 2.4vw + 0.75rem, 2rem);
50
+ font-weight: 400;
51
+ letter-spacing: -0.02em;
52
+ line-height: 1.15;
53
+ color: var(--color-ink);
54
+ margin-bottom: 1.5rem;
55
+ }
56
+
57
+ svg { width: 100%; min-width: 960px; display: block; }
58
+ /* Paper has no scrollbar, so the local scroller would clip instead of
59
+ scroll. Let the diagram scale down to the sheet: smaller but whole
60
+ beats sharp but cut off. Must come after the svg rule above - a media
61
+ query adds no specificity, so a later plain rule would win. */
62
+ @media print {
63
+ .diagram-container { overflow-x: visible; }
64
+ svg { min-width: 0; }
65
+ }
66
+ </style>
67
+ </head>
68
+ <body>
69
+ <div class="frame">
70
+ <p class="eyebrow">[Type] · Diagram Design</p>
71
+ <h1>[Diagram title]</h1>
72
+
73
+ <!-- Replace [diagram-slug] with a unique slug for this diagram before export. -->
74
+ <div class="diagram-container">
75
+ <svg viewBox="0 0 960 600" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="[diagram-slug]-title [diagram-slug]-desc">
76
+ <title id="[diagram-slug]-title">[Diagram title]</title>
77
+ <desc id="[diagram-slug]-desc">[One sentence describing what the diagram shows]</desc>
78
+ <defs>
79
+ <marker id="arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#4f5d75"/></marker>
80
+ <marker id="arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#bf4520"/></marker>
81
+ <marker id="arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#2e5aa8"/></marker>
82
+
83
+ <!-- OPTIONAL: dot-pattern background. Uncomment the <pattern> and the second <rect> below if you want the dotted paper look. -->
84
+ <!--
85
+ <pattern id="dots" width="22" height="22" patternUnits="userSpaceOnUse">
86
+ <circle cx="1" cy="1" r="0.9" fill="rgba(45,49,66,0.10)"/>
87
+ </pattern>
88
+ -->
89
+ </defs>
90
+
91
+ <rect width="100%" height="100%" fill="#f5f5f5"/>
92
+ <!-- <rect width="100%" height="100%" fill="url(#dots)" opacity="0.55"/> -->
93
+
94
+ <!-- Draw arrows first, then nodes. Replace with your content. -->
95
+
96
+ </svg>
97
+ </div>
98
+ </div>
99
+ </body>
100
+ </html>
@@ -0,0 +1,135 @@
1
+ # Optional animation
2
+
3
+ Animation explains a complete static diagram; it never supplies missing meaning. Load this reference only when motion is explicitly requested or materially clarifies order, accumulation, evaluation, containment, or propagation. Otherwise use mode `none` and ship static HTML.
4
+
5
+ ## Modes
6
+
7
+ Choose one mode per figure with `data-motion-mode="none|reveal|step|loop"`.
8
+
9
+ | Mode | Behavior | Controls / implementation | Use |
10
+ |---|---|---|---|
11
+ | `none` | Complete stable figure | No JavaScript | Default, print, screenshot, export, reduced-motion fallback with playback controls unavailable |
12
+ | `reveal` | One deterministic autoplay run ending complete | CSS-only for ≤5s; otherwise use the scoped controller | Short ordered explanation; never auto-replay |
13
+ | `step` | Paused semantic states | Minimal inline JS for Play, Pause, Replay, Previous, Next | Teaching, comparison, policy traces |
14
+ | `loop` | One decorative token repeats without changing meaning | CSS-only default | Quiet flow hint; ≥3s cycle |
15
+
16
+ Only `loop` repeats. Queue state, typing, field values, policy outcomes, containment, and audit entries use `reveal` or `step` and finish complete.
17
+
18
+ `reveal` is the sole sanctioned autoplay mode: it may run once on initial load when motion was explicitly requested, then remains complete. It never restarts on viewport re-entry or without an explicit Replay action.
19
+
20
+ ## Static-first enhancement contract
21
+
22
+ 1. **Source is complete.** Every semantic node, label, connector, status, and outcome is visible in the HTML/SVG before enhancement. Only selectors below `.motion-ready` may hide or transform them.
23
+ 2. **Stable capture.** Initial `data-frame="static"`, `?motion=static`, print, no-JS, and standalone SVG export expose the complete frame and hide controls/decorative tokens. Do not capture after an arbitrary delay.
24
+ 3. **CSS owns presentation.** Use CSS transitions/keyframes for appearance and travel. Minimal inline JavaScript is allowed only to bind explicit controls, update step/state attributes, schedule deterministic steps, and update the dedicated live-status region. No fetches, markup injection, path measurement, or mutation of semantic diagram labels or values.
25
+ 4. **One clock.** Use `--motion-fast: 160ms`, `--motion-step: 480ms`, `--motion-hold: 720ms`, and `--motion-total` ≤ `8000ms`; derive delays from integer steps. No randomness, springs, or transition-event timing.
26
+ 5. **Explicit order.** Mark items `data-motion-item data-step="N"` for integer steps 1–8. DOM order follows narrative order. At most two items enter per step.
27
+ 6. **Stable end.** Completion exposes all items and sets `data-frame="end"`. Replay resets to step 0 first. Pause clears the pending timer and resume continues from the same step.
28
+ 7. **Scoped state.** Controls operate on their nearest `[data-motion-root]`; IDs, timers, live regions, and step state never cross figure boundaries.
29
+ 8. **Failure-safe startup.** JavaScript adds `.motion-ready` only after controls are bound and the initial render succeeds. A script error before that point leaves the complete source visible.
30
+
31
+ ## Semantic primitives
32
+
33
+ Every primitive has text, count, symbol, pattern, or outline in addition to color.
34
+
35
+ | Primitive | Mechanism | Static / reduced-motion result | Limit |
36
+ |---|---|---|---|
37
+ | **Path draw** | Decorative duplicate path with `pathLength="1"` and animated dash offset | Base labeled connector remains visible | ≤2 paths; one active |
38
+ | **Staggered reveal** (stage reveal) | `data-motion-item` + opacity/translate ≤8px | All stages visible | ≤8 steps, 12 items |
39
+ | **Queue counter** (queue accumulation) | Stable slots; item reveal plus visible numeric count | Final queue and count visible | ≤5 items; no reorder |
40
+ | **Typing / field population** | Full accessible string; clipped decorative overlay or labeled row reveal | Complete text/fields visible once | ≤32 typed chars or 6 fields |
41
+ | **Policy evaluation** (rule evaluation) | Ordered rule rows with text statuses and a current-row outline | Every state and outcome visible | 3–6 rules; 2 traces |
42
+ | **Flow token** | `aria-hidden` token on a fixed path | Token hidden; connector remains | One token; loop ≥3s |
43
+ | **Containment** | Reveal children, then persistent labeled boundary | Children and boundary visible | One boundary transition |
44
+ | **Audit append** | Chronological rows revealed; stable timestamp/sequence | Complete ordered log visible | ≤5 appended rows |
45
+
46
+ Do not animate layout coordinates, connector routes, `viewBox`, node dimensions, or semantic text. Avoid zoom, parallax, bounce, shake, glow, particles, and indefinite blinking.
47
+
48
+ ```css
49
+ :root {
50
+ --motion-fast: 160ms;
51
+ --motion-step: 480ms;
52
+ --motion-hold: 720ms;
53
+ --motion-total: 3600ms; /* five steps × hold; set this per diagram */
54
+ --motion-ease: cubic-bezier(.2,.8,.2,1);
55
+ }
56
+ .motion-ready [data-motion-item] {
57
+ opacity: .12;
58
+ transform: translateY(8px);
59
+ transition: opacity var(--motion-step) var(--motion-ease),
60
+ transform var(--motion-step) var(--motion-ease);
61
+ }
62
+ .motion-ready [data-motion-item].is-visible,
63
+ .motion-ready[data-frame="end"] [data-motion-item] {
64
+ opacity: 1;
65
+ transform: none;
66
+ }
67
+ [data-motion-controls][hidden] { display: none !important; }
68
+ @media (prefers-reduced-motion: reduce) {
69
+ *, *::before, *::after {
70
+ animation-duration: 0.001ms !important;
71
+ animation-iteration-count: 1 !important;
72
+ transition-duration: 0.001ms !important;
73
+ scroll-behavior: auto !important;
74
+ }
75
+ [data-motion-item] { opacity: 1 !important; transform: none !important; }
76
+ [data-motion-decorative] { display: none !important; }
77
+ [data-motion-controls] { display: none !important; }
78
+ }
79
+ @media print {
80
+ [data-motion-controls], [data-motion-decorative] { display: none !important; }
81
+ [data-motion-item] { opacity: 1 !important; transform: none !important; }
82
+ }
83
+ ```
84
+
85
+ ## Interactive controls and keyboard
86
+
87
+ Every interactive `step` figure provides native buttons for **Play, Pause, Replay, Previous, and Next**, outside the SVG. Use `data-motion-action="play|pause|replay|prev|next"`, ≥44×44px targets, visible focus, disabled state for unavailable actions, and `aria-pressed` for play/pause state.
88
+
89
+ When focus is within the motion root: `ArrowRight` advances, `ArrowLeft` goes back, `Home` resets, `End` completes, `Space` toggles play/pause when focus is not already on a native control, and unmodified `R` replays. Never intercept `R` when Control, Command, or Alt is held. Do not capture keys from inputs, links, or unrelated regions. Never move focus as the frame changes.
90
+
91
+ Provide visible instructions and a scoped `role="status" aria-live="polite" aria-atomic="true"`. Keep that live region inside the motion root but outside `[data-motion-controls]`, so hiding controls for reduced/static states cannot hide announcements. Announce user actions such as “Step 3 of 5: first divergence”; do not announce every autoplay frame. Controls operate only on their nearest `[data-motion-root]`.
92
+
93
+ Use [`assets/template-motion.html`](../assets/template-motion.html) rather than inventing another controller. Its inline controller is the executable implementation contract: copy that script body verbatim. The skin linter rejects modified or additional controllers, even when they carry `data-diagram-controls`. Replace diagram content and slug-prefixed IDs, but preserve the controller and its state/control attributes.
94
+
95
+ ## Reduced motion, color, and accessibility
96
+
97
+ - `prefers-reduced-motion: reduce` initializes at the complete static frame, disables and hides every playback control, hides decorative movement, and exposes `data-motion-state="reduced"` plus status text that playback is unavailable. It never presents partial-step announcements beside a complete frame.
98
+ - The SVG's `<title>` and `<desc>` describe the complete meaning, not the animation. Interaction instructions remain visible HTML text.
99
+ - Decorative overlays carry `aria-hidden="true" focusable="false"`. Semantic text exists once in the accessibility tree.
100
+ - State is never color-only: policy uses symbol + `PASS/FAIL/SKIPPED/NOT REACHED`; queues show counts; active stages use number/label/outline.
101
+ - Nothing flashes or changes luminance more than three times per second.
102
+
103
+ ## Complexity and deterministic timing
104
+
105
+ Motion does not raise the static diagram budget: ≤8 semantic steps (target 3–6), ≤12 marked items, ≤2 simultaneous reveals, ≤2 drawn paths, one flow-token loop, 160–600ms transitions, 400–1200ms holds, ≤24px translation, and 3–8s total autoplay.
106
+
107
+ One scoped exception to the translation limit: a part in an exploded axonometric may travel straight up by exactly its explode distance, the declared `--lift` that `scripts/verify-exploded.py` checks against its geometry (`type-exploded.md`). Nothing else in that figure moves further than 24px, and every other type keeps the limit.
108
+
109
+ Declare `data-step-count`; do not infer steps from transition events. Set `--motion-total` to step count × `--motion-hold` and keep it within the 8-second budget. Use one `setTimeout` chain per root, derive its hold from `--motion-hold`, clear it on Pause/Replay/page hide and immediately after rendering the final step, and never use `setInterval` for semantic playback. Pause when `document.visibilityState` becomes hidden and do not catch up later. `?motion=step&step=N` may expose an exact zero-duration frame for visual regression only when `N` is a non-negative base-10 integer from 0 through `data-step-count`; missing, fractional, negative, and over-budget values leave normal playback in place.
110
+
111
+ The final-state capture contract is synchronous: `?motion=static`, `<html data-motion="static">`, or mode `none` exposes every semantic item, hides controls and decorative overlays, and sets `data-frame="static"`. Wait for `document.fonts.ready` before capture. The rendered clipping verifier uses this same static URL before comparing authored and overflow-released paint. Two captures from the same URL, viewport, fonts, and device scale must be pixel-identical; random delays, generated IDs, clocks, and runtime path measurement are forbidden.
112
+
113
+ ## Export and verification
114
+
115
+ PNG and SVG exports are static final-state artifacts unless the user explicitly requests a named step. Before capture, open `?motion=static`, await `document.fonts.ready`, and assert `data-frame="static"`. SVG extraction omits HTML controls and scripts; source-visible semantic markup keeps the result complete.
116
+
117
+ This copy ships no verifier, so check these by hand. Upstream's verifier checks mode/state declarations, contiguous steps, motion budgets, complete SVG naming, no-JS source visibility, decorative accessibility, the full control set, live status, reduced-motion/print CSS, keyboard handling, page-hide pause, bounded static/test overrides, immediate final-step stop, and exact canonical-controller identity. Root SVG icons marked `aria-hidden="true"` are exempt from diagram naming checks, while the document still needs an accessible SVG (exactly one for the policy-trace example). Its adversarial tests mutate the canonical template to prove each failure is rejected.
118
+
119
+ Then verify in a browser:
120
+
121
+ 1. Disable JavaScript: the complete diagram remains visible and meaningful.
122
+ 2. Emulate `prefers-reduced-motion: reduce`: the final state is complete, playback controls are hidden and disabled, and the DOM status says playback is unavailable.
123
+ 3. Use keyboard only: Tab reaches each native control; Enter/Space operate it; Left/Right/Home/End step without moving focus.
124
+ 4. Pause, resume, and replay twice: ordering and final state are identical.
125
+ 5. Capture `?motion=static` twice after `document.fonts.ready`: pixels are stable.
126
+ 6. Print preview plus PNG/SVG export: controls and decorative tokens are absent, while all semantic labels and relationships remain.
127
+
128
+ ## Anti-patterns
129
+
130
+ - Unrequested autoplay, autoplay outside the single sanctioned `reveal` run, viewport re-entry, or an endless semantic loop.
131
+ - A blank/partial no-JS or reduced-motion frame.
132
+ - Motion that rescues an over-dense or unlabeled static diagram.
133
+ - Pass/fail, queue fullness, or outcome encoded only by hue.
134
+ - Remote scripts, general application logic, runtime geometry, or duplicated semantic text.
135
+ - Capturing at wall-clock delay instead of the explicit static override.
@@ -0,0 +1,97 @@
1
+ # Layout grid, per-type budgets, page layout, and summary cards
2
+
3
+ Routed from SKILL.md §7 and §8. SKILL.md keeps the grid rule in one line, the universal complexity limits, and the split rule. This file holds the full grid table, every per-type budget row, the page layout, and the summary card pattern.
4
+
5
+ ## Layout & Spacing
6
+
7
+ ### 4px grid
8
+
9
+ **Structural geometry, divisible by 4:** node origins, widths, heights, gaps, padding. Off-grid by design: type sizes (role ramp in `references/output-spec.md`), radii, data-derived positions, text baselines, arrow markers, `.5` offsets that keep 1px strokes crisp, stroke widths, opacity, and the 22×22 dot-pattern.
10
+
11
+ | Category | Allowed values |
12
+ |---|---|
13
+ | Node width / height | 80, 96, 112, 120, 128, 140, 144, 160, 180, 200, 240, 320 |
14
+ | Gap between nodes | 20, 24, 32, 40, 48 |
15
+ | Padding inside boxes | 8, 12, 16 |
16
+ | Border radius | 4, 6, 8 |
17
+
18
+ ### Complexity budget (per diagram)
19
+
20
+ These are the per-type limits. The universal rows in SKILL.md §7 (9 nodes, 12 arrows or transitions, 2 coral elements, 2 annotation callouts, and the motion limits) apply to every type on top of these, and a semantic pattern's own budget in [semantic-patterns.md](semantic-patterns.md) can only tighten them.
21
+
22
+ | Limit | Rule |
23
+ |---|---|
24
+ | Max unique components / relationships / ledger entries (architecture delta) | 8 / 10 / 8 |
25
+ | Max admin bands / traffic scopes / nodes (architecture containment) | 2 / 4 / 8 |
26
+ | Max lifelines (sequence) | 5 |
27
+ | Max combined fragments (sequence) | 1 (default); 2 only if each is single-region `opt`/`loop` |
28
+ | Max `alt` regions (sequence) | 2 |
29
+ | Max fragment nesting (sequence) | 1 |
30
+ | Max lanes (swimlane) | 5 |
31
+ | Max items (quadrant) | 12 |
32
+ | Max entities (ER) | 8 |
33
+ | Max nesting levels (nested) | 6 |
34
+ | Max tree depth | 4 |
35
+ | Max org chart depth | 4 |
36
+ | Max org chart nodes | 12 |
37
+ | Max layers (layer stack) | 6 |
38
+ | Max parts / levels / focal parts (exploded axonometric) | 5 / 5 / 1, three detail levels |
39
+ | Max tagged rooms or buildings / boxes / focal (axonometric plan) | 8 / 40 / 1 |
40
+ | Max circles (venn) | 3 |
41
+ | Max layers (pyramid) | 6 |
42
+ | Max radar axes | 5 |
43
+ | Max radar series | 5 |
44
+ | Max focal radar series | 1 |
45
+ | Max polar categories | 8 |
46
+ | Max polar series | 1 |
47
+ | Max focal polar categories | 1 |
48
+ | Max bars (bar chart) | 8 |
49
+ | Max bars (waterfall) | 8 incl. totals, 1 subtotal |
50
+ | Max cells (treemap) | 8 |
51
+ | Max series (line chart) | 5 |
52
+ | Max tasks (Gantt) | 12 |
53
+ | Max points (scatter plot) | 30 |
54
+ | Max series / outliers (box plot) | 8 / 8, 1 focal series |
55
+ | Max stages / nodes / flows (sankey) | 3 / 8 / 12 |
56
+ | Max categories (fishbone) | 6 bones, 3 sub-causes each |
57
+ | Max components / links (wardley) | 9 / 12, 2 movement arrows |
58
+ | Max columns / cards (kanban) | 5 / 12 total, 4 per column |
59
+ | Max stages / rows (user journey) | 6 / 3, 2 pain markers |
60
+ | Max stages / layers (service blueprint) | 6 stages; required customer / frontstage / backstage; optional evidence / support; 1 focal cell |
61
+ | Max zones / nodes / paths (deployment) | 3 / 6 / 8, 9 artifacts |
62
+ | Max nodes / edges (dependency) | 9 / 14, 4 ranks, 1 cycle |
63
+ | Max classes / relationships (UML class) | 7 / 8, 5 members per compartment |
64
+ | Max activities / slices / cards (story map) | 5 / 3 / 12 |
65
+ | Max tables / columns / FKs (db schema) | 5 / 8 shown / 6 |
66
+
67
+ If you exceed, split into two diagrams (overview + detail).
68
+
69
+ ### Page layout
70
+
71
+ 1. **Header** — `eyebrow` role, `title` role, optional subtitle (`node-name` family, `muted`).
72
+ 2. **Diagram container** — default: **clean, borderless**, no background — the SVG sits directly on the page paper. Optional *framed* variant (for card-heavy layouts or hero placements): `paper-2` bg + 1px `rule` border + 8px radius + `1.5rem` padding + `overflow-x: auto`.
73
+ 3. **Summary cards** — 2–3 col grid with *varied* widths (e.g., `1.1fr 1fr 0.9fr`).
74
+ 4. **Footer** — colophon in the `sublabel` role, `muted`, hairline top border.
75
+
76
+ ## Summary Card Pattern
77
+
78
+ Don't use 3 identical generic cards. Vary the treatment:
79
+
80
+ ```html
81
+ <div class="card">
82
+ <p class="eyebrow">SECTION LABEL</p>
83
+ <div class="card-header">
84
+ <span class="card-dot coral"></span>
85
+ <h3>Card Title</h3>
86
+ </div>
87
+ <ul><li>Item</li></ul>
88
+ </div>
89
+ ```
90
+
91
+ Rules:
92
+
93
+ - `background: #ffffff` (not paper — slight lift without shadow)
94
+ - `border: 1px solid` the `rule` color
95
+ - `border-radius: 6px`, `padding: 1.25rem`
96
+ - **No `box-shadow`**
97
+ - Card dots: 7px, `border-radius: 50%` — ink / muted / coral / link / soft variants