oh-my-design-cli 1.2.0 → 1.3.0
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/package.json +2 -1
- package/skills/omd-harness/SKILL.md +14 -0
- package/skills/omd-init/SKILL.md +161 -70
- package/skills/omd-reference-capture/SKILL.md +314 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-design-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Bootstrap oh-my-design skills + agents into your project. After install, talk to your AI coding agent in natural language — no other CLI commands.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"skills/omd-learn",
|
|
16
16
|
"skills/omd-remember",
|
|
17
17
|
"skills/omd-sync",
|
|
18
|
+
"skills/omd-reference-capture",
|
|
18
19
|
"agents",
|
|
19
20
|
"data",
|
|
20
21
|
"web/references/*/DESIGN.md",
|
|
@@ -170,6 +170,20 @@ DESIGN.md가 없어서 reference 한 개를 골라 부트스트랩할게요. <ta
|
|
|
170
170
|
- 카탈로그에 없는 id → "해당 id는 reference 카탈로그에 없어요. top-5 중에서 골라주세요."
|
|
171
171
|
- `중단` → 종료
|
|
172
172
|
|
|
173
|
+
### 3.7 (선택) 라이브 reference capture 권유
|
|
174
|
+
|
|
175
|
+
선택된 reference의 라이브 사이트에서 디자인 토큰 + 시각 reference를 가져오면 master phase 정확도가 올라간다 (특히 Components / Microcopy 단계). 사용자에게 한 줄로 묻기:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
선택하신 <id>의 라이브 사이트(예: <homepage>)에서 디자인 토큰 + 로고 + hero screenshot을 가져올까요? assets/_reference/<id>/ 에 저장됩니다 (reference 용도, 사용자 product에 직접 ship 금지).
|
|
179
|
+
yes/no/skip-this-time
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
`yes` → omd:reference-capture skill 호출 (Skill 툴) → 끝나면 Step 4로
|
|
183
|
+
`no/skip` → 바로 Step 4
|
|
184
|
+
|
|
185
|
+
omd:reference-capture는 자체적으로 LICENSE-NOTE.md / attribution.md를 작성하며 brand IP 가드레일을 가지고 있다. 자세한 동작은 `skills/omd-reference-capture/SKILL.md` 참조.
|
|
186
|
+
|
|
173
187
|
## Step 4 — Master 호출 (handoff loop)
|
|
174
188
|
|
|
175
189
|
Subagent (master)는 AskUserQuestion 직접 호출 불가 (main-thread 전용). file-based handoff 패턴으로 돌린다.
|
package/skills/omd-init/SKILL.md
CHANGED
|
@@ -5,157 +5,247 @@ description: "프로젝트 루트에 DESIGN.md를 부트스트랩 — 실제 기
|
|
|
5
5
|
|
|
6
6
|
# omd:init — DESIGN.md Bootstrap
|
|
7
7
|
|
|
8
|
-
프로젝트에 DESIGN.md +
|
|
8
|
+
프로젝트에 DESIGN.md + AI 코딩 에이전트용 shim 3종을 한 번에 세팅. 레퍼런스 톤&매너는 **preserve**하고, 사용자 프로젝트 맥락은 controlled-vocabulary delta_set으로만 반영.
|
|
9
|
+
|
|
10
|
+
**CLI 호출 없음** — Read/Write/Bash(파일 작업만) 툴로 직접 처리. (이전 버전은 `omd init recommend` 등 CLI subcommand를 호출했으나 현재 CLI binary는 `install-skills`만 노출. 이 skill은 self-contained하게 동작.)
|
|
9
11
|
|
|
10
12
|
## 전체 플로우
|
|
11
13
|
|
|
12
14
|
```
|
|
13
15
|
Phase 1: 사용자 맥락 파악 (1-2 질문)
|
|
14
|
-
Phase 2: 레퍼런스 추천 (
|
|
16
|
+
Phase 2: 레퍼런스 추천 (fingerprint 기반 in-head 점수)
|
|
15
17
|
Phase 3: 사용자가 1개 선택
|
|
16
|
-
Phase 4:
|
|
17
|
-
Phase 5:
|
|
18
|
-
Phase
|
|
18
|
+
Phase 4: 레퍼런스 DESIGN.md Read + delta_set 추출
|
|
19
|
+
Phase 4.5: Philosophy Layer 입력 수집
|
|
20
|
+
Phase 5: Hybrid variation으로 DESIGN.md 작성
|
|
21
|
+
Phase 6: Shim 3종 설치 (omd:sync skill 위임)
|
|
19
22
|
Phase 7: 요약 출력
|
|
20
23
|
```
|
|
21
24
|
|
|
22
25
|
## Phase 1 — 맥락 파악
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
이미 충분한 description이 있으면 skip. 부족하면 **최대 2개** 질문:
|
|
25
28
|
|
|
26
29
|
1. 프로젝트 유형/도메인 (SaaS / 랜딩 / 대시보드 / 이커머스 / 커뮤니티 등)
|
|
27
|
-
2. 분위기 키워드 (warm, minimal, premium, playful, dense, airy 등)
|
|
30
|
+
2. 분위기 키워드 (warm, minimal, premium, playful, dense, airy 등)
|
|
28
31
|
|
|
29
|
-
|
|
32
|
+
한 번에 하나씩, 또는 통합해서 한 번에. 질문 쌓지 말 것.
|
|
30
33
|
|
|
31
|
-
## Phase 2 — 레퍼런스 추천
|
|
34
|
+
## Phase 2 — 레퍼런스 추천 (file-based, no CLI)
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
### 2.1 카탈로그 로드
|
|
37
|
+
|
|
38
|
+
다음 파일을 Read 툴로 전체 로드 (있는 순서대로 fallback):
|
|
39
|
+
|
|
40
|
+
1. `.claude/data/reference-fingerprints.json` (사용자 프로젝트에 설치된 카탈로그 — 표준 경로)
|
|
41
|
+
2. `node_modules/oh-my-design-cli/data/reference-fingerprints.json` (npm 설치 직접 경로)
|
|
42
|
+
3. `data/reference-fingerprints.json` (개발 환경)
|
|
43
|
+
|
|
44
|
+
스키마: `{ count, items: [{ id, primary_color_hex, category, visual_theme, voice_fingerprint, tone_keywords, antipatterns, signature_motion, has_personas, category_raw }] }`.
|
|
45
|
+
|
|
46
|
+
추가 보조 파일 (있으면 같이 로드):
|
|
47
|
+
- `.claude/data/vocabulary.json` — controlled vocab axes/keywords
|
|
48
|
+
- `.claude/data/reference-tags.md` — human-readable keyword matrix
|
|
49
|
+
|
|
50
|
+
### 2.2 task 분석 (silent, in-head)
|
|
37
51
|
|
|
38
|
-
|
|
39
|
-
- `
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
- `delta_set.matchedKeywords` — 실제 매칭된 vocabulary 키워드
|
|
52
|
+
사용자의 description에서 다음 추출:
|
|
53
|
+
- **명시 brand hint**: 한글/영문 brand 이름 직접 언급 (예: "토스 같은" → `toss`, "뱅크샐러드 톤" → `banksalad`, "Linear-clone" → `linear.app`). brand 이름과 id 매핑은 일반 지식 사용 + `items[].id` 또는 `items[].category_raw`에서 cross-check.
|
|
54
|
+
- **vocab 키워드**: warm / minimal / dense / playful / formal / editorial / clinical 등 (vocabulary.json 참조)
|
|
55
|
+
- **카테고리 추측**: Consumer Tech / Fintech / Productivity / E-commerce / Design Tools / Developer Tools / AI & LLM / Mobility / HR / Real Estate / Healthcare / Government
|
|
43
56
|
|
|
44
|
-
|
|
45
|
-
- 5개 레퍼런스를 번호 + 한 줄 설명으로 나열 (description에 매칭된 keyword 1-2개 강조)
|
|
46
|
-
- warnings 있으면 먼저 알린다: "formal과 playful이 충돌해요. 'primarily playful'처럼 한쪽을 우선시하면 변형에 더 잘 반영됩니다."
|
|
57
|
+
### 2.3 점수 계산 (in-head, deterministic)
|
|
47
58
|
|
|
48
|
-
|
|
59
|
+
각 item에 대해:
|
|
60
|
+
- brand hint match → **+5점**
|
|
61
|
+
- `tone_keywords` ∩ task vocab 키워드 → 매칭당 **+1점**
|
|
62
|
+
- `category` 일치 → **+1점**
|
|
49
63
|
|
|
50
|
-
|
|
64
|
+
Top 5 정렬. 모든 추천 id는 `items[].id`에 **반드시** 존재 — hallucination 금지.
|
|
51
65
|
|
|
52
|
-
|
|
66
|
+
### 2.4 사용자에게 제시
|
|
53
67
|
|
|
54
|
-
|
|
55
|
-
|
|
68
|
+
prose로:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
"<task 핵심 한 줄>"을 보니 <top1.id>가 가장 잘 맞을 것 같아요 — <visual_theme 핵심 한 줄 + 매칭 키워드 1-2개>.
|
|
72
|
+
|
|
73
|
+
이대로 가시려면 go (또는 <top1.id>).
|
|
74
|
+
다른 후보: <top2.id> (한 줄 이유) · <top3.id> (...) · <top4.id> (...) · <top5.id> (...)
|
|
75
|
+
본인이 아는 다른 reference 있으면 id로 알려주세요 (예: vercel) — 카탈로그에 없으면 알려드립니다.
|
|
56
76
|
```
|
|
57
77
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
78
|
+
vocab axis conflict 있으면 (예: formal ↔ playful) 먼저 알리고 우선시할 축을 묻기.
|
|
79
|
+
|
|
80
|
+
## Phase 3 — 사용자 선택
|
|
81
|
+
|
|
82
|
+
- `go` 또는 top-5 안 id → 그 id 채택
|
|
83
|
+
- top-5 밖이지만 카탈로그 안 id → 그대로 채택
|
|
84
|
+
- 카탈로그에 없는 id → "해당 id는 카탈로그에 없어요. top-5 중에서 골라주세요."
|
|
85
|
+
- "중단" → 종료
|
|
86
|
+
|
|
87
|
+
## Phase 4 — 레퍼런스 DESIGN.md 로드
|
|
62
88
|
|
|
63
|
-
|
|
89
|
+
### 4.1 경로 결정
|
|
90
|
+
|
|
91
|
+
선택된 id를 `<id>`로 하고, 다음 순서로 Read:
|
|
92
|
+
|
|
93
|
+
1. `.claude/data/references/<id>/DESIGN.md`
|
|
94
|
+
2. `node_modules/oh-my-design-cli/web/references/<id>/DESIGN.md`
|
|
95
|
+
3. `web/references/<id>/DESIGN.md` (개발 환경)
|
|
96
|
+
|
|
97
|
+
전체 내용을 `reference_md` 변수로 보관 (Phase 5의 입력).
|
|
98
|
+
|
|
99
|
+
### 4.2 기존 DESIGN.md 처리
|
|
100
|
+
|
|
101
|
+
프로젝트 루트에 이미 `DESIGN.md`가 있으면:
|
|
102
|
+
1. Read로 내용 확인
|
|
103
|
+
2. Bash로 `mv DESIGN.md DESIGN_DEPRECATED.md`
|
|
104
|
+
3. `DESIGN_DEPRECATED.md` 최상단에 다음 헤더 prepend (Edit 툴):
|
|
105
|
+
```html
|
|
106
|
+
<!-- omd:deprecated
|
|
107
|
+
replaced_at: <ISO-8601 today>
|
|
108
|
+
replaced_by: ./DESIGN.md (bootstrapped from <id>)
|
|
109
|
+
reason: omd:init bootstrap
|
|
110
|
+
-->
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 4.3 init-context 기록
|
|
114
|
+
|
|
115
|
+
`.omd/init-context.json` 작성 (없으면 mkdir):
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"reference_id": "<id>",
|
|
119
|
+
"description": "<원본 사용자 description>",
|
|
120
|
+
"delta_set": {
|
|
121
|
+
"axes": { /* description에서 추출한 vocab axis ↦ shift 값 */ },
|
|
122
|
+
"voiceHints": [ /* 추출된 voice 힌트 */ ],
|
|
123
|
+
"matchedKeywords": [ /* 매칭된 vocab 키워드 */ ],
|
|
124
|
+
"warnings": [ /* axis conflict 등 */ ]
|
|
125
|
+
},
|
|
126
|
+
"bootstrapped_at": "<ISO-8601>"
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
`axes` 표준 키: `color.hue_deg` (도), `color.saturation_pct` (%p), `color.lightness_pct` (%p), `radius.delta_px` (px), `density.shift` (-2 ~ +2), `tracking.shift` (-0.01em ~ +0.01em).
|
|
64
131
|
|
|
65
132
|
## Phase 4.5 — Philosophy Layer 입력 수집 (CRITICAL)
|
|
66
133
|
|
|
67
|
-
§11 (Brand Narrative), §12 (Principles), §13 (Personas)는
|
|
134
|
+
§11 (Brand Narrative), §12 (Principles), §13 (Personas)는 레퍼런스의 검증된 historical facts에 기반. 단순 domain swap하면 거짓 brand claim을 ship하는 사고가 난다.
|
|
68
135
|
|
|
69
|
-
|
|
136
|
+
Phase 5B 진입 전 사용자에게 한 번에 묻기:
|
|
70
137
|
|
|
71
138
|
```
|
|
72
139
|
DESIGN.md의 §11-13 (Brand Narrative / Principles / Personas)에는 사실 정보가 들어갑니다. 다음을 알려주시거나 "skip"이라고 답해주세요:
|
|
73
140
|
|
|
74
141
|
1. 프로젝트 이름 / 창립 시점 (대략)
|
|
75
142
|
2. 핵심 thesis 한 문장 (e.g. Airbnb의 "Belong Anywhere")
|
|
76
|
-
3. 공식 tagline 또는 거부하는 카테고리 default
|
|
77
|
-
4. 타겟 사용자 segment 2-4개
|
|
143
|
+
3. 공식 tagline 또는 거부하는 카테고리 default
|
|
144
|
+
4. 타겟 사용자 segment 2-4개
|
|
78
145
|
|
|
79
|
-
답변 받으면 →
|
|
80
|
-
"skip" → §11-13은 [FILL IN: ...] placeholder + omd:limitation
|
|
146
|
+
답변 받으면 → §11-13에 반영
|
|
147
|
+
"skip" → §11-13은 [FILL IN: ...] placeholder + omd:limitation 코멘트
|
|
81
148
|
```
|
|
82
149
|
|
|
83
|
-
|
|
150
|
+
부분 답변은 받은 부분만 사용, 나머지 skip.
|
|
84
151
|
|
|
85
152
|
## Phase 5 — Hybrid Variation 생성 (핵심)
|
|
86
153
|
|
|
87
|
-
`.omd/init-context.json
|
|
154
|
+
`reference_md` + `.omd/init-context.json` `delta_set`을 입력으로 새 `DESIGN.md` 작성.
|
|
88
155
|
|
|
89
156
|
### Phase 5A — Voice Fingerprint 내부 추출 (silent)
|
|
90
157
|
|
|
91
|
-
|
|
92
|
-
- 평균 문장 길이 밴드
|
|
158
|
+
출력 금지. 작성 전 머릿속으로 파악:
|
|
159
|
+
- 평균 문장 길이 밴드
|
|
93
160
|
- 어휘 register (engineering-terse / editorial-warm / clinical / playful 중)
|
|
94
|
-
- 은유 밀도
|
|
161
|
+
- 은유 밀도
|
|
95
162
|
- 기술 밀도 (token-heavy / prose-heavy / balanced)
|
|
96
163
|
- 문단 리듬 (list-forward / paragraph-forward)
|
|
97
164
|
|
|
98
|
-
Phase 5B
|
|
165
|
+
Phase 5B emit하는 모든 내러티브를 이 fingerprint에 정확히 맞춰야 한다.
|
|
99
166
|
|
|
100
167
|
### Phase 5B — 새 DESIGN.md emit
|
|
101
168
|
|
|
102
169
|
**엄격 규칙 (위반 = regression)**:
|
|
103
170
|
|
|
104
|
-
1. **Section 구조 frozen
|
|
171
|
+
1. **Section 구조 frozen**: 레퍼런스의 H2/H3 heading을 같은 순서로 그대로. 추가/삭제/이름 변경 금지.
|
|
105
172
|
|
|
106
|
-
2. **Token 값은 `delta_set`가 허가한 것만
|
|
173
|
+
2. **Token 값은 `delta_set`가 허가한 것만 변경**:
|
|
174
|
+
- 색상: HSL 변환 후 `color.hue_deg` / `saturation_pct` / `lightness_pct` 적용. 미허가 hex는 byte-for-byte 동일.
|
|
175
|
+
- radius: `radius.delta_px`만큼 가산 (음수도 가능).
|
|
176
|
+
- 그 외 토큰은 손대지 말 것. "개선" 금지.
|
|
107
177
|
|
|
108
|
-
3.
|
|
178
|
+
3. **내러티브는 Phase 5A fingerprint에 매칭**: 도메인 예시 교체 시 문장 길이/register/은유 밀도 그대로. 명사만 swap, 동사/형용사/framing 손대지 말 것.
|
|
109
179
|
|
|
110
|
-
4.
|
|
180
|
+
4. **새 philosophy 도입 금지**: OmD v0.1 layer, 없던 원칙 추가 금지. delta-derived 노트는 새 bullet으로 넣지 말고 기존 bullet에 자연스럽게 통합.
|
|
111
181
|
|
|
112
|
-
5.
|
|
182
|
+
5. **해결 불가능 delta는 top-of-file HTML comment**: `<!-- omd:unresolved: <axis> -->` 상단 추가, 해당 token은 건드리지 않음.
|
|
113
183
|
|
|
114
|
-
6.
|
|
184
|
+
6. **Voice hints 반영**: `delta_set.voiceHints`는 Voice 섹션 내러티브에 반영하되 레퍼런스 voice 스타일 안에서만. "contractions ok" → Voice 원칙 bullet에 한 줄 추가.
|
|
115
185
|
|
|
116
|
-
7.
|
|
186
|
+
7. **§11-13 처리 분기**:
|
|
187
|
+
- Phase 4.5에서 정보 제공: 그 정보로 §11/12/13 작성. verbatim 인용은 사용자가 직접 준 표현만. 레퍼런스의 시간 표현·공식 인용 모두 사용자 맥락으로 대체.
|
|
188
|
+
- Phase 4.5에서 skip: §11-13 본문을 `[FILL IN: <섹션 목적 한 줄>]` placeholder + 각 섹션 상단 `<!-- omd:limitation Reference §X requires project-specific facts. Replace before shipping; do not fabricate. -->`.
|
|
189
|
+
- §14 (States), §15 (Motion): 일반 Hybrid 적용 (구체 명사만 swap).
|
|
117
190
|
|
|
118
|
-
8.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
191
|
+
8. **Frontmatter**:
|
|
192
|
+
```yaml
|
|
193
|
+
---
|
|
194
|
+
omd: 0.1
|
|
195
|
+
brand: <Project Name or "Project">
|
|
196
|
+
bootstrapped_from: <id>
|
|
197
|
+
bootstrapped_at: <ISO-8601>
|
|
198
|
+
---
|
|
199
|
+
```
|
|
122
200
|
|
|
123
201
|
### Phase 5C — 파일 작성
|
|
124
202
|
|
|
125
|
-
Write 툴로 `DESIGN.md
|
|
203
|
+
Write 툴로 `DESIGN.md` emit.
|
|
126
204
|
|
|
127
205
|
## Phase 6 — Shim 설치
|
|
128
206
|
|
|
129
|
-
|
|
130
|
-
|
|
207
|
+
CLI subcommand 없음. 두 가지 옵션:
|
|
208
|
+
|
|
209
|
+
**옵션 A (권장)**: omd:sync skill 위임. 같은 conversation에서 Skill 툴로:
|
|
131
210
|
```
|
|
211
|
+
Skill: omd:sync
|
|
212
|
+
args: --force
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
omd:sync skill이 `CLAUDE.md`, `AGENTS.md`, `.cursor/rules/omd-design.mdc` shim 3종을 생성/갱신하고 `.omd/sync.lock.json` 업데이트.
|
|
216
|
+
|
|
217
|
+
**옵션 B**: omd:sync skill을 호출할 수 없는 환경이면 직접 Write로 shim 작성. 템플릿은 `skills/omd-sync/SKILL.md` §"shim body" 참조. 최소한:
|
|
218
|
+
- `CLAUDE.md`: managed block ("<!-- omd:managed:start --> ... <!-- omd:managed:end -->") 안에 DESIGN.md 참조 + 핵심 token 요약
|
|
219
|
+
- `AGENTS.md`: 동일 패턴
|
|
220
|
+
- `.cursor/rules/omd-design.mdc`: 전체 파일 omd 전용 — frontmatter + DESIGN.md 인용
|
|
132
221
|
|
|
133
|
-
|
|
222
|
+
이후 `.omd/sync.lock.json`에 각 shim의 hash 기록.
|
|
134
223
|
|
|
135
224
|
## Phase 7 — 요약 출력
|
|
136
225
|
|
|
137
226
|
한 문단으로:
|
|
138
227
|
- Base reference + 프로젝트 context 한 줄 요약
|
|
139
|
-
- 적용된 주요 delta 2-3개 (e.g. "primary
|
|
228
|
+
- 적용된 주요 delta 2-3개 (e.g. "primary hue shifted warm by +12°, radius +4px")
|
|
140
229
|
- 생성된 파일 목록 (DESIGN.md + shims)
|
|
141
230
|
- DESIGN_DEPRECATED.md 있으면 언급
|
|
142
|
-
- 다음 스텝: `omd:apply`로 UI 작업
|
|
231
|
+
- 다음 스텝: `omd:apply`로 UI 작업 시작 또는 `omd:harness`로 전체 surface 디자인 또는 `omd:remember`로 선호 추가 로깅
|
|
143
232
|
|
|
144
233
|
예시:
|
|
145
234
|
```
|
|
146
|
-
✓ DESIGN.md created (based on
|
|
147
|
-
- primary hue
|
|
148
|
-
- radius
|
|
149
|
-
- voice hints:
|
|
235
|
+
✓ DESIGN.md created (based on banksalad, 한국 핀테크 랜딩 맥락)
|
|
236
|
+
- primary hue 유지 (#04c584 그대로)
|
|
237
|
+
- radius 유지 (2px 시스템)
|
|
238
|
+
- voice hints: 데이터 어드바이저 톤
|
|
150
239
|
|
|
151
240
|
Shim files:
|
|
152
|
-
✓ CLAUDE.md
|
|
153
|
-
✓ AGENTS.md
|
|
241
|
+
✓ CLAUDE.md (managed block)
|
|
242
|
+
✓ AGENTS.md (managed block)
|
|
154
243
|
✓ .cursor/rules/omd-design.mdc
|
|
155
244
|
|
|
156
245
|
Next:
|
|
157
|
-
-
|
|
158
|
-
-
|
|
246
|
+
- UI 작업 시작 → omd:apply로 자동 라우팅됨
|
|
247
|
+
- 전체 surface 디자인 (랜딩, 대시보드 등) → omd:harness
|
|
248
|
+
- 디자인 선호 로깅 → /omd:remember <note>
|
|
159
249
|
```
|
|
160
250
|
|
|
161
251
|
## 금지
|
|
@@ -163,5 +253,6 @@ Next:
|
|
|
163
253
|
- Phase 5A fingerprint를 출력하지 말 것 (내부 전용).
|
|
164
254
|
- `delta_set.axes`에 없는 token을 마음대로 바꾸지 말 것.
|
|
165
255
|
- 레퍼런스에 없는 section/heading을 추가하지 말 것.
|
|
166
|
-
- `.omd/init-context.json`을 직접
|
|
167
|
-
- DESIGN.md가 이미 있는데 백업 없이 덮어쓰지 말 것
|
|
256
|
+
- `.omd/init-context.json`을 직접 편집할 때 schema 어기지 말 것.
|
|
257
|
+
- DESIGN.md가 이미 있는데 백업 없이 덮어쓰지 말 것 (Phase 4.2 rename 절차 준수).
|
|
258
|
+
- **존재하지 않는 CLI subcommand (`omd init recommend`, `omd init prepare`, `omd sync`)를 호출하지 말 것** — 현 CLI binary는 `install-skills`만 제공.
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: omd:reference-capture
|
|
3
|
+
description: "선택된 reference brand의 라이브 사이트에서 디자인 컨텍스트(토큰·구조·visual reference)를 캡쳐. brand homepage 패칭, 컴퓨티드 스타일 inspect, 로고/스크린샷을 assets/_reference/<id>/ 로 가져와 attribution.md + LICENSE-NOTE.md와 함께 저장. '뱅크샐러드 에셋 가져와줘', 'X 사이트 패칭', 'X reference 캡쳐', 'X 라이브 스타일 추출', '브랜드 자료 받아와' 류 요청에 트리거. omd:init 직후 또는 omd:harness 중간에 호출 가능. DESIGN.md는 이 스킬이 만들지 않음 (omd:init 책임)."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# omd:reference-capture — Live Reference Capture
|
|
7
|
+
|
|
8
|
+
선택된 reference brand의 **라이브 사이트에서 디자인 컨텍스트를 가져온다**. 산출물은 `assets/_reference/<id>/` 디렉토리에 모이고, 사용자의 디자인 작업(omd:apply / omd:harness)에서 컨텍스트로 활용된다.
|
|
9
|
+
|
|
10
|
+
## 핵심 원칙 (위반 = regression)
|
|
11
|
+
|
|
12
|
+
이 스킬은 **dev/디자인 reference 캡쳐**용이다. brand IP를 사용자 product에 그대로 ship하는 도구가 **아니다**.
|
|
13
|
+
|
|
14
|
+
1. **Facts vs. Content 구분**
|
|
15
|
+
- **Facts (캡쳐 OK)**: 컴퓨티드 색상 hex, 폰트 family/weight, spacing, radius, 컴포넌트 구조 — 디자인 시스템 분석은 fair use.
|
|
16
|
+
- **Brand content (저장만, 사용자 product에 verbatim ship 금지)**: 로고, 히어로 사진, 마케팅 카피, 슬로건. 다운로드는 reference 확인용으로만.
|
|
17
|
+
|
|
18
|
+
2. **저작권 표시 의무**
|
|
19
|
+
- 캡쳐 시작 전 `assets/_reference/<id>/LICENSE-NOTE.md`를 **가장 먼저** 작성.
|
|
20
|
+
- 모든 다운로드 파일은 `attribution.md`에 source URL + 캡쳐 일자 + 추정 권리자 기록.
|
|
21
|
+
|
|
22
|
+
3. **사용자 product 생성 시 분리**
|
|
23
|
+
- omd:apply/omd:harness가 UI를 만들 때, brand의 **voice/tone(facts)**은 참고하되 **literal copy**는 새로 작성.
|
|
24
|
+
- brand 히어로 사진 / 마케팅 영상은 사용자 product에 직접 embed하지 말고 placeholder + "사용자 자체 자산으로 교체 필요" 주석.
|
|
25
|
+
|
|
26
|
+
4. **robots.txt / TOS 우선**
|
|
27
|
+
- 다운로드 전 `curl -sI <site>/robots.txt`로 기본 정책 확인.
|
|
28
|
+
- 사이트가 명시적으로 차단하는 경로면 skip하고 사용자에게 알림.
|
|
29
|
+
|
|
30
|
+
5. **scope 한정**
|
|
31
|
+
- 기본 캡쳐 대상: homepage 1개 + favicon/logo + 컴퓨티드 토큰.
|
|
32
|
+
- PDP / checkout / 인증 뒤 페이지는 **기본 skip** — 사용자가 명시적 요청해야만.
|
|
33
|
+
- 비디오 / 대용량 미디어는 기본 skip (URL만 attribution.md에 기록).
|
|
34
|
+
|
|
35
|
+
## 트리거
|
|
36
|
+
|
|
37
|
+
- 명시: "X 에셋 가져와줘", "X 사이트 패칭해줘", "X 라이브 스타일 추출", "X reference 캡쳐"
|
|
38
|
+
- 묵시: omd:harness 안에서 reference 선정 후, 또는 사용자가 "X처럼 만들어줘" 요청 시 omd:init 후속 작업으로 자동 제안
|
|
39
|
+
|
|
40
|
+
## 전체 플로우
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Phase 1: 입력 검증 — brand id 확정
|
|
44
|
+
Phase 2: 라이브 URL 수집 (homepage, logo, docs)
|
|
45
|
+
Phase 3: 디렉토리 + LICENSE-NOTE 사전 작성 (CRITICAL — 다운로드보다 먼저)
|
|
46
|
+
Phase 4: 토큰 캡쳐 (facts) — playwright computed styles
|
|
47
|
+
Phase 5: 시각 reference 캡쳐 (screenshot + 로고)
|
|
48
|
+
Phase 6: attribution.md 작성
|
|
49
|
+
Phase 7: 사용자 요약 + 다음 단계 안내
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Phase 1 — 입력 검증
|
|
53
|
+
|
|
54
|
+
사용자 요청에서 brand id 추출:
|
|
55
|
+
- 명시 brand 이름 (한글/영문) → `.claude/data/reference-fingerprints.json` `items[].id` 매칭
|
|
56
|
+
- 없으면 사용자에게 묻기: "어느 reference brand 자료를 가져올까요? (예: banksalad, toss, socar)"
|
|
57
|
+
|
|
58
|
+
id가 카탈로그에 없으면 종료 + "X는 reference 카탈로그에 없어요. omd:init으로 추가 가능합니다."
|
|
59
|
+
|
|
60
|
+
## Phase 2 — 라이브 URL 수집
|
|
61
|
+
|
|
62
|
+
다음을 순서대로 시도:
|
|
63
|
+
|
|
64
|
+
1. **homepage URL**:
|
|
65
|
+
- `node_modules/oh-my-design-cli/web/references/<id>/_promo.json`의 `logo_url`이 brand site면 거기서 도메인 추출
|
|
66
|
+
- 없으면 `node_modules/oh-my-design-cli/web/references/<id>/_research.md`에서 Tier 1 source URL grep
|
|
67
|
+
- 둘 다 없으면 `.claude/data/reference-fingerprints.json`의 `items[].category_raw` 기반으로 추론 — 마지막 수단
|
|
68
|
+
|
|
69
|
+
2. **logo URL** (`_promo.json` 우선):
|
|
70
|
+
- `_promo.json.logo_url` → 그대로 사용
|
|
71
|
+
- 없으면 homepage HTML에서 `apple-touch-icon` / `og:image` / favicon-256 추출
|
|
72
|
+
|
|
73
|
+
3. **공식 DS docs URL** (있으면):
|
|
74
|
+
- `node_modules/oh-my-design-cli/web/references/<id>/DESIGN.md`의 footer 또는 §4 verified 섹션에서 grep
|
|
75
|
+
|
|
76
|
+
수집한 URL 후보를 사용자에게 보여주고 확인:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
다음 자료를 가져오려고 합니다:
|
|
80
|
+
- homepage: https://www.banksalad.com
|
|
81
|
+
- logo: https://blog.banksalad.com/static/img/logo-banksalad.svg
|
|
82
|
+
- 공식 DS: (없음)
|
|
83
|
+
|
|
84
|
+
저작권 안내: 이 자료는 디자인 reference 용도로만 사용됩니다. 사용자 product에 그대로 ship하지 마세요.
|
|
85
|
+
|
|
86
|
+
진행하시겠어요? (yes/no/edit-urls)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Phase 3 — 디렉토리 + LICENSE-NOTE 사전 작성 (CRITICAL)
|
|
90
|
+
|
|
91
|
+
다운로드 시작 **전에** 다음을 먼저 작성:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
mkdir -p "assets/_reference/<id>/screenshots"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
`assets/_reference/<id>/LICENSE-NOTE.md`:
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
# License Note — <id> Reference Capture
|
|
101
|
+
|
|
102
|
+
This directory contains design-reference materials captured from
|
|
103
|
+
**<id>**'s public website on **<ISO-date>** for the purpose of
|
|
104
|
+
informing UI design work in this project.
|
|
105
|
+
|
|
106
|
+
## What's here is for REFERENCE, not REDISTRIBUTION
|
|
107
|
+
|
|
108
|
+
- **Design tokens** (colors, fonts, spacing) — `tokens.json`. These
|
|
109
|
+
are facts about the brand's design system and may be used to inform
|
|
110
|
+
your own design.
|
|
111
|
+
- **Logo file** — captured for visual recognition during development.
|
|
112
|
+
This is <brand>'s trademark. Do not use in your own product, your
|
|
113
|
+
own marketing, or any redistribution. Replace with your own brand
|
|
114
|
+
mark before shipping.
|
|
115
|
+
- **Screenshots** — captured for visual reference during development.
|
|
116
|
+
Do not embed in your product, your blog, or social posts beyond
|
|
117
|
+
fair-use commentary.
|
|
118
|
+
|
|
119
|
+
## What you should NOT do
|
|
120
|
+
|
|
121
|
+
- Embed `logo.*` or `screenshots/*.png` in your own product UI as if
|
|
122
|
+
they belong to you.
|
|
123
|
+
- Copy `tokens.json`'s exact hex values into your own brand without
|
|
124
|
+
shifting them via `delta_set` (see omd:init).
|
|
125
|
+
- Copy any marketing text from screenshots into your own product
|
|
126
|
+
verbatim — voice/tone is fact, but specific phrasing is creative work.
|
|
127
|
+
|
|
128
|
+
## What you SHOULD do
|
|
129
|
+
|
|
130
|
+
- Use the **design language** (token relationships, component
|
|
131
|
+
patterns, voice register) to inform your project's DESIGN.md.
|
|
132
|
+
- Reference the screenshots during design reviews to align with the
|
|
133
|
+
visual target.
|
|
134
|
+
- Replace all brand-identifying assets with your own before any
|
|
135
|
+
external sharing.
|
|
136
|
+
|
|
137
|
+
## Attribution
|
|
138
|
+
|
|
139
|
+
See `attribution.md` in this directory for source URLs and capture
|
|
140
|
+
timestamps.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
This note is generated by `omd:reference-capture`. Do not edit by hand
|
|
145
|
+
— rerun the skill to refresh.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Phase 4 — 토큰 캡쳐 (facts)
|
|
149
|
+
|
|
150
|
+
playwright MCP를 사용해 homepage에 navigate한 뒤 computed styles를 추출. 결과는 `assets/_reference/<id>/tokens.json`:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"captured_at": "<ISO-8601>",
|
|
155
|
+
"source_url": "https://www.banksalad.com",
|
|
156
|
+
"tokens": {
|
|
157
|
+
"colors": {
|
|
158
|
+
"background": "#ffffff",
|
|
159
|
+
"text_primary": "#2b2b2b",
|
|
160
|
+
"text_body": "#434444",
|
|
161
|
+
"interaction_primary": "#04c584",
|
|
162
|
+
"interaction_hover": "#10df99"
|
|
163
|
+
},
|
|
164
|
+
"typography": {
|
|
165
|
+
"body_font_family": "Pretendard, ...",
|
|
166
|
+
"body_font_weight": "400",
|
|
167
|
+
"heading_font_weight": "700",
|
|
168
|
+
"base_size_px": 16
|
|
169
|
+
},
|
|
170
|
+
"shape": {
|
|
171
|
+
"default_radius_px": 2,
|
|
172
|
+
"card_radius_px": 2,
|
|
173
|
+
"pill_radius_px": 16
|
|
174
|
+
},
|
|
175
|
+
"shadow": {
|
|
176
|
+
"default": "0 2px 5px rgba(0,0,0,0.12)"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"samples": [
|
|
180
|
+
{ "element": "primary button (hero CTA)", "raw_computed_style": { /* getComputedStyle slice */ } },
|
|
181
|
+
{ "element": "card", "raw_computed_style": { /* ... */ } }
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
inspect 패턴은 `.claude/skills/omd-add-reference/SKILL.md`의 "apple.com 류 라이브 inspect 패턴"과 동일. 5-10 elements 샘플링.
|
|
187
|
+
|
|
188
|
+
## Phase 5 — 시각 reference 캡쳐
|
|
189
|
+
|
|
190
|
+
### 5.1 로고 다운로드
|
|
191
|
+
|
|
192
|
+
`curl -sSL -o "assets/_reference/<id>/logo.<ext>" "<logo_url>"`
|
|
193
|
+
|
|
194
|
+
- 실패 시 sourceURL 명시하고 사용자에게 수동 다운로드 안내
|
|
195
|
+
- 확장자는 Content-Type 기준 (svg/png/ico) — 잘못된 확장자로 저장하지 말 것
|
|
196
|
+
|
|
197
|
+
### 5.2 Hero screenshot
|
|
198
|
+
|
|
199
|
+
playwright `mcp__playwright__browser_take_screenshot`로 homepage 위 fold만 캡쳐:
|
|
200
|
+
|
|
201
|
+
- viewport: 1280×800 (데스크탑 기본)
|
|
202
|
+
- fullPage: **false** — 위 fold만
|
|
203
|
+
- 저장 경로: `assets/_reference/<id>/screenshots/hero-desktop.png`
|
|
204
|
+
|
|
205
|
+
모바일 viewport (375×812)도 1장: `screenshots/hero-mobile.png`.
|
|
206
|
+
|
|
207
|
+
대용량 페이지 전체 screenshot은 default skip. 사용자가 명시적으로 요청 시만.
|
|
208
|
+
|
|
209
|
+
### 5.3 다운로드 금지 대상
|
|
210
|
+
|
|
211
|
+
- 비디오 (`.mp4`, `.webm`)
|
|
212
|
+
- 마케팅 PDF
|
|
213
|
+
- 인증 뒤 페이지의 자산
|
|
214
|
+
- robots.txt가 차단하는 경로
|
|
215
|
+
|
|
216
|
+
이런 자원은 attribution.md에 URL만 기록.
|
|
217
|
+
|
|
218
|
+
## Phase 6 — attribution.md
|
|
219
|
+
|
|
220
|
+
`assets/_reference/<id>/attribution.md`:
|
|
221
|
+
|
|
222
|
+
```markdown
|
|
223
|
+
# Attribution — <id> Reference Capture
|
|
224
|
+
|
|
225
|
+
Captured: **<ISO-8601>** via `omd:reference-capture`
|
|
226
|
+
|
|
227
|
+
## Sources
|
|
228
|
+
|
|
229
|
+
| File | Source URL | Captured | Notes |
|
|
230
|
+
|---|---|---|---|
|
|
231
|
+
| `tokens.json` | `<homepage_url>` | <date> | Computed styles via playwright, factual analysis |
|
|
232
|
+
| `logo.<ext>` | `<logo_url>` | <date> | Brand trademark — do not redistribute |
|
|
233
|
+
| `screenshots/hero-desktop.png` | `<homepage_url>` (1280×800) | <date> | Reference for design alignment |
|
|
234
|
+
| `screenshots/hero-mobile.png` | `<homepage_url>` (375×812) | <date> | Reference for design alignment |
|
|
235
|
+
|
|
236
|
+
## Skipped (URL recorded for manual review)
|
|
237
|
+
|
|
238
|
+
- (none) OR <list of URLs skipped due to robots.txt / size / type>
|
|
239
|
+
|
|
240
|
+
## Rights
|
|
241
|
+
|
|
242
|
+
These materials are owned by <id> and its respective rights holders.
|
|
243
|
+
Captured under fair-use principles for the purpose of design analysis
|
|
244
|
+
and development reference. See `LICENSE-NOTE.md` for usage boundaries.
|
|
245
|
+
|
|
246
|
+
## Refresh
|
|
247
|
+
|
|
248
|
+
Rerun `omd:reference-capture <id>` to recapture (overwrites this
|
|
249
|
+
directory). Captured tokens reflect the live site at capture time and
|
|
250
|
+
may drift as the brand evolves.
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Phase 7 — 사용자 요약
|
|
254
|
+
|
|
255
|
+
prose로:
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
✓ <id> reference captured into assets/_reference/<id>/
|
|
259
|
+
- tokens.json — <N> design tokens extracted
|
|
260
|
+
- logo.<ext> — <size>
|
|
261
|
+
- screenshots/ — <N> images
|
|
262
|
+
|
|
263
|
+
⚠ 저작권 안내: 이 자료는 디자인 reference 용도. 사용자 product에 brand 로고/스크린샷을 직접 embed하지 마세요. 자세한 사용 경계는 LICENSE-NOTE.md 참고.
|
|
264
|
+
|
|
265
|
+
다음 단계:
|
|
266
|
+
- omd:apply로 컴포넌트 작업 시작 (tokens.json 자동 활용)
|
|
267
|
+
- omd:harness로 전체 surface 디자인 (이 자료를 reference로)
|
|
268
|
+
- 토큰 시각 확인: open assets/_reference/<id>/screenshots/hero-desktop.png
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## omd:harness / omd:apply 와의 인터페이스
|
|
272
|
+
|
|
273
|
+
이 스킬이 만든 `assets/_reference/<id>/tokens.json`은 후속 skill이 자동 활용:
|
|
274
|
+
|
|
275
|
+
- **omd:apply**가 컴포넌트 작업 시 `tokens.json`이 있으면 hex 값 동기화 우선
|
|
276
|
+
- **omd:harness**의 Component phase에서 시각 reference로 screenshots 활용
|
|
277
|
+
|
|
278
|
+
UI 생성 시 logo 사용 규칙 (omd:apply / omd:harness 둘 다 적용):
|
|
279
|
+
- 사용자 product의 **헤더/footer logo는 reference logo를 placeholder로 쓰지 말 것** — `[YOUR LOGO]` 자리만 잡고 사용자에게 자체 로고 요청
|
|
280
|
+
- favicon / og:image 등도 동일 — placeholder 위치만 표시
|
|
281
|
+
|
|
282
|
+
## 안티패턴 (절대 금지)
|
|
283
|
+
|
|
284
|
+
- ❌ 다운로드 시작 전에 LICENSE-NOTE.md 작성 skip
|
|
285
|
+
- ❌ Phase 4의 token 캡쳐 결과를 그대로 사용자 DESIGN.md에 hex값 verbatim 복사 (omd:init의 delta_set 시스템을 우회)
|
|
286
|
+
- ❌ 브랜드 마케팅 카피를 사용자 product에 그대로 인용
|
|
287
|
+
- ❌ 사용자 product의 로고 자리에 reference brand 로고 임시로라도 박기 (사용자가 잊고 ship 가능성)
|
|
288
|
+
- ❌ robots.txt 차단 경로 강행
|
|
289
|
+
- ❌ 인증 뒤 페이지 자동 탐색
|
|
290
|
+
- ❌ 비디오 / 대용량 자산 default 다운로드
|
|
291
|
+
|
|
292
|
+
## 산출 위치 (요약)
|
|
293
|
+
|
|
294
|
+
```
|
|
295
|
+
assets/_reference/<id>/
|
|
296
|
+
├── LICENSE-NOTE.md (사전 작성)
|
|
297
|
+
├── attribution.md (마지막 작성)
|
|
298
|
+
├── tokens.json (facts)
|
|
299
|
+
├── logo.<svg|png|ico> (brand mark — reference only)
|
|
300
|
+
└── screenshots/
|
|
301
|
+
├── hero-desktop.png (1280×800, above fold)
|
|
302
|
+
└── hero-mobile.png (375×812, above fold)
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## .gitignore 권장
|
|
306
|
+
|
|
307
|
+
`assets/_reference/` 디렉토리는 사용자 자체 자산이 아닌 reference 자료이므로, 사용자 git repo의 정책에 따라 .gitignore 권장:
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
# Reference capture (regeneratable via omd:reference-capture)
|
|
311
|
+
assets/_reference/
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
이 스킬은 .gitignore를 자동 수정하지 않음 — 사용자에게 알림만.
|