@infomind-ux/infoux-mcp 0.1.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/README.md +81 -0
- package/bin/server.js +331 -0
- package/data/contract.md +215 -0
- package/data/manifest.json +286 -0
- package/data/references/accessibility.md +243 -0
- package/data/references/forbidden-patterns.md +462 -0
- package/data/references/guide-import.md +93 -0
- package/data/references/html-semantics.md +475 -0
- package/data/references/krds-components.md +1426 -0
- package/data/references/krds-source.md +1125 -0
- package/data/references/krds-tokens.md +201 -0
- package/data/references/project-profiles.md +99 -0
- package/data/references/snippet-template.md +185 -0
- package/data/references/tailwind-mapping.md +53 -0
- package/data/rules.json +780 -0
- package/data/snippets/accordion.md +49 -0
- package/data/snippets/alert.md +37 -0
- package/data/snippets/badge.md +29 -0
- package/data/snippets/boilerplate.md +125 -0
- package/data/snippets/breadcrumb.md +26 -0
- package/data/snippets/btn.md +63 -0
- package/data/snippets/calendar.md +64 -0
- package/data/snippets/card.md +50 -0
- package/data/snippets/carousel.md +43 -0
- package/data/snippets/check-radio.md +55 -0
- package/data/snippets/disclosure.md +44 -0
- package/data/snippets/file-upload.md +34 -0
- package/data/snippets/form.md +68 -0
- package/data/snippets/header.md +56 -0
- package/data/snippets/list.md +64 -0
- package/data/snippets/main-menu.md +49 -0
- package/data/snippets/modal.md +54 -0
- package/data/snippets/pagination.md +41 -0
- package/data/snippets/progress.md +30 -0
- package/data/snippets/select.md +34 -0
- package/data/snippets/side-panel.md +57 -0
- package/data/snippets/spinner.md +24 -0
- package/data/snippets/step-indicator.md +38 -0
- package/data/snippets/switch.md +32 -0
- package/data/snippets/tab.md +52 -0
- package/data/snippets/table.md +63 -0
- package/data/snippets/tag.md +42 -0
- package/data/snippets/toast.md +48 -0
- package/data/snippets/tooltip.md +38 -0
- package/data/tokens.css +390 -0
- package/data/workflows/change-token.md +20 -0
- package/data/workflows/create-component.md +71 -0
- package/data/workflows/design-form.md +20 -0
- package/data/workflows/design-page.md +22 -0
- package/data/workflows/design-widget.md +19 -0
- package/data/workflows/init-project.md +68 -0
- package/data/workflows/review-ui.md +14 -0
- package/package.json +34 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
# 금지 패턴 — info-design 컨트랙트
|
|
2
|
+
|
|
3
|
+
이 문서의 패턴이 코드에서 발견되면 **즉시 작업 중단**하고 사용자에게 보고한다.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. 색상 — Raw 사용 금지 (R-01)
|
|
8
|
+
|
|
9
|
+
### ❌ 금지
|
|
10
|
+
|
|
11
|
+
```css
|
|
12
|
+
/* hex/rgb/hsl 직접 작성 */
|
|
13
|
+
.btn { background: #256ef4; }
|
|
14
|
+
.card { color: rgb(30, 33, 36); }
|
|
15
|
+
.alert { border-color: hsl(220, 50%, 50%); }
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<!-- Tailwind 기본 팔레트 raw 컬러 유틸리티 금지 -->
|
|
20
|
+
<div class="bg-[red] text-[gray] border-[blue]">...</div>
|
|
21
|
+
<div class="bg-[white]">...</div>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```jsx
|
|
25
|
+
{/* 인라인 style 색상 */}
|
|
26
|
+
<div style={{ color: "#256ef4" }}>...</div>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### ✅ 허용
|
|
30
|
+
|
|
31
|
+
```css
|
|
32
|
+
.btn { background: var(--color-primary); }
|
|
33
|
+
.btn { background: var(--color-button-primary-fill); }
|
|
34
|
+
.alert { border-color: var(--color-border-light); }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<div class="bg-primary text-text border-border-light">...</div>
|
|
39
|
+
<div class="bg-bg">...</div>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Raw → 시맨틱 매핑표
|
|
43
|
+
|
|
44
|
+
| Raw 시도 | 올바른 토큰 |
|
|
45
|
+
|---------|-------------|
|
|
46
|
+
| `bg-white`, `#fff` | `bg-bg` 또는 `var(--color-bg)` |
|
|
47
|
+
| `bg-gray-50`, `#f4f5f6` | `bg-bg-subtler` |
|
|
48
|
+
| `bg-gray-100` | `bg-bg-subtle` |
|
|
49
|
+
| `text-gray-400` | `text-text-disabled` |
|
|
50
|
+
| `text-gray-500/600/700` | `text-text-subtle` |
|
|
51
|
+
| `text-gray-800/900` | `text-text-bolder` |
|
|
52
|
+
| `text-black` | `text-text-bolder` |
|
|
53
|
+
| `border-gray-200/300` | `border-border-light` |
|
|
54
|
+
| `border-gray-400+` | `border-border` 또는 `border-border-dark` |
|
|
55
|
+
| red 계열 텍스트/배경 유틸 | `text-danger` / `bg-danger` |
|
|
56
|
+
| `bg-red-50/100` | `bg-danger-surface` |
|
|
57
|
+
| `text-blue-*` (브랜드) | `text-primary` |
|
|
58
|
+
| `bg-blue-500+` | `bg-primary` |
|
|
59
|
+
| `bg-blue-50/100` | `bg-primary-5` 또는 `var(--color-surface-primary-subtler)` |
|
|
60
|
+
| `text-green-*` | `text-success` |
|
|
61
|
+
| `bg-green-50/100` | `bg-success-surface` |
|
|
62
|
+
| `text-amber-*` / `text-yellow-*` | `text-warning` |
|
|
63
|
+
| `bg-amber-50/100` | `bg-warning-surface` |
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 2. 간격/크기 — 과잉 토큰화 금지
|
|
68
|
+
|
|
69
|
+
간격, 크기, 반경, 그림자, 모션, z-index는 공개 토큰으로 만들지 않는다. 화면 밀도와 컴포넌트 맥락에 맞춰 Tailwind v4 `@apply` 또는 명확한 CSS 직접값을 사용한다.
|
|
70
|
+
|
|
71
|
+
### ❌ 금지
|
|
72
|
+
|
|
73
|
+
```css
|
|
74
|
+
:root {
|
|
75
|
+
--custom-spacing-token: 1.6rem;
|
|
76
|
+
--custom-radius-token: 0.8rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.card {
|
|
80
|
+
padding: var(--custom-spacing-token);
|
|
81
|
+
border-radius: var(--custom-radius-token);
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### ✅ 허용
|
|
86
|
+
|
|
87
|
+
```css
|
|
88
|
+
.card {
|
|
89
|
+
@apply rounded-lg;
|
|
90
|
+
padding: 2.4rem;
|
|
91
|
+
margin-top: 4rem;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.btn {
|
|
95
|
+
@apply inline-flex min-h-12 items-center gap-2 px-[2.4rem];
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```html
|
|
100
|
+
<div class="p-[2.4rem] mt-10 min-h-12">...</div>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 3. 폰트 — 패밀리 토큰만 고정
|
|
106
|
+
|
|
107
|
+
### ❌ 금지
|
|
108
|
+
|
|
109
|
+
```css
|
|
110
|
+
.body { font-family: "Pretendard"; }
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### ✅ 허용
|
|
114
|
+
|
|
115
|
+
```css
|
|
116
|
+
body { font-family: var(--font-sans); }
|
|
117
|
+
|
|
118
|
+
.page-title {
|
|
119
|
+
@apply text-3xl font-bold leading-tight;
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
폰트 패밀리는 `--font-sans`, `--font-mono`만 사용한다. 폰트 크기, 굵기, 행간은 화면 맥락에 맞춰 Tailwind/CSS 값으로 작성한다.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 4. 버튼 — 옛 variant 사용 금지 (R-06)
|
|
128
|
+
|
|
129
|
+
### ❌ 금지
|
|
130
|
+
|
|
131
|
+
```html
|
|
132
|
+
<button class="btn btn--ghost">고스트</button>
|
|
133
|
+
<button class="btn btn--outline">아웃라인</button>
|
|
134
|
+
<button class="btn btn--link">링크</button>
|
|
135
|
+
<button class="btn btn--sm">작은 버튼</button>
|
|
136
|
+
<button class="btn btn--lg">큰 버튼</button>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### ✅ 허용 (KRDS 4 variant × 5 size)
|
|
140
|
+
|
|
141
|
+
```html
|
|
142
|
+
<!-- variant -->
|
|
143
|
+
<button class="btn btn--primary">메인 CTA</button>
|
|
144
|
+
<button class="btn btn--secondary">보조</button>
|
|
145
|
+
<button class="btn btn--tertiary">약한</button>
|
|
146
|
+
<button class="btn btn--text">텍스트</button>
|
|
147
|
+
|
|
148
|
+
<!-- size -->
|
|
149
|
+
<button class="btn btn--xsmall">32px</button>
|
|
150
|
+
<button class="btn btn--small">40px</button>
|
|
151
|
+
<button class="btn">48px (medium 기본)</button>
|
|
152
|
+
<button class="btn btn--large">56px</button>
|
|
153
|
+
<button class="btn btn--xlarge">64px</button>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 옛 → KRDS 변환표
|
|
157
|
+
|
|
158
|
+
| 옛 | KRDS |
|
|
159
|
+
|---|------|
|
|
160
|
+
| `.btn--outline` | `.btn--secondary` |
|
|
161
|
+
| `.btn--ghost` | `.btn--tertiary` 또는 `.btn--text` |
|
|
162
|
+
| `.btn--link` | `.btn--text` (밑줄은 별도 추가) |
|
|
163
|
+
| `.btn--sm` | `.btn--small` |
|
|
164
|
+
| `.btn--lg` | `.btn--large` |
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## 5. CSS 작성 — 시스템 우회 금지 (R-02 · R-05 · R-07 · R-08)
|
|
169
|
+
|
|
170
|
+
### ❌ 금지
|
|
171
|
+
|
|
172
|
+
```css
|
|
173
|
+
/* !important — 토큰 시스템 우회 */
|
|
174
|
+
.btn { background: var(--color-primary) !important; }
|
|
175
|
+
|
|
176
|
+
/* @apply 안에서 커스텀 클래스 사용 */
|
|
177
|
+
.my-btn { @apply text-primary bg-primary-light; } /* primary-light가 토큰명이면 OK, 임의 클래스면 NG */
|
|
178
|
+
|
|
179
|
+
/* SCSS 문법 */
|
|
180
|
+
.btn {
|
|
181
|
+
&--primary { ... }
|
|
182
|
+
&__icon { ... }
|
|
183
|
+
}
|
|
184
|
+
@use 'breakpoints';
|
|
185
|
+
@forward 'tokens';
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### ✅ 허용
|
|
189
|
+
|
|
190
|
+
```css
|
|
191
|
+
/* !important 정당화: 외부 라이브러리 오버라이드만, 사유 주석 필수 */
|
|
192
|
+
.tabulator-cell {
|
|
193
|
+
/* tabulator 인라인 스타일 오버라이드 — 라이브러리 한계 */
|
|
194
|
+
padding: 2rem !important;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* BEM 평면 작성 또는 표준 CSS nesting 사용 (SCSS 문법은 사용하지 않음) */
|
|
198
|
+
.btn--primary { ... }
|
|
199
|
+
.btn__icon { ... }
|
|
200
|
+
|
|
201
|
+
/* CSS @import만 사용 */
|
|
202
|
+
@import "tailwindcss";
|
|
203
|
+
@import "../../tokens/build/tokens.css";
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## 6. HTML 시맨틱 — div onclick 금지 (R-10)
|
|
209
|
+
|
|
210
|
+
### ❌ 금지
|
|
211
|
+
|
|
212
|
+
```html
|
|
213
|
+
<div onclick="open()" class="cursor-pointer">메뉴 열기</div>
|
|
214
|
+
<span onClick={handler}>버튼처럼 보이는 span</span>
|
|
215
|
+
<a href="javascript:void(0)" onclick="...">앵커 남용</a>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### ✅ 허용
|
|
219
|
+
|
|
220
|
+
```html
|
|
221
|
+
<button type="button" onclick="open()">메뉴 열기</button>
|
|
222
|
+
<a href="/menu">메뉴 페이지</a>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### 이유 없는 wrapper 금지 (적용 원칙 7 · `html-semantics.md` § 6.6)
|
|
226
|
+
|
|
227
|
+
자식 하나를 감싸기만 하는 `<div>`, 역할이 겹치는 연속 래핑은 두지 않는다. 대상 요소에 직접 클래스를 주거나 시맨틱 요소를 쓴다.
|
|
228
|
+
|
|
229
|
+
#### ❌ 금지
|
|
230
|
+
|
|
231
|
+
```html
|
|
232
|
+
<div class="visual-panel__logo"><img src="logo.png" alt="로고" /></div> <!-- img 하나만 감쌈 -->
|
|
233
|
+
<div class="diagnosis-steps"><ol class="step-indicator">...</ol></div> <!-- ol 하나만 감쌈 -->
|
|
234
|
+
<div class="wrap"><div class="inner"><p>텍스트</p></div></div> <!-- 역할 겹치는 연속 래핑 -->
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
#### ✅ 허용
|
|
238
|
+
|
|
239
|
+
```html
|
|
240
|
+
<img src="logo.png" alt="로고" class="visual-panel__logo" />
|
|
241
|
+
<ol class="step-indicator" aria-label="진행 단계">...</ol>
|
|
242
|
+
<p class="wrap">텍스트</p>
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
판별: "이 `<div>`를 지우면 레이아웃·의미·접근성 중 뭐가 깨지나? 안 깨지면 제거." 단 `.container`·flex/grid 부모·스크롤 래퍼(`.table-wrap`)·`role` 그룹은 이유 있는 컨테이너이므로 유지한다.
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## 7. 접근성 — 누락 금지 (R-09 · R-11 · R-12 · R-13 · R-14)
|
|
250
|
+
|
|
251
|
+
### ❌ 금지
|
|
252
|
+
|
|
253
|
+
```html
|
|
254
|
+
<img src="/logo.svg"> <!-- alt 누락 -->
|
|
255
|
+
<input type="text" placeholder="이름"> <!-- label 누락, placeholder만 -->
|
|
256
|
+
<button onclick="...">×</button> <!-- aria-label 누락 (아이콘만) -->
|
|
257
|
+
.btn:focus { outline: none; } <!-- focus 제거 -->
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### ✅ 허용
|
|
261
|
+
|
|
262
|
+
```html
|
|
263
|
+
<img src="/logo.svg" alt="기관명">
|
|
264
|
+
<label for="name">이름</label>
|
|
265
|
+
<input type="text" id="name" placeholder="홍길동">
|
|
266
|
+
<button onclick="..." aria-label="닫기">×</button>
|
|
267
|
+
/* :focus { outline: none } 자체가 금지. focus-visible은 reset.css 전역 처리됨 */
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## 8. 컴포넌트 — 카탈로그 외 임의 생성 금지 (R-15 카탈로그 정합)
|
|
273
|
+
|
|
274
|
+
`references/krds-components.md`에 없는 컴포넌트가 필요해 보이면:
|
|
275
|
+
|
|
276
|
+
### ❌ 금지
|
|
277
|
+
|
|
278
|
+
```css
|
|
279
|
+
/* 카탈로그에 없는 컴포넌트를 그냥 새로 만들기 */
|
|
280
|
+
.my-fancy-card { ... }
|
|
281
|
+
.custom-button { ... }
|
|
282
|
+
.dropdown-menu { ... }
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### ✅ 절차
|
|
286
|
+
|
|
287
|
+
1. 작성 중단
|
|
288
|
+
2. 사용자에게 보고
|
|
289
|
+
3. (a) 기존 컴포넌트 조합으로 구현 가능한가? — 우선 시도
|
|
290
|
+
4. (b) 정말 새 컴포넌트가 필요하면 — UX팀에 신규 컴포넌트 제안 (사용자 명시 지시받고 일회성 인라인 구현, 주석에 `TODO: UX팀 정식 컴포넌트화 필요`)
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## 9. 빌드 시스템 — SCSS 사용 금지 (R-03)
|
|
295
|
+
|
|
296
|
+
이 가이드는 **Tailwind v4 + 순수 CSS** 기반이다. SCSS는 폐기됨.
|
|
297
|
+
|
|
298
|
+
### ❌ 금지
|
|
299
|
+
|
|
300
|
+
- `*.scss` 파일 작성
|
|
301
|
+
- `@use 'module' as alias`
|
|
302
|
+
- `@forward 'module'`
|
|
303
|
+
- SCSS 변수 (`$color: red`)
|
|
304
|
+
- SCSS 네스팅 (Tailwind v4는 native CSS 네스팅 지원하지만, 권장은 평면 BEM)
|
|
305
|
+
|
|
306
|
+
### ✅ 허용
|
|
307
|
+
|
|
308
|
+
- `*.css` (Tailwind v4 + native CSS)
|
|
309
|
+
- `@import "..."` (CSS native)
|
|
310
|
+
- `@theme { ... }` (Tailwind v4 토큰 정의)
|
|
311
|
+
- `@apply` (Tailwind v4 component layer)
|
|
312
|
+
- `@layer base, components, utilities` (Tailwind v4 cascade layer)
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## 10. HTML 구조 위반 (R-15 / R-16 / R-17 / R-18)
|
|
317
|
+
|
|
318
|
+
> 단일 소스: `references/html-semantics.md` (28개 컴포넌트의 Root 태그·자식 시맨틱·필수 ARIA·키보드 매핑)
|
|
319
|
+
|
|
320
|
+
### 10.1 컴포넌트 root 태그 불일치 (R-15)
|
|
321
|
+
|
|
322
|
+
KRDS 컴포넌트는 시맨틱 의미가 정해져 있다. BEM Block 클래스를 다른 root 태그에 붙이면 검색·접근성·SEO 일관성이 깨진다.
|
|
323
|
+
|
|
324
|
+
#### ❌ 금지
|
|
325
|
+
|
|
326
|
+
```html
|
|
327
|
+
<div class="card">...</div>
|
|
328
|
+
<div class="modal">...</div>
|
|
329
|
+
<div class="breadcrumb">...</div>
|
|
330
|
+
<div class="main-menu">...</div>
|
|
331
|
+
<div class="pagination">...</div>
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
#### ✅ 허용
|
|
335
|
+
|
|
336
|
+
```html
|
|
337
|
+
<article class="card">...</article>
|
|
338
|
+
<dialog class="modal">...</dialog>
|
|
339
|
+
<nav class="breadcrumb" aria-label="페이지 경로"><ol>...</ol></nav>
|
|
340
|
+
<nav class="main-menu" aria-label="주 메뉴"><ul>...</ul></nav>
|
|
341
|
+
<nav class="pagination" aria-label="페이지 내비게이션"><ol>...</ol></nav>
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
전체 28종 매핑은 `references/html-semantics.md` 참조.
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
### 10.2 인터랙티브 위젯 ARIA 누락 (R-16)
|
|
349
|
+
|
|
350
|
+
modal / tab / accordion / tooltip / disclosure / carousel / calendar는 ARIA 없이 작동하지 않는다.
|
|
351
|
+
|
|
352
|
+
#### ❌ 금지
|
|
353
|
+
|
|
354
|
+
```html
|
|
355
|
+
<!-- modal: aria-modal, aria-labelledby 누락 -->
|
|
356
|
+
<div role="dialog" class="modal">...</div>
|
|
357
|
+
|
|
358
|
+
<!-- disclosure: aria-expanded, aria-controls 누락 -->
|
|
359
|
+
<button class="disclosure">자세히</button>
|
|
360
|
+
<div class="disclosure__panel">...</div>
|
|
361
|
+
|
|
362
|
+
<!-- tab: role/aria-selected/aria-controls 누락 -->
|
|
363
|
+
<button class="tab__item">탭1</button>
|
|
364
|
+
<div class="tab__panel">...</div>
|
|
365
|
+
|
|
366
|
+
<!-- tooltip: aria-describedby 누락 -->
|
|
367
|
+
<button class="tooltip-trigger">?</button>
|
|
368
|
+
<div class="tooltip">설명</div>
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
#### ✅ 허용
|
|
372
|
+
|
|
373
|
+
```html
|
|
374
|
+
<div role="dialog" aria-modal="true" aria-labelledby="modal-title" class="modal">
|
|
375
|
+
<h2 id="modal-title">제목</h2>
|
|
376
|
+
</div>
|
|
377
|
+
|
|
378
|
+
<button class="disclosure" aria-expanded="false" aria-controls="more">자세히</button>
|
|
379
|
+
<div id="more" class="disclosure__panel" hidden>...</div>
|
|
380
|
+
|
|
381
|
+
<button role="tab" id="tab-1" aria-selected="true" aria-controls="panel-1" class="tab__item">탭1</button>
|
|
382
|
+
<div id="panel-1" role="tabpanel" aria-labelledby="tab-1" class="tab__panel">...</div>
|
|
383
|
+
|
|
384
|
+
<button class="tooltip-trigger" aria-describedby="tip-1">?</button>
|
|
385
|
+
<div id="tip-1" role="tooltip" class="tooltip">설명</div>
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
### 10.3 비-BEM 상태 클래스 (R-17)
|
|
391
|
+
|
|
392
|
+
상태는 BEM modifier(시각) + ARIA 속성(의미)으로만 표현한다. `.is-*`, `.has-*` 같은 비-BEM 상태 클래스는 어느 컴포넌트의 상태인지 모호하다.
|
|
393
|
+
|
|
394
|
+
#### ❌ 금지
|
|
395
|
+
|
|
396
|
+
```html
|
|
397
|
+
<button class="btn is-disabled">
|
|
398
|
+
<div class="modal is-open">
|
|
399
|
+
<input class="input has-error">
|
|
400
|
+
<li class="tab__item is-active">
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
#### ✅ 허용
|
|
404
|
+
|
|
405
|
+
```html
|
|
406
|
+
<button class="btn" disabled aria-disabled="true">
|
|
407
|
+
<div class="modal modal--open" aria-modal="true">
|
|
408
|
+
<input class="input input--error" aria-invalid="true">
|
|
409
|
+
<li role="tab" class="tab__item tab__item--selected" aria-selected="true">
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
### 10.4 시각적 단어 modifier (R-18)
|
|
415
|
+
|
|
416
|
+
modifier 이름은 의미를 담아야 한다. 색·크기를 직접 명시한 이름은 디자인 변경 시 클래스명도 같이 바꿔야 하는 부채를 만든다.
|
|
417
|
+
|
|
418
|
+
#### ❌ 금지 — 시각적 단어 사전
|
|
419
|
+
|
|
420
|
+
`--big` · `--small` · `--large` · `--xl` · `--xxl` · `--red` · `--blue` · `--green` · `--yellow` · `--rounded` · `--shadow` · `--bold` · `--italic`
|
|
421
|
+
|
|
422
|
+
```html
|
|
423
|
+
<button class="btn btn--blue">
|
|
424
|
+
<div class="card card--big">
|
|
425
|
+
<span class="tag tag--rounded">
|
|
426
|
+
<button class="btn btn--red">
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
#### ✅ 허용 — KRDS 정의 어휘만
|
|
430
|
+
|
|
431
|
+
| 카테고리 | 허용 단어 |
|
|
432
|
+
|---------|---------|
|
|
433
|
+
| Variant | `--primary`, `--secondary`, `--tertiary`, `--text`, `--ghost` |
|
|
434
|
+
| 사이즈 (KRDS 스케일) | `--xsmall`, `--small`, `--medium`, `--large`, `--xlarge` |
|
|
435
|
+
| 상태 | `--selected`, `--disabled`, `--expanded`, `--loading`, `--error`, `--success`, `--current`, `--done`, `--todo` |
|
|
436
|
+
| 톤 | `--info`, `--success`, `--warning`, `--danger`, `--inverse` |
|
|
437
|
+
| 레이아웃 | `--horizontal`, `--vertical`, `--block`, `--inline` |
|
|
438
|
+
|
|
439
|
+
```html
|
|
440
|
+
<button class="btn btn--primary">
|
|
441
|
+
<div class="card card--large">
|
|
442
|
+
<span class="tag tag--info">
|
|
443
|
+
<button class="btn btn--danger">
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## 위반 발견 시 보고 형식
|
|
449
|
+
|
|
450
|
+
```
|
|
451
|
+
[info-design 컨트랙트 위반 감지]
|
|
452
|
+
|
|
453
|
+
위반 항목: [위 1~9 중 어느 카테고리]
|
|
454
|
+
구체 내용: [어느 줄에서 무엇을]
|
|
455
|
+
근거: [이 문서의 어느 항목]
|
|
456
|
+
|
|
457
|
+
옵션:
|
|
458
|
+
1. 토큰으로 교체 — [구체적 토큰명 제시]
|
|
459
|
+
2. 사용자 확인 필요 — [모호한 부분 설명]
|
|
460
|
+
|
|
461
|
+
작성을 일시 중단합니다. 어떻게 진행할까요?
|
|
462
|
+
```
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# 개발팀 레포에 infoUX 기준 붙이기
|
|
2
|
+
|
|
3
|
+
이 문서는 **UX팀이 개발팀·협력사 환경에 infoUX 기준을 배포하는 방법**과 **개발자가 활성화하는 방법**을 다룬다.
|
|
4
|
+
|
|
5
|
+
2026-07-29 스킬 배포 방식을 폐기했다. 스킬은 Claude Code 전용인 데다 각자 `~/.claude/skills/`로 복사해야 해서, 도구가 다른 팀원은 받을 수 없고 복사본은 금세 낡았다. **지금은 MCP 하나로 배포한다.**
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. 개발자 — 등록
|
|
10
|
+
|
|
11
|
+
한 번만 하면 된다. 이후 발화는 필요 없다.
|
|
12
|
+
|
|
13
|
+
### Claude Code
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
claude mcp add infoux -- npx -y @infomind-ux/infoux-mcp
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Codex
|
|
20
|
+
|
|
21
|
+
`~/.codex/config.toml`
|
|
22
|
+
|
|
23
|
+
```toml
|
|
24
|
+
[mcp_servers.infoux]
|
|
25
|
+
command = "npx"
|
|
26
|
+
args = ["-y", "@infomind-ux/infoux-mcp"]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Cursor · Claude Desktop
|
|
30
|
+
|
|
31
|
+
설정의 `mcpServers`에 추가한다.
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"mcpServers": {
|
|
36
|
+
"infoux": {
|
|
37
|
+
"command": "npx",
|
|
38
|
+
"args": ["-y", "@infomind-ux/infoux-mcp"]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 프로젝트 단위로 붙이기
|
|
45
|
+
|
|
46
|
+
저장소를 clone한 팀원 전체에게 걸리게 하려면 프로젝트 루트에 `.mcp.json`을 둔다.
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"infoux": {
|
|
52
|
+
"command": "npx",
|
|
53
|
+
"args": ["-y", "@infomind-ux/infoux-mcp"]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 2. 확인
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npx -y @infomind-ux/infoux-mcp
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`infoUX MCP 준비됨 — 빌드 <sha>, 도구 8종`이 stderr로 뜨면 정상이다.
|
|
68
|
+
|
|
69
|
+
AI에게 "infoUX 규칙 R-12가 뭐야" 또는 "버튼 컴포넌트 마크업 줘"라고 물어 답이 나오면 연결된 것이다.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 3. UX팀 — 기준 갱신
|
|
74
|
+
|
|
75
|
+
원본(`rules.json`, `references/`, `src/snippets/`, `tokens/`)을 고친 뒤:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm run build # build:references → build:mcp 포함
|
|
79
|
+
npm test # 검사·린트·단위·접근성
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`mcp/data/`는 생성물이므로 직접 수정하지 않는다. 커밋하면 팀원은 재설치 없이 다음 실행부터 최신 기준을 받는다(`npx -y`가 최신 버전을 가져온다).
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 4. 사람이 여전히 판단할 것
|
|
87
|
+
|
|
88
|
+
MCP는 규칙 준수를 자동화할 뿐 설계 판단을 대신하지 않는다.
|
|
89
|
+
|
|
90
|
+
- 새 컴포넌트가 정말 필요한지 — 기존 패턴으로 해결 가능한지 UX팀 판단
|
|
91
|
+
- 토큰·색상 변경 — UX팀 요청
|
|
92
|
+
- PR 리뷰에서 사용성과 비즈니스 의도
|
|
93
|
+
- 개발팀 소유 코드의 스타일 이슈는 UX팀에 요청하는 것이 기본값이다
|