@su-record/vibe 2.8.41 → 2.8.44

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 (29) hide show
  1. package/CLAUDE.md +1 -0
  2. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  3. package/dist/cli/postinstall/constants.js +1 -0
  4. package/dist/cli/postinstall/constants.js.map +1 -1
  5. package/dist/infra/lib/VerificationLoop.d.ts +62 -0
  6. package/dist/infra/lib/VerificationLoop.d.ts.map +1 -1
  7. package/dist/infra/lib/VerificationLoop.js +115 -0
  8. package/dist/infra/lib/VerificationLoop.js.map +1 -1
  9. package/dist/infra/lib/evolution/GuardAnalyzer.d.ts +44 -0
  10. package/dist/infra/lib/evolution/GuardAnalyzer.d.ts.map +1 -0
  11. package/dist/infra/lib/evolution/GuardAnalyzer.js +116 -0
  12. package/dist/infra/lib/evolution/GuardAnalyzer.js.map +1 -0
  13. package/dist/infra/lib/evolution/HookTraceReader.d.ts +45 -0
  14. package/dist/infra/lib/evolution/HookTraceReader.d.ts.map +1 -0
  15. package/dist/infra/lib/evolution/HookTraceReader.js +108 -0
  16. package/dist/infra/lib/evolution/HookTraceReader.js.map +1 -0
  17. package/dist/infra/lib/evolution/index.d.ts +4 -0
  18. package/dist/infra/lib/evolution/index.d.ts.map +1 -1
  19. package/dist/infra/lib/evolution/index.js +3 -0
  20. package/dist/infra/lib/evolution/index.js.map +1 -1
  21. package/hooks/scripts/evolution-engine.js +23 -1
  22. package/hooks/scripts/pre-tool-guard.js +9 -0
  23. package/hooks/scripts/sentinel-guard.js +3 -0
  24. package/hooks/scripts/utils.js +38 -0
  25. package/package.json +1 -1
  26. package/skills/chub-usage/SKILL.md +115 -0
  27. package/skills/vibe.figma/SKILL.md +42 -42
  28. package/skills/vibe.figma/templates/component-index.md +126 -0
  29. package/skills/vibe.figma/templates/remapped-tree.md +277 -0
