mindforge-cc 11.5.0 → 11.6.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 (177) hide show
  1. package/.agent/mindforge/skill-tdd.md +53 -0
  2. package/.agent/mindforge/skills-index.md +118 -0
  3. package/.agent/mindforge/systematic-debug.md +60 -0
  4. package/.agent/skills/1password-skill/SKILL.md +156 -0
  5. package/.agent/skills/1password-skill/references/cli-examples.md +31 -0
  6. package/.agent/skills/1password-skill/references/get-started.md +21 -0
  7. package/.agent/skills/article-illustrator/SKILL.md +199 -0
  8. package/.agent/skills/article-illustrator/references/prompt-construction.md +426 -0
  9. package/.agent/skills/article-illustrator/references/style-presets.md +80 -0
  10. package/.agent/skills/article-illustrator/references/styles.md +224 -0
  11. package/.agent/skills/article-illustrator/references/usage.md +50 -0
  12. package/.agent/skills/article-illustrator/references/workflow.md +332 -0
  13. package/.agent/skills/arxiv/SKILL.md +275 -0
  14. package/.agent/skills/blogwatcher/SKILL.md +130 -0
  15. package/.agent/skills/code-wiki/SKILL.md +438 -0
  16. package/.agent/skills/code-wiki/templates/README.md +31 -0
  17. package/.agent/skills/code-wiki/templates/architecture.md +30 -0
  18. package/.agent/skills/code-wiki/templates/getting-started.md +47 -0
  19. package/.agent/skills/code-wiki/templates/module.md +38 -0
  20. package/.agent/skills/codebase-inspection/SKILL.md +109 -0
  21. package/.agent/skills/comic-creator/SKILL.md +240 -0
  22. package/.agent/skills/comic-creator/references/analysis-framework.md +176 -0
  23. package/.agent/skills/comic-creator/references/auto-selection.md +71 -0
  24. package/.agent/skills/comic-creator/references/base-prompt.md +98 -0
  25. package/.agent/skills/comic-creator/references/character-template.md +180 -0
  26. package/.agent/skills/comic-creator/references/ohmsha-guide.md +85 -0
  27. package/.agent/skills/comic-creator/references/partial-workflows.md +106 -0
  28. package/.agent/skills/comic-creator/references/storyboard-template.md +143 -0
  29. package/.agent/skills/comic-creator/references/workflow.md +401 -0
  30. package/.agent/skills/concept-diagrams/SKILL.md +355 -0
  31. package/.agent/skills/concept-diagrams/references/dashboard-patterns.md +43 -0
  32. package/.agent/skills/concept-diagrams/references/infrastructure-patterns.md +144 -0
  33. package/.agent/skills/concept-diagrams/references/physical-shape-cookbook.md +42 -0
  34. package/.agent/skills/creative-ideation/SKILL.md +144 -0
  35. package/.agent/skills/creative-ideation/references/full-prompt-library.md +110 -0
  36. package/.agent/skills/devops-cli/SKILL.md +149 -0
  37. package/.agent/skills/devops-cli/references/app-discovery.md +112 -0
  38. package/.agent/skills/devops-cli/references/authentication.md +59 -0
  39. package/.agent/skills/devops-cli/references/cli-reference.md +104 -0
  40. package/.agent/skills/devops-cli/references/running-apps.md +171 -0
  41. package/.agent/skills/devops-watchers/SKILL.md +103 -0
  42. package/.agent/skills/docker-management/SKILL.md +273 -0
  43. package/.agent/skills/domain-intel/SKILL.md +96 -0
  44. package/.agent/skills/duckduckgo-search/SKILL.md +230 -0
  45. package/.agent/skills/github-auth/SKILL.md +240 -0
  46. package/.agent/skills/github-code-review/SKILL.md +474 -0
  47. package/.agent/skills/github-code-review/references/review-output-template.md +74 -0
  48. package/.agent/skills/github-issues/SKILL.md +363 -0
  49. package/.agent/skills/github-issues/templates/bug-report.md +35 -0
  50. package/.agent/skills/github-issues/templates/feature-request.md +31 -0
  51. package/.agent/skills/github-pr-workflow/SKILL.md +360 -0
  52. package/.agent/skills/github-pr-workflow/references/ci-troubleshooting.md +183 -0
  53. package/.agent/skills/github-pr-workflow/references/conventional-commits.md +71 -0
  54. package/.agent/skills/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
  55. package/.agent/skills/github-pr-workflow/templates/pr-body-feature.md +33 -0
  56. package/.agent/skills/github-repo-management/SKILL.md +509 -0
  57. package/.agent/skills/github-repo-management/references/github-api-cheatsheet.md +161 -0
  58. package/.agent/skills/godmode/SKILL.md +396 -0
  59. package/.agent/skills/godmode/references/jailbreak-templates.md +128 -0
  60. package/.agent/skills/godmode/references/refusal-detection.md +142 -0
  61. package/.agent/skills/hyperframes/SKILL.md +182 -0
  62. package/.agent/skills/hyperframes/references/cli.md +185 -0
  63. package/.agent/skills/hyperframes/references/composition.md +129 -0
  64. package/.agent/skills/hyperframes/references/features.md +289 -0
  65. package/.agent/skills/hyperframes/references/gsap.md +136 -0
  66. package/.agent/skills/hyperframes/references/troubleshooting.md +137 -0
  67. package/.agent/skills/hyperframes/references/website-to-video.md +145 -0
  68. package/.agent/skills/jupyter-live-kernel/SKILL.md +160 -0
  69. package/.agent/skills/kanban-orchestrator/SKILL.md +209 -0
  70. package/.agent/skills/kanban-worker/SKILL.md +188 -0
  71. package/.agent/skills/llm-wiki/SKILL.md +499 -0
  72. package/.agent/skills/meme-generation/SKILL.md +122 -0
  73. package/.agent/skills/node-inspect-debugger/SKILL.md +312 -0
  74. package/.agent/skills/obsidian/SKILL.md +60 -0
  75. package/.agent/skills/osint-investigation/SKILL.md +269 -0
  76. package/.agent/skills/osint-investigation/templates/source-template.md +59 -0
  77. package/.agent/skills/oss-forensics/SKILL.md +422 -0
  78. package/.agent/skills/oss-forensics/references/evidence-types.md +89 -0
  79. package/.agent/skills/oss-forensics/references/github-archive-guide.md +184 -0
  80. package/.agent/skills/oss-forensics/references/investigation-templates.md +131 -0
  81. package/.agent/skills/oss-forensics/references/recovery-techniques.md +164 -0
  82. package/.agent/skills/oss-forensics/templates/forensic-report.md +151 -0
  83. package/.agent/skills/oss-forensics/templates/malicious-package-report.md +43 -0
  84. package/.agent/skills/parallel-cli/SKILL.md +384 -0
  85. package/.agent/skills/pinggy-tunnel/SKILL.md +302 -0
  86. package/.agent/skills/pixel-art/SKILL.md +209 -0
  87. package/.agent/skills/pixel-art/references/palettes.md +49 -0
  88. package/.agent/skills/plan/SKILL.md +331 -0
  89. package/.agent/skills/polymarket/SKILL.md +75 -0
  90. package/.agent/skills/polymarket/references/api-endpoints.md +220 -0
  91. package/.agent/skills/python-debugpy/SKILL.md +368 -0
  92. package/.agent/skills/requesting-code-review/SKILL.md +273 -0
  93. package/.agent/skills/research-paper-writing/SKILL.md +2367 -0
  94. package/.agent/skills/research-paper-writing/references/autoreason-methodology.md +394 -0
  95. package/.agent/skills/research-paper-writing/references/checklists.md +434 -0
  96. package/.agent/skills/research-paper-writing/references/citation-workflow.md +563 -0
  97. package/.agent/skills/research-paper-writing/references/experiment-patterns.md +728 -0
  98. package/.agent/skills/research-paper-writing/references/human-evaluation.md +476 -0
  99. package/.agent/skills/research-paper-writing/references/paper-types.md +481 -0
  100. package/.agent/skills/research-paper-writing/references/reviewer-guidelines.md +433 -0
  101. package/.agent/skills/research-paper-writing/references/sources.md +191 -0
  102. package/.agent/skills/research-paper-writing/references/writing-guide.md +474 -0
  103. package/.agent/skills/research-paper-writing/templates/README.md +251 -0
  104. package/.agent/skills/rest-graphql-debug/SKILL.md +507 -0
  105. package/.agent/skills/s6-container-supervision/SKILL.md +171 -0
  106. package/.agent/skills/scrapling/SKILL.md +328 -0
  107. package/.agent/skills/sherlock/SKILL.md +186 -0
  108. package/.agent/skills/simplify-code/SKILL.md +168 -0
  109. package/.agent/skills/skill-authoring/SKILL.md +158 -0
  110. package/.agent/skills/spike/SKILL.md +190 -0
  111. package/.agent/skills/subagent-driven-development/SKILL.md +345 -0
  112. package/.agent/skills/subagent-driven-development/references/context-budget-discipline.md +53 -0
  113. package/.agent/skills/subagent-driven-development/references/gates-taxonomy.md +93 -0
  114. package/.agent/skills/systematic-debugging/SKILL.md +360 -0
  115. package/.agent/skills/test-driven-development/SKILL.md +336 -0
  116. package/.agent/skills/video-orchestrator/SKILL.md +194 -0
  117. package/.agent/skills/video-orchestrator/references/examples.md +227 -0
  118. package/.agent/skills/video-orchestrator/references/intake.md +166 -0
  119. package/.agent/skills/video-orchestrator/references/kanban-setup.md +278 -0
  120. package/.agent/skills/video-orchestrator/references/monitoring.md +180 -0
  121. package/.agent/skills/video-orchestrator/references/role-archetypes.md +298 -0
  122. package/.agent/skills/video-orchestrator/references/tool-matrix.md +317 -0
  123. package/.agent/skills/web-pentest/SKILL.md +332 -0
  124. package/.agent/skills/web-pentest/references/bypass-techniques.md +133 -0
  125. package/.agent/skills/web-pentest/references/exploitation-techniques.md +204 -0
  126. package/.agent/skills/web-pentest/references/scope-enforcement.md +110 -0
  127. package/.agent/skills/web-pentest/references/vuln-taxonomy.md +81 -0
  128. package/.agent/skills/web-pentest/templates/authorization.md +69 -0
  129. package/.agent/skills/web-pentest/templates/pentest-report.md +178 -0
  130. package/.claude/commands/mindforge/skill-tdd.md +53 -0
  131. package/.claude/commands/mindforge/skills-index.md +118 -0
  132. package/.claude/commands/mindforge/systematic-debug.md +60 -0
  133. package/.mindforge/config.json +2 -2
  134. package/.mindforge/memory/sync-manifest.json +1 -1
  135. package/.mindforge/skills/arxiv/SKILL.md +294 -0
  136. package/.mindforge/skills/blogwatcher/SKILL.md +147 -0
  137. package/.mindforge/skills/code-wiki/SKILL.md +457 -0
  138. package/.mindforge/skills/codebase-inspection/SKILL.md +126 -0
  139. package/.mindforge/skills/concept-diagrams/SKILL.md +373 -0
  140. package/.mindforge/skills/creative-ideation/SKILL.md +162 -0
  141. package/.mindforge/skills/domain-intel/SKILL.md +116 -0
  142. package/.mindforge/skills/duckduckgo-search/SKILL.md +249 -0
  143. package/.mindforge/skills/github-code-review/SKILL.md +493 -0
  144. package/.mindforge/skills/github-issues/SKILL.md +382 -0
  145. package/.mindforge/skills/github-pr-workflow/SKILL.md +379 -0
  146. package/.mindforge/skills/jupyter-live-kernel/SKILL.md +179 -0
  147. package/.mindforge/skills/kanban-orchestrator/SKILL.md +227 -0
  148. package/.mindforge/skills/kanban-worker/SKILL.md +206 -0
  149. package/.mindforge/skills/meme-generation/SKILL.md +141 -0
  150. package/.mindforge/skills/obsidian/SKILL.md +80 -0
  151. package/.mindforge/skills/osint-investigation/SKILL.md +288 -0
  152. package/.mindforge/skills/oss-forensics/SKILL.md +421 -0
  153. package/.mindforge/skills/pixel-art/SKILL.md +228 -0
  154. package/.mindforge/skills/plan/SKILL.md +350 -0
  155. package/.mindforge/skills/requesting-code-review/SKILL.md +292 -0
  156. package/.mindforge/skills/research-paper-writing/SKILL.md +2384 -0
  157. package/.mindforge/skills/scrapling/SKILL.md +345 -0
  158. package/.mindforge/skills/sherlock/SKILL.md +203 -0
  159. package/.mindforge/skills/simplify-code/SKILL.md +187 -0
  160. package/.mindforge/skills/spike/SKILL.md +209 -0
  161. package/.mindforge/skills/subagent-driven-development/SKILL.md +364 -0
  162. package/.mindforge/skills/systematic-debugging/SKILL.md +379 -0
  163. package/.mindforge/skills/test-driven-development/SKILL.md +355 -0
  164. package/.mindforge/skills/web-pentest/SKILL.md +327 -0
  165. package/CHANGELOG.md +88 -0
  166. package/MINDFORGE.md +3 -3
  167. package/README.md +38 -3
  168. package/RELEASENOTES.md +100 -0
  169. package/bin/dashboard/api-router.js +10 -1
  170. package/bin/governance/approve.js +5 -1
  171. package/bin/memory/federated-sync.js +11 -2
  172. package/bin/memory/knowledge-capture.js +10 -1
  173. package/bin/memory/pillar-health-tracker.js +9 -1
  174. package/bin/review/ads-engine.js +2 -2
  175. package/bin/security/trust-boundaries.js +5 -0
  176. package/docs/getting-started.md +42 -5
  177. package/package.json +1 -1
