@atezer/figma-mcp-bridge 1.7.23 → 1.7.25

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 (119) hide show
  1. package/.claude-plugin/plugin.json +37 -0
  2. package/.cursor-plugin/plugin.json +21 -0
  3. package/CHANGELOG.md +30 -0
  4. package/README.md +4 -3
  5. package/agents/ds-auditor.md +29 -0
  6. package/agents/screen-builder.md +29 -0
  7. package/agents/token-syncer.md +26 -0
  8. package/assets/logo.png +0 -0
  9. package/commands/add-library.md +122 -0
  10. package/commands/ds-add.md +255 -0
  11. package/commands/ds-sync.md +314 -0
  12. package/commands/implement.md +43 -0
  13. package/commands/install-library.md +73 -0
  14. package/commands/setup.md +26 -0
  15. package/commands/test.md +39 -0
  16. package/commands/update.md +25 -0
  17. package/dist/core/config.d.ts +1 -5
  18. package/dist/core/config.d.ts.map +1 -1
  19. package/dist/core/config.js +11 -111
  20. package/dist/core/config.js.map +1 -1
  21. package/dist/core/plugin-bridge-server.d.ts.map +1 -1
  22. package/dist/core/plugin-bridge-server.js +1 -2
  23. package/dist/core/plugin-bridge-server.js.map +1 -1
  24. package/dist/core/response-guard.d.ts +1 -1
  25. package/dist/core/response-guard.js +1 -1
  26. package/dist/core/types/index.d.ts +2 -98
  27. package/dist/core/types/index.d.ts.map +1 -1
  28. package/dist/core/version.d.ts +1 -1
  29. package/dist/core/version.js +1 -1
  30. package/dist/local-plugin-only.d.ts.map +1 -1
  31. package/dist/local-plugin-only.js +14 -13
  32. package/dist/local-plugin-only.js.map +1 -1
  33. package/f-mcp-plugin/README.md +8 -15
  34. package/f-mcp-plugin/manifest.json +1 -3
  35. package/hooks/hooks.json +26 -0
  36. package/package.json +15 -31
  37. package/skills/BRAND_PROFILE_SCHEMA.md +113 -0
  38. package/skills/SKILL_INDEX.md +194 -0
  39. package/skills/TOOL_MAPPING.md +111 -0
  40. package/skills/ai-handoff-export/SKILL.md +254 -0
  41. package/skills/apply-figma-design-system/SKILL.md +104 -0
  42. package/skills/audit-figma-design-system/SKILL.md +278 -0
  43. package/skills/code-design-mapper/SKILL.md +370 -0
  44. package/skills/component-documentation/SKILL.md +190 -0
  45. package/skills/design-drift-detector/SKILL.md +407 -0
  46. package/skills/design-system-rules/SKILL.md +407 -0
  47. package/skills/design-token-pipeline/SKILL.md +619 -0
  48. package/skills/ds-impact-analysis/SKILL.md +266 -0
  49. package/skills/figjam-diagram-builder/SKILL.md +172 -0
  50. package/skills/figma-a11y-audit/SKILL.md +587 -0
  51. package/skills/figma-canvas-ops/SKILL.md +325 -0
  52. package/skills/figma-screen-analyzer/SKILL.md +235 -0
  53. package/skills/fix-figma-design-system-finding/SKILL.md +117 -0
  54. package/skills/fmcp-project-rules/SKILL.md +93 -0
  55. package/skills/generate-figma-library/SKILL.md +598 -0
  56. package/skills/generate-figma-screen/SKILL.md +689 -0
  57. package/skills/implement-design/SKILL.md +473 -0
  58. package/skills/ux-copy-guidance/SKILL.md +373 -0
  59. package/skills/visual-qa-compare/SKILL.md +166 -0
  60. package/dist/browser/base.d.ts +0 -50
  61. package/dist/browser/base.d.ts.map +0 -1
  62. package/dist/browser/base.js +0 -6
  63. package/dist/browser/base.js.map +0 -1
  64. package/dist/browser/local.d.ts +0 -81
  65. package/dist/browser/local.d.ts.map +0 -1
  66. package/dist/browser/local.js +0 -283
  67. package/dist/browser/local.js.map +0 -1
  68. package/dist/core/console-monitor.d.ts +0 -82
  69. package/dist/core/console-monitor.d.ts.map +0 -1
  70. package/dist/core/console-monitor.js +0 -428
  71. package/dist/core/console-monitor.js.map +0 -1
  72. package/dist/core/design-system-manifest.d.ts +0 -272
  73. package/dist/core/design-system-manifest.d.ts.map +0 -1
  74. package/dist/core/design-system-manifest.js +0 -261
  75. package/dist/core/design-system-manifest.js.map +0 -1
  76. package/dist/core/enrichment/enrichment-service.d.ts +0 -52
  77. package/dist/core/enrichment/enrichment-service.d.ts.map +0 -1
  78. package/dist/core/enrichment/enrichment-service.js +0 -272
  79. package/dist/core/enrichment/enrichment-service.js.map +0 -1
  80. package/dist/core/enrichment/index.d.ts +0 -8
  81. package/dist/core/enrichment/index.d.ts.map +0 -1
  82. package/dist/core/enrichment/index.js +0 -8
  83. package/dist/core/enrichment/index.js.map +0 -1
  84. package/dist/core/enrichment/relationship-mapper.d.ts +0 -106
  85. package/dist/core/enrichment/relationship-mapper.d.ts.map +0 -1
  86. package/dist/core/enrichment/relationship-mapper.js +0 -352
  87. package/dist/core/enrichment/relationship-mapper.js.map +0 -1
  88. package/dist/core/enrichment/style-resolver.d.ts +0 -80
  89. package/dist/core/enrichment/style-resolver.d.ts.map +0 -1
  90. package/dist/core/enrichment/style-resolver.js +0 -327
  91. package/dist/core/enrichment/style-resolver.js.map +0 -1
  92. package/dist/core/figma-api.d.ts +0 -137
  93. package/dist/core/figma-api.d.ts.map +0 -1
  94. package/dist/core/figma-api.js +0 -274
  95. package/dist/core/figma-api.js.map +0 -1
  96. package/dist/core/figma-desktop-connector.d.ts +0 -242
  97. package/dist/core/figma-desktop-connector.d.ts.map +0 -1
  98. package/dist/core/figma-desktop-connector.js +0 -1042
  99. package/dist/core/figma-desktop-connector.js.map +0 -1
  100. package/dist/core/figma-reconstruction-spec.d.ts +0 -162
  101. package/dist/core/figma-reconstruction-spec.d.ts.map +0 -1
  102. package/dist/core/figma-reconstruction-spec.js +0 -387
  103. package/dist/core/figma-reconstruction-spec.js.map +0 -1
  104. package/dist/core/figma-tools.d.ts +0 -21
  105. package/dist/core/figma-tools.d.ts.map +0 -1
  106. package/dist/core/figma-tools.js +0 -2920
  107. package/dist/core/figma-tools.js.map +0 -1
  108. package/dist/core/snippet-injector.d.ts +0 -24
  109. package/dist/core/snippet-injector.d.ts.map +0 -1
  110. package/dist/core/snippet-injector.js +0 -97
  111. package/dist/core/snippet-injector.js.map +0 -1
  112. package/dist/core/types/enriched.d.ts +0 -213
  113. package/dist/core/types/enriched.d.ts.map +0 -1
  114. package/dist/core/types/enriched.js +0 -6
  115. package/dist/core/types/enriched.js.map +0 -1
  116. package/dist/local.d.ts +0 -73
  117. package/dist/local.d.ts.map +0 -1
  118. package/dist/local.js +0 -2605
  119. package/dist/local.js.map +0 -1