@@ -0,0 +1,126 @@
1
+ # Component Index Template
2
+
3
+ Phase 0에서 프로젝트 기존 컴포넌트를 인덱싱할 때 이 구조를 따른다.
4
+
5
+ ---
6
+
7
+ ## 인덱스 구조
8
+
9
+ ```json
10
+ {
11
+ "sources": [
12
+ {
13
+ "type": "local",
14
+ "path": "components/",
15
+ "name": "project-components",
16
+ "excludedFolders": ["__tests__", "stories"]
17
+ },
18
+ {
19
+ "type": "local",
20
+ "path": "composables/",
21
+ "name": "project-composables"
22
+ }
23
+ ],
24
+ "components": [
25
+ {
26
+ "name": "BaseButton",
27
+ "path": "components/common/BaseButton.vue",
28
+ "props": ["label: string", "variant: 'primary' | 'secondary'", "disabled: boolean"],
29
+ "slots": ["default"],
30
+ "classes": ["base-button", "base-button--primary", "base-button--secondary"],
31
+ "description": "공통 버튼 컴포넌트"
32
+ },
33
+ {
34
+ "name": "GNB",
35
+ "path": "components/layout/GNB.vue",
36
+ "props": ["menuItems: MenuItem[]"],
37
+ "slots": [],
38
+ "classes": ["gnb", "gnb__logo", "gnb__menu"],
39
+ "description": "글로벌 네비게이션 바"
40
+ }
41
+ ],
42
+ "composables": [
43
+ {
44
+ "name": "useAuth",
45
+ "path": "composables/useAuth.ts",
46
+ "params": [],
47
+ "returns": "{ user: User, login: (email: string, pw: string) => Promise<void> }",
48
+ "description": "인증 상태 관리"
49
+ }
50
+ ],
51
+ "types": [
52
+ {
53
+ "name": "User",
54
+ "path": "types/User.ts",
55
+ "fields": ["id: string", "email: string", "name: string"]
56
+ }
57
+ ],
58
+ "designTokens": {
59
+ "source": "styles/_variables.scss",
60
+ "colors": [
61
+ { "name": "$color-primary", "value": "#3b82f6" },
62
+ { "name": "$color-navy", "value": "#0a1628" }
63
+ ],
64
+ "spacing": [
65
+ { "name": "$space-sm", "value": "8px" },
66
+ { "name": "$space-md", "value": "16px" }
67
+ ],
68
+ "typography": [
69
+ { "name": "$font-pretendard", "value": "'Pretendard', sans-serif" }
70
+ ]
71
+ }
72
+ }
73
+ ```
74
+
75
+ ---
76
+
77
+ ## 인덱싱 규칙
78
+
79
+ ### 소스 스캔 (Phase 0)
80
+
81
+ ```
82
+ Glob 패턴:
83
+ components/**/*.vue, components/**/*.tsx → 컴포넌트
84
+ composables/**/*.ts, hooks/**/*.ts → Composables/Hooks
85
+ types/**/*.ts, types.ts → 타입 정의
86
+ styles/_variables.scss, tailwind.config.* → 디자인 토큰
87
+ ```
88
+
89
+ ### 컴포넌트 추출 (Read 기반)
90
+
91
+ 각 파일에서:
92
+ - **Props**: `defineProps<{...}>` 또는 `interface Props` 패턴
93
+ - **Slots**: `<slot>` 또는 `{children}` 패턴
94
+ - **Classes**: 최상위 template 요소의 `class="..."` 또는 `className={...}`
95
+ - **Description**: JSDoc `@description` 또는 파일 첫 번째 주석
96
+
97
+ ### 제한
98
+
99
+ - 파일 50개 초과 시 우선순위 디렉토리만: components/ui/ → components/common/ → components/shared/
100
+ - 파일당 Read 최대 300줄
101
+ - 전체 인덱싱 2분 이내
102
+
103
+ ### Figma 노드 ↔ 컴포넌트 매핑 (Phase 3)
104
+
105
+ ```
106
+ tree.json 노드의 name/type으로 component-index 매칭:
107
+
108
+ name "Btn_*" + component-index에 BaseButton 존재
109
+ → <BaseButton :label="..." variant="primary" /> 로 재사용
110
+
111
+ name "GNB" + component-index에 GNB 존재
112
+ → <GNB :menu-items="..." /> 로 재사용
113
+
114
+ 매칭 안 됨 → 새 컴포넌트 생성
115
+ 50% 미만 props 호환 → 매칭 거부, 새로 생성
116
+ ```
117
+
118
+ ---
119
+
120
+ ## 저장 위치
121
+
122
+ ```
123
+ /tmp/{feature}/{bp-folder}/component-index.json
124
+ ```
125
+
126
+ Phase 3에서 Read로 로드하여 컴포넌트 재사용 판단에 사용.
@@ -0,0 +1,277 @@
1
+ # Remapped Tree Template
2
+
3
+ tree.json을 코드 생성에 최적화된 구조로 리매핑한다.
4
+ 모든 브레이크포인트의 tree.json을 동시에 입력받아, 노드 매칭 + CSS diff까지 포함.
5
+
6
+ ---
7
+
8
+ ## 입력
9
+
10
+ ```
11
+ /tmp/{feature}/
12
+ mo-main/tree.json ← 모바일 Figma tree
13
+ pc-main/tree.json ← 데스크탑 Figma tree (있으면)
14
+ ```
15
+
16
+ ## 출력
17
+
18
+ ```
19
+ /tmp/{feature}/remapped.json
20
+ ```
21
+
22
+ ---
23
+
24
+ ## 구조 정의
25
+
26
+ ```json
27
+ {
28
+ "feature": "winter-pcbang",
29
+ "designWidth": {
30
+ "mo": 720,
31
+ "pc": 2560
32
+ },
33
+ "minWidth": 340,
34
+ "breakpoint": 1025,
35
+ "sections": [
36
+ {
37
+ "section": "hero",
38
+ "tag": "section",
39
+ "storyboard": {
40
+ "name": "Hero (키비주얼)",
41
+ "features": ["키비주얼 + 이벤트 정보 + 공유 버튼"],
42
+ "interactions": ["공유 버튼 클릭 → 공유 다이얼로그"],
43
+ "states": ["default"]
44
+ },
45
+ "bg": {
46
+ "mo": { "nodeId": "...", "file": "mo-main/bg/hero-bg.png" },
47
+ "pc": { "nodeId": "...", "file": "pc-main/bg/hero-bg.png" }
48
+ },
49
+ "size": {
50
+ "mo": { "w": 720, "h": 1280 },
51
+ "pc": { "w": 2560, "h": 1080 }
52
+ },
53
+ "children": [
54
+ {
55
+ "role": "title-group",
56
+ "type": "flex-column",
57
+ "css": {
58
+ "mo": { "alignItems": "center", "gap": "24px", "width": "620px" },
59
+ "pc": { "alignItems": "center", "gap": "40px", "width": "1200px" }
60
+ },
61
+ "children": [
62
+ {
63
+ "role": "title-image",
64
+ "type": "node-render",
65
+ "render": {
66
+ "mo": { "nodeId": "...", "file": "mo-main/content/hero-title.png", "size": { "w": 620, "h": 174 } },
67
+ "pc": { "nodeId": "...", "file": "pc-main/content/hero-title.png", "size": { "w": 1200, "h": 340 } }
68
+ },
69
+ "alt": "추운 겨울, 따뜻한 보상이 펑펑"
70
+ },
71
+ {
72
+ "role": "subtitle-image",
73
+ "type": "node-render",
74
+ "render": {
75
+ "mo": { "nodeId": "...", "file": "mo-main/content/hero-subtitle.png", "size": { "w": 586, "h": 32 } },
76
+ "pc": { "nodeId": "...", "file": "pc-main/content/hero-subtitle.png", "size": { "w": 1100, "h": 60 } }
77
+ },
78
+ "alt": "겨울을 녹일 보상, 지금 PC방에서 획득하세요!"
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "role": "share-button",
84
+ "type": "interactive",
85
+ "tag": "button",
86
+ "css": {
87
+ "mo": { "width": "72px", "height": "72px", "borderRadius": "500px", "backgroundColor": "rgba(13,40,61,0.5)", "border": "1px solid #fff" },
88
+ "pc": { "width": "96px", "height": "96px", "borderRadius": "500px", "backgroundColor": "rgba(13,40,61,0.5)", "border": "1px solid #fff" }
89
+ },
90
+ "event": "share"
91
+ },
92
+ {
93
+ "role": "period-panel",
94
+ "type": "content-with-bg",
95
+ "bg": {
96
+ "mo": { "nodeId": "...", "file": "mo-main/bg/period-bg.png" },
97
+ "pc": { "nodeId": "...", "file": "pc-main/bg/period-bg.png" }
98
+ },
99
+ "size": {
100
+ "mo": { "w": 720, "h": 500 },
101
+ "pc": { "w": 2560, "h": 400 }
102
+ },
103
+ "children": [
104
+ {
105
+ "role": "target-label",
106
+ "type": "text",
107
+ "tag": "p",
108
+ "content": "참여 대상 : PC 유저 (Steam, Kakao)",
109
+ "css": {
110
+ "mo": { "fontSize": "24px", "fontWeight": "600", "color": "#ffffff", "textAlign": "center" },
111
+ "pc": { "fontSize": "32px", "fontWeight": "600", "color": "#ffffff", "textAlign": "center" }
112
+ }
113
+ },
114
+ {
115
+ "role": "info-group",
116
+ "type": "flex-column",
117
+ "css": {
118
+ "mo": { "gap": "10px", "padding": "22px 14px" },
119
+ "pc": { "gap": "16px", "padding": "30px 40px" }
120
+ },
121
+ "children": [
122
+ {
123
+ "role": "info-row",
124
+ "type": "flex-column",
125
+ "css": {
126
+ "mo": { "gap": "4px" },
127
+ "pc": { "gap": "8px" }
128
+ },
129
+ "children": [
130
+ {
131
+ "role": "label",
132
+ "type": "text",
133
+ "tag": "span",
134
+ "content": "이벤트 기간 (이벤트 참여 및 미션 수행)",
135
+ "css": {
136
+ "mo": { "fontSize": "24px", "fontWeight": "700", "color": "#003879" },
137
+ "pc": { "fontSize": "28px", "fontWeight": "700", "color": "#003879" }
138
+ }
139
+ },
140
+ {
141
+ "role": "value",
142
+ "type": "text",
143
+ "tag": "span",
144
+ "content": "2025.12.22. 11:00 ~ 2026.01.18. 11:00 [KST]",
145
+ "css": {
146
+ "mo": { "fontSize": "28px", "fontWeight": "500", "color": "#171716", "fontFamily": "'Roboto Condensed', sans-serif" },
147
+ "pc": { "fontSize": "36px", "fontWeight": "500", "color": "#171716", "fontFamily": "'Roboto Condensed', sans-serif" }
148
+ }
149
+ }
150
+ ]
151
+ }
152
+ ]
153
+ }
154
+ ]
155
+ }
156
+ ]
157
+ }
158
+ ]
159
+ }
160
+ ```
161
+
162
+ ---
163
+
164
+ ## 노드 타입 분류
165
+
166
+ tree.json의 각 노드를 다음 타입 중 하나로 분류:
167
+
168
+ | type | 판별 기준 | 코드 출력 |
169
+ |------|----------|---------|
170
+ | `section` | 1depth 자식 프레임 | `<section>` + background-image |
171
+ | `flex-column` | Auto Layout VERTICAL | `<div>` + flex-direction: column |
172
+ | `flex-row` | Auto Layout HORIZONTAL | `<div>` + flex-direction: row |
173
+ | `text` | TEXT 노드 | `<span>/<p>/<h2>` + typography CSS |
174
+ | `node-render` | 콘텐츠 이미지 (타이틀, 아이콘) | `<img>` + 노드 렌더링 |
175
+ | `vector-group` | VECTOR 3+ 자식 (커스텀 폰트) | `<img>` + GROUP 렌더링 |
176
+ | `interactive` | name에 btn/CTA/link | `<button>/<a>` + event |
177
+ | `content-with-bg` | 콘텐츠 + 배경 프레임 | `<div>` + background-image + children |
178
+ | `repeat` | 같은 구조 INSTANCE 3+ | `v-for` / `.map()` |
179
+ | `skip` | 장식선, 0px, BG 하위 개별 레이어 | 제외 |
180
+
181
+ ---
182
+
183
+ ## 브레이크포인트 노드 매칭
184
+
185
+ ```
186
+ MO tree.json 1depth 자식:
187
+ Hero (720x1280) ──────── PC tree.json에서 "Hero" name 매칭
188
+ KID (720x487) ──────── PC: "KID" 매칭
189
+ Daily (720x3604) ─────── PC: "Daily" 매칭
190
+
191
+ 매칭 기준:
192
+ 1순위: name 완전 일치
193
+ 2순위: name prefix 일치 (Hero_MO → Hero_PC)
194
+ 3순위: 순서 기반 (같은 위치의 자식)
195
+ 매칭 불가: 해당 BP에만 존재하는 섹션으로 표시
196
+ ```
197
+
198
+ ---
199
+
200
+ ## CSS diff → SCSS 출력 규칙
201
+
202
+ ```
203
+ remapped.json의 mo/pc CSS를 비교:
204
+
205
+ 같은 값:
206
+ → 기본 스타일로 출력 (vw 기반, mo designWidth 사용)
207
+
208
+ 다른 값:
209
+ → 기본: mo 값 (vw 기반)
210
+ → @media (min-width: {breakpoint}px): pc 값 (vw 기반, pc designWidth 사용)
211
+
212
+ 예시:
213
+ "gap": { "mo": "24px", "pc": "40px" }
214
+
215
+ gap: 3.33vw; // 24 / 720 × 100
216
+ @media (min-width: 1025px) {
217
+ gap: 1.56vw; // 40 / 2560 × 100
218
+ }
219
+
220
+ "color": { "mo": "#003879", "pc": "#003879" }
221
+ → (같으므로 @media 없음)
222
+ color: #003879;
223
+ ```
224
+
225
+ ---
226
+
227
+ ## 리매핑 프로세스
228
+
229
+ ```
230
+ 입력:
231
+ - Phase 1 스토리보드 스펙 (섹션 목록 + 기능 정의 + 인터랙션)
232
+ - Phase 2 추출 데이터 (모든 BP의 tree.json + 렌더링 이미지)
233
+
234
+ 1. 스토리보드 × tree.json 섹션 매칭
235
+ 스토리보드에서 정의한 섹션 목록을 tree.json 1depth 자식과 매칭:
236
+
237
+ | 스토리보드 섹션 | tree.json name | 매칭 방법 |
238
+ |---------------|---------------|----------|
239
+ | Hero (키비주얼) | "Hero" | name 일치 |
240
+ | KID (로그인) | "KID" | name 일치 |
241
+ | Daily (출석 미션) | "Daily" | name 일치 |
242
+ | PlayTime (플레이타임) | "Frame 633371" | name 불일치 → 순서 기반 |
243
+
244
+ name이 "Frame 633372" 같은 무의미한 이름이면:
245
+ → 스토리보드의 섹션 순서로 매칭
246
+ → 매칭 후 스토리보드의 role/기능을 remapped.json에 기록
247
+
248
+ 2. 스토리보드 기능 정의 → 노드 역할 확정
249
+ 스토리보드에서 정의한 기능/인터랙션으로 tree 노드의 role을 확정:
250
+
251
+ 스토리보드: "STEP 1. 일일 출석 - 출석하기 버튼"
252
+ tree.json: Daily > Contents > FRAME > children 중 name="Btn_CheckIn"
253
+ → role: "interactive", event: "check-in", tag: "button"
254
+
255
+ 스토리보드: "누적 출석 보상 - DAY2, DAY3, DAY5, DAY10"
256
+ tree.json: Daily > Contents > FRAME > INSTANCE × 4
257
+ → role: "repeat", items: 4, template: first INSTANCE
258
+
259
+ 스토리보드가 없는 노드:
260
+ → name/type 기반 추정 (기존 방식 유지)
261
+ → 장식/BG는 스토리보드에 없으므로 자동 분류
262
+
263
+ 3. BP 간 섹션 매칭
264
+ 모든 BP의 tree.json에서 같은 섹션 찾기:
265
+ → name 일치 또는 스토리보드 매칭 결과로 연결
266
+ → MO Hero ↔ PC Hero
267
+
268
+ 4. 각 섹션에 대해 재귀적으로:
269
+ a. 노드 타입 분류 (위 테이블) — 스토리보드로 확정된 role 우선
270
+ b. BG 프레임 식별 → frame-render로 마킹
271
+ c. 콘텐츠 이미지/벡터 그룹 → node-render로 마킹
272
+ d. TEXT 노드 → content + css 추출
273
+ e. skip 대상 제거
274
+ f. 각 BP의 CSS 값을 mo/pc로 분리 저장
275
+
276
+ 5. remapped.json 출력
277
+ ```