@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.
- package/.claude-plugin/plugin.json +37 -0
- package/.cursor-plugin/plugin.json +21 -0
- package/CHANGELOG.md +30 -0
- package/README.md +4 -3
- package/agents/ds-auditor.md +29 -0
- package/agents/screen-builder.md +29 -0
- package/agents/token-syncer.md +26 -0
- package/assets/logo.png +0 -0
- package/commands/add-library.md +122 -0
- package/commands/ds-add.md +255 -0
- package/commands/ds-sync.md +314 -0
- package/commands/implement.md +43 -0
- package/commands/install-library.md +73 -0
- package/commands/setup.md +26 -0
- package/commands/test.md +39 -0
- package/commands/update.md +25 -0
- package/dist/core/config.d.ts +1 -5
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +11 -111
- package/dist/core/config.js.map +1 -1
- package/dist/core/plugin-bridge-server.d.ts.map +1 -1
- package/dist/core/plugin-bridge-server.js +1 -2
- package/dist/core/plugin-bridge-server.js.map +1 -1
- package/dist/core/response-guard.d.ts +1 -1
- package/dist/core/response-guard.js +1 -1
- package/dist/core/types/index.d.ts +2 -98
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/dist/local-plugin-only.d.ts.map +1 -1
- package/dist/local-plugin-only.js +14 -13
- package/dist/local-plugin-only.js.map +1 -1
- package/f-mcp-plugin/README.md +8 -15
- package/f-mcp-plugin/manifest.json +1 -3
- package/hooks/hooks.json +26 -0
- package/package.json +15 -31
- package/skills/BRAND_PROFILE_SCHEMA.md +113 -0
- package/skills/SKILL_INDEX.md +194 -0
- package/skills/TOOL_MAPPING.md +111 -0
- package/skills/ai-handoff-export/SKILL.md +254 -0
- package/skills/apply-figma-design-system/SKILL.md +104 -0
- package/skills/audit-figma-design-system/SKILL.md +278 -0
- package/skills/code-design-mapper/SKILL.md +370 -0
- package/skills/component-documentation/SKILL.md +190 -0
- package/skills/design-drift-detector/SKILL.md +407 -0
- package/skills/design-system-rules/SKILL.md +407 -0
- package/skills/design-token-pipeline/SKILL.md +619 -0
- package/skills/ds-impact-analysis/SKILL.md +266 -0
- package/skills/figjam-diagram-builder/SKILL.md +172 -0
- package/skills/figma-a11y-audit/SKILL.md +587 -0
- package/skills/figma-canvas-ops/SKILL.md +325 -0
- package/skills/figma-screen-analyzer/SKILL.md +235 -0
- package/skills/fix-figma-design-system-finding/SKILL.md +117 -0
- package/skills/fmcp-project-rules/SKILL.md +93 -0
- package/skills/generate-figma-library/SKILL.md +598 -0
- package/skills/generate-figma-screen/SKILL.md +689 -0
- package/skills/implement-design/SKILL.md +473 -0
- package/skills/ux-copy-guidance/SKILL.md +373 -0
- package/skills/visual-qa-compare/SKILL.md +166 -0
- package/dist/browser/base.d.ts +0 -50
- package/dist/browser/base.d.ts.map +0 -1
- package/dist/browser/base.js +0 -6
- package/dist/browser/base.js.map +0 -1
- package/dist/browser/local.d.ts +0 -81
- package/dist/browser/local.d.ts.map +0 -1
- package/dist/browser/local.js +0 -283
- package/dist/browser/local.js.map +0 -1
- package/dist/core/console-monitor.d.ts +0 -82
- package/dist/core/console-monitor.d.ts.map +0 -1
- package/dist/core/console-monitor.js +0 -428
- package/dist/core/console-monitor.js.map +0 -1
- package/dist/core/design-system-manifest.d.ts +0 -272
- package/dist/core/design-system-manifest.d.ts.map +0 -1
- package/dist/core/design-system-manifest.js +0 -261
- package/dist/core/design-system-manifest.js.map +0 -1
- package/dist/core/enrichment/enrichment-service.d.ts +0 -52
- package/dist/core/enrichment/enrichment-service.d.ts.map +0 -1
- package/dist/core/enrichment/enrichment-service.js +0 -272
- package/dist/core/enrichment/enrichment-service.js.map +0 -1
- package/dist/core/enrichment/index.d.ts +0 -8
- package/dist/core/enrichment/index.d.ts.map +0 -1
- package/dist/core/enrichment/index.js +0 -8
- package/dist/core/enrichment/index.js.map +0 -1
- package/dist/core/enrichment/relationship-mapper.d.ts +0 -106
- package/dist/core/enrichment/relationship-mapper.d.ts.map +0 -1
- package/dist/core/enrichment/relationship-mapper.js +0 -352
- package/dist/core/enrichment/relationship-mapper.js.map +0 -1
- package/dist/core/enrichment/style-resolver.d.ts +0 -80
- package/dist/core/enrichment/style-resolver.d.ts.map +0 -1
- package/dist/core/enrichment/style-resolver.js +0 -327
- package/dist/core/enrichment/style-resolver.js.map +0 -1
- package/dist/core/figma-api.d.ts +0 -137
- package/dist/core/figma-api.d.ts.map +0 -1
- package/dist/core/figma-api.js +0 -274
- package/dist/core/figma-api.js.map +0 -1
- package/dist/core/figma-desktop-connector.d.ts +0 -242
- package/dist/core/figma-desktop-connector.d.ts.map +0 -1
- package/dist/core/figma-desktop-connector.js +0 -1042
- package/dist/core/figma-desktop-connector.js.map +0 -1
- package/dist/core/figma-reconstruction-spec.d.ts +0 -162
- package/dist/core/figma-reconstruction-spec.d.ts.map +0 -1
- package/dist/core/figma-reconstruction-spec.js +0 -387
- package/dist/core/figma-reconstruction-spec.js.map +0 -1
- package/dist/core/figma-tools.d.ts +0 -21
- package/dist/core/figma-tools.d.ts.map +0 -1
- package/dist/core/figma-tools.js +0 -2920
- package/dist/core/figma-tools.js.map +0 -1
- package/dist/core/snippet-injector.d.ts +0 -24
- package/dist/core/snippet-injector.d.ts.map +0 -1
- package/dist/core/snippet-injector.js +0 -97
- package/dist/core/snippet-injector.js.map +0 -1
- package/dist/core/types/enriched.d.ts +0 -213
- package/dist/core/types/enriched.d.ts.map +0 -1
- package/dist/core/types/enriched.js +0 -6
- package/dist/core/types/enriched.js.map +0 -1
- package/dist/local.d.ts +0 -73
- package/dist/local.d.ts.map +0 -1
- package/dist/local.js +0 -2605
- package/dist/local.js.map +0 -1
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-figma-design-system
|
|
3
|
+
description: Figma ekran veya bileşenini design system entegrasyonu açısından okuma-only denetler; eksik kütüphane instance'ları, yerel override'lar ve bağlanmamış token'ları raporlar. "figma ds audit", "design system audit", "kütüphane kullanımı kontrol", "token bağlı mı", "DS sağlık kontrolü", "ne kadar DS uyumlu", "tasarım durumu raporu", "ekran kalitesi" ifadeleriyle tetiklenir. F-MCP Bridge plugin bağlantısı gerektirir.
|
|
4
|
+
metadata:
|
|
5
|
+
mcp-server: user-figma-mcp-bridge
|
|
6
|
+
personas:
|
|
7
|
+
- designer
|
|
8
|
+
- designops
|
|
9
|
+
- po
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Audit Figma Design System (tuval içi)
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
Bu skill **yalnızca okur**; Figma node'unun yayınlanmış design system ile ne kadar entegre olduğunu yapısal kanıta dayanarak denetler. Görsel tatmin değil, **instance / tekrar / ham değer / token bağlama** odaklıdır.
|
|
17
|
+
|
|
18
|
+
Yazma gerekiyorsa aşağıdaki skill’lerden birine yönlendir.
|
|
19
|
+
|
|
20
|
+
## F-MCP araç eşlemesi (resmi Figma MCP isimleri yerine)
|
|
21
|
+
|
|
22
|
+
| Niyet | F-MCP Bridge |
|
|
23
|
+
|--------|----------------|
|
|
24
|
+
| Design context | `figma_get_design_context` |
|
|
25
|
+
| Görsel doğrulama | `figma_capture_screenshot` |
|
|
26
|
+
| Variable / bağlılık | `figma_get_variables` (verbosity=`full`), gerekiyorsa `figma_get_styles` |
|
|
27
|
+
| Yapı / iç içe instance haritası | `figma_get_file_data` (düşük `depth`), hedef node için `figma_get_component` veya `figma_get_design_context`; büyük tahta için `figma_get_file_data` (timeout riski — dikkat). **Not:** Bridge’te ayrı bir “yalnızca metadata” MCP aracı yok; yapı bu üç araçla alınır. |
|
|
28
|
+
| Kod/dev spec ipucu | `figma_get_design_context` (`includeCodeReady=true`); uygunsa `figma_get_component_for_development` |
|
|
29
|
+
| Kütüphanede aday bileşen | `figma_search_components`, özet için `figma_get_design_system_summary` |
|
|
30
|
+
|
|
31
|
+
## F-MCP skill koordinasyonu
|
|
32
|
+
|
|
33
|
+
| Bulgu sonrası | Ne zaman |
|
|
34
|
+
|---------------|----------|
|
|
35
|
+
| **fix-figma-design-system-finding** | Tek net bulgu, tek node veya dar küme |
|
|
36
|
+
| **apply-figma-design-system** | Çoklu bulgu, ekran geneli veya bölüm bölüm reconcile |
|
|
37
|
+
| **design-token-pipeline** | Rapor “token export / kod tarafı senkron” gerektiriyorsa |
|
|
38
|
+
| **design-drift-detector** | Aynı ekranın **kod** ile parity’si de soruluyorsa (Figma audit’ten sonra) |
|
|
39
|
+
| **code-design-mapper** | Eşleştirilecek bileşen aileleri netleştikten sonra mapping güncellemesi |
|
|
40
|
+
| **figma-screen-analyzer** | PO/PM/SEM'e yönelik teknik olmayan ekran analizi ve DS uyum raporu |
|
|
41
|
+
| **ds-impact-analysis** | Bir token/bileşen değişikliğinin etki yarıçapını ölçmek istiyorsan |
|
|
42
|
+
| **ai-handoff-export** / **implement-design** | Audit “Pass” veya düzeltme sonrası koda geçiş |
|
|
43
|
+
|
|
44
|
+
### Önerilen uçtan uca akış (özet)
|
|
45
|
+
|
|
46
|
+
1. **audit-figma-design-system** (tuval DS uyumu)
|
|
47
|
+
2. **fix-figma-design-system-finding** (tek bulgu) *veya* **apply-figma-design-system** (çok bölüm)
|
|
48
|
+
3. **design-token-pipeline** (kod token dosyaları)
|
|
49
|
+
4. İsteğe bağlı **code-design-mapper**
|
|
50
|
+
5. **ai-handoff-export** → **implement-design**
|
|
51
|
+
6. **design-drift-detector** (kod–Figma parity)
|
|
52
|
+
7. Gerekirse **design-system-rules** ile repo kurallarını güncelle
|
|
53
|
+
|
|
54
|
+
**FigJam** ve bu zincir zorunlu sıralı değildir.
|
|
55
|
+
|
|
56
|
+
### Zincir performansı (tek oturum)
|
|
57
|
+
|
|
58
|
+
- Aynı zincirde **tekrarlı** `figma_get_variables(verbosity="full")` ve `figma_get_design_context` çağrılarını azalt: önceki adımın çıktısı hâlâ geçerliyse yeniden çağırma; mümkünse `verbosity="summary"` ile başla, orta detay için `"standard"`, tam detay için `"full"` kullan.
|
|
59
|
+
- `figma_search_components`: varsayılan **`currentPageOnly=true`**; `false` yalnızca gerektiğinde (büyük dosyada timeout riski).
|
|
60
|
+
|
|
61
|
+
## Çıktı Formatı
|
|
62
|
+
|
|
63
|
+
- Kullanıcı `--json` veya JSON isterse: şema altındaki JSON’u **markdown fence’siz**, ek metin yok.
|
|
64
|
+
- Sohbet ortamı veya `--markdown`: insan okunur markdown rapor.
|
|
65
|
+
- **Ortam bazlı otomatik tespit:** CI ortamı algılandığında (`CI=true`, `GITHUB_ACTIONS`, `GITLAB_CI` vb. ortam değişkenleri) varsayılan format **JSON** olarak ayarlanır. Etkileşimli sohbet ortamında varsayılan **markdown**’dır. Kullanıcı her iki durumda da `--json` veya `--markdown` flag’i ile tercihi geçersiz kılabilir.
|
|
66
|
+
- Belirsizse: markdown varsayılan.
|
|
67
|
+
|
|
68
|
+
## Required Workflow
|
|
69
|
+
|
|
70
|
+
1. **Girdi:** Figma URL veya `fileKey` + `nodeId`. `node-id=72-293` → `72:293` normalize et.
|
|
71
|
+
2. **Bağlantı:** `figma_get_status()`.
|
|
72
|
+
3. **Kanıt:** Hedef node için `figma_get_design_context`; `figma_capture_screenshot`; `figma_get_variables`. Büyük/hacimli yapıda `figma_get_file_data` (düşük `depth`) veya aynı node üzerinden `figma_get_component` / `figma_get_design_context`. Özel primitive için `figma_search_components`.
|
|
73
|
+
|
|
74
|
+
> **DERİN ANALİZ KURALI:** Sadece frame/node isimlerine bakarak sonuç çıkarma. Her node'un içindeki text content (`characters`), instance prop'ları ve child yapılarını detaylı oku. Bir şeyin "eksik" veya "yok" olduğunu iddia etmeden önce tüm child node'ların içeriğini kontrol et.
|
|
75
|
+
|
|
76
|
+
> **GÖRSEL DOĞRULAMA KURALI:** Analiz sonucunu raporlamadan önce `figma_capture_screenshot` ile ekran görüntüsü al ve görsel olarak kontrol et. Text content ile screenshot'ın tutarlı olduğunu teyit et. Çelişki varsa screenshot'ı esas al.
|
|
77
|
+
4. **İnceleme:** Yerel frame ile yeniden icat edilmiş primitive, tekrarlayan kardeş yapılar, tokenize eşlerin yanında ham hex/spacing/typography, navigasyon gibi yüksek etkili custom yapılar, variant sapması.
|
|
78
|
+
5. **Öneri:** Yalnızca `figma_search_components` ile **inandırıcı** aday bulunduğunda değiştirme öner; zayıf eşleşmede aday yazma.
|
|
79
|
+
6. **Çıktı:** Seçilen formatta rapor; ardından yukarıdaki koordinasyon tablosuna göre sonraki skill’i öner.
|
|
80
|
+
|
|
81
|
+
## Nielsen 10 Sezgisel Değerlendirme (İsteğe Bağlı)
|
|
82
|
+
|
|
83
|
+
`--heuristic` flag'i ile aktif edilir. DS denetiminin yanı sıra Jakob Nielsen'in 10 kullanılabilirlik sezgisel ilkesini DS bağlamında değerlendirir:
|
|
84
|
+
|
|
85
|
+
| # | İlke | DS Bağlamında Değerlendirme |
|
|
86
|
+
|---|------|-----------------------------|
|
|
87
|
+
| 1 | Sistem durumu görünürlüğü | Loading/progress state bileşenleri mevcut mu? |
|
|
88
|
+
| 2 | Sistem-gerçek dünya uyumu | Token isimlendirme kullanıcı diline uygun mu? (ör. `danger` vs `color-red-500`) |
|
|
89
|
+
| 3 | Kullanıcı kontrolü ve özgürlüğü | Undo/geri alma/iptal bileşenleri var mı? (dismiss, close, cancel) |
|
|
90
|
+
| 4 | Tutarlılık ve standartlar | DS bileşenleri platform konvansiyonlarına uyuyor mu? |
|
|
91
|
+
| 5 | Hata önleme | Validation, disabled state, form kısıtlama bileşenleri mevcut mu? |
|
|
92
|
+
| 6 | Tanıma > hatırlama | Bileşen isimleri açıklayıcı mı? Description'lar yeterli mi? |
|
|
93
|
+
| 7 | Kullanım esnekliği | Variant çeşitliliği farklı kullanım senaryolarını kapsıyor mu? |
|
|
94
|
+
| 8 | Estetik ve minimalist tasarım | Token sayısı gereksiz yere şişkin mi? Kullanılmayan variant var mı? |
|
|
95
|
+
| 9 | Hata tanıma ve kurtarma | Error state, empty state, fallback bileşenleri var mı? |
|
|
96
|
+
| 10 | Yardım ve dokümantasyon | Bileşen description'ları, kullanım notları yeterli mi? |
|
|
97
|
+
|
|
98
|
+
**Çıktı:** Rapora `heuristicEvaluation` bölümü eklenir (JSON veya markdown formatına göre). Her ilke için `pass` / `partial` / `fail` + açıklama.
|
|
99
|
+
|
|
100
|
+
## DS Eksiksizlik Çerçevesi
|
|
101
|
+
|
|
102
|
+
Audit sırasında yalnızca instance/token sayısı değil, DS'nin **yapısal eksiksizliği** de değerlendirilir.
|
|
103
|
+
|
|
104
|
+
### Token Kategorileri Kontrolü
|
|
105
|
+
|
|
106
|
+
Sağlıklı bir DS'de aşağıdaki token kategorilerinin tamamı bulunmalıdır:
|
|
107
|
+
|
|
108
|
+
| Kategori | Alt Kategoriler | Min Beklenen |
|
|
109
|
+
|----------|----------------|-------------|
|
|
110
|
+
| **Renkler** | Brand (primary, secondary, accent), Semantic (success, warning, error, info), Neutral (gray scale) | 15+ token |
|
|
111
|
+
| **Tipografi** | Scale (6+ kademe), Weights (regular, medium, semi-bold, bold), Line-heights | 10+ token |
|
|
112
|
+
| **Spacing** | Scale (4/8/12/16/24/32/48/64 vb.) | 6+ token |
|
|
113
|
+
| **Border** | Radius kademeleri (sm, md, lg, full), Genişlik (1, 2) | 4+ token |
|
|
114
|
+
| **Shadow** | Elevation seviyeleri (sm, md, lg, xl) | 3+ token |
|
|
115
|
+
| **Motion** | Duration (fast: 150ms, normal: 250ms, slow: 400ms), Easing (ease-in-out, spring) | 4+ token |
|
|
116
|
+
|
|
117
|
+
> **Sık eksik:** Motion token'ları — çoğu DS'de duration ve easing tanımlı değil. Audit raporunda bu eksiklik ayrıca belirtilmeli.
|
|
118
|
+
|
|
119
|
+
### Bileşen Eksiksizlik Kontrolü
|
|
120
|
+
|
|
121
|
+
Bir bileşenin "eksiksiz" sayılması için:
|
|
122
|
+
|
|
123
|
+
| Kriter | Açıklama | Kontrol Yöntemi |
|
|
124
|
+
|--------|----------|-----------------|
|
|
125
|
+
| **Variant'lar** | Primary, secondary, ghost/outline, destructive vb. | Component set'te variant prop sayısı |
|
|
126
|
+
| **Durumlar** | Default, hover, active, disabled, loading, error, focus | En az 4 durum olmalı |
|
|
127
|
+
| **Boyutlar** | sm, md, lg (en az 2) | Size prop veya ayrı variant |
|
|
128
|
+
| **Davranış spec'i** | Transition, animasyon, etkileşim notları | Description veya code-only props |
|
|
129
|
+
| **A11y spec'i** | Min touch target, fokus göstergesi, label | Description veya annotation |
|
|
130
|
+
|
|
131
|
+
> **Mevcut audit'ten farkı:** Mevcut audit instance/token sayar; bu çerçeve bileşenin **iç kalitesini** değerlendirir.
|
|
132
|
+
|
|
133
|
+
### Pattern Katmanı Kontrolü
|
|
134
|
+
|
|
135
|
+
Bileşen üstü pattern'ların varlığı (yoksa "DS olgunluk eksikliği" olarak raporla):
|
|
136
|
+
|
|
137
|
+
| Pattern | Bileşenler | Kontrol |
|
|
138
|
+
|---------|-----------|---------|
|
|
139
|
+
| **Forms** | Input grubu + validation görseli + submit akışı | Form-like frame'lerde input+button+error text birlikte mi? |
|
|
140
|
+
| **Navigation** | Sidebar, tabs, breadcrumb, bottom nav | Nav pattern'ı yayınlanmış bileşen mi yoksa ad-hoc frame mi? |
|
|
141
|
+
| **Data Display** | Tablo, kart listesi, liste | Tekrarlayan veri gösteriminde DS bileşeni mi kullanılıyor? |
|
|
142
|
+
| **Feedback** | Toast, modal, inline mesaj, snackbar | Geri bildirim mekanizmaları DS'de tanımlı mı? |
|
|
143
|
+
|
|
144
|
+
### DS Prensipleri
|
|
145
|
+
|
|
146
|
+
Audit raporunun sonuna bu prensipler bağlam olarak eklenir:
|
|
147
|
+
|
|
148
|
+
1. **Tutarlılık > Yaratıcılık** — DS, ekiplerin tekerleği yeniden icat etmemesi için var
|
|
149
|
+
2. **Kısıtlamalar içinde esneklik** — Bileşenler composable olmalı, rigid değil
|
|
150
|
+
3. **Belgelenmemiş = yok** — Dökümante edilmeyen bileşen/token kullanılmayacaktır → bkz. [component-documentation](../component-documentation/SKILL.md)
|
|
151
|
+
4. **Versiyonla ve migrate et** — Breaking change'lerde migration path sun → bkz. [ds-impact-analysis](../ds-impact-analysis/SKILL.md)
|
|
152
|
+
|
|
153
|
+
### Audit JSON Şemasına Ek Alan
|
|
154
|
+
|
|
155
|
+
`--json` çıktısına `dsCompleteness` objesi eklenir:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"findings": [...],
|
|
160
|
+
"dsCompleteness": {
|
|
161
|
+
"tokenCategories": {
|
|
162
|
+
"colors": { "count": 24, "status": "complete" },
|
|
163
|
+
"typography": { "count": 12, "status": "complete" },
|
|
164
|
+
"spacing": { "count": 8, "status": "complete" },
|
|
165
|
+
"border": { "count": 5, "status": "complete" },
|
|
166
|
+
"shadow": { "count": 4, "status": "complete" },
|
|
167
|
+
"motion": { "count": 0, "status": "missing" }
|
|
168
|
+
},
|
|
169
|
+
"componentStates": {
|
|
170
|
+
"averageStatesPerComponent": 3.2,
|
|
171
|
+
"componentsWithAllStates": 5,
|
|
172
|
+
"componentsWithMissingStates": 8,
|
|
173
|
+
"missingStateDetails": [
|
|
174
|
+
{ "component": "Button", "missing": ["loading", "focus"] },
|
|
175
|
+
{ "component": "Input", "missing": ["error", "loading"] }
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"patternCoverage": {
|
|
179
|
+
"forms": true,
|
|
180
|
+
"navigation": true,
|
|
181
|
+
"dataDisplay": false,
|
|
182
|
+
"feedback": false
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Ne işaretlenir / ne işaretlenmez
|
|
189
|
+
|
|
190
|
+
**İşaretle:** Ad-hoc frame ile yapılmış button/card/alert/chip vb.; tekrarlayan kardeş modüller; somut ham değer + tokenize komşular; global pattern’lerin custom olması; nominal component içi variant sapması.
|
|
191
|
+
|
|
192
|
+
**İşaretleme:** Saf estetik; copy; makul ölçüde ekrana özgü layout; zaten instance + token ile doğru olan tek seferlik kompozisyonlar; belgesiz varsayımlar.
|
|
193
|
+
|
|
194
|
+
## Kanıt standardı
|
|
195
|
+
|
|
196
|
+
Her bulgu için: (1) Figma yapısında somut ne gösteriyor? (2) Bakım, tutarlılık, tema veya ölçeklenebilirlik için neden önemli?
|
|
197
|
+
|
|
198
|
+
## JSON çıktı şeması ( `--json` )
|
|
199
|
+
|
|
200
|
+
Tek JSON obje; markdown veya ek prose yok:
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"findings": [
|
|
205
|
+
{
|
|
206
|
+
"title": "<= 80 karakter, emir kipi>",
|
|
207
|
+
"body": "Markdown açıklama",
|
|
208
|
+
"confidence_score": 0.0,
|
|
209
|
+
"priority": 0,
|
|
210
|
+
"code_location": {
|
|
211
|
+
"absolute_file_path": "/figma/<fileKey>/nodes/<nodeId>",
|
|
212
|
+
"line_range": { "start": 1, "end": 1 }
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"overall_correctness": "ds compliant" | "ds non-compliant",
|
|
217
|
+
"overall_explanation": "1-3 cümle özet",
|
|
218
|
+
"overall_confidence_score": 0.0
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
- En az bir bulgu varsa `overall_correctness`: `"ds non-compliant"`.
|
|
223
|
+
- Bulgu yoksa `"ds compliant"`.
|
|
224
|
+
- `code_location.absolute_file_path`: en spesifik sorunlu node için `/figma/<fileKey>/nodes/<nodeId>`.
|
|
225
|
+
- `line_range` her zaman `1`.
|
|
226
|
+
|
|
227
|
+
## Öncelik ve güven skorları
|
|
228
|
+
|
|
229
|
+
- **priority:** 0 nit, 1 orta drift, 2 önemli primitive/token, 3 kütüphane/nav seviyesi kritik.
|
|
230
|
+
- **confidence_score:** 0.9–1.0 doğrudan yapısal kanıt; 0.7–0.89 güçlü çıkarım; 0.5–0.69 zayıf — tercihen bulgu yazma.
|
|
231
|
+
|
|
232
|
+
## Erişilebilirlik (a11y) Kontrol Noktaları
|
|
233
|
+
|
|
234
|
+
Audit sırasında aşağıdaki temel a11y kontrolleri de yapılır. Ayrıntılı a11y denetimi için **figma-a11y-audit** skill'ine yönlendir.
|
|
235
|
+
|
|
236
|
+
- **Renk kontrastı:** Metin/arka plan renk çiftlerinde WCAG AA minimum kontrastı (4.5:1 normal metin, 3:1 büyük metin) sağlanıyor mu?
|
|
237
|
+
- **Minimum boyut:** Etkileşimli öğeler (button, input, link) iOS için 44x44pt, Android için 48x48dp minimumunu karşılıyor mu?
|
|
238
|
+
- **Metin boyutu:** Body metin en az 14px (mobil) / 16px (masaüstü) mü?
|
|
239
|
+
|
|
240
|
+
Bu kontroller audit raporunda `[a11y]` etiketiyle ayrı bölümde gösterilir. Detaylı denetim (fokus sırası, VoiceOver/TalkBack, ARIA) için:
|
|
241
|
+
|
|
242
|
+
→ **figma-a11y-audit** skill'ini kullan.
|
|
243
|
+
|
|
244
|
+
## PO/PM Executive Rapor Modu
|
|
245
|
+
|
|
246
|
+
`--executive` flag veya PO/PM persona algılandığında teknik detay yerine yönetici özeti çıkar:
|
|
247
|
+
|
|
248
|
+
**Executive summary formatı:**
|
|
249
|
+
|
|
250
|
+
```markdown
|
|
251
|
+
## DS Uyum Raporu — [Ekran Adı]
|
|
252
|
+
|
|
253
|
+
- **DS Uyum Oranı:** %85 (17/20 öğe DS ile uyumlu)
|
|
254
|
+
- **Risk Seviyesi:** Orta
|
|
255
|
+
- **Kritik Bulgular:** 2 adet
|
|
256
|
+
- **Önerilen Aksiyon Süresi:** ~2 saat
|
|
257
|
+
|
|
258
|
+
### Bulgular (öncelik sırasıyla)
|
|
259
|
+
1. [Yüksek] Navigation bar custom yapılmış — DS NavBar bileşeni mevcut
|
|
260
|
+
2. [Orta] 3 renk token'a bağlı değil — tema değişikliğinde kopacak
|
|
261
|
+
|
|
262
|
+
### Sonraki Adım
|
|
263
|
+
→ apply-figma-design-system ile otomatik düzeltme önerilir
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## Tetik örnekleri
|
|
267
|
+
|
|
268
|
+
- "Bu ekranı design system entegrasyonu için denetle"
|
|
269
|
+
- "Bu board'da eksik component kullanımı var mı?"
|
|
270
|
+
- "Token'lar doğru bağlı mı — audit --json ile ver"
|
|
271
|
+
- "Tasarım durumu raporu ver" (PO/PM)
|
|
272
|
+
- "Ne kadar DS uyumlu bu ekran?" (PO/PM)
|
|
273
|
+
|
|
274
|
+
## Evolution Triggers
|
|
275
|
+
|
|
276
|
+
- Bridge'e yeni DS analiz aracı eklendiğinde kanıt toplama adımları güncellenmeli
|
|
277
|
+
- Yeni a11y standartları (WCAG 3.0) yayınlandığında kontrol noktaları güncellenmeli
|
|
278
|
+
- PO/PM geri bildirimine göre executive summary formatı genişletilmeli
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-design-mapper
|
|
3
|
+
description: Figma tasarım bileşenlerini iOS, Android ve Web platformlarındaki kod bileşenlerine eşler. Bir Figma component'i birden fazla platform implementasyonuyla eşleşebilir. Enterprise plan gerektirmez, lokal çalışır. "code connect", "connect component", "map component", "bileşen eşle", "component mapping", "hangi kod bu bileşene karşılık geliyor", "bileşen eşleme tablosu" ifadeleriyle tetiklenir. F-MCP Bridge plugin bağlantısı gerektirir.
|
|
4
|
+
metadata:
|
|
5
|
+
mcp-server: user-figma-mcp-bridge
|
|
6
|
+
personas:
|
|
7
|
+
- uidev
|
|
8
|
+
- designops
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Code-Design Mapper (Multi-Platform)
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Bu skill, Figma tasarım bileşenlerini **iOS, Android ve Web** platformlarındaki kod karşılıklarına eşler. Tek bir Figma component'i 3 farklı platform implementasyonuyla eşleşebilir.
|
|
16
|
+
|
|
17
|
+
Figma resmi Code Connect'ten farkları:
|
|
18
|
+
- Enterprise plan gerektirmez
|
|
19
|
+
- Published component zorunluluğu yok
|
|
20
|
+
- **Multi-platform mapping**: 1 Figma component → N platform implementasyonu
|
|
21
|
+
- Her platformun implementasyon durumu ayrı izlenir
|
|
22
|
+
- Platformlar arası tutarlılık kontrolü
|
|
23
|
+
|
|
24
|
+
REST API veya Figma access token gerekmez.
|
|
25
|
+
|
|
26
|
+
## Code Connect Uyarlama Notu
|
|
27
|
+
|
|
28
|
+
Resmi Figma MCP'de Code Connect akışı `get_code_connect_suggestions` ve `send_code_connect_mappings` araçlarıyla çalışır. **F-MCP Bridge'de bu araçlar kayıtlı değildir** (FUTURE.md'de planlı).
|
|
29
|
+
|
|
30
|
+
F-MCP ile eşdeğer iş akışı:
|
|
31
|
+
|
|
32
|
+
| Resmi Code Connect adımı | F-MCP Bridge karşılığı |
|
|
33
|
+
|---|---|
|
|
34
|
+
| Resmi: code connect suggestions | `figma_search_components` + `figma_get_component` + `figma_get_component_for_development` |
|
|
35
|
+
| Bileşen–kod eşleme | AI ile `.figma-mappings.json` üretimi (bu skill'in ana akışı) |
|
|
36
|
+
| Resmi: send code connect mappings | **yok** — eşleme dosyası repoda kalır, Figma'ya gönderilmez |
|
|
37
|
+
|
|
38
|
+
**Resmi Code Connect `.figma.js` şablonları gerekiyorsa:** Kullanıcıya resmi Figma MCP sunucusunu etkinleştirmesi ve [topluluk figma-code-connect skill'ini](https://github.com/figma/mcp-server-guide/blob/main/skills/figma-code-connect/SKILL.md) kullanması önerilir.
|
|
39
|
+
|
|
40
|
+
**Bridge'e Code Connect araçları eklendiğinde** bu bölüm ve iş akışı güncellenmeli.
|
|
41
|
+
|
|
42
|
+
## Prerequisites
|
|
43
|
+
|
|
44
|
+
- F-MCP Bridge plugin Figma'da çalışıyor ve bağlı olmalı
|
|
45
|
+
- En az bir platformda component implementasyonu mevcut olmalı
|
|
46
|
+
- Platform proje dizinleri biliniyor olmalı
|
|
47
|
+
|
|
48
|
+
## F-MCP skill koordinasyonu
|
|
49
|
+
|
|
50
|
+
- **Önce:** Stabil kütüphane instance’ları için isteğe bağlı **apply-figma-design-system** veya **audit-figma-design-system**.
|
|
51
|
+
- **Sonra:** `.figma-mappings.json` ile **design-drift-detector** ve **implement-design**; manifest için **ai-handoff-export**.
|
|
52
|
+
|
|
53
|
+
## Required Workflow
|
|
54
|
+
|
|
55
|
+
**Bu adımları sırayla uygula. Adım atlama.**
|
|
56
|
+
|
|
57
|
+
### Step 1: Plugin Bağlantısını Doğrula
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
figma_get_status()
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Step 2: Platform Projelerini Belirle
|
|
64
|
+
|
|
65
|
+
Kullanıcıdan veya codebase'den platform proje köklerini belirle:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Hangi platformlarda çalışıyorsunuz ve proje dizinleri nerede?
|
|
69
|
+
|
|
70
|
+
- iOS: ör. ios-app/ veya MyApp.xcodeproj/
|
|
71
|
+
- Android: ör. android-app/ veya app/src/main/
|
|
72
|
+
- Web: ör. web-app/ veya src/
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Her platform için component dizinlerini tespit et:
|
|
76
|
+
|
|
77
|
+
| Platform | Yaygın Component Dizinleri |
|
|
78
|
+
|----------|---------------------------|
|
|
79
|
+
| **iOS (SwiftUI)** | `Sources/Components/`, `Views/`, `UI/` |
|
|
80
|
+
| **iOS (UIKit)** | `Views/`, `UI/Components/`, `Cells/` |
|
|
81
|
+
| **Android (Compose)** | `ui/components/`, `presentation/components/` |
|
|
82
|
+
| **Android (XML)** | `res/layout/`, `res/values/styles.xml` |
|
|
83
|
+
| **Web (React)** | `src/components/`, `components/ui/` |
|
|
84
|
+
| **Web (Vue)** | `src/components/`, `views/` |
|
|
85
|
+
| **Web (Legacy)** | `templates/`, `partials/`, `public/js/` |
|
|
86
|
+
|
|
87
|
+
### Step 3: Figma Component'lerini Keşfet
|
|
88
|
+
|
|
89
|
+
Belirli component:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
figma_get_component(nodeId="<NODE_ID>")
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Tüm component'ler (aktif sayfa):
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
figma_search_components(query="", currentPageOnly=true, limit=50)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Uyarı:** `currentPageOnly=false` büyük dosyalarda timeout'a neden olabilir. Önce `currentPageOnly=true` (varsayılan) ile dene. Component başka sayfadaysa dikkatli şekilde `false` kullan.
|
|
102
|
+
|
|
103
|
+
### Step 4: Component Detaylarını Çek
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
figma_get_component_for_development(nodeId="<NODE_ID>", scale=2, format="PNG")
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Bu tek çağrıda hem metadata hem base64 screenshot döner. Ancak base64 screenshot context'i şişirir — çok fazla component taranacaksa önce `figma_get_component(nodeId="...")` (sadece metadata) kullan, screenshot'ı sadece eşleşme onayı için al.
|
|
110
|
+
|
|
111
|
+
Her component için Figma'daki bilgiler:
|
|
112
|
+
- Component adı ve yolu
|
|
113
|
+
- Variant özellikleri (variant props ve değerleri)
|
|
114
|
+
- Child yapısı
|
|
115
|
+
- Görsel referans (base64 screenshot — context ağır)
|
|
116
|
+
|
|
117
|
+
### Step 5: Her Platformda Eşleşme Ara
|
|
118
|
+
|
|
119
|
+
Her Figma component'i için, **her platformda ayrı ayrı** eşleşme ara:
|
|
120
|
+
|
|
121
|
+
**iOS arama:**
|
|
122
|
+
- `.swift` dosyalarında `struct ComponentName: View` (SwiftUI)
|
|
123
|
+
- `.swift` dosyalarında `class ComponentName: UIView` (UIKit)
|
|
124
|
+
- `.xib` / `.storyboard` dosyalarında custom class referansları
|
|
125
|
+
|
|
126
|
+
**Android arama:**
|
|
127
|
+
- `.kt` dosyalarında `@Composable fun ComponentName` (Compose)
|
|
128
|
+
- `res/layout/` altında `component_name.xml` (XML)
|
|
129
|
+
- Custom View class'ları
|
|
130
|
+
|
|
131
|
+
**Web arama:**
|
|
132
|
+
- `.tsx`/`.jsx` dosyalarında `export function ComponentName` veya `export const ComponentName`
|
|
133
|
+
- `.vue` dosyalarında `<script>` içinde component tanımı
|
|
134
|
+
- `.html`/`.hbs` dosyalarında template/partial
|
|
135
|
+
|
|
136
|
+
### Step 6: Eşleşmeleri Kullanıcıya Sun
|
|
137
|
+
|
|
138
|
+
**Multi-platform sunum formatı:**
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
Figma Component: Button (42:15)
|
|
142
|
+
Variant'lar: primary | secondary | ghost × sm | md | lg
|
|
143
|
+
|
|
144
|
+
Platform Eşleşmeleri:
|
|
145
|
+
┌──────────┬────────────────────────────────────┬──────────┐
|
|
146
|
+
│ Platform │ Kod Dosyası │ Durum │
|
|
147
|
+
├──────────┼────────────────────────────────────┼──────────┤
|
|
148
|
+
│ iOS │ Sources/UI/ButtonComponent.swift │ Eşleşti │
|
|
149
|
+
│ Android │ ui/components/ButtonComponent.kt │ Eşleşti │
|
|
150
|
+
│ Web │ src/components/Button.tsx │ Eşleşti │
|
|
151
|
+
└──────────┴────────────────────────────────────┴──────────┘
|
|
152
|
+
|
|
153
|
+
Figma Component: Avatar (42:30)
|
|
154
|
+
┌──────────┬────────────────────────────────────┬──────────────┐
|
|
155
|
+
│ Platform │ Kod Dosyası │ Durum │
|
|
156
|
+
├──────────┼────────────────────────────────────┼──────────────┤
|
|
157
|
+
│ iOS │ Sources/UI/AvatarView.swift │ Eşleşti │
|
|
158
|
+
│ Android │ — │ Eksik │
|
|
159
|
+
│ Web │ src/components/Avatar.tsx │ Eşleşti │
|
|
160
|
+
└──────────┴────────────────────────────────────┴──────────────┘
|
|
161
|
+
|
|
162
|
+
Bu eşleşmeleri kaydetmek ister misiniz?
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Step 7: Multi-Platform Mapping Dosyasını Oluştur/Güncelle
|
|
166
|
+
|
|
167
|
+
**Önemli:** `.figma-mappings.json` dosyası AI agent tarafından oluşturulur ve yönetilir. Hiçbir MCP aracı bu dosyayı okumaz veya yazmaz — tamamen agent-tarafı bir artifact'tir.
|
|
168
|
+
|
|
169
|
+
Proje kökünde `.figma-mappings.json` dosyası:
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"version": "2.0",
|
|
174
|
+
"lastUpdated": "2026-03-12T10:30:00Z",
|
|
175
|
+
"figmaFile": "Design System",
|
|
176
|
+
"platforms": {
|
|
177
|
+
"ios": {
|
|
178
|
+
"rootDir": "ios-app/",
|
|
179
|
+
"framework": "SwiftUI",
|
|
180
|
+
"language": "Swift",
|
|
181
|
+
"componentDirs": ["Sources/UI/", "Sources/Components/"]
|
|
182
|
+
},
|
|
183
|
+
"android": {
|
|
184
|
+
"rootDir": "android-app/",
|
|
185
|
+
"framework": "Compose",
|
|
186
|
+
"language": "Kotlin",
|
|
187
|
+
"componentDirs": ["app/src/main/java/com/app/ui/components/"]
|
|
188
|
+
},
|
|
189
|
+
"web": {
|
|
190
|
+
"rootDir": "web-app/",
|
|
191
|
+
"framework": "React",
|
|
192
|
+
"language": "TypeScript",
|
|
193
|
+
"componentDirs": ["src/components/", "src/ui/"]
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"components": [
|
|
197
|
+
{
|
|
198
|
+
"figmaNodeId": "42:15",
|
|
199
|
+
"figmaName": "Button",
|
|
200
|
+
"figmaPath": "Components/Button",
|
|
201
|
+
"variants": {
|
|
202
|
+
"variant": ["primary", "secondary", "ghost"],
|
|
203
|
+
"size": ["sm", "md", "lg"]
|
|
204
|
+
},
|
|
205
|
+
"implementations": {
|
|
206
|
+
"ios": {
|
|
207
|
+
"codePath": "ios-app/Sources/UI/ButtonComponent.swift",
|
|
208
|
+
"componentName": "ButtonComponent",
|
|
209
|
+
"propMapping": {
|
|
210
|
+
"variant": { "codeProp": "style", "codeType": "ButtonStyle" },
|
|
211
|
+
"size": { "codeProp": "size", "codeType": "ButtonSize" }
|
|
212
|
+
},
|
|
213
|
+
"status": "synced",
|
|
214
|
+
"lastSync": "2026-03-12T10:30:00Z"
|
|
215
|
+
},
|
|
216
|
+
"android": {
|
|
217
|
+
"codePath": "android-app/app/src/main/java/com/app/ui/components/ButtonComponent.kt",
|
|
218
|
+
"componentName": "ButtonComponent",
|
|
219
|
+
"propMapping": {
|
|
220
|
+
"variant": { "codeProp": "variant", "codeType": "ButtonVariant" },
|
|
221
|
+
"size": { "codeProp": "size", "codeType": "ButtonSize" }
|
|
222
|
+
},
|
|
223
|
+
"status": "synced",
|
|
224
|
+
"lastSync": "2026-03-12T10:30:00Z"
|
|
225
|
+
},
|
|
226
|
+
"web": {
|
|
227
|
+
"codePath": "web-app/src/components/Button.tsx",
|
|
228
|
+
"componentName": "Button",
|
|
229
|
+
"propMapping": {
|
|
230
|
+
"variant": { "codeProp": "variant", "codeType": "string" },
|
|
231
|
+
"size": { "codeProp": "size", "codeType": "string" }
|
|
232
|
+
},
|
|
233
|
+
"status": "synced",
|
|
234
|
+
"lastSync": "2026-03-12T10:30:00Z"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"figmaNodeId": "42:30",
|
|
240
|
+
"figmaName": "Avatar",
|
|
241
|
+
"figmaPath": "Components/Avatar",
|
|
242
|
+
"variants": {
|
|
243
|
+
"size": ["xs", "sm", "md", "lg", "xl"]
|
|
244
|
+
},
|
|
245
|
+
"implementations": {
|
|
246
|
+
"ios": {
|
|
247
|
+
"codePath": "ios-app/Sources/UI/AvatarView.swift",
|
|
248
|
+
"componentName": "AvatarView",
|
|
249
|
+
"status": "synced",
|
|
250
|
+
"lastSync": "2026-03-12T10:30:00Z"
|
|
251
|
+
},
|
|
252
|
+
"android": null,
|
|
253
|
+
"web": {
|
|
254
|
+
"codePath": "web-app/src/components/Avatar.tsx",
|
|
255
|
+
"componentName": "Avatar",
|
|
256
|
+
"status": "outdated",
|
|
257
|
+
"lastSync": "2026-02-15T14:00:00Z"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"coverageSummary": {
|
|
263
|
+
"totalComponents": 25,
|
|
264
|
+
"ios": { "implemented": 20, "missing": 5, "outdated": 2 },
|
|
265
|
+
"android": { "implemented": 18, "missing": 7, "outdated": 1 },
|
|
266
|
+
"web": { "implemented": 22, "missing": 3, "outdated": 3 }
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Step 8: Platform Coverage Raporu Oluştur
|
|
272
|
+
|
|
273
|
+
Mapping tamamlandıktan sonra coverage raporu sun:
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
Design System Platform Coverage Raporu
|
|
277
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
278
|
+
Toplam Figma Component: 25
|
|
279
|
+
|
|
280
|
+
iOS Android Web
|
|
281
|
+
Impl. 20/25 18/25 22/25
|
|
282
|
+
% 80% 72% 88%
|
|
283
|
+
Güncel 18/20 17/18 19/22
|
|
284
|
+
Eksik 5 7 3
|
|
285
|
+
|
|
286
|
+
Eksik Component'ler:
|
|
287
|
+
Android: Avatar, Tooltip, Breadcrumb, Stepper, DatePicker
|
|
288
|
+
iOS: Breadcrumb, DataTable, Pagination, RichText, CodeBlock
|
|
289
|
+
Web: Stepper, DatePicker, BottomSheet
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Mevcut Mapping'leri Güncelleme
|
|
293
|
+
|
|
294
|
+
"Mapping'leri güncelle" veya "sync" dendiğinde:
|
|
295
|
+
|
|
296
|
+
1. `.figma-mappings.json` oku
|
|
297
|
+
2. Her component + her platform için güncel durumu kontrol et
|
|
298
|
+
3. Figma'da variant değişikliği varsa → `status: "outdated"`
|
|
299
|
+
4. Kodda component silinmişse → `status: "missing"`
|
|
300
|
+
5. Coverage summary'yi güncelle
|
|
301
|
+
|
|
302
|
+
## Eksik Platform Implementasyonu Başlatma
|
|
303
|
+
|
|
304
|
+
Coverage raporunda eksik görünen component'i implement etmek için:
|
|
305
|
+
|
|
306
|
+
1. Mapping'den eksik platformu ve Figma nodeId'yi belirle
|
|
307
|
+
2. `figma_get_component_for_development(nodeId="...")` ile Figma verisini al
|
|
308
|
+
3. **implement-design** skill'ini hedef platform belirterek kullan
|
|
309
|
+
4. Oluşturulan implementasyonu mapping'e ekle
|
|
310
|
+
|
|
311
|
+
## Examples
|
|
312
|
+
|
|
313
|
+
### Örnek 1: Tekli Component — 3 Platform Eşleme
|
|
314
|
+
|
|
315
|
+
Kullanıcı: "Button component'ini tüm platformlarda eşle, nodeId: 42:15"
|
|
316
|
+
|
|
317
|
+
**Akış:**
|
|
318
|
+
|
|
319
|
+
1. `figma_get_status()` → bağlı
|
|
320
|
+
2. `figma_get_component_for_development(nodeId="42:15")` → Button, variants
|
|
321
|
+
3. iOS'ta ara → `ButtonComponent.swift` bulundu
|
|
322
|
+
4. Android'de ara → `ButtonComponent.kt` bulundu
|
|
323
|
+
5. Web'de ara → `Button.tsx` bulundu
|
|
324
|
+
6. 3 platform eşleşmesini sun
|
|
325
|
+
7. Kullanıcı onayladı → `.figma-mappings.json`'a kaydet
|
|
326
|
+
|
|
327
|
+
### Örnek 2: Platform Eksikleri Tespiti
|
|
328
|
+
|
|
329
|
+
Kullanıcı: "Tüm component'leri tara, hangi platformlarda eksik göster"
|
|
330
|
+
|
|
331
|
+
**Akış:**
|
|
332
|
+
|
|
333
|
+
1. `figma_search_components(query="", currentPageOnly=false)` → 25 component
|
|
334
|
+
2. Her component için 3 platformda ara
|
|
335
|
+
3. Coverage raporu oluştur
|
|
336
|
+
4. Kullanıcıya öncelik öner: "Android'de 7 component eksik, en kritikleri: Avatar, Tooltip"
|
|
337
|
+
|
|
338
|
+
### Örnek 3: Sadece Bir Platform İçin Eşleme
|
|
339
|
+
|
|
340
|
+
Kullanıcı: "Android Compose component'lerini Figma ile eşle"
|
|
341
|
+
|
|
342
|
+
**Akış:**
|
|
343
|
+
|
|
344
|
+
1. Sadece Android component dizinlerini tara
|
|
345
|
+
2. Figma component'leriyle eşleştir
|
|
346
|
+
3. Sadece Android sütununu güncelle, diğer platformları koru
|
|
347
|
+
|
|
348
|
+
## Common Issues and Solutions
|
|
349
|
+
|
|
350
|
+
### Sorun: Platform projesi farklı repo'da
|
|
351
|
+
|
|
352
|
+
**Çözüm:** `platforms.ios.rootDir` alanını absolute path veya relative path olarak ayarla. Farklı repo'lar için workspace root'a göre path ver.
|
|
353
|
+
|
|
354
|
+
### Sorun: Aynı Figma component'i platformlarda farklı isimle
|
|
355
|
+
|
|
356
|
+
**Çözüm:** Her platform implementasyonunun `componentName` alanı bağımsızdır. Figma'da "SegmentedControl" → iOS'ta "Picker", Android'de "TabRow", Web'de "SegmentedControl" olabilir.
|
|
357
|
+
|
|
358
|
+
### Sorun: Platform-spesifik component (ör. BottomSheet sadece mobile)
|
|
359
|
+
|
|
360
|
+
**Çözüm:** Web implementasyonu `null` olarak bırak, coverage raporunda "N/A" göster. Platform-specific component'leri mapping'de işaretle.
|
|
361
|
+
|
|
362
|
+
### Sorun: Legacy ve modern aynı platformda
|
|
363
|
+
|
|
364
|
+
**Çözüm:** `platforms` altında ayrı entry ekle: `"web-legacy": { "framework": "jQuery", ... }`. Bir Figma component'in hem modern hem legacy web karşılığı olabilir.
|
|
365
|
+
|
|
366
|
+
## Evolution Triggers
|
|
367
|
+
|
|
368
|
+
- Bridge'e Code Connect araçları (suggestions / send mappings) eklenirse Code Connect uyarlama bölümü ve iş akışı güncellenmeli
|
|
369
|
+
- Yeni platform desteği (Flutter, .NET MAUI) eklenirse platform profilleri genişletilmeli
|
|
370
|
+
- `.figma-mappings.json` şeması değişirse çıktı formatı uyarlanmalı
|