@su-record/vibe 2.8.24 → 2.8.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/dist/cli/commands/config.d.ts +17 -0
  2. package/dist/cli/commands/config.d.ts.map +1 -0
  3. package/dist/cli/commands/config.js +207 -0
  4. package/dist/cli/commands/config.js.map +1 -0
  5. package/dist/cli/commands/index.d.ts +2 -0
  6. package/dist/cli/commands/index.d.ts.map +1 -1
  7. package/dist/cli/commands/index.js +2 -0
  8. package/dist/cli/commands/index.js.map +1 -1
  9. package/dist/cli/commands/info.d.ts.map +1 -1
  10. package/dist/cli/commands/info.js +2 -0
  11. package/dist/cli/commands/info.js.map +1 -1
  12. package/dist/cli/commands/init.d.ts.map +1 -1
  13. package/dist/cli/commands/init.js +78 -54
  14. package/dist/cli/commands/init.js.map +1 -1
  15. package/dist/cli/commands/stats.d.ts +13 -0
  16. package/dist/cli/commands/stats.d.ts.map +1 -0
  17. package/dist/cli/commands/stats.js +280 -0
  18. package/dist/cli/commands/stats.js.map +1 -0
  19. package/dist/cli/index.d.ts.map +1 -1
  20. package/dist/cli/index.js +33 -1
  21. package/dist/cli/index.js.map +1 -1
  22. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  23. package/dist/cli/postinstall/constants.js +1 -0
  24. package/dist/cli/postinstall/constants.js.map +1 -1
  25. package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -1
  26. package/dist/cli/setup/GlobalInstaller.js +7 -7
  27. package/dist/cli/setup/GlobalInstaller.js.map +1 -1
  28. package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
  29. package/dist/cli/setup/ProjectSetup.js +18 -12
  30. package/dist/cli/setup/ProjectSetup.js.map +1 -1
  31. package/dist/infra/lib/ContextCompressor.d.ts.map +1 -1
  32. package/dist/infra/lib/ContextCompressor.js +10 -4
  33. package/dist/infra/lib/ContextCompressor.js.map +1 -1
  34. package/dist/infra/lib/ProjectCache.d.ts +2 -2
  35. package/dist/infra/lib/ProjectCache.d.ts.map +1 -1
  36. package/dist/infra/lib/ProjectCache.js +4 -3
  37. package/dist/infra/lib/ProjectCache.js.map +1 -1
  38. package/dist/infra/lib/utils.d.ts +24 -0
  39. package/dist/infra/lib/utils.d.ts.map +1 -1
  40. package/dist/infra/lib/utils.js +41 -0
  41. package/dist/infra/lib/utils.js.map +1 -1
  42. package/dist/infra/orchestrator/SmartRouter.d.ts +3 -0
  43. package/dist/infra/orchestrator/SmartRouter.d.ts.map +1 -1
  44. package/dist/infra/orchestrator/SmartRouter.js +11 -1
  45. package/dist/infra/orchestrator/SmartRouter.js.map +1 -1
  46. package/dist/infra/orchestrator/SmartRouter.test.d.ts +5 -0
  47. package/dist/infra/orchestrator/SmartRouter.test.d.ts.map +1 -0
  48. package/dist/infra/orchestrator/SmartRouter.test.js +457 -0
  49. package/dist/infra/orchestrator/SmartRouter.test.js.map +1 -0
  50. package/dist/tools/convention/analyzeComplexity.d.ts.map +1 -1
  51. package/dist/tools/convention/analyzeComplexity.js +18 -10
  52. package/dist/tools/convention/analyzeComplexity.js.map +1 -1
  53. package/dist/tools/convention/checkCouplingCohesion.d.ts.map +1 -1
  54. package/dist/tools/convention/checkCouplingCohesion.js +14 -6
  55. package/dist/tools/convention/checkCouplingCohesion.js.map +1 -1
  56. package/dist/tools/semantic/analyzeDependencyGraph.d.ts.map +1 -1
  57. package/dist/tools/semantic/analyzeDependencyGraph.js +1 -1
  58. package/dist/tools/semantic/analyzeDependencyGraph.js.map +1 -1
  59. package/dist/tools/semantic/findReferences.d.ts.map +1 -1
  60. package/dist/tools/semantic/findReferences.js +13 -13
  61. package/dist/tools/semantic/findReferences.js.map +1 -1
  62. package/dist/tools/semantic/findSymbol.d.ts.map +1 -1
  63. package/dist/tools/semantic/findSymbol.js +12 -13
  64. package/dist/tools/semantic/findSymbol.js.map +1 -1
  65. package/dist/tools/semantic/lsp.d.ts.map +1 -1
  66. package/dist/tools/semantic/lsp.js +22 -14
  67. package/dist/tools/semantic/lsp.js.map +1 -1
  68. package/hooks/hooks.json +29 -0
  69. package/hooks/scripts/__tests__/keyword-detector.test.js +199 -0
  70. package/hooks/scripts/__tests__/pre-tool-guard.test.js +286 -0
  71. package/hooks/scripts/__tests__/sentinel-guard.test.js +210 -0
  72. package/hooks/scripts/auto-commit.js +65 -0
  73. package/hooks/scripts/auto-format.js +64 -0
  74. package/hooks/scripts/auto-test.js +81 -0
  75. package/hooks/scripts/code-check.js +139 -0
  76. package/hooks/scripts/command-log.js +32 -0
  77. package/hooks/scripts/context-save.js +60 -6
  78. package/hooks/scripts/hud-status.js +32 -2
  79. package/hooks/scripts/llm-orchestrate.js +95 -17
  80. package/hooks/scripts/pr-test-gate.js +52 -0
  81. package/package.json +1 -1
  82. package/skills/agents-md/rubrics/what-to-keep.md +49 -0
  83. package/skills/agents-md/templates/agents-md.md +36 -0
  84. package/skills/arch-guard/agents/detector.md +48 -0
  85. package/skills/arch-guard/agents/reporter.md +48 -0
  86. package/skills/arch-guard/agents/rule-generator.md +49 -0
  87. package/skills/arch-guard/agents/violation-checker.md +51 -0
  88. package/skills/arch-guard/frameworks/clean-architecture.md +108 -0
  89. package/skills/arch-guard/frameworks/solid.md +102 -0
  90. package/skills/arch-guard/scripts/check-boundaries.js +90 -0
  91. package/skills/arch-guard/templates/arch-rules.json +47 -0
  92. package/skills/arch-guard/templates/violation-report.md +53 -0
  93. package/skills/brand-assets/rubrics/asset-checklist.md +98 -0
  94. package/skills/brand-assets/templates/brand-guide.md +161 -0
  95. package/skills/capability-loop/agents/capability-designer.md +61 -0
  96. package/skills/capability-loop/agents/failure-analyst.md +55 -0
  97. package/skills/capability-loop/agents/implementer.md +50 -0
  98. package/skills/capability-loop/agents/tester.md +53 -0
  99. package/skills/capability-loop/templates/capability-spec.md +118 -0
  100. package/skills/capability-loop/templates/failure-analysis.md +118 -0
  101. package/skills/characterization-test/agents/behavior-capturer.md +50 -0
  102. package/skills/characterization-test/agents/coverage-checker.md +54 -0
  103. package/skills/characterization-test/agents/reporter.md +50 -0
  104. package/skills/characterization-test/agents/test-writer.md +49 -0
  105. package/skills/characterization-test/rubrics/coverage-criteria.md +53 -0
  106. package/skills/characterization-test/templates/test-template.ts +101 -0
  107. package/skills/claude-md-guide/rubrics/anti-patterns.md +88 -0
  108. package/skills/claude-md-guide/templates/claude-md.md +54 -0
  109. package/skills/commerce-patterns/rubrics/checkout-flow.md +48 -0
  110. package/skills/commerce-patterns/templates/product-schema.md +85 -0
  111. package/skills/commit-push-pr/agents/change-analyzer.md +55 -0
  112. package/skills/commit-push-pr/agents/message-writer.md +50 -0
  113. package/skills/commit-push-pr/agents/pr-writer.md +58 -0
  114. package/skills/commit-push-pr/agents/reviewer.md +52 -0
  115. package/skills/commit-push-pr/rubrics/commit-message.md +73 -0
  116. package/skills/commit-push-pr/templates/pr-body.md +63 -0
  117. package/skills/context7-usage/rubrics/when-to-use.md +50 -0
  118. package/skills/create-prd/agents/edge-case-finder.md +48 -0
  119. package/skills/create-prd/agents/prioritizer.md +60 -0
  120. package/skills/create-prd/agents/requirements-writer.md +48 -0
  121. package/skills/create-prd/agents/researcher.md +55 -0
  122. package/skills/create-prd/agents/reviewer.md +54 -0
  123. package/skills/create-prd/frameworks/jobs-to-be-done.md +96 -0
  124. package/skills/create-prd/frameworks/rice-scoring.md +97 -0
  125. package/skills/create-prd/orchestrator.md +70 -0
  126. package/skills/create-prd/rubrics/completeness.md +58 -0
  127. package/skills/create-prd/templates/prd.md +139 -0
  128. package/skills/design-audit/agents/a11y-auditor.md +43 -0
  129. package/skills/design-audit/agents/performance-auditor.md +46 -0
  130. package/skills/design-audit/agents/responsive-auditor.md +46 -0
  131. package/skills/design-audit/agents/scorer.md +47 -0
  132. package/skills/design-audit/agents/slop-detector.md +47 -0
  133. package/skills/design-audit/frameworks/core-web-vitals.md +107 -0
  134. package/skills/design-audit/frameworks/wcag-checklist.md +64 -0
  135. package/skills/design-audit/orchestrator.md +64 -0
  136. package/skills/design-audit/rubrics/ai-slop-patterns.md +83 -0
  137. package/skills/design-audit/rubrics/scoring.md +63 -0
  138. package/skills/design-audit/templates/report.md +88 -0
  139. package/skills/design-critique/rubrics/ux-heuristics.md +143 -0
  140. package/skills/design-critique/templates/critique-report.md +86 -0
  141. package/skills/design-distill/templates/design-system.md +132 -0
  142. package/skills/design-normalize/rubrics/token-naming.md +117 -0
  143. package/skills/design-normalize/templates/token-audit.md +89 -0
  144. package/skills/design-polish/rubrics/polish-checklist.md +68 -0
  145. package/skills/design-polish/templates/polish-report.md +64 -0
  146. package/skills/design-teach/rubrics/brand-personality.md +73 -0
  147. package/skills/design-teach/templates/design-context.json +36 -0
  148. package/skills/e2e-commerce/templates/test-scenarios.md +170 -0
  149. package/skills/event-comms/templates/email-invite.md +99 -0
  150. package/skills/event-comms/templates/sns-post.md +133 -0
  151. package/skills/event-ops/rubrics/contingency.md +85 -0
  152. package/skills/event-ops/templates/d-day-checklist.md +65 -0
  153. package/skills/event-planning/rubrics/timeline.md +70 -0
  154. package/skills/event-planning/templates/event-plan.md +91 -0
  155. package/skills/exec-plan/agents/decomposer.md +47 -0
  156. package/skills/exec-plan/agents/dependency-mapper.md +44 -0
  157. package/skills/exec-plan/agents/estimator.md +43 -0
  158. package/skills/exec-plan/agents/validator.md +55 -0
  159. package/skills/exec-plan/orchestrator.md +70 -0
  160. package/skills/exec-plan/rubrics/complexity-scoring.md +75 -0
  161. package/skills/exec-plan/templates/plan.md +147 -0
  162. package/skills/git-worktree/rubrics/when-to-use.md +55 -0
  163. package/skills/handoff/agents/context-summarizer.md +51 -0
  164. package/skills/handoff/agents/document-writer.md +63 -0
  165. package/skills/handoff/agents/state-collector.md +53 -0
  166. package/skills/handoff/agents/verifier.md +48 -0
  167. package/skills/handoff/rubrics/completeness.md +62 -0
  168. package/skills/handoff/templates/handoff.md +107 -0
  169. package/skills/parallel-research/agents/best-practices.md +43 -0
  170. package/skills/parallel-research/agents/codebase-patterns.md +46 -0
  171. package/skills/parallel-research/agents/framework-docs.md +45 -0
  172. package/skills/parallel-research/agents/security-advisory.md +46 -0
  173. package/skills/parallel-research/agents/synthesizer.md +52 -0
  174. package/skills/parallel-research/experts/best-practices.md +50 -0
  175. package/skills/parallel-research/experts/codebase-patterns.md +70 -0
  176. package/skills/parallel-research/experts/framework-docs.md +65 -0
  177. package/skills/parallel-research/experts/security-advisory.md +69 -0
  178. package/skills/parallel-research/orchestrator.md +65 -0
  179. package/skills/parallel-research/templates/synthesis.md +101 -0
  180. package/skills/prioritization-frameworks/rubrics/frameworks.md +79 -0
  181. package/skills/prioritization-frameworks/templates/scoring-matrix.md +69 -0
  182. package/skills/priority-todos/rubrics/prioritization.md +70 -0
  183. package/skills/priority-todos/templates/todo-board.md +59 -0
  184. package/skills/seo-checklist/frameworks/structured-data.md +153 -0
  185. package/skills/seo-checklist/rubrics/content-seo.md +42 -0
  186. package/skills/seo-checklist/rubrics/technical-seo.md +48 -0
  187. package/skills/techdebt/agents/analyzer.md +50 -0
  188. package/skills/techdebt/agents/fixer.md +41 -0
  189. package/skills/techdebt/agents/reviewer.md +47 -0
  190. package/skills/techdebt/agents/scanner.md +44 -0
  191. package/skills/techdebt/orchestrator.md +70 -0
  192. package/skills/techdebt/rubrics/severity.md +51 -0
  193. package/skills/techdebt/scripts/scan.js +90 -0
  194. package/skills/techdebt/templates/report.md +86 -0
  195. package/skills/tool-fallback/rubrics/fallback-chain.md +58 -0
  196. package/skills/typescript-advanced-types/rubrics/type-patterns.md +109 -0
  197. package/skills/ui-ux-pro-max/rubrics/interaction-states.md +83 -0
  198. package/skills/ui-ux-pro-max/rubrics/responsive-breakpoints.md +99 -0
  199. package/skills/user-personas/rubrics/research-methods.md +56 -0
  200. package/skills/user-personas/templates/persona.md +89 -0
  201. package/skills/vercel-react-best-practices/rubrics/performance.md +82 -0
  202. package/skills/vercel-react-best-practices/rubrics/server-components.md +86 -0
  203. package/skills/vibe-docs/SKILL.md +171 -0
  204. package/skills/vibe-docs/templates/architecture.md +80 -0
  205. package/skills/vibe-docs/templates/readme.md +84 -0
  206. package/skills/vibe-docs/templates/release-notes.md +74 -0
  207. package/skills/vibe-figma/SKILL.md +122 -206
  208. package/skills/vibe-figma/rubrics/extraction-checklist.md +51 -0
  209. package/skills/vibe-figma/templates/figma-handoff.md +96 -0
  210. package/skills/vibe-figma-analyze/rubrics/analysis-dimensions.md +53 -0
  211. package/skills/vibe-figma-codegen/rubrics/code-quality.md +54 -0
  212. package/skills/vibe-figma-consolidate/templates/consolidation-report.md +95 -0
  213. package/skills/vibe-figma-convert/SKILL.md +13 -175
  214. package/skills/vibe-figma-convert/rubrics/conversion-rules.md +83 -0
  215. package/skills/vibe-figma-convert/templates/component.md +152 -0
  216. package/skills/vibe-figma-extract/rubrics/image-rules.md +67 -0
  217. package/skills/vibe-figma-frame/rubrics/frame-selection.md +55 -0
  218. package/skills/vibe-figma-pipeline/rubrics/pipeline-stages.md +96 -0
  219. package/skills/vibe-figma-rules/rubrics/naming-conventions.md +70 -0
  220. package/skills/vibe-figma-style/rubrics/style-mapping.md +100 -0
  221. package/skills/video-production/rubrics/quality-checklist.md +58 -0
  222. package/skills/video-production/templates/production-plan.md +104 -0
