33## プロンプト構成原則
44
55### 基本構造
6- ```
6+ ``` text
771. 図表種別の明確化
882. 技術仕様の指定
993. 美的要求の定義
1212```
1313
1414### 必須前置詞
15- ```
15+ ``` text
1616"Create a clean, professional SVG diagram that follows modern technical documentation standards."
1717```
1818
1919## 美的品質指示
2020
2121### デザイン原則
22- ```
22+ ``` text
2323- Minimalist design with generous white space
2424- Consistent geometric proportions using golden ratio (1.618)
2525- Professional typography with clear hierarchy
2828```
2929
3030### 視覚的洗練度
31- ```
31+ ``` text
3232- Use rounded corners (4px radius) for modern appearance
3333- Implement subtle gradients for depth (10〜15% opacity difference)
3434- Apply consistent stroke weights (1px, 2px, 3px hierarchy)
3939## 色彩指示テンプレート
4040
4141### 基本指示
42- ```
42+ ``` text
4343Use this exact color palette:
4444- Primary: #3B82F6 (blue)
4545- Success: #10B981 (green)
@@ -54,7 +54,7 @@ Apply colors semantically, not decoratively.
5454```
5555
5656### グラデーション指示
57- ```
57+ ``` text
5858For depth, use subtle gradients:
5959- Start: base color at 100% opacity
6060- End: base color at 85% opacity
@@ -66,7 +66,7 @@ For depth, use subtle gradients:
6666## レイアウト問題防止策
6767
6868### 要素重複防止
69- ```
69+ ``` text
7070Strict layout requirements:
7171- Calculate exact coordinates for each element
7272- Maintain minimum 16px clearance between all elements
@@ -76,7 +76,7 @@ Strict layout requirements:
7676```
7777
7878### 文字はみ出し防止
79- ```
79+ ``` text
8080Text containment rules:
8181- Text elements must fit within parent container with 8px padding
8282- Use text-anchor="middle" for centered alignment
@@ -87,7 +87,7 @@ Text containment rules:
8787```
8888
8989### 座標計算指示
90- ```
90+ ``` text
9191Use explicit coordinate calculation:
9292- Define grid: 800x600 viewBox with 40px margins
9393- Working area: 720x520 pixels
@@ -99,7 +99,7 @@ Use explicit coordinate calculation:
9999## 厳密配置テンプレート
100100
101101### 水平配置(3要素例)
102- ```
102+ ``` text
103103For 3 elements in 720px width:
104104- Element width: 200px
105105- Spacing: 60px
@@ -109,7 +109,7 @@ For 3 elements in 720px width:
109109```
110110
111111### 垂直配置(4要素例)
112- ```
112+ ``` text
113113For 4 elements in 520px height:
114114- Element height: 80px
115115- Spacing: 40px
@@ -119,7 +119,7 @@ For 4 elements in 520px height:
119119```
120120
121121### テキスト配置計算
122- ```
122+ ``` text
123123For text in rectangular container:
124124- Container: width=120px, height=60px
125125- Text position: x=60 (center), y=35 (vertical center + font-size/2)
@@ -131,7 +131,7 @@ For text in rectangular container:
131131## タイポグラフィ指示
132132
133133### フォント指定
134- ```
134+ ``` text
135135Use system fonts only:
136136font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif
137137
@@ -143,7 +143,7 @@ Size hierarchy:
143143```
144144
145145### テキスト配置
146- ```
146+ ``` text
147147- Use sentence case, not ALL CAPS
148148- Align text to 8px baseline grid
149149- Maintain 1.4 line height
@@ -154,7 +154,7 @@ Size hierarchy:
154154## 図表種別テンプレート
155155
156156### アーキテクチャ図
157- ```
157+ ``` text
158158Create a system architecture diagram with:
159159- Rectangular components with 4px rounded corners
160160- Hierarchical layout showing data flow
@@ -165,7 +165,7 @@ Create a system architecture diagram with:
165165```
166166
167167### フローチャート
168- ```
168+ ``` text
169169Generate a flowchart using:
170170- Start/End: rounded rectangles (rx="20")
171171- Process: rectangles with 4px radius
@@ -176,7 +176,7 @@ Generate a flowchart using:
176176```
177177
178178### シーケンス図
179- ```
179+ ``` text
180180Design a sequence diagram featuring:
181181- Vertical lifelines with 3px dashed strokes
182182- Activation boxes as subtle rectangles
@@ -186,7 +186,7 @@ Design a sequence diagram featuring:
186186```
187187
188188### データフロー図
189- ```
189+ ``` text
190190Create a data flow diagram including:
191191- Circular data stores
192192- Rectangular processes
@@ -198,7 +198,7 @@ Create a data flow diagram including:
198198## 品質強化指示
199199
200200### 詳細度レベル
201- ```
201+ ``` text
202202Level 1 (Concept): Basic shapes, minimal detail
203203Level 2 (Design): Refined shapes, proper spacing
204204Level 3 (Production): Full styling, shadows, gradients
@@ -207,7 +207,7 @@ Default to Level 2 unless specified.
207207```
208208
209209### 洗練度チェック
210- ```
210+ ``` text
211211Ensure the diagram meets these criteria:
212212- Would this appear professional in a technical presentation?
213213- Are visual relationships immediately clear?
@@ -219,7 +219,7 @@ Ensure the diagram meets these criteria:
219219## プロンプト例
220220
221221### 基本テンプレート
222- ```
222+ ``` text
223223Create a clean, professional SVG diagram of [DIAGRAM_TYPE] showing [CONTENT_DESCRIPTION].
224224
225225Requirements:
@@ -240,12 +240,12 @@ Viewport: 800x600 or appropriate aspect ratio
240240## 問題回避プロンプト例
241241
242242### 改良前(問題発生しやすい)
243- ```
243+ ``` text
244244❌ "Create a diagram with boxes and arrows showing the system flow"
245245```
246246
247247### 改良後(問題回避)
248- ```
248+ ``` text
249249✅ "Create an SVG diagram (viewBox="0 0 800 600") with exactly 3 rectangular boxes:
250250
251251Box 1: x=50, y=100, width=180, height=80, containing text 'Frontend'
@@ -265,7 +265,7 @@ Verify no overlapping elements and all content within margins."
265265```
266266
267267### システム図の厳密指示例
268- ```
268+ ``` text
269269Create a microservices architecture SVG (viewBox="0 0 800 600"):
270270
271271Layout calculation:
@@ -304,7 +304,7 @@ Verification checklist:
304304## 検証指示の強化
305305
306306### 必須検証項目
307- ```
307+ ``` text
308308Before outputting SVG, verify:
3093091. Bounding box check: all elements x+width ≤ viewBox width
3103102. Collision detection: no element overlaps another
@@ -315,7 +315,7 @@ Before outputting SVG, verify:
315315```
316316
317317### デバッグ指示
318- ```
318+ ``` text
319319Include calculation comments in SVG:
320320<!-- Element positions calculated:
321321 Box1: 50px + 180px + 20px spacing = 250px
@@ -324,7 +324,7 @@ Include calculation comments in SVG:
324324```
325325
326326### エラー回避チェックリスト
327- ```
327+ ``` text
328328Common issues to prevent:
329329□ Text longer than container width
330330□ Elements positioned outside viewBox
@@ -339,7 +339,7 @@ Common issues to prevent:
339339## 失敗パターンと対策
340340
341341### パターン1: 文字はみ出し
342- ```
342+ ``` text
343343❌ Problem: <text x="50" y="30">Very Long Service Name</text>
344344✅ Solution:
345345 - Calculate: 20 chars × 7px = 140px width needed
@@ -348,19 +348,19 @@ Common issues to prevent:
348348```
349349
350350### パターン2: 要素重複
351- ```
351+ ``` text
352352❌ Problem: Box1(x=100, width=200) + Box2(x=250, width=200) = overlap
353353✅ Solution: Box2.x = Box1.x + Box1.width + spacing = 100 + 200 + 20 = 320
354354```
355355
356356### パターン3: 領域はみ出し
357- ```
357+ ``` text
358358❌ Problem: Element at x=700, width=200 in viewBox width=800
359359✅ Solution: Max x = 800 - 200 - 40(margin) = 560px
360360```
361361
362362### パターン4: 接続線の問題
363- ```
363+ ``` text
364364❌ Problem: Arrow from center to center crosses other elements
365365✅ Solution: Calculate edge-to-edge connection points
366366 - From: (box1.x + box1.width, box1.y + box1.height/2)
@@ -370,7 +370,7 @@ Common issues to prevent:
370370## 避けるべき要素
371371
372372### デザイン面
373- ```
373+ ``` text
374374- 過度な装飾や不要なエフェクト
375375- 3D効果やドロップシャドウの乱用
376376- 原色の多用や彩度の高い色
@@ -379,7 +379,7 @@ Common issues to prevent:
379379```
380380
381381### 技術面
382- ```
382+ ``` text
383383- インライン style属性の使用
384384- 固定サイズの指定
385385- 複雑すぎるパス定義
@@ -390,7 +390,7 @@ Common issues to prevent:
390390## AI特有の注意点
391391
392392### Claude向け
393- ```
393+ ``` text
394394- 具体的な寸法を数値で指定
395395- 色は16進数コードで明示
396396- レイアウトは座標で詳細指定
@@ -399,12 +399,12 @@ Common issues to prevent:
399399```
400400
401401### 一般的AI向け
402- ```
402+ ``` text
403403- "professional" "clean" "modern"等の形容詞を多用
404404- 具体的なピクセル値で指定
405405- フォントはシステムフォントに限定
406406- アニメーションは最小限に抑制
407407- W3C準拠を明示的に要求
408408```
409409
410- このガイドラインにより、AIが生成する図表の品質と一貫性を大幅に向上できます。
410+ このガイドラインにより、AIが生成する図表の品質と一貫性を大幅に向上できます。
0 commit comments