@ia-ccun/code-agent-cli 0.0.47 → 0.0.49-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/config/agent/skills/design-md/README.md +34 -0
  2. package/config/agent/skills/design-md/SKILL.md +172 -0
  3. package/config/agent/skills/design-md/examples/DESIGN.md +154 -0
  4. package/config/agent/skills/fireworks-tech-graph/LICENSE +21 -0
  5. package/config/agent/skills/fireworks-tech-graph/README.md +528 -0
  6. package/config/agent/skills/fireworks-tech-graph/README.zh.md +499 -0
  7. package/config/agent/skills/fireworks-tech-graph/SKILL.md +537 -0
  8. package/config/agent/skills/fireworks-tech-graph/agentloop-core.svg +101 -0
  9. package/config/agent/skills/fireworks-tech-graph/agents/openai.yaml +4 -0
  10. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style1-flat.png +0 -0
  11. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style2-dark.png +0 -0
  12. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style3-blueprint.png +0 -0
  13. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style4-notion.png +0 -0
  14. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style5-glass.png +0 -0
  15. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style6-claude.png +0 -0
  16. package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style7-openai.png +0 -0
  17. package/config/agent/skills/fireworks-tech-graph/fixtures/agent-memory-types-style4.json +181 -0
  18. package/config/agent/skills/fireworks-tech-graph/fixtures/api-flow-style7.json +40 -0
  19. package/config/agent/skills/fireworks-tech-graph/fixtures/mem0-style1.json +297 -0
  20. package/config/agent/skills/fireworks-tech-graph/fixtures/microservices-style3.json +64 -0
  21. package/config/agent/skills/fireworks-tech-graph/fixtures/multi-agent-style5.json +45 -0
  22. package/config/agent/skills/fireworks-tech-graph/fixtures/system-architecture-style6.json +48 -0
  23. package/config/agent/skills/fireworks-tech-graph/fixtures/tool-call-style2.json +182 -0
  24. package/config/agent/skills/fireworks-tech-graph/package.json +42 -0
  25. package/config/agent/skills/fireworks-tech-graph/references/icons.md +406 -0
  26. package/config/agent/skills/fireworks-tech-graph/references/style-1-flat-icon.md +108 -0
  27. package/config/agent/skills/fireworks-tech-graph/references/style-2-dark-terminal.md +107 -0
  28. package/config/agent/skills/fireworks-tech-graph/references/style-3-blueprint.md +113 -0
  29. package/config/agent/skills/fireworks-tech-graph/references/style-4-notion-clean.md +94 -0
  30. package/config/agent/skills/fireworks-tech-graph/references/style-5-glassmorphism.md +125 -0
  31. package/config/agent/skills/fireworks-tech-graph/references/style-6-claude-official.md +209 -0
  32. package/config/agent/skills/fireworks-tech-graph/references/style-7-openai.md +215 -0
  33. package/config/agent/skills/fireworks-tech-graph/references/style-diagram-matrix.md +135 -0
  34. package/config/agent/skills/fireworks-tech-graph/references/svg-layout-best-practices.md +100 -0
  35. package/config/agent/skills/fireworks-tech-graph/scripts/README.md +244 -0
  36. package/config/agent/skills/fireworks-tech-graph/scripts/generate-diagram.sh +157 -0
  37. package/config/agent/skills/fireworks-tech-graph/scripts/generate-from-template.py +1556 -0
  38. package/config/agent/skills/fireworks-tech-graph/scripts/test-all-styles.sh +135 -0
  39. package/config/agent/skills/fireworks-tech-graph/scripts/validate-svg.sh +292 -0
  40. package/config/agent/skills/fireworks-tech-graph/templates/agent-architecture.svg +28 -0
  41. package/config/agent/skills/fireworks-tech-graph/templates/architecture.svg +23 -0
  42. package/config/agent/skills/fireworks-tech-graph/templates/comparison-matrix.svg +14 -0
  43. package/config/agent/skills/fireworks-tech-graph/templates/data-flow.svg +28 -0
  44. package/config/agent/skills/fireworks-tech-graph/templates/er-diagram.svg +21 -0
  45. package/config/agent/skills/fireworks-tech-graph/templates/flowchart.svg +21 -0
  46. package/config/agent/skills/fireworks-tech-graph/templates/sequence.svg +20 -0
  47. package/config/agent/skills/fireworks-tech-graph/templates/state-machine.svg +20 -0
  48. package/config/agent/skills/fireworks-tech-graph/templates/timeline.svg +19 -0
  49. package/config/agent/skills/fireworks-tech-graph/templates/use-case.svg +21 -0
  50. package/config/agent/skills/impeccable/adapt/SKILL.md +205 -0
  51. package/config/agent/skills/impeccable/animate/SKILL.md +178 -0
  52. package/config/agent/skills/impeccable/arrange/SKILL.md +128 -0
  53. package/config/agent/skills/impeccable/audit/SKILL.md +129 -0
  54. package/config/agent/skills/impeccable/bolder/SKILL.md +120 -0
  55. package/config/agent/skills/impeccable/clarify/SKILL.md +186 -0
  56. package/config/agent/skills/impeccable/colorize/SKILL.md +146 -0
  57. package/config/agent/skills/impeccable/critique/SKILL.md +123 -0
  58. package/config/agent/skills/impeccable/delight/SKILL.md +307 -0
  59. package/config/agent/skills/impeccable/distill/SKILL.md +125 -0
  60. package/config/agent/skills/impeccable/extract/SKILL.md +95 -0
  61. package/config/agent/skills/impeccable/frontend-design/reference/color-and-contrast.md +132 -0
  62. package/config/agent/skills/impeccable/frontend-design/reference/interaction-design.md +123 -0
  63. package/config/agent/skills/impeccable/frontend-design/reference/motion-design.md +99 -0
  64. package/config/agent/skills/impeccable/frontend-design/reference/responsive-design.md +114 -0
  65. package/config/agent/skills/impeccable/frontend-design/reference/spatial-design.md +100 -0
  66. package/config/agent/skills/impeccable/frontend-design/reference/typography.md +133 -0
  67. package/config/agent/skills/impeccable/frontend-design/reference/ux-writing.md +107 -0
  68. package/config/agent/skills/impeccable/harden/SKILL.md +358 -0
  69. package/config/agent/skills/impeccable/normalize/SKILL.md +74 -0
  70. package/config/agent/skills/impeccable/onboard/SKILL.md +249 -0
  71. package/config/agent/skills/impeccable/optimize/SKILL.md +269 -0
  72. package/config/agent/skills/impeccable/overdrive/SKILL.md +145 -0
  73. package/config/agent/skills/impeccable/polish/SKILL.md +206 -0
  74. package/config/agent/skills/impeccable/quieter/SKILL.md +106 -0
  75. package/config/agent/skills/impeccable/teach-impeccable/SKILL.md +72 -0
  76. package/config/agent/skills/impeccable/typeset/SKILL.md +119 -0
  77. package/package.json +1 -1