@@ -0,0 +1,95 @@
1
+ # Consolidation Report — {{FEATURE_NAME}}
2
+
3
+ **Feature Key:** {{FEATURE_KEY}}
4
+ **Date:** {{DATE}}
5
+ **Phase:** Post-implementation verification
6
+
7
+ ---
8
+
9
+ ## Summary
10
+
11
+ | Metric | Value |
12
+ |--------|-------|
13
+ | Total sections | {{SECTION_COUNT}} |
14
+ | Sections passing | {{PASS_COUNT}} |
15
+ | P1 issues found | {{P1_COUNT}} |
16
+ | P2 issues found | {{P2_COUNT}} |
17
+ | Assets downloaded | {{ASSET_COUNT}} |
18
+ | Build status | {{BUILD_STATUS}} |
19
+
20
+ ---
21
+
22
+ ## Automated Grep Results
23
+
24
+ | Check | Result | Details |
25
+ |-------|--------|---------|
26
+ | `figma.com/api` in generated files | {{PASS/FAIL}} | {{COUNT}} occurrences |
27
+ | `<style` in `components/{{FEATURE_KEY}}/` | {{PASS/FAIL}} | {{COUNT}} occurrences |
28
+ | `style="` in `components/{{FEATURE_KEY}}/` | {{PASS/FAIL}} | {{COUNT}} occurrences |
29
+ | `placeholder` in components | {{PASS/FAIL}} | {{COUNT}} occurrences |
30
+ | `src=""` in components | {{PASS/FAIL}} | {{COUNT}} occurrences |
31
+ | Images in `public/images/{{FEATURE_KEY}}/` | {{PASS/FAIL}} | {{COUNT}} files |
32
+
33
+ ---
34
+
35
+ ## Section Review
36
+
37
+ | # | Section | Component | Mode | Screenshot Match | P1 | P2 |
38
+ |---|---------|-----------|------|-----------------|----|----|
39
+ | 1 | {{SECTION_NAME}} | `{{ComponentName}}.vue` | {{normal/literal}} | {{match %}} | {{count}} | {{count}} |
40
+
41
+ ---
42
+
43
+ ## P1 Issues (Must Fix)
44
+
45
+ ### {{SECTION_NAME}} — {{ISSUE_TITLE}}
46
+
47
+ **Type:** {{image-missing / layout-mismatch / text-unstyled / asset-wrong-path}}
48
+ **Description:** {{DESCRIPTION}}
49
+ **Fix:** {{FIX_INSTRUCTION}}
50
+ **Status:** {{open / fixed}}
51
+
52
+ ---
53
+
54
+ ## P2 Issues (Recommended)
55
+
56
+ ### {{SECTION_NAME}} — {{ISSUE_TITLE}}
57
+
58
+ **Type:** {{spacing-delta / color-delta / font-size-delta}}
59
+ **Description:** {{DESCRIPTION}} (delta: {{DELTA}})
60
+ **Fix:** {{FIX_INSTRUCTION}}
61
+ **Status:** {{open / deferred}}
62
+
63
+ ---
64
+
65
+ ## File Manifest
66
+
67
+ ### Components
68
+
69
+ ```
70
+ components/{{FEATURE_KEY}}/
71
+ {{FILE_LIST}}
72
+ ```
73
+
74
+ ### Styles
75
+
76
+ ```
77
+ styles/{{FEATURE_KEY}}/
78
+ {{FILE_LIST}}
79
+ ```
80
+
81
+ ### Assets
82
+
83
+ ```
84
+ public/images/{{FEATURE_KEY}}/
85
+ {{FILE_LIST}}
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Next Steps
91
+
92
+ - [ ] P1 count = 0 (required before handoff)
93
+ - [ ] Run `/design-normalize` → `/design-audit --quick`
94
+ - [ ] Optional: `/design-critique` → `/design-polish` for thorough review
95
+ - [ ] Commit with feature key tag: `feat({{FEATURE_KEY}}): figma design implementation`
@@ -8,181 +8,7 @@ tier: standard
8
8
  # vibe-figma-convert — 코드 변환
9
9
 
10
10
  `get_design_context` 참조 코드를 프로젝트 스택 코드로 변환.
11
- **두 가지 모드**: 일반 모드(외부 SCSS) / 직역 모드(scoped CSS).
12
-
13
- ---
14
-
15
- ## 0. 직역 모드 (비정형 레이어)
16
-
17
- 비정형 레이어 감지 시 사용. 참조 코드의 구조와 좌표를 **거의 그대로** 보존.
18
-
19
- ### 핵심 원칙
20
-
21
- ```
22
- 1. 참조 코드의 HTML 중첩 구조를 1:1로 유지
23
- 2. absolute 좌표, rotate, mix-blend-mode, blur 등 시각 속성 전부 보존
24
- 3. scaleFactor는 px 값에만 적용 (색상, opacity, blend-mode, z-index 미적용)
25
- 4. 에셋 URL → 로컬 경로로만 교체
26
- 5. 의미론적 재구성(BG+Content 분리) 시도하지 않음
27
- ```
28
-
29
- ### Tailwind → CSS 클래스 직역
30
-
31
- ```
32
- 참조 코드의 각 요소에 고유 클래스명을 부여하고,
33
- Tailwind 클래스를 CSS로 1:1 변환하여 <style scoped>에 작성.
34
-
35
- 클래스명 규칙: data-name 또는 data-node-id 기반
36
- data-name="BG" → .bg
37
- data-name="Period" → .period
38
- data-name="Title" → .title
39
- data-name="Light" → .light
40
- 이름 없으면 → .node-{nodeId} (콜론→하이픈)
41
-
42
- 변환 예시:
43
- className="absolute h-[1280px] left-0 overflow-clip top-0 w-[720px]"
44
-
45
- .bg {
46
- position: absolute;
47
- height: 853px; /* 1280 × 0.667 */
48
- left: 0;
49
- overflow: clip;
50
- top: 0;
51
- width: 100%; /* 720px = 뷰포트 전체폭 → 100% */
52
- }
53
-
54
- className="-translate-x-1/2 absolute h-[174px] left-1/2 top-1/2 w-[620px]"
55
-
56
- .title-img {
57
- position: absolute;
58
- height: 116px; /* 174 × 0.667 */
59
- left: 50%;
60
- top: 50%;
61
- transform: translateX(-50%);
62
- width: 413px; /* 620 × 0.667 */
63
- }
64
- ```
65
-
66
- ### 특수 패턴 직역
67
-
68
- ```
69
- mix-blend:
70
- className="mix-blend-lighten"
71
- → mix-blend-mode: lighten;
72
-
73
- rotate + scale:
74
- className="-scale-y-100 rotate-[149.7deg]"
75
- → transform: scaleY(-1) rotate(149.7deg);
76
-
77
- mask-image:
78
- style={{ maskImage: `url('${imgVar}')` }}
79
- → :style="{ maskImage: `url('/images/{feature}/파일.webp')` }"
80
- (Vue 동적 바인딩으로 변환)
81
-
82
- blur:
83
- className="blur-[3.5px]"
84
- → filter: blur(3.5px);
85
-
86
- 소수점 좌표:
87
- className="absolute h-[141.67px] left-[380.52px] top-[528.95px]"
88
- → position: absolute;
89
- height: 94px; /* 141.67 × 0.667 반올림 */
90
- left: 254px; /* 380.52 × 0.667 반올림 */
91
- top: 353px; /* 528.95 × 0.667 반올림 */
92
-
93
- inset-[-18.13%]:
94
- → inset: -18.13%; (% 값은 스케일링 안 함)
95
-
96
- overflow-hidden + 스프라이트:
97
- className="absolute h-full left-[-129.09%] max-w-none top-0 w-[229.09%]"
98
- → position: absolute;
99
- height: 100%;
100
- left: -129.09%; /* % 값 그대로 */
101
- max-width: none;
102
- top: 0;
103
- width: 229.09%; /* % 값 그대로 */
104
- ```
105
-
106
- ### Vue SFC 출력 형태
107
-
108
- ```vue
109
- <template>
110
- <section class="heroSection">
111
- <!-- 참조 코드의 HTML 구조를 1:1 유지 -->
112
- <div class="bg">
113
- <div class="bgInner">
114
- <div class="bgImage1">
115
- <img src="/images/{feature}/bg.webp" alt="" aria-hidden="true" />
116
- </div>
117
- <div class="tree4">
118
- <img src="/images/{feature}/tree-4.webp" alt="" aria-hidden="true" />
119
- </div>
120
- <!-- ... 모든 서브 레이어 유지 -->
121
- </div>
122
- <!-- ... -->
123
- </div>
124
-
125
- <!-- 콘텐츠 영역 (참조 코드의 Title, Period 등) -->
126
- <div class="titleArea">
127
- <div class="titleImg">
128
- <img src="/images/{feature}/title.webp" alt="추운 겨울, 따뜻한 보상이 펑펑" />
129
- </div>
130
- </div>
131
- </section>
132
- </template>
133
-
134
- <script setup lang="ts">
135
- // Phase 1의 script 보존
136
- </script>
137
-
138
- <style scoped>
139
- .heroSection {
140
- position: relative;
141
- width: 100%;
142
- height: 853px; /* 1280 × 0.667 */
143
- overflow: hidden;
144
- }
145
- .bg {
146
- position: absolute;
147
- height: 853px;
148
- left: 0;
149
- overflow: clip;
150
- top: 0;
151
- width: 100%;
152
- }
153
- .tree4 {
154
- position: absolute;
155
- bottom: 215px;
156
- height: 453px;
157
- left: 50%;
158
- transform: translateX(calc(-50% + 599px));
159
- opacity: 0.4;
160
- width: 1727px;
161
- }
162
- .tree4 img {
163
- position: absolute;
164
- inset: 0;
165
- max-width: none;
166
- object-fit: cover;
167
- pointer-events: none;
168
- width: 100%;
169
- height: 100%;
170
- }
171
- /* ... 모든 레이어의 CSS */
172
- </style>
173
- ```
174
-
175
- ### 직역 모드에서의 반응형
176
-
177
- ```
178
- 첫 번째 URL → <style scoped>에 base 스타일
179
- 두 번째 URL → 같은 <style scoped> 안에 @media (min-width:) 추가
180
- 기존 스타일 삭제 금지
181
- ```
182
-
183
- ---
184
-
185
- ## 이하: 일반 모드 (정형 레이어)
11
+ 항상 외부 SCSS 파일에 스타일 작성.
186
12
 
187
13
  ---
188
14
 
@@ -296,6 +122,18 @@ $space-content: 18px; // 24 × 0.75
296
122
  $bp-pc: 1024px;
297
123
  ```
