@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,236 @@
1
+ # Out-of-Order CPU Core Microarchitecture
2
+
3
+ A structural diagram showing the internal pipeline stages of a modern superscalar out-of-order CPU core. Demonstrates multi-stage vertical flow with parallel paths, fan-out patterns for execution ports, and a separate memory hierarchy sidebar.
4
+
5
+ ## Key Patterns Used
6
+
7
+ - **Multi-stage vertical flow**: Six pipeline stages (Front End → Rename → Schedule → Execute → Retire)
8
+ - **Parallel decode paths**: Main decode and µop cache bypass (dashed line for cache hit)
9
+ - **Container grouping**: Logical stages grouped in colored containers
10
+ - **Fan-out pattern**: Single scheduler dispatching to 6 execution ports
11
+ - **Sidebar layout**: Memory hierarchy placed in separate column on right
12
+ - **Stage labels**: Left-aligned labels indicating pipeline phase
13
+ - **Color-coded semantics**: Different colors for each functional unit category
14
+
15
+ ## Diagram Type
16
+
17
+ This is a **hybrid structural/flow** diagram:
18
+ - **Flow aspect**: Instructions move top-to-bottom through pipeline stages
19
+ - **Structural aspect**: Components are grouped by function (rename unit, execution cluster)
20
+ - **Sidebar**: Memory hierarchy is architecturally separate but connected via data paths
21
+
22
+ ## Pipeline Stage Breakdown
23
+
24
+ ### Front End (Purple)
25
+ ```xml
26
+ <!-- Fetch Unit -->
27
+ <g class="node c-purple">
28
+ <rect x="40" y="70" width="140" height="56" rx="8" stroke-width="0.5"/>
29
+ <text class="th" x="110" y="90" text-anchor="middle" dominant-baseline="central">Fetch unit</text>
30
+ <text class="ts" x="110" y="110" text-anchor="middle" dominant-baseline="central">6-wide, 32B/cycle</text>
31
+ </g>
32
+
33
+ <!-- Branch Predictor (subordinate) -->
34
+ <g class="node c-purple">
35
+ <rect x="40" y="140" width="140" height="44" rx="8" stroke-width="0.5"/>
36
+ <text class="th" x="110" y="162" text-anchor="middle" dominant-baseline="central">Branch predictor</text>
37
+ </g>
38
+
39
+ <!-- Decode -->
40
+ <g class="node c-purple">
41
+ <rect x="230" y="70" width="160" height="56" rx="8" stroke-width="0.5"/>
42
+ <text class="th" x="310" y="90" text-anchor="middle" dominant-baseline="central">Decode</text>
43
+ <text class="ts" x="310" y="110" text-anchor="middle" dominant-baseline="central">x86 → µops, 6-wide</text>
44
+ </g>
45
+ ```
46
+
47
+ ### µop Cache Bypass Path (Teal)
48
+ The µop cache (Decoded Stream Buffer) provides an alternate path that bypasses the complex decoder:
49
+
50
+ ```xml
51
+ <!-- µop Cache parallel to decode -->
52
+ <g class="node c-teal">
53
+ <rect x="230" y="150" width="160" height="50" rx="8" stroke-width="0.5"/>
54
+ <text class="th" x="310" y="168" text-anchor="middle" dominant-baseline="central">µop cache (DSB)</text>
55
+ <text class="ts" x="310" y="186" text-anchor="middle" dominant-baseline="central">4K entries, 8-wide</text>
56
+ </g>
57
+
58
+ <!-- Dashed bypass path indicating cache hit -->
59
+ <path d="M180 110 L205 110 L205 175 L230 175" fill="none" class="arr"
60
+ stroke-dasharray="4 3" marker-end="url(#arrow)"/>
61
+ <text class="tx" x="164" y="148" opacity=".6">hit</text>
62
+ ```
63
+
64
+ ### Rename/Allocate Container (Coral)
65
+ Groups related rename components in a container:
66
+
67
+ ```xml
68
+ <!-- Outer container -->
69
+ <g class="c-coral">
70
+ <rect x="40" y="250" width="530" height="130" rx="12" stroke-width="0.5"/>
71
+ <text class="th" x="60" y="274">Rename / allocate</text>
72
+ <text class="ts" x="60" y="292">Map architectural → physical registers</text>
73
+ </g>
74
+
75
+ <!-- Inner components -->
76
+ <g class="node c-coral">
77
+ <rect x="60" y="310" width="180" height="56" rx="8" stroke-width="0.5"/>
78
+ <text class="th" x="150" y="330" text-anchor="middle" dominant-baseline="central">Register alias table</text>
79
+ <text class="ts" x="150" y="350" text-anchor="middle" dominant-baseline="central">180 physical regs</text>
80
+ </g>
81
+ ```
82
+
83
+ ### Scheduler Fan-Out Pattern (Amber → Teal)
84
+ Single unified scheduler dispatching to multiple execution ports:
85
+
86
+ ```xml
87
+ <!-- Unified Scheduler -->
88
+ <g class="node c-amber">
89
+ <rect x="140" y="420" width="330" height="50" rx="8" stroke-width="0.5"/>
90
+ <text class="th" x="305" y="438" text-anchor="middle" dominant-baseline="central">Unified scheduler</text>
91
+ <text class="ts" x="305" y="456" text-anchor="middle" dominant-baseline="central">97 entries, out-of-order dispatch</text>
92
+ </g>
93
+
94
+ <!-- Fan-out arrows to 6 ports -->
95
+ <line x1="170" y1="470" x2="90" y2="540" class="arr" marker-end="url(#arrow)"/>
96
+ <line x1="215" y1="470" x2="170" y2="540" class="arr" marker-end="url(#arrow)"/>
97
+ <line x1="265" y1="470" x2="250" y2="540" class="arr" marker-end="url(#arrow)"/>
98
+ <line x1="305" y1="470" x2="330" y2="540" class="arr" marker-end="url(#arrow)"/>
99
+ <line x1="355" y1="470" x2="410" y2="540" class="arr" marker-end="url(#arrow)"/>
100
+ <line x1="420" y1="470" x2="490" y2="540" class="arr" marker-end="url(#arrow)"/>
101
+ ```
102
+
103
+ ### Execution Port Box Pattern
104
+ Compact boxes showing port number and capabilities:
105
+
106
+ ```xml
107
+ <!-- Execution port with multi-line capability -->
108
+ <g class="node c-teal">
109
+ <rect x="55" y="540" width="70" height="64" rx="6" stroke-width="0.5"/>
110
+ <text class="th" x="90" y="560" text-anchor="middle" dominant-baseline="central">Port 0</text>
111
+ <text class="tx" x="90" y="576" text-anchor="middle" dominant-baseline="central">ALU</text>
112
+ <text class="tx" x="90" y="590" text-anchor="middle" dominant-baseline="central">DIV</text>
113
+ </g>
114
+ ```
115
+
116
+ ### Reorder Buffer (Pink)
117
+ Wide horizontal bar at bottom showing retirement:
118
+
119
+ ```xml
120
+ <g class="c-pink">
121
+ <rect x="40" y="670" width="530" height="40" rx="10" stroke-width="0.5"/>
122
+ <text class="th" x="305" y="694" text-anchor="middle" dominant-baseline="central">Reorder buffer (ROB) — 512 entries, 8-wide retire</text>
123
+ </g>
124
+ ```
125
+
126
+ ### Memory Hierarchy Sidebar (Blue)
127
+ Separate column showing cache levels:
128
+
129
+ ```xml
130
+ <!-- Container -->
131
+ <g class="c-blue">
132
+ <rect x="600" y="30" width="190" height="360" rx="16" stroke-width="0.5"/>
133
+ <text class="th" x="695" y="54" text-anchor="middle">Memory hierarchy</text>
134
+ </g>
135
+
136
+ <!-- Cache levels stacked vertically -->
137
+ <g class="node c-blue">
138
+ <rect x="620" y="70" width="150" height="50" rx="8" stroke-width="0.5"/>
139
+ <text class="th" x="695" y="88" text-anchor="middle" dominant-baseline="central">L1-I cache</text>
140
+ <text class="ts" x="695" y="106" text-anchor="middle" dominant-baseline="central">32 KB, 8-way</text>
141
+ </g>
142
+ <!-- Additional levels follow same pattern -->
143
+ ```
144
+
145
+ ## Connection Patterns
146
+
147
+ ### Instruction Fetch Path
148
+ Horizontal arrow from L1-I cache to fetch unit:
149
+ ```xml
150
+ <path d="M620 95 L200 95" fill="none" class="arr" marker-end="url(#arrow)"/>
151
+ <text class="tx" x="410" y="88" text-anchor="middle" opacity=".6">instruction fetch</text>
152
+ ```
153
+
154
+ ### Load/Store Path
155
+ Complex path from execution ports to L1-D cache:
156
+ ```xml
157
+ <path d="M250 604 L250 640 L580 640 L580 160 L620 160" fill="none" class="arr" marker-end="url(#arrow)"/>
158
+ <text class="tx" x="415" y="652" text-anchor="middle" opacity=".6">load / store</text>
159
+ ```
160
+
161
+ ### Commit Path (dashed)
162
+ Dashed line showing write-back from ROB to register file:
163
+ ```xml
164
+ <path d="M550 690 L580 690 L580 445 L595 445" fill="none" class="arr" stroke-dasharray="4 3"/>
165
+ <text class="tx" x="590" y="578" opacity=".6" transform="rotate(-90 590 578)">commit</text>
166
+ ```
167
+
168
+ ### Path Merge (Decode + µop Cache)
169
+ Two paths converging before rename:
170
+ ```xml
171
+ <line x1="390" y1="98" x2="430" y2="98" class="arr"/>
172
+ <line x1="390" y1="175" x2="430" y2="175" class="arr"/>
173
+ <path d="M430 98 L430 175" fill="none" stroke="var(--text-secondary)" stroke-width="1.5"/>
174
+ <line x1="430" y1="136" x2="470" y2="136" class="arr" marker-end="url(#arrow)"/>
175
+ ```
176
+
177
+ ## Text Classes
178
+
179
+ This diagram uses an additional text class for very small labels:
180
+
181
+ ```css
182
+ .tx { font-family: system-ui, -apple-system, sans-serif; font-size: 10px; fill: var(--text-secondary); }
183
+ ```
184
+
185
+ Used for:
186
+ - Execution port capability labels (ALU, Branch, Load, etc.)
187
+ - Connection labels (instruction fetch, load/store, commit)
188
+ - DRAM latency annotation
189
+
190
+ ## Color Semantic Mapping
191
+
192
+ | Color | Stage | Components |
193
+ |-------|-------|------------|
194
+ | `c-purple` | Front end | Fetch, Branch predictor, Decode |
195
+ | `c-teal` | Execution | µop cache, Execution ports |
196
+ | `c-coral` | Rename | RAT, Physical RF, Free list |
197
+ | `c-amber` | Schedule | Unified scheduler |
198
+ | `c-pink` | Retire | Reorder buffer |
199
+ | `c-blue` | Memory | L1-I, L1-D, L2, DRAM |
200
+ | `c-gray` | External | Off-chip DRAM |
201
+
202
+ ## Layout Notes
203
+
204
+ - **ViewBox**: 820×720 (taller than wide for vertical pipeline flow)
205
+ - **Main pipeline**: x=40 to x=570 (530px width)
206
+ - **Memory sidebar**: x=600 to x=790 (190px width)
207
+ - **Stage labels**: x=30, left-aligned, 50% opacity
208
+ - **Vertical spacing**: ~80-100px between major stages
209
+ - **Container padding**: 20px inside containers
210
+ - **Port spacing**: 80px between execution port centers
211
+ - **Legend**: Bottom-right of memory sidebar, explains color coding
212
+
213
+ ## Architectural Details Shown
214
+
215
+ | Component | Specification | Notes |
216
+ |-----------|---------------|-------|
217
+ | Fetch | 6-wide, 32B/cycle | Typical modern Intel/AMD |
218
+ | Decode | 6-wide, x86→µops | Complex decoder |
219
+ | µop Cache | 4K entries, 8-wide | Bypass for hot code |
220
+ | RAT | 180 physical regs | Supports deep OoO |
221
+ | Scheduler | 97 entries | Unified RS |
222
+ | Execution | 6 ports | ALU×2, Load, Store×2, Vector |
223
+ | ROB | 512 entries, 8-wide | In-order retirement |
224
+ | L1-I | 32 KB, 8-way | Instruction cache |
225
+ | L1-D | 48 KB, 12-way | Data cache |
226
+ | L2 | 1.25 MB, 20-way | Unified |
227
+ | DRAM | DDR5-6400, ~80ns | Off-chip |
228
+
229
+ ## When to Use This Pattern
230
+
231
+ Use this diagram style for:
232
+ - CPU/GPU microarchitecture visualization
233
+ - Compiler pipeline stages
234
+ - Network packet processing pipelines
235
+ - Any system with parallel execution units fed by a scheduler
236
+ - Hardware designs with multiple functional units
@@ -0,0 +1,182 @@
1
+ # Electricity Grid: Generation to Consumption
2
+
3
+ A left-to-right flow diagram showing electricity from multiple generation sources through transmission and distribution networks to end consumers. Demonstrates multi-stage flow layout, voltage level visual hierarchy, and smart grid data overlay.
4
+
5
+ ## Key Patterns Used
6
+
7
+ - **Multi-stage horizontal flow**: Four distinct columns (Generation → Transmission → Distribution → Consumption)
8
+ - **Stage dividers**: Vertical dashed lines separating each phase
9
+ - **Voltage level hierarchy**: Different line weights/colors for HV, MV, LV
10
+ - **Smart grid data overlay**: Dashed data flow lines from control center
11
+ - **Capacity labels**: Power ratings on generation sources
12
+ - **Multiple source convergence**: Four generators feeding into single transmission grid
13
+
14
+ ## New Shape Techniques
15
+
16
+ ### Nuclear Plant (cooling tower + reactor)
17
+ ```xml
18
+ <!-- Cooling tower (hyperbolic curve) -->
19
+ <path class="nuclear-tower" d="M 25 80 Q 15 60 20 40 Q 25 20 40 15 Q 55 20 60 40 Q 65 60 55 80 Z"/>
20
+ <!-- Steam clouds -->
21
+ <ellipse class="nuclear-steam" cx="40" cy="8" rx="12" ry="6"/>
22
+ <!-- Reactor dome -->
23
+ <rect class="nuclear-building" x="65" y="45" width="40" height="35" rx="3"/>
24
+ <ellipse class="nuclear-building" cx="85" cy="45" rx="20" ry="8"/>
25
+ ```
26
+
27
+ ### Gas Peaker Plant (with flames)
28
+ ```xml
29
+ <rect class="gas-plant" x="0" y="25" width="70" height="40" rx="3"/>
30
+ <!-- Smokestacks -->
31
+ <rect class="gas-stack" x="15" y="5" width="8" height="25" rx="1"/>
32
+ <!-- Flame -->
33
+ <path class="gas-flame" d="M 19 5 Q 17 0 19 -3 Q 21 0 19 5"/>
34
+ <!-- Turbine housing -->
35
+ <ellipse class="gas-plant" cx="55" cy="45" rx="12" ry="8"/>
36
+ ```
37
+
38
+ ### Transmission Pylon with Insulators
39
+ ```xml
40
+ <!-- Tapered tower -->
41
+ <polygon class="pylon" points="20,0 25,0 30,80 15,80"/>
42
+ <!-- Cross arms -->
43
+ <line class="pylon-arm" x1="5" y1="10" x2="40" y2="10"/>
44
+ <line class="pylon-arm" x1="8" y1="25" x2="37" y2="25"/>
45
+ <!-- Insulators (where lines attach) -->
46
+ <circle class="insulator" cx="8" cy="10" r="3"/>
47
+ <circle class="insulator" cx="37" cy="10" r="3"/>
48
+ ```
49
+
50
+ ### Transformer Symbol
51
+ ```xml
52
+ <!-- Two coils with core -->
53
+ <circle class="transformer-coil" cx="25" cy="25" r="12"/>
54
+ <circle class="transformer-coil" cx="55" cy="25" r="12"/>
55
+ <rect class="transformer-core" x="35" y="15" width="10" height="20" rx="2"/>
56
+ <!-- Busbars -->
57
+ <line x1="0" y1="15" x2="-10" y2="15" stroke="#EF9F27" stroke-width="3"/>
58
+ ```
59
+
60
+ ### Pole-mounted Transformer
61
+ ```xml
62
+ <rect class="pole" x="18" y="0" width="4" height="60"/>
63
+ <line x1="10" y1="8" x2="30" y2="8" stroke="#854F0B" stroke-width="2"/>
64
+ <rect class="dist-transformer" x="8" y="15" width="24" height="18" rx="2"/>
65
+ <line class="lv-line" x1="20" y1="33" x2="20" y2="60"/>
66
+ ```
67
+
68
+ ### House with Roof
69
+ ```xml
70
+ <rect class="home" x="0" y="25" width="35" height="30" rx="2"/>
71
+ <polygon class="home-roof" points="0,25 17,8 35,25"/>
72
+ <!-- Door -->
73
+ <rect x="8" y="35" width="8" height="15" fill="#085041"/>
74
+ <!-- Window -->
75
+ <rect x="22" y="32" width="8" height="8" fill="#9FE1CB"/>
76
+ ```
77
+
78
+ ### Factory Building
79
+ ```xml
80
+ <rect class="factory" x="0" y="15" width="90" height="50" rx="3"/>
81
+ <!-- Smokestacks -->
82
+ <rect class="factory-stack" x="15" y="0" width="10" height="20"/>
83
+ <!-- Windows row -->
84
+ <rect x="10" y="30" width="15" height="12" fill="#F5C4B3"/>
85
+ <rect x="30" y="30" width="15" height="12" fill="#F5C4B3"/>
86
+ <!-- Loading dock -->
87
+ <rect x="55" y="50" width="30" height="15" fill="#993C1D"/>
88
+ ```
89
+
90
+ ### EV Charger with Car
91
+ ```xml
92
+ <!-- Charging station -->
93
+ <rect class="ev-charger" x="20" y="0" width="25" height="45" rx="3"/>
94
+ <rect x="24" y="5" width="17" height="12" rx="1" fill="#3C3489"/>
95
+ <!-- Cable -->
96
+ <path d="M 32 20 Q 32 35 45 40" stroke="#534AB7" stroke-width="2" fill="none"/>
97
+ <circle cx="45" cy="40" r="4" fill="#534AB7"/>
98
+ <!-- Status light -->
99
+ <circle cx="32" cy="38" r="3" fill="#97C459"/>
100
+
101
+ <!-- EV Car -->
102
+ <path class="ev-car" d="M 5 20 L 5 12 Q 5 5 15 5 L 45 5 Q 55 5 55 12 L 55 20 Z"/>
103
+ <!-- Windows -->
104
+ <rect x="10" y="8" width="15" height="8" rx="2" fill="#534AB7"/>
105
+ <!-- Wheels -->
106
+ <circle cx="15" cy="22" r="5" fill="#2C2C2A"/>
107
+ <!-- Charging bolt icon -->
108
+ <path d="M 28 12 L 32 8 L 30 11 L 34 11 L 30 16 L 32 13 Z" fill="#97C459"/>
109
+ ```
110
+
111
+ ## Voltage Level Line Styles
112
+
113
+ ```css
114
+ /* High voltage (transmission) - thick, bright */
115
+ .hv-line { stroke: #EF9F27; stroke-width: 2.5; fill: none; }
116
+
117
+ /* Medium voltage (distribution) - medium */
118
+ .mv-line { stroke: #BA7517; stroke-width: 2; fill: none; }
119
+
120
+ /* Low voltage (consumer) - thin, darker */
121
+ .lv-line { stroke: #854F0B; stroke-width: 1.5; fill: none; }
122
+
123
+ /* Smart grid data - dashed purple */
124
+ .data-flow { stroke: #7F77DD; stroke-width: 1; fill: none; stroke-dasharray: 3 2; opacity: 0.7; }
125
+ ```
126
+
127
+ ## Flow Arrow Marker
128
+
129
+ ```xml
130
+ <defs>
131
+ <marker id="flow-arrow" viewBox="0 0 10 10" refX="9" refY="5"
132
+ markerWidth="6" markerHeight="6" orient="auto">
133
+ <path d="M0,0 L10,5 L0,10 Z" fill="#EF9F27"/>
134
+ </marker>
135
+ </defs>
136
+ <!-- Usage -->
137
+ <line x1="140" y1="105" x2="210" y2="105" class="hv-line" marker-end="url(#flow-arrow)"/>
138
+ ```
139
+
140
+ ## CSS Classes
141
+
142
+ ```css
143
+ /* Generation */
144
+ .nuclear-tower { fill: #B4B2A9; stroke: #5F5E5A; stroke-width: 1; }
145
+ .nuclear-building { fill: #EEEDFE; stroke: #534AB7; stroke-width: 1; }
146
+ .solar-panel { fill: #3C3489; stroke: #534AB7; stroke-width: 0.5; }
147
+ .wind-tower { fill: #B4B2A9; stroke: #5F5E5A; stroke-width: 1; }
148
+ .wind-blade { fill: #F1EFE8; stroke: #888780; stroke-width: 0.5; }
149
+ .gas-plant { fill: #FAECE7; stroke: #993C1D; stroke-width: 1; }
150
+ .gas-flame { fill: #EF9F27; }
151
+
152
+ /* Transmission */
153
+ .pylon { fill: #5F5E5A; stroke: #444441; stroke-width: 0.5; }
154
+ .insulator { fill: #FAEEDA; stroke: #854F0B; stroke-width: 0.5; }
155
+ .substation { fill: #E6F1FB; stroke: #185FA5; stroke-width: 1; }
156
+ .transformer-coil { fill: none; stroke: #185FA5; stroke-width: 1.5; }
157
+
158
+ /* Distribution */
159
+ .pole { fill: #854F0B; stroke: #633806; stroke-width: 0.5; }
160
+ .dist-transformer { fill: #E1F5EE; stroke: #0F6E56; stroke-width: 1; }
161
+
162
+ /* Consumption */
163
+ .home { fill: #E1F5EE; stroke: #0F6E56; stroke-width: 1; }
164
+ .home-roof { fill: #0F6E56; stroke: #085041; stroke-width: 0.5; }
165
+ .factory { fill: #FAECE7; stroke: #993C1D; stroke-width: 1; }
166
+ .ev-charger { fill: #EEEDFE; stroke: #534AB7; stroke-width: 1; }
167
+ .ev-car { fill: #3C3489; stroke: #534AB7; stroke-width: 0.5; }
168
+
169
+ /* Smart grid */
170
+ .smart-grid { fill: #EEEDFE; stroke: #534AB7; stroke-width: 1.5; }
171
+ ```
172
+
173
+ ## Layout Notes
174
+
175
+ - **ViewBox**: 820×520 (wide for 4-column layout)
176
+ - **Column widths**: ~200px per stage
177
+ - **Stage dividers**: Vertical dashed lines at x=200, 420, 620
178
+ - **Stage labels**: Top of diagram, uppercase for emphasis
179
+ - **Flow direction**: Left-to-right with arrows showing power flow
180
+ - **Data overlay**: Smart grid data lines use different style (dashed purple) to distinguish from power lines
181
+ - **Capacity labels**: Show MW ratings on generators for context
182
+ - **Voltage labels**: Show transformation ratios at substations
@@ -0,0 +1,172 @@
1
+ # Feature Film Production Pipeline
2
+
3
+ A phased workflow showing the five stages of filmmaking, using containers with inner nodes and horizontal sub-flows within a phase.
4
+
5
+ ## Key Patterns Used
6
+
7
+ - **Phase containers**: Large rounded rectangles with neutral background and dashed borders
8
+ - **Inner task nodes**: Smaller colored nodes inside containers for sub-tasks
9
+ - **Horizontal flow within container**: Post-production shows sequential pipeline with arrows (Editing → Color → VFX → Sound → Score)
10
+ - **Consistent phase spacing**: ~30px gap between phase containers
11
+ - **Phase labels with subtitles**: Each container has title + description
12
+
13
+ ## Diagram
14
+
15
+ ```xml
16
+ <svg width="100%" viewBox="0 0 680 780" xmlns="http://www.w3.org/2000/svg">
17
+ <defs>
18
+ <marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5"
19
+ markerWidth="6" markerHeight="6" orient="auto-start-reverse">
20
+ <path d="M2 1L8 5L2 9" fill="none" stroke="context-stroke"
21
+ stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
22
+ </marker>
23
+ </defs>
24
+
25
+ <!-- Phase 1: Development -->
26
+ <g>
27
+ <rect x="40" y="30" width="600" height="110" rx="16" stroke-width="1" stroke-dasharray="6 4" fill="var(--bg-secondary)" stroke="var(--border)"/>
28
+ <text class="th" x="66" y="56">Development</text>
29
+ <text class="ts" x="66" y="74">Concept to greenlight</text>
30
+ </g>
31
+ <g class="node c-purple">
32
+ <rect x="70" y="90" width="160" height="36" rx="6" stroke-width="0.5"/>
33
+ <text class="ts" x="150" y="108" text-anchor="middle" dominant-baseline="central">Script / screenplay</text>
34
+ </g>
35
+ <g class="node c-purple">
36
+ <rect x="260" y="90" width="160" height="36" rx="6" stroke-width="0.5"/>
37
+ <text class="ts" x="340" y="108" text-anchor="middle" dominant-baseline="central">Financing / budget</text>
38
+ </g>
39
+ <g class="node c-purple">
40
+ <rect x="450" y="90" width="160" height="36" rx="6" stroke-width="0.5"/>
41
+ <text class="ts" x="530" y="108" text-anchor="middle" dominant-baseline="central">Casting leads</text>
42
+ </g>
43
+
44
+ <!-- Arrow to Phase 2 -->
45
+ <line x1="340" y1="140" x2="340" y2="170" class="arr" marker-end="url(#arrow)"/>
46
+
47
+ <!-- Phase 2: Pre-production -->
48
+ <g>
49
+ <rect x="40" y="170" width="600" height="110" rx="16" stroke-width="1" stroke-dasharray="6 4" fill="var(--bg-secondary)" stroke="var(--border)"/>
50
+ <text class="th" x="66" y="196">Pre-production</text>
51
+ <text class="ts" x="66" y="214">Planning and preparation</text>
52
+ </g>
53
+ <g class="node c-teal">
54
+ <rect x="70" y="230" width="160" height="36" rx="6" stroke-width="0.5"/>
55
+ <text class="ts" x="150" y="248" text-anchor="middle" dominant-baseline="central">Storyboards</text>
56
+ </g>
57
+ <g class="node c-teal">
58
+ <rect x="260" y="230" width="160" height="36" rx="6" stroke-width="0.5"/>
59
+ <text class="ts" x="340" y="248" text-anchor="middle" dominant-baseline="central">Location scouting</text>
60
+ </g>
61
+ <g class="node c-teal">
62
+ <rect x="450" y="230" width="160" height="36" rx="6" stroke-width="0.5"/>
63
+ <text class="ts" x="530" y="248" text-anchor="middle" dominant-baseline="central">Crew hiring</text>
64
+ </g>
65
+
66
+ <!-- Arrow to Phase 3 -->
67
+ <line x1="340" y1="280" x2="340" y2="310" class="arr" marker-end="url(#arrow)"/>
68
+
69
+ <!-- Phase 3: Production -->
70
+ <g>
71
+ <rect x="40" y="310" width="600" height="110" rx="16" stroke-width="1" stroke-dasharray="6 4" fill="var(--bg-secondary)" stroke="var(--border)"/>
72
+ <text class="th" x="66" y="336">Production</text>
73
+ <text class="ts" x="66" y="354">Principal photography</text>
74
+ </g>
75
+ <g class="node c-coral">
76
+ <rect x="70" y="370" width="160" height="36" rx="6" stroke-width="0.5"/>
77
+ <text class="ts" x="150" y="388" text-anchor="middle" dominant-baseline="central">Filming / shooting</text>
78
+ </g>
79
+ <g class="node c-coral">
80
+ <rect x="260" y="370" width="160" height="36" rx="6" stroke-width="0.5"/>
81
+ <text class="ts" x="340" y="388" text-anchor="middle" dominant-baseline="central">Production sound</text>
82
+ </g>
83
+ <g class="node c-coral">
84
+ <rect x="450" y="370" width="160" height="36" rx="6" stroke-width="0.5"/>
85
+ <text class="ts" x="530" y="388" text-anchor="middle" dominant-baseline="central">VFX plates</text>
86
+ </g>
87
+
88
+ <!-- Arrow to Phase 4 -->
89
+ <line x1="340" y1="420" x2="340" y2="450" class="arr" marker-end="url(#arrow)"/>
90
+
91
+ <!-- Phase 4: Post-production -->
92
+ <g>
93
+ <rect x="40" y="450" width="600" height="150" rx="16" stroke-width="1" stroke-dasharray="6 4" fill="var(--bg-secondary)" stroke="var(--border)"/>
94
+ <text class="th" x="66" y="476">Post-production</text>
95
+ <text class="ts" x="66" y="494">Assembly and finishing</text>
96
+ </g>
97
+ <g class="node c-amber">
98
+ <rect x="70" y="510" width="110" height="36" rx="6" stroke-width="0.5"/>
99
+ <text class="ts" x="125" y="528" text-anchor="middle" dominant-baseline="central">Editing</text>
100
+ </g>
101
+ <g class="node c-amber">
102
+ <rect x="195" y="510" width="110" height="36" rx="6" stroke-width="0.5"/>
103
+ <text class="ts" x="250" y="528" text-anchor="middle" dominant-baseline="central">Color grade</text>
104
+ </g>
105
+ <g class="node c-amber">
106
+ <rect x="320" y="510" width="90" height="36" rx="6" stroke-width="0.5"/>
107
+ <text class="ts" x="365" y="528" text-anchor="middle" dominant-baseline="central">VFX</text>
108
+ </g>
109
+ <g class="node c-amber">
110
+ <rect x="425" y="510" width="100" height="36" rx="6" stroke-width="0.5"/>
111
+ <text class="ts" x="475" y="528" text-anchor="middle" dominant-baseline="central">Sound mix</text>
112
+ </g>
113
+ <g class="node c-amber">
114
+ <rect x="540" y="510" width="80" height="36" rx="6" stroke-width="0.5"/>
115
+ <text class="ts" x="580" y="528" text-anchor="middle" dominant-baseline="central">Score</text>
116
+ </g>
117
+ <!-- Flow arrows within post -->
118
+ <line x1="180" y1="528" x2="195" y2="528" class="arr" marker-end="url(#arrow)"/>
119
+ <line x1="305" y1="528" x2="320" y2="528" class="arr" marker-end="url(#arrow)"/>
120
+ <line x1="410" y1="528" x2="425" y2="528" class="arr" marker-end="url(#arrow)"/>
121
+ <line x1="525" y1="528" x2="540" y2="528" class="arr" marker-end="url(#arrow)"/>
122
+ <!-- Final delivery label -->
123
+ <g class="node c-amber">
124
+ <rect x="240" y="556" width="200" height="32" rx="6" stroke-width="0.5"/>
125
+ <text class="ts" x="340" y="572" text-anchor="middle" dominant-baseline="central">Final master / DCP</text>
126
+ </g>
127
+ <line x1="340" y1="546" x2="340" y2="556" class="arr" marker-end="url(#arrow)"/>
128
+
129
+ <!-- Arrow to Phase 5 -->
130
+ <line x1="340" y1="600" x2="340" y2="630" class="arr" marker-end="url(#arrow)"/>
131
+
132
+ <!-- Phase 5: Distribution -->
133
+ <g>
134
+ <rect x="40" y="630" width="600" height="110" rx="16" stroke-width="1" stroke-dasharray="6 4" fill="var(--bg-secondary)" stroke="var(--border)"/>
135
+ <text class="th" x="66" y="656">Distribution</text>
136
+ <text class="ts" x="66" y="674">Release and exhibition</text>
137
+ </g>
138
+ <g class="node c-blue">
139
+ <rect x="70" y="690" width="160" height="36" rx="6" stroke-width="0.5"/>
140
+ <text class="ts" x="150" y="708" text-anchor="middle" dominant-baseline="central">Film festivals</text>
141
+ </g>
142
+ <g class="node c-blue">
143
+ <rect x="260" y="690" width="160" height="36" rx="6" stroke-width="0.5"/>
144
+ <text class="ts" x="340" y="708" text-anchor="middle" dominant-baseline="central">Theatrical release</text>
145
+ </g>
146
+ <g class="node c-blue">
147
+ <rect x="450" y="690" width="160" height="36" rx="6" stroke-width="0.5"/>
148
+ <text class="ts" x="530" y="708" text-anchor="middle" dominant-baseline="central">Streaming / VOD</text>
149
+ </g>
150
+ </svg>
151
+ ```
152
+
153
+ ## Color Assignments
154
+
155
+ | Element | Color | Reason |
156
+ |---------|-------|--------|
157
+ | Phase containers | Neutral (dashed) | Subtle grouping, doesn't compete with content |
158
+ | Development tasks | `c-purple` | Creative/concept work |
159
+ | Pre-production tasks | `c-teal` | Planning and preparation |
160
+ | Production tasks | `c-coral` | Active filming (main event) |
161
+ | Post-production tasks | `c-amber` | Processing/refinement |
162
+ | Distribution tasks | `c-blue` | Outward delivery/release |
163
+
164
+ ## Layout Notes
165
+
166
+ - **ViewBox**: 680×780 (standard width, tall for 5 phases)
167
+ - **Container style**: Dashed border (`stroke-dasharray="6 4"`), neutral fill (`var(--bg-secondary)`), `stroke-width="1"`
168
+ - **Container height**: 110px for 3-node phases, 150px for post-production (more complex)
169
+ - **Inner node dimensions**: 160×36px for standard tasks, variable width for post-production sequential flow
170
+ - **Phase gap**: 30px between containers
171
+ - **Horizontal sub-flow**: Post-production uses tightly packed nodes with arrows between them to show sequence
172
+ - **Convergence node**: "Final master / DCP" sits below the horizontal flow, collecting all post outputs