@su-record/vibe 2.8.34 → 2.8.35
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/package.json +1 -1
- package/skills/vibe.figma/SKILL.md +41 -161
package/package.json
CHANGED
|
@@ -225,181 +225,58 @@ SCSS 파일 기본 내용 Write:
|
|
|
225
225
|
|
|
226
226
|
### 2-2. 섹션 루프
|
|
227
227
|
|
|
228
|
-
**섹션별로 a→
|
|
228
|
+
**섹션별로 a→d 순서는 지키되, 섹션 간 병렬 처리 허용.**
|
|
229
229
|
**단, 첫 번째 섹션(Hero)은 단독 완료 후 나머지를 병렬로.**
|
|
230
230
|
|
|
231
|
-
#### a.
|
|
231
|
+
#### a. render 실행 (BLOCKING)
|
|
232
232
|
|
|
233
233
|
```
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
# [FIGMA_SCRIPT] = ~/.vibe/hooks/scripts/figma-extract.js
|
|
235
|
+
node "[FIGMA_SCRIPT]" render {fileKey} {섹션.nodeId} --out=/tmp/{feature}-{section}/ --depth=10
|
|
236
236
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
{
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
children: [...]
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
CSS는 Figma 노드 속성에서 직접 추출 — Tailwind 역변환 불필요:
|
|
251
|
-
fills → background-color effects → box-shadow, filter
|
|
252
|
-
strokes → border style → font-family, font-size, color
|
|
253
|
-
layoutMode → display:flex itemSpacing → gap
|
|
254
|
-
padding* → padding cornerRadius → border-radius
|
|
255
|
-
|
|
256
|
-
인스턴스 내부 자식도 depth로 전부 조회 가능 (MCP 한계 해결).
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
#### b. 이미지 다운로드 (BLOCKING)
|
|
237
|
+
한 번 호출로 아래 파일이 생성됨:
|
|
238
|
+
/tmp/{feature}-{section}/
|
|
239
|
+
├── {section}.html ← HTML 구조 (class명 포함)
|
|
240
|
+
├── {section}.scss ← 전체 SCSS (모든 CSS 속성)
|
|
241
|
+
├── {section}.json ← 원본 트리 JSON
|
|
242
|
+
├── {section}-screenshot.png ← 섹션 스크린샷 (시각 기준점)
|
|
243
|
+
└── images/
|
|
244
|
+
├── {section}-bg-composite.png ← 복합 BG 합성 이미지
|
|
245
|
+
├── {section}-title.png ← 이름 있는 이미지
|
|
246
|
+
└── ...
|
|
260
247
|
|
|
248
|
+
이미지는 노드 name 기반 파일명 (해시 아님).
|
|
249
|
+
복합 BG(3개+ 하위 레이어)는 자동으로 합성 스크린샷 생성.
|
|
250
|
+
인스턴스 내부 자식도 depth로 전부 조회.
|
|
261
251
|
```
|
|
262
|
-
트리에서 imageRef가 있는 노드를 수집 → Figma API로 다운로드.
|
|
263
252
|
|
|
264
|
-
|
|
265
|
-
node "[FIGMA_SCRIPT]" images {fileKey} {섹션.nodeId} --out=images/{feature}/ --depth=10
|
|
253
|
+
#### b. 생성물 적용
|
|
266
254
|
|
|
267
|
-
검증: result.total = refs.size (누락 0)
|
|
268
|
-
전부 완료해야 c 단계로 진행.
|
|
269
255
|
```
|
|
256
|
+
render 출력물을 프로젝트에 적용:
|
|
270
257
|
|
|
271
|
-
|
|
258
|
+
1. 이미지 복사:
|
|
259
|
+
/tmp/{feature}-{section}/images/* → static/images/{feature}/
|
|
272
260
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
3. 매핑 테이블 출력:
|
|
280
|
-
|
|
281
|
-
┌─────────────────────┬──────────────────┬────────────────────────────────────┐
|
|
282
|
-
│ Phase 1 클래스 │ 트리 노드 name │ 추출된 CSS 값 │
|
|
283
|
-
├─────────────────────┼──────────────────┼────────────────────────────────────┤
|
|
284
|
-
│ .kidSection │ KID (root) │ flex, column, gap:32px, pad:48px │
|
|
285
|
-
│ .kidBg │ BG │ absolute, 720x800 │
|
|
286
|
-
│ .kidLoginBtn │ Btn_Login │ flex, border, shadow, 640x148 │
|
|
287
|
-
│ .kidLoginBtnText │ (TEXT 노드) │ fontSize:36px, color:#fff, w:700 │
|
|
288
|
-
│ .kidDivider │ Divider │ 640x1 │
|
|
289
|
-
│ .kidSteamLink │ steam_account │ fontSize:24px, w:600 │
|
|
290
|
-
│ .kidSteamNote │ (하위 TEXT) │ fontSize:20px, color:#dadce3 │
|
|
291
|
-
└─────────────────────┴──────────────────┴────────────────────────────────────┘
|
|
292
|
-
|
|
293
|
-
매핑 기준:
|
|
294
|
-
name 일치 → 직접 매핑
|
|
295
|
-
name 없음 → 트리 위치/text 내용으로 판단
|
|
296
|
-
Phase 1에 없는 요소 → 클래스 신규 추가 (template에도 반영)
|
|
297
|
-
트리에 없는 클래스 → 스타일 없이 유지
|
|
298
|
-
```
|
|
261
|
+
2. SCSS 적용:
|
|
262
|
+
{section}.scss를 읽고 scaleFactor 적용하여 프로젝트 SCSS에 Write:
|
|
263
|
+
styles/{feature}/layout/_{section}.scss ← position, display, flex, width, height
|
|
264
|
+
styles/{feature}/components/_{section}.scss ← font, color, border, shadow
|
|
265
|
+
styles/{feature}/_tokens.scss ← 새 값 추가 (primitive/semantic, vibe.figma.convert 참조)
|
|
266
|
+
index.scss에 새 섹션 @import 추가.
|
|
299
267
|
|
|
300
|
-
|
|
268
|
+
3. template 업데이트:
|
|
269
|
+
{section}.html을 읽고 Phase 1 컴포넌트에 반영:
|
|
270
|
+
- HTML 구조를 프로젝트 스택으로 변환 (class 유지)
|
|
271
|
+
- 이미지 경로를 static/images/{feature}/ 로 교체
|
|
272
|
+
- Phase 1 기능 요소(v-for, @click, v-if, $emit) 재배치
|
|
273
|
+
- script(JSDoc, 인터페이스, 핸들러) 보존
|
|
301
274
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
CSS 값은 트리에서 이미 추출되어 있으므로 변환 불필요 — 그대로 사용.
|
|
305
|
-
|
|
306
|
-
scaleFactor 적용:
|
|
307
|
-
px 값 → × scaleFactor (font-size, padding, margin, gap, width, height, border-radius)
|
|
308
|
-
적용 안 함 → color, opacity, font-weight, z-index, line-height(단위 없음), % 값
|
|
309
|
-
|
|
310
|
-
출력 파일:
|
|
311
|
-
styles/{feature}/layout/_{section}.scss
|
|
312
|
-
→ position, display, flex, width, height, padding, overflow, z-index, background-image
|
|
313
|
-
styles/{feature}/components/_{section}.scss
|
|
314
|
-
→ font-size, font-weight, color, line-height, letter-spacing, text-align,
|
|
315
|
-
border, border-radius, box-shadow, opacity
|
|
316
|
-
styles/{feature}/_tokens.scss
|
|
317
|
-
→ primitive/semantic 구조로 토큰 관리 (아래 참조)
|
|
318
|
-
|
|
319
|
-
_tokens.scss 구조 (primitive/semantic 분리):
|
|
320
|
-
// ─── Primitive (Figma 원시 값) ────────────────
|
|
321
|
-
// Colors
|
|
322
|
-
$color-white: #ffffff;
|
|
323
|
-
$color-navy-dark: #0a1628;
|
|
324
|
-
$color-purple-500: #604fed;
|
|
325
|
-
|
|
326
|
-
// Font families
|
|
327
|
-
$font-pretendard: 'Pretendard', sans-serif;
|
|
328
|
-
$font-roboto-condensed: 'Roboto Condensed', sans-serif;
|
|
329
|
-
|
|
330
|
-
// Font sizes (scaled)
|
|
331
|
-
$font-size-xs: 11px; // 16 × 0.667
|
|
332
|
-
$font-size-sm: 13px; // 20 × 0.667
|
|
333
|
-
$font-size-md: 16px; // 24 × 0.667
|
|
334
|
-
$font-size-lg: 19px; // 28 × 0.667
|
|
335
|
-
|
|
336
|
-
// Font weights
|
|
337
|
-
$font-weight-regular: 400;
|
|
338
|
-
$font-weight-bold: 700;
|
|
339
|
-
|
|
340
|
-
// Spacing (scaled)
|
|
341
|
-
$space-xs: 5px;
|
|
342
|
-
$space-sm: 11px;
|
|
343
|
-
$space-md: 16px;
|
|
344
|
-
$space-lg: 21px;
|
|
345
|
-
|
|
346
|
-
// ─── Semantic (용도별) ────────────────────────
|
|
347
|
-
// Text
|
|
348
|
-
$color-text-primary: $color-white;
|
|
349
|
-
$color-text-secondary: #dadce3;
|
|
350
|
-
$color-text-label: #003879;
|
|
351
|
-
$color-text-link: #419bd3;
|
|
352
|
-
|
|
353
|
-
// Background
|
|
354
|
-
$color-bg-primary: $color-navy-dark;
|
|
355
|
-
$color-bg-section: #00264a;
|
|
356
|
-
$color-bg-login: rgba(14, 35, 62, 0.8);
|
|
357
|
-
|
|
358
|
-
// Border
|
|
359
|
-
$color-border-primary: #203f6c;
|
|
360
|
-
|
|
361
|
-
// Breakpoint
|
|
362
|
-
$bp-desktop: 1024px;
|
|
363
|
-
|
|
364
|
-
규칙:
|
|
365
|
-
- primitive: Figma에서 추출한 고유 값 (색상 hex, 폰트, 크기)
|
|
366
|
-
- semantic: primitive를 참조하여 용도별 이름 부여 ($color-text-primary: $color-white)
|
|
367
|
-
- 섹션 처리할 때마다 새 값 발견 시 적절한 카테고리에 추가
|
|
368
|
-
- 같은 값이 이미 있으면 기존 토큰 재사용 (중복 금지)
|
|
369
|
-
|
|
370
|
-
BG 레이어 패턴 (트리에서 position:absolute + 이미지 fill):
|
|
371
|
-
.{section}Bg → position: absolute; inset: 0; z-index: 0;
|
|
372
|
-
.{section}Content → position: relative; z-index: 1;
|
|
373
|
-
|
|
374
|
-
index.scss에 새 섹션 @import 추가.
|
|
275
|
+
4. 스크린샷 참조:
|
|
276
|
+
{section}-screenshot.png과 비교하면서 작업
|
|
375
277
|
```
|
|
376
278
|
|
|
377
|
-
####
|
|
378
|
-
|
|
379
|
-
```
|
|
380
|
-
Phase 1 컴포넌트의 template을 트리 구조 기반으로 리팩토링.
|
|
381
|
-
script(JSDoc, 인터페이스, 목 데이터, 핸들러)는 보존.
|
|
382
|
-
|
|
383
|
-
1. 트리의 HTML 구조를 프로젝트 스택으로 변환:
|
|
384
|
-
FRAME → <div>, TEXT → <p>/<span>, VECTOR/RECTANGLE with imageRef → <img>
|
|
385
|
-
|
|
386
|
-
2. 이미지 경로를 imageMap으로 교체:
|
|
387
|
-
imageRef "abc123" → src="/images/{feature}/abc123.png"
|
|
388
|
-
|
|
389
|
-
3. BG 레이어 구조 적용:
|
|
390
|
-
.{section}Bg div (배경) + .{section}Content div (콘텐츠)
|
|
391
|
-
|
|
392
|
-
4. Phase 1 기능 요소 재배치:
|
|
393
|
-
v-for, @click, v-if, $emit 등을 새 구조의 적절한 위치에 배치
|
|
394
|
-
|
|
395
|
-
5. 접근성:
|
|
396
|
-
장식 이미지 (BG 내) → alt="" aria-hidden="true"
|
|
397
|
-
콘텐츠 이미지 → alt="설명적 텍스트"
|
|
398
|
-
|
|
399
|
-
컴포넌트에 <style> 블록 없음. 스타일은 전부 외부 SCSS.
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
#### f. 섹션 검증
|
|
279
|
+
#### c. 섹션 검증
|
|
403
280
|
|
|
404
281
|
```
|
|
405
282
|
Grep 체크:
|
|
@@ -407,8 +284,11 @@ Grep 체크:
|
|
|
407
284
|
□ "<style" in 컴포넌트 파일 → 0건
|
|
408
285
|
|
|
409
286
|
Read 체크:
|
|
410
|
-
□ 외부 SCSS 파일에 font-size, color 존재
|
|
411
|
-
□ 이미지 파일
|
|
287
|
+
□ 외부 SCSS 파일에 font-size, color 존재
|
|
288
|
+
□ 이미지 파일 존재 + 0byte 없음
|
|
289
|
+
|
|
290
|
+
스크린샷 비교:
|
|
291
|
+
□ {section}-screenshot.png vs dev 서버 → 주요 차이 없음
|
|
412
292
|
|
|
413
293
|
실패 → 수정 → 재검증
|
|
414
294
|
```
|