@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.
- package/.env.example +144 -0
- package/README.md +56 -0
- package/agents/README.md +120 -0
- package/agents/code-reviewer.md +97 -0
- package/agents/security-auditor.md +101 -0
- package/agents/test-engineer.md +95 -0
- package/dist/__tests__/agent_mode.test.d.ts +1 -0
- package/dist/__tests__/api-routes.test.d.ts +1 -0
- package/dist/__tests__/api-routes.test.js +170 -0
- package/dist/__tests__/crypto.test.d.ts +1 -0
- package/dist/__tests__/crypto.test.js +28 -0
- package/dist/__tests__/host-integrations.test.d.ts +1 -0
- package/dist/__tests__/host-integrations.test.js +82 -0
- package/dist/__tests__/integration.test.d.ts +1 -0
- package/dist/__tests__/integration.test.js +50 -0
- package/dist/__tests__/loader.test.d.ts +1 -0
- package/dist/__tests__/loader.test.js +89 -0
- package/dist/__tests__/neural-spark.test.d.ts +1 -0
- package/dist/__tests__/neural-spark.test.js +112 -0
- package/dist/__tests__/pagination.test.d.ts +1 -0
- package/dist/__tests__/pagination.test.js +23 -0
- package/dist/__tests__/redaction.test.d.ts +1 -0
- package/dist/__tests__/redaction.test.js +17 -0
- package/dist/__tests__/registry.test.d.ts +1 -0
- package/dist/__tests__/registry.test.js +56 -0
- package/dist/__tests__/retry.test.d.ts +1 -0
- package/dist/__tests__/retry.test.js +30 -0
- package/dist/__tests__/skill-activation.test.d.ts +1 -0
- package/dist/__tests__/skill-activation.test.js +112 -0
- package/dist/__tests__/working-memory.test.d.ts +1 -0
- package/dist/__tests__/working-memory.test.js +200 -0
- package/dist/__tests__/workspace-paths.test.d.ts +1 -0
- package/dist/__tests__/workspace-paths.test.js +56 -0
- package/dist/__tests__/writer.test.d.ts +1 -0
- package/dist/__tests__/writer.test.js +94 -0
- package/dist/api/auth/crypto.d.ts +4 -0
- package/dist/api/auth/crypto.js +54 -0
- package/dist/api/middleware/auth.d.ts +12 -0
- package/dist/api/middleware/auth.js +90 -0
- package/dist/api/pagination.d.ts +18 -0
- package/dist/api/pagination.js +32 -0
- package/dist/api/routes/auth.d.ts +1 -0
- package/dist/api/routes/auth.js +130 -0
- package/dist/api/routes/chat-completions.d.ts +7 -0
- package/dist/api/routes/chat-completions.js +474 -0
- package/dist/api/routes/contradictions.d.ts +1 -0
- package/dist/api/routes/contradictions.js +28 -0
- package/dist/api/routes/evidence.d.ts +1 -0
- package/dist/api/routes/evidence.js +59 -0
- package/dist/api/routes/governance.d.ts +1 -0
- package/dist/api/routes/governance.js +95 -0
- package/dist/api/routes/graph.d.ts +1 -0
- package/dist/api/routes/graph.js +25 -0
- package/dist/api/routes/hooks.d.ts +1 -0
- package/dist/api/routes/hooks.js +88 -0
- package/dist/api/routes/memories.d.ts +1 -0
- package/dist/api/routes/memories.js +92 -0
- package/dist/api/routes/persona.d.ts +1 -0
- package/dist/api/routes/persona.js +9 -0
- package/dist/api/routes/scenes.d.ts +1 -0
- package/dist/api/routes/scenes.js +35 -0
- package/dist/api/routes/skills.d.ts +1 -0
- package/dist/api/routes/skills.js +14 -0
- package/dist/api/routes/stats.d.ts +1 -0
- package/dist/api/routes/stats.js +8 -0
- package/dist/api/routes/users.d.ts +1 -0
- package/dist/api/routes/users.js +82 -0
- package/dist/api/routes/working.d.ts +1 -0
- package/dist/api/routes/working.js +88 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +492 -0
- package/dist/integrations/claude-code.d.ts +12 -0
- package/dist/integrations/claude-code.js +35 -0
- package/dist/integrations/codex.d.ts +12 -0
- package/dist/integrations/codex.js +34 -0
- package/dist/integrations/generic-mcp.d.ts +52 -0
- package/dist/integrations/generic-mcp.js +118 -0
- package/dist/loader.d.ts +29 -0
- package/dist/loader.js +200 -0
- package/dist/memory/capture.d.ts +35 -0
- package/dist/memory/capture.js +230 -0
- package/dist/memory/config.d.ts +2 -0
- package/dist/memory/config.js +3 -0
- package/dist/memory/engine.d.ts +203 -0
- package/dist/memory/engine.js +626 -0
- package/dist/memory/llm-semaphore.d.ts +41 -0
- package/dist/memory/llm-semaphore.js +81 -0
- package/dist/memory/memory-type-config.d.ts +11 -0
- package/dist/memory/memory-type-config.js +65 -0
- package/dist/memory/pipeline/cognitive-contradiction.d.ts +7 -0
- package/dist/memory/pipeline/cognitive-contradiction.js +59 -0
- package/dist/memory/pipeline/cognitive-dedup.d.ts +23 -0
- package/dist/memory/pipeline/cognitive-dedup.js +38 -0
- package/dist/memory/pipeline/cognitive-extractor.d.ts +21 -0
- package/dist/memory/pipeline/cognitive-extractor.js +183 -0
- package/dist/memory/pipeline/contextual-focus-builder.d.ts +13 -0
- package/dist/memory/pipeline/contextual-focus-builder.js +135 -0
- package/dist/memory/pipeline/focus-direction-shift.d.ts +10 -0
- package/dist/memory/pipeline/focus-direction-shift.js +27 -0
- package/dist/memory/pipeline/graph-builder.d.ts +11 -0
- package/dist/memory/pipeline/graph-builder.js +88 -0
- package/dist/memory/pipeline/graph-recall.d.ts +13 -0
- package/dist/memory/pipeline/graph-recall.js +55 -0
- package/dist/memory/pipeline/identity-distiller.d.ts +15 -0
- package/dist/memory/pipeline/identity-distiller.js +40 -0
- package/dist/memory/pipeline/l1-contradiction.d.ts +7 -0
- package/dist/memory/pipeline/l1-contradiction.js +66 -0
- package/dist/memory/pipeline/l1-dedup.d.ts +23 -0
- package/dist/memory/pipeline/l1-dedup.js +39 -0
- package/dist/memory/pipeline/l1-extractor.d.ts +21 -0
- package/dist/memory/pipeline/l1-extractor.js +180 -0
- package/dist/memory/pipeline/l2-direction-shift.d.ts +10 -0
- package/dist/memory/pipeline/l2-direction-shift.js +27 -0
- package/dist/memory/pipeline/l2-scene.d.ts +15 -0
- package/dist/memory/pipeline/l2-scene.js +140 -0
- package/dist/memory/pipeline/l3-distiller.d.ts +15 -0
- package/dist/memory/pipeline/l3-distiller.js +40 -0
- package/dist/memory/pipeline/neural-spark.d.ts +27 -0
- package/dist/memory/pipeline/neural-spark.js +78 -0
- package/dist/memory/pipeline/skill-prewarm.d.ts +63 -0
- package/dist/memory/pipeline/skill-prewarm.js +127 -0
- package/dist/memory/pipeline/task-queue.d.ts +54 -0
- package/dist/memory/pipeline/task-queue.js +117 -0
- package/dist/memory/prompts/cognitive-contradiction.d.ts +1 -0
- package/dist/memory/prompts/cognitive-contradiction.js +25 -0
- package/dist/memory/prompts/cognitive-extraction.d.ts +10 -0
- package/dist/memory/prompts/cognitive-extraction.js +114 -0
- package/dist/memory/prompts/core-identity.d.ts +6 -0
- package/dist/memory/prompts/core-identity.js +60 -0
- package/dist/memory/prompts/focus-direction-shift.d.ts +5 -0
- package/dist/memory/prompts/focus-direction-shift.js +32 -0
- package/dist/memory/prompts/focus-scene-cluster.d.ts +2 -0
- package/dist/memory/prompts/focus-scene-cluster.js +33 -0
- package/dist/memory/prompts/focus-scene.d.ts +7 -0
- package/dist/memory/prompts/focus-scene.js +40 -0
- package/dist/memory/prompts/graph-extraction-batch.d.ts +14 -0
- package/dist/memory/prompts/graph-extraction-batch.js +54 -0
- package/dist/memory/prompts/graph-extraction.d.ts +2 -0
- package/dist/memory/prompts/graph-extraction.js +53 -0
- package/dist/memory/prompts/l1-contradiction-batch.d.ts +16 -0
- package/dist/memory/prompts/l1-contradiction-batch.js +47 -0
- package/dist/memory/prompts/l1-contradiction.d.ts +1 -0
- package/dist/memory/prompts/l1-contradiction.js +25 -0
- package/dist/memory/prompts/l1-extraction.d.ts +10 -0
- package/dist/memory/prompts/l1-extraction.js +114 -0
- package/dist/memory/prompts/l2-direction-shift.d.ts +5 -0
- package/dist/memory/prompts/l2-direction-shift.js +32 -0
- package/dist/memory/prompts/l2-scene-cluster.d.ts +2 -0
- package/dist/memory/prompts/l2-scene-cluster.js +33 -0
- package/dist/memory/prompts/l2-scene.d.ts +7 -0
- package/dist/memory/prompts/l2-scene.js +40 -0
- package/dist/memory/prompts/l3-persona.d.ts +6 -0
- package/dist/memory/prompts/l3-persona.js +60 -0
- package/dist/memory/recall.d.ts +47 -0
- package/dist/memory/recall.js +427 -0
- package/dist/memory/redaction.d.ts +1 -0
- package/dist/memory/redaction.js +24 -0
- package/dist/memory/retry.d.ts +13 -0
- package/dist/memory/retry.js +53 -0
- package/dist/memory/scheduler.d.ts +9 -0
- package/dist/memory/scheduler.js +16 -0
- package/dist/memory/skill-hints-loader.d.ts +30 -0
- package/dist/memory/skill-hints-loader.js +100 -0
- package/dist/memory/store/embedding.d.ts +16 -0
- package/dist/memory/store/embedding.js +68 -0
- package/dist/memory/store/reranker.d.ts +24 -0
- package/dist/memory/store/reranker.js +83 -0
- package/dist/memory/store/sqlite.d.ts +167 -0
- package/dist/memory/store/sqlite.js +1816 -0
- package/dist/memory/store/types.d.ts +101 -0
- package/dist/memory/store/types.js +1 -0
- package/dist/memory/types.d.ts +207 -0
- package/dist/memory/types.js +7 -0
- package/dist/memory/validation.d.ts +441 -0
- package/dist/memory/validation.js +129 -0
- package/dist/memory/working/canvas.d.ts +5 -0
- package/dist/memory/working/canvas.js +43 -0
- package/dist/memory/working/offload.d.ts +71 -0
- package/dist/memory/working/offload.js +211 -0
- package/dist/memory/working/step-log.d.ts +16 -0
- package/dist/memory/working/step-log.js +35 -0
- package/dist/registry.d.ts +34 -0
- package/dist/registry.js +305 -0
- package/dist/resolver.d.ts +17 -0
- package/dist/resolver.js +126 -0
- package/dist/scripts/validate-foreign-workspace-path.d.ts +1 -0
- package/dist/scripts/validate-foreign-workspace-path.js +39 -0
- package/dist/tools/agent_memory_tools.d.ts +485 -0
- package/dist/tools/agent_memory_tools.js +793 -0
- package/dist/tools/create_skill.d.ts +46 -0
- package/dist/tools/create_skill.js +46 -0
- package/dist/tools/get_doc.d.ts +21 -0
- package/dist/tools/get_doc.js +24 -0
- package/dist/tools/get_persona.d.ts +15 -0
- package/dist/tools/get_persona.js +20 -0
- package/dist/tools/get_reference.d.ts +15 -0
- package/dist/tools/get_reference.js +20 -0
- package/dist/tools/get_skill.d.ts +34 -0
- package/dist/tools/get_skill.js +65 -0
- package/dist/tools/get_template_doc.d.ts +21 -0
- package/dist/tools/get_template_doc.js +24 -0
- package/dist/tools/list_docs.d.ts +15 -0
- package/dist/tools/list_docs.js +16 -0
- package/dist/tools/list_skills.d.ts +18 -0
- package/dist/tools/list_skills.js +17 -0
- package/dist/tools/list_template_docs.d.ts +15 -0
- package/dist/tools/list_template_docs.js +16 -0
- package/dist/tools/memory-engineering.d.ts +225 -0
- package/dist/tools/memory-engineering.js +284 -0
- package/dist/tools/memory-explain.d.ts +34 -0
- package/dist/tools/memory-explain.js +109 -0
- package/dist/tools/memory-governance.d.ts +171 -0
- package/dist/tools/memory-governance.js +224 -0
- package/dist/tools/memory-hooks.d.ts +67 -0
- package/dist/tools/memory-hooks.js +102 -0
- package/dist/tools/memory-working.d.ts +98 -0
- package/dist/tools/memory-working.js +101 -0
- package/dist/tools/memory_capture_turn.d.ts +66 -0
- package/dist/tools/memory_capture_turn.js +85 -0
- package/dist/tools/memory_consolidate.d.ts +55 -0
- package/dist/tools/memory_consolidate.js +176 -0
- package/dist/tools/memory_contradictions.d.ts +53 -0
- package/dist/tools/memory_contradictions.js +52 -0
- package/dist/tools/memory_graph_query.d.ts +51 -0
- package/dist/tools/memory_graph_query.js +35 -0
- package/dist/tools/memory_mark_cited.d.ts +43 -0
- package/dist/tools/memory_mark_cited.js +63 -0
- package/dist/tools/memory_recall.d.ts +77 -0
- package/dist/tools/memory_recall.js +81 -0
- package/dist/tools/memory_register_skill_hints.d.ts +49 -0
- package/dist/tools/memory_register_skill_hints.js +55 -0
- package/dist/tools/memory_resolve_session.d.ts +24 -0
- package/dist/tools/memory_resolve_session.js +133 -0
- package/dist/tools/memory_search.d.ts +146 -0
- package/dist/tools/memory_search.js +84 -0
- package/dist/tools/search_skills.d.ts +18 -0
- package/dist/tools/search_skills.js +17 -0
- package/dist/tools/update_doc.d.ts +24 -0
- package/dist/tools/update_doc.js +35 -0
- package/dist/tools/update_skill.d.ts +30 -0
- package/dist/tools/update_skill.js +80 -0
- package/dist/types.d.ts +81 -0
- package/dist/types.js +4 -0
- package/dist/writer.d.ts +30 -0
- package/dist/writer.js +220 -0
- package/docs/TEMPLATE ONLY +1 -0
- package/docs/api/API.md +64 -0
- package/docs/api/security/SECURITY.md +58 -0
- package/docs/deployment/DockerDeployment.md +30 -0
- package/docs/design/Design.md +59 -0
- package/docs/design/themes/apple.md +101 -0
- package/docs/design/themes/dieter-grid.md +100 -0
- package/docs/design/themes/gallery-white.md +100 -0
- package/docs/design/themes/pinterest.md +101 -0
- package/docs/design/themes/realty-open-house.md +101 -0
- package/docs/design/themes/vodafone.md +101 -0
- package/docs/hooks/Hooks.md +30 -0
- package/docs/schema/Schema.md +35 -0
- package/docs/strategy/ScalingStrategy.md +19 -0
- package/package.json +88 -0
- package/references/accessibility-checklist.md +160 -0
- package/references/orchestration-patterns.md +370 -0
- package/references/performance-checklist.md +153 -0
- package/references/security-checklist.md +134 -0
- package/references/testing-patterns.md +236 -0
- package/skills/agent/adr-skill/SKILL.md +299 -0
- package/skills/agent/agentic-engineering-workflow/SKILL.md +95 -0
- package/skills/agent/bootstrap-skill/SKILL.md +103 -0
- package/skills/agent/context-engineering/SKILL.md +307 -0
- package/skills/agent/debugging-and-error-recovery/SKILL.md +308 -0
- package/skills/agent/developer-growth-analysis/SKILL.md +328 -0
- package/skills/agent/doubt-driven-skill/SKILL.md +249 -0
- package/skills/agent/handover-skill/SKILL.md +112 -0
- package/skills/agent/idea-refine-skill/SKILL.md +185 -0
- package/skills/agent/idea-refine-skill/examples.md +238 -0
- package/skills/agent/idea-refine-skill/frameworks.md +99 -0
- package/skills/agent/idea-refine-skill/refinement-criteria.md +113 -0
- package/skills/agent/interview-skill/SKILL.md +226 -0
- package/skills/agent/planning-skill/SKILL.md +270 -0
- package/skills/agent/skill-authoring/SKILL.md +189 -0
- package/skills/agent/source-driven-skill/SKILL.md +197 -0
- package/skills/agent/spec-driven-skill/SKILL.md +221 -0
- package/skills/agent/sync-skill/SKILL.md +92 -0
- package/skills/agent/using-agent-skills/SKILL.md +189 -0
- package/skills/api/a11y-skill/SKILL.md +88 -0
- package/skills/api/api-skill/SKILL.md +123 -0
- package/skills/api/auth-skill/SKILL.md +80 -0
- package/skills/api/debug-skill/SKILL.md +535 -0
- package/skills/api/performance-skill/SKILL.md +100 -0
- package/skills/api/testing-skill/SKILL.md +100 -0
- package/skills/codebase/code-review-and-quality/SKILL.md +228 -0
- package/skills/codebase/code-simplification/SKILL.md +352 -0
- package/skills/codebase/code-structure-cleanup/SKILL.md +142 -0
- package/skills/codebase/concerns-skill/SKILL.md +89 -0
- package/skills/codebase/conventions-skill/SKILL.md +95 -0
- package/skills/codebase/doc-management-skill/SKILL.md +47 -0
- package/skills/codebase/git-workflow-skill/SKILL.md +312 -0
- package/skills/communication/1-3-1-rule/SKILL.md +120 -0
- package/skills/design/brutalist-skill/SKILL.md +131 -0
- package/skills/design/concept-diagrams/SKILL.md +387 -0
- package/skills/design/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
- package/skills/design/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
- package/skills/design/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
- package/skills/design/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
- package/skills/design/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
- package/skills/design/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
- package/skills/design/concept-diagrams/examples/electricity-grid-flow.md +182 -0
- package/skills/design/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
- package/skills/design/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
- package/skills/design/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
- package/skills/design/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
- package/skills/design/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
- package/skills/design/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
- package/skills/design/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
- package/skills/design/concept-diagrams/examples/wind-turbine-structure.md +338 -0
- package/skills/design/concept-diagrams/references/dashboard-patterns.md +43 -0
- package/skills/design/concept-diagrams/references/infrastructure-patterns.md +144 -0
- package/skills/design/concept-diagrams/references/physical-shape-cookbook.md +42 -0
- package/skills/design/concept-diagrams/templates/template.html +174 -0
- package/skills/design/gpt-tasteskill/SKILL.md +114 -0
- package/skills/design/minimalist-skill/SKILL.md +116 -0
- package/skills/design/output-skill/SKILL.md +87 -0
- package/skills/design/redesign-skill/SKILL.md +213 -0
- package/skills/design/soft-skill/SKILL.md +132 -0
- package/skills/design/stitch-skill/EXAMPLE.md +121 -0
- package/skills/design/stitch-skill/SKILL.md +222 -0
- package/skills/design/taste-skill/SKILL.md +269 -0
- package/skills/devops/ci-cd-skill/SKILL.md +402 -0
- package/skills/devops/docker-skill/SKILL.md +297 -0
- package/skills/devops/domain-skill/SKILL.md +234 -0
- package/skills/lifecycle/changelog-generator/SKILL.md +135 -0
- package/skills/lifecycle/incremental-skill/SKILL.md +257 -0
- package/skills/lifecycle/migration-skill/SKILL.md +218 -0
- package/skills/lifecycle/shipping-skill/SKILL.md +321 -0
- package/skills/memory/agent-memory/SKILL.md +122 -0
- package/skills/qa/browser-testing-skill/SKILL.md +314 -0
- package/skills/ux/adversarial-ux-skill/SKILL.md +168 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# Autonomous LLM Research Agent Flow
|
|
2
|
+
|
|
3
|
+
A multi-section flowchart showing Karpathy's autoresearch framework: human-agent handoff, the autonomous experiment loop with keep/discard decision branching, and the modifiable training pipeline. Demonstrates loop-back arrows, convergent decision paths, and semantic color coding for outcomes.
|
|
4
|
+
|
|
5
|
+
## Key Patterns Used
|
|
6
|
+
|
|
7
|
+
- **Three-section layout**: Setup row, main loop container, and detail container — each visually distinct
|
|
8
|
+
- **Neutral dashed containers**: Loop and training pipeline use `var(--bg-secondary)` fill with dashed borders to recede behind colored content nodes
|
|
9
|
+
- **Decision branching with convergence**: "val_bpb improved?" splits into Keep (green) and Discard (red), then both converge back to "Log to results.tsv"
|
|
10
|
+
- **Loop-back arrow**: Dashed path with rounded corners on the right side of the container showing infinite repetition
|
|
11
|
+
- **Semantic color for outcomes**: Green = improvement (keep), Red = no improvement (discard) — not arbitrary decoration
|
|
12
|
+
- **Highlighted key step**: "Run training" uses `c-coral` to visually distinguish the most important step from other `c-teal` actions
|
|
13
|
+
- **Horizontal pipeline flow**: Training details section uses left-to-right arrow-connected nodes (GPT → MuonAdamW → Evaluation)
|
|
14
|
+
- **Footer metadata**: Fixed constraints shown as subtle centered text below the pipeline nodes
|
|
15
|
+
- **Legend row**: Color key at the bottom explaining what each color means
|
|
16
|
+
|
|
17
|
+
## Diagram
|
|
18
|
+
|
|
19
|
+
```xml
|
|
20
|
+
<svg width="100%" viewBox="0 0 680 920" xmlns="http://www.w3.org/2000/svg">
|
|
21
|
+
<defs>
|
|
22
|
+
<marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5"
|
|
23
|
+
markerWidth="6" markerHeight="6" orient="auto-start-reverse">
|
|
24
|
+
<path d="M2 1L8 5L2 9" fill="none" stroke="context-stroke"
|
|
25
|
+
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
26
|
+
</marker>
|
|
27
|
+
</defs>
|
|
28
|
+
|
|
29
|
+
<!-- ========================================== -->
|
|
30
|
+
<!-- SECTION 1: SETUP (Human → program.md → AI) -->
|
|
31
|
+
<!-- ========================================== -->
|
|
32
|
+
|
|
33
|
+
<text class="ts" x="40" y="30" text-anchor="start" opacity=".5">One-time setup</text>
|
|
34
|
+
|
|
35
|
+
<!-- Human -->
|
|
36
|
+
<g class="node c-gray">
|
|
37
|
+
<rect x="60" y="42" width="140" height="56" rx="8" stroke-width="0.5"/>
|
|
38
|
+
<text class="th" x="130" y="62" text-anchor="middle" dominant-baseline="central">Human</text>
|
|
39
|
+
<text class="ts" x="130" y="82" text-anchor="middle" dominant-baseline="central">Researcher</text>
|
|
40
|
+
</g>
|
|
41
|
+
|
|
42
|
+
<!-- Arrow: Human → program.md -->
|
|
43
|
+
<line x1="200" y1="70" x2="250" y2="70" class="arr" marker-end="url(#arrow)"/>
|
|
44
|
+
|
|
45
|
+
<!-- program.md -->
|
|
46
|
+
<g class="node c-gray">
|
|
47
|
+
<rect x="250" y="42" width="180" height="56" rx="8" stroke-width="0.5"/>
|
|
48
|
+
<text class="th" x="340" y="62" text-anchor="middle" dominant-baseline="central">program.md</text>
|
|
49
|
+
<text class="ts" x="340" y="82" text-anchor="middle" dominant-baseline="central">Agent instructions</text>
|
|
50
|
+
</g>
|
|
51
|
+
|
|
52
|
+
<!-- Arrow: program.md → AI Agent -->
|
|
53
|
+
<line x1="430" y1="70" x2="470" y2="70" class="arr" marker-end="url(#arrow)"/>
|
|
54
|
+
|
|
55
|
+
<!-- AI Agent -->
|
|
56
|
+
<g class="node c-purple">
|
|
57
|
+
<rect x="470" y="42" width="160" height="56" rx="8" stroke-width="0.5"/>
|
|
58
|
+
<text class="th" x="550" y="62" text-anchor="middle" dominant-baseline="central">AI agent</text>
|
|
59
|
+
<text class="ts" x="550" y="82" text-anchor="middle" dominant-baseline="central">Claude / Codex</text>
|
|
60
|
+
</g>
|
|
61
|
+
|
|
62
|
+
<!-- Arrow: Setup row → Loop (from program.md center down) -->
|
|
63
|
+
<line x1="340" y1="98" x2="340" y2="142" class="arr" marker-end="url(#arrow)"/>
|
|
64
|
+
|
|
65
|
+
<!-- ========================================== -->
|
|
66
|
+
<!-- SECTION 2: AUTONOMOUS EXPERIMENT LOOP -->
|
|
67
|
+
<!-- ========================================== -->
|
|
68
|
+
|
|
69
|
+
<!-- Loop container (neutral dashed) -->
|
|
70
|
+
<g>
|
|
71
|
+
<rect x="40" y="142" width="600" height="528" rx="16"
|
|
72
|
+
stroke-width="1" stroke-dasharray="6 4"
|
|
73
|
+
fill="var(--bg-secondary)" stroke="var(--border)"/>
|
|
74
|
+
<text class="th" x="66" y="170">Autonomous experiment loop</text>
|
|
75
|
+
<text class="ts" x="66" y="188">~12 experiments/hour — runs until manually stopped</text>
|
|
76
|
+
</g>
|
|
77
|
+
|
|
78
|
+
<!-- Step 1: Read code + past results -->
|
|
79
|
+
<g class="node c-teal">
|
|
80
|
+
<rect x="170" y="208" width="280" height="44" rx="8" stroke-width="0.5"/>
|
|
81
|
+
<text class="th" x="310" y="230" text-anchor="middle" dominant-baseline="central">Read code + past results</text>
|
|
82
|
+
</g>
|
|
83
|
+
|
|
84
|
+
<!-- Arrow: S1 → S2 -->
|
|
85
|
+
<line x1="310" y1="252" x2="310" y2="274" class="arr" marker-end="url(#arrow)"/>
|
|
86
|
+
|
|
87
|
+
<!-- Step 2: Propose + edit train.py -->
|
|
88
|
+
<g class="node c-teal">
|
|
89
|
+
<rect x="170" y="274" width="280" height="56" rx="8" stroke-width="0.5"/>
|
|
90
|
+
<text class="th" x="310" y="294" text-anchor="middle" dominant-baseline="central">Propose + edit train.py</text>
|
|
91
|
+
<text class="ts" x="310" y="314" text-anchor="middle" dominant-baseline="central">Arch, optimizer, hyperparameters</text>
|
|
92
|
+
</g>
|
|
93
|
+
|
|
94
|
+
<!-- Arrow: S2 → S3 -->
|
|
95
|
+
<line x1="310" y1="330" x2="310" y2="352" class="arr" marker-end="url(#arrow)"/>
|
|
96
|
+
|
|
97
|
+
<!-- Step 3: Run training (highlighted — key step) -->
|
|
98
|
+
<g class="node c-coral">
|
|
99
|
+
<rect x="170" y="352" width="280" height="56" rx="8" stroke-width="0.5"/>
|
|
100
|
+
<text class="th" x="310" y="372" text-anchor="middle" dominant-baseline="central">Run training</text>
|
|
101
|
+
<text class="ts" x="310" y="392" text-anchor="middle" dominant-baseline="central">uv run train.py (5 min budget)</text>
|
|
102
|
+
</g>
|
|
103
|
+
|
|
104
|
+
<!-- Arrow: S3 → S4 -->
|
|
105
|
+
<line x1="310" y1="408" x2="310" y2="430" class="arr" marker-end="url(#arrow)"/>
|
|
106
|
+
|
|
107
|
+
<!-- Step 4: Decision — val_bpb improved? -->
|
|
108
|
+
<g class="node c-gray">
|
|
109
|
+
<rect x="170" y="430" width="280" height="44" rx="8" stroke-width="0.5"/>
|
|
110
|
+
<text class="th" x="310" y="452" text-anchor="middle" dominant-baseline="central">val_bpb improved?</text>
|
|
111
|
+
</g>
|
|
112
|
+
|
|
113
|
+
<!-- Decision arrows to Keep / Discard -->
|
|
114
|
+
<line x1="240" y1="474" x2="175" y2="508" class="arr" marker-end="url(#arrow)"/>
|
|
115
|
+
<line x1="380" y1="474" x2="445" y2="508" class="arr" marker-end="url(#arrow)"/>
|
|
116
|
+
|
|
117
|
+
<!-- Decision labels -->
|
|
118
|
+
<text class="ts" x="195" y="496" opacity=".6">yes</text>
|
|
119
|
+
<text class="ts" x="416" y="496" opacity=".6">no</text>
|
|
120
|
+
|
|
121
|
+
<!-- Keep — advance branch -->
|
|
122
|
+
<g class="node c-green">
|
|
123
|
+
<rect x="70" y="508" width="210" height="56" rx="8" stroke-width="0.5"/>
|
|
124
|
+
<text class="th" x="175" y="528" text-anchor="middle" dominant-baseline="central">Keep</text>
|
|
125
|
+
<text class="ts" x="175" y="548" text-anchor="middle" dominant-baseline="central">Advance git branch</text>
|
|
126
|
+
</g>
|
|
127
|
+
|
|
128
|
+
<!-- Discard — git reset -->
|
|
129
|
+
<g class="node c-red">
|
|
130
|
+
<rect x="340" y="508" width="210" height="56" rx="8" stroke-width="0.5"/>
|
|
131
|
+
<text class="th" x="445" y="528" text-anchor="middle" dominant-baseline="central">Discard</text>
|
|
132
|
+
<text class="ts" x="445" y="548" text-anchor="middle" dominant-baseline="central">Git reset to previous</text>
|
|
133
|
+
</g>
|
|
134
|
+
|
|
135
|
+
<!-- Converge arrows: Keep → Log, Discard → Log -->
|
|
136
|
+
<line x1="175" y1="564" x2="250" y2="590" class="arr" marker-end="url(#arrow)"/>
|
|
137
|
+
<line x1="445" y1="564" x2="370" y2="590" class="arr" marker-end="url(#arrow)"/>
|
|
138
|
+
|
|
139
|
+
<!-- Step 6: Log to results.tsv -->
|
|
140
|
+
<g class="node c-teal">
|
|
141
|
+
<rect x="170" y="590" width="280" height="44" rx="8" stroke-width="0.5"/>
|
|
142
|
+
<text class="th" x="310" y="612" text-anchor="middle" dominant-baseline="central">Log to results.tsv</text>
|
|
143
|
+
</g>
|
|
144
|
+
|
|
145
|
+
<!-- Loop-back arrow (dashed, right side) -->
|
|
146
|
+
<path d="M 450 612 L 564 612 Q 576 612 576 600 L 576 242 Q 576 230 564 230 L 450 230"
|
|
147
|
+
fill="none" class="arr" stroke-dasharray="4 3" marker-end="url(#arrow)"/>
|
|
148
|
+
|
|
149
|
+
<!-- ========================================== -->
|
|
150
|
+
<!-- SECTION 3: TRAINING PIPELINE DETAILS -->
|
|
151
|
+
<!-- ========================================== -->
|
|
152
|
+
|
|
153
|
+
<!-- Connection arrow: Loop → Training details -->
|
|
154
|
+
<line x1="310" y1="670" x2="310" y2="710" class="arr" marker-end="url(#arrow)"/>
|
|
155
|
+
|
|
156
|
+
<!-- Training container (neutral dashed) -->
|
|
157
|
+
<g>
|
|
158
|
+
<rect x="40" y="710" width="600" height="170" rx="16"
|
|
159
|
+
stroke-width="1" stroke-dasharray="6 4"
|
|
160
|
+
fill="var(--bg-secondary)" stroke="var(--border)"/>
|
|
161
|
+
<text class="th" x="66" y="738">train.py — modifiable training pipeline</text>
|
|
162
|
+
<text class="ts" x="66" y="756">Runs during each training step — single GPU, single file</text>
|
|
163
|
+
</g>
|
|
164
|
+
|
|
165
|
+
<!-- GPT model -->
|
|
166
|
+
<g class="node c-coral">
|
|
167
|
+
<rect x="70" y="774" width="155" height="56" rx="8" stroke-width="0.5"/>
|
|
168
|
+
<text class="th" x="147" y="794" text-anchor="middle" dominant-baseline="central">GPT model</text>
|
|
169
|
+
<text class="ts" x="147" y="814" text-anchor="middle" dominant-baseline="central">RoPE, FlashAttn3</text>
|
|
170
|
+
</g>
|
|
171
|
+
|
|
172
|
+
<!-- Arrow: GPT → MuonAdamW -->
|
|
173
|
+
<line x1="225" y1="802" x2="260" y2="802" class="arr" marker-end="url(#arrow)"/>
|
|
174
|
+
|
|
175
|
+
<!-- MuonAdamW optimizer -->
|
|
176
|
+
<g class="node c-coral">
|
|
177
|
+
<rect x="260" y="774" width="155" height="56" rx="8" stroke-width="0.5"/>
|
|
178
|
+
<text class="th" x="337" y="794" text-anchor="middle" dominant-baseline="central">MuonAdamW</text>
|
|
179
|
+
<text class="ts" x="337" y="814" text-anchor="middle" dominant-baseline="central">Hybrid optimizer</text>
|
|
180
|
+
</g>
|
|
181
|
+
|
|
182
|
+
<!-- Arrow: MuonAdamW → Evaluation -->
|
|
183
|
+
<line x1="415" y1="802" x2="450" y2="802" class="arr" marker-end="url(#arrow)"/>
|
|
184
|
+
|
|
185
|
+
<!-- Evaluation -->
|
|
186
|
+
<g class="node c-amber">
|
|
187
|
+
<rect x="450" y="774" width="155" height="56" rx="8" stroke-width="0.5"/>
|
|
188
|
+
<text class="th" x="527" y="794" text-anchor="middle" dominant-baseline="central">Evaluation</text>
|
|
189
|
+
<text class="ts" x="527" y="814" text-anchor="middle" dominant-baseline="central">val_bpb metric</text>
|
|
190
|
+
</g>
|
|
191
|
+
|
|
192
|
+
<!-- Footer: fixed constraints -->
|
|
193
|
+
<text class="ts" x="340" y="856" text-anchor="middle" opacity=".5">climbmix-400b data · 8K BPE vocab · 300s budget · 2048 context</text>
|
|
194
|
+
|
|
195
|
+
<!-- ========================================== -->
|
|
196
|
+
<!-- LEGEND -->
|
|
197
|
+
<!-- ========================================== -->
|
|
198
|
+
|
|
199
|
+
<g class="c-teal"><rect x="40" y="890" width="14" height="14" rx="3" stroke-width="0.5"/></g>
|
|
200
|
+
<text class="ts" x="62" y="902">Agent actions</text>
|
|
201
|
+
|
|
202
|
+
<g class="c-coral"><rect x="170" y="890" width="14" height="14" rx="3" stroke-width="0.5"/></g>
|
|
203
|
+
<text class="ts" x="192" y="902">Training run</text>
|
|
204
|
+
|
|
205
|
+
<g class="c-green"><rect x="300" y="890" width="14" height="14" rx="3" stroke-width="0.5"/></g>
|
|
206
|
+
<text class="ts" x="322" y="902">Improvement</text>
|
|
207
|
+
|
|
208
|
+
<g class="c-red"><rect x="430" y="890" width="14" height="14" rx="3" stroke-width="0.5"/></g>
|
|
209
|
+
<text class="ts" x="452" y="902">No improvement</text>
|
|
210
|
+
|
|
211
|
+
</svg>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Color Assignments
|
|
215
|
+
|
|
216
|
+
| Element | Color | Reason |
|
|
217
|
+
|---------|-------|--------|
|
|
218
|
+
| Human, program.md | `c-gray` | Neutral setup / input nodes |
|
|
219
|
+
| AI agent | `c-purple` | The active intelligent actor |
|
|
220
|
+
| Loop action steps | `c-teal` | Agent's analytical/editing actions |
|
|
221
|
+
| Run training | `c-coral` | Highlighted key step — the 5-min training run |
|
|
222
|
+
| Decision check | `c-gray` | Neutral evaluation checkpoint |
|
|
223
|
+
| Keep (improved) | `c-green` | Semantic success — val_bpb decreased |
|
|
224
|
+
| Discard (not improved) | `c-red` | Semantic failure — no improvement |
|
|
225
|
+
| Training pipeline nodes | `c-coral` | Training infrastructure components |
|
|
226
|
+
| Evaluation node | `c-amber` | Distinct from training — measurement/metric role |
|
|
227
|
+
| Containers | Neutral (dashed) | Subtle grouping that recedes behind content |
|
|
228
|
+
|
|
229
|
+
## Layout Notes
|
|
230
|
+
|
|
231
|
+
- **ViewBox**: 680×920 (standard width, tall for 3 sections)
|
|
232
|
+
- **Three sections**: Setup row (y=30–98), loop container (y=142–670), training details (y=710–880)
|
|
233
|
+
- **Container style**: Dashed border (`stroke-dasharray="6 4"`), neutral fill (`var(--bg-secondary)`), `stroke-width="1"` — not colored, so inner nodes pop
|
|
234
|
+
- **Loop-back arrow**: Dashed `<path>` with quadratic curves (`Q`) at corners for smooth rounded turns, running up the right side of the loop container from "Log" back to "Read code"
|
|
235
|
+
- **Decision pattern**: Single question node ("val_bpb improved?") with diagonal arrows to Keep/Discard, then convergent diagonal arrows back to "Log to results.tsv"
|
|
236
|
+
- **Decision labels**: "yes"/"no" labels placed along the diagonal arrows with `opacity=".6"` to stay subtle
|
|
237
|
+
- **Key step highlight**: "Run training" uses `c-coral` while surrounding steps use `c-teal`, drawing the eye to the most important step
|
|
238
|
+
- **Horizontal sub-flow**: Training pipeline uses left-to-right arrow-connected nodes (GPT model → MuonAdamW → Evaluation)
|
|
239
|
+
- **Footer metadata**: Fixed constraints (data, vocab, budget, context) shown as a single centered `ts` text line with `opacity=".5"`
|
|
240
|
+
- **Legend**: Four color swatches at the bottom explaining the semantic meaning of each color used
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Journey of a Banana: From Tree to Smoothie
|
|
2
|
+
|
|
3
|
+
A narrative journey diagram following a single banana across 3,000 miles and 3 weeks, from harvest in Costa Rica to a smoothie in the consumer's kitchen. Demonstrates storytelling through visualization, winding path layout, and progressive state changes.
|
|
4
|
+
|
|
5
|
+
## Key Patterns Used
|
|
6
|
+
|
|
7
|
+
- **Winding journey path**: S-curve connecting all stages visually
|
|
8
|
+
- **Location markers**: Country flags and place names for geographic context
|
|
9
|
+
- **Progressive state changes**: Banana color changes (green → yellow → brown → frozen → smoothie)
|
|
10
|
+
- **Narrative details**: Fun elements like spider check, stickers, price tags
|
|
11
|
+
- **Timeline**: Bottom timeline showing duration of journey
|
|
12
|
+
- **Environmental context**: Ocean waves, gas clouds, store awning
|
|
13
|
+
|
|
14
|
+
## New Shape Techniques
|
|
15
|
+
|
|
16
|
+
### Banana (curved fruit shape)
|
|
17
|
+
```xml
|
|
18
|
+
<!-- Green banana -->
|
|
19
|
+
<path class="banana-green" d="M 5 0 Q 0 10 3 20 Q 6 25 10 20 Q 13 10 8 0 Z"/>
|
|
20
|
+
|
|
21
|
+
<!-- Yellow banana -->
|
|
22
|
+
<path class="banana-yellow" d="M 0 5 Q -6 18 0 32 Q 7 40 15 30 Q 20 15 12 5 Z"/>
|
|
23
|
+
|
|
24
|
+
<!-- Brown overripe banana with spots -->
|
|
25
|
+
<path class="banana-brown" d="M 0 5 Q -5 15 0 28 Q 6 35 14 26 Q 18 14 12 5 Z"/>
|
|
26
|
+
<circle class="banana-spots" cx="5" cy="15" r="1.5"/>
|
|
27
|
+
<circle class="banana-spots" cx="9" cy="20" r="1"/>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Banana Tree
|
|
31
|
+
```xml
|
|
32
|
+
<!-- Trunk -->
|
|
33
|
+
<rect class="tree-trunk" x="55" y="50" width="15" height="60" rx="3"/>
|
|
34
|
+
<!-- Leaves (rotated ellipses) -->
|
|
35
|
+
<ellipse class="tree-leaf" cx="62" cy="45" rx="40" ry="15" transform="rotate(-20, 62, 45)"/>
|
|
36
|
+
<ellipse class="tree-leaf" cx="62" cy="50" rx="35" ry="12" transform="rotate(25, 62, 50)"/>
|
|
37
|
+
<!-- Banana bunch hanging -->
|
|
38
|
+
<g transform="translate(40, 55)">
|
|
39
|
+
<path class="banana-green" d="M 5 0 Q 0 10 3 20 Q 6 25 10 20 Q 13 10 8 0 Z"/>
|
|
40
|
+
<path class="banana-green" d="M 12 2 Q 8 12 11 22 Q 14 27 18 22 Q 21 12 16 2 Z"/>
|
|
41
|
+
<rect class="stem" x="8" y="-5" width="12" height="8" rx="2"/>
|
|
42
|
+
</g>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Cargo Ship
|
|
46
|
+
```xml
|
|
47
|
+
<!-- Ocean waves -->
|
|
48
|
+
<path class="ocean" d="M 0 90 Q 30 85 60 90 Q 90 95 120 90 Q 150 85 180 90 L 180 110 L 0 110 Z" opacity="0.5"/>
|
|
49
|
+
<!-- Hull -->
|
|
50
|
+
<path class="ship-hull" d="M 20 90 L 30 60 L 160 60 L 170 90 Q 150 95 95 95 Q 40 95 20 90 Z"/>
|
|
51
|
+
<!-- Deck -->
|
|
52
|
+
<rect class="ship-deck" x="40" y="45" width="110" height="18" rx="2"/>
|
|
53
|
+
<!-- Reefer containers -->
|
|
54
|
+
<rect class="container" x="45" y="25" width="30" height="22" rx="2"/>
|
|
55
|
+
<!-- Refrigeration symbol -->
|
|
56
|
+
<text x="60" y="40" text-anchor="middle" fill="#185FA5" style="font-size:10px">❄</text>
|
|
57
|
+
<!-- Smoke stack -->
|
|
58
|
+
<rect x="145" y="35" width="8" height="15" fill="#444441"/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Inspector Figure
|
|
62
|
+
```xml
|
|
63
|
+
<!-- Body -->
|
|
64
|
+
<rect class="inspector" x="10" y="20" width="25" height="35" rx="3"/>
|
|
65
|
+
<!-- Head -->
|
|
66
|
+
<circle class="inspector" cx="22" cy="12" r="10"/>
|
|
67
|
+
<!-- Hat -->
|
|
68
|
+
<rect x="12" y="2" width="20" height="6" rx="2" fill="#534AB7"/>
|
|
69
|
+
<!-- Clipboard -->
|
|
70
|
+
<rect class="clipboard" x="38" y="28" width="15" height="20" rx="2"/>
|
|
71
|
+
<line x1="42" y1="34" x2="50" y2="34" stroke="#888780" stroke-width="1"/>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Spider with "No" Symbol
|
|
75
|
+
```xml
|
|
76
|
+
<circle cx="15" cy="15" r="18" fill="none" stroke="#A32D2D" stroke-width="2"/>
|
|
77
|
+
<line x1="3" y1="3" x2="27" y2="27" stroke="#A32D2D" stroke-width="2"/>
|
|
78
|
+
<!-- Spider body -->
|
|
79
|
+
<ellipse class="spider" cx="15" cy="15" rx="4" ry="5"/>
|
|
80
|
+
<ellipse class="spider" cx="15" cy="10" rx="3" ry="3"/>
|
|
81
|
+
<!-- Legs -->
|
|
82
|
+
<line x1="12" y1="14" x2="5" y2="10" stroke="#2C2C2A" stroke-width="1"/>
|
|
83
|
+
<line x1="18" y1="14" x2="25" y2="10" stroke="#2C2C2A" stroke-width="1"/>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Blender with Smoothie
|
|
87
|
+
```xml
|
|
88
|
+
<!-- Blender jar -->
|
|
89
|
+
<path class="blender" d="M 5 5 L 0 45 L 35 45 L 30 5 Z"/>
|
|
90
|
+
<!-- Smoothie inside (wavy top) -->
|
|
91
|
+
<path class="smoothie" d="M 3 20 L 0 45 L 35 45 L 32 20 Q 25 18 17 22 Q 10 18 3 20 Z"/>
|
|
92
|
+
<!-- Blender base -->
|
|
93
|
+
<rect class="blender" x="-2" y="45" width="40" height="12" rx="3"/>
|
|
94
|
+
<!-- Lid -->
|
|
95
|
+
<rect x="8" y="0" width="20" height="8" rx="2" fill="#AFA9EC" stroke="#534AB7"/>
|
|
96
|
+
<!-- Banana chunks floating -->
|
|
97
|
+
<ellipse cx="12" cy="32" rx="4" ry="2" fill="#FAC775"/>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Winding Journey Path
|
|
101
|
+
```xml
|
|
102
|
+
<path class="journey-path" d="
|
|
103
|
+
M 80 100
|
|
104
|
+
L 200 100
|
|
105
|
+
Q 280 100 280 150
|
|
106
|
+
L 280 180
|
|
107
|
+
Q 280 220 320 220
|
|
108
|
+
L 520 220
|
|
109
|
+
Q 560 220 560 260
|
|
110
|
+
L 560 320
|
|
111
|
+
Q 560 360 520 360
|
|
112
|
+
L 280 360
|
|
113
|
+
...
|
|
114
|
+
"/>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## CSS Classes
|
|
118
|
+
|
|
119
|
+
```css
|
|
120
|
+
/* Journey */
|
|
121
|
+
.journey-path { stroke: #D3D1C7; stroke-width: 3; fill: none; stroke-linecap: round; }
|
|
122
|
+
|
|
123
|
+
/* Banana ripeness stages */
|
|
124
|
+
.banana-green { fill: #97C459; stroke: #3B6D11; stroke-width: 0.5; }
|
|
125
|
+
.banana-yellow { fill: #FAC775; stroke: #BA7517; stroke-width: 0.5; }
|
|
126
|
+
.banana-brown { fill: #854F0B; stroke: #633806; stroke-width: 0.5; }
|
|
127
|
+
.banana-spots { fill: #633806; }
|
|
128
|
+
|
|
129
|
+
/* Environment elements */
|
|
130
|
+
.tree-trunk { fill: #854F0B; stroke: #633806; stroke-width: 1; }
|
|
131
|
+
.tree-leaf { fill: #97C459; stroke: #3B6D11; stroke-width: 0.5; }
|
|
132
|
+
.ocean { fill: #85B7EB; }
|
|
133
|
+
.ship-hull { fill: #5F5E5A; stroke: #444441; stroke-width: 1; }
|
|
134
|
+
.container { fill: #E6F1FB; stroke: #185FA5; stroke-width: 1; }
|
|
135
|
+
.gas-cloud { fill: #C0DD97; stroke: #97C459; stroke-width: 0.5; opacity: 0.6; }
|
|
136
|
+
|
|
137
|
+
/* Buildings */
|
|
138
|
+
.packhouse { fill: #F1EFE8; stroke: #5F5E5A; stroke-width: 1; }
|
|
139
|
+
.warehouse { fill: #FAEEDA; stroke: #854F0B; stroke-width: 1; }
|
|
140
|
+
.store { fill: #E1F5EE; stroke: #0F6E56; stroke-width: 1; }
|
|
141
|
+
|
|
142
|
+
/* Kitchen */
|
|
143
|
+
.counter { fill: #FAECE7; stroke: #993C1D; stroke-width: 1; }
|
|
144
|
+
.blender { fill: #EEEDFE; stroke: #534AB7; stroke-width: 1; }
|
|
145
|
+
.smoothie { fill: #FAC775; }
|
|
146
|
+
.freezer { fill: #E6F1FB; stroke: #185FA5; stroke-width: 1; }
|
|
147
|
+
|
|
148
|
+
/* Details */
|
|
149
|
+
.sticker { fill: #378ADD; stroke: #185FA5; stroke-width: 0.3; }
|
|
150
|
+
.spider { fill: #2C2C2A; stroke: #1a1a18; stroke-width: 0.3; }
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Layout Notes
|
|
154
|
+
|
|
155
|
+
- **ViewBox**: 850×680 (tall for winding path)
|
|
156
|
+
- **Path style**: S-curve winding path connects all 7 stages
|
|
157
|
+
- **Location labels**: Country flags + place names anchor geographic context
|
|
158
|
+
- **State progression**: Same object (banana) shown in different states throughout
|
|
159
|
+
- **Timeline**: Horizontal timeline at bottom shows journey duration
|
|
160
|
+
- **Narrative elements**: Fun details (spider, stickers, price tags) add storytelling value
|
|
161
|
+
- **Environmental context**: Ocean waves, gas clouds, awnings create sense of place
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Commercial Aircraft Structure
|
|
2
|
+
|
|
3
|
+
A physical/structural diagram showing an aircraft side profile using appropriate SVG shapes beyond rectangles - paths, polygons, ellipses for realistic representation.
|
|
4
|
+
|
|
5
|
+
## Key Patterns Used
|
|
6
|
+
|
|
7
|
+
- **Path elements**: Curved fuselage body with nose cone using quadratic bezier curves
|
|
8
|
+
- **Polygon elements**: Tapered wing shape, triangular stabilizers, control surfaces
|
|
9
|
+
- **Ellipse elements**: Engines (cylinders), wheels (circles)
|
|
10
|
+
- **Line elements**: Landing gear struts, leader lines for labels
|
|
11
|
+
- **Dashed strokes**: Interior sections (fuel tank), movable control surfaces (rudder, elevator)
|
|
12
|
+
- **Layered composition**: Cabin sections drawn inside the fuselage shape
|
|
13
|
+
- **Leader lines with labels**: Connect labels to components they describe
|
|
14
|
+
|
|
15
|
+
## Diagram
|
|
16
|
+
|
|
17
|
+
```xml
|
|
18
|
+
<svg width="100%" viewBox="0 0 680 400" xmlns="http://www.w3.org/2000/svg">
|
|
19
|
+
|
|
20
|
+
<!-- FUSELAGE - main body cylinder with nose cone -->
|
|
21
|
+
<path class="fuselage" d="
|
|
22
|
+
M 80 180
|
|
23
|
+
Q 40 180 40 200
|
|
24
|
+
Q 40 220 80 220
|
|
25
|
+
L 560 220
|
|
26
|
+
Q 580 220 580 200
|
|
27
|
+
Q 580 180 560 180
|
|
28
|
+
Z
|
|
29
|
+
"/>
|
|
30
|
+
|
|
31
|
+
<!-- Nose cone -->
|
|
32
|
+
<path class="fuselage" d="
|
|
33
|
+
M 80 180
|
|
34
|
+
Q 50 180 35 200
|
|
35
|
+
Q 50 220 80 220
|
|
36
|
+
" fill="none" stroke-width="1"/>
|
|
37
|
+
|
|
38
|
+
<!-- COCKPIT windows -->
|
|
39
|
+
<path class="cockpit" d="
|
|
40
|
+
M 45 190
|
|
41
|
+
L 75 185
|
|
42
|
+
L 75 200
|
|
43
|
+
L 50 200
|
|
44
|
+
Z
|
|
45
|
+
"/>
|
|
46
|
+
<line x1="55" y1="188" x2="55" y2="200" stroke="#534AB7" stroke-width="0.5"/>
|
|
47
|
+
<line x1="65" y1="186" x2="65" y2="200" stroke="#534AB7" stroke-width="0.5"/>
|
|
48
|
+
|
|
49
|
+
<!-- CABIN SECTIONS (inside fuselage) -->
|
|
50
|
+
<!-- First class -->
|
|
51
|
+
<rect class="first-class" x="85" y="183" width="50" height="34" rx="2"/>
|
|
52
|
+
<text class="tl" x="110" y="203" text-anchor="middle">First</text>
|
|
53
|
+
|
|
54
|
+
<!-- Business class -->
|
|
55
|
+
<rect class="business-class" x="140" y="183" width="80" height="34" rx="2"/>
|
|
56
|
+
<text class="tl" x="180" y="203" text-anchor="middle">Business</text>
|
|
57
|
+
|
|
58
|
+
<!-- Economy class -->
|
|
59
|
+
<rect class="economy-class" x="225" y="183" width="200" height="34" rx="2"/>
|
|
60
|
+
<text class="tl" x="325" y="203" text-anchor="middle">Economy</text>
|
|
61
|
+
|
|
62
|
+
<!-- CARGO HOLD (lower section indication) -->
|
|
63
|
+
<line x1="85" y1="217" x2="520" y2="217" class="leader"/>
|
|
64
|
+
<text class="tl" x="300" y="228" text-anchor="middle" opacity=".6">Cargo hold below deck</text>
|
|
65
|
+
|
|
66
|
+
<!-- WING - main wing shape -->
|
|
67
|
+
<polygon class="wing" points="
|
|
68
|
+
200,220
|
|
69
|
+
120,300
|
|
70
|
+
130,305
|
|
71
|
+
160,305
|
|
72
|
+
340,235
|
|
73
|
+
340,220
|
|
74
|
+
"/>
|
|
75
|
+
|
|
76
|
+
<!-- Wing fuel tank (dashed interior) -->
|
|
77
|
+
<polygon class="fuel-tank" points="
|
|
78
|
+
210,225
|
|
79
|
+
150,280
|
|
80
|
+
160,283
|
|
81
|
+
180,283
|
|
82
|
+
310,232
|
|
83
|
+
310,225
|
|
84
|
+
"/>
|
|
85
|
+
<text class="tl" x="220" y="260" opacity=".7">Fuel</text>
|
|
86
|
+
|
|
87
|
+
<!-- Flaps (trailing edge) -->
|
|
88
|
+
<polygon class="flap" points="
|
|
89
|
+
130,300
|
|
90
|
+
120,305
|
|
91
|
+
160,310
|
|
92
|
+
165,305
|
|
93
|
+
"/>
|
|
94
|
+
<text class="tl" x="143" y="320">Flaps</text>
|
|
95
|
+
|
|
96
|
+
<!-- ENGINE under wing -->
|
|
97
|
+
<ellipse class="engine" cx="175" cy="285" rx="25" ry="12"/>
|
|
98
|
+
<ellipse cx="155" cy="285" rx="8" ry="10" fill="none" stroke="#993C1D" stroke-width="0.5"/>
|
|
99
|
+
<!-- Engine pylon -->
|
|
100
|
+
<line x1="175" y1="273" x2="190" y2="245" stroke="#5F5E5A" stroke-width="2"/>
|
|
101
|
+
<text class="tl" x="175" y="308" text-anchor="middle">Engine</text>
|
|
102
|
+
|
|
103
|
+
<!-- TAIL SECTION -->
|
|
104
|
+
<!-- Vertical stabilizer -->
|
|
105
|
+
<polygon class="tail-v" points="
|
|
106
|
+
520,180
|
|
107
|
+
560,100
|
|
108
|
+
580,100
|
|
109
|
+
580,180
|
|
110
|
+
"/>
|
|
111
|
+
<text class="tl" x="565" y="150" text-anchor="middle">Vertical</text>
|
|
112
|
+
<text class="tl" x="565" y="162" text-anchor="middle">stabilizer</text>
|
|
113
|
+
|
|
114
|
+
<!-- Rudder -->
|
|
115
|
+
<polygon points="575,105 590,105 590,178 580,178" fill="none" stroke="#185FA5" stroke-width="0.5" stroke-dasharray="3 2"/>
|
|
116
|
+
<text class="tl" x="595" y="145" opacity=".6">Rudder</text>
|
|
117
|
+
|
|
118
|
+
<!-- Horizontal stabilizer -->
|
|
119
|
+
<polygon class="tail-h" points="
|
|
120
|
+
500,195
|
|
121
|
+
460,175
|
|
122
|
+
465,170
|
|
123
|
+
580,170
|
|
124
|
+
580,180
|
|
125
|
+
520,195
|
|
126
|
+
"/>
|
|
127
|
+
<text class="tl" x="510" y="166">Horizontal stabilizer</text>
|
|
128
|
+
|
|
129
|
+
<!-- Elevator -->
|
|
130
|
+
<polygon points="462,174 450,168 455,163 467,169" fill="none" stroke="#185FA5" stroke-width="0.5" stroke-dasharray="3 2"/>
|
|
131
|
+
<text class="tl" x="440" y="158" opacity=".6">Elevator</text>
|
|
132
|
+
|
|
133
|
+
<!-- LANDING GEAR -->
|
|
134
|
+
<!-- Nose gear -->
|
|
135
|
+
<line class="gear" x1="100" y1="220" x2="100" y2="260" stroke-width="3"/>
|
|
136
|
+
<ellipse class="wheel" cx="100" cy="268" rx="8" ry="10"/>
|
|
137
|
+
<text class="tl" x="100" y="290" text-anchor="middle">Nose gear</text>
|
|
138
|
+
|
|
139
|
+
<!-- Main gear (under wing/fuselage junction) -->
|
|
140
|
+
<line class="gear" x1="280" y1="220" x2="280" y2="270" stroke-width="4"/>
|
|
141
|
+
<line class="gear" x1="268" y1="265" x2="292" y2="265" stroke-width="3"/>
|
|
142
|
+
<ellipse class="wheel" cx="268" cy="278" rx="10" ry="12"/>
|
|
143
|
+
<ellipse class="wheel" cx="292" cy="278" rx="10" ry="12"/>
|
|
144
|
+
<text class="tl" x="280" y="302" text-anchor="middle">Main gear</text>
|
|
145
|
+
|
|
146
|
+
<!-- LABELS with leader lines -->
|
|
147
|
+
<!-- Cockpit label -->
|
|
148
|
+
<line class="leader" x1="60" y1="175" x2="60" y2="140"/>
|
|
149
|
+
<text class="ts" x="60" y="132" text-anchor="middle">Cockpit</text>
|
|
150
|
+
|
|
151
|
+
<!-- Wing label -->
|
|
152
|
+
<line class="leader" x1="250" y1="250" x2="290" y2="330"/>
|
|
153
|
+
<text class="ts" x="290" y="345" text-anchor="middle">Wing structure</text>
|
|
154
|
+
<text class="tl" x="290" y="358" text-anchor="middle">Spars, ribs, skin</text>
|
|
155
|
+
|
|
156
|
+
<!-- Fuselage label -->
|
|
157
|
+
<line class="leader" x1="400" y1="180" x2="400" y2="140"/>
|
|
158
|
+
<text class="ts" x="400" y="132" text-anchor="middle">Fuselage</text>
|
|
159
|
+
<text class="tl" x="400" y="145" text-anchor="middle">Pressure vessel</text>
|
|
160
|
+
|
|
161
|
+
</svg>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## CSS Classes for Physical Diagrams
|
|
165
|
+
|
|
166
|
+
When creating physical/structural diagrams, define semantic classes for each component type:
|
|
167
|
+
|
|
168
|
+
```css
|
|
169
|
+
/* Structure shapes */
|
|
170
|
+
.fuselage { fill: #F1EFE8; stroke: #5F5E5A; stroke-width: 1; }
|
|
171
|
+
.wing { fill: #E6F1FB; stroke: #185FA5; stroke-width: 1; }
|
|
172
|
+
.tail-v { fill: #E6F1FB; stroke: #185FA5; stroke-width: 1; }
|
|
173
|
+
.tail-h { fill: #E6F1FB; stroke: #185FA5; stroke-width: 1; }
|
|
174
|
+
|
|
175
|
+
/* Interior sections */
|
|
176
|
+
.cockpit { fill: #EEEDFE; stroke: #534AB7; stroke-width: 1; }
|
|
177
|
+
.first-class { fill: #FBEAF0; stroke: #993556; stroke-width: 0.5; }
|
|
178
|
+
.business-class { fill: #FAECE7; stroke: #993C1D; stroke-width: 0.5; }
|
|
179
|
+
.economy-class { fill: #E1F5EE; stroke: #0F6E56; stroke-width: 0.5; }
|
|
180
|
+
.cargo { fill: #D3D1C7; stroke: #5F5E5A; stroke-width: 0.5; }
|
|
181
|
+
|
|
182
|
+
/* Systems */
|
|
183
|
+
.engine { fill: #FAECE7; stroke: #993C1D; stroke-width: 1; }
|
|
184
|
+
.fuel-tank { fill: #FAEEDA; stroke: #854F0B; stroke-width: 0.5; stroke-dasharray: 3 2; }
|
|
185
|
+
.flap { fill: #E1F5EE; stroke: #0F6E56; stroke-width: 0.5; }
|
|
186
|
+
|
|
187
|
+
/* Mechanical */
|
|
188
|
+
.gear { fill: #444441; stroke: #2C2C2A; stroke-width: 0.5; }
|
|
189
|
+
.wheel { fill: #2C2C2A; stroke: #1a1a18; stroke-width: 0.5; }
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Shape Selection Guide
|
|
193
|
+
|
|
194
|
+
| Physical form | SVG element | Example |
|
|
195
|
+
|---------------|-------------|---------|
|
|
196
|
+
| Curved body | `<path>` with Q (quadratic) or C (cubic) curves | Fuselage, nose cone |
|
|
197
|
+
| Tapered/angular | `<polygon>` | Wings, stabilizers |
|
|
198
|
+
| Cylindrical | `<ellipse>` | Engines, wheels, tanks |
|
|
199
|
+
| Linear structure | `<line>` | Struts, pylons, gear legs |
|
|
200
|
+
| Internal sections | `<rect>` inside parent shape | Cabin classes |
|
|
201
|
+
| Dashed boundaries | `stroke-dasharray` on any shape | Fuel tanks, control surfaces |
|
|
202
|
+
|
|
203
|
+
## Layout Notes
|
|
204
|
+
|
|
205
|
+
- **ViewBox**: 680×400 (wider aspect ratio suits side profile)
|
|
206
|
+
- **Layering**: Draw outer structures first, then interior details on top
|
|
207
|
+
- **Leader lines**: Use `.leader` class (dashed) to connect labels to components
|
|
208
|
+
- **Text sizes**: Use `.tl` (10px) for component labels, `.ts` (12px) for section labels
|
|
209
|
+
- **Semantic colors**: Group by system (structure=blue, propulsion=coral, fuel=amber, etc.)
|