@kinqs/brainrouter-mcp-server 0.3.4

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 (337) hide show
  1. package/.env.example +144 -0
  2. package/README.md +56 -0
  3. package/agents/README.md +120 -0
  4. package/agents/code-reviewer.md +97 -0
  5. package/agents/security-auditor.md +101 -0
  6. package/agents/test-engineer.md +95 -0
  7. package/dist/__tests__/agent_mode.test.d.ts +1 -0
  8. package/dist/__tests__/api-routes.test.d.ts +1 -0
  9. package/dist/__tests__/api-routes.test.js +170 -0
  10. package/dist/__tests__/crypto.test.d.ts +1 -0
  11. package/dist/__tests__/crypto.test.js +28 -0
  12. package/dist/__tests__/host-integrations.test.d.ts +1 -0
  13. package/dist/__tests__/host-integrations.test.js +82 -0
  14. package/dist/__tests__/integration.test.d.ts +1 -0
  15. package/dist/__tests__/integration.test.js +50 -0
  16. package/dist/__tests__/loader.test.d.ts +1 -0
  17. package/dist/__tests__/loader.test.js +89 -0
  18. package/dist/__tests__/neural-spark.test.d.ts +1 -0
  19. package/dist/__tests__/neural-spark.test.js +112 -0
  20. package/dist/__tests__/pagination.test.d.ts +1 -0
  21. package/dist/__tests__/pagination.test.js +23 -0
  22. package/dist/__tests__/redaction.test.d.ts +1 -0
  23. package/dist/__tests__/redaction.test.js +17 -0
  24. package/dist/__tests__/registry.test.d.ts +1 -0
  25. package/dist/__tests__/registry.test.js +56 -0
  26. package/dist/__tests__/retry.test.d.ts +1 -0
  27. package/dist/__tests__/retry.test.js +30 -0
  28. package/dist/__tests__/skill-activation.test.d.ts +1 -0
  29. package/dist/__tests__/skill-activation.test.js +112 -0
  30. package/dist/__tests__/working-memory.test.d.ts +1 -0
  31. package/dist/__tests__/working-memory.test.js +200 -0
  32. package/dist/__tests__/workspace-paths.test.d.ts +1 -0
  33. package/dist/__tests__/workspace-paths.test.js +56 -0
  34. package/dist/__tests__/writer.test.d.ts +1 -0
  35. package/dist/__tests__/writer.test.js +94 -0
  36. package/dist/api/auth/crypto.d.ts +4 -0
  37. package/dist/api/auth/crypto.js +54 -0
  38. package/dist/api/middleware/auth.d.ts +12 -0
  39. package/dist/api/middleware/auth.js +90 -0
  40. package/dist/api/pagination.d.ts +18 -0
  41. package/dist/api/pagination.js +32 -0
  42. package/dist/api/routes/auth.d.ts +1 -0
  43. package/dist/api/routes/auth.js +130 -0
  44. package/dist/api/routes/chat-completions.d.ts +7 -0
  45. package/dist/api/routes/chat-completions.js +474 -0
  46. package/dist/api/routes/contradictions.d.ts +1 -0
  47. package/dist/api/routes/contradictions.js +28 -0
  48. package/dist/api/routes/evidence.d.ts +1 -0
  49. package/dist/api/routes/evidence.js +59 -0
  50. package/dist/api/routes/governance.d.ts +1 -0
  51. package/dist/api/routes/governance.js +95 -0
  52. package/dist/api/routes/graph.d.ts +1 -0
  53. package/dist/api/routes/graph.js +25 -0
  54. package/dist/api/routes/hooks.d.ts +1 -0
  55. package/dist/api/routes/hooks.js +88 -0
  56. package/dist/api/routes/memories.d.ts +1 -0
  57. package/dist/api/routes/memories.js +92 -0
  58. package/dist/api/routes/persona.d.ts +1 -0
  59. package/dist/api/routes/persona.js +9 -0
  60. package/dist/api/routes/scenes.d.ts +1 -0
  61. package/dist/api/routes/scenes.js +35 -0
  62. package/dist/api/routes/skills.d.ts +1 -0
  63. package/dist/api/routes/skills.js +14 -0
  64. package/dist/api/routes/stats.d.ts +1 -0
  65. package/dist/api/routes/stats.js +8 -0
  66. package/dist/api/routes/users.d.ts +1 -0
  67. package/dist/api/routes/users.js +82 -0
  68. package/dist/api/routes/working.d.ts +1 -0
  69. package/dist/api/routes/working.js +88 -0
  70. package/dist/index.d.ts +2 -0
  71. package/dist/index.js +492 -0
  72. package/dist/integrations/claude-code.d.ts +12 -0
  73. package/dist/integrations/claude-code.js +35 -0
  74. package/dist/integrations/codex.d.ts +12 -0
  75. package/dist/integrations/codex.js +34 -0
  76. package/dist/integrations/generic-mcp.d.ts +52 -0
  77. package/dist/integrations/generic-mcp.js +118 -0
  78. package/dist/loader.d.ts +29 -0
  79. package/dist/loader.js +200 -0
  80. package/dist/memory/capture.d.ts +35 -0
  81. package/dist/memory/capture.js +230 -0
  82. package/dist/memory/config.d.ts +2 -0
  83. package/dist/memory/config.js +3 -0
  84. package/dist/memory/engine.d.ts +203 -0
  85. package/dist/memory/engine.js +626 -0
  86. package/dist/memory/llm-semaphore.d.ts +41 -0
  87. package/dist/memory/llm-semaphore.js +81 -0
  88. package/dist/memory/memory-type-config.d.ts +11 -0
  89. package/dist/memory/memory-type-config.js +65 -0
  90. package/dist/memory/pipeline/cognitive-contradiction.d.ts +7 -0
  91. package/dist/memory/pipeline/cognitive-contradiction.js +59 -0
  92. package/dist/memory/pipeline/cognitive-dedup.d.ts +23 -0
  93. package/dist/memory/pipeline/cognitive-dedup.js +38 -0
  94. package/dist/memory/pipeline/cognitive-extractor.d.ts +21 -0
  95. package/dist/memory/pipeline/cognitive-extractor.js +183 -0
  96. package/dist/memory/pipeline/contextual-focus-builder.d.ts +13 -0
  97. package/dist/memory/pipeline/contextual-focus-builder.js +135 -0
  98. package/dist/memory/pipeline/focus-direction-shift.d.ts +10 -0
  99. package/dist/memory/pipeline/focus-direction-shift.js +27 -0
  100. package/dist/memory/pipeline/graph-builder.d.ts +11 -0
  101. package/dist/memory/pipeline/graph-builder.js +88 -0
  102. package/dist/memory/pipeline/graph-recall.d.ts +13 -0
  103. package/dist/memory/pipeline/graph-recall.js +55 -0
  104. package/dist/memory/pipeline/identity-distiller.d.ts +15 -0
  105. package/dist/memory/pipeline/identity-distiller.js +40 -0
  106. package/dist/memory/pipeline/l1-contradiction.d.ts +7 -0
  107. package/dist/memory/pipeline/l1-contradiction.js +66 -0
  108. package/dist/memory/pipeline/l1-dedup.d.ts +23 -0
  109. package/dist/memory/pipeline/l1-dedup.js +39 -0
  110. package/dist/memory/pipeline/l1-extractor.d.ts +21 -0
  111. package/dist/memory/pipeline/l1-extractor.js +180 -0
  112. package/dist/memory/pipeline/l2-direction-shift.d.ts +10 -0
  113. package/dist/memory/pipeline/l2-direction-shift.js +27 -0
  114. package/dist/memory/pipeline/l2-scene.d.ts +15 -0
  115. package/dist/memory/pipeline/l2-scene.js +140 -0
  116. package/dist/memory/pipeline/l3-distiller.d.ts +15 -0
  117. package/dist/memory/pipeline/l3-distiller.js +40 -0
  118. package/dist/memory/pipeline/neural-spark.d.ts +27 -0
  119. package/dist/memory/pipeline/neural-spark.js +78 -0
  120. package/dist/memory/pipeline/skill-prewarm.d.ts +63 -0
  121. package/dist/memory/pipeline/skill-prewarm.js +127 -0
  122. package/dist/memory/pipeline/task-queue.d.ts +54 -0
  123. package/dist/memory/pipeline/task-queue.js +117 -0
  124. package/dist/memory/prompts/cognitive-contradiction.d.ts +1 -0
  125. package/dist/memory/prompts/cognitive-contradiction.js +25 -0
  126. package/dist/memory/prompts/cognitive-extraction.d.ts +10 -0
  127. package/dist/memory/prompts/cognitive-extraction.js +114 -0
  128. package/dist/memory/prompts/core-identity.d.ts +6 -0
  129. package/dist/memory/prompts/core-identity.js +60 -0
  130. package/dist/memory/prompts/focus-direction-shift.d.ts +5 -0
  131. package/dist/memory/prompts/focus-direction-shift.js +32 -0
  132. package/dist/memory/prompts/focus-scene-cluster.d.ts +2 -0
  133. package/dist/memory/prompts/focus-scene-cluster.js +33 -0
  134. package/dist/memory/prompts/focus-scene.d.ts +7 -0
  135. package/dist/memory/prompts/focus-scene.js +40 -0
  136. package/dist/memory/prompts/graph-extraction-batch.d.ts +14 -0
  137. package/dist/memory/prompts/graph-extraction-batch.js +54 -0
  138. package/dist/memory/prompts/graph-extraction.d.ts +2 -0
  139. package/dist/memory/prompts/graph-extraction.js +53 -0
  140. package/dist/memory/prompts/l1-contradiction-batch.d.ts +16 -0
  141. package/dist/memory/prompts/l1-contradiction-batch.js +47 -0
  142. package/dist/memory/prompts/l1-contradiction.d.ts +1 -0
  143. package/dist/memory/prompts/l1-contradiction.js +25 -0
  144. package/dist/memory/prompts/l1-extraction.d.ts +10 -0
  145. package/dist/memory/prompts/l1-extraction.js +114 -0
  146. package/dist/memory/prompts/l2-direction-shift.d.ts +5 -0
  147. package/dist/memory/prompts/l2-direction-shift.js +32 -0
  148. package/dist/memory/prompts/l2-scene-cluster.d.ts +2 -0
  149. package/dist/memory/prompts/l2-scene-cluster.js +33 -0
  150. package/dist/memory/prompts/l2-scene.d.ts +7 -0
  151. package/dist/memory/prompts/l2-scene.js +40 -0
  152. package/dist/memory/prompts/l3-persona.d.ts +6 -0
  153. package/dist/memory/prompts/l3-persona.js +60 -0
  154. package/dist/memory/recall.d.ts +47 -0
  155. package/dist/memory/recall.js +427 -0
  156. package/dist/memory/redaction.d.ts +1 -0
  157. package/dist/memory/redaction.js +24 -0
  158. package/dist/memory/retry.d.ts +13 -0
  159. package/dist/memory/retry.js +53 -0
  160. package/dist/memory/scheduler.d.ts +9 -0
  161. package/dist/memory/scheduler.js +16 -0
  162. package/dist/memory/skill-hints-loader.d.ts +30 -0
  163. package/dist/memory/skill-hints-loader.js +100 -0
  164. package/dist/memory/store/embedding.d.ts +16 -0
  165. package/dist/memory/store/embedding.js +68 -0
  166. package/dist/memory/store/reranker.d.ts +24 -0
  167. package/dist/memory/store/reranker.js +83 -0
  168. package/dist/memory/store/sqlite.d.ts +167 -0
  169. package/dist/memory/store/sqlite.js +1816 -0
  170. package/dist/memory/store/types.d.ts +101 -0
  171. package/dist/memory/store/types.js +1 -0
  172. package/dist/memory/types.d.ts +207 -0
  173. package/dist/memory/types.js +7 -0
  174. package/dist/memory/validation.d.ts +441 -0
  175. package/dist/memory/validation.js +129 -0
  176. package/dist/memory/working/canvas.d.ts +5 -0
  177. package/dist/memory/working/canvas.js +43 -0
  178. package/dist/memory/working/offload.d.ts +71 -0
  179. package/dist/memory/working/offload.js +211 -0
  180. package/dist/memory/working/step-log.d.ts +16 -0
  181. package/dist/memory/working/step-log.js +35 -0
  182. package/dist/registry.d.ts +34 -0
  183. package/dist/registry.js +305 -0
  184. package/dist/resolver.d.ts +17 -0
  185. package/dist/resolver.js +126 -0
  186. package/dist/scripts/validate-foreign-workspace-path.d.ts +1 -0
  187. package/dist/scripts/validate-foreign-workspace-path.js +39 -0
  188. package/dist/tools/agent_memory_tools.d.ts +485 -0
  189. package/dist/tools/agent_memory_tools.js +793 -0
  190. package/dist/tools/create_skill.d.ts +46 -0
  191. package/dist/tools/create_skill.js +46 -0
  192. package/dist/tools/get_doc.d.ts +21 -0
  193. package/dist/tools/get_doc.js +24 -0
  194. package/dist/tools/get_persona.d.ts +15 -0
  195. package/dist/tools/get_persona.js +20 -0
  196. package/dist/tools/get_reference.d.ts +15 -0
  197. package/dist/tools/get_reference.js +20 -0
  198. package/dist/tools/get_skill.d.ts +34 -0
  199. package/dist/tools/get_skill.js +65 -0
  200. package/dist/tools/get_template_doc.d.ts +21 -0
  201. package/dist/tools/get_template_doc.js +24 -0
  202. package/dist/tools/list_docs.d.ts +15 -0
  203. package/dist/tools/list_docs.js +16 -0
  204. package/dist/tools/list_skills.d.ts +18 -0
  205. package/dist/tools/list_skills.js +17 -0
  206. package/dist/tools/list_template_docs.d.ts +15 -0
  207. package/dist/tools/list_template_docs.js +16 -0
  208. package/dist/tools/memory-engineering.d.ts +225 -0
  209. package/dist/tools/memory-engineering.js +284 -0
  210. package/dist/tools/memory-explain.d.ts +34 -0
  211. package/dist/tools/memory-explain.js +109 -0
  212. package/dist/tools/memory-governance.d.ts +171 -0
  213. package/dist/tools/memory-governance.js +224 -0
  214. package/dist/tools/memory-hooks.d.ts +67 -0
  215. package/dist/tools/memory-hooks.js +102 -0
  216. package/dist/tools/memory-working.d.ts +98 -0
  217. package/dist/tools/memory-working.js +101 -0
  218. package/dist/tools/memory_capture_turn.d.ts +66 -0
  219. package/dist/tools/memory_capture_turn.js +85 -0
  220. package/dist/tools/memory_consolidate.d.ts +55 -0
  221. package/dist/tools/memory_consolidate.js +176 -0
  222. package/dist/tools/memory_contradictions.d.ts +53 -0
  223. package/dist/tools/memory_contradictions.js +52 -0
  224. package/dist/tools/memory_graph_query.d.ts +51 -0
  225. package/dist/tools/memory_graph_query.js +35 -0
  226. package/dist/tools/memory_mark_cited.d.ts +43 -0
  227. package/dist/tools/memory_mark_cited.js +63 -0
  228. package/dist/tools/memory_recall.d.ts +77 -0
  229. package/dist/tools/memory_recall.js +81 -0
  230. package/dist/tools/memory_register_skill_hints.d.ts +49 -0
  231. package/dist/tools/memory_register_skill_hints.js +55 -0
  232. package/dist/tools/memory_resolve_session.d.ts +24 -0
  233. package/dist/tools/memory_resolve_session.js +133 -0
  234. package/dist/tools/memory_search.d.ts +146 -0
  235. package/dist/tools/memory_search.js +84 -0
  236. package/dist/tools/search_skills.d.ts +18 -0
  237. package/dist/tools/search_skills.js +17 -0
  238. package/dist/tools/update_doc.d.ts +24 -0
  239. package/dist/tools/update_doc.js +35 -0
  240. package/dist/tools/update_skill.d.ts +30 -0
  241. package/dist/tools/update_skill.js +80 -0
  242. package/dist/types.d.ts +81 -0
  243. package/dist/types.js +4 -0
  244. package/dist/writer.d.ts +30 -0
  245. package/dist/writer.js +220 -0
  246. package/docs/TEMPLATE ONLY +1 -0
  247. package/docs/api/API.md +64 -0
  248. package/docs/api/security/SECURITY.md +58 -0
  249. package/docs/deployment/DockerDeployment.md +30 -0
  250. package/docs/design/Design.md +59 -0
  251. package/docs/design/themes/apple.md +101 -0
  252. package/docs/design/themes/dieter-grid.md +100 -0
  253. package/docs/design/themes/gallery-white.md +100 -0
  254. package/docs/design/themes/pinterest.md +101 -0
  255. package/docs/design/themes/realty-open-house.md +101 -0
  256. package/docs/design/themes/vodafone.md +101 -0
  257. package/docs/hooks/Hooks.md +30 -0
  258. package/docs/schema/Schema.md +35 -0
  259. package/docs/strategy/ScalingStrategy.md +19 -0
  260. package/package.json +88 -0
  261. package/references/accessibility-checklist.md +160 -0
  262. package/references/orchestration-patterns.md +370 -0
  263. package/references/performance-checklist.md +153 -0
  264. package/references/security-checklist.md +134 -0
  265. package/references/testing-patterns.md +236 -0
  266. package/skills/agent/adr-skill/SKILL.md +299 -0
  267. package/skills/agent/agentic-engineering-workflow/SKILL.md +95 -0
  268. package/skills/agent/bootstrap-skill/SKILL.md +103 -0
  269. package/skills/agent/context-engineering/SKILL.md +307 -0
  270. package/skills/agent/debugging-and-error-recovery/SKILL.md +308 -0
  271. package/skills/agent/developer-growth-analysis/SKILL.md +328 -0
  272. package/skills/agent/doubt-driven-skill/SKILL.md +249 -0
  273. package/skills/agent/handover-skill/SKILL.md +112 -0
  274. package/skills/agent/idea-refine-skill/SKILL.md +185 -0
  275. package/skills/agent/idea-refine-skill/examples.md +238 -0
  276. package/skills/agent/idea-refine-skill/frameworks.md +99 -0
  277. package/skills/agent/idea-refine-skill/refinement-criteria.md +113 -0
  278. package/skills/agent/interview-skill/SKILL.md +226 -0
  279. package/skills/agent/planning-skill/SKILL.md +270 -0
  280. package/skills/agent/skill-authoring/SKILL.md +189 -0
  281. package/skills/agent/source-driven-skill/SKILL.md +197 -0
  282. package/skills/agent/spec-driven-skill/SKILL.md +221 -0
  283. package/skills/agent/sync-skill/SKILL.md +92 -0
  284. package/skills/agent/using-agent-skills/SKILL.md +189 -0
  285. package/skills/api/a11y-skill/SKILL.md +88 -0
  286. package/skills/api/api-skill/SKILL.md +123 -0
  287. package/skills/api/auth-skill/SKILL.md +80 -0
  288. package/skills/api/debug-skill/SKILL.md +535 -0
  289. package/skills/api/performance-skill/SKILL.md +100 -0
  290. package/skills/api/testing-skill/SKILL.md +100 -0
  291. package/skills/codebase/code-review-and-quality/SKILL.md +228 -0
  292. package/skills/codebase/code-simplification/SKILL.md +352 -0
  293. package/skills/codebase/code-structure-cleanup/SKILL.md +142 -0
  294. package/skills/codebase/concerns-skill/SKILL.md +89 -0
  295. package/skills/codebase/conventions-skill/SKILL.md +95 -0
  296. package/skills/codebase/doc-management-skill/SKILL.md +47 -0
  297. package/skills/codebase/git-workflow-skill/SKILL.md +312 -0
  298. package/skills/communication/1-3-1-rule/SKILL.md +120 -0
  299. package/skills/design/brutalist-skill/SKILL.md +131 -0
  300. package/skills/design/concept-diagrams/SKILL.md +387 -0
  301. package/skills/design/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
  302. package/skills/design/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
  303. package/skills/design/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
  304. package/skills/design/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
  305. package/skills/design/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
  306. package/skills/design/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
  307. package/skills/design/concept-diagrams/examples/electricity-grid-flow.md +182 -0
  308. package/skills/design/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
  309. package/skills/design/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
  310. package/skills/design/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
  311. package/skills/design/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
  312. package/skills/design/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
  313. package/skills/design/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
  314. package/skills/design/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
  315. package/skills/design/concept-diagrams/examples/wind-turbine-structure.md +338 -0
  316. package/skills/design/concept-diagrams/references/dashboard-patterns.md +43 -0
  317. package/skills/design/concept-diagrams/references/infrastructure-patterns.md +144 -0
  318. package/skills/design/concept-diagrams/references/physical-shape-cookbook.md +42 -0
  319. package/skills/design/concept-diagrams/templates/template.html +174 -0
  320. package/skills/design/gpt-tasteskill/SKILL.md +114 -0
  321. package/skills/design/minimalist-skill/SKILL.md +116 -0
  322. package/skills/design/output-skill/SKILL.md +87 -0
  323. package/skills/design/redesign-skill/SKILL.md +213 -0
  324. package/skills/design/soft-skill/SKILL.md +132 -0
  325. package/skills/design/stitch-skill/EXAMPLE.md +121 -0
  326. package/skills/design/stitch-skill/SKILL.md +222 -0
  327. package/skills/design/taste-skill/SKILL.md +269 -0
  328. package/skills/devops/ci-cd-skill/SKILL.md +402 -0
  329. package/skills/devops/docker-skill/SKILL.md +297 -0
  330. package/skills/devops/domain-skill/SKILL.md +234 -0
  331. package/skills/lifecycle/changelog-generator/SKILL.md +135 -0
  332. package/skills/lifecycle/incremental-skill/SKILL.md +257 -0
  333. package/skills/lifecycle/migration-skill/SKILL.md +218 -0
  334. package/skills/lifecycle/shipping-skill/SKILL.md +321 -0
  335. package/skills/memory/agent-memory/SKILL.md +122 -0
  336. package/skills/qa/browser-testing-skill/SKILL.md +314 -0
  337. package/skills/ux/adversarial-ux-skill/SKILL.md +168 -0
