@haposoft/cafekit 0.7.22 → 0.7.24

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 (65) hide show
  1. package/README.md +81 -862
  2. package/bin/install.js +4 -3
  3. package/package.json +2 -3
  4. package/src/claude/agents/code-auditor.md +25 -1
  5. package/src/claude/agents/spec-maker.md +17 -2
  6. package/src/claude/agents/test-runner.md +22 -3
  7. package/src/claude/hooks/spec-state.cjs +4 -4
  8. package/src/claude/migration-manifest.json +1 -1
  9. package/src/claude/rules/state-sync.md +7 -5
  10. package/src/claude/skills/code-review/references/spec-compliance-review.md +8 -1
  11. package/src/claude/skills/develop/SKILL.md +26 -4
  12. package/src/claude/skills/develop/references/quality-gate.md +23 -13
  13. package/src/claude/skills/generate-graph/LICENSE +21 -0
  14. package/src/claude/skills/generate-graph/README.md +523 -0
  15. package/src/claude/skills/generate-graph/SKILL.md +427 -0
  16. package/src/claude/skills/generate-graph/agentloop-core.svg +101 -0
  17. package/src/claude/skills/generate-graph/agents/openai.yaml +4 -0
  18. package/src/claude/skills/generate-graph/assets/samples/sample-style1-flat.png +0 -0
  19. package/src/claude/skills/generate-graph/assets/samples/sample-style2-dark.png +0 -0
  20. package/src/claude/skills/generate-graph/assets/samples/sample-style3-blueprint.png +0 -0
  21. package/src/claude/skills/generate-graph/assets/samples/sample-style4-notion.png +0 -0
  22. package/src/claude/skills/generate-graph/assets/samples/sample-style5-glass.png +0 -0
  23. package/src/claude/skills/generate-graph/assets/samples/sample-style6-claude.png +0 -0
  24. package/src/claude/skills/generate-graph/assets/samples/sample-style7-openai.png +0 -0
  25. package/src/claude/skills/generate-graph/fixtures/agent-memory-types-style4.json +181 -0
  26. package/src/claude/skills/generate-graph/fixtures/api-flow-style7.json +40 -0
  27. package/src/claude/skills/generate-graph/fixtures/mem0-style1.json +297 -0
  28. package/src/claude/skills/generate-graph/fixtures/microservices-style3.json +64 -0
  29. package/src/claude/skills/generate-graph/fixtures/multi-agent-style5.json +45 -0
  30. package/src/claude/skills/generate-graph/fixtures/system-architecture-style6.json +48 -0
  31. package/src/claude/skills/generate-graph/fixtures/tool-call-style2.json +182 -0
  32. package/src/claude/skills/generate-graph/package.json +42 -0
  33. package/src/claude/skills/generate-graph/references/icons.md +281 -0
  34. package/src/claude/skills/generate-graph/references/style-1-flat-icon.md +108 -0
  35. package/src/claude/skills/generate-graph/references/style-2-dark-terminal.md +107 -0
  36. package/src/claude/skills/generate-graph/references/style-3-blueprint.md +113 -0
  37. package/src/claude/skills/generate-graph/references/style-4-notion-clean.md +94 -0
  38. package/src/claude/skills/generate-graph/references/style-5-glassmorphism.md +125 -0
  39. package/src/claude/skills/generate-graph/references/style-6-claude-official.md +209 -0
  40. package/src/claude/skills/generate-graph/references/style-7-openai.md +215 -0
  41. package/src/claude/skills/generate-graph/references/style-diagram-matrix.md +135 -0
  42. package/src/claude/skills/generate-graph/references/svg-layout-best-practices.md +100 -0
  43. package/src/claude/skills/generate-graph/scripts/generate-diagram.sh +157 -0
  44. package/src/claude/skills/generate-graph/scripts/generate-from-template.py +1556 -0
  45. package/src/claude/skills/generate-graph/scripts/test-all-styles.sh +135 -0
  46. package/src/claude/skills/generate-graph/scripts/validate-svg.sh +292 -0
  47. package/src/claude/skills/generate-graph/templates/agent-architecture.svg +28 -0
  48. package/src/claude/skills/generate-graph/templates/architecture.svg +23 -0
  49. package/src/claude/skills/generate-graph/templates/comparison-matrix.svg +14 -0
  50. package/src/claude/skills/generate-graph/templates/data-flow.svg +28 -0
  51. package/src/claude/skills/generate-graph/templates/er-diagram.svg +21 -0
  52. package/src/claude/skills/generate-graph/templates/flowchart.svg +21 -0
  53. package/src/claude/skills/generate-graph/templates/sequence.svg +20 -0
  54. package/src/claude/skills/generate-graph/templates/state-machine.svg +20 -0
  55. package/src/claude/skills/generate-graph/templates/timeline.svg +19 -0
  56. package/src/claude/skills/generate-graph/templates/use-case.svg +21 -0
  57. package/src/claude/skills/specs/SKILL.md +38 -7
  58. package/src/claude/skills/specs/references/codebase-analysis.md +26 -9
  59. package/src/claude/skills/specs/references/research-strategy.md +3 -3
  60. package/src/claude/skills/specs/references/review.md +1 -1
  61. package/src/claude/skills/specs/rules/tasks-generation.md +17 -0
  62. package/src/claude/skills/specs/templates/design.md +13 -0
  63. package/src/claude/skills/specs/templates/init.json +4 -1
  64. package/src/claude/skills/specs/templates/requirements.md +21 -8
  65. package/src/claude/skills/specs/templates/task.md +16 -3
