@su-record/vibe 3.2.5 → 3.2.7
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/README.en.md +1 -1
- package/README.md +1 -1
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +10 -9
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
- package/dist/cli/setup/ProjectSetup.js +5 -0
- package/dist/cli/setup/ProjectSetup.js.map +1 -1
- package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -3
- package/package.json +2 -2
- package/skills/vibe/SKILL.md +27 -86
- package/skills/vibe/references/routing-examples.md +85 -0
- package/skills/vibe.agents-md/SKILL.md +12 -10
- package/skills/vibe.analyze/SKILL.md +22 -211
- package/skills/vibe.analyze/references/mode1-feature.md +81 -0
- package/skills/vibe.analyze/references/mode2-document.md +50 -0
- package/skills/vibe.analyze/references/mode3-website.md +47 -0
- package/skills/vibe.analyze/references/mode4-quality.md +35 -0
- package/skills/vibe.brand-assets/SKILL.md +2 -2
- package/skills/vibe.brand-assets/references/mobile-assets.md +6 -0
- package/skills/vibe.capability-loop/SKILL.md +14 -80
- package/skills/vibe.capability-loop/references/escalate.md +86 -0
- package/skills/vibe.chub-usage/SKILL.md +3 -132
- package/skills/vibe.clone/SKILL.md +43 -358
- package/skills/vibe.clone/references/phase-commands.md +118 -0
- package/skills/vibe.clone/references/setup-and-layout.md +34 -0
- package/skills/vibe.clone/references/verification-loops.md +64 -0
- package/skills/vibe.commit-push-pr/SKILL.md +10 -4
- package/skills/vibe.context7-usage/SKILL.md +3 -99
- package/skills/vibe.continue/SKILL.md +17 -7
- package/skills/{vibe.handoff → vibe.continue}/agents/context-summarizer.md +1 -1
- package/skills/{vibe.handoff → vibe.continue}/agents/document-writer.md +1 -1
- package/skills/{vibe.handoff → vibe.continue}/agents/state-collector.md +1 -1
- package/skills/{vibe.handoff → vibe.continue}/agents/verifier.md +1 -1
- package/skills/{vibe.handoff/rubrics/completeness.md → vibe.continue/references/handoff-completeness.md} +1 -1
- package/skills/{vibe.handoff/templates → vibe.continue/references}/handoff.md +37 -2
- package/skills/vibe.contract/SKILL.md +4 -27
- package/skills/vibe.create-prd/SKILL.md +8 -1
- package/skills/vibe.design/SKILL.md +18 -5
- package/skills/vibe.design/references/design-context.md +184 -0
- package/skills/vibe.design-refine/SKILL.md +7 -0
- package/skills/vibe.design-review/SKILL.md +7 -0
- package/skills/vibe.design-teach/SKILL.md +2 -175
- package/skills/vibe.devlog/SKILL.md +14 -11
- package/skills/vibe.devlog/references/auto-push.md +10 -0
- package/skills/vibe.docs/SKILL.md +27 -198
- package/skills/vibe.docs/references/agent.md +55 -0
- package/skills/vibe.docs/references/arch.md +28 -0
- package/skills/vibe.docs/references/codemaps.md +17 -0
- package/skills/vibe.docs/references/diagram.md +24 -0
- package/skills/vibe.docs/references/guide.md +23 -0
- package/skills/vibe.docs/references/readme.md +45 -0
- package/skills/vibe.docs/references/release.md +31 -0
- package/skills/vibe.documentation-provider/SKILL.md +22 -0
- package/skills/vibe.documentation-provider/references/chub.md +141 -0
- package/skills/vibe.documentation-provider/references/context7.md +107 -0
- package/skills/vibe.educational-content/SKILL.md +7 -0
- package/skills/vibe.event/SKILL.md +47 -146
- package/skills/vibe.event/references/comms.md +173 -0
- package/skills/vibe.event/references/operations.md +208 -0
- package/skills/vibe.event/references/orchestration-legacy.md +97 -0
- package/skills/vibe.event/references/planning.md +145 -0
- package/skills/vibe.event-comms/SKILL.md +3 -165
- package/skills/vibe.event-ops/SKILL.md +3 -200
- package/skills/vibe.event-planning/SKILL.md +3 -137
- package/skills/vibe.figma/SKILL.md +26 -692
- package/skills/vibe.figma/references/branch1-read-convention.md +82 -0
- package/skills/vibe.figma/references/branch2-read-standalone.md +69 -0
- package/skills/vibe.figma/references/branch3-write.md +122 -0
- package/skills/vibe.figma/references/core-implementation.md +453 -0
- package/skills/vibe.git-worktree/SKILL.md +2 -6
- package/skills/vibe.git-worktree/references/troubleshooting.md +9 -0
- package/skills/vibe.handoff/SKILL.md +2 -103
- package/skills/vibe.harness/SKILL.md +17 -12
- package/skills/vibe.image/SKILL.md +8 -1
- package/skills/vibe.llm/SKILL.md +8 -1
- package/skills/vibe.loop/SKILL.md +9 -11
- package/skills/vibe.loop/references/install-adapters.md +10 -0
- package/skills/vibe.presentation/SKILL.md +7 -0
- package/skills/vibe.prioritization/SKILL.md +7 -0
- package/skills/vibe.priority-todos/SKILL.md +2 -57
- package/skills/vibe.react-best-practices/SKILL.md +1 -1
- package/skills/vibe.reason/SKILL.md +9 -2
- package/skills/vibe.regress/SKILL.md +6 -28
- package/skills/vibe.regress/templates/{test-jest.md → test-template.md} +1 -0
- package/skills/vibe.review/SKILL.md +35 -38
- package/skills/vibe.review/references/priority-todos.md +66 -0
- package/skills/vibe.review/references/ui-ux-review.md +39 -0
- package/skills/vibe.run/SKILL.md +57 -656
- package/skills/vibe.run/references/arch-guard.md +178 -0
- package/skills/vibe.run/references/e2e-and-autofix.md +40 -0
- package/skills/vibe.run/references/exec-plan.md +145 -0
- package/skills/vibe.run/references/guidelines-and-tools.md +84 -0
- package/skills/vibe.run/references/process-steps.md +179 -0
- package/skills/vibe.run/references/restraint.md +66 -0
- package/skills/vibe.scaffold/SKILL.md +9 -13
- package/skills/vibe.scaffold/references/clean-architecture.md +17 -0
- package/skills/vibe.spec/SKILL.md +12 -8
- package/skills/vibe.spec/references/legacy-artifacts.md +6 -0
- package/skills/vibe.test/SKILL.md +93 -70
- package/skills/vibe.test/references/report-template.md +101 -0
- package/skills/vibe.tool-fallback/SKILL.md +10 -32
- package/skills/vibe.tool-fallback/references/external-llm.md +10 -0
- package/skills/vibe.tool-fallback/references/file-lookup.md +9 -0
- package/skills/vibe.tool-fallback/references/web-search.md +11 -0
- package/skills/vibe.trace/SKILL.md +2 -264
- package/skills/vibe.ui-ux-pro-max/SKILL.md +1 -3
- package/skills/vibe.ui-ux-pro-max/references/charts-and-data.md +7 -0
- package/skills/vibe.user-personas/SKILL.md +8 -1
- package/skills/vibe.verify/SKILL.md +30 -4
- package/skills/vibe.verify/references/trace-mode.md +271 -0
- package/skills/vibe.regress/templates/test-vitest.md +0 -30
- /package/skills/{vibe.design-teach/rubrics → vibe.design/references}/brand-personality.md +0 -0
- /package/skills/{vibe.design-teach → vibe.design}/templates/design-context.json +0 -0
- /package/skills/{vibe.context7-usage/rubrics/when-to-use.md → vibe.documentation-provider/references/context7-when-to-use.md} +0 -0
- /package/skills/{vibe.event-ops/rubrics → vibe.event/references}/contingency.md +0 -0
- /package/skills/{vibe.event-ops/templates/d-day-checklist.md → vibe.event/references/d-day-checklist-template.md} +0 -0
- /package/skills/{vibe.event-comms/templates/email-invite.md → vibe.event/references/email-invite-template.md} +0 -0
- /package/skills/{vibe.event-planning/templates/event-plan.md → vibe.event/references/event-plan-template.md} +0 -0
- /package/skills/{vibe.event-comms/templates/sns-post.md → vibe.event/references/sns-post-template.md} +0 -0
- /package/skills/{vibe.event-planning/rubrics → vibe.event/references}/timeline.md +0 -0
- /package/skills/{vibe.priority-todos/templates/todo-board.md → vibe.review/references/todo-board-template.md} +0 -0
- /package/skills/{vibe.priority-todos/rubrics/prioritization.md → vibe.review/references/todo-prioritization.md} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vibe.figma
|
|
3
|
-
description: Figma
|
|
3
|
+
description: Figma 디자인을 코드로 옮기거나 구현 계획을 Figma에 반영할 때 — READ(Figma→Code)와 WRITE(plan→Figma)를 라우팅한다.
|
|
4
4
|
argument-hint: "[<figma-url>... | <plan.md>] [--new] [--create | --create-storyboard | --create-design] [--teach]"
|
|
5
5
|
user-invocable: true
|
|
6
6
|
---
|
|
@@ -97,285 +97,32 @@ Step 6) Branch 컨텍스트에 다음을 binding:
|
|
|
97
97
|
**이 커맨드 실행 시 이전 대화 무시.**
|
|
98
98
|
스토리보드/plan.md 스펙 > Figma 데이터 > 프로젝트 컨벤션 순으로 우선.
|
|
99
99
|
|
|
100
|
-
> **Timer**:
|
|
100
|
+
> **Timer**: Query the system clock at START and record it as `{start_time}`.
|
|
101
101
|
|
|
102
102
|
---
|
|
103
103
|
|
|
104
104
|
## URL/입력 규칙 (모든 Branch 공통)
|
|
105
105
|
|
|
106
106
|
```
|
|
107
|
-
|
|
107
|
+
사용자 입력을 요청할 때 절대 선택지를 제공하지 말고 자유 텍스트로 질문한다.
|
|
108
108
|
각 질문의 응답을 받은 후에만 다음으로 진행.
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
---
|
|
112
112
|
|
|
113
|
-
## Branch
|
|
113
|
+
## Branch 본문 (라우팅 결정 후 해당 파일만 로드)
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
**결정된 Branch의 reference 하나만 읽는다.** 세 Branch를 동시에 로드하지 않는다 —
|
|
116
|
+
이 스킬이 호출당 컨텍스트를 가장 많이 쓰던 원인이었다.
|
|
116
117
|
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
| Branch | 조건 | 시나리오 | 본문 |
|
|
119
|
+
|---|---|---|---|
|
|
120
|
+
| **1** READ + 컨벤션 | 기본 (플래그 없음) | 기존 프로젝트에 새 UI/페이지 추가. 기존 토큰·컴포넌트·스타일 컨벤션을 따름 | `references/branch1-read-convention.md` |
|
|
121
|
+
| **2** READ + 독립 | `--new` | 컨벤션을 무시한 독립 페이지 (랜딩·프로모션 등) | `references/branch2-read-standalone.md` |
|
|
122
|
+
| **3** WRITE | `--create` / `--create-storyboard` / `--create-design` | plan.md → Figma 디자인 생성 (createMode 매트릭스, Step A–F) | `references/branch3-write.md` |
|
|
119
123
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
```
|
|
123
|
-
2. Execute the bundled implementation below — Phase 0 Setup
|
|
124
|
-
→ 스택 감지, 디렉토리, 피처명, component-index.json, project-tokens.json
|
|
125
|
-
|
|
126
|
-
> Read `references/branch-phases.md` for URL pre-collection rules and the design-context loading algorithm (Phase 0, Branch 1).
|
|
127
|
-
|
|
128
|
-
- hasTeach == true → 이때만 Load skill `vibe.design-teach`로 인터랙티브 진입
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Phase 1 — Storyboard 분석 (선택)
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
Execute the bundled implementation below — Phase 1 Storyboard
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
> Read `references/branch-phases.md` for the storyboard auto-detect/auto-skip rule and output scope (Branch 1, Phase 1).
|
|
138
|
-
|
|
139
|
-
### Phase 2 — 재료 확보
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
Execute the bundled implementation below — Phase 2 Extract Mode (코디네이터: MO/PC 병렬 워커)
|
|
143
|
-
→ tree.json + bg/ + content/ + sections/ (검증용)
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
> Read `references/branch-phases.md` for the input-selection detail and the Audit gate rule (tree.json `auditSummary`, P1/P2 handling).
|
|
147
|
-
|
|
148
|
-
### Phase 3 — 데이터 정제
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
Execute the bundled implementation below — Phase 3
|
|
152
|
-
⛔ figma-refine.js 강제 (자체 정제 스크립트 금지)
|
|
153
|
-
→ /tmp/{feature}/{bp}-main/sections.json
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
### Phase 4 — BP별 스태틱 구현 (컨벤션 준수)
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
Execute the bundled implementation below — Phase 4 Convert Mode
|
|
160
|
-
|
|
161
|
-
⤵ Phase 4 후처리
|
|
162
|
-
Load skill `vibe.design-refine` — normalize 모드
|
|
163
|
-
→ 매칭 안 된 하드코딩 값 → MASTER.md 토큰으로 정렬
|
|
164
|
-
→ 새 토큰 필요 항목은 review 큐에 기록
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
> Read `references/branch-phases.md` for the reuse-matching (BLOCKING) rule and the figma-to-scss/figma-validate gate.
|
|
168
|
-
|
|
169
|
-
### Phase 5 — 컴파일 게이트
|
|
170
|
-
|
|
171
|
-
```
|
|
172
|
-
Execute the bundled implementation below — Phase 5
|
|
173
|
-
→ tsc/build/dev 서버. P1=0까지 루프. Stuck → 사용자 질문.
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Phase 6 — 시각 검증 + 품질 점검 (MANDATORY)
|
|
177
|
-
|
|
178
|
-
```
|
|
179
|
-
Execute the bundled implementation below — Phase 6 (시각 검증 루프, P1=0까지)
|
|
180
|
-
|
|
181
|
-
⤵ Phase 6 후처리
|
|
182
|
-
Load skill `vibe.design-review` — audit 모드
|
|
183
|
-
→ 5-dimension 점검 (a11y, performance, responsive, theming, AI slop)
|
|
184
|
-
→ P1 finding은 review 큐에 기록 (read-only)
|
|
185
|
-
|
|
186
|
-
⛔ Phase 6 + design-review(audit) 완료 전까지 "완료 요약" 출력 금지.
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
> Read `references/branch-phases.md` for the raw-vs-computed reconciliation detail and Phase 6.5 DESIGN.md emission steps.
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## Branch 2: `/vibe.figma --new` — READ + 독립 규격
|
|
194
|
-
|
|
195
|
-
**시나리오**: 신규 독립 페이지 (랜딩, 프로토타입). 기존 컨벤션 무시, **Figma 원본 충실도 우선**.
|
|
196
|
-
|
|
197
|
-
**입력**: Figma URL 여러 개 (Branch 1과 동일 — 스토리보드 + MO/PC 자동 분류)
|
|
198
|
-
**출력**: `components/{feature}/` (독립 토큰, 새 컴포넌트 자유 생성)
|
|
199
|
-
|
|
200
|
-
### Phase 0 — Setup (Lite) + URL 수집
|
|
201
|
-
|
|
202
|
-
```
|
|
203
|
-
2. Execute the bundled implementation below — Phase 0 Setup
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
> Read `references/branch-phases.md` for the URL-reuse note and the Phase 0 (Lite) skip list (component-index/project-tokens).
|
|
207
|
-
|
|
208
|
-
### Phase 1 — Storyboard 분석 (선택)
|
|
209
|
-
|
|
210
|
-
```
|
|
211
|
-
Execute the bundled implementation below — Phase 1
|
|
212
|
-
→ Branch 1 Phase 1과 동일 (storyboard URL이 있으면 분석, 없으면 SKIP)
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### Phase 2 — 재료 확보
|
|
216
|
-
|
|
217
|
-
```
|
|
218
|
-
Execute the bundled implementation below — Phase 2 Extract Mode
|
|
219
|
-
→ Branch 1 Phase 2와 동일 (design URL로 추출)
|
|
220
|
-
|
|
221
|
-
🚦 Audit gate: Branch 1과 동일하게 `auditSummary.p1 > 0` 이면 Phase 3 진입 금지.
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### Phase 3 — 데이터 정제
|
|
225
|
-
|
|
226
|
-
```
|
|
227
|
-
Execute the bundled implementation below — Phase 3 (figma-refine.js 강제)
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### Phase 4 — BP별 스태틱 구현 (Standalone 모드)
|
|
231
|
-
|
|
232
|
-
```
|
|
233
|
-
Execute the bundled implementation below — Phase 4 Convert Mode
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
> Read `references/branch-phases.md` for the Standalone-mode reuse/token rules (Branch 2, Phase 4).
|
|
237
|
-
|
|
238
|
-
### Phase 5 — 컴파일 게이트
|
|
239
|
-
|
|
240
|
-
```
|
|
241
|
-
Execute the bundled implementation below — Phase 5
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
### Phase 6 — 시각 검증 + a11y (MANDATORY)
|
|
245
|
-
|
|
246
|
-
```
|
|
247
|
-
Execute the bundled implementation below — Phase 6 (시각 검증 루프, P1=0까지)
|
|
248
|
-
|
|
249
|
-
⤵ Phase 6 후처리
|
|
250
|
-
Load skill `vibe.design-review` — audit 모드
|
|
251
|
-
→ a11y는 항상 검증. 컨벤션 무시 모드여도 접근성은 양보 불가.
|
|
252
|
-
|
|
253
|
-
⛔ Phase 6 + design-review(audit) 완료 전까지 "완료 요약" 출력 금지.
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
> Read `references/branch-phases.md` for the raw-vs-computed note and Phase 6.5 DESIGN.md emission steps (Branch 2).
|
|
257
|
-
|
|
258
|
-
---
|
|
259
|
-
|
|
260
|
-
## Branch 3: `/vibe.figma <plan.md> --create*` — WRITE (plan.md → Figma)
|
|
261
|
-
|
|
262
|
-
**시나리오**: plan.md의 UI 서술(Look & Feel, 레이아웃, 반응형)을 Figma 파일에 디자인으로 생성.
|
|
263
|
-
|
|
264
|
-
**입력**:
|
|
265
|
-
- 라우팅에서 받은 `mdArg` (필수, .md 경로)
|
|
266
|
-
- 라우팅에서 받은 `createMode` ∈ {full, storyboard, design}
|
|
267
|
-
- target Figma file URL/key (Step B에서 질문)
|
|
268
|
-
|
|
269
|
-
**출력**: 지정된 Figma 파일 내 새 페이지/프레임/섹션
|
|
270
|
-
|
|
271
|
-
> **Phase 명명 주의**: Branch 3은 `figma` 스킬의 Phase 0~6과 충돌을 피하기 위해 **Step A~F**로 표기한다.
|
|
272
|
-
> **2단계 생성 원칙**: `createMode == full`이면 본 디자인 직진 금지. 반드시 **와이어프레임(Step D) → 사용자 검토 → 본 디자인(Step E)** 순서.
|
|
273
|
-
|
|
274
|
-
### createMode별 실행 매트릭스
|
|
275
|
-
|
|
276
|
-
> Read `references/step-algorithms.md` for the full per-Step createMode matrix (A–F × full/storyboard/design) and the `design` mode Step E branching summary.
|
|
277
|
-
|
|
278
|
-
### Step A — plan.md 파싱 + 디자인 컨텍스트
|
|
279
|
-
|
|
280
|
-
> Read `references/step-algorithms.md` for the full plan.md required-section extraction list, missing-section rejection message, feature-name rule, and design-context priority resolution.
|
|
281
|
-
|
|
282
|
-
```
|
|
283
|
-
- hasTeach == true 인 경우에만 Load skill `vibe.design-teach`로 인터랙티브 보강
|
|
284
|
-
|
|
285
|
-
3. Load skill `vibe.ui-ux-pro-max`
|
|
286
|
-
→ plan.md의 분위기/타이포/컬러 키워드로 가이드 매칭
|
|
287
|
-
→ 컬러 팔레트, 폰트 페어링, UX 가이드 후보 생성
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
### Step B — Figma 타겟 파일 + State 로드 + Plugin 규칙
|
|
291
|
-
|
|
292
|
-
> Read `references/step-algorithms.md` for the AskUserQuestion prompt, fileKey extraction, and state-file path detail.
|
|
293
|
-
|
|
294
|
-
```
|
|
295
|
-
4. Load skill `figma:figma-use` (MANDATORY prerequisite)
|
|
296
|
-
→ use_figma 호출 규칙 (color 0-1, 폰트 로드, layoutSizing 순서 등)
|
|
297
|
-
|
|
298
|
-
5. Load skill `figma:figma-generate-design`
|
|
299
|
-
→ 디자인 시스템 컴포넌트 발견 + 섹션별 조립 워크플로
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
> Read `references/state-schema.md` for the full state JSON schema, wireHash/designHash rationale, and reuse/reject algorithm.
|
|
303
|
-
|
|
304
|
-
### Step C — 디자인 시스템 발견
|
|
305
|
-
|
|
306
|
-
```
|
|
307
|
-
⛔ createMode == "storyboard" 인 경우 이 Step 전체 SKIP
|
|
308
|
-
(와이어는 컴포넌트/변수 정보가 필요 없음)
|
|
309
|
-
|
|
310
|
-
Load skill `figma:figma-generate-design` — Step 2: Discover Design System
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
> Read `references/step-algorithms.md` for the full 2a/2b/2c discovery sub-steps and unmatched-token prompt.
|
|
314
|
-
|
|
315
|
-
### Step D — 와이어프레임 생성 (incremental + idempotent)
|
|
316
|
-
|
|
317
|
-
**목적**: plan.md 8번(레이아웃)만으로 회색 박스 + 텍스트 placeholder의 골격을 그린다. 컬러/타이포/컴포넌트 인스턴스는 **금지**.
|
|
318
|
-
|
|
319
|
-
```
|
|
320
|
-
⛔ createMode == "design" 인 경우 이 Step 전체 SKIP
|
|
321
|
-
(디자인만 모드는 Step E로 직진 — 와이어 단계 통째로 생략)
|
|
322
|
-
|
|
323
|
-
Load skill `figma:figma-generate-design` — Step 3 패턴 재사용 (와이어 모드)
|
|
324
|
-
|
|
325
|
-
Step D 종료 직전:
|
|
326
|
-
state.updatedAt = now
|
|
327
|
-
Write /tmp/{feature}/figma-create-state.json
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
> Read `references/step-algorithms.md` for the full per-section wire generation algorithm (신규/캐시/구조변경 케이스), incremental-call rule, and responsive handling.
|
|
331
|
-
|
|
332
|
-
#### 🚪 사용자 검토 게이트 (Step D ↔ Step E 사이)
|
|
333
|
-
|
|
334
|
-
```
|
|
335
|
-
⛔ createMode != "full" 인 경우 이 게이트 SKIP
|
|
336
|
-
- storyboard 모드: Step E가 없어서 게이트 의미 없음 → 곧바로 Step F로
|
|
337
|
-
- design 모드: Step D가 없어서 게이트 의미 없음 → Step E 먼저 실행
|
|
338
|
-
|
|
339
|
-
1. mcp__plugin_figma_figma__get_screenshot 으로 와이어 프레임들 캡처
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
> Read `references/step-algorithms.md` for the full user review-gate message template and ralph/ultrawork auto-continue behavior.
|
|
343
|
-
|
|
344
|
-
### Step E — 본 디자인 적용 (incremental + idempotent)
|
|
345
|
-
|
|
346
|
-
**목적**: plan.md 7번+8번+9번 기반으로 컴포넌트 인스턴스/색/타이포/실제 텍스트를 그린다. 모드에 따라 wireNodeId 재사용 여부가 달라진다.
|
|
347
|
-
|
|
348
|
-
```
|
|
349
|
-
⛔ createMode == "storyboard" 인 경우 이 Step 전체 SKIP
|
|
350
|
-
(와이어만 모드는 Step E 없이 Step F로)
|
|
351
|
-
|
|
352
|
-
Load skill `figma:figma-generate-design` — Step 3+: Assemble Sections (디자인 모드)
|
|
353
|
-
|
|
354
|
-
Step E 종료 직전:
|
|
355
|
-
state.planHash = sha256(plan.md 전체)
|
|
356
|
-
state.updatedAt = now
|
|
357
|
-
Write /tmp/{feature}/figma-create-state.json
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
> Read `references/step-algorithms.md` for the full 분기 A (full 모드) / 분기 B (design 모드) pseudocode and common rules (incremental use_figma calls, wireNodeId preservation).
|
|
361
|
-
|
|
362
|
-
### Step F — 시각 검증 + 최종 사용자 확인
|
|
363
|
-
|
|
364
|
-
```
|
|
365
|
-
1. mcp__plugin_figma_figma__get_screenshot 으로 생성된 프레임 캡처
|
|
366
|
-
- createMode == "storyboard" → wireNodeId들 캡처
|
|
367
|
-
- createMode == "design" → designNodeId들 캡처
|
|
368
|
-
- createMode == "full" → designNodeId들 캡처
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
> Read `references/step-algorithms.md` for the full per-mode LLM self-check list and final user-facing summary template.
|
|
372
|
-
|
|
373
|
-
```
|
|
374
|
-
⛔ Step F 완료 전까지 "완료 요약" 출력 금지.
|
|
375
|
-
⛔ 코드 파일 생성 절대 금지 (이 Branch는 WRITE-to-Figma 전용).
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
---
|
|
124
|
+
Branch 1/2 Phase 의 상세 elaboration: `references/branch-phases.md`
|
|
125
|
+
Branch 3 의 state 스키마와 알고리즘: `references/state-schema.md` · `references/step-algorithms.md`
|
|
379
126
|
|
|
380
127
|
## Branch 간 절대 금지 사항
|
|
381
128
|
|
|
@@ -386,11 +133,6 @@ Load skill `figma:figma-generate-design` — Step 3+: Assemble Sections (디자
|
|
|
386
133
|
❌ Branch 결정 후 다른 Branch의 Phase로 점프 금지
|
|
387
134
|
```
|
|
388
135
|
|
|
389
|
-
## Bundled implementation
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
# vibe.figma — Structural Code Generation
|
|
393
|
-
|
|
394
136
|
## Core Principles
|
|
395
137
|
|
|
396
138
|
```
|
|
@@ -398,7 +140,7 @@ The Figma tree is the source of truth for code. Screenshots are for verification
|
|
|
398
140
|
|
|
399
141
|
✅ Figma Auto Layout → CSS Flexbox 1:1 mechanical mapping
|
|
400
142
|
✅ Figma CSS properties → SCSS direct conversion (no guessing)
|
|
401
|
-
✅
|
|
143
|
+
✅ The active harness handles semantic decisions only: tag selection, component splitting, interactions
|
|
402
144
|
```
|
|
403
145
|
|
|
404
146
|
## Immutable Rules
|
|
@@ -411,429 +153,21 @@ The Figma tree is the source of truth for code. Screenshots are for verification
|
|
|
411
153
|
no matter how complex, implement with HTML+CSS.
|
|
412
154
|
```
|
|
413
155
|
|
|
414
|
-
##
|
|
415
|
-
|
|
416
|
-
```
|
|
417
|
-
Input: receive all URLs at once
|
|
418
|
-
Storyboard: figma.com/...?node-id=aaa (if present)
|
|
419
|
-
MO Design: figma.com/...?node-id=xxx
|
|
420
|
-
PC Design: figma.com/...?node-id=yyy (if present)
|
|
421
|
-
|
|
422
|
-
→ Phase 0: Setup
|
|
423
|
-
→ Phase 1: Storyboard analysis → functional spec document
|
|
424
|
-
→ Phase 2: Gather materials (→ Extract Mode section below)
|
|
425
|
-
→ Phase 3: Remapping (MO↔PC matching → remapped.json)
|
|
426
|
-
→ Phase 4: Sequential code generation (→ Convert Mode section below)
|
|
427
|
-
→ Phase 5: Compile gate
|
|
428
|
-
→ Phase 6: Visual verification loop
|
|
429
|
-
|
|
430
|
-
Working directory: /tmp/{feature}/{mo,pc}-main/{tree.json, bg/, content/, sections/}
|
|
431
|
-
+ remapped.json ← sole input for Phase 4
|
|
432
|
-
Code output: directly in the project — components/{feature}/, styles/{feature}/
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
---
|
|
436
|
-
|
|
437
|
-
## Phase 0: Setup
|
|
438
|
-
|
|
439
|
-
```
|
|
440
|
-
1. Stack detection: package.json → react/vue/svelte, next/nuxt, scss/tailwind
|
|
441
|
-
2. Feature name: Figma filename → kebab-case
|
|
442
|
-
3. Directories: components/{feature}/, public/images/{feature}/, styles/{feature}/
|
|
443
|
-
4. Component indexing → component-index.json (≤50 components, props/slots/classes, ≤2 min)
|
|
444
|
-
5. Hooks/Types/Constants → context-index.json
|
|
445
|
-
6. Design token scan → project-tokens.json (SCSS > CSS Variables > Tailwind > CSS-in-JS)
|
|
446
|
-
(all indexes under /tmp/{feature}/)
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
---
|
|
450
|
-
|
|
451
|
-
## Phase 1: Storyboard Analysis
|
|
452
|
-
|
|
453
|
-
```
|
|
454
|
-
User input: URLs or PDF/images separated by newlines
|
|
455
|
-
URL classification (automatic): different fileKey → storyboard vs design;
|
|
456
|
-
ROOT name contains "MO" → mobile, "PC" → desktop
|
|
457
|
-
|
|
458
|
-
Storyboard analysis: collect frames at depth=3 → classify by name pattern
|
|
459
|
-
SPEC (functional definition) → CONFIG (resolution) → PAGE (main sections) → SHARED (common)
|
|
460
|
-
PDF/images follow the same structural extraction
|
|
461
|
-
|
|
462
|
-
❌ No code file creation during Phase 1
|
|
463
|
-
|
|
464
|
-
Output (text only): section list table · per-section functional definition
|
|
465
|
-
([Function] + [Interaction] + [State]) · common component list · TS interface draft
|
|
466
|
-
```
|
|
467
|
-
|
|
468
|
-
---
|
|
469
|
-
|
|
470
|
-
## Phase 2: Gather Materials ← Research (parallel)
|
|
471
|
-
|
|
472
|
-
**→ Follow the Extract Mode rules below.**
|
|
473
|
-
**Coordinator pattern: run MO/PC extraction as parallel workers.**
|
|
474
|
-
|
|
475
|
-
```
|
|
476
|
-
# [FIGMA_SCRIPT] = {{VIBE_PATH}}/hooks/scripts/figma-extract.js
|
|
477
|
-
|
|
478
|
-
Simultaneous MO/PC extraction — each worker: screenshot → tree → images →
|
|
479
|
-
asset rendering → sections/. Proceed to Phase 3 only after both complete.
|
|
480
|
-
Single BP: run sequentially with 1 worker
|
|
481
|
-
Multi-frame (same BP, different pages): sequential (500ms interval), partial failure allowed
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
---
|
|
485
|
-
|
|
486
|
-
## Phase 3: Data Refinement ← Synthesis (independent per BP)
|
|
487
|
-
|
|
488
|
-
**Split and refine each BP's tree.json by section. MO↔PC matching is NOT done here.**
|
|
489
|
-
|
|
490
|
-
### BLOCKING Command — Writing custom refine scripts is strictly forbidden
|
|
491
|
-
|
|
492
|
-
```bash
|
|
493
|
-
# MO
|
|
494
|
-
node {{VIBE_PATH}}/hooks/scripts/figma-refine.js \
|
|
495
|
-
/tmp/{feature}/mo-main/tree.json \
|
|
496
|
-
--out=/tmp/{feature}/mo-main/sections.json \
|
|
497
|
-
--design-width=720 \
|
|
498
|
-
--bp=mo
|
|
499
|
-
|
|
500
|
-
# PC
|
|
501
|
-
node {{VIBE_PATH}}/hooks/scripts/figma-refine.js \
|
|
502
|
-
/tmp/{feature}/pc-main/tree.json \
|
|
503
|
-
--out=/tmp/{feature}/pc-main/sections.json \
|
|
504
|
-
--design-width=2560 \
|
|
505
|
-
--bp=pc
|
|
506
|
-
```
|
|
507
|
-
|
|
508
|
-
⛔ **Phase 4 is blocked until these commands are executed.**
|
|
509
|
-
⛔ **No custom refine scripts, no parsing tree.json directly to produce sections.json.**
|
|
510
|
-
✅ Use only figma-refine.js output. If unsatisfactory, modify figma-refine.js.
|
|
511
|
-
|
|
512
|
-
```
|
|
513
|
-
⛔ Refine each BP independently — do NOT mix MO and PC.
|
|
514
|
-
⛔ The refined JSON (full recursive subtree per section) is the sole input for Phase 4.
|
|
515
|
-
```
|
|
516
|
-
|
|
517
|
-
### Output
|
|
518
|
-
|
|
519
|
-
```
|
|
520
|
-
/tmp/{feature}/{mo,pc}-main/sections.json ← per-BP refinement result
|
|
521
|
-
|
|
522
|
-
sections.json structure:
|
|
523
|
-
{
|
|
524
|
-
meta: { feature, designWidth, bp },
|
|
525
|
-
sections: [{
|
|
526
|
-
name: "Hero", nodeId, type, size, css,
|
|
527
|
-
text, imageRef, fills, layoutSizingH, layoutSizingV,
|
|
528
|
-
children: [ ... ], // ⛔ full recursive subtree — down to leaf nodes
|
|
529
|
-
images: { bg: "bg/hero-bg.webp", content: ["content/hero-title.webp"] }
|
|
530
|
-
}]
|
|
531
|
-
}
|
|
532
|
-
```
|
|
533
|
-
|
|
534
|
-
### Node Refinement Rules (tree.json → sections.json)
|
|
156
|
+
## 공통 구현 (READ Branch 공통 Phase 0–6)
|
|
535
157
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
2. BG frames → separate from children, move to images.bg
|
|
539
|
-
3. Vector-text GROUPs + design text (TEXT with multiple/gradient fills or effects)
|
|
540
|
-
→ separate from children, add to images.content
|
|
541
|
-
4. Remaining nodes → keep in children (with CSS, recursive)
|
|
542
|
-
|
|
543
|
-
Multi-frame (same BP, different pages): identify common elements → shared components;
|
|
544
|
-
union of common tokens → shared _tokens.scss
|
|
545
|
-
```
|
|
546
|
-
|
|
547
|
-
---
|
|
548
|
-
|
|
549
|
-
## Phase 4: Per-BP Static Implementation ← Implement (sequential per BP)
|
|
158
|
+
Extract/Convert Mode 의 실제 구현 — 작업 디렉토리, BLOCKING 명령어, 컴파일 게이트, 시각 검증 루프:
|
|
159
|
+
`references/core-implementation.md`
|
|
550
160
|
|
|
551
|
-
**→ Follow the Convert Mode rules below.**
|
|
552
|
-
**⛔ Implement MO fully first → pass verification → then implement PC. No responsive conversion.**
|
|
553
|
-
**⛔ CSS values must use Figma original px as-is. vw conversion, clamp, @media are forbidden.**
|
|
554
|
-
|
|
555
|
-
### BLOCKING Command — SCSS must only use script output
|
|
556
|
-
|
|
557
|
-
```bash
|
|
558
|
-
# Step A: Auto-generate SCSS skeleton (run once per BP)
|
|
559
|
-
node {{VIBE_PATH}}/hooks/scripts/figma-to-scss.js \
|
|
560
|
-
/tmp/{feature}/{bp}-main/sections.json \
|
|
561
|
-
--out=/path/to/project/assets/scss/{feature}/
|
|
562
|
-
|
|
563
|
-
# Step B: Per-section validation (after writing each section's code)
|
|
564
|
-
node {{VIBE_PATH}}/hooks/scripts/figma-validate.js \
|
|
565
|
-
/path/to/project/assets/scss/{feature}/ \
|
|
566
|
-
/tmp/{feature}/{bp}-main/sections.json \
|
|
567
|
-
--section={SectionName}
|
|
568
161
|
```
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
⛔ **No CSS values inside scoped style blocks** — only @import/@use of external SCSS files.
|
|
573
|
-
✅ Use figma-to-scss.js output as-is. If unsatisfactory, modify figma-to-scss.js.
|
|
574
|
-
|
|
575
|
-
```
|
|
576
|
-
Phase 4A: MO Static Implementation (input: mo-main/sections.json)
|
|
577
|
-
⛔ No parallelism. Process one section at a time:
|
|
578
|
-
1. Read the target section from sections.json
|
|
579
|
-
2. Write an image vs HTML classification table (BLOCKING — see Convert Mode §C1)
|
|
580
|
-
3. figma-to-scss.js → auto-generate SCSS skeleton (px as-is) — Step A once
|
|
581
|
-
4. Claude: HTML structure + semantic tags + layout + interactions (Vue/React files only)
|
|
582
|
-
5. figma-validate.js — Step B: PASS → next section │ FAIL → fix → re-run
|
|
583
|
-
(repeat until P1=0, no round cap)
|
|
584
|
-
→ Phase 5 (MO compile) → Phase 6 (MO visual verification)
|
|
585
|
-
|
|
586
|
-
Phase 4B: PC Static Implementation (input: pc-main/sections.json)
|
|
587
|
-
Same process as MO → Phase 5 (PC compile) → Phase 6 (PC visual verification)
|
|
588
|
-
|
|
589
|
-
Phase 4C: Responsive Integration (after both MO+PC pass verification)
|
|
590
|
-
→ Separate flow to be established (TODO)
|
|
591
|
-
|
|
592
|
-
Claude's role (restricted): semantic decisions only (Convert Mode §C3) + image classification
|
|
593
|
-
+ executing figma-to-scss.js / figma-validate.js.
|
|
594
|
-
❌ No modifying SCSS values, no CSS in <style> blocks, no vw/clamp/@media,
|
|
595
|
-
no custom functions/mixins, no custom refine/generate scripts.
|
|
596
|
-
|
|
597
|
-
SCSS Setup (before the first section):
|
|
598
|
-
index.scss, _tokens.scss, _base.scss
|
|
599
|
-
Token mapping: reference existing tokens from project-tokens.json → create new ones if no match
|
|
600
|
-
|
|
601
|
-
Component matching (before each section):
|
|
602
|
-
Compare against component-index.json → import if matched, create new if not
|
|
603
|
-
|
|
604
|
-
Multi-frame:
|
|
605
|
-
Step 1: shared components first → components/shared/
|
|
606
|
-
Step 2: unique sections per frame
|
|
607
|
-
```
|
|
608
|
-
|
|
609
|
-
---
|
|
610
|
-
|
|
611
|
-
## Phase 5: Compile Gate
|
|
612
|
-
|
|
613
|
-
```
|
|
614
|
-
No round cap. Loop until compile succeeds (or stuck → ask user).
|
|
615
|
-
|
|
616
|
-
0. Capture baseline (before Phase 4): record existing tsc + build errors → fix NEW errors only
|
|
617
|
-
1. TypeScript: vue-tsc/svelte-check/tsc --noEmit
|
|
618
|
-
2. Build: npm run build (120s timeout)
|
|
619
|
-
3. Dev server: npm run dev → detect port → polling
|
|
620
|
-
|
|
621
|
-
On error: parse → auto-fix → re-check
|
|
622
|
-
Termination:
|
|
623
|
-
✅ Success: all checks pass → enter Phase 6
|
|
624
|
-
⚠️ Stuck (same errors as previous round) → ask user: fix instructions │ "proceed"
|
|
625
|
-
(record TODO, go to Phase 6) │ "abort". ultrawork: record TODO + proceed silently.
|
|
626
|
-
|
|
627
|
-
On completion: preserve dev server PID → used in Phase 6
|
|
628
|
-
|
|
629
|
-
⛔ After Phase 5 passes (or user proceeds), must enter Phase 6.
|
|
630
|
-
Do NOT output a "completion summary" or declare work complete without Phase 6.
|
|
631
|
-
```
|
|
632
|
-
|
|
633
|
-
---
|
|
634
|
-
|
|
635
|
-
## Phase 6: Visual Verification Loop ← Verify (parallel) MANDATORY
|
|
636
|
-
|
|
637
|
-
**⛔ Mandatory — enter automatically upon Phase 5 completion; skipping = task "incomplete".**
|
|
638
|
-
**Coordinator pattern: independent per-section verification can run as parallel workers.**
|
|
639
|
-
|
|
640
|
-
```
|
|
641
|
-
No round cap. Loop until P1=0 (or stuck → ask user).
|
|
642
|
-
Infrastructure: src/infra/lib/browser/ (Puppeteer + CDP)
|
|
643
|
-
|
|
644
|
-
1. Capture rendered screenshot → pixelmatch comparison against Figma screenshot
|
|
645
|
-
diffRatio > 0.1 → P1
|
|
646
|
-
2. CSS value comparison: computed CSS vs tree.json expected values
|
|
647
|
-
delta > 4px → P1, ≤ 4px → P2
|
|
648
|
-
3. Check for missing images and text
|
|
649
|
-
4. Fix P1 issues first (refer to tree.json, no guessing) → revalidate compile → reload
|
|
650
|
-
|
|
651
|
-
Narrowing scope: Round 1 P1+P2+P3 → Round 2 P1+P2 → Round 3+ P1 only (until P1=0)
|
|
652
|
-
|
|
653
|
-
Termination:
|
|
654
|
-
✅ Success: P1 = 0 AND no new findings → complete
|
|
655
|
-
⚠️ Stuck (same findings as previous round) → ask user: direct resolution │ "proceed"
|
|
656
|
-
(record TODO, complete) │ "abort". ultrawork: record TODO + complete silently.
|
|
657
|
-
|
|
658
|
-
Responsive: after MO verification, change viewport → same loop against PC screenshots
|
|
659
|
-
Cleanup: shut down browser + dev server
|
|
660
|
-
|
|
661
|
-
⛔ "Completion summary" output is only allowed after Phase 6 is complete (or user proceeds).
|
|
662
|
-
```
|
|
663
|
-
|
|
664
|
-
---
|
|
665
|
-
|
|
666
|
-
## Extract Mode (Phase 2 body) — Acquire Code Generation Data
|
|
667
|
-
|
|
668
|
-
Uses the Figma REST API (`src/infra/lib/figma/`) to extract **all data needed for structural code generation**. Priority: 1st node tree + CSS (PRIMARY source) → 2nd image assets → 3rd screenshots (Phase 6 validation only, never for generation).
|
|
669
|
-
|
|
670
|
-
### E1. Node Tree + CSS — Source of Truth
|
|
671
|
-
|
|
672
|
-
```
|
|
673
|
-
Bash:
|
|
674
|
-
node "{{VIBE_PATH}}/hooks/scripts/figma-extract.js" tree {fileKey} {nodeId}
|
|
675
|
-
|
|
676
|
-
Returns (FigmaNode JSON):
|
|
677
|
-
{ nodeId, name, type, size, css: { display, flexDirection, gap, ... },
|
|
678
|
-
text (TEXT only), imageRef, imageScaleMode (FILL/FIT/CROP/TILE),
|
|
679
|
-
layoutSizingH/V (FIXED/HUG/FILL), fills (only when 2+), isMask,
|
|
680
|
-
raw: { itemSpacing, padding*, cornerRadius, strokeWeight, strokeAlign, blendMode,
|
|
681
|
-
opacity, fontSize, lineHeightPx, letterSpacing, fontWeight, leadingTrim,
|
|
682
|
-
textBoxTrim }, ← Figma numbers for Phase 6 raw-vs-computed reconciliation
|
|
683
|
-
warnings: [{ property, value, severity: "P1"|"P2", reason }], ← translation-loss only
|
|
684
|
-
children: [...] }
|
|
685
|
-
|
|
686
|
-
Root node also carries:
|
|
687
|
-
auditSummary: { total, p1, p2, items: [{ nodeId, name, property, value, severity, reason }] }
|
|
688
|
-
|
|
689
|
-
→ Save to /tmp/{feature}/tree.json
|
|
690
|
-
|
|
691
|
-
Figma property → CSS mapping (what the extractor auto-converts): rubrics/css-mapping.md
|
|
692
|
-
```
|
|
693
|
-
|
|
694
|
-
### E2. Translation-loss Audit (Figma → CSS Incompatibilities)
|
|
695
|
-
|
|
696
|
-
The extractor flags properties CSS cannot reproduce cleanly (per-node `warnings[]`, rolled up as root `auditSummary`).
|
|
697
|
-
|
|
698
|
-
**P1 (block Phase 3 until resolved or waived):** `strokeAlign` ≠ `CENTER` (CSS border only renders centered strokes) · `blendMode` ∈ { `LINEAR_BURN`, `LINEAR_DODGE`, `PLUS_DARKER`, `PLUS_LIGHTER` } (no CSS equivalent).
|
|
699
|
-
|
|
700
|
-
**P2 (record + proceed):** `leadingTrim`/`textBoxTrim` ≠ `NONE` (limited `text-box-trim` support) · `constraints` ∈ { `SCALE`, `CENTER` } (no direct CSS layout mapping) · `individualStrokeWeights` with `strokeAlign` ≠ `CENTER`.
|
|
701
|
-
|
|
702
|
-
**Gate rule:** if `auditSummary.p1 > 0`, resolve each item (replace layer in Figma, accept approximation with user sign-off, or mark as known deviation) before Phase 3. Log P2 items into feature notes for Phase 6 reviewer attention.
|
|
703
|
-
|
|
704
|
-
### E3. Image Assets — Node Rendering Based
|
|
705
|
-
|
|
706
|
-
Full determination rules and real-world failure cases: `rubrics/image-rules.md`.
|
|
707
|
-
|
|
708
|
-
```
|
|
709
|
-
Do NOT download imageRef individually (shared texture fill → multi-MB originals).
|
|
710
|
-
All images are rendered as nodes:
|
|
711
|
-
node "{{VIBE_PATH}}/hooks/scripts/figma-extract.js" screenshot {fileKey} {nodeId} --out=...
|
|
712
|
-
|
|
713
|
-
BG frames → bg/{section}-bg.webp
|
|
714
|
-
Identification: name contains "BG"/"bg", OR same size as parent (±10%) + 3+ child images
|
|
715
|
-
Content nodes → content/{name}.webp
|
|
716
|
-
Icons (VECTOR/GROUP ≤ 64px) · item/reward/token/coin thumbnails
|
|
717
|
-
· vector-text GROUPs (3+ VECTORs, each <60px)
|
|
718
|
-
· design text (TEXT with 2+ fills, effects, GRADIENT fill, or non-web-font fontFamily)
|
|
719
|
-
→ must be rendered; placed as <img alt="text content">, never CSS text
|
|
720
|
-
· decorative panels (textured backgrounds) → render like BG frames
|
|
721
|
-
|
|
722
|
-
imageRef download is a fallback only (API failure, DOCUMENT level); >5MB → texture-fill warning.
|
|
723
|
-
Screenshots (validation only): full-screenshot.webp + per 1-depth child → sections/{name}.webp
|
|
724
|
-
```
|
|
725
|
-
|
|
726
|
-
### E4. Extraction Completion Validation (Required Before Phase 3)
|
|
727
|
-
|
|
728
|
-
```
|
|
729
|
-
If any item is missing → re-extract (do NOT proceed to Phase 3)
|
|
730
|
-
|
|
731
|
-
1. tree.json exists + root children > 0 · 2. BG per section exists in bg/
|
|
732
|
-
3. Every design-text TEXT node (2+ fills or effects) rendered in content/
|
|
733
|
-
4. Every vector-text GROUP (3+ VECTORs) rendered in content/
|
|
734
|
-
5. Per-section validation screenshots exist in sections/ · 6. All filenames kebab-case
|
|
735
|
-
```
|
|
736
|
-
|
|
737
|
-
---
|
|
738
|
-
|
|
739
|
-
## Convert Mode (Phase 4 body) — Tree-Based Structured Code Generation
|
|
740
|
-
|
|
741
|
-
**Mechanically map sections.json to HTML. Do not guess.**
|
|
742
|
-
**Claude handles only semantic decisions (tag selection, component separation, interactions). SCSS comes from figma-to-scss.js (Phase 4 blocking commands).**
|
|
743
|
-
|
|
744
|
-
### C0. Reuse Check (Before Writing Code)
|
|
745
|
-
|
|
746
|
-
```
|
|
747
|
-
Matching component in component-index.json?
|
|
748
|
-
✅ Import and customize via props — do not create a new one
|
|
749
|
-
❌ Never modify an existing component's internals or duplicate a 90%-similar one
|
|
750
|
-
```
|
|
751
|
-
|
|
752
|
-
### C1. Image vs HTML Determination (BLOCKING)
|
|
753
|
-
|
|
754
|
-
```
|
|
755
|
-
⛔ Before writing code: write the determination table first.
|
|
756
|
-
|
|
757
|
-
YES on any one → HTML:
|
|
758
|
-
Q1. TEXT children? · Q2. repeating INSTANCE? (→ v-for, inner assets only as <img>)
|
|
759
|
-
Q3. interactive? (btn, CTA → <button>) · Q4. dynamic data? (price, quantity, duration)
|
|
760
|
-
All NO → image rendering is acceptable
|
|
761
|
-
|
|
762
|
-
⛔ Design text (Q1 exception — must be image; D1–D5, same as Extract Mode E3):
|
|
763
|
-
D1. 2+ fills · D2. effects (DROP_SHADOW, stroke) · D3. GRADIENT fill
|
|
764
|
-
D4. parent GROUP/FRAME has 3+ VECTORs · D5. fontFamily not in project web fonts
|
|
765
|
-
→ <img src="content/{section}-{name}.webp" alt="text content"> — no CSS text attempt
|
|
766
|
-
|
|
767
|
-
BG frames: ❌ no <img> tags — parent SCSS background-image only
|
|
768
|
-
.section { background-image: url('bg.webp'); background-size: cover; }
|
|
769
|
-
```
|
|
770
|
-
|
|
771
|
-
### C2. Node → HTML Mapping (Mechanical)
|
|
772
|
-
|
|
773
|
-
```
|
|
774
|
-
FRAME + Auto Layout → <div> + flex (direction/gap/padding directly mapped)
|
|
775
|
-
FRAME + no Auto Layout → <div> + position:relative (children absolute)
|
|
776
|
-
TEXT → <span> (Claude promotes to h2/p/button)
|
|
777
|
-
IMAGE fill (passed determination) → <img>
|
|
778
|
-
VECTOR/GROUP ≤64px → icon <img>
|
|
779
|
-
INSTANCE repeated 2+ → v-for / .map()
|
|
780
|
-
Size 0px, VECTOR ≤2px → skip
|
|
781
|
-
```
|
|
782
|
-
|
|
783
|
-
CSS property mapping reference (grounding for figma-to-scss.js output review, plus legacy vw/responsive rules): `rubrics/css-mapping.md` — Phase 4 forbids hand-writing these values.
|
|
784
|
-
|
|
785
|
-
### C3. Claude Semantic Decisions (The Only Inference Area)
|
|
786
|
-
|
|
787
|
-
```
|
|
788
|
-
1. Tag promotion: <span> → <h2> (section title) / <p> (description) / <button> (clickable)
|
|
789
|
-
2. Component separation: 1st-depth children = sections, INSTANCE repetition = shared
|
|
790
|
-
3. Interactions: @click handlers, state variables, conditional rendering
|
|
791
|
-
4. Accessibility: decorative → alt="" aria-hidden="true" · content → alt="description"
|
|
792
|
-
· interactive → role, aria-label
|
|
793
|
-
5. Semantic HTML: top-level <section>, heading order h1~h6, lists <ul>/<ol>
|
|
794
|
-
```
|
|
795
|
-
|
|
796
|
-
Component skeleton template: `templates/component.md`.
|
|
797
|
-
|
|
798
|
-
### C4. SCSS File Structure
|
|
799
|
-
|
|
800
|
-
```
|
|
801
|
-
layout/ → position, display, flex, width, height, padding, gap, overflow, z-index
|
|
802
|
-
components/ → font, color, border, shadow, opacity, background
|
|
803
|
-
_base.scss → .{feature} { width: 100%; max-width: 720px; margin: 0 auto; overflow-x: hidden; }
|
|
804
|
-
_tokens.scss → reference existing tokens (@use); if no mapping, create a new
|
|
805
|
-
feature-scoped token ($feature-color-xxx)
|
|
806
|
-
```
|
|
807
|
-
|
|
808
|
-
### C5. Self-Validation
|
|
809
|
-
|
|
810
|
-
```
|
|
811
|
-
⛔ Any failure → rewrite that section's code (do not proceed to the next section)
|
|
812
|
-
|
|
813
|
-
1. All template classes defined in SCSS · 2. Image src files actually exist
|
|
814
|
-
3. Auto Layout node → flex present in SCSS
|
|
815
|
-
4. ⛔ No @function/@mixin defined in SCSS (existing token @use is allowed)
|
|
816
|
-
5. ⛔ Every SCSS property grounded in sections.json css object
|
|
817
|
-
(aspect-ratio, container queries, etc. not in the tree → FAIL)
|
|
818
|
-
6. ⛔ Image filenames kebab-case (hash filenames like 68ad470b.webp → FAIL)
|
|
162
|
+
Working directory: /tmp/{feature}/{mo,pc}-main/{tree.json, bg/, content/, sections/}
|
|
163
|
+
+ remapped.json ← Phase 4 의 유일한 입력
|
|
164
|
+
Code output: 프로젝트에 직접 — components/{feature}/, styles/{feature}/
|
|
819
165
|
```
|
|
820
166
|
|
|
821
|
-
|
|
167
|
+
## Done Criteria
|
|
822
168
|
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
| Figma API 401 | Prompt user to set FIGMA_ACCESS_TOKEN in env or ~/.vibe/config.json |
|
|
829
|
-
| Figma API 404 | Verify fileKey from URL; check file is shared/accessible |
|
|
830
|
-
| Figma API 429 (rate limit) | Wait 60s, retry with reduced node scope (single page) |
|
|
831
|
-
| API timeout on large file | Split request by page via nodeId parameter |
|
|
832
|
-
| Screenshot download failure | Proceed with tree.json only (visual verification → manual) |
|
|
833
|
-
| tree.json missing in Phase 4 | Run Extract Mode (Phase 2) first |
|
|
834
|
-
| component-index.json missing | Generate minimal index from tree.json section names |
|
|
835
|
-
| sections.json malformed | Regenerate from tree.json via figma-refine.js |
|
|
836
|
-
| SCSS output empty | Check sections.json for valid style nodes; else default reset styles |
|
|
837
|
-
| figma-to-scss.js parse failure | Validate tree.json structure; if malformed, re-run Extract Mode |
|
|
838
|
-
| figma-validate.js comparison failure | Skip automated validation; screenshot side-by-side manual review |
|
|
839
|
-
| Puppeteer/CDP not available | Skip visual verification; manual browser check |
|
|
169
|
+
- [ ] Branch Routing 알고리즘이 실행됐고 결정된 Branch 가 명시됐다
|
|
170
|
+
- [ ] 결정된 Branch 의 reference 하나만 로드됐다 (다른 Branch Phase 혼입 없음)
|
|
171
|
+
- [ ] READ Branch: Phase 5 컴파일 게이트 통과 후 Phase 6 시각 검증 P1=0
|
|
172
|
+
- [ ] WRITE Branch: Step F 시각 검증 + 사용자 최종 확인 완료
|
|
173
|
+
- [ ] 이미지 렌더링 금지 규칙(Immutable Rule 1–2) 위반 0건
|