@@ -0,0 +1,338 @@
1
+ # Modern Onshore Wind Turbine Structure
2
+
3
+ A physical/structural cross-section diagram showing all major components of a modern wind turbine from underground foundation to blade tips.
4
+
5
+ ## Key Patterns Used
6
+
7
+ - **Underground section**: Soil layers, deep concrete foundation with rebar reinforcement grid, spread footing
8
+ - **Cross-section view**: Tower wall thickness shown, internal components visible
9
+ - **Tapered tower**: Path elements creating realistic tower silhouette that narrows toward top
10
+ - **Internal access**: Ladder with rungs, elevator shaft inside tower
11
+ - **Cable routing**: Power cables running from nacelle down through tower to transformer
12
+ - **Nacelle cutaway**: Gearbox, generator, brake, yaw system all visible inside housing
13
+ - **Rotor assembly**: Hub with pitch motors at blade roots, three composite blades with gradient fill
14
+ - **Ground level marker**: Clear separation between above/below ground
15
+ - **Component color coding**: Each system type has distinct color (blue=generator, gold=gearbox, red=brake, green=yaw, purple=pitch)
16
+ - **Legend bar**: Quick reference for color meanings
17
+
18
+ ## Diagram
19
+
20
+ ```xml
21
+ <svg width="100%" viewBox="0 0 680 920" xmlns="http://www.w3.org/2000/svg">
22
+ <defs>
23
+ <marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5"
24
+ markerWidth="6" markerHeight="6" orient="auto-start-reverse">
25
+ <path d="M2 1L8 5L2 9" fill="none" stroke="context-stroke"
26
+ stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
27
+ </marker>
28
+ <!-- Blade gradient for 3D effect -->
29
+ <linearGradient id="bladeGrad" x1="0%" y1="0%" x2="100%" y2="0%">
30
+ <stop offset="0%" style="stop-color:#D3D1C7"/>
31
+ <stop offset="50%" style="stop-color:#F1EFE8"/>
32
+ <stop offset="100%" style="stop-color:#B4B2A9"/>
33
+ </linearGradient>
34
+ </defs>
35
+
36
+ <!-- ===== GROUND LEVEL LINE ===== -->
37
+ <line x1="40" y1="680" x2="640" y2="680" stroke="#3B6D11" stroke-width="2"/>
38
+ <text class="tl" x="45" y="675">Ground level</text>
39
+
40
+ <!-- ===== UNDERGROUND: FOUNDATION ===== -->
41
+
42
+ <!-- Soil layers -->
43
+ <rect x="120" y="680" width="300" height="180" class="soil"/>
44
+ <rect x="120" y="780" width="300" height="80" class="soil-dark"/>
45
+
46
+ <!-- Deep concrete foundation -->
47
+ <path d="M170 680 L170 820 L200 850 L340 850 L370 820 L370 680 Z" class="concrete"/>
48
+ <!-- Foundation base spread -->
49
+ <path d="M140 820 L170 820 L200 850 L340 850 L370 820 L400 820 L400 860 L140 860 Z" class="concrete-dark"/>
50
+
51
+ <!-- Rebar reinforcement -->
52
+ <g class="rebar">
53
+ <line x1="185" y1="700" x2="185" y2="840"/>
54
+ <line x1="210" y1="700" x2="210" y2="845"/>
55
+ <line x1="235" y1="700" x2="235" y2="848"/>
56
+ <line x1="260" y1="700" x2="260" y2="848"/>
57
+ <line x1="285" y1="700" x2="285" y2="848"/>
58
+ <line x1="310" y1="700" x2="310" y2="845"/>
59
+ <line x1="335" y1="700" x2="335" y2="840"/>
60
+ <!-- Horizontal rebar -->
61
+ <line x1="175" y1="720" x2="365" y2="720"/>
62
+ <line x1="175" y1="760" x2="365" y2="760"/>
63
+ <line x1="175" y1="800" x2="365" y2="800"/>
64
+ <line x1="155" y1="835" x2="385" y2="835"/>
65
+ </g>
66
+
67
+ <!-- Foundation labels -->
68
+ <line x1="410" y1="770" x2="480" y2="770" class="leader"/>
69
+ <text class="ts" x="485" y="766">Deep concrete foundation</text>
70
+ <text class="tl" x="485" y="778">Reinforced with steel rebar</text>
71
+ <text class="tl" x="485" y="790">15-25m deep typical</text>
72
+
73
+ <line x1="400" y1="850" x2="480" y2="870" class="leader"/>
74
+ <text class="ts" x="485" y="866">Foundation spread footing</text>
75
+ <text class="tl" x="485" y="878">Distributes load to soil</text>
76
+
77
+ <!-- ===== TOWER BASE ===== -->
78
+
79
+ <!-- Tower base flange -->
80
+ <ellipse cx="270" cy="680" rx="70" ry="12" class="concrete-dark"/>
81
+ <rect x="200" y="668" width="140" height="12" class="tower"/>
82
+
83
+ <!-- Transformer at base -->
84
+ <g transform="translate(470, 640)">
85
+ <rect x="0" y="0" width="50" height="40" rx="3" class="transformer"/>
86
+ <!-- Cooling fins -->
87
+ <rect x="52" y="5" width="4" height="30" class="transformer-fin"/>
88
+ <rect x="58" y="5" width="4" height="30" class="transformer-fin"/>
89
+ <rect x="64" y="5" width="4" height="30" class="transformer-fin"/>
90
+ <!-- Connection box -->
91
+ <rect x="10" y="-8" width="30" height="10" rx="2" class="transformer-fin"/>
92
+ </g>
93
+ <line x1="470" y1="660" x2="430" y2="640" class="leader"/>
94
+ <text class="ts" x="385" y="636" text-anchor="end">Transformer</text>
95
+ <text class="tl" x="385" y="648" text-anchor="end">Steps up voltage for grid</text>
96
+
97
+ <!-- ===== TUBULAR STEEL TOWER ===== -->
98
+
99
+ <!-- Tower outer shell (tapered) -->
100
+ <path d="M200 680 L220 200 L320 200 L340 680 Z" class="tower"/>
101
+
102
+ <!-- Tower inner surface (cutaway) -->
103
+ <path d="M215 680 L232 210 L308 210 L325 680 Z" class="tower-inner"/>
104
+
105
+ <!-- Tower section joints -->
106
+ <line x1="205" y1="550" x2="335" y2="550" class="tower-section"/>
107
+ <line x1="210" y1="420" x2="330" y2="420" class="tower-section"/>
108
+ <line x1="215" y1="300" x2="325" y2="300" class="tower-section"/>
109
+
110
+ <!-- Internal ladder (left side) -->
111
+ <g transform="translate(225, 220)">
112
+ <!-- Ladder rails -->
113
+ <line x1="0" y1="0" x2="8" y2="450" class="ladder"/>
114
+ <line x1="15" y1="0" x2="23" y2="450" class="ladder"/>
115
+ <!-- Rungs -->
116
+ <g class="ladder-rung">
117
+ <line x1="1" y1="20" x2="22" y2="21"/>
118
+ <line x1="1" y1="50" x2="22" y2="52"/>
119
+ <line x1="2" y1="80" x2="22" y2="83"/>
120
+ <line x1="2" y1="110" x2="23" y2="114"/>
121
+ <line x1="2" y1="140" x2="23" y2="145"/>
122
+ <line x1="3" y1="170" x2="23" y2="176"/>
123
+ <line x1="3" y1="200" x2="24" y2="207"/>
124
+ <line x1="3" y1="230" x2="24" y2="238"/>
125
+ <line x1="4" y1="260" x2="24" y2="269"/>
126
+ <line x1="4" y1="290" x2="25" y2="300"/>
127
+ <line x1="4" y1="320" x2="25" y2="331"/>
128
+ <line x1="5" y1="350" x2="25" y2="362"/>
129
+ <line x1="5" y1="380" x2="26" y2="393"/>
130
+ <line x1="6" y1="410" x2="26" y2="424"/>
131
+ <line x1="6" y1="440" x2="27" y2="455"/>
132
+ </g>
133
+ </g>
134
+
135
+ <!-- Elevator shaft (right side) -->
136
+ <rect x="280" y="230" width="25" height="430" rx="2" class="elevator"/>
137
+ <text class="tl" x="292" y="450" text-anchor="middle" transform="rotate(-90, 292, 450)" fill="#185FA5">ELEVATOR</text>
138
+
139
+ <!-- Electrical cables running down -->
140
+ <path d="M270 220 C270 300 268 400 268 500 C268 600 268 650 310 665 L470 665" class="cable"/>
141
+ <path d="M260 225 C258 350 256 500 256 600 C256 650 256 670 256 680" class="cable-thin"/>
142
+
143
+ <!-- Tower labels -->
144
+ <line x1="340" y1="350" x2="400" y2="320" class="leader"/>
145
+ <text class="ts" x="405" y="316">Tubular steel tower</text>
146
+ <text class="tl" x="405" y="328">80-120m height typical</text>
147
+ <text class="tl" x="405" y="340">Tapered for strength</text>
148
+
149
+ <line x1="248" y1="400" x2="130" y2="380" class="leader"/>
150
+ <text class="ts" x="125" y="376" text-anchor="end">Internal ladder</text>
151
+ <text class="tl" x="125" y="388" text-anchor="end">Service access</text>
152
+
153
+ <line x1="305" y1="500" x2="400" y2="520" class="leader"/>
154
+ <text class="ts" x="405" y="516">Service elevator</text>
155
+
156
+ <line x1="268" y1="580" x2="130" y2="600" class="leader"/>
157
+ <text class="ts" x="125" y="596" text-anchor="end">Power cables</text>
158
+ <text class="tl" x="125" y="608" text-anchor="end">To transformer</text>
159
+
160
+ <!-- ===== NACELLE ===== -->
161
+
162
+ <g transform="translate(270, 160)">
163
+ <!-- Nacelle base/bedplate -->
164
+ <rect x="-60" y="30" width="120" height="15" class="nacelle"/>
165
+
166
+ <!-- Yaw bearing -->
167
+ <ellipse cx="0" cy="42" rx="35" ry="6" class="bearing"/>
168
+
169
+ <!-- Yaw motors -->
170
+ <rect x="-55" y="32" width="12" height="18" rx="2" class="yaw"/>
171
+ <rect x="43" y="32" width="12" height="18" rx="2" class="yaw"/>
172
+
173
+ <!-- Nacelle housing -->
174
+ <path d="M-65 30 L-70 -10 L-65 -35 L70 -35 L85 -10 L85 30 Z" class="nacelle-cover"/>
175
+
176
+ <!-- Main shaft -->
177
+ <rect x="-90" y="-8" width="35" height="16" rx="2" fill="#888780" stroke="#5F5E5A" stroke-width="0.5"/>
178
+
179
+ <!-- Gearbox -->
180
+ <rect x="-55" y="-25" width="40" height="45" rx="3" class="gearbox"/>
181
+ <text class="tl" x="-35" y="5" text-anchor="middle" fill="#633806">GEAR</text>
182
+
183
+ <!-- Generator -->
184
+ <rect x="-10" y="-20" width="50" height="38" rx="4" class="generator"/>
185
+ <ellipse cx="15" cy="0" rx="15" ry="15" fill="none" stroke="#0C447C" stroke-width="1"/>
186
+ <text class="tl" x="15" y="4" text-anchor="middle" fill="#E6F1FB">GEN</text>
187
+
188
+ <!-- Brake disc -->
189
+ <rect x="45" y="-12" width="8" height="24" rx="1" class="brake"/>
190
+
191
+ <!-- Electrical cabinet -->
192
+ <rect x="58" y="-25" width="20" height="35" rx="2" fill="#5F5E5A" stroke="#444441" stroke-width="0.5"/>
193
+
194
+ <!-- Anemometer on top -->
195
+ <line x1="60" y1="-35" x2="60" y2="-50" stroke="#5F5E5A" stroke-width="1"/>
196
+ <ellipse cx="60" cy="-52" rx="8" ry="3" fill="#D3D1C7" stroke="#888780" stroke-width="0.5"/>
197
+ </g>
198
+
199
+ <!-- Nacelle labels -->
200
+ <line x1="215" y1="135" x2="130" y2="115" class="leader"/>
201
+ <text class="ts" x="125" y="111" text-anchor="end">Gearbox</text>
202
+ <text class="tl" x="125" y="123" text-anchor="end">Speed multiplier</text>
203
+
204
+ <line x1="285" y1="145" x2="400" y2="125" class="leader"/>
205
+ <text class="ts" x="405" y="121">Generator</text>
206
+ <text class="tl" x="405" y="133">Converts rotation to electricity</text>
207
+
208
+ <line x1="315" y1="155" x2="400" y2="165" class="leader"/>
209
+ <text class="ts" x="405" y="161">Brake system</text>
210
+
211
+ <line x1="215" y1="200" x2="130" y2="220" class="leader"/>
212
+ <text class="ts" x="125" y="216" text-anchor="end">Yaw motors</text>
213
+ <text class="tl" x="125" y="228" text-anchor="end">Rotate nacelle to face wind</text>
214
+
215
+ <line x1="330" y1="108" x2="400" y2="90" class="leader"/>
216
+ <text class="ts" x="405" y="86">Anemometer</text>
217
+ <text class="tl" x="405" y="98">Wind speed sensor</text>
218
+
219
+ <!-- ===== ROTOR HUB & BLADES ===== -->
220
+
221
+ <!-- Hub -->
222
+ <g transform="translate(180, 152)">
223
+ <!-- Hub body -->
224
+ <ellipse cx="0" cy="0" rx="25" ry="30" class="hub"/>
225
+ <!-- Hub nose cone -->
226
+ <path d="M-25 -20 Q-50 0 -25 20 Q-30 0 -25 -20" class="hub-cap"/>
227
+
228
+ <!-- Blade roots with pitch motors -->
229
+ <!-- Blade 1 (up) -->
230
+ <g transform="translate(-10, -25) rotate(-80)">
231
+ <ellipse cx="0" cy="0" rx="12" ry="8" class="blade-root"/>
232
+ <rect x="-8" y="-5" width="10" height="10" rx="2" class="pitch-motor"/>
233
+ </g>
234
+
235
+ <!-- Blade 2 (lower left) -->
236
+ <g transform="translate(-18, 18) rotate(40)">
237
+ <ellipse cx="0" cy="0" rx="12" ry="8" class="blade-root"/>
238
+ <rect x="-8" y="-5" width="10" height="10" rx="2" class="pitch-motor"/>
239
+ </g>
240
+
241
+ <!-- Blade 3 (lower right) -->
242
+ <g transform="translate(5, 22) rotate(160)">
243
+ <ellipse cx="0" cy="0" rx="12" ry="8" class="blade-root"/>
244
+ <rect x="-8" y="-5" width="10" height="10" rx="2" class="pitch-motor"/>
245
+ </g>
246
+ </g>
247
+
248
+ <!-- Blade 1 (pointing up-left) -->
249
+ <path d="M165 125 Q140 80 130 40 Q125 20 115 15 Q110 18 112 25 Q115 50 125 90 Q140 120 158 128 Z" class="blade" fill="url(#bladeGrad)"/>
250
+
251
+ <!-- Blade 2 (pointing down-left) -->
252
+ <path d="M158 175 Q120 200 80 230 Q60 245 55 255 Q60 258 68 252 Q95 235 130 210 Q155 190 163 178 Z" class="blade" fill="url(#bladeGrad)"/>
253
+
254
+ <!-- Blade 3 (pointing down-right, partially visible) -->
255
+ <path d="M188 175 Q195 200 205 230 Q210 250 215 255 Q220 252 218 245 Q212 220 202 195 Q192 175 186 172 Z" class="blade" fill="url(#bladeGrad)"/>
256
+
257
+ <!-- Blade labels -->
258
+ <line x1="115" y1="35" x2="60" y2="35" class="leader"/>
259
+ <text class="ts" x="55" y="31" text-anchor="end">Composite blade</text>
260
+ <text class="tl" x="55" y="43" text-anchor="end">Fiberglass/carbon fiber</text>
261
+ <text class="tl" x="55" y="55" text-anchor="end">40-80m length each</text>
262
+
263
+ <line x1="170" y1="130" x2="130" y2="155" class="leader"/>
264
+ <text class="ts" x="85" y="151" text-anchor="end">Pitch motor</text>
265
+ <text class="tl" x="85" y="163" text-anchor="end">Adjusts blade angle</text>
266
+
267
+ <line x1="180" y1="152" x2="130" y2="180" class="leader"/>
268
+ <text class="ts" x="85" y="183" text-anchor="end">Rotor hub</text>
269
+
270
+ <!-- ===== LEGEND ===== -->
271
+ <g transform="translate(40, 895)">
272
+ <rect x="0" y="-15" width="600" height="30" rx="4" fill="none" stroke="#D3D1C7" stroke-width="0.5"/>
273
+
274
+ <rect x="15" y="-5" width="12" height="12" rx="2" class="generator"/>
275
+ <text class="tl" x="32" y="5">Generator</text>
276
+
277
+ <rect x="95" y="-5" width="12" height="12" rx="2" class="gearbox"/>
278
+ <text class="tl" x="112" y="5">Gearbox</text>
279
+
280
+ <rect x="170" y="-5" width="12" height="12" rx="2" class="brake"/>
281
+ <text class="tl" x="187" y="5">Brake</text>
282
+
283
+ <rect x="230" y="-5" width="12" height="12" rx="2" class="yaw"/>
284
+ <text class="tl" x="247" y="5">Yaw system</text>
285
+
286
+ <rect x="320" y="-5" width="12" height="12" rx="2" class="pitch-motor"/>
287
+ <text class="tl" x="337" y="5">Pitch motor</text>
288
+
289
+ <line x1="415" y1="1" x2="435" y2="1" class="cable" style="stroke-width:2"/>
290
+ <text class="tl" x="440" y="5">Power cable</text>
291
+
292
+ <rect x="515" y="-5" width="12" height="12" rx="2" class="transformer"/>
293
+ <text class="tl" x="532" y="5">Transformer</text>
294
+ </g>
295
+
296
+ </svg>
297
+ ```
298
+
299
+ ## CSS Classes
300
+
301
+ ```css
302
+ /* Foundation */
303
+ .concrete { fill: #B4B2A9; stroke: #5F5E5A; stroke-width: 1; }
304
+ .concrete-dark { fill: #888780; stroke: #5F5E5A; stroke-width: 1; }
305
+ .rebar { stroke: #854F0B; stroke-width: 1.5; fill: none; }
306
+ .soil { fill: #8B7355; stroke: #5F5E5A; stroke-width: 0.5; }
307
+ .soil-dark { fill: #6B5344; }
308
+
309
+ /* Tower */
310
+ .tower { fill: #F1EFE8; stroke: #5F5E5A; stroke-width: 1; }
311
+ .tower-inner { fill: #D3D1C7; stroke: #888780; stroke-width: 0.5; }
312
+ .tower-section { stroke: #888780; stroke-width: 0.5; stroke-dasharray: 2 4; }
313
+ .ladder { stroke: #5F5E5A; stroke-width: 1; fill: none; }
314
+ .ladder-rung { stroke: #888780; stroke-width: 0.8; }
315
+ .elevator { fill: #E6F1FB; stroke: #185FA5; stroke-width: 0.5; }
316
+ .cable { stroke: #E24B4A; stroke-width: 2; fill: none; }
317
+ .cable-thin { stroke: #E24B4A; stroke-width: 1.5; fill: none; }
318
+
319
+ /* Nacelle */
320
+ .nacelle { fill: #F1EFE8; stroke: #5F5E5A; stroke-width: 1; }
321
+ .nacelle-cover { fill: #D3D1C7; stroke: #5F5E5A; stroke-width: 1; }
322
+ .gearbox { fill: #BA7517; stroke: #633806; stroke-width: 0.5; }
323
+ .generator { fill: #378ADD; stroke: #0C447C; stroke-width: 0.5; }
324
+ .brake { fill: #E24B4A; stroke: #791F1F; stroke-width: 0.5; }
325
+ .yaw { fill: #5DCAA5; stroke: #085041; stroke-width: 0.5; }
326
+ .bearing { fill: #444441; stroke: #2C2C2A; stroke-width: 0.5; }
327
+
328
+ /* Rotor */
329
+ .hub { fill: #D3D1C7; stroke: #5F5E5A; stroke-width: 1; }
330
+ .hub-cap { fill: #F1EFE8; stroke: #5F5E5A; stroke-width: 1; }
331
+ .blade { fill: #F1EFE8; stroke: #888780; stroke-width: 1; }
332
+ .blade-root { fill: #D3D1C7; stroke: #5F5E5A; stroke-width: 0.5; }
333
+ .pitch-motor { fill: #7F77DD; stroke: #3C3489; stroke-width: 0.5; }
334
+
335
+ /* Transformer */
336
+ .transformer { fill: #27500A; stroke: #173404; stroke-width: 1; }
337
+ .transformer-fin { fill: #3B6D11; stroke: #27500A; stroke-width: 0.5; }
338
+ ```
@@ -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