298
124
 
125
+ ### CSS 변수 패턴 처리
126
+
127
+ ```
128
+ 참조 코드에 Figma 디자인 토큰이 CSS 변수로 포함될 수 있음:
129
+ font-[family-name:var(--font/family/pretendard,...)]
130
+ text-[length:var(--font/size/heading/24,24px)]
131
+ text-[color:var(--color/grayscale/950,#171716)]
132
+
133
+ → var() 안의 fallback 값(24px, #171716)을 사용.
134
+ → CSS 변수명은 프로젝트 토큰 네이밍에 참고.
135
+ ```
136
+
299
137
  ---
300
138
 
301
139
  ## 2. 컴포넌트 파일 변환
@@ -0,0 +1,83 @@
1
+ # React+Tailwind → Project Stack Conversion Rules
2
+
3
+ ## Mode Selection (Do This First)
4
+
5
+ Classify each section before writing any code. Literal mode if ANY of:
6
+ - 15+ asset URLs in the section
7
+ - Fractional coordinates (`left-[117.13px]`)
8
+ - `mix-blend-*` on any layer
9
+ - `rotate-[Ndeg]` or `-scale-y-100`
10
+ - `mask-image` usage
11
+ - `blur-[Npx]` filter
12
+ - BG cropped from 2560px+ source
13
+
14
+ Normal mode only when ALL of:
15
+ - Flex/grid layout, no absolute coordinates (or integer-only)
16
+ - Fewer than 10 asset URLs
17
+ - No blend/rotate/mask/blur
18
+
19
+ ## Normal Mode Rules
20
+
21
+ - Extract CSS values from Tailwind classes — never estimate
22
+ - Apply `scaleFactor` to all `px` values; never to colors, opacity, z-index, line-height (unitless)
23
+ - Put layout properties in `layout/_section.scss`, visual/text properties in `components/_section.scss`
24
+ - No `<style>` block in the component file
25
+ - No inline `style=""` attribute in the template
26
+
27
+ ## Literal Mode Rules
28
+
29
+ - Preserve the full HTML nesting structure 1:1
30
+ - Keep all absolute coordinates, fractional px values (rounded after scaling)
31
+ - Keep all `mix-blend-mode`, `rotate`, `mask-image`, `blur` values unchanged
32
+ - Put all styles in `<style scoped>` inside the component
33
+ - Do not create external SCSS files for literal sections
34
+
35
+ ## Tailwind Class Gotchas
36
+
37
+ | Tailwind | Correct CSS | Common Mistake |
38
+ |----------|------------|----------------|
39
+ | `size-full` | `width: 100%; height: 100%` | Only setting `width: 100%` |
40
+ | `inset-0` | `inset: 0` (shorthand) | Expanding to 4 properties |
41
+ | `inset-[-18.13%]` | `inset: -18.13%` | Scaling the % value |
42
+ | `overflow-clip` | `overflow: clip` | Using `overflow: hidden` |
43
+ | `leading-[1.4]` | `line-height: 1.4` | Applying scaleFactor |
44
+ | `max-w-none` | `max-width: none` | Omitting entirely |
45
+ | `object-cover` on `<img>` | `object-fit: cover` + parent `overflow: hidden` | Forgetting parent clip |
46
+ | `pointer-events-none` | `pointer-events: none` | Omitting for decorative layers |
47
+ | `text-white` | `color: #FFFFFF` | Using `color: white` |
48
+ | `font-black` | `font-weight: 900` | Using `font-weight: bold` |
49
+
50
+ ## Scale Application
51
+
52
+ Apply `× scaleFactor` to:
53
+ - `px` sizes: font-size, padding, margin, gap, border-radius, width, height, top, left, bottom, right
54
+ - `px` in box-shadow, blur filter, letter-spacing
55
+
56
+ Do NOT scale:
57
+ - Color values
58
+ - Opacity values
59
+ - `%` values
60
+ - Unitless line-height
61
+ - z-index
62
+ - `mix-blend-mode` values
63
+ - `rotate` degree values
64
+
65
+ ## Sprite / Overflow Image Pattern
66
+
67
+ When `left` is a large negative %, it is a sprite crop — do NOT scale:
68
+ ```css
69
+ /* Correct */
70
+ left: -129.09%;
71
+ width: 229.09%;
72
+
73
+ /* Wrong — do not scale % values */
74
+ left: -86.09%; /* -129.09 × 0.667 — incorrect */
75
+ ```
76
+
77
+ ## Class Naming (Literal Mode)
78
+
79
+ Source priority: `data-name` attribute → `data-node-id`
80
+ - `data-name="BG"` → `.bg`
81
+ - `data-name="Light"` → `.light`
82
+ - No `data-name` → `.node-{nodeId}` (replace `:` with `-`)
83
+ - Conflicts: append parent name prefix (`.heroLight`, `.kidLight`)
@@ -0,0 +1,152 @@
1
+ # Component Output Template
2
+
3
+ Use this template when generating a section component from Figma reference code.
4
+
5
+ ---
6
+
7
+ ## Normal Mode (External SCSS)
8
+
9
+ ```vue
10
+ <!-- components/{{FEATURE_KEY}}/{{ComponentName}}.vue -->
11
+ <template>
12
+ <section class="{{sectionName}}">
13
+ <!-- BG Layer (if section has background image) -->
14
+ <div class="{{sectionName}}Bg">
15
+ <img src="/images/{{FEATURE_KEY}}/{{bg-file}}.webp" alt="" aria-hidden="true" />
16
+ </div>
17
+
18
+ <!-- Content Layer -->
19
+ <div class="{{sectionName}}Content">
20
+ <!-- Title image (if present) -->
21
+ <div class="{{sectionName}}Title">
22
+ <img src="/images/{{FEATURE_KEY}}/{{title-file}}.webp" alt="{{TITLE_ALT_TEXT}}" />
23
+ </div>
24
+
25
+ <!-- Repeating items (from storyboard mock data) -->
26
+ <ul class="{{sectionName}}List">
27
+ <li
28
+ v-for="item in items"
29
+ :key="item.id"
30
+ class="{{sectionName}}Item"
31
+ >
32
+ <img :src="item.image" :alt="item.label" />
33
+ <p class="{{sectionName}}ItemLabel">{{ item.label }}</p>
34
+ </li>
35
+ </ul>
36
+
37
+ <!-- CTA Button -->
38
+ <button class="{{sectionName}}Btn" @click="handleAction">
39
+ {{BUTTON_LABEL}}
40
+ </button>
41
+ </div>
42
+ </section>
43
+ </template>
44
+
45
+ <script setup lang="ts">
46
+ /**
47
+ * {{SECTION_DISPLAY_NAME}}
48
+ *
49
+ * [기능 정의]
50
+ * - {{FEATURE_REQUIREMENT_1}}
51
+ * - {{FEATURE_REQUIREMENT_2}}
52
+ *
53
+ * [인터랙션]
54
+ * ① {{INTERACTION_1}}
55
+ * ② {{INTERACTION_2}}
56
+ *
57
+ * [상태] {{STATE_LIST}}
58
+ */
59
+
60
+ interface {{ItemType}} {
61
+ id: number
62
+ label: string
63
+ image: string
64
+ }
65
+
66
+ const items: {{ItemType}}[] = [
67
+ { id: 1, label: '{{MOCK_LABEL_1}}', image: '/images/{{FEATURE_KEY}}/{{mock-img-1}}.webp' },
68
+ { id: 2, label: '{{MOCK_LABEL_2}}', image: '/images/{{FEATURE_KEY}}/{{mock-img-2}}.webp' },
69
+ { id: 3, label: '{{MOCK_LABEL_3}}', image: '/images/{{FEATURE_KEY}}/{{mock-img-3}}.webp' },
70
+ ]
71
+
72
+ const emit = defineEmits<{
73
+ action: []
74
+ }>()
75
+
76
+ function handleAction(): void {
77
+ // TODO: {{ACTION_DESCRIPTION}}
78
+ emit('action')
79
+ }
80
+ </script>
81
+ <!-- styles: styles/{{FEATURE_KEY}}/layout/_{{section}}.scss + components/_{{section}}.scss -->
82
+ ```
83
+
84
+ ---
85
+
86
+ ## Literal Mode (Scoped CSS)
87
+
88
+ ```vue
89
+ <!-- components/{{FEATURE_KEY}}/{{ComponentName}}.vue -->
90
+ <template>
91
+ <section class="{{sectionName}}">
92
+ <!-- 1:1 structure from reference code — preserve all nesting -->
93
+ <div class="bg">
94
+ <img src="/images/{{FEATURE_KEY}}/{{bg-file}}.webp" alt="" aria-hidden="true" />
95
+ </div>
96
+ <div class="titleArea">
97
+ <img src="/images/{{FEATURE_KEY}}/{{title-file}}.webp" alt="{{TITLE_ALT_TEXT}}" />
98
+ </div>
99
+ <!-- Re-insert Phase 1 functional elements at appropriate positions -->
100
+ <button class="ctaBtn" @click="handleAction">{{BUTTON_LABEL}}</button>
101
+ </section>
102
+ </template>
103
+
104
+ <script setup lang="ts">
105
+ /**
106
+ * {{SECTION_DISPLAY_NAME}}
107
+ * [기능 정의] {{FEATURE_REQUIREMENT_1}}
108
+ * [인터랙션] ① {{INTERACTION_1}}
109
+ * [상태] {{STATE_LIST}}
110
+ */
111
+
112
+ function handleAction(): void {
113
+ // TODO: {{ACTION_DESCRIPTION}}
114
+ }
115
+ </script>
116
+
117
+ <style scoped>
118
+ .{{sectionName}} {
119
+ position: relative;
120
+ width: 100%;
121
+ height: {{SECTION_HEIGHT_SCALED}}px; /* {{SECTION_HEIGHT_ORIGINAL}} × {{SCALE_FACTOR}} */
122
+ overflow: hidden;
123
+ }
124
+
125
+ .bg {
126
+ position: absolute;
127
+ inset: 0;
128
+ }
129
+
130
+ .bg img {
131
+ width: 100%;
132
+ height: 100%;
133
+ object-fit: cover;
134
+ }
135
+
136
+ .titleArea {
137
+ position: absolute;
138
+ top: {{TITLE_TOP_SCALED}}px; /* {{TITLE_TOP_ORIGINAL}} × {{SCALE_FACTOR}} */
139
+ left: 50%;
140
+ transform: translateX(-50%);
141
+ width: {{TITLE_WIDTH_SCALED}}px;
142
+ height: {{TITLE_HEIGHT_SCALED}}px;
143
+ }
144
+
145
+ /* {{RESPONSIVE_BREAKPOINT}} */
146
+ @media (min-width: {{BP_PC}}px) {
147
+ .{{sectionName}} {
148
+ height: {{SECTION_HEIGHT_PC_SCALED}}px;
149
+ }
150
+ }
151
+ </style>
152
+ ```
@@ -0,0 +1,67 @@
1
+ # Image Extraction Rules
2
+
3
+ ## Format
4
+
5
+ - Output format: `.webp` always — never `.png`, `.jpg`, `.svg` from MCP asset URLs
6
+ - Exception: SVG icons referenced as inline code (not MCP URLs) stay as `.svg`
7
+ - Do not convert or re-encode after download — use the raw bytes from `curl`
8
+
9
+ ## Naming
10
+
11
+ Convert the JavaScript variable name to kebab-case:
12
+
13
+ | Variable | File Name |
14
+ |----------|-----------|
15
+ | `img21` | `img-21.webp` |
16
+ | `imgTitle` | `title.webp` (strip leading `img` prefix) |
17
+ | `imgSnowParticle12` | `snow-particle-12.webp` |
18
+ | `imgImgBannerStatic` | `banner-static.webp` (collapse double `img`) |
19
+ | `imgBtnShare` | `btn-share.webp` |
20
+
21
+ Rules:
22
+ - Strip leading `img` prefix before converting to kebab-case
23
+ - Numbers stay as-is: `item11` → `item-11`
24
+ - Acronyms lowercased: `BTN` → `btn`, `BG` → `bg`
25
+
26
+ ## Destination
27
+
28
+ ```
29
+ public/images/{feature}/ ← Vue/Nuxt
30
+ static/images/{feature}/ ← Nuxt 2 legacy
31
+ public/{feature}/ ← Next.js (under /public)
32
+ ```
33
+
34
+ Always use the directory confirmed in Phase 0 setup.
35
+
36
+ ## Size Limits
37
+
38
+ | Type | Warn threshold | Block threshold |
39
+ |------|---------------|----------------|
40
+ | Background image | 500 KB | 2 MB |
41
+ | Content image | 200 KB | 1 MB |
42
+ | Decorative image | 100 KB | 500 KB |
43
+ | Total per section | 3 MB | 10 MB |
44
+
45
+ If a file exceeds the warn threshold, log it. Never block the download — size checks are advisory.
46
+
47
+ ## Download Rules
48
+
49
+ - [ ] Download ALL `const img...` variables — zero omissions ("core assets only" is forbidden)
50
+ - [ ] Use `curl -sL "{url}" -o {dest}` — silent, follow redirects
51
+ - [ ] After download: `ls -la {dir}` — verify file exists and size > 0
52
+ - [ ] On 0-byte file: retry once. On second failure: log and continue (do not block code gen for a single failed decorative image)
53
+ - [ ] On missing asset (visible in screenshot but no URL): use `get_metadata` → sub-node `get_design_context` → `get_screenshot` fallback chain
54
+
55
+ ## Image Mapping Table
56
+
57
+ After all downloads, produce a mapping before writing any component code:
58
+
59
+ ```js
60
+ const imageMap = {
61
+ imgTitle: '/images/{feature}/title.webp',
62
+ img21: '/images/{feature}/img-21.webp',
63
+ // ...every variable
64
+ }
65
+ ```
66
+
67
+ This map is the only source for `src` values in generated components. No raw Figma URLs in output code.
@@ -0,0 +1,55 @@
1
+ # Frame Selection Rubric
2
+
3
+ > This skill is merged into vibe-figma-extract. Use this rubric to select the right frames before calling `get_design_context`.
4
+
5
+ ## Frame Classification by Name Pattern
6
+
7
+ | Pattern in Name | Class | Action |
8
+ |----------------|-------|--------|
9
+ | "기능 정의서", "정책", "spec", "policy" | SPEC | `get_design_context` — extract text requirements |
10
+ | "해상도", "브라우저", "config", "resolution" | CONFIG | `get_design_context` — extract scale factor |
11
+ | "공통", "GNB", "Footer", "Popup", "shared", "common" | SHARED | Read if referenced; skip if project already has them |
12
+ | "화면설계", "메인 -", "section", numbered frames | PAGE | Core implementation targets |
13
+
14
+ ## Selection Priority
15
+
16
+ 1. SPEC frame (1 frame) — read first, informs all feature requirements
17
+ 2. CONFIG frame (1 frame) — establishes scale factors for both breakpoints
18
+ 3. PAGE frames — top-level only (e.g. `3.1`, `3.2`, not `3.1.1`, `3.1.2`)
19
+ 4. SHARED frames — only if component does not already exist in the project
20
+
21
+ Never read sub-case frames (e.g. `3.1.1`, `3.2.1`) during Phase 1. Read them in Phase 2 only if a sub-state is needed for a specific interaction.
22
+
23
+ ## Tall Frame Decision Tree
24
+
25
+ ```
26
+ Frame height > 1500px?
27
+ YES → Split before calling get_design_context
28
+ 1. get_metadata(nodeId) → get child node list
29
+ 2. Call get_design_context per child node
30
+ 3. Merge results as one logical section
31
+ NO → Call get_design_context directly
32
+ ```
33
+
34
+ Height thresholds from real data:
35
+ - Safe direct call: up to ~900px
36
+ - Risk zone: 900–1500px (attempt once, split on timeout)
37
+ - Always split: 1500px+
38
+
39
+ ## Skipping Frames
40
+
41
+ Skip a frame entirely when:
42
+ - Name contains "OLD", "archive", "deprecated", "참고", "예시" (reference only)
43
+ - Frame is a copy/duplicate of another already processed frame
44
+ - Frame is a component definition (Figma component, not an instance) — use its instances instead
45
+
46
+ ## Viewport Frames
47
+
48
+ When multiple frames represent the same section at different widths:
49
+ - Smallest width = mobile (Phase 2 base URL)
50
+ - Larger widths = desktop breakpoints (Phase 2 subsequent URLs)
51
+ - Process mobile first, then add desktop as responsive layer — never the reverse
52
+
53
+ ## Frame Count Warning
54
+
55
+ If total PAGE frames > 10, confirm with the user before proceeding. Large frame counts may indicate the Figma file covers multiple pages that should be separate feature implementations.