@@ -0,0 +1,266 @@
1
+ ---
2
+ name: ds-impact-analysis
3
+ description: Bir DS token'ı veya bileşeni değiştirildiğinde hangi ekranlar ve dosyalar etkileneceğini analiz eder. Etki yarıçapı, bağımlılık grafiği ve risk skoru üretir. "etki analizi", "impact analysis", "bu token'ı değiştirirsem ne olur", "bileşen bağımlılık", "DS change impact", "değişiklik etkisi" ifadeleriyle tetiklenir. F-MCP Bridge plugin bağlantısı gerektirir.
4
+ metadata:
5
+ mcp-server: user-figma-mcp-bridge
6
+ personas:
7
+ - designops
8
+ - po
9
+ ---
10
+
11
+ # DS Impact Analysis — Tasarım Sistemi Etki Analizi
12
+
13
+ > **Design Token Kuralı:** Bu skill'deki kod örneklerinde geçen font adları, renk kodları, piksel boyutları yalnızca FORMAT gösterimidir. Çalışma anında tüm design token değerleri (font, renk, boyut, spacing, radius, gölge) kayıtlı kütüphaneden (`figma_get_variables`, `figma_get_styles`) veya kullanıcıdan okunmalıdır. Hardcoded token değeri kullanma. Detay: `project-context.md` → "Design Token Kuralı".
14
+
15
+ ## Overview
16
+
17
+ Bu skill, bir design system token'ı veya bileşeni değiştirildiğinde etkilenecek tüm ekranları, bileşenleri ve dosyaları analiz eder. DesignOps ekiplerinin değişiklik kararlarını bilinçli vermesini sağlar.
18
+
19
+ **Salt okunur** — Figma tuvalinde değişiklik yapmaz.
20
+
21
+ ## Prerequisites
22
+
23
+ - F-MCP Bridge plugin bağlı olmalı
24
+ - Değiştirilmek istenen token/bileşen bilgisi (isim veya ID)
25
+
26
+ ## F-MCP skill koordinasyonu
27
+
28
+ - **Önce (isteğe bağlı):** `audit-figma-design-system` ile mevcut DS durumunu anla
29
+ - **Sonra:** Etki analizi onaylandıktan sonra:
30
+ - Token değişikliği → `design-token-pipeline` (reverse flow ile güncelle)
31
+ - Bileşen değişikliği → `apply-figma-design-system` veya `fix-figma-design-system-finding`
32
+ - Kod güncellemesi → `implement-design` + `design-drift-detector`
33
+
34
+ ## Required Workflow
35
+
36
+ ### Step 1: Plugin Bağlantısını Doğrula
37
+
38
+ ```
39
+ figma_get_status()
40
+ ```
41
+
42
+ ### Step 2: Değişiklik Kapsamını Belirle
43
+
44
+ Kullanıcıdan değişikliği öğren:
45
+
46
+ **Token değişikliği:**
47
+ - Hangi token/variable? (ör. `color/primary/500`, `spacing/md`)
48
+ - Yeni değer ne? (ör. `#2563EB` → `#3B82F6`)
49
+ - Hangi mode'lar etkileniyor? (ör. Light, Dark, her ikisi)
50
+
51
+ **Bileşen değişikliği:**
52
+ - Hangi bileşen? (ör. Button, Card, NavBar)
53
+ - Ne değişiyor? (ör. variant ekleme/kaldırma, property değişikliği, boyut)
54
+
55
+ ### Step 3: Token Bağımlılık Ağacı
56
+
57
+ Token değişikliği için:
58
+
59
+ ```
60
+ figma_get_variables(verbosity="full")
61
+ ```
62
+
63
+ `figma_execute` ile bağımlılık taraması:
64
+
65
+ ```js
66
+ const targetVarName = "<TOKEN_NAME>";
67
+
68
+ const collections = await figma.variables.getLocalVariableCollectionsAsync();
69
+ const allVariables = [];
70
+ for (const col of collections) {
71
+ for (const varId of col.variableIds) {
72
+ const v = await figma.variables.getVariableByIdAsync(varId);
73
+ allVariables.push(v);
74
+ }
75
+ }
76
+
77
+ const targetVar = allVariables.find(v => v.name === targetVarName);
78
+ if (!targetVar) return { error: "Variable bulunamadı: " + targetVarName };
79
+
80
+ // Alias zincirleri: transitif bağımlılık taraması (A → B → C zinciri)
81
+ function findDependents(varId, visited = new Set()) {
82
+ if (visited.has(varId)) return []; // döngü koruması
83
+ visited.add(varId);
84
+ const direct = allVariables.filter(v =>
85
+ Object.values(v.valuesByMode).some(val =>
86
+ val && val.type === "VARIABLE_ALIAS" && val.id === varId
87
+ )
88
+ );
89
+ const transitive = [];
90
+ for (const d of direct) {
91
+ transitive.push(...findDependents(d.id, visited));
92
+ }
93
+ return [...direct, ...transitive];
94
+ }
95
+
96
+ const allDependents = findDependents(targetVar.id);
97
+ const uniqueDeps = [...new Map(allDependents.map(d => [d.id, d])).values()];
98
+
99
+ return {
100
+ target: { id: targetVar.id, name: targetVar.name, type: targetVar.resolvedType },
101
+ directDependents: uniqueDeps.map(d => ({
102
+ id: d.id, name: d.name, type: d.resolvedType
103
+ })),
104
+ dependentCount: uniqueDeps.length
105
+ };
106
+ ```
107
+
108
+ ### Step 4: Ekran Etki Taraması
109
+
110
+ ```js
111
+ const targetVarId = "<VARIABLE_ID>";
112
+ const affectedNodes = [];
113
+
114
+ const pages = figma.root.children;
115
+ for (const page of pages.slice(0, 20)) {
116
+ await figma.setCurrentPageAsync(page);
117
+
118
+ const nodes = page.findAll(n => {
119
+ if (!n.boundVariables) return false;
120
+ return Object.values(n.boundVariables).some(binding => {
121
+ if (Array.isArray(binding)) {
122
+ return binding.some(b => b.id === targetVarId);
123
+ }
124
+ return binding && binding.id === targetVarId;
125
+ });
126
+ });
127
+
128
+ nodes.forEach(n => {
129
+ affectedNodes.push({
130
+ pageId: page.id,
131
+ pageName: page.name,
132
+ nodeId: n.id,
133
+ nodeName: n.name,
134
+ nodeType: n.type,
135
+ boundProperties: Object.keys(n.boundVariables).filter(k => {
136
+ const b = n.boundVariables[k];
137
+ if (Array.isArray(b)) return b.some(x => x.id === targetVarId);
138
+ return b && b.id === targetVarId;
139
+ })
140
+ });
141
+ });
142
+ }
143
+
144
+ return { affectedNodes, totalAffected: affectedNodes.length };
145
+ ```
146
+
147
+ ### Step 5: Bileşen Etki Taraması (bileşen değişikliği için)
148
+
149
+ ```
150
+ figma_search_components(query="<COMPONENT_NAME>", currentPageOnly=false)
151
+ ```
152
+
153
+ ```js
154
+ const targetComponentKey = "<COMPONENT_KEY>";
155
+ const instances = [];
156
+
157
+ const pages = figma.root.children;
158
+ for (const page of pages.slice(0, 20)) {
159
+ await figma.setCurrentPageAsync(page);
160
+
161
+ const pageInstances = page.findAll(n => {
162
+ if (n.type !== "INSTANCE") return false;
163
+ const mc = n.mainComponent;
164
+ return mc && (mc.key === targetComponentKey ||
165
+ (mc.parent?.type === "COMPONENT_SET" && mc.parent.key === targetComponentKey));
166
+ });
167
+
168
+ pageInstances.forEach(n => {
169
+ instances.push({
170
+ pageId: page.id,
171
+ pageName: page.name,
172
+ nodeId: n.id,
173
+ nodeName: n.name,
174
+ variantName: n.mainComponent?.name
175
+ });
176
+ });
177
+ }
178
+
179
+ return { instances, totalInstances: instances.length };
180
+ ```
181
+
182
+ ### Step 6: Kod Tarafı Etki Analizi
183
+
184
+ Kod tabanında etkilenen dosyaları ara:
185
+
186
+ 1. Token dosyalarında referans arama (CSS var, Swift Color, Android color resource)
187
+ 2. Bileşen dosyalarında import/kullanım arama
188
+ 3. `.figma-mappings.json` varsa eşleme tablosundan referansları çek
189
+
190
+ ### Step 7: Risk Skoru Hesapla
191
+
192
+ | Faktör | Ağırlık | Puan |
193
+ |---|---|---|
194
+ | Etkilenen ekran sayısı | x3 | 0-10 |
195
+ | Etkilenen bileşen instance sayısı | x2 | 0-10 |
196
+ | Alias zinciri derinliği | x2 | 0-5 |
197
+ | Kod tarafı dosya sayısı | x1 | 0-10 |
198
+ | Platform sayısı (iOS+Android+Web) | x1 | 1-3 |
199
+
200
+ **Risk seviyeleri:**
201
+ - **Düşük (0-15):** Dar kapsamlı değişiklik, güvenle uygulanabilir
202
+ - **Orta (16-35):** Dikkatli uygulama, test gerekli
203
+ - **Yüksek (36-50):** Geniş etki, staged rollout önerilir
204
+ - **Kritik (51+):** Çok geniş etki, ekip toplantısı ve planlama gerekli
205
+
206
+ ### Step 8: Etki Raporu Üret
207
+
208
+ Toplanan verilerden aşağıdaki formatta yapılandırılmış etki raporu oluştur.
209
+
210
+ ## Çıktı Formatı
211
+
212
+ ```markdown
213
+ # DS Etki Analizi — [Token/Bileşen Adı]
214
+
215
+ ## Değişiklik Özeti
216
+ - **Hedef:** `color/primary/500`
217
+ - **Mevcut değer:** #2563EB (Light), #60A5FA (Dark)
218
+ - **Yeni değer:** #3B82F6 (Light), #93C5FD (Dark)
219
+ - **Risk Skoru:** 28/50 (Orta)
220
+
221
+ ## Etki Yarıçapı
222
+
223
+ ### Figma Tarafı
224
+ - **Doğrudan bağlı node:** 47 adet (5 sayfada)
225
+ - **Alias zincirleri:** 3 semantic variable bu primitive'e bağlı
226
+ - `color/primary` → `color/button/primary-bg` → 12 instance
227
+ - `color/primary` → `color/link/default` → 8 instance
228
+ - `color/primary` → `color/focus/ring` → 5 instance
229
+ - **Toplam etkilenen node:** 72
230
+
231
+ ### Kod Tarafı
232
+ - **iOS:** 4 dosya (Colors.swift, ButtonComponent.swift, LinkText.swift, FocusRing.swift)
233
+ - **Android:** 3 dosya (colors.xml, ButtonComponent.kt, LinkText.kt)
234
+ - **Web:** 5 dosya (tokens.css, Button.tsx, Link.tsx, FocusRing.tsx, tailwind.config.js)
235
+
236
+ ## Bağımlılık Grafiği
237
+
238
+ color/primary/500
239
+ ├── color/button/primary-bg (12 instance)
240
+ │ ├── Login Screen → 2 Button
241
+ │ ├── Dashboard → 4 Button
242
+ │ └── Settings → 1 Button
243
+ ├── color/link/default (8 instance)
244
+ │ ├── Home → 3 Link
245
+ │ └── Help → 2 Link
246
+ └── color/focus/ring (5 instance)
247
+ └── Tüm form ekranları → Input focus
248
+
249
+ ## Önerilen Aksiyon Planı
250
+
251
+ 1. **Faz 1:** Token değerini Figma'da güncelle (`design-token-pipeline --direction=code-to-figma`)
252
+ 2. **Faz 2:** Kod token dosyalarını güncelle (`design-token-pipeline`)
253
+ 3. **Faz 3:** Her platformda regression testi (`visual-qa-compare`)
254
+ 4. **Faz 4:** Parity doğrulama (`design-drift-detector`)
255
+
256
+ ## Tahmini İş Yükü
257
+ - Figma güncelleme: ~15 dk (otomatik, variable binding sayesinde)
258
+ - Kod güncelleme: ~1 saat (12 dosya, 3 platform)
259
+ - QA/Test: ~2 saat
260
+ ```
261
+
262
+ ## Evolution Triggers
263
+
264
+ - Bridge'e bağımlılık grafiği aracı eklenirse (ör. dependency graph aracı) Step 3-5 basitleştirilebilir
265
+ - Çoklu dosya desteği eklenirse cross-file etki analizi genişletilebilir
266
+ - Sprint planlama entegrasyonu için Jira/Linear ticket oluşturma eklenebilir
@@ -0,0 +1,172 @@
1
+ ---
2
+ name: figjam-diagram-builder
3
+ description: F-MCP Bridge ile FigJam üzerinde güvenli ve ölçekli diyagram/süreç şeması üretir. 1MB tool-result taşmalarını önlemek için kısa dönüş, adımlı üretim ve deterministik koordinat stratejisi uygular. "figjam çiz", "swimlane oluştur", "figjam diyagram", "process map", "flowchart figjam", "akış şeması çiz", "süreç haritası" ifadeleriyle tetiklenir.
4
+ metadata:
5
+ mcp-server: user-figma-mcp-bridge
6
+ personas:
7
+ - designer
8
+ - designops
9
+ - po
10
+ ---
11
+
12
+ # FigJam Diagram Builder (FMCP Safe Mode)
13
+
14
+ ## Overview
15
+
16
+ Bu skill, FMCP ile FigJam üzerinde programatik diyagram üretirken iki kritik problemi çözer:
17
+
18
+ 1. Tool result boyutunun büyüyerek oturumu kırması
19
+ 2. Çok adımlı üretimde context şişmesi ve kararsız yerleşim
20
+
21
+ Skill, her adıma kısa ve güvenli dönüş zorunluluğu getirir; node/connector pozisyonlarını saklamak yerine yeniden hesaplar.
22
+
23
+ ## Prerequisites
24
+
25
+ - F-MCP Bridge plugin açık ve bağlı olmalı
26
+ - Hedef FigJam dosyası Figma Desktop'ta açık olmalı
27
+ - Kullanıcıdan şema tipi alınmalı (swimlane, flowchart, karar ağacı vb.)
28
+
29
+ ## F-MCP skill koordinasyonu
30
+
31
+ - Süreç/diyagram odaklıdır; token veya kod üretim döngüsüyle zorunlu sıra yoktur. Ürün ekranı ve implementasyon için **implement-design** veya **ai-handoff-export** ayrı akıştır; tuval DS düzeltmesi için **apply-figma-design-system** / **audit-figma-design-system**.
32
+
33
+ ## Required Workflow
34
+
35
+ ### Step 1: Plugin Bağlantısını Doğrula
36
+
37
+ ```txt
38
+ figma_get_status()
39
+ figma_list_connected_files()
40
+ ```
41
+
42
+ - `pluginConnected=false` ise kullanıcıdan plugin'i ilgili FigJam dosyasında yeniden çalıştırmasını iste.
43
+ - Port uyuşmazlığında plugin portunu `bridgePort` ile eşleştir.
44
+
45
+ ### Step 2: Güvenli execute kuralları
46
+
47
+ `figma_execute` dönüşü her zaman kısa olmalı:
48
+
49
+ - Kısa durum string'i: `"OK: 12 node, 14 connector"`
50
+ - Kısa hata string'i: `"HATA: ..."` (maksimum ~200 karakter)
51
+ - Küçük JSON: `{"count": 12, "x": 3500, "y": 100}`
52
+
53
+ Asla büyük node listesi, `currentPage.children`, büyük JSON veya pluginData dump döndürme.
54
+
55
+ **Timeout:** Varsayılan 5000ms. Çok node oluşturma işlemlerinde `timeout` parametresini artır (maks 30000ms). Bkz. "Common Issues" bölümü.
56
+
57
+ ### FigJam Font Kuralı
58
+
59
+ `createShapeWithText()` varsayılan fontu **"Inter Medium"**'dir. Shape text düzenlemeden ÖNCE:
60
+
61
+ ```js
62
+ await figma.loadFontAsync({ family: "Inter", style: "Medium" });
63
+ ```
64
+
65
+ "Inter Regular" yüklemek YETMEZ — FigJam shape'leri "Medium" kullanır. Alternatif olarak mevcut fontu dinamik kontrol et:
66
+ ```js
67
+ await figma.loadFontAsync(shape.text.fontName);
68
+ ```
69
+
70
+ ### Step 3: Adımlar arası veri stratejisi
71
+
72
+ Veriyi `setPluginData/getPluginData` ile taşımak yerine her adımda aynı layout sabitlerinden yeniden hesapla.
73
+
74
+ Önerilen sabitler:
75
+
76
+ ```txt
77
+ OX=3500, OY=100, LW=160, CW=300, LH=200, HH=64, NW=240, NH=76
78
+ ```
79
+
80
+ ### Step 4: 3 fazlı üretim (önerilen)
81
+
82
+ 1. Zemin: lane/background/header
83
+ 2. Node'lar: kartlar, metinler, rozetler
84
+ 3. Connector'lar: oklar ve karar bağlantıları
85
+
86
+ Her faz sonunda kısa sonuç döndür.
87
+
88
+ ### Step 5: Viewport ve tarama güvenliği
89
+
90
+ - `figma.currentPage.children` tarama/return yapma
91
+ - Yalnızca o adımda oluşturulan node'ları lokal `created[]` listesinde tut
92
+ - Zoom için sadece `created[]` kullan
93
+
94
+ ### Step 6: Büyük dosyada veri okuma
95
+
96
+ Önce düşük kapsamla başla:
97
+
98
+ ```txt
99
+ figma_get_file_data(depth=1, verbosity="summary")
100
+ figma_get_design_context(depth=1, verbosity="summary", excludeScreenshot=true)
101
+ ```
102
+
103
+ Detay gerekiyorsa parçalı ilerle (node bazlı çek).
104
+
105
+ ## FigJam Swimlane Pattern
106
+
107
+ ### Renk kullanımı
108
+
109
+ - FigJam uyumlu RGB (0-1 aralığı) renkler kullan
110
+ - Lane bazında semantic palet tanımla (ör. müşteri, operasyon, ortak hizmet)
111
+
112
+ ### Connector stili
113
+
114
+ - Varsayılan stroke + arrow cap
115
+ - Opsiyonel dashed pattern ile alternatif akışları ayır
116
+
117
+ ### Karar noktası
118
+
119
+ - `createPolygon(pointCount=4)` + `rotation=45` ile diamond üret
120
+
121
+ ## Context Safety Checklist
122
+
123
+ Her `figma_execute` öncesi kontrol et:
124
+
125
+ - [ ] Dönüş < 500 karakter mi?
126
+ - [ ] `currentPage.children` erişimi var mı? Varsa kaldır
127
+ - [ ] Büyük pluginData yazma/okuma var mı? Varsa kaldır
128
+ - [ ] Pozisyonlar sabitlerden yeniden hesaplanıyor mu?
129
+ - [ ] Zoom sadece lokal `created[]` ile mi yapılıyor?
130
+
131
+ ## Common Issues and Solutions
132
+
133
+ ### Sorun: 1MB tool result hatası
134
+
135
+ Çözüm: Return değerini kısa string/özet JSON'a indir; node listesi döndürme.
136
+
137
+ ### Sorun: Çok adımda yerleşim kayıyor
138
+
139
+ Çözüm: Koordinatları persist etme; her adımda sabitlerden deterministik hesapla.
140
+
141
+ ### Sorun: Bağlantı koptu
142
+
143
+ Çözüm: `figma_get_status()` ile kontrol et, plugin'i ilgili dosyada yeniden başlat, `figma_list_connected_files()` ile doğrula.
144
+
145
+ ### Sorun: Timeout — çok node tek çağrıda
146
+
147
+ FigJam `createShapeWithText()` her biri font yükleme gerektirdiğinden Figma Design node'larından yavaştır.
148
+
149
+ **Güvenli node limitleri (tek `figma_execute` çağrısı, varsayılan 5000ms):**
150
+ - 1-6 shapeWithText: varsayılan timeout yeterli
151
+ - 7-12 node: `timeout: 10000` kullan
152
+ - 13+ node: İşlemi birden fazla çağrıya böl (önerilen)
153
+
154
+ ```
155
+ figma_execute({ code: "...", timeout: 15000 })
156
+ ```
157
+
158
+ Fontu her çağrıda bir kez yükle, ardından tüm node'ları oluştur (her node için ayrı `loadFontAsync` çağırma):
159
+ ```js
160
+ await figma.loadFontAsync({ family: "Inter", style: "Medium" });
161
+ // Tüm node'ları oluştur — font zaten yüklü
162
+ for (let i = 0; i < 8; i++) {
163
+ const s = figma.createShapeWithText();
164
+ s.text.characters = "Node " + i;
165
+ }
166
+ ```
167
+
168
+ ## Evolution Triggers
169
+
170
+ - Bridge'e FigJam-spesifik araçlar eklenirse (ör. connector oluşturma aracı) adımlı üretim stratejisi basitleştirilebilir
171
+ - `figma_execute` boyut/payload limiti değişirse kısa dönüş kuralları uyarlanmalı
172
+ - Yeni diyagram türleri (Gantt, mindmap) talep edilirse koordinat şablonları eklenmeli