@@ -0,0 +1,107 @@
1
+ # Style 2: Dark Terminal
2
+
3
+ Neon-on-dark hacker aesthetic. Matches CLAUDE.md standard tech diagram style.
4
+
5
+ ## Colors
6
+
7
+ ```
8
+ Background: #0f0f1a (near-black)
9
+ Panel fill: #0f172a (slate-950)
10
+ Panel stroke: #334155 (slate-700)
11
+ Box radius: 6px
12
+
13
+ Text primary: #e2e8f0 (slate-200)
14
+ Text secondary: #94a3b8 (slate-400)
15
+ Text muted: #475569 (slate-600)
16
+
17
+ Accent palette (use per theme/layer):
18
+ Purple: #7c3aed / #a855f7
19
+ Orange: #ea580c / #f97316
20
+ Blue: #1d4ed8 / #3b82f6
21
+ Green: #059669 / #10b981
22
+ Gold: #eab308
23
+ Red: #dc2626 / #ef4444
24
+
25
+ Arrow colors: match accent of the source node's theme
26
+ ```
27
+
28
+ ## Background Gradient
29
+
30
+ ```xml
31
+ <defs>
32
+ <linearGradient id="bg-grad" x1="0%" y1="0%" x2="100%" y2="100%">
33
+ <stop offset="0%" stop-color="#0f0f1a"/>
34
+ <stop offset="100%" stop-color="#1a1a2e"/>
35
+ </linearGradient>
36
+ </defs>
37
+ <rect width="960" height="600" fill="url(#bg-grad)"/>
38
+ ```
39
+
40
+ ## Typography
41
+
42
+ ```
43
+ font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace
44
+ font-size: 13px labels, 11px sub-labels, 15px titles
45
+ font-weight: 400 normal, 700 bold for section headers
46
+ letter-spacing: 0.02em for labels
47
+ ```
48
+
49
+ ## Box Styles
50
+
51
+ ```xml
52
+ <!-- Standard panel -->
53
+ <rect rx="6" ry="6" fill="#0f172a" stroke="#334155" stroke-width="1"/>
54
+
55
+ <!-- Colored accent box (themed by function) -->
56
+ <rect rx="6" ry="6" fill="#1e1b4b" stroke="#7c3aed" stroke-width="1.5"/>
57
+ <!-- Purple for AI/ML nodes -->
58
+ <!-- #1c1917 / #ea580c for compute/API nodes -->
59
+ <!-- #052e16 / #059669 for storage/DB nodes -->
60
+ <!-- #1e3a5f / #3b82f6 for network/gateway nodes -->
61
+ ```
62
+
63
+ ## Glow Effect (optional, for key nodes)
64
+
65
+ ```xml
66
+ <defs>
67
+ <filter id="glow-purple">
68
+ <feGaussianBlur stdDeviation="3" result="blur"/>
69
+ <feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
70
+ </filter>
71
+ </defs>
72
+ <rect filter="url(#glow-purple)" stroke="#a855f7" .../>
73
+ ```
74
+
75
+ ## Arrows
76
+
77
+ ```xml
78
+ <defs>
79
+ <marker id="arrow-purple" markerWidth="8" markerHeight="6"
80
+ refX="7" refY="3" orient="auto">
81
+ <polygon points="0 0, 8 3, 0 6" fill="#a855f7"/>
82
+ </marker>
83
+ </defs>
84
+ <path stroke="#a855f7" stroke-width="1.5" stroke-dasharray="none"
85
+ fill="none" marker-end="url(#arrow-purple)"/>
86
+ ```
87
+
88
+ ## SVG Template
89
+
90
+ ```xml
91
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 600"
92
+ width="960" height="600">
93
+ <style>
94
+ text { font-family: 'SF Mono', 'Fira Code', monospace; fill: #e2e8f0; }
95
+ </style>
96
+ <defs>
97
+ <linearGradient id="bg-grad" x1="0%" y1="0%" x2="100%" y2="100%">
98
+ <stop offset="0%" stop-color="#0f0f1a"/>
99
+ <stop offset="100%" stop-color="#1a1a2e"/>
100
+ </linearGradient>
101
+ <!-- arrow markers -->
102
+ <!-- glow filters -->
103
+ </defs>
104
+ <rect width="960" height="600" fill="url(#bg-grad)"/>
105
+ <!-- nodes, edges, legend -->
106
+ </svg>
107
+ ```
@@ -0,0 +1,113 @@
1
+ # Style 3: Blueprint
2
+
3
+ Engineering blueprint aesthetic with grid background and technical annotation style.
4
+
5
+ ## Colors
6
+
7
+ ```
8
+ Background: #0a1628
9
+ Grid color: #112240 (subtle grid lines)
10
+ Panel fill: #0d1f3c
11
+ Panel stroke: #00b4d8 (cyan/teal)
12
+ Box radius: 2px (sharp corners for technical feel)
13
+
14
+ Text primary: #caf0f8 (light cyan)
15
+ Text secondary: #90e0ef
16
+ Text label: #00b4d8
17
+ Text muted: #48cae4 at 60% opacity
18
+
19
+ Accent colors:
20
+ Cyan: #00b4d8 / #48cae4
21
+ White: #ffffff (key labels)
22
+ Orange: #f77f00 (warnings/alerts)
23
+ Green: #06d6a0 (success/active)
24
+ ```
25
+
26
+ ## Background with Grid
27
+
28
+ ```xml
29
+ <defs>
30
+ <pattern id="grid" width="30" height="30" patternUnits="userSpaceOnUse">
31
+ <path d="M 30 0 L 0 0 0 30" fill="none"
32
+ stroke="#112240" stroke-width="0.5"/>
33
+ </pattern>
34
+ </defs>
35
+ <rect width="960" height="600" fill="#0a1628"/>
36
+ <rect width="960" height="600" fill="url(#grid)" opacity="0.6"/>
37
+ ```
38
+
39
+ ## Typography
40
+
41
+ ```
42
+ font-family: 'Courier New', 'Lucida Console', monospace
43
+ font-size: 13px labels, 10px annotations, 16px title
44
+ font-weight: 400; titles use 700
45
+ text-transform: uppercase for section headers
46
+ letter-spacing: 0.05em
47
+ ```
48
+
49
+ ## Box Styles
50
+
51
+ ```xml
52
+ <!-- Technical node box -->
53
+ <rect rx="2" ry="2" fill="#0d1f3c" stroke="#00b4d8" stroke-width="1"/>
54
+
55
+ <!-- Corner brackets instead of full border (engineering style) -->
56
+ <!-- Draw 4 L-shapes at corners instead of full rect -->
57
+
58
+ <!-- Dashed box (external/optional component) -->
59
+ <rect rx="2" fill="none" stroke="#00b4d8" stroke-width="1"
60
+ stroke-dasharray="6,3"/>
61
+ ```
62
+
63
+ ## Arrows & Annotations
64
+
65
+ ```xml
66
+ <defs>
67
+ <marker id="arrow-cyan" markerWidth="8" markerHeight="6"
68
+ refX="7" refY="3" orient="auto">
69
+ <polygon points="0 0, 8 3, 0 6" fill="#00b4d8"/>
70
+ </marker>
71
+ </defs>
72
+ <!-- Lines are sharp, orthogonal routing preferred -->
73
+ <polyline points="x1,y1 x2,y1 x2,y2"
74
+ stroke="#00b4d8" stroke-width="1" fill="none"
75
+ marker-end="url(#arrow-cyan)"/>
76
+
77
+ <!-- Annotation label on line -->
78
+ <text fill="#48cae4" font-size="10" text-anchor="middle">HTTP/REST</text>
79
+ ```
80
+
81
+ ## Title Block (bottom-right)
82
+
83
+ ```xml
84
+ <!-- Blueprint title block -->
85
+ <rect x="700" y="530" width="240" height="60"
86
+ fill="#0d1f3c" stroke="#00b4d8" stroke-width="1"/>
87
+ <line x1="700" y1="545" x2="940" y2="545"
88
+ stroke="#00b4d8" stroke-width="0.5"/>
89
+ <text x="820" y="542" text-anchor="middle"
90
+ fill="#caf0f8" font-size="10">SYSTEM ARCHITECTURE</text>
91
+ <text x="820" y="578" text-anchor="middle"
92
+ fill="#00b4d8" font-size="13" font-weight="700">DIAGRAM TITLE</text>
93
+ ```
94
+
95
+ ## SVG Template
96
+
97
+ ```xml
98
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 600"
99
+ width="960" height="600">
100
+ <style>
101
+ text { font-family: 'Courier New', monospace; fill: #caf0f8; }
102
+ </style>
103
+ <defs>
104
+ <pattern id="grid" width="30" height="30" patternUnits="userSpaceOnUse">
105
+ <path d="M 30 0 L 0 0 0 30" fill="none" stroke="#112240" stroke-width="0.5"/>
106
+ </pattern>
107
+ <!-- arrow markers -->
108
+ </defs>
109
+ <rect width="960" height="600" fill="#0a1628"/>
110
+ <rect width="960" height="600" fill="url(#grid)" opacity="0.6"/>
111
+ <!-- nodes, edges, title block -->
112
+ </svg>
113
+ ```
@@ -0,0 +1,94 @@
1
+ # Style 4: Notion Clean
2
+
3
+ Minimal, documentation-friendly. Designed to embed in Notion, Confluence, or GitHub wikis.
4
+
5
+ ## Colors
6
+
7
+ ```
8
+ Background: #ffffff
9
+ Box fill: #f9fafb (gray-50) or #ffffff
10
+ Box stroke: #e5e7eb (gray-200)
11
+ Box radius: 4px
12
+
13
+ Text primary: #111827 (gray-900)
14
+ Text secondary: #374151 (gray-700)
15
+ Text muted: #9ca3af (gray-400)
16
+ Text label: #6b7280 (gray-500), uppercase, 11px
17
+
18
+ Accent (subtle, used sparingly):
19
+ Blue: #3b82f6 (arrows only)
20
+ Gray: #d1d5db (dividers)
21
+ ```
22
+
23
+ ## Design Principles
24
+
25
+ - **No decorative icons** — use geometric shapes only (rect, circle, diamond)
26
+ - **Generous whitespace** — 24px+ padding between elements
27
+ - **Single arrow color** — blue (#3b82f6) for all connections
28
+ - **Labels in ALL CAPS** — section headers and node type labels
29
+ - **No drop shadows** — flat only
30
+
31
+ ## Typography
32
+
33
+ ```
34
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
35
+ 'Helvetica Neue', Arial, sans-serif
36
+ font-size: 14px labels, 11px uppercase type labels, 18px title
37
+ font-weight: 400 normal, 500 medium for node labels
38
+ ```
39
+
40
+ ## Box Styles
41
+
42
+ ```xml
43
+ <!-- Standard node -->
44
+ <rect rx="4" fill="#f9fafb" stroke="#e5e7eb" stroke-width="1"/>
45
+ <text fill="#111827" font-size="14" font-weight="500"/>
46
+
47
+ <!-- Type label (inside or above box) -->
48
+ <text fill="#9ca3af" font-size="11"
49
+ font-weight="500" letter-spacing="0.08em">DATABASE</text>
50
+
51
+ <!-- Section grouping (dashed container) -->
52
+ <rect rx="4" fill="none" stroke="#e5e7eb" stroke-width="1"
53
+ stroke-dasharray="4,3"/>
54
+ ```
55
+
56
+ ## Arrows
57
+
58
+ ```xml
59
+ <defs>
60
+ <marker id="arrow-blue" markerWidth="8" markerHeight="6"
61
+ refX="7" refY="3" orient="auto">
62
+ <polygon points="0 0, 8 3, 0 6" fill="#3b82f6"/>
63
+ </marker>
64
+ </defs>
65
+ <line stroke="#3b82f6" stroke-width="1.5"
66
+ marker-end="url(#arrow-blue)"/>
67
+ <!-- Optional: gray arrow for secondary flows -->
68
+ <line stroke="#d1d5db" stroke-width="1"
69
+ stroke-dasharray="4,3" marker-end="url(#arrow-gray)"/>
70
+ ```
71
+
72
+ ## SVG Template
73
+
74
+ ```xml
75
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 560"
76
+ width="960" height="560">
77
+ <style>
78
+ text { font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif; }
79
+ </style>
80
+ <defs>
81
+ <!-- arrow markers (blue only) -->
82
+ </defs>
83
+ <rect width="960" height="560" fill="#ffffff"/>
84
+ <!-- nodes (no icons, geometry only) -->
85
+ <!-- edges (single color) -->
86
+ <!-- legend (minimal, only if 2+ flows) -->
87
+ </svg>
88
+ ```
89
+
90
+ ## Sizing Guide
91
+
92
+ - Node box: min 120×40px, prefer 160×48px for readability
93
+ - Title: top-left, 18px, gray-900, margin 32px from edges
94
+ - Spacing: 80px minimum between nodes horizontally, 60px vertically
@@ -0,0 +1,125 @@
1
+ # Style 5: Glassmorphism
2
+
3
+ Frosted glass cards on dark gradient. Designed for product sites, keynotes, and hero sections.
4
+
5
+ ## Colors
6
+
7
+ ```
8
+ Background gradient: #0d1117 → #161b22 → #0d1117 (diagonal)
9
+
10
+ Glass card:
11
+ fill: rgba(255,255,255,0.05)
12
+ stroke: rgba(255,255,255,0.15)
13
+ backdrop-filter: blur(12px) [SVG: use feGaussianBlur]
14
+ box-radius: 12px
15
+
16
+ Text primary: #f0f6fc (near-white)
17
+ Text secondary: #8b949e (muted)
18
+ Text gradient: use linearGradient on text fill for hero labels
19
+
20
+ Accent glows (one per layer):
21
+ Blue glow: #58a6ff / rgba(88,166,255,0.3)
22
+ Purple glow: #bc8cff / rgba(188,140,255,0.3)
23
+ Green glow: #3fb950 / rgba(63,185,80,0.3)
24
+ Orange glow: #f78166 / rgba(247,129,102,0.3)
25
+ ```
26
+
27
+ ## Background
28
+
29
+ ```xml
30
+ <defs>
31
+ <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
32
+ <stop offset="0%" stop-color="#0d1117"/>
33
+ <stop offset="50%" stop-color="#161b22"/>
34
+ <stop offset="100%" stop-color="#0d1117"/>
35
+ </linearGradient>
36
+ <!-- Ambient glow spots -->
37
+ <radialGradient id="glow-blue" cx="30%" cy="40%" r="40%">
38
+ <stop offset="0%" stop-color="rgba(88,166,255,0.15)"/>
39
+ <stop offset="100%" stop-color="rgba(88,166,255,0)"/>
40
+ </radialGradient>
41
+ <radialGradient id="glow-purple" cx="70%" cy="60%" r="35%">
42
+ <stop offset="0%" stop-color="rgba(188,140,255,0.12)"/>
43
+ <stop offset="100%" stop-color="rgba(188,140,255,0)"/>
44
+ </radialGradient>
45
+ </defs>
46
+ <rect width="960" height="600" fill="url(#bg)"/>
47
+ <rect width="960" height="600" fill="url(#glow-blue)"/>
48
+ <rect width="960" height="600" fill="url(#glow-purple)"/>
49
+ ```
50
+
51
+ ## Glass Card Effect
52
+
53
+ SVG cannot do real backdrop-filter, so simulate with:
54
+
55
+ ```xml
56
+ <defs>
57
+ <filter id="glass-blur">
58
+ <feGaussianBlur in="SourceGraphic" stdDeviation="0.5"/>
59
+ </filter>
60
+ </defs>
61
+
62
+ <!-- Glass card: layered rects -->
63
+ <!-- 1. Subtle inner shadow -->
64
+ <rect rx="12" fill="rgba(255,255,255,0.03)" stroke="none"/>
65
+ <!-- 2. Glass body -->
66
+ <rect rx="12" fill="rgba(255,255,255,0.06)"
67
+ stroke="rgba(255,255,255,0.15)" stroke-width="1"/>
68
+ <!-- 3. Top highlight line -->
69
+ <line stroke="rgba(255,255,255,0.25)" stroke-width="1"/>
70
+ ```
71
+
72
+ ## Typography
73
+
74
+ ```
75
+ font-family: 'Inter', -apple-system, 'SF Pro Display', sans-serif
76
+ font-size: 14px labels, 12px sublabels, 20px hero title
77
+ font-weight: 400 normal, 600 semi-bold, 700 bold titles
78
+ ```
79
+
80
+ ## Gradient Text (for hero labels)
81
+
82
+ ```xml
83
+ <defs>
84
+ <linearGradient id="text-grad-blue" x1="0%" y1="0%" x2="100%" y2="0%">
85
+ <stop offset="0%" stop-color="#58a6ff"/>
86
+ <stop offset="100%" stop-color="#bc8cff"/>
87
+ </linearGradient>
88
+ </defs>
89
+ <text fill="url(#text-grad-blue)" font-weight="700" font-size="20">
90
+ AI Pipeline
91
+ </text>
92
+ ```
93
+
94
+ ## Arrows
95
+
96
+ ```xml
97
+ <defs>
98
+ <marker id="arrow-blue" markerWidth="8" markerHeight="6"
99
+ refX="7" refY="3" orient="auto">
100
+ <polygon points="0 0, 8 3, 0 6" fill="#58a6ff"/>
101
+ </marker>
102
+ </defs>
103
+ <!-- Slightly glowing line -->
104
+ <path stroke="#58a6ff" stroke-width="1.5" fill="none"
105
+ opacity="0.8" marker-end="url(#arrow-blue)"/>
106
+ ```
107
+
108
+ ## SVG Template
109
+
110
+ ```xml
111
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 600"
112
+ width="960" height="600">
113
+ <style>
114
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
115
+ text { font-family: 'Inter', -apple-system, sans-serif; fill: #f0f6fc; }
116
+ </style>
117
+ <defs>
118
+ <!-- bg gradients, glow gradients, glass filter, arrow markers -->
119
+ </defs>
120
+ <!-- background layers -->
121
+ <!-- glass cards (nodes) -->
122
+ <!-- glowing edges -->
123
+ <!-- labels with gradient text for heroes -->
124
+ </svg>
125
+ ```
@@ -0,0 +1,209 @@
1
+ # Style 6: Claude Official
2
+
3
+ Inspired by Anthropic's Claude blog technical diagrams — warm, approachable, professional.
4
+ s
5
+
6
+ ```
7
+ Background: #f8f6f3 (warm cream)
8
+ Box fill:
9
+ - Blue tint: #a8c5e6 (alert/input nodes)
10
+ - Green tint: #9dd4c7 (agent nodes)
11
+ - Beige: #f4e4c1 (infrastructure/bus)
12
+ - Gray tint: #e8e6e3 (storage/state)
13
+ Box stroke: #4a4a4a (dark gray)
14
+ Box radius: 12px
15
+ Text primary: #1a1a1a (near black)
16
+ Text secondary: #6a6a6a (medium gray)
17
+ Text labels: #5a5a5a (arrow labels)
18
+
19
+ Semanode colors:
20
+ Input/Source: #a8c5e6 (soft blue)
21
+ Agent/Process: #9dd4c7 (soft teal-green)
22
+ Infrastructure: #f4e4c1 (warm beige)
23
+ Storage/State: #e8e6e3 (light gray)
24
+
25
+ Arrow color: #5a5a5a (consistent dark gray)
26
+ `ypography
27
+
28
+ ```
29
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue',
30
+ Arial, sans-serif
31
+ font-size: 16px node labels, 14px descriptions, 13px arrow labels
32
+ font-weight: 600 for node labels, 400 for descriptions, 700 for titles
33
+ ```
34
+
35
+ ## Box Shapes
36
+
37
+ ```xml
38
+ <!-- Agent node (teal-green) -->
39
+ <rect rx="12" ry="12" fill="#9dd4c7" stroke="#4a4a4a" stroke-width="2.5"/>
40
+
41
+ <!-- Input/Source node (soft blue) -->
42
+ <rect rx="12" ry="12" fill="#a8c5e6" stroke="#4a4a4a" stroke-width="2.5"/>
43
+
44
+ <!-- Infrastructure node (warm beige) -->
45
+ <rect rx="12" ry="12" fill="#f4e4c1" stroke="#4a4a4a" stroke-width="2.5"/>
46
+
47
+ <!-- Storage/State node (light gray) -->
48
+ <rect rx="12" ry="12" fill="#e8e6e3" stroke="#4a4a4a" stroke-width="2.5"/>
49
+ ```
50
+
51
+ ## Arrows
52
+
53
+ ```xml
54
+ <defs>
55
+ <marker id="arrow-claude" markerWidth="8" markerHeight="8"
56
+ refX="7" refY="4" orient="auto">
57
+ <polygon points="0 0, 8 4, 0 8" fill="#5a5a5a"/>
58
+ </marker>
59
+ </defs>
60
+
61
+ <!-- Arrow line -->
62
+ <line stroke="#5a5a5a" stroke-width="2" marker-end="url(#arrow-claude)"/>
63
+
64
+ <!-- Or use simple line without arrowhead for cleaner look -->
65
+ <line stroke="#5a5a5a" stroke-width="2"/>
66
+ ```
67
+
68
+ ## Arrow Semantics
69
+
70
+ Use different arrow styles to convey meaning:
71
+
72
+ | Flow Type | Color | Stroke | Dash | Usage |
73
+ |-----------|-------|--------|------|-------|
74
+ | Primary data flow | #5a5a5a | 2px solid | none | Main request/response path |
75
+ | Memory write | #5a5a5a | 2px | `5,3` | Write/store operations |
76
+ | Memory read | #5a5a5a | 2px solid | none | Retrieval from store |
77
+ | Control/trigger | #5a5a5a | 1.5px | `3,2` | Event triggers |
78
+
79
+ ```xml
80
+ <!-- Solid arrow for reads -->
81
+ <line stroke="#5a5a5a" stroke-width="2" marker-end="url(#arrow-claude)"/>
82
+
83
+ <!-- Dashed arrow for writes -->
84
+ <line stroke="#5a5a5a" stroke-width="2" stroke-dasharray="5,3" marker-end="url(#arrow-claude)"/>
85
+ ```
86
+
87
+ ## Arrow Labels
88
+
89
+ Arrow labels should be **technical and specific**, positioned mid-arrow:
90
+
91
+ ```xml
92
+ <text x="..." y="..." fill="#5a5a5a" font-size="13" text-anchor="middle">
93
+ store(embedding)
94
+ </text>
95
+ ```
96
+
97
+ Good lls: `query(text)`, `retrieve(top_k=5)`, `embed(768d)`, `POST /api/search`
98
+ Avoid vague labels: "Process", "Send", "Get"
99
+
100
+ ## Node Content Guidelines
101
+
102
+ Node content should include **technical details**, not just concepts:
103
+
104
+ **Good examples:**
105
+ - "Vector Store" → "Vector Sne)" + "• 768-dim embeddings" + "• Cosine s"
106
+ - "LLM" → "GPT-4" + "• 8K context" + "• Temperature: 0.7"
107
+ - "Memory" → "Redis Cache" + "• TTL: 5min" + "• Max: 4K tokens"
108
+
109
+ **Avoid vague descriptions:**
110
+ - "Process data" → specify what processing
111
+ - "Store information" → specify storage type and format
112
+ - "Handle requests" → specify request type and method
113
+
114
+ Use 2-3 lines per node:
115
+ 1. Component name (bold, 16px)
116
+ 2. Technical detail or implementation (14px)
117
+ 3. Key parameter or constraint (14px, optional)
118
+
119
+ ## Layer Labels
120
+
121
+ For multi-layer architectures, add layer labels on the left side:
122
+
123
+ ```xml
124
+ <text x="30" y="130" fill="#6a6a6a" font-size="14" font-weight="600">Input</text>
125
+ <text x="30" y="290" fill="#6a6a6a" font-size="14" font-weight="600">Processing</text>
126
+ <text x="30" y="490" fill="#6a6a6a" font-size="14" font-weight="600">Storage</text>
127
+ ```
128
+
129
+ Position at the vertical center of each layer.
130
+
131
+ ## Legend Requirement
132
+
133
+ When using 2+ arrow types or colors, include a legend in the bottom-right corner:
134
+
135
+ ```Legend box -->="720" y="520" width="220" height="8" ry="8"
136
+ fill="#ffffff" stroke="#4a4a4a" stroke-width="1.5"/>
137
+ <text x="735" y="540" fill="#1a1a1a" font-size="13" font-weight="600">Legend</text>
138
+
139
+ <!-- Legend items -->
140
+ <line x1="735" y1="555" x2="765" y2="555" stroke="#5a5a5a" stroke-width="2"/>
141
+ <text x="775" y="560" fill="#6a6a6a" font-size="12">Read operation</text>
142
+
143
+ <line x1="735" y1="570" x2="765" y2="570" stroke="#5a5a5a" stroke-width="2" stroke-dasharray="5,3"/>
144
+ <text x="775" y="575" fill="#6a6a6a" font-size="12">Write operation</text>
145
+ ```
146
+
147
+ Position: bottom-right, 20px margin from edges.
148
+
149
+ ## Layout Principles
150
+
151
+ - **Generous spacing**: Minimum 80px between node edges
152
+ - **Horizontal alignment same layer align perfectly
153
+ - **Vertical flow**: Top-to-bottom preferred
154
+ - **Symmetry**: Balaight composition
155
+ - **Clean lines**: Orthogonal rotical then horizontal, or vice# SVG Template
156
+
157
+ ```xml
158
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 600"
159
+ width="960" height="600">
160
+ <style>
161
+ text { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
162
+ 'Helvetica Neue', Arial, sans-serif;
163
+ }
164
+ </style>
165
+ <defs>
166
+ <marker id="arrow-claude" markerWidth="8" markerHeight="8"
167
+ refX="7" refY="4" orient="auto">
168
+ <polygon points="0 0, 8 4, 0 8" fill="#5a5a5a"/>
169
+ </marker>
170
+ <filter id="shadow-soft">
171
+ <feDropShadow dx="0" dy="2" stdDeviation="6" flood-color="#00000008"/>
172
+ </filter>
173
+ </defs>
174
+
175
+ <!-- Warm cream background -->
176
+ <rect width="960" height="600" fill="#f8f6f3"/>
177
+
178
+ <!-- Title (optional) -->
179
+ <text x="480" y="40" text-anchor="middle" fill="#1a1a1a"
180
+ font-size="20" font-weight="700">Diagram Title</text>
181
+
182
+ <!-- Nodes -->
183
+ <!-- Agent node example -->
184
+ <rect x="100" y=" width="180" height="80" rx="12" ry="12"
185
+ fill="#9dd4c7" stroke="#4a4a4a" stroke-width="2.5"
186
+ filter="url(#shadow-soft)"/>
187
+ <text x="190" y="145" text-anchor="middle" fill="#1a1a1a"
188
+ 16" font-weight="600">Agent name</text>
189
+
190
+ <!-- Edges -->
191
+ <line x1="190" y1="180" x2="190" y2="240"
192
+ stroke="#5a5a5a" stroke-width="2" marker-end="url(#arrow-claude)"/>
193
+ <text x="210" y="215" fill="#5a5a5a" font-size="13">Publish</text>
194
+ </svg>
195
+ ```
196
+
197
+ ## Design Philosophy
198
+
199
+ Claude's official style emphasizes:
200
+ - **Warmth**: Cream background, ls
201
+ - ty**: High contrast text, generous spacing
202
+ - **Professionalism**: Consistent stroke weights, aligned elements
203
+ - **Approachability**: Rounded corners, friendly colors
204
+
205
+ Avoid:
206
+ - Harsh shadows or gradients
207
+ - Overly saturated colors
208
+ - Thin stroke weights (< 2px)
209
+ - Cluttered layouts