@@ -0,0 +1,355 @@
1
+ ---
2
+ name: concept-diagrams
3
+ description: Generate flat, minimal light/dark-aware SVG diagrams as standalone HTML files, using a unified educational visual language with 9 semantic color ramps, sentence-case typography, and automatic dark mode. Best suited for educational and non-software visuals — physics setups, chemistry mechanisms, math curves, physical objects (aircraft, turbines, smartphones, mechanical watches), anatomy, floor plans, cross-sections, narrative journeys (lifecycle of X, process of Y), hub-spoke system integrations (smart city, IoT), and exploded layer views. If a more specialized skill exists for the subject (dedicated software/cloud architecture, hand-drawn sketches, animated explainers, etc.), prefer that — otherwise this skill can also serve as a general-purpose SVG diagram fallback with a clean educational look. Ships with 15 example diagrams.
4
+ version: 0.1.0
5
+ dependencies: []
6
+ ---
7
+
8
+ # Concept Diagrams
9
+
10
+ Generate production-quality SVG diagrams with a unified flat, minimal design system. Output is a single self-contained HTML file that renders identically in any modern browser, with automatic light/dark mode.
11
+
12
+ ## Scope
13
+
14
+ **Best suited for:**
15
+ - Physics setups, chemistry mechanisms, math curves, biology
16
+ - Physical objects (aircraft, turbines, smartphones, mechanical watches, cells)
17
+ - Anatomy, cross-sections, exploded layer views
18
+ - Floor plans, architectural conversions
19
+ - Narrative journeys (lifecycle of X, process of Y)
20
+ - Hub-spoke system integrations (smart city, IoT networks, electricity grids)
21
+ - Educational / textbook-style visuals in any domain
22
+ - Quantitative charts (grouped bars, energy profiles)
23
+
24
+ **Look elsewhere first for:**
25
+ - Dedicated software / cloud infrastructure architecture with a dark tech aesthetic (consider `architecture-diagram` if available)
26
+ - Hand-drawn whiteboard sketches (consider `excalidraw` if available)
27
+ - Animated explainers or video output (consider an animation skill)
28
+
29
+ If a more specialized skill is available for the subject, prefer that. If none fits, this skill can serve as a general-purpose SVG diagram fallback — the output will carry the clean educational aesthetic described below, which is a reasonable default for almost any subject.
30
+
31
+ ## Workflow
32
+
33
+ 1. Decide on the diagram type (see Diagram Types below).
34
+ 2. Lay out components using the Design System rules.
35
+ 3. Write the full HTML page using `templates/template.html` as the wrapper — paste your SVG where the template says `<!-- PASTE SVG HERE -->`.
36
+ 4. Save as a standalone `.html` file (for example `~/my-diagram.html` or `./my-diagram.html`).
37
+ 5. User opens it directly in a browser — no server, no dependencies.
38
+
39
+ Optional: if the user wants a browsable gallery of multiple diagrams, see "Local Preview Server" at the bottom.
40
+
41
+ Load the HTML template:
42
+ ```
43
+ skill_view(name="concept-diagrams", file_path="templates/template.html")
44
+ ```
45
+
46
+ The template embeds the full CSS design system (`c-*` color classes, text classes, light/dark variables, arrow marker styles). The SVG you generate relies on these classes being present on the hosting page.
47
+
48
+ ---
49
+
50
+ ## Design System
51
+
52
+ ### Philosophy
53
+
54
+ - **Flat**: no gradients, drop shadows, blur, glow, or neon effects.
55
+ - **Minimal**: show the essential. No decorative icons inside boxes.
56
+ - **Consistent**: same colors, spacing, typography, and stroke widths across every diagram.
57
+ - **Dark-mode ready**: all colors auto-adapt via CSS classes — no per-mode SVG.
58
+
59
+ ### Color Palette
60
+
61
+ 9 color ramps, each with 7 stops. Put the class name on a `<g>` or shape element; the template CSS handles both modes.
62
+
63
+ | Class | 50 (lightest) | 100 | 200 | 400 | 600 | 800 | 900 (darkest) |
64
+ |------------|---------------|---------|---------|---------|---------|---------|---------------|
65
+ | `c-purple` | #EEEDFE | #CECBF6 | #AFA9EC | #7F77DD | #534AB7 | #3C3489 | #26215C |
66
+ | `c-teal` | #E1F5EE | #9FE1CB | #5DCAA5 | #1D9E75 | #0F6E56 | #085041 | #04342C |
67
+ | `c-coral` | #FAECE7 | #F5C4B3 | #F0997B | #D85A30 | #993C1D | #712B13 | #4A1B0C |
68
+ | `c-pink` | #FBEAF0 | #F4C0D1 | #ED93B1 | #D4537E | #993556 | #72243E | #4B1528 |
69
+ | `c-gray` | #F1EFE8 | #D3D1C7 | #B4B2A9 | #888780 | #5F5E5A | #444441 | #2C2C2A |
70
+ | `c-blue` | #E6F1FB | #B5D4F4 | #85B7EB | #378ADD | #185FA5 | #0C447C | #042C53 |
71
+ | `c-green` | #EAF3DE | #C0DD97 | #97C459 | #639922 | #3B6D11 | #27500A | #173404 |
72
+ | `c-amber` | #FAEEDA | #FAC775 | #EF9F27 | #BA7517 | #854F0B | #633806 | #412402 |
73
+ | `c-red` | #FCEBEB | #F7C1C1 | #F09595 | #E24B4A | #A32D2D | #791F1F | #501313 |
74
+
75
+ #### Color Assignment Rules
76
+
77
+ Color encodes **meaning**, not sequence. Never cycle through colors like a rainbow.
78
+
79
+ - Group nodes by **category** — all nodes of the same type share one color.
80
+ - Use `c-gray` for neutral/structural nodes (start, end, generic steps, users).
81
+ - Use **2-3 colors per diagram**, not 6+.
82
+ - Prefer `c-purple`, `c-teal`, `c-coral`, `c-pink` for general categories.
83
+ - Reserve `c-blue`, `c-green`, `c-amber`, `c-red` for semantic meaning (info, success, warning, error).
84
+
85
+ Light/dark stop mapping (handled by the template CSS — just use the class):
86
+ - Light mode: 50 fill + 600 stroke + 800 title / 600 subtitle
87
+ - Dark mode: 800 fill + 200 stroke + 100 title / 200 subtitle
88
+
89
+ ### Typography
90
+
91
+ Only two font sizes. No exceptions.
92
+
93
+ | Class | Size | Weight | Use |
94
+ |-------|------|--------|-----|
95
+ | `th` | 14px | 500 | Node titles, region labels |
96
+ | `ts` | 12px | 400 | Subtitles, descriptions, arrow labels |
97
+ | `t` | 14px | 400 | General text |
98
+
99
+ - **Sentence case always.** Never Title Case, never ALL CAPS.
100
+ - Every `<text>` MUST carry a class (`t`, `ts`, or `th`). No unclassed text.
101
+ - `dominant-baseline="central"` on all text inside boxes.
102
+ - `text-anchor="middle"` for centered text in boxes.
103
+
104
+ **Width estimation (approx):**
105
+ - 14px weight 500: ~8px per character
106
+ - 12px weight 400: ~6.5px per character
107
+ - Always verify: `box_width >= (char_count × px_per_char) + 48` (24px padding each side)
108
+
109
+ ### Spacing & Layout
110
+
111
+ - **ViewBox**: `viewBox="0 0 680 H"` where H = content height + 40px buffer.
112
+ - **Safe area**: x=40 to x=640, y=40 to y=(H-40).
113
+ - **Between boxes**: 60px minimum gap.
114
+ - **Inside boxes**: 24px horizontal padding, 12px vertical padding.
115
+ - **Arrowhead gap**: 10px between arrowhead and box edge.
116
+ - **Single-line box**: 44px height.
117
+ - **Two-line box**: 56px height, 18px between title and subtitle baselines.
118
+ - **Container padding**: 20px minimum inside every container.
119
+ - **Max nesting**: 2-3 levels deep. Deeper gets unreadable at 680px width.
120
+
121
+ ### Stroke & Shape
122
+
123
+ - **Stroke width**: 0.5px on all node borders. Not 1px, not 2px.
124
+ - **Rect rounding**: `rx="8"` for nodes, `rx="12"` for inner containers, `rx="16"` to `rx="20"` for outer containers.
125
+ - **Connector paths**: MUST have `fill="none"`. SVG defaults to `fill: black` otherwise.
126
+
127
+ ### Arrow Marker
128
+
129
+ Include this `<defs>` block at the start of **every** SVG:
130
+
131
+ ```xml
132
+ <defs>
133
+ <marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5"
134
+ markerWidth="6" markerHeight="6" orient="auto-start-reverse">
135
+ <path d="M2 1L8 5L2 9" fill="none" stroke="context-stroke"
136
+ stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
137
+ </marker>
138
+ </defs>
139
+ ```
140
+
141
+ Use `marker-end="url(#arrow)"` on lines. The arrowhead inherits the line color via `context-stroke`.
142
+
143
+ ### CSS Classes (Provided by the Template)
144
+
145
+ The template page provides:
146
+
147
+ - Text: `.t`, `.ts`, `.th`
148
+ - Neutral: `.box`, `.arr`, `.leader`, `.node`
149
+ - Color ramps: `.c-purple`, `.c-teal`, `.c-coral`, `.c-pink`, `.c-gray`, `.c-blue`, `.c-green`, `.c-amber`, `.c-red` (all with automatic light/dark mode)
150
+
151
+ You do **not** need to redefine these — just apply them in your SVG. The template file contains the full CSS definitions.
152
+
153
+ ---
154
+
155
+ ## SVG Boilerplate
156
+
157
+ Every SVG inside the template page starts with this exact structure:
158
+
159
+ ```xml
160
+ <svg width="100%" viewBox="0 0 680 {HEIGHT}" xmlns="http://www.w3.org/2000/svg">
161
+ <defs>
162
+ <marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5"
163
+ markerWidth="6" markerHeight="6" orient="auto-start-reverse">
164
+ <path d="M2 1L8 5L2 9" fill="none" stroke="context-stroke"
165
+ stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
166
+ </marker>
167
+ </defs>
168
+
169
+ <!-- Diagram content here -->
170
+
171
+ </svg>
172
+ ```
173
+
174
+ Replace `{HEIGHT}` with the actual computed height (last element bottom + 40px).
175
+
176
+ ### Node Patterns
177
+
178
+ **Single-line node (44px):**
179
+ ```xml
180
+ <g class="node c-blue">
181
+ <rect x="100" y="20" width="180" height="44" rx="8" stroke-width="0.5"/>
182
+ <text class="th" x="190" y="42" text-anchor="middle" dominant-baseline="central">Service name</text>
183
+ </g>
184
+ ```
185
+
186
+ **Two-line node (56px):**
187
+ ```xml
188
+ <g class="node c-teal">
189
+ <rect x="100" y="20" width="200" height="56" rx="8" stroke-width="0.5"/>
190
+ <text class="th" x="200" y="38" text-anchor="middle" dominant-baseline="central">Service name</text>
191
+ <text class="ts" x="200" y="56" text-anchor="middle" dominant-baseline="central">Short description</text>
192
+ </g>
193
+ ```
194
+
195
+ **Connector (no label):**
196
+ ```xml
197
+ <line x1="200" y1="76" x2="200" y2="120" class="arr" marker-end="url(#arrow)"/>
198
+ ```
199
+
200
+ **Container (dashed or solid):**
201
+ ```xml
202
+ <g class="c-purple">
203
+ <rect x="40" y="92" width="600" height="300" rx="16" stroke-width="0.5"/>
204
+ <text class="th" x="66" y="116">Container label</text>
205
+ <text class="ts" x="66" y="134">Subtitle info</text>
206
+ </g>
207
+ ```
208
+
209
+ ---
210
+
211
+ ## Diagram Types
212
+
213
+ Choose the layout that fits the subject:
214
+
215
+ 1. **Flowchart** — CI/CD pipelines, request lifecycles, approval workflows, data processing. Single-direction flow (top-down or left-right). Max 4-5 nodes per row.
216
+ 2. **Structural / Containment** — Cloud infrastructure nesting, system architecture with layers. Large outer containers with inner regions. Dashed rects for logical groupings.
217
+ 3. **API / Endpoint Map** — REST routes, GraphQL schemas. Tree from root, branching to resource groups, each containing endpoint nodes.
218
+ 4. **Microservice Topology** — Service mesh, event-driven systems. Services as nodes, arrows for communication patterns, message queues between.
219
+ 5. **Data Flow** — ETL pipelines, streaming architectures. Left-to-right flow from sources through processing to sinks.
220
+ 6. **Physical / Structural** — Vehicles, buildings, hardware, anatomy. Use shapes that match the physical form — `<path>` for curved bodies, `<polygon>` for tapered shapes, `<ellipse>`/`<circle>` for cylindrical parts, nested `<rect>` for compartments. See `references/physical-shape-cookbook.md`.
221
+ 7. **Infrastructure / Systems Integration** — Smart cities, IoT networks, multi-domain systems. Hub-spoke layout with central platform connecting subsystems. Semantic line styles (`.data-line`, `.power-line`, `.water-pipe`, `.road`). See `references/infrastructure-patterns.md`.
222
+ 8. **UI / Dashboard Mockups** — Admin panels, monitoring dashboards. Screen frame with nested chart/gauge/indicator elements. See `references/dashboard-patterns.md`.
223
+
224
+ For physical, infrastructure, and dashboard diagrams, load the matching reference file before generating — each one provides ready-made CSS classes and shape primitives.
225
+
226
+ ---
227
+
228
+ ## Validation Checklist
229
+
230
+ Before finalizing any SVG, verify ALL of the following:
231
+
232
+ 1. Every `<text>` has class `t`, `ts`, or `th`.
233
+ 2. Every `<text>` inside a box has `dominant-baseline="central"`.
234
+ 3. Every connector `<path>` or `<line>` used as arrow has `fill="none"`.
235
+ 4. No arrow line crosses through an unrelated box.
236
+ 5. `box_width >= (longest_label_chars × 8) + 48` for 14px text.
237
+ 6. `box_width >= (longest_label_chars × 6.5) + 48` for 12px text.
238
+ 7. ViewBox height = bottom-most element + 40px.
239
+ 8. All content stays within x=40 to x=640.
240
+ 9. Color classes (`c-*`) are on `<g>` or shape elements, never on `<path>` connectors.
241
+ 10. Arrow `<defs>` block is present.
242
+ 11. No gradients, shadows, blur, or glow effects.
243
+ 12. Stroke width is 0.5px on all node borders.
244
+
245
+ ---
246
+
247
+ ## Output & Preview
248
+
249
+ ### Default: standalone HTML file
250
+
251
+ Write a single `.html` file the user can open directly. No server, no dependencies, works offline. Pattern:
252
+
253
+ ```python
254
+ # 1. Load the template
255
+ template = skill_view("concept-diagrams", "templates/template.html")
256
+
257
+ # 2. Fill in title, subtitle, and paste your SVG
258
+ html = template.replace(
259
+ "<!-- DIAGRAM TITLE HERE -->", "SN2 reaction mechanism"
260
+ ).replace(
261
+ "<!-- OPTIONAL SUBTITLE HERE -->", "Bimolecular nucleophilic substitution"
262
+ ).replace(
263
+ "<!-- PASTE SVG HERE -->", svg_content
264
+ )
265
+
266
+ # 3. Write to a user-chosen path (or ./ by default)
267
+ write_file("./sn2-mechanism.html", html)
268
+ ```
269
+
270
+ Tell the user how to open it:
271
+
272
+ ```
273
+ # macOS
274
+ open ./sn2-mechanism.html
275
+ # Linux
276
+ xdg-open ./sn2-mechanism.html
277
+ ```
278
+
279
+ ### Optional: local preview server (multi-diagram gallery)
280
+
281
+ Only use this when the user explicitly wants a browsable gallery of multiple diagrams.
282
+
283
+ **Rules:**
284
+ - Bind to `127.0.0.1` only. Never `0.0.0.0`. Exposing diagrams on all network interfaces is a security hazard on shared networks.
285
+ - Pick a free port (do NOT hard-code one) and tell the user the chosen URL.
286
+ - The server is optional and opt-in — prefer the standalone HTML file first.
287
+
288
+ Recommended pattern (lets the OS pick a free ephemeral port):
289
+
290
+ ```bash
291
+ # Put each diagram in its own folder under .diagrams/
292
+ mkdir -p .diagrams/sn2-mechanism
293
+ # ...write .diagrams/sn2-mechanism/index.html...
294
+
295
+ # Serve on loopback only, free port
296
+ cd .diagrams && python3 -c "
297
+ import http.server, socketserver
298
+ with socketserver.TCPServer(('127.0.0.1', 0), http.server.SimpleHTTPRequestHandler) as s:
299
+ print(f'Serving at http://127.0.0.1:{s.server_address[1]}/')
300
+ s.serve_forever()
301
+ " &
302
+ ```
303
+
304
+ If the user insists on a fixed port, use `127.0.0.1:<port>` — still never `0.0.0.0`. Document how to stop the server (`kill %1` or `pkill -f "http.server"`).
305
+
306
+ ---
307
+
308
+ ## Examples Reference
309
+
310
+ The `examples/` directory ships 15 complete, tested diagrams. Browse them for working patterns before writing a new diagram of a similar type:
311
+
312
+ | File | Type | Demonstrates |
313
+ |------|------|--------------|
314
+ | `hospital-emergency-department-flow.md` | Flowchart | Priority routing with semantic colors |
315
+ | `feature-film-production-pipeline.md` | Flowchart | Phased workflow, horizontal sub-flows |
316
+ | `automated-password-reset-flow.md` | Flowchart | Auth flow with error branches |
317
+ | `autonomous-llm-research-agent-flow.md` | Flowchart | Loop-back arrows, decision branches |
318
+ | `place-order-uml-sequence.md` | Sequence | UML sequence diagram style |
319
+ | `commercial-aircraft-structure.md` | Physical | Paths, polygons, ellipses for realistic shapes |
320
+ | `wind-turbine-structure.md` | Physical cross-section | Underground/above-ground separation, color coding |
321
+ | `smartphone-layer-anatomy.md` | Exploded view | Alternating left/right labels, layered components |
322
+ | `apartment-floor-plan-conversion.md` | Floor plan | Walls, doors, proposed changes in dotted red |
323
+ | `banana-journey-tree-to-smoothie.md` | Narrative journey | Winding path, progressive state changes |
324
+ | `cpu-ooo-microarchitecture.md` | Hardware pipeline | Fan-out, memory hierarchy sidebar |
325
+ | `sn2-reaction-mechanism.md` | Chemistry | Molecules, curved arrows, energy profile |
326
+ | `smart-city-infrastructure.md` | Hub-spoke | Semantic line styles per system |
327
+ | `electricity-grid-flow.md` | Multi-stage flow | Voltage hierarchy, flow markers |
328
+ | `ml-benchmark-grouped-bar-chart.md` | Chart | Grouped bars, dual axis |
329
+
330
+ Load any example with:
331
+ ```
332
+ skill_view(name="concept-diagrams", file_path="examples/<filename>")
333
+ ```
334
+
335
+ ---
336
+
337
+ ## Quick Reference: What to Use When
338
+
339
+ | User says | Diagram type | Suggested colors |
340
+ |-----------|--------------|------------------|
341
+ | "show the pipeline" | Flowchart | gray start/end, purple steps, red errors, teal deploy |
342
+ | "draw the data flow" | Data pipeline (left-right) | gray sources, purple processing, teal sinks |
343
+ | "visualize the system" | Structural (containment) | purple container, teal services, coral data |
344
+ | "map the endpoints" | API tree | purple root, one ramp per resource group |
345
+ | "show the services" | Microservice topology | gray ingress, teal services, purple bus, coral workers |
346
+ | "draw the aircraft/vehicle" | Physical | paths, polygons, ellipses for realistic shapes |
347
+ | "smart city / IoT" | Hub-spoke integration | semantic line styles per subsystem |
348
+ | "show the dashboard" | UI mockup | dark screen, chart colors: teal, purple, coral for alerts |
349
+ | "power grid / electricity" | Multi-stage flow | voltage hierarchy (HV/MV/LV line weights) |
350
+ | "wind turbine / turbine" | Physical cross-section | foundation + tower cutaway + nacelle color-coded |
351
+ | "journey of X / lifecycle" | Narrative journey | winding path, progressive state changes |
352
+ | "layers of X / exploded" | Exploded layer view | vertical stack, alternating labels |
353
+ | "CPU / pipeline" | Hardware pipeline | vertical stages, fan-out to execution ports |
354
+ | "floor plan / apartment" | Floor plan | walls, doors, proposed changes in dotted red |
355
+ | "reaction mechanism" | Chemistry | atoms, bonds, curved arrows, transition state, energy profile |
@@ -0,0 +1,43 @@
1
+ # Dashboard Patterns
2
+
3
+ Building blocks for UI/dashboard mockups inside a concept diagram — admin panels, monitoring dashboards, control interfaces, status displays.
4
+
5
+ ## Pattern
6
+
7
+ A "screen" is a rounded dark rect inside a lighter "frame" rect, with chart/gauge/indicator elements nested on top.
8
+
9
+ ```xml
10
+ <!-- Monitor frame -->
11
+ <rect class="dashboard" x="0" y="0" width="200" height="120" rx="8"/>
12
+ <!-- Screen -->
13
+ <rect class="screen" x="10" y="10" width="180" height="85" rx="4"/>
14
+ <!-- Mini bar chart -->
15
+ <rect class="screen-content" x="18" y="18" width="50" height="35" rx="2"/>
16
+ <rect class="screen-chart" x="22" y="38" width="8" height="12"/>
17
+ <rect class="screen-chart" x="33" y="32" width="8" height="18"/>
18
+ <!-- Gauge -->
19
+ <circle class="screen-bar" cx="100" cy="35" r="12"/>
20
+ <text x="100" y="39" text-anchor="middle" fill="#E8E6DE" style="font-size:8px">78%</text>
21
+ <!-- Status indicators -->
22
+ <circle cx="35" cy="74" r="6" fill="#97C459"/> <!-- green = ok -->
23
+ <circle cx="75" cy="74" r="6" fill="#EF9F27"/> <!-- amber = warning -->
24
+ <circle cx="115" cy="74" r="6" fill="#E24B4A"/> <!-- red = alert -->
25
+ ```
26
+
27
+ ## CSS
28
+
29
+ ```css
30
+ .dashboard { fill: #F1EFE8; stroke: #5F5E5A; stroke-width: 1.5; }
31
+ .screen { fill: #1a1a18; }
32
+ .screen-content { fill: #2C2C2A; }
33
+ .screen-chart { fill: #5DCAA5; }
34
+ .screen-bar { fill: #7F77DD; }
35
+ .screen-alert { fill: #E24B4A; }
36
+ ```
37
+
38
+ ## Tips
39
+
40
+ - Dashboard screens stay dark in both light and dark mode — they represent actual monitor glass.
41
+ - Keep on-screen text small (`font-size:8px` or `10px`) and high-contrast (near-white fill on dark).
42
+ - Use the status triad green/amber/red consistently — OK / warning / alert.
43
+ - A single dashboard usually sits on top of an infrastructure hub diagram as a unified view (see `examples/smart-city-infrastructure.md`).
@@ -0,0 +1,144 @@
1
+ # Infrastructure Patterns
2
+
3
+ Reusable shapes and line styles for infrastructure / systems-integration diagrams (smart cities, IoT networks, industrial systems, multi-domain architectures).
4
+
5
+ ## Layout pattern: hub-spoke
6
+
7
+ - **Central hub**: Hexagon or circle representing the integration platform
8
+ - **Radiating connections**: Data lines from hub to each subsystem with connection dots
9
+ - **Subsystem sections**: Each system (power, water, transport) in its own region
10
+ - **Dashboard on top**: Optional UI mockup showing a unified view (see `dashboard-patterns.md`)
11
+
12
+ ```xml
13
+ <!-- Central hub (hexagon) -->
14
+ <polygon class="iot-hex" points="0,-45 39,-22 39,22 0,45 -39,22 -39,-22"/>
15
+
16
+ <!-- Data lines with connection dots -->
17
+ <path class="data-line" d="M 321 248 L 200 248 L 120 380" stroke-dasharray="4 3"/>
18
+ <circle cx="321" cy="248" r="4" fill="#7F77DD"/>
19
+ ```
20
+
21
+ ## Semantic line styles
22
+
23
+ Use a dedicated CSS class per subsystem so every diagram reads the same way:
24
+
25
+ ```css
26
+ .data-line { stroke: #7F77DD; stroke-width: 2; fill: none; stroke-dasharray: 4 3; }
27
+ .power-line { stroke: #EF9F27; stroke-width: 2; fill: none; }
28
+ .water-pipe { stroke: #378ADD; stroke-width: 4; stroke-linecap: round; fill: none; }
29
+ .road { stroke: #888780; stroke-width: 8; stroke-linecap: round; fill: none; }
30
+ ```
31
+
32
+ ## Power systems
33
+
34
+ **Solar panel (angled):**
35
+ ```xml
36
+ <polygon class="solar-panel" points="0,25 35,8 38,12 3,29"/>
37
+ <line class="solar-frame" x1="12" y1="22" x2="24" y2="13"/>
38
+ ```
39
+
40
+ **Wind turbine:**
41
+ ```xml
42
+ <polygon class="wind-tower" points="20,70 30,70 28,25 22,25"/>
43
+ <circle class="wind-hub" cx="25" cy="18" r="5"/>
44
+ <ellipse class="wind-blade" cx="25" cy="5" rx="3" ry="13"/>
45
+ <ellipse class="wind-blade" cx="14" cy="26" rx="3" ry="13" transform="rotate(-120, 25, 18)"/>
46
+ <ellipse class="wind-blade" cx="36" cy="26" rx="3" ry="13" transform="rotate(120, 25, 18)"/>
47
+ ```
48
+
49
+ **Battery with charge level:**
50
+ ```xml
51
+ <rect class="battery" x="0" y="0" width="45" height="65" rx="5"/>
52
+ <rect x="10" y="-6" width="10" height="8" rx="2" fill="#27500A"/> <!-- terminal -->
53
+ <rect class="battery-level" x="5" y="12" width="35" height="48" rx="3"/> <!-- fill level -->
54
+ ```
55
+
56
+ **Power pylon:**
57
+ ```xml
58
+ <polygon class="pylon" points="30,0 35,0 40,60 25,60"/>
59
+ <line x1="15" y1="10" x2="45" y2="10" stroke="#5F5E5A" stroke-width="3"/>
60
+ <circle cx="18" cy="10" r="3" fill="#FAEEDA" stroke="#854F0B"/> <!-- insulator -->
61
+ ```
62
+
63
+ ## Water systems
64
+
65
+ **Reservoir/dam:**
66
+ ```xml
67
+ <polygon class="reservoir-wall" points="0,60 10,0 70,0 80,60"/>
68
+ <polygon class="water" points="12,10 68,10 68,55 75,55 75,58 5,58 5,55 12,55"/>
69
+ <!-- Wave effect -->
70
+ <path d="M 15 25 Q 25 22 35 25 Q 45 28 55 25" fill="none" stroke="#378ADD" opacity="0.5"/>
71
+ ```
72
+
73
+ **Treatment tank:**
74
+ ```xml
75
+ <ellipse class="treatment-tank" cx="35" cy="45" rx="30" ry="18"/>
76
+ <rect class="treatment-tank" x="5" y="20" width="60" height="25"/>
77
+ <!-- Bubbles -->
78
+ <circle cx="20" cy="32" r="2" fill="#378ADD" opacity="0.6"/>
79
+ ```
80
+
81
+ **Pipe with joint and valve:**
82
+ ```xml
83
+ <path class="pipe" d="M 80 85 L 110 85"/>
84
+ <circle class="pipe-joint" cx="110" cy="85" r="8"/>
85
+ <circle class="valve" cx="95" cy="85" r="6"/>
86
+ ```
87
+
88
+ ## Transport systems
89
+
90
+ **Road with lane markings:**
91
+ ```xml
92
+ <line class="road" x1="0" y1="50" x2="170" y2="50"/>
93
+ <line class="road-mark" x1="10" y1="50" x2="160" y2="50"/>
94
+ ```
95
+
96
+ **Traffic light:**
97
+ ```xml
98
+ <rect class="traffic-light" x="0" y="0" width="14" height="32" rx="3"/>
99
+ <circle class="light-red" cx="7" cy="8" r="4"/>
100
+ <circle class="light-off" cx="7" cy="16" r="4"/>
101
+ <circle class="light-green" cx="7" cy="24" r="4"/>
102
+ ```
103
+
104
+ **Bus:**
105
+ ```xml
106
+ <rect class="bus" x="0" y="0" width="55" height="28" rx="6"/>
107
+ <rect class="bus-window" x="5" y="5" width="12" height="12" rx="2"/>
108
+ <circle cx="14" cy="30" r="6" fill="#2C2C2A"/> <!-- wheel -->
109
+ <circle cx="14" cy="30" r="3" fill="#5F5E5A"/> <!-- hubcap -->
110
+ ```
111
+
112
+ ## Full CSS block (add to the host page or inline <style>)
113
+
114
+ ```css
115
+ /* Power */
116
+ .solar-panel { fill: #3C3489; stroke: #534AB7; stroke-width: 0.5; }
117
+ .wind-tower { fill: #B4B2A9; stroke: #5F5E5A; stroke-width: 1; }
118
+ .wind-blade { fill: #F1EFE8; stroke: #888780; stroke-width: 0.5; }
119
+ .battery { fill: #27500A; stroke: #3B6D11; stroke-width: 1.5; }
120
+ .battery-level { fill: #97C459; }
121
+ .power-line { stroke: #EF9F27; stroke-width: 2; fill: none; }
122
+
123
+ /* Water */
124
+ .reservoir-wall { fill: #B4B2A9; stroke: #5F5E5A; stroke-width: 1; }
125
+ .water { fill: #85B7EB; stroke: #378ADD; stroke-width: 0.5; }
126
+ .pipe { fill: none; stroke: #378ADD; stroke-width: 4; stroke-linecap: round; }
127
+ .pipe-joint { fill: #185FA5; stroke: #0C447C; stroke-width: 1; }
128
+ .valve { fill: #0C447C; stroke: #185FA5; stroke-width: 1; }
129
+
130
+ /* Transport */
131
+ .road { stroke: #888780; stroke-width: 8; fill: none; stroke-linecap: round; }
132
+ .road-mark { stroke: #F1EFE8; stroke-width: 1; stroke-dasharray: 6 4; fill: none; }
133
+ .traffic-light { fill: #444441; stroke: #2C2C2A; stroke-width: 0.5; }
134
+ .light-red { fill: #E24B4A; }
135
+ .light-green { fill: #97C459; }
136
+ .light-off { fill: #2C2C2A; }
137
+ .bus { fill: #E1F5EE; stroke: #0F6E56; stroke-width: 1.5; }
138
+ ```
139
+
140
+ ## Reference examples
141
+
142
+ - `examples/smart-city-infrastructure.md` — hub-spoke with multiple subsystems
143
+ - `examples/electricity-grid-flow.md` — voltage hierarchy, flow markers
144
+ - `examples/wind-turbine-structure.md` — cross-section with legend
@@ -0,0 +1,42 @@
1
+ # Physical Shape Cookbook
2
+
3
+ Guidance for drawing physical objects (vehicles, buildings, hardware, mechanical systems, anatomy) — when rectangles aren't enough.
4
+
5
+ ## Shape selection
6
+
7
+ | Physical form | SVG element | Example use |
8
+ |---------------|-------------|-------------|
9
+ | Curved bodies | `<path>` with Q/C curves | Fuselage, tanks, pipes |
10
+ | Tapered/angular shapes | `<polygon>` | Wings, fins, wedges |
11
+ | Cylindrical/round | `<ellipse>`, `<circle>` | Engines, wheels, buttons |
12
+ | Linear structures | `<line>` | Struts, beams, connections |
13
+ | Internal sections | `<rect>` inside parent | Compartments, rooms |
14
+ | Dashed boundaries | `stroke-dasharray` | Hidden parts, fuel tanks |
15
+
16
+ ## Layering approach
17
+
18
+ 1. Draw outer structure first (fuselage, frame, hull)
19
+ 2. Add internal sections on top (cabins, compartments)
20
+ 3. Add detail elements (engines, wheels, controls)
21
+ 4. Add leader lines with labels
22
+
23
+ ## Semantic CSS classes (instead of c-* ramps)
24
+
25
+ For physical diagrams, define component-specific classes directly rather than applying `c-*` color classes. This makes each part self-documenting and lets you keep a restrained palette:
26
+
27
+ ```css
28
+ .fuselage { fill: #F1EFE8; stroke: #5F5E5A; stroke-width: 1; }
29
+ .wing { fill: #E6F1FB; stroke: #185FA5; stroke-width: 1; }
30
+ .engine { fill: #FAECE7; stroke: #993C1D; stroke-width: 1; }
31
+ ```
32
+
33
+ Add these to a local `<style>` inside the SVG (or extend the host page's `<style>` block). The light-mode/dark-mode pattern still works — use the CSS variables from the template (`var(--bg-secondary)`, `var(--border)`, `var(--text-primary)`) if you want dark-mode awareness.
34
+
35
+ ## Reference examples
36
+
37
+ Look at these example files for working physical-diagram patterns:
38
+
39
+ - `examples/commercial-aircraft-structure.md` — fuselage curves + tapered wings + ellipse engines
40
+ - `examples/wind-turbine-structure.md` — underground foundation, tubular tower, nacelle cutaway
41
+ - `examples/smartphone-layer-anatomy.md` — exploded-view stack with alternating labels
42
+ - `examples/apartment-floor-plan-conversion.md` — walls, doors, windows, proposed changes