@@ -0,0 +1,215 @@
1
+ # Style 7: OpenAI Official
2
+
3
+ Clean, modern aesthetic matching OpenAI's documentation and research diagrams — minimal but precise.
4
+
5
+ ## Color Palette
6
+
7
+ ```
8
+ Background: #ffffff (pure white)
9
+ Primary text: #0d0d0d (near black)
10
+ Secondary text: #6e6e80 (muted gray)
11
+ Border: #e5e5e5 (light gray)
12
+
13
+ Accent colors (reserved):
14
+ Green accent: #10a37f (OpenAI brand green)
15
+ Blue accent: #1d4ed8 (links, actions)
16
+ Orange accent: #f97316 (highlights, warnings)
17
+ Gray accent: #71717a (secondary elements)
18
+ ```
19
+
20
+ ## Typography
21
+
22
+ ```
23
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica Neue, sans-serif
24
+ font-size: 16px node labels, 13px descriptions, 12px arrow labels
25
+ font-weight: 600 for titles, 500 for labels, 400 for descriptions
26
+ letter-spacing: -0.01em (tight)
27
+ ```
28
+
29
+ No custom fonts. System font stack only for maximum compatibility.
30
+
31
+ ## Node Boxes
32
+
33
+ Clean, minimal boxes with subtle borders:
34
+
35
+ ```xml
36
+ <!-- Standard node -->
37
+ <rect x="100" y="100" width="180" height="80" rx="8" ry="8"
38
+ fill="#ffffff" stroke="#e5e5e5" stroke-width="1.5"/>
39
+
40
+ <!-- Accent node (with green left border) -->
41
+ <rect x="100" y="100" width="180" height="80" rx="8" ry="8"
42
+ fill="#ffffff" stroke="#e5e5e5" stroke-width="1.5"/>
43
+ <rect x="100" y="100" width="4" height="80" rx="2" ry="2"
44
+ fill="#10a37f"/>
45
+ ```
46
+
47
+ **Key techniques:**
48
+ 1. White fill with light gray border (no shadows)
49
+ 2. Optional colored left-border accent strip (4px wide)
50
+ 3. `rx="8"` for subtle rounding
51
+ 4. `stroke-width: 1.5` — thin, precise borders
52
+ 5. No gradients, no shadows, no decorative elements
53
+
54
+ ## Arrows
55
+
56
+ Thin, precise arrows with subtle colors:
57
+
58
+ ```xml
59
+ <defs>
60
+ <!-- Default arrow (gray) -->
61
+ <marker id="arrow-oai" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
62
+ <polygon points="0 0, 10 3.5, 0 7" fill="#71717a"/>
63
+ </marker>
64
+
65
+ <!-- Accent arrow (green) -->
66
+ <marker id="arrow-oai-green" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
67
+ <polygon points="0 0, 10 3.5, 0 7" fill="#10a37f"/>
68
+ </marker>
69
+ </defs>
70
+
71
+ <!-- Default connection -->
72
+ <line x1="280" y1="140" x2="400" y2="140"
73
+ stroke="#71717a" stroke-width="1.5" marker-end="url(#arrow-oai)"/>
74
+
75
+ <!-- Accent connection -->
76
+ <line x1="280" y1="140" x2="400" y2="140"
77
+ stroke="#10a37f" stroke-width="1.5" marker-end="url(#arrow-oai-green)"/>
78
+ ```
79
+
80
+ **Arrow guidelines:**
81
+ - Prefer straight lines (orthogonal routing with right angles)
82
+ - `stroke-width: 1.5` — thin and precise
83
+ - Filled polygon arrowheads (not stroke-based)
84
+ - Gray for default, green for primary/accent flows
85
+ - Dashed (`stroke-dasharray="4,3"`) for optional/async flows
86
+
87
+ ## Arrow Labels
88
+
89
+ Minimal, small labels:
90
+
91
+ ```xml
92
+ <text x="340" y="133" text-anchor="middle" fill="#6e6e80" font-size="12">
93
+ label
94
+ </text>
95
+ ```
96
+
97
+ Labels should be:
98
+ - 12px, gray color (`#6e6e80`)
99
+ - No background rect (white background is default)
100
+ - Short, technical language
101
+ - Midpoint of arrow
102
+
103
+ ## Database Shapes
104
+
105
+ Clean cylinders with thin borders:
106
+
107
+ ```xml
108
+ <ellipse cx="200" cy="100" rx="50" ry="12" fill="#ffffff" stroke="#e5e5e5" stroke-width="1.5"/>
109
+ <path d="M 150,100 L 150,140 Q 200,155 250,140 L 250,100"
110
+ fill="#ffffff" stroke="#e5e5e5" stroke-width="1.5"/>
111
+ <ellipse cx="200" cy="140" rx="50" ry="12" fill="none" stroke="#e5e5e5" stroke-width="1.5"/>
112
+ ```
113
+
114
+ ## Grouping Containers
115
+
116
+ Dashed rect containers for logical grouping:
117
+
118
+ ```xml
119
+ <rect x="80" y="80" width="400" height="200" rx="8" ry="8"
120
+ fill="none" stroke="#e5e5e5" stroke-width="1" stroke-dasharray="4,3"/>
121
+ <text x="90" y="97" fill="#6e6e80" font-size="12" font-weight="500">
122
+ Group Label
123
+ </text>
124
+ ```
125
+
126
+ ## Node Content
127
+
128
+ Clean, minimal text layout:
129
+
130
+ ```xml
131
+ <rect x="100" y="100" width="180" height="80" rx="8" ry="8"
132
+ fill="#ffffff" stroke="#e5e5e5" stroke-width="1.5"/>
133
+ <text x="190" y="130" text-anchor="middle" fill="#0d0d0d"
134
+ font-size="16" font-weight="600">
135
+ Component Name
136
+ </text>
137
+ <text x="190" y="150" text-anchor="middle" fill="#6e6e80"
138
+ font-size="13">
139
+ Brief description
140
+ </text>
141
+ ```
142
+
143
+ **Content guidelines:**
144
+ - 1-2 lines per box
145
+ - Main label: 16px, font-weight: 600, near-black
146
+ - Description: 13px, font-weight: 400, gray
147
+ - Center-aligned text within boxes
148
+
149
+ ## Layout Principles
150
+
151
+ **Precise, grid-aligned layout:**
152
+ - Snap all coordinates to 8px grid
153
+ - Consistent 100px horizontal spacing
154
+ - Consistent 120px vertical spacing
155
+ - Generous whitespace (40px+ margins)
156
+ - No decorative elements
157
+
158
+ **OpenAI minimalism:**
159
+ - Only use color when semantically meaningful (brand green for primary flow)
160
+ - White boxes on white background — differentiation through border and label only
161
+ - Avoid: shadows, gradients, patterns, icons, decorative elements
162
+ - Prefer: straight lines, orthogonal routing, thin strokes
163
+
164
+ ## SVG Template
165
+
166
+ ```xml
167
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 600" width="960" height="600">
168
+ <style>
169
+ text { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
170
+ </style>
171
+ <defs>
172
+ <marker id="arrow-oai" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
173
+ <polygon points="0 0, 10 3.5, 0 7" fill="#71717a"/>
174
+ </marker>
175
+ <marker id="arrow-oai-green" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
176
+ <polygon points="0 0, 10 3.5, 0 7" fill="#10a37f"/>
177
+ </marker>
178
+ </defs>
179
+
180
+ <!-- White background -->
181
+ <rect width="960" height="600" fill="#ffffff"/>
182
+
183
+ <!-- Title -->
184
+ <text x="480" y="30" text-anchor="middle" fill="#0d0d0d"
185
+ font-size="20" font-weight="600">Diagram Title</text>
186
+
187
+ <!-- Standard node -->
188
+ <rect x="100" y="70" width="180" height="80" rx="8" ry="8"
189
+ fill="#ffffff" stroke="#e5e5e5" stroke-width="1.5"/>
190
+ <text x="190" y="100" text-anchor="middle" fill="#0d0d0d"
191
+ font-size="16" font-weight="600">Component</text>
192
+ <text x="190" y="120" text-anchor="middle" fill="#6e6e80"
193
+ font-size="13">Description</text>
194
+
195
+ <!-- Connection -->
196
+ <line x1="280" y1="110" x2="400" y2="110"
197
+ stroke="#71717a" stroke-width="1.5" marker-end="url(#arrow-oai)"/>
198
+ <text x="340" y="103" text-anchor="middle" fill="#6e6e80" font-size="12">label</text>
199
+ </svg>
200
+ ```
201
+
202
+ ## Design Philosophy
203
+
204
+ OpenAI Official style emphasizes:
205
+ - **Minimalism**: White on white, only essential visual elements
206
+ - **Precision**: Thin strokes, sharp corners (rx=8), grid-aligned
207
+ - **Clarity**: Content-first, no visual noise
208
+ - **Brand consistency**: `#10a37f` green used sparingly for primary flows
209
+
210
+ Avoid:
211
+ - Shadows and gradients
212
+ - Colorful fills (white fill only)
213
+ - Thick borders (>2px)
214
+ - Decorative elements (icons, patterns, textures)
215
+ - Custom fonts (system stack only)
@@ -0,0 +1,135 @@
1
+ # Style-to-Diagram-Type Adaptation Guide
2
+
3
+ Not all styles work equally well for every diagram type. Use this guide to pick the best style.
4
+
5
+ ## Architecture Diagram
6
+ | Style | Suitability | Notes |
7
+ |-------|----------|
8
+ | 1 Flat Icon | Excellent | Default choice; colorful node fills, clear layering |
9
+ | 2 Dark Terminal | Excellent | Popular for dev blogs; use colored borders on dark bg |
10
+ | 3 Blueprint | Excellent | Perfect for formal architecture docs |
11
+ | 4 Notion Clean | Good | Minimal, works for inline docs |
12
+ | 5 Glassmorphism | Good | Striking for presentations and product pages |
13
+ | 6 Claude Official | Good | Warm aesthetic, Anthropic-style presentations |
14
+ | 7 OpenAI Official | Good | Clean, precise; minimal borders, brand green accents |
15
+
16
+ ## Class Diagram / ER Diagram
17
+ | Style | Suitability | Notes |
18
+ |-------|------------|-------|
19
+ | 1 Flat Icon | Good | Colored headers per class category |
20
+ | 2 Dark Terminal | Good | High contrast for code-like diagrams |
21
+ | 3 Blueprint | Excellent | Best for formal UML documentation |
22
+ | 4 Notion Clean | Excellent | Clean, minimal; ideal for Notion-embedded diagrams |
23
+ | 5 Glassmorphism | Poor | Glass effects distract from structural content |
24
+ | 6 Claude Official | Excellent | Warm, readable; good for documentation |
25
+ | 7 OpenAI Official | Excellent | Minimal aesthetic matches UML precision |
26
+
27
+ ## Sequence Diagram
28
+ | Style | Suitability | Notes |
29
+ |-------|------------|-------|
30
+ | 1 Flat Icon | Good | Clear lifelines; activation boxes visible |
31
+ | 2 Dark Terminal | Good | Good for dev articles; dashed lifelines visible |
32
+ | 3 Blueprint | Excellent | Formal, technical documentation |
33
+ | 4 Notion Clean | Excellent | Best for Notion-embedded sequence diagrams |
34
+ | 5 Glassmorphism | Poor | Glass effects make lifelines hard to read |
35
+ | 6 Claude Official | Excellent | Ward contrast |
36
+ | 7 OpenAI Official | Excellent | Minimal, precise; ideal for API docs |
37
+
38
+ ## Flowchart / Process Flow
39
+ | Style | Suitability | Notes |
40
+ |-------|------------|-------|
41
+ | 1 Flat Icon | Excellent | Default; colorful decision diamonds |
42
+ | 2 Dark Terminal | Good | Works well for dev workflow diagrams |
43
+ | 3 Blueprint | Good | Formal process documentation |
44
+ | 4 Notion Clean | Good | Clean for SOPs and inline docs |
45
+ | 5 Glassmorphism | Good | Striking for product demos |
46
+ | 6 Claude Official | Good | Warm aesthetic for presentations |
47
+ | 7 OpenAI Official | Good | Clean and minimal |
48
+
49
+ ## Mind Map / Concept Map
50
+ | Style | Suitability | Notes |
51
+ |-------|------------|-------|
52
+ | 1 Flat Icon | Excellent branches, engaging |
53
+ | 2 Dark Terminal | Good | Neon-like branches on dark bg |
54
+ | 3 Blueprint | Poor | Blueprint grid conflicts with radial layout |
55
+ | 4 Notion Clean | Excellent | Ideal for n brainstorming |
56
+ | 5 Glassmorphism | Excellent | Stunning visual for presentations |
57
+ | 6 Claude Official | Good | Warm, readable |
58
+ | 7 OpenAI Official | Good | Clean and minimal |
59
+
60
+ ## Data Flow Diagram
61
+ | Style | Suitability | Notes |
62
+ |-------|------------|-------|
63
+ | 1 Flat Icon | Excellent | Color-coded arrows by data type |
64
+ | 2 Dark Terminal | Excellent | Glowing data paths on dark bg |
65
+ | 3 Blueprint | Excellent | Formal data flow documentation |
66
+ | 4 Notion Clean | Good | Minimal, clean |
67
+ | 5 Glassmorphism | Poor | Distracts from flow semantics |
68
+ | 6 Claude Official | Good | Readable |
69
+ | 7 OpenAI Official | Good | Precise, minimal |
70
+
71
+ ## Use Case Diagram
72
+ | Style | Suitability | Notes |
73
+ |-------|------------|-------|
74
+ | 1 Flat Icon | Good | Colorful use case ellipses |
75
+ | 2 Dark Terminal | Poor | Stick figures less visible on dark bg |
76
+ | 3 rint | Excellent | Classic UML aesthetic |
77
+ | 4 Notion Clean | Excellent | Perfect for product requirement docs |
78
+ | 5 Glassmorphism | Poor | Unnecessary visual noise |
79
+ | 6 Claude Official | Excellent | Warm, professional |
80
+ | 7 OpenAI Official | Excellent | Clean, precise UML |
81
+
82
+ ## State Machine Diagram
83
+ | Style | Suitability | Notes |
84
+ |-------|------------|-------|
85
+ Flat Icon | Good | Colorful states |
86
+ | 2 Dark Terminal | Good | Glowing states and transitions |
87
+ | 3 Blueprint | Excellent | Best for formal UML state machines |
88
+ | 4 Notion Clean | Excellent | Clean for documentation |
89
+ | 5 Glassmorphism | Poor | Distracts from state transitions |
90
+ | 6 Claude Official | Excellent | Readable |
91
+ | 7 OpenAI Official | Excellent | Minimal, precise |
92
+
93
+ ## Network Topology
94
+ | Style | Suitabili |
95
+ |-------|------------|-------|
96
+ | 1 Flat Icon | Excellent | Colorful device icons |
97
+ | 2 Dark Terminal | Excellent | Cyberpunk-style network maps |
98
+ | 3 Blueprint | Excellent | Ideal for infrastructure docs |
99
+ | 4 Notion Clean | Good | Clean for IT documentation |
100
+ | 5 Glassmorphism | Good | Striking for presentations |
101
+ | 6 Claude Official | Good | Professional network diagrams |
102
+ | 7 OpenAI Official | Good | Clean infrastructure diagrams |
103
+
104
+ ## Comparison / Feature Matrix
105
+ | Style | Suitability | Notes |
106
+ |-------|------------|-------|
107
+ | 1 Flat Icon | Excellent | Color-coded checkmarks |
108
+ | 2 Dark Terminal | Good | Works for dev tool comparisons |
109
+ | 3 Blor | Grid conflicts with table layout |
110
+ | 4 Notion Clean | Excellent | Perfect for Notion-embedded tables |
111
+ | 5 Glassmorphism | Poor | Distabular data |
112
+ | 6 Claude Official | Excellent | Clean, warm |
113
+ | 7 OpenAI Official | Excellent | Minimal, precise |
114
+
115
+ ## Timeline / Gantt
116
+ | Style | Suitability | Notes |
117
+ |-------|------------|-------|
118
+ | 1 Flat Icon | Excellent | Colorful bars by category |
119
+ | 2 Dark Terminal | Good | Works for dev roadmaps |
120
+ | 3 Blueprint | Good | Formal project plans |
121
+ | 4 Notion Clean | Excellent | Ideal for Notion project docs |
122
+ | 5 Glassmorphism | Good | Striking for keynote presentations |
123
+ | 6 Claude Official | Good | Warm, professional |
124
+ | 7 OpenAI Official | Good | Clean timeline |
125
+
126
+ ## Agent / Memory Architecture
127
+ | Style | Suitability | Notes |
128
+ |-------|------------|-------|
129
+ | 1 Flat Icon | Excellent | Colorful layers, engaging |
130
+ | 2 Dark Terminal | Excellent | Popular for AI/ML blog posts |
131
+ | 3 Blueprint | Good | Formal AI system documentation |
132
+ | 4 Notion Clean | Good | Clean for AI research notes |
133
+ | 5 Glassmorphism | Excellent | Stunning for AI product presentations |
134
+ | 6 Claude Official | Excellent | Anthropic AI aesthetic |
135
+ | 7 OpenAI Official | Excellent | OpenAI AI aesthetic |
@@ -0,0 +1,100 @@
1
+ # SVG Technical Diagram Layout Best Practices
2
+
3
+ ## Universal Layout Rules (Apply to All Styles)
4
+
5
+ ### 1. Component Spacing
6
+ - **Minimum clearance between components**: 80px (edge to edge)
7
+ - **Minimum clearance for arrow paths**: 60px from component edges
8
+ - **Layer vertical spacing**: 120px between horizontal layers
9
+ - **Same-layer horizontal spacing**: 100-120px between components
10
+
11
+ ### 2. Arrow Routing & Connection Points
12
+
13
+ #### Connection Point Rules
14
+ - **Never connect arrows to component corners** - use midpoints of edges
15
+ - **Entry/exit points**:
16
+ - Top edge: `cx ± offset` where offset = 0 for single arrow, ±30px for multiple
17
+ - Bottom edge: same rule
18
+ - Left/right edges: `cy ± offset`
19
+ - **Clearance from corners**: minimum 20px
20
+
21
+ #### Arrow Path Routing
22
+ - **Avoid diagonal lines crossing components** - use orthogonal routing (L-shaped paths)
23
+ - **For curved arrows**:
24
+ - Control point should be at least 40px away from any component edge
25
+ - Use intermediate waypoints for complex routing: `M x1,y1 L x2,y2 Q cx,cy x3,y3`
26
+ - **Multiple arrows between same layers**: stagger Y-coordinates by 15-20px to avoid overlap
27
+
28
+ #### Arrow Overlap Prevention
29
+ ```svg
30
+ <!-- Bad: diagonal arrow crosses component -->
31
+ <path d="M 200,100 L 600,400"/>
32
+
33
+ <!-- Good: orthogonal routing around component -->
34
+ <path d="M 200,100 L 200,250 L 600,250 L 600,400"/>
35
+
36
+ <!-- Good: curved with safe control point -->
37
+ <path d="M 200,100 Q 400,200 600,400"/>
38
+ <!-- Control point (400,200) is 50px+ away from any component -->
39
+ ```
40
+
41
+ ### 3. Arrow Label Placement
42
+ - **Position**: midpoint of arrow path, offset by 5-10px perpendicular to arrow direction
43
+ - **Background rect**: ALWAYS include, with:
44
+ - Padding: 4px horizontal, 2px vertical
45
+ - Fill: match ckground color
46
+ - Opacity: 0.9-0.95
47
+ - **Safety distance**: 15px minimum from any component edge
48
+ - **Multiple converging arrows**: stagger label positions vertically by 20px
49
+
50
+ ### 4. Component Overlap Detection
51
+ Before finalizing SVG, check:
52
+ - No component bounding boxes overlap px safety margin)
53
+ - No arrow paths pass through component interiors (except intentional tunneling with dashed style)
54
+ - No text labels overlap with components or other labels
55
+
56
+ ### 5. Z-Index Layering (SVG render order)
57
+ ```svg
58
+ <!-- Render order (top to bot back to front): -->
59
+ 1. Background rect
60
+ 2. Grouping coners (dashed rects)
61
+ 3. Arrow paths
62
+ 4. Arrow label background rects
63
+ 5. Components (boxes, cylinders, etc.)
64
+ 6. Component text
65
+ 7. Arrow label text
66
+ 8. Legend
67
+ ```
68
+
69
+ ## Style-Specific Enhancements
70
+
71
+ ### Style-1: Flat Icon Clean- **Perfect alignment**: snap all coordinates to 8px grid
72
+ - **Sharp corners**: rx="8" ry="8" for rounded rects (consistent)
73
+ - **Arrows**: thin (1.5-2px), filled polygon markers
74
+ - **No shadows**: flat design principle
75
+
76
+ ### Style-6: Claude Official Warm
77
+ - **Soft shadows**: `<feDropShadow dx="0" dy="2" stdDeviation="6" flood-color="#00000008"/>`
78
+ - **Rounded corners**: rx="12" ry="12" (more rounded than Style-1)
79
+ - **Arrows**: medium weight (2px), subtle markers
80
+
81
+ ## Validation Checklist
82
+
83
+ Before exporting PNG, verify:
84
+ - [ ] No arrow-component overlaps (visual inspection)
85
+ - [ ] All arrow labels have background rects
86
+ - [ ] Minimum 60px clearance for all arrow paths
87
+ - [ ] Component spacing ≥ 80px
88
+ - [ ] Arrow connection points avoid corners (≥20px from corner)
89
+ - [ ] Multiple arrows between layers are staggered
90
+ - [ ] Legend is readable and doesn't overlap content
91
+ - [ ] SVG validates with `rsvg-convert`
92
+
93
+ ## Common Anti-Patterns to Avoid
94
+
95
+ | Anti-Pattern | Fix |
96
+ |--------------|-----|
97
+ | Arrow crosses component | Use orthogonal routingase control point distancelabel overlaps component | Add background rect + increase offset |
98
+ | Components too close | Increase spacing to 80px minimum |
99
+ | Arrow connects to corner | Move connection point to edge midpoint offset |
100
+ | No z-index planning | Follow render order: arrows -> components -> text |
@@ -0,0 +1,244 @@
1
+ # Fireworks Tech Graph - Scripts
2
+
3
+ 辅助脚本集合,用于提高 SVG 图表生成的稳定性和效率。
4
+
5
+ ## 脚本列表
6
+
7
+ ### 1. validate-svg.sh
8
+
9
+ SVG 验证脚本,检查 SVG 语法并报告详细错误。
10
+
11
+ **用法:**
12
+ ```bash
13
+ ./validate-svg.sh <svg-file>
14
+ ```
15
+
16
+ **检查项目:**
17
+ - 标签平衡(开标签 vs 闭标签)
18
+ - 属性引号完整性
19
+ - 特殊字符转义
20
+ - Marker 引用完整性
21
+ - 闭合标签 `</svg>`
22
+ - rsvg-convert 验证
23
+
24
+ **示例:**
25
+ ```bash
26
+ ./validate-svg.sh /path/to/diagram.svg
27
+ ```
28
+
29
+ ### 2. generate-diagram.sh
30
+
31
+ SVG 图表生成脚本,提供自动验证和 PNG 导出。
32
+
33
+ **用法:**
34
+ ```bash
35
+ ./generate-diagram.sh [OPTIONS]
36
+ ```
37
+
38
+ **选项:**
39
+ - `-t, --type TYPE` - 图表类型(见脚本帮助)
40
+ - `-s, --style STYLE` - 风格编号(1-7,默认:1)
41
+ - `-o, --output PATH` - 输出路径(默认:当前目录)
42
+ - `-w, --width WIDTH` - PNG 宽度(像素,默认:1920)
43
+ - `--no-validate` - 跳过验证
44
+ - `-h, --help` - 显示帮助
45
+
46
+ **示例:**
47
+ ```bash
48
+ # 生成架构图(Style 1)
49
+ ./generate-diagram.sh -t architecture -s 1 -o ./output/arch.svg
50
+
51
+ # 生成流程图(Style 2,2400px 宽)
52
+ ./generate-diagram.sh -t flowchart -s 2 -w 2400
53
+ ```
54
+
55
+ **注意:** SVG 内容需要先准备好;这个脚本只负责验证与导出。
56
+
57
+ ### 3. generate-from-template.py
58
+
59
+ 基于风格配置和 JSON 数据生成 SVG。当前版本不再只是简单塞入 `nodes/arrows`,
60
+ 而是会执行 style guide 中的部分可计算规则,例如:
61
+
62
+ - `style` - 风格编号(1-7)
63
+ - `containers` - 泳道 / 分组容器
64
+ - `containers[].header_prefix` / `containers[].header_text` - 工程编号式分区标题
65
+ - `containers[].side_label` - 左侧 layer label
66
+ - `nodes[].kind` - 语义组件类型,例如 `double_rect`、`cylinder`、`document`、`terminal`、`circle_cluster`
67
+ - `arrows[].flow` - 语义箭头类型,例如 `control`、`write`、`read`、`data`
68
+ - `source_port` / `target_port` - 指定端口锚点
69
+ - `route_points` / `corridor_x` / `corridor_y` - 控制复杂图的走线质量
70
+ - `style_overrides` - 对现有 style 做局部覆盖
71
+ - `window_controls` / `meta_*` - 顶部终端 chrome
72
+ - `blueprint_title_block` - 工程蓝图右下角 title block
73
+
74
+ **用法:**
75
+ ```bash
76
+ python3 ./generate-from-template.py architecture ./output/arch.svg '{"style":1,"title":"My Diagram","containers":[],"nodes":[],"arrows":[]}'
77
+ ```
78
+
79
+ **示例:**
80
+ ```bash
81
+ python3 ./generate-from-template.py memory ./output/mem0.svg '{
82
+ "style": 1,
83
+ "title": "Mem0 Memory Architecture",
84
+ "containers": [
85
+ {"x":30,"y":90,"width":900,"height":90,"label":"Input Layer","header_prefix":"01"}
86
+ ],
87
+ "nodes": [
88
+ {"id":"manager","kind":"double_rect","x":360,"y":220,"width":300,"height":72,"label":"Memory Manager"},
89
+ {"id":"vector","kind":"cylinder","x":90,"y":360,"width":140,"height":110,"label":"Vector Store"}
90
+ ],
91
+ "arrows": [
92
+ {"source":"manager","target":"vector","flow":"write","dashed":true}
93
+ ]
94
+ }'
95
+ ```
96
+
97
+ ### 4. test-all-styles.sh
98
+
99
+ 批量测试脚本,测试 7 种风格的回归样例图。
100
+
101
+ **用法:**
102
+ ```bash
103
+ ./test-all-styles.sh
104
+ ```
105
+
106
+ **功能:**
107
+ - 检查所有风格的参考文件
108
+ - 渲染 `fixtures/*.json` 回归样例
109
+ - 验证生成出的 SVG 文件
110
+ - 导出 PNG 文件到 `test-output/` 目录
111
+ - 生成测试报告
112
+
113
+ **输出:**
114
+ - 测试摘要(通过/失败统计)
115
+ - PNG 文件(带时间戳)
116
+ - 详细的验证错误信息
117
+
118
+ **示例:**
119
+ ```bash
120
+ ./test-all-styles.sh
121
+ ```
122
+
123
+ ## 依赖
124
+
125
+ 所有脚本需要以下工具:
126
+
127
+ - **rsvg-convert** - SVG 转 PNG
128
+ ```bash
129
+ brew install librsvg
130
+ ```
131
+
132
+ - **grep, sed, awk** - 文本处理(macOS 自带)
133
+
134
+ ## 目录结构
135
+
136
+ ```
137
+ fireworks-tech-graph/
138
+ ├── SKILL.md # Skill 主文档
139
+ ├── references/ # 风格参考文件
140
+ │ ├── style-1-flat-icon.md
141
+ │ ├── style-2-dark-terminal.md
142
+ │ └── ...
143
+ ├── fixtures/ # 回归测试样例(JSON)
144
+ │ ├── mem0-style1.json
145
+ │ ├── tool-call-style2.json
146
+ │ └── ...
147
+ ├── scripts/ # 辅助脚本(本目录)
148
+ │ ├── README.md # 本文档
149
+ │ ├── validate-svg.sh # SVG 验证
150
+ │ ├── generate-diagram.sh # SVG 验证与 PNG 导出
151
+ │ ├── generate-from-template.py # 模板化生成 SVG
152
+ │ └── test-all-styles.sh # 批量测试
153
+ └── test-output/ # 测试输出目录(自动创建)
154
+ ```
155
+
156
+ ## 使用场景
157
+
158
+ ### 场景 1:验证现有 SVG
159
+
160
+ ```bash
161
+ cd ~/.claude/skills/fireworks-tech-graph/scripts
162
+ ./validate-svg.sh /path/to/your-diagram.svg
163
+ ```
164
+
165
+ ### 场景 2:生成并验证图表
166
+
167
+ 1. 使用 Claude Code 生成 SVG 内容
168
+ 2. 运行验证和导出:
169
+ ```bash
170
+ ./generate-diagram.sh -t architecture -s 1 -o ./output/arch.svg
171
+ ```
172
+
173
+ ### 场景 3:批量测试所有风格
174
+
175
+ ```bash
176
+ cd ~/.claude/skills/fireworks-tech-graph/scripts
177
+ ./test-all-styles.sh
178
+ ```
179
+
180
+ 测试脚本会自动:
181
+ 1. 读取 `../fixtures/*.json`
182
+ 2. 按 `template_type + style` 调用 `generate-from-template.py`
183
+ 3. 运行 `validate-svg.sh`
184
+ 4. 导出 PNG 到 `../test-output/`
185
+
186
+ 查看测试输出:
187
+ ```bash
188
+ ls -lh ../test-output/
189
+ ```
190
+
191
+ ## 故障排除
192
+
193
+ ### 问题:rsvg-convert 未找到
194
+
195
+ **解决方案:**
196
+ ```bash
197
+ brew install librsvg
198
+ ```
199
+
200
+ ### 问题:权限被拒绝
201
+
202
+ **解决方案:**
203
+ ```bash
204
+ chmod +x *.sh
205
+ ```
206
+
207
+ ### 问题:SVG 验证失败
208
+
209
+ **解决方案:**
210
+ 1. 查看详细错误信息
211
+ 2. 使用 Edit 工具修复语法错误
212
+ 3. 重新运行验证
213
+
214
+ ## 开发说明
215
+
216
+ ### 添加新的验证规则
217
+
218
+ 编辑 `validate-svg.sh`,在现有检查项后添加新的检查逻辑:
219
+
220
+ ```bash
221
+ # Check N: Your new check
222
+ echo -n "Checking something... "
223
+ # Your validation logic here
224
+ if [ condition ]; then
225
+ echo -e "${GREEN}✓ Pass${NC}"
226
+ else
227
+ echo -e "${RED}✗ Fail${NC}"
228
+ fi
229
+ ```
230
+
231
+ ### 扩展支持的图表类型
232
+
233
+ 编辑 `generate-diagram.sh`,在 `--type` 参数处理中添加新类型。
234
+
235
+ ## 版本历史
236
+
237
+ - **v1.0.0** (2026-04-11) - 初始版本
238
+ - SVG 验证脚本
239
+ - 图表生成脚本
240
+ - 批量测试脚本
241
+
242
+ ## 许可证
243
+
244
+ MIT License - 与 fireworks-tech-graph skill 相同