@su-record/vibe 2.9.2 → 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 +30 -10
- package/README.ko.md +90 -25
- package/README.md +139 -25
- package/agents/teams/figma/figma-builder.md +29 -1
- package/agents/teams/review-debate-team.md +1 -1
- package/commands/vibe.analyze.md +324 -170
- package/commands/vibe.figma.md +549 -34
- package/commands/vibe.harness.md +177 -0
- package/commands/vibe.run.md +44 -27
- package/commands/vibe.scaffold.md +195 -0
- package/commands/vibe.spec.md +375 -947
- 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/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 +234 -154
- package/skills/vibe.figma.convert/SKILL.md +123 -112
- package/skills/vibe.figma.extract/SKILL.md +141 -129
- 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} +269 -108
- 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,138 +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
|
-
D1. TEXT
|
|
42
|
-
D2. TEXT
|
|
43
|
-
D3. TEXT
|
|
44
|
-
D4.
|
|
45
|
-
D5. TEXT
|
|
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
46
|
|
|
47
|
-
→ content/{section}-{name}.webp
|
|
48
|
-
→ <img src="..." alt="
|
|
49
|
-
→ CSS text
|
|
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
50
|
|
|
51
|
-
BG
|
|
52
|
-
❌ <img>
|
|
53
|
-
✅
|
|
51
|
+
BG frames:
|
|
52
|
+
❌ No <img> tags
|
|
53
|
+
✅ Parent SCSS background-image only:
|
|
54
54
|
.section { background-image: url('bg.webp'); background-size: cover; }
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
---
|
|
58
58
|
|
|
59
|
-
## 2.
|
|
59
|
+
## 2. Node → HTML Mapping (Mechanical)
|
|
60
60
|
|
|
61
61
|
```
|
|
62
|
-
FRAME + Auto Layout → <div> + flex (direction/gap/padding
|
|
63
|
-
FRAME + no Auto Layout → <div> + position:relative (
|
|
64
|
-
TEXT → <span> (Claude
|
|
65
|
-
IMAGE fill (
|
|
66
|
-
VECTOR/GROUP ≤64px →
|
|
67
|
-
INSTANCE
|
|
68
|
-
|
|
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
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
---
|
|
72
72
|
|
|
73
|
-
## 3. CSS
|
|
73
|
+
## 3. CSS Property Direct Mapping
|
|
74
74
|
|
|
75
75
|
```
|
|
76
|
-
⛔
|
|
77
|
-
⛔
|
|
78
|
-
⛔
|
|
79
|
-
✅ tree.json
|
|
80
|
-
✅
|
|
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).
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
Layout (layout/ files):
|
|
83
83
|
display, flex-direction, justify-content, align-items, gap,
|
|
84
84
|
flex-grow, padding, width, height, overflow, position, top, left, transform
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Visual (components/ files):
|
|
87
87
|
background-color, background-image, background-blend-mode, color,
|
|
88
88
|
font-family, font-size, font-weight, line-height, letter-spacing,
|
|
89
89
|
text-align, text-transform, text-overflow,
|
|
90
90
|
border-radius, border, outline, box-sizing, box-shadow,
|
|
91
91
|
opacity, mix-blend-mode, filter, backdrop-filter
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
If a value is absent → omit that property (no guessing)
|
|
94
94
|
|
|
95
|
-
❌
|
|
96
|
-
aspect-ratio: 720 / 1280; → ❌ (tree.json
|
|
97
|
-
@function wp-fluid(...) { ... } → ❌ (
|
|
98
|
-
@include wp-bg-layer; → ❌ (
|
|
99
|
-
clamp(12px, 2.5vw, 18px); → ❌ (tree.json
|
|
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
100
|
|
|
101
|
-
✅
|
|
101
|
+
✅ Correct patterns:
|
|
102
102
|
width: 100vw; height: 177.78vw; → ✅ (720px/720×100, 1280px/720×100)
|
|
103
103
|
background-image: url('hero-bg.webp'); background-size: cover; → ✅
|
|
104
104
|
font-size: 5.56vw; → ✅ (40px/720×100)
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
###
|
|
107
|
+
### Responsive Unit Conversion
|
|
108
108
|
|
|
109
109
|
```
|
|
110
|
-
vw
|
|
110
|
+
vw conversion (use only the mechanical formula):
|
|
111
111
|
width, height, padding, gap, border-radius, box-shadow, top, left, border-width
|
|
112
|
-
vw
|
|
113
|
-
⛔ clamp, min(), max()
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
|
117
|
-
|
|
118
|
-
| h1~h2
|
|
119
|
-
| h3~h4
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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:
|
|
126
126
|
color, opacity, font-weight, font-family, z-index, text-align,
|
|
127
127
|
mix-blend-mode, transform(rotate), background-blend-mode,
|
|
128
128
|
flex-grow, box-sizing, grayscale/saturate, background-image(gradient)
|
|
129
129
|
|
|
130
|
-
layoutSizing
|
|
131
|
-
HUG → width/height
|
|
132
|
-
FILL →
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
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
|
|
136
136
|
|
|
137
137
|
imageScaleMode:
|
|
138
138
|
FILL → background-size: cover
|
|
@@ -143,29 +143,29 @@ imageScaleMode:
|
|
|
143
143
|
|
|
144
144
|
---
|
|
145
145
|
|
|
146
|
-
## 4. Claude
|
|
146
|
+
## 4. Claude Semantic Decisions (The Only Inference Area)
|
|
147
147
|
|
|
148
148
|
```
|
|
149
|
-
1. HTML
|
|
150
|
-
<span> → <h2> (
|
|
149
|
+
1. HTML tag promotion:
|
|
150
|
+
<span> → <h2> (section title), <p> (description), <button> (clickable)
|
|
151
151
|
|
|
152
|
-
2.
|
|
153
|
-
|
|
152
|
+
2. Component separation:
|
|
153
|
+
1st-depth children = section components, INSTANCE repetition = shared components
|
|
154
154
|
|
|
155
|
-
3.
|
|
155
|
+
3. Interactions: @click handlers, state variables, conditional rendering
|
|
156
156
|
|
|
157
|
-
4.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
4. Accessibility:
|
|
158
|
+
Background/decorative → alt="" aria-hidden="true"
|
|
159
|
+
Content → alt="description"
|
|
160
|
+
Interactive → role, aria-label
|
|
161
161
|
|
|
162
162
|
5. Semantic HTML:
|
|
163
|
-
|
|
163
|
+
Top-level <section>, heading order h1~h6, lists <ul>/<ol>
|
|
164
164
|
```
|
|
165
165
|
|
|
166
166
|
---
|
|
167
167
|
|
|
168
|
-
## 5. SCSS
|
|
168
|
+
## 5. SCSS File Structure
|
|
169
169
|
|
|
170
170
|
```
|
|
171
171
|
layout/ → position, display, flex, width, height, padding, gap, overflow, z-index
|
|
@@ -175,50 +175,61 @@ _base.scss:
|
|
|
175
175
|
.{feature} { width: 100%; max-width: 720px; margin: 0 auto; overflow-x: hidden; }
|
|
176
176
|
|
|
177
177
|
_tokens.scss:
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
Reference existing tokens (@use) → if no mapping, create a new token
|
|
179
|
+
Feature-scoped naming ($feature-color-xxx)
|
|
180
180
|
```
|
|
181
181
|
|
|
182
182
|
---
|
|
183
183
|
|
|
184
|
-
## 6.
|
|
184
|
+
## 6. Responsive (MO↔PC)
|
|
185
185
|
|
|
186
186
|
```
|
|
187
|
-
remapped.json
|
|
188
|
-
|
|
187
|
+
Use remapped.json's pcDiff to add @media overrides.
|
|
188
|
+
Do not delete the base MO code.
|
|
189
189
|
|
|
190
190
|
.section {
|
|
191
|
-
// MO
|
|
191
|
+
// MO base (vw = px / 720 × 100)
|
|
192
192
|
height: 177.78vw;
|
|
193
193
|
|
|
194
194
|
@media (min-width: #{$bp-desktop}) {
|
|
195
|
-
// PC
|
|
195
|
+
// PC diff only (vw = px / 2560 × 100)
|
|
196
196
|
height: 32.66vw;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
diff
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
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 }
|
|
206
206
|
```
|
|
207
207
|
|
|
208
208
|
---
|
|
209
209
|
|
|
210
|
-
## 7.
|
|
210
|
+
## 7. Self-Validation
|
|
211
211
|
|
|
212
212
|
```
|
|
213
|
-
⛔
|
|
213
|
+
⛔ Any failure → rewrite that section's code (do not proceed to the next section)
|
|
214
214
|
|
|
215
|
-
1.
|
|
216
|
-
2.
|
|
217
|
-
3.
|
|
218
|
-
4. ⛔
|
|
219
|
-
(
|
|
220
|
-
5. ⛔
|
|
221
|
-
(aspect-ratio, container, custom
|
|
222
|
-
6. ⛔
|
|
223
|
-
(
|
|
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)
|
|
224
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. |
|