@su-record/vibe 3.2.5 → 3.2.7
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/README.en.md +1 -1
- package/README.md +1 -1
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +10 -9
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
- package/dist/cli/setup/ProjectSetup.js +5 -0
- package/dist/cli/setup/ProjectSetup.js.map +1 -1
- package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -3
- package/package.json +2 -2
- package/skills/vibe/SKILL.md +27 -86
- package/skills/vibe/references/routing-examples.md +85 -0
- package/skills/vibe.agents-md/SKILL.md +12 -10
- package/skills/vibe.analyze/SKILL.md +22 -211
- package/skills/vibe.analyze/references/mode1-feature.md +81 -0
- package/skills/vibe.analyze/references/mode2-document.md +50 -0
- package/skills/vibe.analyze/references/mode3-website.md +47 -0
- package/skills/vibe.analyze/references/mode4-quality.md +35 -0
- package/skills/vibe.brand-assets/SKILL.md +2 -2
- package/skills/vibe.brand-assets/references/mobile-assets.md +6 -0
- package/skills/vibe.capability-loop/SKILL.md +14 -80
- package/skills/vibe.capability-loop/references/escalate.md +86 -0
- package/skills/vibe.chub-usage/SKILL.md +3 -132
- package/skills/vibe.clone/SKILL.md +43 -358
- package/skills/vibe.clone/references/phase-commands.md +118 -0
- package/skills/vibe.clone/references/setup-and-layout.md +34 -0
- package/skills/vibe.clone/references/verification-loops.md +64 -0
- package/skills/vibe.commit-push-pr/SKILL.md +10 -4
- package/skills/vibe.context7-usage/SKILL.md +3 -99
- package/skills/vibe.continue/SKILL.md +17 -7
- package/skills/{vibe.handoff → vibe.continue}/agents/context-summarizer.md +1 -1
- package/skills/{vibe.handoff → vibe.continue}/agents/document-writer.md +1 -1
- package/skills/{vibe.handoff → vibe.continue}/agents/state-collector.md +1 -1
- package/skills/{vibe.handoff → vibe.continue}/agents/verifier.md +1 -1
- package/skills/{vibe.handoff/rubrics/completeness.md → vibe.continue/references/handoff-completeness.md} +1 -1
- package/skills/{vibe.handoff/templates → vibe.continue/references}/handoff.md +37 -2
- package/skills/vibe.contract/SKILL.md +4 -27
- package/skills/vibe.create-prd/SKILL.md +8 -1
- package/skills/vibe.design/SKILL.md +18 -5
- package/skills/vibe.design/references/design-context.md +184 -0
- package/skills/vibe.design-refine/SKILL.md +7 -0
- package/skills/vibe.design-review/SKILL.md +7 -0
- package/skills/vibe.design-teach/SKILL.md +2 -175
- package/skills/vibe.devlog/SKILL.md +14 -11
- package/skills/vibe.devlog/references/auto-push.md +10 -0
- package/skills/vibe.docs/SKILL.md +27 -198
- package/skills/vibe.docs/references/agent.md +55 -0
- package/skills/vibe.docs/references/arch.md +28 -0
- package/skills/vibe.docs/references/codemaps.md +17 -0
- package/skills/vibe.docs/references/diagram.md +24 -0
- package/skills/vibe.docs/references/guide.md +23 -0
- package/skills/vibe.docs/references/readme.md +45 -0
- package/skills/vibe.docs/references/release.md +31 -0
- package/skills/vibe.documentation-provider/SKILL.md +22 -0
- package/skills/vibe.documentation-provider/references/chub.md +141 -0
- package/skills/vibe.documentation-provider/references/context7.md +107 -0
- package/skills/vibe.educational-content/SKILL.md +7 -0
- package/skills/vibe.event/SKILL.md +47 -146
- package/skills/vibe.event/references/comms.md +173 -0
- package/skills/vibe.event/references/operations.md +208 -0
- package/skills/vibe.event/references/orchestration-legacy.md +97 -0
- package/skills/vibe.event/references/planning.md +145 -0
- package/skills/vibe.event-comms/SKILL.md +3 -165
- package/skills/vibe.event-ops/SKILL.md +3 -200
- package/skills/vibe.event-planning/SKILL.md +3 -137
- package/skills/vibe.figma/SKILL.md +26 -692
- package/skills/vibe.figma/references/branch1-read-convention.md +82 -0
- package/skills/vibe.figma/references/branch2-read-standalone.md +69 -0
- package/skills/vibe.figma/references/branch3-write.md +122 -0
- package/skills/vibe.figma/references/core-implementation.md +453 -0
- package/skills/vibe.git-worktree/SKILL.md +2 -6
- package/skills/vibe.git-worktree/references/troubleshooting.md +9 -0
- package/skills/vibe.handoff/SKILL.md +2 -103
- package/skills/vibe.harness/SKILL.md +17 -12
- package/skills/vibe.image/SKILL.md +8 -1
- package/skills/vibe.llm/SKILL.md +8 -1
- package/skills/vibe.loop/SKILL.md +9 -11
- package/skills/vibe.loop/references/install-adapters.md +10 -0
- package/skills/vibe.presentation/SKILL.md +7 -0
- package/skills/vibe.prioritization/SKILL.md +7 -0
- package/skills/vibe.priority-todos/SKILL.md +2 -57
- package/skills/vibe.react-best-practices/SKILL.md +1 -1
- package/skills/vibe.reason/SKILL.md +9 -2
- package/skills/vibe.regress/SKILL.md +6 -28
- package/skills/vibe.regress/templates/{test-jest.md → test-template.md} +1 -0
- package/skills/vibe.review/SKILL.md +35 -38
- package/skills/vibe.review/references/priority-todos.md +66 -0
- package/skills/vibe.review/references/ui-ux-review.md +39 -0
- package/skills/vibe.run/SKILL.md +57 -656
- package/skills/vibe.run/references/arch-guard.md +178 -0
- package/skills/vibe.run/references/e2e-and-autofix.md +40 -0
- package/skills/vibe.run/references/exec-plan.md +145 -0
- package/skills/vibe.run/references/guidelines-and-tools.md +84 -0
- package/skills/vibe.run/references/process-steps.md +179 -0
- package/skills/vibe.run/references/restraint.md +66 -0
- package/skills/vibe.scaffold/SKILL.md +9 -13
- package/skills/vibe.scaffold/references/clean-architecture.md +17 -0
- package/skills/vibe.spec/SKILL.md +12 -8
- package/skills/vibe.spec/references/legacy-artifacts.md +6 -0
- package/skills/vibe.test/SKILL.md +93 -70
- package/skills/vibe.test/references/report-template.md +101 -0
- package/skills/vibe.tool-fallback/SKILL.md +10 -32
- package/skills/vibe.tool-fallback/references/external-llm.md +10 -0
- package/skills/vibe.tool-fallback/references/file-lookup.md +9 -0
- package/skills/vibe.tool-fallback/references/web-search.md +11 -0
- package/skills/vibe.trace/SKILL.md +2 -264
- package/skills/vibe.ui-ux-pro-max/SKILL.md +1 -3
- package/skills/vibe.ui-ux-pro-max/references/charts-and-data.md +7 -0
- package/skills/vibe.user-personas/SKILL.md +8 -1
- package/skills/vibe.verify/SKILL.md +30 -4
- package/skills/vibe.verify/references/trace-mode.md +271 -0
- package/skills/vibe.regress/templates/test-vitest.md +0 -30
- /package/skills/{vibe.design-teach/rubrics → vibe.design/references}/brand-personality.md +0 -0
- /package/skills/{vibe.design-teach → vibe.design}/templates/design-context.json +0 -0
- /package/skills/{vibe.context7-usage/rubrics/when-to-use.md → vibe.documentation-provider/references/context7-when-to-use.md} +0 -0
- /package/skills/{vibe.event-ops/rubrics → vibe.event/references}/contingency.md +0 -0
- /package/skills/{vibe.event-ops/templates/d-day-checklist.md → vibe.event/references/d-day-checklist-template.md} +0 -0
- /package/skills/{vibe.event-comms/templates/email-invite.md → vibe.event/references/email-invite-template.md} +0 -0
- /package/skills/{vibe.event-planning/templates/event-plan.md → vibe.event/references/event-plan-template.md} +0 -0
- /package/skills/{vibe.event-comms/templates/sns-post.md → vibe.event/references/sns-post-template.md} +0 -0
- /package/skills/{vibe.event-planning/rubrics → vibe.event/references}/timeline.md +0 -0
- /package/skills/{vibe.priority-todos/templates/todo-board.md → vibe.review/references/todo-board-template.md} +0 -0
- /package/skills/{vibe.priority-todos/rubrics/prioritization.md → vibe.review/references/todo-prioritization.md} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vibe.clone
|
|
3
|
-
description: URL
|
|
3
|
+
description: 참조할 라이브 사이트 URL이 있고 그 마크업을 현재 스택으로 재현할 때 — 헤드리스 브라우저로 렌더된 DOM·computed CSS·에셋을 캡처해 픽셀 검증까지 루프
|
|
4
4
|
argument-hint: "<url> [<url2>...] [--name=<feature>] [--sub] [--mo-only] [--pc-only] [--ignore-robots] [--no-interact] [--real-content]"
|
|
5
5
|
user-invocable: true
|
|
6
6
|
---
|
|
@@ -8,8 +8,7 @@ user-invocable: true
|
|
|
8
8
|
# /vibe.clone
|
|
9
9
|
|
|
10
10
|
URL을 받아 **마크업 수준으로 정밀 복제**하고 현재 프로젝트 스택에 맞춰 컴포넌트/스타일을 스캐폴딩한다.
|
|
11
|
-
|
|
12
|
-
→ 모든 동작은 **`clone` 스킬**의 규칙을 따른다. 이 커맨드는 라우터일 뿐, 휴리스틱·추정·생략은 금지.
|
|
11
|
+
휴리스틱·추정·생략은 금지 — 아래 Immutable Rules가 판정 기준이다.
|
|
13
12
|
|
|
14
13
|
## Usage
|
|
15
14
|
|
|
@@ -21,7 +20,7 @@ URL을 받아 **마크업 수준으로 정밀 복제**하고 현재 프로젝트
|
|
|
21
20
|
/vibe.clone <url> --sub # 사이트맵/메가메뉴 하위 메뉴 URL까지 함께 클론
|
|
22
21
|
/vibe.clone <url1> <url2> <url3> # 다중 페이지 클론 (같은 사이트의 여러 경로)
|
|
23
22
|
/vibe.clone <url> --ignore-robots # robots.txt 무시 (사이트 소유자 허가 있을 때만)
|
|
24
|
-
/vibe.clone <url> --no-interact # 능동 인터랙션 스윕 끄기 (완전
|
|
23
|
+
/vibe.clone <url> --no-interact # 능동 인터랙션 스윕 끄기 (완전 결정론적 캡처)
|
|
25
24
|
/vibe.clone <url> --real-content # 텍스트 verbatim 유지 (본인 소유/허가 확인 1회 필수)
|
|
26
25
|
```
|
|
27
26
|
|
|
@@ -32,137 +31,18 @@ Step 1) 인자 수집
|
|
|
32
31
|
urls = http(s):// 로 시작하는 모든 인자
|
|
33
32
|
feature = --name=<value> | URL host → kebab-case
|
|
34
33
|
scope = --mo-only | --pc-only | (기본: both)
|
|
35
|
-
sub
|
|
36
|
-
|
|
37
|
-
realContent = --real-content 플래그 유무 (소유/허가 확인 질문 1회 후 적용)
|
|
38
|
-
|
|
39
|
-
Step 2) 인자 검증
|
|
40
|
-
urls.length === 0 → 사용자에게 URL 입력 요청, 중단
|
|
41
|
-
! /^https?:\/\//.test(url) → "유효한 URL이 아닙니다" 에러, 중단
|
|
42
|
-
--sub && urls.length > 1 → "--sub는 기준 URL 1개와 함께 사용하세요" 에러, 중단
|
|
43
|
-
|
|
44
|
-
Step 2.5) --sub URL 확장
|
|
45
|
-
- node {{VIBE_PATH}}/hooks/scripts/clone-extract.js suburls <url> \
|
|
46
|
-
--out=/tmp/{feature}/menu-urls.json [--ignore-robots]
|
|
47
|
-
- menu-urls.json.urls 를 urls 로 사용
|
|
48
|
-
- 수집 기준: /sitemap 우선, 없으면 header/nav/mega-menu
|
|
49
|
-
- 포함: 같은 origin + 같은 locale prefix의 하위 메뉴 URL
|
|
50
|
-
- 제외: 외부 링크, 언어 전환, 검색, TOP, 푸터 정책/문의/파트너/뉴스룸 링크
|
|
51
|
-
|
|
52
|
-
Step 3) 실행 진입
|
|
53
|
-
→ 아래 Execution Plan Phase 0부터 순차 실행
|
|
54
|
-
→ URL 다중 입력 시 각 URL마다 별도 feature 디렉토리 (URL path 기반 suffix)
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Execution Plan
|
|
58
|
-
|
|
59
|
-
다음을 순차 실행한다. **Phase 단계 건너뛰기 금지**.
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
Phase 0: Setup
|
|
63
|
-
- .vibe/config.json + package.json → 스택 감지
|
|
64
|
-
- feature 이름 결정, 디렉토리 생성
|
|
65
|
-
- --sub이면 /tmp/{feature}/menu-urls.json 생성 후 URL 목록 확장
|
|
66
|
-
|
|
67
|
-
Phase 1: Capture (병렬 — scope에 따라 MO/PC 동시)
|
|
68
|
-
- node {{VIBE_PATH}}/hooks/scripts/clone-extract.js capture <url> \
|
|
69
|
-
--out=/tmp/{feature}/{bp}/ --viewport={WxH} --bp={mo|pc}
|
|
70
|
-
- 출력: rendered.html, computed.json, screenshot.png, states.json, behaviors.json, asset-map.json, assets/ (images·fonts·seo)
|
|
71
|
-
- behaviors.json = 능동 인터랙션 스윕 4종+ (스크롤 헤더 diff · 탭 클릭 콘텐츠 스왑 · 호버 diff ·
|
|
72
|
-
in-view 등장 애니메이션 · time-driven 캐러셀 후보 · 스무스 스크롤 라이브러리 감지).
|
|
73
|
-
JS로 세팅되는 상태(정적 CSS로는 안 잡힘)를 포착 — 클론 정확도의 핵심. --no-interact 로 비활성화.
|
|
74
|
-
- assets/seo/ = favicon·apple-touch-icon·og:image·webmanifest (Foundation 단계에서 배선)
|
|
75
|
-
|
|
76
|
-
Phase 2: Refine (BP마다 독립)
|
|
77
|
-
- node {{VIBE_PATH}}/hooks/scripts/clone-refine.js \
|
|
78
|
-
/tmp/{feature}/{bp}/rendered.html /tmp/{feature}/{bp}/computed.json \
|
|
79
|
-
--out=/tmp/{feature}/{bp}/sections.json --states=/tmp/{feature}/{bp}/states.json --bp={mo|pc}
|
|
80
|
-
- sections.json 에 section.interaction(인터랙션 모델 추정) + section.states(상태 규칙) 포함
|
|
81
|
-
|
|
82
|
-
Phase 2.5: Foundation (순차 — 섹션 빌드 전)
|
|
83
|
-
- 폰트 배선(Next → next/font) · assets/seo/ → public/ (favicon·OG·manifest 메타 배선)
|
|
84
|
-
- 인라인 SVG dedupe → 아이콘 모듈 · scrollLib 감지 시 페이지 레벨 배선
|
|
85
|
-
|
|
86
|
-
Phase 3: Scaffold (BP 순차 — MO 완료 후 PC / 섹션은 병렬 빌더 디스패치)
|
|
87
|
-
- Step 0: node {{VIBE_PATH}}/hooks/scripts/clone-spec.js \
|
|
88
|
-
/tmp/{feature}/{bp}/sections.json \
|
|
89
|
-
--out=./components/{feature}/_specs/{bp}/ --feature={feature} [--real-content]
|
|
90
|
-
→ 섹션별 빌드 계약서(_specs/{bp}/{Section}.spec.md). 디스패치 전 TODO(인터랙션 모델 확정·상태 목록·텍스트 교체) 해결
|
|
91
|
-
→ spec 150줄 초과 시 하위 컴포넌트 spec으로 분할 (기계적 체크 — wc -l)
|
|
92
|
-
- Step A: node {{VIBE_PATH}}/hooks/scripts/clone-to-scss.js \
|
|
93
|
-
/tmp/{feature}/{bp}/sections.json \
|
|
94
|
-
--out=./styles/{feature}/{bp}/ --feature={feature}
|
|
95
|
-
→ SCSS 초안. 이후 근거(computed/states/behaviors) 인용 시 수정 허용 — clone-validate가 판정자
|
|
96
|
-
- 병렬 디스패치: 섹션별 빌더 서브에이전트 — spec 전문을 프롬프트에 인라인, 병렬 파일 쓰기는 worktree 격리
|
|
97
|
-
- Step B: node {{VIBE_PATH}}/hooks/scripts/clone-validate.js \
|
|
98
|
-
./styles/{feature}/{bp}/ /tmp/{feature}/{bp}/sections.json --section={Name}
|
|
99
|
-
- 섹션마다 PASS 후 완료 처리 (머지 순서: 하위 컴포넌트 → 래퍼)
|
|
34
|
+
sub / ignoreRobots / realContent = 각 플래그 유무
|
|
35
|
+
(realContent 는 소유·허가 확인 질문 1회 후 적용)
|
|
100
36
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
→ mobile-first 병합: MO 선언 = 기본, PC diff만 @media (min-width) 블록
|
|
106
|
-
- 컴포넌트 import를 병합 index.scss로 전환 → Phase 4 → Phase 5를 두 뷰포트 모두 재실행
|
|
37
|
+
Step 2) 인자 검증 — 하나라도 걸리면 중단
|
|
38
|
+
urls.length === 0 → 사용자에게 URL 입력 요청
|
|
39
|
+
! /^https?:\/\//.test(url) → "유효한 URL이 아닙니다"
|
|
40
|
+
--sub && urls.length > 1 → "--sub는 기준 URL 1개와 함께 사용하세요"
|
|
107
41
|
|
|
108
|
-
|
|
109
|
-
|
|
42
|
+
Step 3) 실행 진입 → Execution Plan Phase 0
|
|
43
|
+
URL 다중 입력 시 각 URL마다 별도 feature 디렉토리 (URL path 기반 suffix)
|
|
110
44
|
```
|
|
111
45
|
|
|
112
|
-
## Prerequisites
|
|
113
|
-
|
|
114
|
-
- **puppeteer**: optional peer dependency. 미설치 시 Phase 1에서 `npm install puppeteer` 안내 후 중단
|
|
115
|
-
- **Chromium**: puppeteer 자동 다운로드 (`npx puppeteer browsers install chrome`)
|
|
116
|
-
- **dev 서버**: Phase 4-5에서 `npm run dev` 호출. 스크립트가 미정의면 사용자에게 명시
|
|
117
|
-
- **robots.txt 준수**: 기본 차단. `--ignore-robots` 는 사이트 소유자/CTF/학습 명시일 때만
|
|
118
|
-
|
|
119
|
-
## Output Locations
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
/tmp/{feature}/ # 작업 디렉토리 (산출물 원본)
|
|
123
|
-
├── menu-urls.json # --sub URL 확장 결과
|
|
124
|
-
├── mo/, pc/ # rendered.html, computed.json, screenshot.png, states.json, behaviors.json, sections.json, assets/
|
|
125
|
-
└── project-tokens.json # 기존 프로젝트 토큰 인덱스
|
|
126
|
-
|
|
127
|
-
./components/{feature}/ # 빌더가 작성한 컴포넌트 (.tsx/.vue/.svelte/.html)
|
|
128
|
-
./components/{feature}/_specs/{mo,pc}/ # clone-spec.js가 생성한 섹션별 빌드 계약서 (*.spec.md)
|
|
129
|
-
./styles/{feature}/ # 최종 병합 SCSS (Phase 3C 산출 — mobile-first @media)
|
|
130
|
-
├── mo/, pc/ # BP별 SCSS 초안 (clone-to-scss.js + 근거 기반 수정)
|
|
131
|
-
├── _tokens.scss # CSS 변수 (병합)
|
|
132
|
-
├── _base.scss # @font-face
|
|
133
|
-
├── _shared.scss # 유틸 + 글로벌 동작 (scroll-lib 등)
|
|
134
|
-
├── sections/_<name>.scss # 섹션별 partial (병합)
|
|
135
|
-
├── index.scss # 마스터 orchestrator (병합)
|
|
136
|
-
└── class-plan.json # 노드 id → BEM 클래스 (병합)
|
|
137
|
-
./public/images/{feature}/ # 다운로드된 이미지/폰트
|
|
138
|
-
./public/ (프로젝트 관례 경로) # favicon·OG·manifest (assets/seo/ 에서 배선)
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## Legal Notes
|
|
142
|
-
|
|
143
|
-
```
|
|
144
|
-
이 커맨드는 다음 용도에만 사용:
|
|
145
|
-
✅ 클론 코딩 학습 (마크업/레이아웃 연구)
|
|
146
|
-
✅ 본인 소유 사이트 재구축
|
|
147
|
-
✅ 명시적 허가 받은 리디자인
|
|
148
|
-
|
|
149
|
-
금지:
|
|
150
|
-
❌ 저작권 콘텐츠(텍스트/이미지/로고) 무단 재게시
|
|
151
|
-
❌ 피싱/브랜드 사칭 룩어라이크 사이트
|
|
152
|
-
❌ robots.txt 우회 (소유자 허가 없는 --ignore-robots)
|
|
153
|
-
|
|
154
|
-
Claude 기본 행동:
|
|
155
|
-
- 저작권 텍스트 → 플레이스홀더("[Lorem ipsum]") 교체
|
|
156
|
-
- --real-content → 소유/허가 확인 질문 1회 후 verbatim 유지 (본인 사이트 재구축 유스케이스)
|
|
157
|
-
- robots.txt 차단 경로 → 명시적 --ignore-robots 없으면 거부
|
|
158
|
-
- 사용자 의도가 사칭/기만이면 즉시 거부
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
## Bundled implementation
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
# vibe.clone — Markup-Level Website Clone
|
|
165
|
-
|
|
166
46
|
## Core Principles
|
|
167
47
|
|
|
168
48
|
```
|
|
@@ -171,12 +51,14 @@ The rendered DOM is the source of truth for markup. Screenshots are for pixel ve
|
|
|
171
51
|
✅ Puppeteer-rendered DOM (post-JS) → HTML structural mapping
|
|
172
52
|
✅ Computed CSS → SCSS direct conversion (no guessing)
|
|
173
53
|
✅ All remote assets (images, fonts) → downloaded locally and rewritten to project paths
|
|
174
|
-
✅
|
|
54
|
+
✅ The active harness handles semantic decisions only: tag selection, component splitting, interactions
|
|
175
55
|
✅ Screenshots are used for verification only, not generation
|
|
176
56
|
```
|
|
177
57
|
|
|
178
58
|
## Immutable Rules
|
|
179
59
|
|
|
60
|
+
이 7개가 클론 품질의 판정 기준이다. 각 Phase의 명령어는 references 에 있지만, **이 규칙은 항상 인라인**이다.
|
|
61
|
+
|
|
180
62
|
```
|
|
181
63
|
1. Do NOT generate CSS values by guessing or eyeballing screenshots.
|
|
182
64
|
✅ clone-to-scss.js output is a DRAFT (skeleton), not a frozen artifact. You MAY
|
|
@@ -213,239 +95,42 @@ The rendered DOM is the source of truth for markup. Screenshots are for pixel ve
|
|
|
213
95
|
conflicts with the static interaction heuristic, the active capture wins.
|
|
214
96
|
```
|
|
215
97
|
|
|
216
|
-
##
|
|
217
|
-
|
|
218
|
-
```
|
|
219
|
-
Input: a URL (or multiple URLs for multi-page clones)
|
|
220
|
-
|
|
221
|
-
→ Phase 0: Setup (stack detection, feature naming, working dir)
|
|
222
|
-
→ Phase 1: Capture (Puppeteer → rendered HTML + computed CSS + screenshots + assets)
|
|
223
|
-
→ Phase 2: Refine (DOM → sections.json per breakpoint; + interaction model + states)
|
|
224
|
-
→ Phase 2.5: Foundation (fonts / favicon / OG / SVG icons — sequential, before any section)
|
|
225
|
-
→ Phase 3: Scaffold (spec gate → SCSS draft + builder dispatch, parallel per section)
|
|
226
|
-
→ Phase 3C: Responsive merge (clone-merge-responsive.js — mobile-first @media)
|
|
227
|
-
→ Phase 4: Compile gate
|
|
228
|
-
→ Phase 5: Pixel verification loop (BOTH viewports after merge)
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
> Read `references/setup-and-layout.md` for the working-directory layout and code-output paths.
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
## Phase 0: Setup
|
|
236
|
-
|
|
237
|
-
> Read `references/setup-and-layout.md` for the full Phase 0 setup steps (stack detection, feature naming, directories, component indexing, design token scan).
|
|
238
|
-
|
|
239
|
-
---
|
|
240
|
-
|
|
241
|
-
## Phase 1: Capture ← Headless browser (parallel MO/PC)
|
|
242
|
-
|
|
243
|
-
**Coordinator pattern: run MO/PC capture as parallel workers.**
|
|
244
|
-
|
|
245
|
-
### BLOCKING Command — Use only clone-extract.js for capture
|
|
246
|
-
|
|
247
|
-
```bash
|
|
248
|
-
# [CLONE_SCRIPT] = {{VIBE_PATH}}/hooks/scripts/clone-extract.js
|
|
249
|
-
|
|
250
|
-
# Mobile (375×812)
|
|
251
|
-
node {{VIBE_PATH}}/hooks/scripts/clone-extract.js capture <URL> \
|
|
252
|
-
--out=/tmp/{feature}/mo/ \
|
|
253
|
-
--viewport=375x812 \
|
|
254
|
-
--bp=mo
|
|
255
|
-
|
|
256
|
-
# Desktop (1440×900)
|
|
257
|
-
node {{VIBE_PATH}}/hooks/scripts/clone-extract.js capture <URL> \
|
|
258
|
-
--out=/tmp/{feature}/pc/ \
|
|
259
|
-
--viewport=1440x900 \
|
|
260
|
-
--bp=pc
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
⛔ **Writing custom capture scripts (puppeteer-fetch.mjs, etc.) is forbidden.**
|
|
264
|
-
⛔ **Do NOT use WebFetch or curl** — they cannot render JS-driven SPAs.
|
|
265
|
-
✅ Use clone-extract.js. If output is unsatisfactory, modify the script.
|
|
266
|
-
|
|
267
|
-
> Read `references/capture-rules.md` for the full per-breakpoint output directory listing and the deterministic capture rule set (networkidle wait, asset resolution, states/behaviors harvesting, SEO asset harvest).
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
## Phase 2: Refine ← DOM → sections.json (independent per BP)
|
|
272
|
-
|
|
273
|
-
### BLOCKING Command — Writing custom refine scripts is forbidden
|
|
274
|
-
|
|
275
|
-
```bash
|
|
276
|
-
# MO (--states is optional — auto-resolved as states.json next to computed.json)
|
|
277
|
-
node {{VIBE_PATH}}/hooks/scripts/clone-refine.js \
|
|
278
|
-
/tmp/{feature}/mo/rendered.html \
|
|
279
|
-
/tmp/{feature}/mo/computed.json \
|
|
280
|
-
--out=/tmp/{feature}/mo/sections.json \
|
|
281
|
-
--states=/tmp/{feature}/mo/states.json \
|
|
282
|
-
--bp=mo
|
|
283
|
-
|
|
284
|
-
# PC
|
|
285
|
-
node {{VIBE_PATH}}/hooks/scripts/clone-refine.js \
|
|
286
|
-
/tmp/{feature}/pc/rendered.html \
|
|
287
|
-
/tmp/{feature}/pc/computed.json \
|
|
288
|
-
--out=/tmp/{feature}/pc/sections.json \
|
|
289
|
-
--states=/tmp/{feature}/pc/states.json \
|
|
290
|
-
--bp=pc
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
⛔ **Phase 3 is blocked until refine completes for all required BPs.**
|
|
294
|
-
⛔ **Do NOT parse rendered.html with custom Python/Node scripts.**
|
|
295
|
-
✅ Use clone-refine.js output as-is. If unsatisfactory, modify the script.
|
|
296
|
-
|
|
297
|
-
> Read `references/refine-rules.md` for the full refinement rule set and the sections.json output schema.
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
## Phase 2.5: Foundation ← sequential, BEFORE any section build
|
|
302
|
-
|
|
303
|
-
Nothing renders right until the foundation exists. Do this yourself (not delegated) — it
|
|
304
|
-
touches shared files:
|
|
305
|
-
|
|
306
|
-
```
|
|
307
|
-
1. Fonts: verify _base.scss @font-face srcs point at downloaded assets/fonts/ files.
|
|
308
|
-
Next.js stack → wire via next/font/local in the layout instead of raw @font-face.
|
|
309
|
-
2. Favicon / OG / manifest: copy assets/seo/* → public/ (project convention path),
|
|
310
|
-
wire metadata (layout.tsx metadata / <head>) to the local files.
|
|
311
|
-
3. SVG icons: collect inline <svg> from rendered.html, dedupe by path data,
|
|
312
|
-
emit one stack-appropriate icon module (e.g. components/{feature}/icons.tsx).
|
|
313
|
-
Name by visual function (SearchIcon, ArrowRightIcon, LogoIcon).
|
|
314
|
-
4. Global behaviors from behaviors.json: scrollLib detected → install/wire page-level
|
|
315
|
-
(Lenis etc.); global keyframes/scroll-snap → styles/{feature}/_shared.scss.
|
|
316
|
-
5. Verify: compile passes before moving on.
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
---
|
|
320
|
-
|
|
321
|
-
## Phase 3: Scaffold ← stack-specific code generation
|
|
322
|
-
|
|
323
|
-
**⛔ Implement MO fully first → pass verification → then PC. No responsive conversion in this phase.**
|
|
324
|
-
**⛔ CSS values must use computed.json output as-is. No vw/clamp/@media in this phase.**
|
|
325
|
-
|
|
326
|
-
### BLOCKING Command — SCSS must only use script output
|
|
327
|
-
|
|
328
|
-
```bash
|
|
329
|
-
# Step 0: Generate per-section build-contract specs (run once per BP)
|
|
330
|
-
node {{VIBE_PATH}}/hooks/scripts/clone-spec.js \
|
|
331
|
-
/tmp/{feature}/{bp}/sections.json \
|
|
332
|
-
--out=/path/to/project/components/{feature}/_specs/{bp}/ \
|
|
333
|
-
--feature={feature} [--real-content]
|
|
334
|
-
|
|
335
|
-
# Step A: Auto-generate SCSS draft (run once per BP — note the per-BP out dir)
|
|
336
|
-
node {{VIBE_PATH}}/hooks/scripts/clone-to-scss.js \
|
|
337
|
-
/tmp/{feature}/{bp}/sections.json \
|
|
338
|
-
--out=/path/to/project/styles/{feature}/{bp}/ \
|
|
339
|
-
--token-file=/tmp/{feature}/project-tokens.json
|
|
340
|
-
|
|
341
|
-
# Step B: Per-section validation (after writing each section's component code)
|
|
342
|
-
node {{VIBE_PATH}}/hooks/scripts/clone-validate.js \
|
|
343
|
-
/path/to/project/styles/{feature}/{bp}/ \
|
|
344
|
-
/tmp/{feature}/{bp}/sections.json \
|
|
345
|
-
--section={SectionName}
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
⛔ **No section is built without a completed spec.** Step 0 emits `_specs/{Section}.spec.md`
|
|
349
|
-
(interaction model + **active-capture Dynamic behaviors** (scroll/tab/hover/in-view/
|
|
350
|
-
time-driven/scroll-lib) + states + computed CSS + assets + text + checklist).
|
|
351
|
-
clone-spec.js auto-loads `behaviors.json` from the sections.json dir and attaches matching
|
|
352
|
-
behaviors per section. Before dispatching a section's builder, Claude reviews its spec and
|
|
353
|
-
resolves every `TODO` (confirm interaction model, list states to implement, choose tags,
|
|
354
|
-
replace copyrighted text — skipped with --real-content). The spec is the contract AND the
|
|
355
|
-
audit trail — it forces extraction rigor before any code is written.
|
|
356
|
-
⛔ **clone-to-scss.js must run first (Step A) — its output is the DRAFT every section starts
|
|
357
|
-
from.** After that, SCSS edits are allowed per Immutable Rule 1 (evidence-cited only);
|
|
358
|
-
clone-validate.js PASS is the judge.
|
|
359
|
-
⛔ **Do NOT write custom SCSS / spec generation scripts.**
|
|
360
|
-
⛔ **Do NOT proceed past a section without a clone-validate.js PASS for it.**
|
|
361
|
-
|
|
362
|
-
Phase 3A: MO Scaffold — parallel builder dispatch
|
|
363
|
-
Input: /tmp/{feature}/mo/sections.json
|
|
364
|
-
→ Phase 4 (MO compile) → Phase 5 (MO pixel verification)
|
|
365
|
-
|
|
366
|
-
Phase 3B: PC Scaffold
|
|
367
|
-
Same process as MO, input /tmp/{feature}/pc/sections.json → styles/{feature}/pc/
|
|
368
|
-
→ Phase 4 (PC compile) → Phase 5 (PC pixel verification)
|
|
369
|
-
|
|
370
|
-
Phase 3C: Responsive Integration (after both MO+PC pass Phase 5)
|
|
371
|
-
1. node {{VIBE_PATH}}/hooks/scripts/clone-merge-responsive.js \
|
|
372
|
-
--mo=/path/to/project/styles/{feature}/mo/ \
|
|
373
|
-
--pc=/path/to/project/styles/{feature}/pc/ \
|
|
374
|
-
--out=/path/to/project/styles/{feature}/ \
|
|
375
|
-
[--breakpoint=1024]
|
|
376
|
-
→ mobile-first merge: MO declarations = base, PC diffs → @media (min-width) block
|
|
377
|
-
→ Phase 4 (compile) → Phase 5 at BOTH viewports against each BP's screenshot.
|
|
378
|
-
⛔ The clone is NOT complete until the MERGED build passes Phase 5 at both.
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
> Read `references/scaffold-phases.md` for the full Phase 3A prep/dispatch/merge builder contract (framework mapping, 150-line split rule, clone-validate.js PASS/FAIL loop detail), Phase 3C steps 2–3 (import switch, pc-only/mo-only selector review), and Claude's role checklist.
|
|
382
|
-
|
|
383
|
-
---
|
|
384
|
-
|
|
385
|
-
## Phase 4: Compile Gate
|
|
386
|
-
|
|
387
|
-
```
|
|
388
|
-
No round cap. Loop until compile succeeds (or stuck → ask user).
|
|
389
|
-
|
|
390
|
-
0. Capture baseline (before Phase 3): record existing tsc + build errors
|
|
391
|
-
→ Phase 4 only fixes NEW errors
|
|
392
|
-
|
|
393
|
-
1. TypeScript: vue-tsc / svelte-check / tsc --noEmit
|
|
394
|
-
2. Build: npm run build (120s timeout)
|
|
395
|
-
3. Dev server: npm run dev → detect port → polling
|
|
396
|
-
|
|
397
|
-
On error: parse → auto-fix → re-check
|
|
398
|
-
Termination:
|
|
399
|
-
✅ Success: all checks pass → enter Phase 5
|
|
400
|
-
⚠️ Stuck: same errors as previous round → ask user
|
|
401
|
-
1. Direct fix instructions → retry
|
|
402
|
-
2. "proceed" — record remaining errors as TODO, proceed to Phase 5
|
|
403
|
-
3. "abort" — halt
|
|
404
|
-
ultrawork mode: on stuck, record TODO without prompting and proceed
|
|
405
|
-
|
|
406
|
-
⛔ Must enter Phase 5 after Phase 4 passes. Do NOT output a "completion summary".
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
---
|
|
410
|
-
|
|
411
|
-
## Phase 5: Pixel Verification Loop ← MANDATORY
|
|
98
|
+
## Execution Plan
|
|
412
99
|
|
|
413
|
-
|
|
414
|
-
**⛔ Skipping Phase 5 makes the entire clone "incomplete".**
|
|
100
|
+
**Phase 단계 건너뛰기 금지.** 각 Phase의 정확한 명령어와 금지 사항은 `references/phase-commands.md` 가 SSOT다.
|
|
415
101
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
102
|
+
| Phase | 하는 일 | 상세 |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| **0** Setup | 스택 감지 · feature 이름 · 디렉토리 · 컴포넌트 인덱싱 · 토큰 스캔. `--sub` 면 URL 목록 확장 | `references/setup-and-layout.md` |
|
|
105
|
+
| **1** Capture | 헤드리스 브라우저로 MO/PC **병렬** 캡처 → rendered.html · computed.json · screenshot.png · states.json · behaviors.json · assets/ | `references/capture-rules.md` · `references/phase-commands.md` |
|
|
106
|
+
| **2** Refine | DOM → sections.json (BP마다 독립). interaction 모델 추정 + 상태 규칙 포함 | `references/refine-rules.md` |
|
|
107
|
+
| **2.5** Foundation | **순차, 섹션 빌드 전.** 폰트 배선 · SEO 에셋 → public/ · SVG dedupe → 아이콘 모듈 · scrollLib 페이지 레벨 배선 | `references/phase-commands.md` |
|
|
108
|
+
| **3** Scaffold | spec 게이트 → SCSS 초안 → 섹션별 빌더 병렬 디스패치 → 섹션마다 validate PASS. **MO 완주 후 PC** | `references/phase-commands.md` · `references/scaffold-phases.md` |
|
|
109
|
+
| **3C** Responsive Merge | MO+PC 모두 Phase 5 통과 후 mobile-first 병합 (MO=기본, PC diff만 `@media`) | `references/phase-commands.md` |
|
|
110
|
+
| **4** Compile Gate | 컴파일 성공까지 루프. baseline 대비 **신규** 에러만 수정 | `references/verification-loops.md` |
|
|
111
|
+
| **5** Pixel Verification | **필수.** P1=0까지 루프. 병합 후엔 MO·PC 양쪽 재실행 | `references/verification-loops.md` |
|
|
419
112
|
|
|
420
|
-
|
|
421
|
-
2. Capture screenshot → pixelmatch comparison against /tmp/{feature}/{bp}/screenshot.png
|
|
422
|
-
diffRatio > 0.05 (clone target is tighter than figma) → P1
|
|
423
|
-
3. CSS comparison: live computed CSS vs /tmp/{feature}/{bp}/computed.json
|
|
424
|
-
delta > 2px → P1, ≤ 2px → P2
|
|
425
|
-
4. Asset audit: every <img>/background-image resolves to local public/images/ path → else P1
|
|
426
|
-
5. Fix P1 first (refer to computed.json, no guessing) → revalidate compile → reload
|
|
113
|
+
⛔ Phase 4 통과 후 Phase 5 진입은 자동이다. Phase 5 완료 전에 "완료 요약"을 출력하지 않는다.
|
|
427
114
|
|
|
428
|
-
|
|
429
|
-
Round 1: P1+P2+P3
|
|
430
|
-
Round 2: P1+P2
|
|
431
|
-
Round 3+: P1 only
|
|
115
|
+
## Prerequisites
|
|
432
116
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
117
|
+
- **puppeteer**: optional peer dependency. 미설치 시 Phase 1에서 `npm install puppeteer` 안내 후 중단
|
|
118
|
+
- **Chromium**: puppeteer 자동 다운로드 (`npx puppeteer browsers install chrome`)
|
|
119
|
+
- **dev 서버**: Phase 4-5에서 `npm run dev` 호출. 스크립트가 미정의면 사용자에게 명시
|
|
120
|
+
- **robots.txt 준수**: 기본 차단. `--ignore-robots` 는 사이트 소유자/CTF/학습 명시일 때만
|
|
437
121
|
|
|
438
|
-
|
|
439
|
-
Post-merge (Phase 3C): re-run at BOTH viewports (375×812 vs mo/screenshot.png,
|
|
440
|
-
1440×900 vs pc/screenshot.png) — either failing means the merge regressed; fix the
|
|
441
|
-
merged SCSS (evidence: the per-BP sections.json), never by re-guessing values
|
|
442
|
-
Cleanup: shut down browser + dev server
|
|
122
|
+
## Legal & Error Recovery
|
|
443
123
|
|
|
444
|
-
|
|
445
|
-
|
|
124
|
+
용도 제한(학습·본인 소유·허가받은 리디자인), 금지 사항(저작권 콘텐츠 무단 재게시·브랜드 사칭·robots.txt 우회),
|
|
125
|
+
`--real-content` 확인 절차, 오류 복구 표: `references/legal-and-error-recovery.md`
|
|
446
126
|
|
|
447
|
-
|
|
127
|
+
사용자 의도가 사칭이나 기만이면 즉시 거부한다 — 플래그 유무와 무관하다.
|
|
448
128
|
|
|
449
|
-
##
|
|
129
|
+
## Done Criteria
|
|
450
130
|
|
|
451
|
-
|
|
131
|
+
- [ ] 요청된 모든 BP(scope)에 대해 Phase 1–2 산출물이 존재한다
|
|
132
|
+
- [ ] 모든 섹션이 spec의 TODO를 해소한 뒤 빌드됐다
|
|
133
|
+
- [ ] 모든 섹션이 `clone-validate.js` PASS를 받았다
|
|
134
|
+
- [ ] 원격 에셋이 남아있지 않다 — 모든 `<img>`/background-image가 로컬 경로로 해석된다
|
|
135
|
+
- [ ] Phase 4 컴파일 통과 (baseline 대비 신규 에러 0)
|
|
136
|
+
- [ ] Phase 5 P1=0 — 병합 후라면 MO·PC 양쪽에서
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Clone — Phase Commands (BLOCKING)
|
|
2
|
+
|
|
3
|
+
> Loaded by vibe.clone SKILL.md Phases 1 / 2 / 3 / 3C. These are the **only** sanctioned
|
|
4
|
+
> commands for each phase. `{{VIBE_PATH}}` is substituted at install time.
|
|
5
|
+
|
|
6
|
+
## Global prohibitions
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
⛔ Writing custom capture/refine/SCSS/spec scripts (puppeteer-fetch.mjs, ad-hoc parsers) is forbidden.
|
|
10
|
+
⛔ Do NOT use WebFetch or curl for capture — they cannot render JS-driven SPAs.
|
|
11
|
+
⛔ Do NOT parse rendered.html with custom Python/Node scripts.
|
|
12
|
+
✅ Use the bundled scripts. If output is unsatisfactory, modify the script — not the workflow.
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Phase 1: Capture
|
|
16
|
+
|
|
17
|
+
Coordinator pattern — run MO/PC capture as parallel workers.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Mobile (375×812)
|
|
21
|
+
node {{VIBE_PATH}}/hooks/scripts/clone-extract.js capture <URL> \
|
|
22
|
+
--out=/tmp/{feature}/mo/ --viewport=375x812 --bp=mo
|
|
23
|
+
|
|
24
|
+
# Desktop (1440×900)
|
|
25
|
+
node {{VIBE_PATH}}/hooks/scripts/clone-extract.js capture <URL> \
|
|
26
|
+
--out=/tmp/{feature}/pc/ --viewport=1440x900 --bp=pc
|
|
27
|
+
|
|
28
|
+
# --sub URL expansion (Phase 0, once)
|
|
29
|
+
node {{VIBE_PATH}}/hooks/scripts/clone-extract.js suburls <url> \
|
|
30
|
+
--out=/tmp/{feature}/menu-urls.json [--ignore-robots]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`--sub` collection rule: prefer `/sitemap`, else header/nav/mega-menu. Include same-origin URLs
|
|
34
|
+
sharing the locale prefix. Exclude external links, language switchers, search, TOP, and footer
|
|
35
|
+
policy/contact/partner/newsroom links.
|
|
36
|
+
|
|
37
|
+
## Phase 2: Refine
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# MO (--states is optional — auto-resolved as states.json next to computed.json)
|
|
41
|
+
node {{VIBE_PATH}}/hooks/scripts/clone-refine.js \
|
|
42
|
+
/tmp/{feature}/mo/rendered.html /tmp/{feature}/mo/computed.json \
|
|
43
|
+
--out=/tmp/{feature}/mo/sections.json --states=/tmp/{feature}/mo/states.json --bp=mo
|
|
44
|
+
|
|
45
|
+
# PC
|
|
46
|
+
node {{VIBE_PATH}}/hooks/scripts/clone-refine.js \
|
|
47
|
+
/tmp/{feature}/pc/rendered.html /tmp/{feature}/pc/computed.json \
|
|
48
|
+
--out=/tmp/{feature}/pc/sections.json --states=/tmp/{feature}/pc/states.json --bp=pc
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
⛔ Phase 3 is blocked until refine completes for **all** required BPs.
|
|
52
|
+
|
|
53
|
+
## Phase 3: Scaffold
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Step 0: per-section build-contract specs (once per BP)
|
|
57
|
+
node {{VIBE_PATH}}/hooks/scripts/clone-spec.js \
|
|
58
|
+
/tmp/{feature}/{bp}/sections.json \
|
|
59
|
+
--out=<project>/components/{feature}/_specs/{bp}/ \
|
|
60
|
+
--feature={feature} [--real-content]
|
|
61
|
+
|
|
62
|
+
# Step A: SCSS draft (once per BP — note the per-BP out dir)
|
|
63
|
+
node {{VIBE_PATH}}/hooks/scripts/clone-to-scss.js \
|
|
64
|
+
/tmp/{feature}/{bp}/sections.json \
|
|
65
|
+
--out=<project>/styles/{feature}/{bp}/ \
|
|
66
|
+
--token-file=/tmp/{feature}/project-tokens.json
|
|
67
|
+
|
|
68
|
+
# Step B: per-section validation (after writing each section's component code)
|
|
69
|
+
node {{VIBE_PATH}}/hooks/scripts/clone-validate.js \
|
|
70
|
+
<project>/styles/{feature}/{bp}/ /tmp/{feature}/{bp}/sections.json --section={SectionName}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Gate rules:
|
|
74
|
+
|
|
75
|
+
- ⛔ **No section is built without a completed spec.** Step 0 emits `_specs/{Section}.spec.md`
|
|
76
|
+
(interaction model + active-capture Dynamic behaviors + states + computed CSS + assets + text +
|
|
77
|
+
checklist). clone-spec.js auto-loads `behaviors.json` from the sections.json dir and attaches
|
|
78
|
+
matching behaviors per section. Before dispatching a section's builder, review its spec and
|
|
79
|
+
resolve every `TODO` (confirm interaction model, list states, choose tags, replace copyrighted
|
|
80
|
+
text — skipped with `--real-content`). The spec is the contract **and** the audit trail.
|
|
81
|
+
- ⛔ **Step A must run first** — its output is the DRAFT every section starts from. Later SCSS
|
|
82
|
+
edits are allowed per Immutable Rule 1 (evidence-cited only); clone-validate.js PASS is the judge.
|
|
83
|
+
- ⛔ **Do NOT proceed past a section without a clone-validate.js PASS for it.**
|
|
84
|
+
- Spec over 150 lines → split into sub-component specs (mechanical check: `wc -l`).
|
|
85
|
+
|
|
86
|
+
Order: Phase 3A (MO scaffold → Phase 4 → Phase 5) → Phase 3B (PC, same process) → Phase 3C.
|
|
87
|
+
|
|
88
|
+
## Phase 3C: Responsive Merge
|
|
89
|
+
|
|
90
|
+
Runs only after **both** MO and PC pass Phase 5.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
node {{VIBE_PATH}}/hooks/scripts/clone-merge-responsive.js \
|
|
94
|
+
--mo=<project>/styles/{feature}/mo/ \
|
|
95
|
+
--pc=<project>/styles/{feature}/pc/ \
|
|
96
|
+
--out=<project>/styles/{feature}/ [--breakpoint=1024]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Mobile-first merge: MO declarations become the base, PC diffs go into a `@media (min-width)` block.
|
|
100
|
+
Then switch component imports to the merged `index.scss` and re-run Phase 4 → Phase 5 at **both**
|
|
101
|
+
viewports. ⛔ The clone is NOT complete until the MERGED build passes Phase 5 at both.
|
|
102
|
+
|
|
103
|
+
## Phase 2.5: Foundation (no script — do this yourself)
|
|
104
|
+
|
|
105
|
+
Nothing renders right until the foundation exists. Not delegated — it touches shared files.
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
1. Fonts: verify _base.scss @font-face srcs point at downloaded assets/fonts/ files.
|
|
109
|
+
Next.js stack → wire via next/font/local in the layout instead of raw @font-face.
|
|
110
|
+
2. Favicon / OG / manifest: copy assets/seo/* → public/ (project convention path),
|
|
111
|
+
wire metadata (layout.tsx metadata / <head>) to the local files.
|
|
112
|
+
3. SVG icons: collect inline <svg> from rendered.html, dedupe by path data, emit one
|
|
113
|
+
stack-appropriate icon module (e.g. components/{feature}/icons.tsx).
|
|
114
|
+
Name by visual function (SearchIcon, ArrowRightIcon, LogoIcon).
|
|
115
|
+
4. Global behaviors from behaviors.json: scrollLib detected → install/wire page-level
|
|
116
|
+
(Lenis etc.); global keyframes/scroll-snap → styles/{feature}/_shared.scss.
|
|
117
|
+
5. Verify: compile passes before moving on.
|
|
118
|
+
```
|
|
@@ -28,3 +28,37 @@ Code output: placed directly in the project directory per detected stack
|
|
|
28
28
|
5. Design token scan → /tmp/{feature}/project-tokens.json
|
|
29
29
|
(SCSS > CSS Variables > Tailwind > CSS-in-JS)
|
|
30
30
|
```
|
|
31
|
+
|
|
32
|
+
## Full output locations
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
/tmp/{feature}/ # 작업 디렉토리 (산출물 원본)
|
|
36
|
+
├── menu-urls.json # --sub URL 확장 결과
|
|
37
|
+
├── mo/, pc/ # rendered.html, computed.json, screenshot.png, states.json,
|
|
38
|
+
│ # behaviors.json, sections.json, assets/
|
|
39
|
+
└── project-tokens.json # 기존 프로젝트 토큰 인덱스
|
|
40
|
+
|
|
41
|
+
./components/{feature}/ # 빌더가 작성한 컴포넌트 (.tsx/.vue/.svelte/.html)
|
|
42
|
+
./components/{feature}/_specs/{mo,pc}/ # clone-spec.js가 생성한 섹션별 빌드 계약서 (*.spec.md)
|
|
43
|
+
./styles/{feature}/ # 최종 병합 SCSS (Phase 3C 산출 — mobile-first @media)
|
|
44
|
+
├── mo/, pc/ # BP별 SCSS 초안 (clone-to-scss.js + 근거 기반 수정)
|
|
45
|
+
├── _tokens.scss # CSS 변수 (병합)
|
|
46
|
+
├── _base.scss # @font-face
|
|
47
|
+
├── _shared.scss # 유틸 + 글로벌 동작 (scroll-lib 등)
|
|
48
|
+
├── sections/_<name>.scss # 섹션별 partial (병합)
|
|
49
|
+
├── index.scss # 마스터 orchestrator (병합)
|
|
50
|
+
└── class-plan.json # 노드 id → BEM 클래스 (병합)
|
|
51
|
+
./public/images/{feature}/ # 다운로드된 이미지/폰트
|
|
52
|
+
./public/ (프로젝트 관례 경로) # favicon·OG·manifest (assets/seo/ 에서 배선)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Capture artifacts (Phase 1 output per breakpoint)
|
|
56
|
+
|
|
57
|
+
`rendered.html`, `computed.json`, `screenshot.png`, `states.json`, `behaviors.json`,
|
|
58
|
+
`asset-map.json`, `assets/` (images·fonts·seo).
|
|
59
|
+
|
|
60
|
+
- `behaviors.json` = active interaction sweep, 4+ kinds (scroll header diff · tab-click content
|
|
61
|
+
swap · hover diff · in-view entrance animation · time-driven carousel candidates · smooth-scroll
|
|
62
|
+
library detection). It captures JS-set state that static CSS harvesting is blind to — the core of
|
|
63
|
+
clone accuracy. Disable with `--no-interact`.
|
|
64
|
+
- `assets/seo/` = favicon · apple-touch-icon · og:image · webmanifest, wired during Phase 2.5.
|