@su-record/vibe 2.9.1 → 2.9.3
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.md +31 -10
- package/README.ko.md +90 -25
- package/README.md +139 -25
- package/agents/teams/debug-team.md +70 -0
- package/agents/teams/dev-team.md +88 -0
- package/agents/teams/docs-team.md +80 -0
- package/agents/teams/figma/figma-analyst.md +52 -0
- package/agents/teams/figma/figma-architect.md +112 -0
- package/agents/teams/figma/figma-auditor.md +82 -0
- package/agents/teams/figma/figma-builder.md +100 -0
- package/agents/teams/figma-team.md +85 -0
- package/agents/teams/fullstack-team.md +83 -0
- package/agents/teams/lite-team.md +69 -0
- package/agents/teams/migration-team.md +78 -0
- package/agents/teams/refactor-team.md +94 -0
- package/agents/teams/research-team.md +86 -0
- package/agents/teams/review-debate-team.md +125 -0
- package/agents/teams/security-team.md +81 -0
- package/commands/vibe.analyze.md +324 -170
- package/commands/vibe.figma.md +549 -34
- package/commands/vibe.harness.md +177 -0
- package/commands/vibe.review.md +1 -63
- package/commands/vibe.run.md +52 -403
- package/commands/vibe.scaffold.md +195 -0
- package/commands/vibe.spec.md +373 -1003
- package/commands/vibe.trace.md +17 -0
- package/commands/vibe.verify.md +19 -10
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +29 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +4 -2
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/postinstall/constants.d.ts +1 -1
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +6 -1
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/setup/ProjectSetup.d.ts +12 -1
- package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
- package/dist/cli/setup/ProjectSetup.js +259 -72
- package/dist/cli/setup/ProjectSetup.js.map +1 -1
- package/dist/cli/setup.d.ts +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +1 -1
- package/dist/cli/setup.js.map +1 -1
- package/hooks/scripts/figma-guard.js +220 -0
- package/hooks/scripts/figma-refine.js +315 -0
- package/hooks/scripts/figma-to-scss.js +394 -0
- package/hooks/scripts/figma-validate.js +353 -0
- package/package.json +1 -1
- package/skills/arch-guard/SKILL.md +1 -1
- package/skills/capability-loop/SKILL.md +106 -2
- package/skills/chub-usage/SKILL.md +43 -43
- package/skills/claude-md-guide/SKILL.md +175 -175
- package/skills/design-teach/SKILL.md +33 -33
- package/skills/devlog/SKILL.md +38 -38
- package/skills/event-comms/SKILL.md +23 -13
- package/skills/event-ops/SKILL.md +28 -19
- package/skills/event-planning/SKILL.md +13 -1
- package/skills/priority-todos/SKILL.md +1 -1
- package/skills/vibe.figma/SKILL.md +263 -115
- package/skills/vibe.figma/templates/component-spec.md +168 -0
- package/skills/vibe.figma.convert/SKILL.md +131 -84
- package/skills/vibe.figma.convert/rubrics/conversion-rules.md +12 -0
- package/skills/vibe.figma.extract/SKILL.md +148 -108
- package/skills/vibe.figma.extract/rubrics/image-rules.md +15 -3
- package/skills/vibe.interview/SKILL.md +358 -0
- package/skills/vibe.interview/checklists/api.md +101 -0
- package/skills/vibe.interview/checklists/feature.md +88 -0
- package/skills/vibe.interview/checklists/library.md +95 -0
- package/skills/vibe.interview/checklists/mobile.md +89 -0
- package/skills/vibe.interview/checklists/webapp.md +97 -0
- package/skills/vibe.interview/checklists/website.md +99 -0
- package/skills/vibe.plan/SKILL.md +216 -0
- package/skills/vibe.spec/SKILL.md +1155 -0
- package/{commands/vibe.spec.review.md → skills/vibe.spec.review/SKILL.md} +272 -155
- package/vibe/templates/claudemd-template.md +74 -0
- package/vibe/templates/constitution-template.md +15 -0
- package/vibe/templates/plan-template.md +194 -0
|
@@ -1,110 +1,138 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vibe.figma.convert
|
|
3
|
-
description: Figma
|
|
3
|
+
description: Figma tree → structured code generation + screenshot validation
|
|
4
4
|
triggers: []
|
|
5
5
|
tier: standard
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# vibe.figma.convert —
|
|
8
|
+
# vibe.figma.convert — Tree-Based Structured Code Generation
|
|
9
9
|
|
|
10
|
-
**tree.json
|
|
11
|
-
**Claude
|
|
10
|
+
**Mechanically map tree.json to HTML+CSS. Do not guess.**
|
|
11
|
+
**Claude handles only semantic decisions (tag selection, component separation, interactions).**
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
## 0.
|
|
15
|
+
## 0. Reuse Check (Before Writing Code)
|
|
16
16
|
|
|
17
17
|
```
|
|
18
|
-
component-index.json
|
|
19
|
-
✅
|
|
20
|
-
✅ props
|
|
21
|
-
❌
|
|
22
|
-
❌ 90%
|
|
18
|
+
If there is a matching component in component-index.json:
|
|
19
|
+
✅ Import and use it (do not create a new one)
|
|
20
|
+
✅ Customize via props
|
|
21
|
+
❌ Modify the internals of an existing component
|
|
22
|
+
❌ Create a new one when 90% similar already exists
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
-
## 1.
|
|
27
|
+
## 1. Image vs HTML Determination (BLOCKING)
|
|
28
28
|
|
|
29
29
|
```
|
|
30
|
-
⛔
|
|
30
|
+
⛔ Before writing code: write the determination table first.
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
Q1. TEXT
|
|
34
|
-
Q2. INSTANCE
|
|
35
|
-
Q3.
|
|
36
|
-
Q4.
|
|
37
|
-
|
|
32
|
+
Determination rules (YES on any one → HTML):
|
|
33
|
+
Q1. Does it have TEXT children? → HTML
|
|
34
|
+
Q2. Is it a repeating INSTANCE pattern? → HTML v-for (inner assets only as <img>)
|
|
35
|
+
Q3. Is it an interactive element? (btn, CTA) → HTML <button>
|
|
36
|
+
Q4. Is it dynamic data? (price, quantity, duration) → HTML text
|
|
37
|
+
All NO → image rendering is acceptable
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
⛔ Design text determination (Q1 exception — text that must be rendered as image):
|
|
40
|
+
If any of the following conditions are met → image rendering (HTML text forbidden):
|
|
41
|
+
D1. TEXT node has 2 or more fills (gradient + solid overlap)
|
|
42
|
+
D2. TEXT node has effects (DROP_SHADOW, stroke, etc.)
|
|
43
|
+
D3. TEXT node fills contain a GRADIENT type
|
|
44
|
+
D4. Parent GROUP/FRAME has 3 or more VECTORs (vector text)
|
|
45
|
+
D5. TEXT node fontFamily is not in the project's web fonts
|
|
46
|
+
|
|
47
|
+
→ Render node as content/{section}-{name}.webp
|
|
48
|
+
→ Place in HTML as <img src="..." alt="text content">
|
|
49
|
+
→ Do not attempt CSS text implementation (visual quality cannot be guaranteed)
|
|
50
|
+
|
|
51
|
+
BG frames:
|
|
52
|
+
❌ No <img> tags
|
|
53
|
+
✅ Parent SCSS background-image only:
|
|
42
54
|
.section { background-image: url('bg.webp'); background-size: cover; }
|
|
43
55
|
```
|
|
44
56
|
|
|
45
57
|
---
|
|
46
58
|
|
|
47
|
-
## 2.
|
|
59
|
+
## 2. Node → HTML Mapping (Mechanical)
|
|
48
60
|
|
|
49
61
|
```
|
|
50
|
-
FRAME + Auto Layout → <div> + flex (direction/gap/padding
|
|
51
|
-
FRAME + no Auto Layout → <div> + position:relative (
|
|
52
|
-
TEXT → <span> (Claude
|
|
53
|
-
IMAGE fill (
|
|
54
|
-
VECTOR/GROUP ≤64px →
|
|
55
|
-
INSTANCE
|
|
56
|
-
|
|
62
|
+
FRAME + Auto Layout → <div> + flex (direction/gap/padding directly mapped)
|
|
63
|
+
FRAME + no Auto Layout → <div> + position:relative (children absolute)
|
|
64
|
+
TEXT → <span> (Claude promotes to h2/p/button)
|
|
65
|
+
IMAGE fill (passed determination) → <img>
|
|
66
|
+
VECTOR/GROUP ≤64px → icon <img>
|
|
67
|
+
INSTANCE repeated 2+ → v-for / .map()
|
|
68
|
+
Size 0px, VECTOR ≤2px → skip
|
|
57
69
|
```
|
|
58
70
|
|
|
59
71
|
---
|
|
60
72
|
|
|
61
|
-
## 3. CSS
|
|
73
|
+
## 3. CSS Property Direct Mapping
|
|
62
74
|
|
|
63
75
|
```
|
|
64
|
-
|
|
65
|
-
|
|
76
|
+
⛔ Immutable rule: do not create CSS properties not present in tree.json.
|
|
77
|
+
⛔ No custom functions/mixins: no self-defined abstractions like wp-fluid(), wp-bg-layer, etc.
|
|
78
|
+
⛔ No CSS properties not in tree.json such as aspect-ratio, container query, etc.
|
|
79
|
+
✅ Only direct 1:1 mapping from tree.json css object → SCSS is allowed.
|
|
80
|
+
✅ The only transformation: px → vw (mechanically, using the formula).
|
|
66
81
|
|
|
67
|
-
|
|
82
|
+
Layout (layout/ files):
|
|
68
83
|
display, flex-direction, justify-content, align-items, gap,
|
|
69
84
|
flex-grow, padding, width, height, overflow, position, top, left, transform
|
|
70
85
|
|
|
71
|
-
|
|
86
|
+
Visual (components/ files):
|
|
72
87
|
background-color, background-image, background-blend-mode, color,
|
|
73
88
|
font-family, font-size, font-weight, line-height, letter-spacing,
|
|
74
89
|
text-align, text-transform, text-overflow,
|
|
75
90
|
border-radius, border, outline, box-sizing, box-shadow,
|
|
76
91
|
opacity, mix-blend-mode, filter, backdrop-filter
|
|
77
92
|
|
|
78
|
-
|
|
93
|
+
If a value is absent → omit that property (no guessing)
|
|
94
|
+
|
|
95
|
+
❌ Forbidden patterns:
|
|
96
|
+
aspect-ratio: 720 / 1280; → ❌ (tree.json has width+height)
|
|
97
|
+
@function wp-fluid(...) { ... } → ❌ (custom function)
|
|
98
|
+
@include wp-bg-layer; → ❌ (custom mixin)
|
|
99
|
+
clamp(12px, 2.5vw, 18px); → ❌ (guessing values not in tree.json)
|
|
100
|
+
|
|
101
|
+
✅ Correct patterns:
|
|
102
|
+
width: 100vw; height: 177.78vw; → ✅ (720px/720×100, 1280px/720×100)
|
|
103
|
+
background-image: url('hero-bg.webp'); background-size: cover; → ✅
|
|
104
|
+
font-size: 5.56vw; → ✅ (40px/720×100)
|
|
79
105
|
```
|
|
80
106
|
|
|
81
|
-
###
|
|
107
|
+
### Responsive Unit Conversion
|
|
82
108
|
|
|
83
109
|
```
|
|
84
|
-
vw
|
|
110
|
+
vw conversion (use only the mechanical formula):
|
|
85
111
|
width, height, padding, gap, border-radius, box-shadow, top, left, border-width
|
|
86
|
-
vw
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
97
|
-
|
|
112
|
+
vw value = (Figma px / designWidth) × 100
|
|
113
|
+
⛔ clamp, min(), max() etc. are allowed only for font-size
|
|
114
|
+
|
|
115
|
+
Font → clamp(min, vw, max):
|
|
116
|
+
| Role | Min | Determination Basis |
|
|
117
|
+
|---------|-------|-----------------------------|
|
|
118
|
+
| h1~h2 | 16px | name contains "title" |
|
|
119
|
+
| h3~h4 | 14px | medium size |
|
|
120
|
+
| Body | 12px | long text |
|
|
121
|
+
| Caption | 10px | small fontSize |
|
|
122
|
+
| Button | 12px | name contains "btn" |
|
|
123
|
+
max value = original Figma px as-is
|
|
124
|
+
|
|
125
|
+
Properties not converted:
|
|
98
126
|
color, opacity, font-weight, font-family, z-index, text-align,
|
|
99
127
|
mix-blend-mode, transform(rotate), background-blend-mode,
|
|
100
128
|
flex-grow, box-sizing, grayscale/saturate, background-image(gradient)
|
|
101
129
|
|
|
102
|
-
layoutSizing
|
|
103
|
-
HUG → width/height
|
|
104
|
-
FILL →
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
FIXED → vw
|
|
130
|
+
layoutSizing handling:
|
|
131
|
+
HUG → omit width/height (auto)
|
|
132
|
+
FILL → check parent direction:
|
|
133
|
+
FILL in same direction → flex: 1 0 0
|
|
134
|
+
FILL on cross axis → align-self: stretch
|
|
135
|
+
FIXED → vw conversion
|
|
108
136
|
|
|
109
137
|
imageScaleMode:
|
|
110
138
|
FILL → background-size: cover
|
|
@@ -115,29 +143,29 @@ imageScaleMode:
|
|
|
115
143
|
|
|
116
144
|
---
|
|
117
145
|
|
|
118
|
-
## 4. Claude
|
|
146
|
+
## 4. Claude Semantic Decisions (The Only Inference Area)
|
|
119
147
|
|
|
120
148
|
```
|
|
121
|
-
1. HTML
|
|
122
|
-
<span> → <h2> (
|
|
149
|
+
1. HTML tag promotion:
|
|
150
|
+
<span> → <h2> (section title), <p> (description), <button> (clickable)
|
|
123
151
|
|
|
124
|
-
2.
|
|
125
|
-
|
|
152
|
+
2. Component separation:
|
|
153
|
+
1st-depth children = section components, INSTANCE repetition = shared components
|
|
126
154
|
|
|
127
|
-
3.
|
|
155
|
+
3. Interactions: @click handlers, state variables, conditional rendering
|
|
128
156
|
|
|
129
|
-
4.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
157
|
+
4. Accessibility:
|
|
158
|
+
Background/decorative → alt="" aria-hidden="true"
|
|
159
|
+
Content → alt="description"
|
|
160
|
+
Interactive → role, aria-label
|
|
133
161
|
|
|
134
162
|
5. Semantic HTML:
|
|
135
|
-
|
|
163
|
+
Top-level <section>, heading order h1~h6, lists <ul>/<ol>
|
|
136
164
|
```
|
|
137
165
|
|
|
138
166
|
---
|
|
139
167
|
|
|
140
|
-
## 5. SCSS
|
|
168
|
+
## 5. SCSS File Structure
|
|
141
169
|
|
|
142
170
|
```
|
|
143
171
|
layout/ → position, display, flex, width, height, padding, gap, overflow, z-index
|
|
@@ -147,42 +175,61 @@ _base.scss:
|
|
|
147
175
|
.{feature} { width: 100%; max-width: 720px; margin: 0 auto; overflow-x: hidden; }
|
|
148
176
|
|
|
149
177
|
_tokens.scss:
|
|
150
|
-
|
|
151
|
-
|
|
178
|
+
Reference existing tokens (@use) → if no mapping, create a new token
|
|
179
|
+
Feature-scoped naming ($feature-color-xxx)
|
|
152
180
|
```
|
|
153
181
|
|
|
154
182
|
---
|
|
155
183
|
|
|
156
|
-
## 6.
|
|
184
|
+
## 6. Responsive (MO↔PC)
|
|
157
185
|
|
|
158
186
|
```
|
|
159
|
-
remapped.json
|
|
160
|
-
|
|
187
|
+
Use remapped.json's pcDiff to add @media overrides.
|
|
188
|
+
Do not delete the base MO code.
|
|
161
189
|
|
|
162
190
|
.section {
|
|
163
|
-
// MO
|
|
191
|
+
// MO base (vw = px / 720 × 100)
|
|
164
192
|
height: 177.78vw;
|
|
165
193
|
|
|
166
194
|
@media (min-width: #{$bp-desktop}) {
|
|
167
|
-
// PC
|
|
195
|
+
// PC diff only (vw = px / 2560 × 100)
|
|
168
196
|
height: 32.66vw;
|
|
169
197
|
}
|
|
170
198
|
}
|
|
171
199
|
|
|
172
|
-
diff
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
layoutSizing diff → @media { flex/width
|
|
200
|
+
diff handling:
|
|
201
|
+
Same value → keep MO only
|
|
202
|
+
Different px → @media { PC vw }
|
|
203
|
+
Different layout → @media { flex-direction: row }
|
|
204
|
+
Different image → @media { background-image: url(pc-xxx.webp) }
|
|
205
|
+
layoutSizing diff → @media { flex/width change }
|
|
178
206
|
```
|
|
179
207
|
|
|
180
208
|
---
|
|
181
209
|
|
|
182
|
-
## 7.
|
|
210
|
+
## 7. Self-Validation
|
|
183
211
|
|
|
184
212
|
```
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
213
|
+
⛔ Any failure → rewrite that section's code (do not proceed to the next section)
|
|
214
|
+
|
|
215
|
+
1. Class names: all classes in template are defined in SCSS → OK
|
|
216
|
+
2. Image paths: src file actually exists → OK
|
|
217
|
+
3. Tree mapping: Auto Layout node → flex present in SCSS → OK
|
|
218
|
+
4. ⛔ No abstractions: no @function or @mixin defined in SCSS → OK
|
|
219
|
+
(project existing token @use is allowed; creating new functions/mixins is forbidden)
|
|
220
|
+
5. ⛔ Property mapping: all SCSS properties are grounded in tree.json css object → OK
|
|
221
|
+
(aspect-ratio, container, custom properties etc. not in tree.json → FAIL)
|
|
222
|
+
6. ⛔ Image filenames: kebab-case naming → OK
|
|
223
|
+
(hash filenames like 68ad470b.webp etc. → FAIL)
|
|
188
224
|
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Error Recovery
|
|
229
|
+
|
|
230
|
+
| Failure | Recovery |
|
|
231
|
+
|---------|----------|
|
|
232
|
+
| tree.json missing | Prompt user to run extract phase first: load `vibe.figma.extract` skill |
|
|
233
|
+
| component-index.json missing | Generate minimal index from tree.json section names |
|
|
234
|
+
| sections.json malformed | Re-read tree.json and regenerate sections.json from scratch |
|
|
235
|
+
| SCSS output empty | Check tree.json for valid style nodes. If none found, use default reset styles. |
|
|
@@ -89,6 +89,12 @@ box-shadow, opacity, mix-blend-mode, filter, backdrop-filter
|
|
|
89
89
|
|
|
90
90
|
스토리보드 CONFIG에서 designWidth, minWidth 확보.
|
|
91
91
|
|
|
92
|
+
⛔ **커스텀 함수 생성 금지:**
|
|
93
|
+
❌ @function wp-fluid(...) { ... }
|
|
94
|
+
❌ @mixin wp-bg-layer { ... }
|
|
95
|
+
❌ 자체 추상화 (aspect-ratio, clamp 남용)
|
|
96
|
+
✅ vw 변환은 인라인 계산값을 직접 기입
|
|
97
|
+
|
|
92
98
|
**UI 요소 → vw 비례:**
|
|
93
99
|
vw값 = (Figma px / designWidth) × 100
|
|
94
100
|
적용: width, height, padding, gap, margin, border-radius,
|
|
@@ -120,9 +126,15 @@ BEM 패턴: `.sectionName__childName`
|
|
|
120
126
|
|
|
121
127
|
## 자가 검증 (코드 작성 후)
|
|
122
128
|
|
|
129
|
+
⛔ 하나라도 실패 → 코드 재작성 (다음 섹션 진행 금지)
|
|
130
|
+
|
|
123
131
|
- [ ] ⛔ BG 프레임이 <img> 태그로 처리되지 않았는가? (CSS background-image만 허용)
|
|
124
132
|
- [ ] ⛔ TEXT 자식이 있는 프레임이 통째 이미지로 처리되지 않았는가?
|
|
125
133
|
- [ ] ⛔ INSTANCE 반복 패턴(카드/아이템)이 이미지 1장으로 처리되지 않았는가?
|
|
134
|
+
- [ ] ⛔ SCSS에 @function 또는 @mixin 자체 정의가 없는가? (기존 토큰 @use만 허용)
|
|
135
|
+
- [ ] ⛔ aspect-ratio 등 tree.json에 없는 CSS 속성이 없는가?
|
|
136
|
+
- [ ] ⛔ 이미지 파일명이 kebab-case인가? (해시 파일명 금지)
|
|
137
|
+
- [ ] ⛔ 디자인 텍스트(그래디언트/스트로크 효과)가 이미지로 처리되었는가?
|
|
126
138
|
- [ ] template 클래스 ↔ SCSS 클래스 1:1 일치
|
|
127
139
|
- [ ] 모든 img src가 static/에 실제 존재
|
|
128
140
|
- [ ] Auto Layout 노드 → SCSS에 flex 속성 존재
|