web-stylebook-mcp 0.11.1 → 0.12.1

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 (113) hide show
  1. package/README.ko.md +93 -21
  2. package/README.md +87 -24
  3. package/dist/audit/planner.d.ts +10 -2
  4. package/dist/audit/planner.js +30 -5
  5. package/dist/audit/planner.js.map +1 -1
  6. package/dist/catalog/repository.js +0 -3
  7. package/dist/catalog/repository.js.map +1 -1
  8. package/dist/catalog/validate.js +4 -3
  9. package/dist/catalog/validate.js.map +1 -1
  10. package/dist/protocol/errors.d.ts +0 -2
  11. package/dist/protocol/errors.js +0 -2
  12. package/dist/protocol/errors.js.map +1 -1
  13. package/dist/protocol/register-prompts.js +4 -6
  14. package/dist/protocol/register-prompts.js.map +1 -1
  15. package/dist/protocol/register-resources.js +9 -6
  16. package/dist/protocol/register-resources.js.map +1 -1
  17. package/dist/protocol/register-tools.js +71 -17
  18. package/dist/protocol/register-tools.js.map +1 -1
  19. package/dist/recommendation/compare.js +0 -4
  20. package/dist/recommendation/compare.js.map +1 -1
  21. package/dist/recommendation/explain.js +1 -4
  22. package/dist/recommendation/explain.js.map +1 -1
  23. package/dist/recommendation/index.d.ts +1 -1
  24. package/dist/recommendation/index.js +8 -1
  25. package/dist/recommendation/index.js.map +1 -1
  26. package/dist/recommendation/lexicon.d.ts +7 -0
  27. package/dist/recommendation/lexicon.js +124 -0
  28. package/dist/recommendation/lexicon.js.map +1 -0
  29. package/dist/recommendation/normalize-context.js +21 -25
  30. package/dist/recommendation/normalize-context.js.map +1 -1
  31. package/dist/recommendation/rank-reason.d.ts +2 -0
  32. package/dist/recommendation/rank-reason.js +189 -0
  33. package/dist/recommendation/rank-reason.js.map +1 -0
  34. package/dist/recommendation/scoring.d.ts +3 -2
  35. package/dist/recommendation/scoring.js +184 -106
  36. package/dist/recommendation/scoring.js.map +1 -1
  37. package/dist/recommendation/types.d.ts +62 -3
  38. package/dist/recommendation/types.js +0 -1
  39. package/dist/recommendation/types.js.map +1 -1
  40. package/dist/server-info.d.ts +2 -2
  41. package/dist/server-info.js +3 -2
  42. package/dist/server-info.js.map +1 -1
  43. package/dist/state-atlas/planner.js +0 -5
  44. package/dist/state-atlas/planner.js.map +1 -1
  45. package/dist/structure/audit.d.ts +122 -0
  46. package/dist/structure/audit.js +332 -0
  47. package/dist/structure/audit.js.map +1 -0
  48. package/dist/structure/checks.d.ts +15 -0
  49. package/dist/structure/checks.js +51 -0
  50. package/dist/structure/checks.js.map +1 -0
  51. package/dist/structure/detect.d.ts +31 -0
  52. package/dist/structure/detect.js +762 -0
  53. package/dist/structure/detect.js.map +1 -0
  54. package/dist/structure/dom/cascade.d.ts +54 -0
  55. package/dist/structure/dom/cascade.js +351 -0
  56. package/dist/structure/dom/cascade.js.map +1 -0
  57. package/dist/structure/dom/css.d.ts +20 -0
  58. package/dist/structure/dom/css.js +252 -0
  59. package/dist/structure/dom/css.js.map +1 -0
  60. package/dist/structure/dom/html.d.ts +57 -0
  61. package/dist/structure/dom/html.js +379 -0
  62. package/dist/structure/dom/html.js.map +1 -0
  63. package/dist/structure/dom/page.d.ts +59 -0
  64. package/dist/structure/dom/page.js +413 -0
  65. package/dist/structure/dom/page.js.map +1 -0
  66. package/dist/structure/dom/selector.d.ts +66 -0
  67. package/dist/structure/dom/selector.js +431 -0
  68. package/dist/structure/dom/selector.js.map +1 -0
  69. package/dist/structure/dom/tailwind.d.ts +11 -0
  70. package/dist/structure/dom/tailwind.js +364 -0
  71. package/dist/structure/dom/tailwind.js.map +1 -0
  72. package/dist/structure/dom/values.d.ts +47 -0
  73. package/dist/structure/dom/values.js +375 -0
  74. package/dist/structure/dom/values.js.map +1 -0
  75. package/dist/structure/guidance.d.ts +130 -0
  76. package/dist/structure/guidance.js +136 -0
  77. package/dist/structure/guidance.js.map +1 -0
  78. package/dist/structure/guides/fusions.d.ts +2 -0
  79. package/dist/structure/guides/fusions.js +748 -0
  80. package/dist/structure/guides/fusions.js.map +1 -0
  81. package/dist/structure/guides/index.d.ts +1 -0
  82. package/dist/structure/guides/index.js +4 -0
  83. package/dist/structure/guides/index.js.map +1 -0
  84. package/dist/structure/guides/styles.d.ts +2 -0
  85. package/dist/structure/guides/styles.js +1503 -0
  86. package/dist/structure/guides/styles.js.map +1 -0
  87. package/dist/structure/patterns.d.ts +40 -0
  88. package/dist/structure/patterns.js +468 -0
  89. package/dist/structure/patterns.js.map +1 -0
  90. package/dist/structure/rules.d.ts +17 -0
  91. package/dist/structure/rules.js +574 -0
  92. package/dist/structure/rules.js.map +1 -0
  93. package/dist/structure/similarity.d.ts +11 -0
  94. package/dist/structure/similarity.js +62 -0
  95. package/dist/structure/similarity.js.map +1 -0
  96. package/dist/structure/types.d.ts +146 -0
  97. package/dist/structure/types.js +35 -0
  98. package/dist/structure/types.js.map +1 -0
  99. package/dist/structure/validate.d.ts +15 -0
  100. package/dist/structure/validate.js +295 -0
  101. package/dist/structure/validate.js.map +1 -0
  102. package/dist/tokens/compile.d.ts +6 -1
  103. package/dist/tokens/compile.js +5 -10
  104. package/dist/tokens/compile.js.map +1 -1
  105. package/dist/tokens/contrast.js +0 -1
  106. package/dist/tokens/contrast.js.map +1 -1
  107. package/dist/tokens/visual.d.ts +2 -2
  108. package/dist/tokens/visual.js.map +1 -1
  109. package/dist/types.js.map +1 -1
  110. package/package.json +1 -1
  111. package/skill/AGENTS.md +9 -4
  112. package/skill/CLAUDE.md +9 -4
  113. package/skill/web-stylebook-design/SKILL.md +14 -4
package/README.ko.md CHANGED
@@ -30,6 +30,7 @@ API 키 없음. 모델 호출 없음. 네트워크 없음. 프로젝트 파일
30
30
  | **UX 근거** | "힉의 법칙에 따르면…"으로 논의 종료 | 근거 신뢰도(strong·contextual·contested)가 붙어 법칙으로 단정할 수 없는 점검 질문 |
31
31
  | **UI 상태** | 해피패스만, 빈/에러/로딩은 나중에 덧붙임 | 표면별 필수/권장/도메인 상태를 처음부터 |
32
32
  | **토큰** | 손으로 고른 hex, 대비는 거의 미확인 | 역할 기반 토큰 + WCAG 대비 경고 |
33
+ | **구조** | 토큰이 기본 템플릿(히어로 + 로고 + 카드 3장)의 색만 바꿈 | 방향마다 레이아웃 아키타입과 시그니처 무브, 그리고 빌드한 페이지에서 템플릿을 잡아내는 감사 |
33
34
  | **감사** | 요약만 보고 "좋아 보임" 판정 | 안정적인 검사 ID·심각도·필요 증거·미검증 상태를 갖춘 화면별 감사 계획 |
34
35
  | **결과** | 천편일률 AI UI | 에이전트가 근거로 삼아 구현하는 디자인 계약 |
35
36
 
@@ -51,51 +52,113 @@ API 키 없음. 모델 호출 없음. 네트워크 없음. 프로젝트 파일
51
52
  ```
52
53
 
53
54
  ```jsonc
54
- // ← 결과
55
+ // ← 결과 (일부만 표시)
55
56
  {
56
57
  "confidence": "high",
57
- "candidates": [ // 모두 0.91 동점 — 순서는 의미 없음
58
- { "styleId": "notion-style", "score": 0.91 },
59
- { "styleId": "platform-core", "score": 0.91 },
60
- { "styleId": "quiet-utility", "score": 0.91 },
61
- { "styleId": "runtime-signal", "score": 0.91 },
62
- { "styleId": "console-launch", "score": 0.91 }
58
+ "candidates": [
59
+ { "styleId": "quiet-utility", "score": 0.93 },
60
+ { "styleId": "runtime-signal", "score": 0.89 },
61
+ { "styleId": "notion-style", "score": 0.83 },
62
+ { "styleId": "console-launch", "score": 0.77 },
63
+ { "styleId": "platform-core", "score": 0.77 }
63
64
  ],
64
- "rejected": [
65
+ "ranking": {
66
+ "winner": "quiet-utility",
67
+ "runnerUp": "runtime-signal",
68
+ "gap": 0.04,
69
+ "tied": false,
70
+ "reasonCodes": ["USE_CASE_FIT", "LOWER_UPKEEP"],
71
+ "explanation": "quiet-utility — runtime-signal보다 0.04점 높음: bestFor 3개 중 3개가 operational-saas 대상 (runtime-signal: 3개 중 2개); daily 사용 기준 유지 부담이 낮음 (quiet-utility: 모션 low, 유지보수 low; runtime-signal: 모션 low, 유지보수 medium)."
72
+ },
73
+ "rejected": [ // 모두 29개, 3개만 표시
65
74
  { "styleId": "aurora-gradient", "reasonCodes": ["PRODUCT_NOT_IDEAL", "DAILY_USE_OVERSTIMULATION"] },
66
75
  { "styleId": "claymorphism", "reasonCodes": ["PRODUCT_NOT_IDEAL"] },
67
76
  { "styleId": "cyberpunk-glitch", "reasonCodes": ["EXPLICITLY_AVOIDED", "DAILY_USE_OVERSTIMULATION"] }
68
77
  ],
69
78
  "pairings": [
79
+ {
80
+ "styleId": "notion-style",
81
+ "pairWith": "quiet-utility",
82
+ "role": ["forms", "navigation", "repetitive surfaces"],
83
+ "rationale": "operational-saas용으로 짝지은 보조 스타일 — quiet-utility의 차분하고 반복적인 화면을 보완한다."
84
+ },
70
85
  {
71
86
  "styleId": "macos-liquid-glass",
72
- "pairWith": "notion-style",
87
+ "pairWith": "quiet-utility",
73
88
  "role": ["forms", "navigation", "repetitive surfaces"],
74
- "rationale": "operational-saas용으로 짝지은 보조 스타일 — notion-style의 차분하고 반복적인 화면을 보완한다."
89
+ "rationale": "operational-saas용으로 짝지은 보조 스타일 — quiet-utility의 차분하고 반복적인 화면을 보완한다."
75
90
  }
76
91
  ],
77
- "guidance": "후보는 점수화된 근거다 — 제품 맥락으로 직접 고르라. candidates[0]은 가장 강한 후보일 뿐 강제가 아니다. 상위 5개 후보가 동점이다 — 그 사이 순서는 의미가 없으니 각 후보의 differentiators와 제품 맥락으로 고르라."
92
+ "guidance": "후보는 점수화된 근거다 — 제품 맥락으로 직접 고르라. candidates[0]은 가장 강한 후보일 뿐 강제가 아니다."
78
93
  }
79
94
  ```
80
95
 
81
- 여기서 *하지 않는* 것에 주목하세요 — 정답 하나를 내세우지 않습니다. 다섯 방향이 0.91로 동점이고, 탈락한 스타일에는 사유 코드가 붙으며, 페어링은 강제가 아니라 제안입니다. 그 정직함이 핵심입니다. 서버는 근거를 주고, 결정은 에이전트가 합니다.
96
+ 여기서 달라진 점에 주목하세요 — 상위 후보가 뚜렷이 다른 점수(0.93, 0.89, 0.83)를 받고, `ranking`이 1위가 2위를 이긴 이유를 알려 줍니다. 이 예시에서는 `quiet-utility`의 `bestFor` 항목이 모두 운영 SaaS를 겨냥하고, 매일 쓰는 용도에 유지 부담이 더 낮습니다. 상위 두 방향의 점수가 정말 같으면 승자를 만들어 내지 않고 `ranking.tied`로 동점이라고 알립니다. 탈락한 스타일에는 사유 코드가 붙고, 페어링은 강제가 아니라 제안입니다. 서버는 근거를 주고, 결정은 에이전트가 합니다.
82
97
 
83
98
  그다음 고른 방향을 실제 토큰으로:
84
99
 
85
100
  ```jsonc
86
- // → compose_design_tokens(style: "notion-style", format: "css-variables", theme: "light")
101
+ // → compose_design_tokens(style: "quiet-utility", format: "css-variables", theme: "light")
87
102
  // WCAG 대비 경고 0건
88
103
  :root {
89
104
  --color-canvas: #ffffff;
90
- --color-text: #37352f;
91
- --color-accent: #2383e2;
92
- --color-border: #d3d3d1;
105
+ --color-text: #1f2328;
106
+ --color-accent: #526371;
107
+ --color-border: #cecfd0;
93
108
  /* … 역할 기반 색·타이포·간격·radius·모션·밀도 */
94
109
  }
95
110
  ```
96
111
 
97
112
  요청 한 번에 — 에이전트는 방향을 고르고, 무엇이 왜 탈락했는지 보고, WCAG를 통과하는 토큰까지 받았습니다. 코드 한 줄 생성하지 않고.
98
113
 
114
+ ## 토큰이 아니라 구조
115
+
116
+ 토큰은 페이지의 색만 바꿉니다. 그래서 모든 후보에 `structure`가 함께 붙습니다. 레이아웃 아키타입(히어로 구성, 그리드 리듬, 섹션 순서, 밀도, 타입 스케일 쓰는 법), 각자 맡는 역할이 적힌 시그니처 무브 2~3개, 그리고 페이지에 넣으면 안 되는 패턴입니다. `webstylebook://styles/{id}`에는 무브별 구현 단계와 금지 항목별 탐지 기준이 더 들어 있습니다. `compose_design_tokens`는 이 구조를 가리키는 참조(스타일 id, 리소스 URI, 무브 id)를 돌려주고 텍스트 출력에 히어로와 무브를 적습니다. 아키타입이 스타일의 표본 페이지와 다르면 `basis`가 `authored`이고, `departure`에 그 이유가 있습니다.
117
+
118
+ 빌드한 뒤에는 페이지의 HTML과 CSS를 `audit_page_structure`에 넘깁니다. 아래는 에이전트가 기본 SaaS 템플릿으로 만든 페이지([`generic-saas-tailwind.html`](https://github.com/seungdori/web-stylebook-mcp/blob/master/tests/fixtures/page-structure/generic-saas-tailwind.html))를 `quiet-utility` 기준으로 검사한 실제 출력입니다.
119
+
120
+ ```jsonc
121
+ // → audit_page_structure({ html, styleId: "quiet-utility", locale: "ko" })
122
+ // ← 구조 감사 결과 (일부)
123
+ {
124
+ "summary": { "clean": false, "findings": 8, "major": 6, "minor": 2, "notVerified": 0, "checked": 12 },
125
+ "findings": [
126
+ {
127
+ "patternId": "logo-strip",
128
+ "name": "로고 띠",
129
+ "severity": "major",
130
+ "locations": ["section#customers > div.mx-auto"],
131
+ "observed": { "logos": 5, "marquee": false, "muted": true },
132
+ "replaceWith": {
133
+ "instruction": "실제 고객을 밝힐 권한과 이유가 없다면 지우세요. 대신 방문자가 직접 확인할 수 있는 근거(실제 결과·결과물·이름이 있는 사례)를 이 스타일의 근거 무브로 보여 주세요.",
134
+ "moves": [
135
+ { "id": "hairline-gap-list", "name": "Gap-as-hairline state list", "purpose": "Triage: shows many resources and their current state at an even rhythm, with dividers that cannot drift out of alignment." },
136
+ { "id": "stepped-state-badges", "name": "Three-step state badges", "purpose": "Calm status: state reads through steps of weight and fill instead of traffic-light colors, so the one urgent item stands out." }
137
+ ]
138
+ }
139
+ },
140
+ {
141
+ "patternId": "generic-saas-skeleton",
142
+ "observed": { "sections": "opening → proof → features → testimonials → cta", "templateSections": 5 },
143
+ "replaceWith": {
144
+ "archetype": {
145
+ "sectionOrder": [
146
+ "Top bar: breadcrumb path on the left, search and one primary action on the right",
147
+ "The primary working list or table with its filter row",
148
+ "A detail or form panel for the selected item",
149
+ "Secondary panels such as activity, audit history, or settings for the same object",
150
+ "Empty, loading, and error states drawn in the same slots as the data"
151
+ ]
152
+ }
153
+ }
154
+ }
155
+ // 나머지 6개: centered-stack-hero, trusted-by-band, icon-feature-grid, testimonial-carousel, closing-cta-banner, quiet-utility/corner-radius
156
+ ]
157
+ }
158
+ ```
159
+
160
+ 발견 항목마다 위치, 관찰값, 그리고 그 자리에 대신 넣을 것을 알려 줍니다. 대신 넣을 것은 고른 스타일에서 같은 역할을 하는 시그니처 무브(로고 띠라면 근거 역할), 히어로 구성, 섹션 순서입니다. 다시 빌드하고 감사를 한 번 더 돌린 뒤, `get_design_audit_plan.includeGroups`에 `"structure"`를 넣고 돌려받은 `evidence`와 `results`를 `validate_design_audit_result`에 넘기세요. 뷰포트마다 다른 `targetId`로 감사하세요. 증거 id에 `targetId`가 들어가므로 여러 실행 결과를 함께 검증할 수 있습니다. 이 검사는 브라우저 렌더링이 아니라 제출한 HTML과 CSS에 대한 결정적 휴리스틱입니다. `clean`은 모든 검사가 실행되었고 이 패턴들을 찾지 못했다는 뜻이지, 디자인이 통과했다는 뜻이 아닙니다. 스타일별 지침(아키타입과 무브)은 카탈로그의 `layout`·`typography` 필드처럼 영어로 작성되어 있고, 패턴 이름과 안내 문장은 `locale`을 따릅니다.
161
+
99
162
  ## 에이전트가 이걸로 만든 결과물
100
163
 
101
164
  다른 브리프 — *"흩어진 고객 피드백(지원 티켓, 세일즈 콜, 앱 리뷰, 슬랙)을 하나의 우선순위 로드맵으로 정리해주는 B2B SaaS **Throughline**의 마케팅 랜딩."* 레이아웃도, 히어로도, 스타일도 지정하지 않았습니다. 동반 스킬을 따라 에이전트는 스톡 히어로로 도망치는 대신 **제품의 핵심 아이디어에서** 첫 화면을 구성했습니다 — 오른쪽 절반은 다른 사이트에 복붙할 수 있는 장식 카드가 아니라, 제품의 실제 메커니즘(피드백 소스가 모여 자동 랭킹된 로드맵이 되는)을 그린 맞춤 다이어그램입니다.
@@ -122,13 +185,16 @@ flowchart LR
122
185
  C --> K[search_design_references]
123
186
  C --> L[get_design_reference]
124
187
  C --> M[validate_design_audit_result]
125
- D & E & F & G & H & I & J & K & L -->|디자인 계약<br/>관찰 · 점수 · 사유<br/>배치 · 증거 · 토큰| A
188
+ C --> N[audit_page_structure]
189
+ D & E & F & G & H & I & J & K & L -->|디자인 계약<br/>관찰 · 점수 · 사유<br/>배치 · 증거 · 토큰 · 구조| A
190
+ A -->|빌드한 페이지 HTML · CSS| N
191
+ N -->|금지 패턴 · 대체 무브<br/>구조 검사용 증거| A
126
192
  A -->|대상 행렬 · 증거 참조<br/>검사/대상별 판정| M
127
193
  M -->|범위 · 정규화 판정<br/>plan/evidence/result hash| A
128
194
  A -->|근거로<br/>코드 작성| Z[당신의 UI]
129
195
  ```
130
196
 
131
- 에이전트가 제품을 설명하면, 서버가 큐레이션 카탈로그를 점수화해 구조화된 근거를 돌려줍니다. 검사 후 validator는 참조된 artifact를 직접 열거나 시각 품질을 판단하지 않고 결과 계약만 검증합니다. 코드는 생성하지 않고, 어떤 것도 기기를 벗어나지 않습니다.
197
+ 에이전트가 제품을 설명하면, 서버가 큐레이션 카탈로그를 점수화해 구조화된 근거를 돌려줍니다. 빌드한 뒤에는 에이전트가 페이지 마크업을 구조 감사에 넘깁니다. 구조 감사는 스스로 파일을 읽지 않습니다. 검사 후 validator는 참조된 artifact를 직접 열거나 시각 품질을 판단하지 않고 결과 계약만 검증합니다. 코드는 생성하지 않고, 어떤 것도 기기를 벗어나지 않습니다.
132
198
 
133
199
  ## 설치
134
200
 
@@ -209,7 +275,7 @@ MCP 설정에 추가:
209
275
 
210
276
  | 툴 | 받는 것 | 정직한 점 |
211
277
  |------|--------------|-----------------|
212
- | **`recommend_design_direction`** | 사유 코드가 붙은 점수화 스타일 후보, *이유*가 붙은 **탈락** 스타일, 보조 페어링, 신뢰도 | 최종 선택은 모델이 — 이건 근거 제공자입니다 |
278
+ | **`recommend_design_direction`** | 사유 코드가 붙은 점수화 스타일 후보, 1위가 2위를 이긴 이유(또는 동점)를 알리는 `ranking`, *이유*가 붙은 **탈락** 스타일, 보조 페어링, 신뢰도, 후보별 페이지 `structure` | 최종 선택은 모델이 — 이건 근거 제공자입니다 |
213
279
  | **`compare_design_directions`** | 2~4개 방향을 제품 적합성·반복 사용·밀도·신뢰·차별성·접근성 리스크·모션·유지보수로 비교 | 정답 하나를 선언하지 않습니다 |
214
280
  | **`search_design_references`** | 실제 디자인 레퍼런스를 텍스트·카테고리·태그로 제한 검색하고 간결한 다국어 관찰 결과 제공 | 스크린샷이나 브랜드 자산 복제가 아니라 출처가 붙은 연구 요약을 반환합니다 |
215
281
  | **`get_design_reference`** | 팔레트·레이아웃·인터랙션·모션 관찰, 정규화 토큰, 원본 리비전, 출처와 권리 고지를 포함한 레퍼런스 1건 | 원 사이트 카피·서체·스크린샷·시각 정체성의 권리는 각 권리자에게 있습니다 |
@@ -219,9 +285,12 @@ MCP 설정에 추가:
219
285
  | **`compose_design_tokens`** | 역할 기반 토큰을 `json` / `css-variables` / `tailwind` / `typescript`로 출력하며, 공통 시각 명세를 선택하면 스타일 원본과 편집값을 보존 | 명세에 작성된 색상 모드를 사용하며, 명시적으로 수락한 대비 수정만 적용합니다 |
220
286
  | **`get_design_audit_plan`** | 안정적인 검사 ID·심각도·적용 조건·필요 증거·수정 방향·사용자용 콘텐츠 검사·선택 원칙 검사·UI 상태 범위를 담은 다국어 감사 계획 | 프로젝트를 실제로 봤다고 가장하지 않으며, 증거가 없으면 `PASS`가 아니라 `NOT_VERIFIED`입니다 |
221
287
  | **`validate_design_audit_result`** | plan query·대상 행렬·지속 가능한 증거 참조·검사/대상별 판정을 검증하고 정규화 판정과 안정 hash를 반환 | 범위와 증거 정합성을 검증할 뿐 시각 품질을 판정하지 않으며, `valid: true`는 전체 디자인 통과가 아닙니다 |
288
+ | **`audit_page_structure`** | 넘겨받은 HTML·CSS에서 일반 금지 패턴과 스타일 전용 금지 항목을 찾아, 위치·관찰값·고른 스타일의 대체 무브와 함께 반환하고 `structure` 감사 그룹용 증거와 결과도 만듭니다 | 브라우저가 아니라 선언된 스타일로 판단하며, 결과가 깨끗해도 디자인 통과가 아닙니다 |
222
289
 
223
290
  **카탈로그:** 실제 디자인 레퍼런스 520 · 스타일 48 · 인터페이스 디자인 원칙 25 · UX 원칙 23 · 구조화 감사 검사 51 · 컴포넌트 20 · 표면 5 · UI 상태 레시피 57 · 모션 프로파일 29 · 제품 아키타입 14.
224
291
 
292
+ **구조:** 레이아웃 아키타입 48 · 시그니처 무브 144 · 일반 금지 패턴 9 · 탐지기 19종으로 만든 스타일 전용 금지 항목 142.
293
+
225
294
  레퍼런스 라이브러리는 [OpenDesign](https://opendesign.cc)의 완성도 높은 항목을 선별·수정한 데이터이며, 구조화 스펙은 [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)으로 제공됩니다. Web Stylebook은 원본 스크린샷과 브랜드 자산을 포함하지 않습니다. 원 사이트·브랜드·카피·서체·시각 정체성의 권리는 각 권리자에게 있으므로 사용 전 상세 항목의 출처와 권리 고지를 확인하세요.
226
295
 
227
296
  ## 웹사이트의 시각 명세 그대로 전달하기
@@ -272,6 +341,7 @@ webstylebook://states/surfaces · /states/{surface} · /states/{surface}/{state}
272
341
  webstylebook://products · /products/{id}
273
342
  webstylebook://references · /references/{id}
274
343
  webstylebook://policies/anti-patterns · /policies/verification · /policies/audit-checks
344
+ webstylebook://structure/banned-patterns
275
345
  ```
276
346
 
277
347
  스타일 상세에는 `locale`, `mode`, 기대하는 `revision`을 쿼리로 지정할 수 있습니다. 예: `webstylebook://styles/brutalist-grid?locale=ko&mode=light`. 선택한 언어와 모드 1개의 명세를 반환하며, 지원하지 않는 값·중복 인자·알 수 없는 쿼리 이름은 명확한 오류로 반환합니다.
@@ -304,7 +374,9 @@ webstylebook://policies/anti-patterns · /policies/verification · /policies/aud
304
374
  `validate_design_audit_result`는 plan을 다시 생성해 오래된 plan hash, 누락·중복 결과,
305
375
  끊어진 evidence reference, 다른 target의 evidence, 잘못된 region, 부당한
306
376
  `NOT_APPLICABLE`, 필수 증거가 없거나 실패 증거와 모순되는 `PASS`를 거부합니다. 누락된
307
- 결과는 숨기지 않고 `NOT_VERIFIED`로 구체화합니다. 재검증 가능한 비교를 위해 plan,
377
+ 결과는 숨기지 않고 `NOT_VERIFIED`로 구체화합니다. `includeGroups`에 `structure`를 넣고 `styleId`를 주면,
378
+ plan에 금지 패턴마다 자동 검사가 1개씩 붙습니다. `audit_page_structure`는 이 검사 id에 맞는 evidence와
379
+ results를 돌려주고, validator는 그대로 받습니다. 재검증 가능한 비교를 위해 plan,
308
380
  evidence bundle, 정규화된 result의 content-addressed hash도 반환합니다. 이 툴은 artifact를
309
381
  직접 열지 않으며 계약 유효성을 디자인 품질 점수로 바꾸지 않습니다.
310
382
 
@@ -378,7 +450,7 @@ enum, 개수, 런타임 계약을 검증하고, 이 명령은 두 저장소 사
378
450
  - **전송:** stdio (Model Context Protocol)
379
451
  - **클라이언트:** Codex CLI / IDE 확장 · Claude Code · Claude Desktop · Cursor · Windsurf, 그리고 모든 MCP 호환 클라이언트
380
452
 
381
- `contract`를 생략한 호출은 같은 토큰 형식과 라이트 모드 기본값을 유지합니다. 0.11.0부터 이 호출은 일반 소프트 섀도 대신 핀된 스타일의 작성 섀도를 내고, 에디토리얼·모노스페이스 스타일은 계열 글꼴 대신 작성된 글꼴을 냅니다. 색, 타입 스케일, 행간, 간격, 반지름, 모션, 밀도를 생략했을 때의 값은 이전 레거시 경로입니다. 명시한 밀도는 여전히 계열의 row·gutter보다 우선하고, CSS·테마 출력에 줄간격 토큰이 포함됩니다. 작성값 전체가 필요하면 `contract`를 넘깁니다. 공통 명세는 기존 도구에 추가한 옵션이므로 새 도구가 필요하지 않습니다.
453
+ 도구 입력은 새 선택값이 생긴 것 말고는 그대로이고, `structure`는 출력에 추가된 필드입니다. `structure` 그룹은 직접 지정할 때만 들어가므로, `includeGroups` 없이 요청한 plan의 검사 목록과 hash는 바뀌지 않습니다. `contract`를 생략한 호출은 같은 토큰 형식과 라이트 모드 기본값을 유지합니다. 0.11.0부터 이 호출은 일반 소프트 섀도 대신 핀된 스타일의 작성 섀도를 내고, 에디토리얼·모노스페이스 스타일은 계열 글꼴 대신 작성된 글꼴을 냅니다. 색, 타입 스케일, 행간, 간격, 반지름, 모션, 밀도를 생략했을 때의 값은 이전 레거시 경로입니다. 명시한 밀도는 여전히 계열의 row·gutter보다 우선하고, CSS·테마 출력에 줄간격 토큰이 포함됩니다. 작성값 전체가 필요하면 `contract`를 넘깁니다. 공통 명세는 기존 도구에 추가한 옵션이므로 새 도구가 필요하지 않습니다.
382
454
 
383
455
  ## 라이선스
384
456
 
package/README.md CHANGED
@@ -30,6 +30,7 @@ No API key. No model call. No network. No project filesystem access. **Determini
30
30
  | **UX evidence** | "Hick's Law says…" as a conversation-ender | Evidence-labeled prompts (`strong` / `contextual` / `contested`) you can't restate as law |
31
31
  | **UI states** | Happy path only; empty / error / loading bolted on later | Required / recommended / domain states up front, per surface |
32
32
  | **Tokens** | Hand-picked hexes, contrast rarely checked | Role-based tokens with WCAG contrast warnings |
33
+ | **Structure** | Tokens recolor the default hero + logos + 3 cards template | A layout archetype and signature moves per direction, and an audit that flags the template in the built page |
33
34
  | **Audit** | "Looks good" from a summary | Surface-aware checks with stable ids, severity, required evidence, and explicit unverified states |
34
35
  | **Result** | Generic AI UI | A defensible design contract the agent builds from |
35
36
 
@@ -50,50 +51,103 @@ No API key. No model call. No network. No project filesystem access. **Determini
50
51
  ```
51
52
 
52
53
  ```jsonc
53
- // ← result
54
+ // ← result (trimmed)
54
55
  {
55
56
  "confidence": "high",
56
- "candidates": [ // all tied at 0.91 — ordering is NOT meaningful
57
- { "styleId": "notion-style", "score": 0.91 },
58
- { "styleId": "platform-core", "score": 0.91 },
59
- { "styleId": "quiet-utility", "score": 0.91 },
60
- { "styleId": "runtime-signal", "score": 0.91 },
61
- { "styleId": "console-launch", "score": 0.91 }
57
+ "candidates": [
58
+ { "styleId": "quiet-utility", "score": 0.93 },
59
+ { "styleId": "runtime-signal", "score": 0.89 },
60
+ { "styleId": "notion-style", "score": 0.83 },
61
+ { "styleId": "console-launch", "score": 0.77 },
62
+ { "styleId": "platform-core", "score": 0.77 }
62
63
  ],
63
- "rejected": [
64
+ "ranking": {
65
+ "winner": "quiet-utility",
66
+ "runnerUp": "runtime-signal",
67
+ "gap": 0.04,
68
+ "tied": false,
69
+ "reasonCodes": ["USE_CASE_FIT", "LOWER_UPKEEP"],
70
+ "explanation": "quiet-utility outranks runtime-signal by 0.04: 3 of 3 bestFor entries aim at operational-saas (runtime-signal: 2 of 3); lighter upkeep for daily use (quiet-utility: motion low, maintenance low; runtime-signal: motion low, maintenance medium)."
71
+ },
72
+ "rejected": [ // 29 in total, three shown
64
73
  { "styleId": "aurora-gradient", "reasonCodes": ["PRODUCT_NOT_IDEAL", "DAILY_USE_OVERSTIMULATION"] },
65
74
  { "styleId": "claymorphism", "reasonCodes": ["PRODUCT_NOT_IDEAL"] },
66
75
  { "styleId": "cyberpunk-glitch", "reasonCodes": ["EXPLICITLY_AVOIDED", "DAILY_USE_OVERSTIMULATION"] }
67
76
  ],
68
77
  "pairings": [
69
- {
70
- "styleId": "macos-liquid-glass",
71
- "pairWith": "notion-style",
72
- "role": ["forms", "navigation", "repetitive surfaces"]
73
- }
78
+ { "styleId": "notion-style", "pairWith": "quiet-utility", "role": ["forms", "navigation", "repetitive surfaces"] },
79
+ { "styleId": "macos-liquid-glass", "pairWith": "quiet-utility", "role": ["forms", "navigation", "repetitive surfaces"] }
74
80
  ],
75
- "guidance": "Treat candidates as scored evidence; choose using product context. candidates[0] is the strongest match, not a mandate. 5 candidates are tied at the top score — the ordering among them is not meaningful; pick using their \"differentiators\" and your product context."
81
+ "guidance": "Treat candidates as scored evidence; choose using product context. candidates[0] is the strongest match, not a mandate."
76
82
  }
77
83
  ```
78
84
 
79
- Notice what it *doesn't* do: it doesn't pretend there's one winner. Five directions tie at 0.91, rejected styles come with reason codes, and pairings are suggestions rather than a mandate. That honesty is the point — the server provides evidence, the agent decides.
85
+ Notice what it does: the top candidates get clearly different scores (0.93, 0.89, 0.83), and `ranking` says why #1 beat #2 — here every `bestFor` entry of `quiet-utility` targets operational SaaS, and its upkeep is lighter for daily use. When the top two really do score alike, `ranking.tied` says so instead of inventing a winner. Rejected styles come with reason codes, and pairings are suggestions rather than a mandate. The server provides evidence; the agent decides.
80
86
 
81
87
  Then turn the chosen direction into real tokens:
82
88
 
83
89
  ```jsonc
84
- // → compose_design_tokens(style: "notion-style", format: "css-variables", theme: "light")
90
+ // → compose_design_tokens(style: "quiet-utility", format: "css-variables", theme: "light")
85
91
  // 0 WCAG contrast warnings
86
92
  :root {
87
93
  --color-canvas: #ffffff;
88
- --color-text: #37352f;
89
- --color-accent: #2383e2;
90
- --color-border: #d3d3d1;
94
+ --color-text: #1f2328;
95
+ --color-accent: #526371;
96
+ --color-border: #cecfd0;
91
97
  /* … role-based color, type, spacing, radius, motion, density */
92
98
  }
93
99
  ```
94
100
 
95
101
  One request in — and the agent chose a direction, saw what was rejected and why, and got tokens that pass WCAG, without generating a line of code.
96
102
 
103
+ ## Structure, not just tokens
104
+
105
+ Tokens only recolor a page, so every candidate also carries `structure`: a layout archetype (hero composition, grid rhythm, section order, density, and how the type scale is used), two or three signature moves with the job each one does, and the patterns the page must not ship. `webstylebook://styles/{id}` adds each move's build steps and each ban's detection criteria, and `compose_design_tokens` points back to it (style id, resource URI, and move ids) and prints the hero and moves in its text output. Where an archetype breaks from the style's specimen page, its `basis` is `authored` and `departure` says why.
106
+
107
+ After building, pass the page's HTML and CSS to `audit_page_structure`. This is its real output for a page an agent built from the default SaaS template ([`generic-saas-tailwind.html`](https://github.com/seungdori/web-stylebook-mcp/blob/master/tests/fixtures/page-structure/generic-saas-tailwind.html)), checked against `quiet-utility`:
108
+
109
+ ```jsonc
110
+ // → audit_page_structure({ html, styleId: "quiet-utility" })
111
+ // ← structure audit (trimmed)
112
+ {
113
+ "summary": { "clean": false, "findings": 8, "major": 6, "minor": 2, "notVerified": 0, "checked": 12 },
114
+ "findings": [
115
+ {
116
+ "patternId": "logo-strip",
117
+ "name": "Logo strip",
118
+ "severity": "major",
119
+ "locations": ["section#customers > div.mx-auto"],
120
+ "observed": { "logos": 5, "marquee": false, "muted": true },
121
+ "replaceWith": {
122
+ "instruction": "Remove it unless you have permission and a reason to name real customers; show proof a visitor can inspect instead (a real result, artifact, or named case) with this style's proof move.",
123
+ "moves": [
124
+ { "id": "hairline-gap-list", "name": "Gap-as-hairline state list", "purpose": "Triage: shows many resources and their current state at an even rhythm, with dividers that cannot drift out of alignment." },
125
+ { "id": "stepped-state-badges", "name": "Three-step state badges", "purpose": "Calm status: state reads through steps of weight and fill instead of traffic-light colors, so the one urgent item stands out." }
126
+ ]
127
+ }
128
+ },
129
+ {
130
+ "patternId": "generic-saas-skeleton",
131
+ "observed": { "sections": "opening → proof → features → testimonials → cta", "templateSections": 5 },
132
+ "replaceWith": {
133
+ "archetype": {
134
+ "sectionOrder": [
135
+ "Top bar: breadcrumb path on the left, search and one primary action on the right",
136
+ "The primary working list or table with its filter row",
137
+ "A detail or form panel for the selected item",
138
+ "Secondary panels such as activity, audit history, or settings for the same object",
139
+ "Empty, loading, and error states drawn in the same slots as the data"
140
+ ]
141
+ }
142
+ }
143
+ }
144
+ // 6 more: centered-stack-hero, trusted-by-band, icon-feature-grid, testimonial-carousel, closing-cta-banner, quiet-utility/corner-radius
145
+ ]
146
+ }
147
+ ```
148
+
149
+ Each finding names where the pattern is, what was observed, and what to put there instead: the chosen style's signature moves for the same job (proof, in the logo strip's case), its hero composition, or its section order. Rebuild, run the audit again, then add `"structure"` to `get_design_audit_plan.includeGroups` and pass the returned `evidence` and `results` to `validate_design_audit_result`. Audit each viewport with its own `targetId`: the evidence ids include it, so the runs validate together. The checks are deterministic heuristics over the submitted HTML and CSS, not a browser render, so `clean` means every check ran and found none of these patterns, not that the design passed. Per-style guidance (archetypes and moves) is written in English, like the catalog's own `layout` and `typography` fields; pattern names and instructions follow `locale`.
150
+
97
151
  ## What an agent builds with it
98
152
 
99
153
  A different brief — *"a marketing landing page for **Throughline**, a B2B SaaS that turns scattered customer feedback (support tickets, sales calls, app reviews, Slack) into one prioritized roadmap."* No layout, no hero, no styling was specified. Following the companion skill, the agent composed the opening **from the product's core idea** instead of reaching for a stock hero: the right half is a bespoke diagram of the product's actual mechanic — feedback sources converging into an auto-ranked roadmap — not a decorative card you could paste onto any other site.
@@ -120,13 +174,16 @@ flowchart LR
120
174
  C --> K[search_design_references]
121
175
  C --> L[get_design_reference]
122
176
  C --> M[validate_design_audit_result]
123
- D & E & F & G & H & I & J & K & L -->|design contracts<br/>observations · scores · reasons<br/>placement · evidence · tokens| A
177
+ C --> N[audit_page_structure]
178
+ D & E & F & G & H & I & J & K & L -->|design contracts<br/>observations · scores · reasons<br/>placement · evidence · tokens · structure| A
179
+ A -->|built page HTML · CSS| N
180
+ N -->|banned patterns · replacement moves<br/>evidence for the structure checks| A
124
181
  A -->|target matrix · evidence refs<br/>one verdict per check/target| M
125
182
  M -->|coverage · normalized verdicts<br/>plan/evidence/result hashes| A
126
183
  A -->|writes code<br/>from evidence| Z[Your UI]
127
184
  ```
128
185
 
129
- The agent describes the product; the server scores its curated catalog and returns structured evidence. After inspection, the validator checks the result contract without opening the referenced artifacts or judging visual quality. No code is generated and nothing leaves your machine.
186
+ The agent describes the product; the server scores its curated catalog and returns structured evidence. After building, the agent passes the page markup to the structure audit, which never reads files on its own. After inspection, the validator checks the result contract without opening the referenced artifacts or judging visual quality. No code is generated and nothing leaves your machine.
130
187
 
131
188
  ## Install
132
189
 
@@ -207,7 +264,7 @@ Add the same block to your `claude_desktop_config.json`, then restart:
207
264
 
208
265
  | Tool | What you get | The honest part |
209
266
  |------|--------------|-----------------|
210
- | **`recommend_design_direction`** | Scored style candidates with reason codes, **rejected** styles with *why*, secondary pairings, confidence | The model makes the final pick — this is the evidence provider |
267
+ | **`recommend_design_direction`** | Scored style candidates with reason codes, a `ranking` that says why #1 beat #2 (or reports a tie), **rejected** styles with *why*, secondary pairings, confidence, and each candidate's page `structure` | The model makes the final pick — this is the evidence provider |
211
268
  | **`compare_design_directions`** | 2–4 directions compared across product-fit, repeated-use, density, trust, distinctiveness, accessibility-risk, motion, maintenance | No single winner is declared |
212
269
  | **`search_design_references`** | Bounded search across real-world references by text, category, and tags, with concise localized observations | Returns attributed research summaries, not copied screenshots or brand assets |
213
270
  | **`get_design_reference`** | One complete localized reference with palette/layout/interaction/motion observations, normalized tokens, source revision, attribution, and rights notice | Original-site copy, typefaces, screenshots, and visual identity remain with their owners |
@@ -217,9 +274,12 @@ Add the same block to your `claude_desktop_config.json`, then restart:
217
274
  | **`compose_design_tokens`** | Role-based tokens as `json` / `css-variables` / `tailwind` / `typescript`; opt into the shared visual contract to preserve authored style values and editor changes | Contract mode uses authored color modes and applies only explicitly accepted contrast repairs |
218
275
  | **`get_design_audit_plan`** | Localized, surface-aware checks with stable ids, severity, applicability, required evidence, remediation, user-facing content checks, selected principle checks, and UI-state coverage | The tool plans the audit but never pretends it inspected your project; missing evidence is `NOT_VERIFIED`, not `PASS` |
219
276
  | **`validate_design_audit_result`** | Contract validation for the plan query, target matrix, durable evidence references, and one verdict per check/target, with normalized verdicts and stable hashes | It verifies coverage and evidence consistency, not visual quality; `valid: true` is never an overall design pass |
277
+ | **`audit_page_structure`** | Banned generic and style-specific patterns found in the HTML and CSS you pass in, each with its location, observed values, and the chosen style's replacement moves, plus evidence and results for the `structure` audit group | Declared-style heuristics, not a browser; a clean result is not a design pass |
220
278
 
221
279
  **Catalog:** 520 real-world design references · 48 styles · 25 interface design principles · 23 UX principles · 51 structured audit checks · 20 components · 5 surfaces · 57 UI-state recipes · 29 motion profiles · 14 product archetypes.
222
280
 
281
+ **Structure:** 48 layout archetypes · 144 signature moves · 9 banned generic patterns · 142 style-specific bans from 19 detectors.
282
+
223
283
  The reference library is an adapted, high-completeness subset of [OpenDesign](https://opendesign.cc), whose structured specifications are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Web Stylebook excludes upstream screenshots and brand assets. Original sites, brands, copy, typefaces, and visual identities remain the property of their respective owners; inspect each detail's attribution and rights notice before use.
224
284
 
225
285
  ## Preserve the website's visual specification
@@ -270,6 +330,7 @@ webstylebook://states/surfaces · /states/{surface} · /states/{surface}/{state}
270
330
  webstylebook://products · /products/{id}
271
331
  webstylebook://references · /references/{id}
272
332
  webstylebook://policies/anti-patterns · /policies/verification · /policies/audit-checks
333
+ webstylebook://structure/banned-patterns
273
334
  ```
274
335
 
275
336
  Style detail accepts optional `locale`, `mode`, and expected `revision` query parameters, for example `webstylebook://styles/brutalist-grid?locale=ko&mode=light`. It returns one resolved locale and mode; unsupported values, duplicate parameters, and unknown query names return an explicit error.
@@ -304,7 +365,9 @@ user-task value rather than banned as types.
304
365
  `validate_design_audit_result` regenerates the plan and rejects stale plan hashes, missing or duplicate
305
366
  result slots, broken evidence references, cross-target evidence, invalid regions, unsupported
306
367
  `NOT_APPLICABLE`, and `PASS` that lacks required evidence or contradicts failed evidence. Missing result
307
- slots are materialized as `NOT_VERIFIED`, never hidden. The result carries content-addressed plan,
368
+ slots are materialized as `NOT_VERIFIED`, never hidden. With `includeGroups` containing `structure` and a
369
+ `styleId`, the plan adds one automated check per banned pattern; `audit_page_structure` returns evidence and
370
+ results for those check ids that the validator accepts as they are. The result carries content-addressed plan,
308
371
  evidence-bundle, and normalized-result hashes for comparable rechecks. The tool never opens the
309
372
  artifact references and never turns contract validity into a design-quality score.
310
373
 
@@ -379,7 +442,7 @@ source check.
379
442
  - **Transport:** stdio (Model Context Protocol)
380
443
  - **Clients:** Codex CLI / IDE extension, Claude Code, Claude Desktop, Cursor, Windsurf, and any MCP-compatible client
381
444
 
382
- Calls without `contract` keep the same token shape and light-mode default. As of 0.11.0, those calls emit the pinned style's authored shadows instead of the generic soft shadow, and editorial or monospace-led styles emit authored font families instead of the style-family fonts. Color, type scale, line-height, spacing, radius, motion, and omitted density stay on the previous legacy path. An explicit `density` still takes precedence over a family's row and gutter, and CSS / theme output retains line-height tokens. Pass `contract` for the full authored specification. The shared contract is additive; no new tool is required.
445
+ Tool inputs are unchanged apart from new optional values, and `structure` is an added output field. Plans requested without `includeGroups` keep their checks and hash, because `structure` is opt-in. Calls without `contract` keep the same token shape and light-mode default. As of 0.11.0, those calls emit the pinned style's authored shadows instead of the generic soft shadow, and editorial or monospace-led styles emit authored font families instead of the style-family fonts. Color, type scale, line-height, spacing, radius, motion, and omitted density stay on the previous legacy path. An explicit `density` still takes precedence over a family's row and gutter, and CSS / theme output retains line-height tokens. Pass `contract` for the full authored specification. The shared contract is additive; no new tool is required.
383
446
 
384
447
  ## License
385
448
 
@@ -1,7 +1,9 @@
1
1
  import type { CatalogRepository } from '../catalog/repository.js';
2
2
  import type { AuditApplicability, AuditAutomationLevel, AuditCheckDefinition, AuditEvidenceType, AuditSeverity, Lang, UxPrinciple, UxSurface } from '../types.js';
3
- export declare const AUDIT_GROUP_IDS: readonly ["build", "layout", "fidelity", "content", "behavior", "principles", "docs", "anti-patterns"];
3
+ export declare const AUDIT_GROUP_IDS: readonly ["build", "layout", "fidelity", "content", "behavior", "principles", "docs", "anti-patterns", "structure"];
4
4
  export type AuditGroupId = (typeof AUDIT_GROUP_IDS)[number];
5
+ /** `structure` is opt-in so that plans requested without includeGroups keep their earlier checks and hash. */
6
+ export declare const DEFAULT_AUDIT_GROUP_IDS: readonly AuditGroupId[];
5
7
  export declare const AUDIT_VERDICTS: readonly ["PASS", "FIX_NOW", "RISK", "NOT_APPLICABLE", "NOT_VERIFIED"];
6
8
  export type AuditVerdict = (typeof AUDIT_VERDICTS)[number];
7
9
  export interface DesignAuditPlanInput {
@@ -26,7 +28,11 @@ export interface ResolvedAuditCheck {
26
28
  automation: AuditAutomationLevel;
27
29
  applicability: AuditApplicability;
28
30
  surfaceTags: UxSurface[];
29
- source: AuditCheckDefinition['source'];
31
+ source: AuditCheckDefinition['source'] | {
32
+ kind: 'structure';
33
+ patternId: string;
34
+ scope: 'global' | 'style';
35
+ };
30
36
  }
31
37
  interface PrincipleAuditContract {
32
38
  id: string;
@@ -88,6 +94,8 @@ export interface DesignAuditPlan {
88
94
  catalogChecks: number;
89
95
  includedChecks: number;
90
96
  excludedChecks: number;
97
+ /** Present only when the structure group is included; those checks come from the structure ruleset, not the catalog. */
98
+ structureChecks?: number;
91
99
  };
92
100
  resourceUris: string[];
93
101
  guidance: string[];
@@ -1,9 +1,12 @@
1
1
  import { text, texts } from '../localization.js';
2
2
  import { stableHashOf } from '../catalog/stable-hash.js';
3
3
  import { planUiStates } from '../state-atlas/planner.js';
4
+ import { structureChecks } from '../structure/checks.js';
4
5
  export const AUDIT_GROUP_IDS = [
5
- 'build', 'layout', 'fidelity', 'content', 'behavior', 'principles', 'docs', 'anti-patterns',
6
+ 'build', 'layout', 'fidelity', 'content', 'behavior', 'principles', 'docs', 'anti-patterns', 'structure',
6
7
  ];
8
+ /** `structure` is opt-in so that plans requested without includeGroups keep their earlier checks and hash. */
9
+ export const DEFAULT_AUDIT_GROUP_IDS = AUDIT_GROUP_IDS.filter((group) => group !== 'structure');
7
10
  export const AUDIT_VERDICTS = [
8
11
  'PASS', 'FIX_NOW', 'RISK', 'NOT_APPLICABLE', 'NOT_VERIFIED',
9
12
  ];
@@ -46,6 +49,7 @@ const labels = {
46
49
  'Report one verdict per check with evidence, exact location, and the smallest concrete fix for every FIX_NOW.',
47
50
  'Do not collapse subjective design judgment into a single numeric score.',
48
51
  ],
52
+ structureGuidance: "Structure checks are automated: run audit_page_structure on each target's rendered HTML and CSS with the same styleId, then submit its evidence and results for these check ids.",
49
53
  },
50
54
  ko: {
51
55
  verdicts: {
@@ -75,6 +79,7 @@ const labels = {
75
79
  '검사마다 증거와 정확한 위치를 붙이고, 모든 FIX_NOW에는 가장 작은 구체적 수정안을 적으세요.',
76
80
  '주관적 디자인 판단을 하나의 숫자 점수로 뭉개지 마세요.',
77
81
  ],
82
+ structureGuidance: '구조 검사는 자동입니다. 대상마다 렌더링한 HTML과 CSS로, 같은 styleId를 넘겨 audit_page_structure를 실행하세요. 그 evidence와 results를 이 검사 id로 제출하세요.',
78
83
  },
79
84
  ja: {
80
85
  verdicts: {
@@ -104,6 +109,7 @@ const labels = {
104
109
  '各検査に証拠と正確な場所を添え、すべてのFIX_NOWに最小の具体的修正を記録してください。',
105
110
  '主観的なデザイン判断を単一の数値スコアにまとめないでください。',
106
111
  ],
112
+ structureGuidance: '構造検査は自動です。対象ごとに描画したHTMLとCSSで、同じstyleIdを渡してaudit_page_structureを実行し、そのevidenceとresultsをこの検査idで提出してください。',
107
113
  },
108
114
  };
109
115
  function unique(values) {
@@ -163,7 +169,7 @@ function uxPrincipleContract(principle, locale) {
163
169
  export function planDesignAudit(input, repo) {
164
170
  const locale = input.locale ?? 'en';
165
171
  const surfaces = unique(input.surfaces?.length ? input.surfaces : ['global']).sort();
166
- const requestedGroups = unique(input.includeGroups?.length ? input.includeGroups : [...AUDIT_GROUP_IDS]);
172
+ const requestedGroups = unique(input.includeGroups?.length ? input.includeGroups : [...DEFAULT_AUDIT_GROUP_IDS]);
167
173
  const includeGroups = AUDIT_GROUP_IDS.filter((group) => requestedGroups.includes(group));
168
174
  const includeDocumentation = input.includeDocumentation ?? true;
169
175
  const designPrincipleIds = unique(input.designPrincipleIds ?? []).sort();
@@ -208,16 +214,34 @@ export function planDesignAudit(input, repo) {
208
214
  resourceUri: `webstylebook://states/${surfaceId}`,
209
215
  };
210
216
  });
211
- const checks = repo.policies.auditChecks
217
+ const catalogChecks = repo.policies.auditChecks
212
218
  .filter((check) => includeGroups.includes(groupOf(check)))
213
219
  .filter((check) => includeDocumentation || check.applicability !== 'workflow-only')
214
220
  .filter((check) => check.surfaceTags.includes('global')
215
221
  || check.surfaceTags.some((surface) => surfaces.includes(surface)))
216
222
  .map((check) => resolveCheck(check, locale, repo));
223
+ const withStructure = includeGroups.includes('structure');
224
+ const structure = withStructure
225
+ ? structureChecks(input.styleId, locale).map((check) => ({
226
+ id: check.id,
227
+ groupId: 'structure',
228
+ criterion: check.criterion,
229
+ why: check.why,
230
+ remediation: check.remediation,
231
+ severity: check.severity,
232
+ evidenceTypes: ['dom'],
233
+ automation: 'automated',
234
+ applicability: check.applicability,
235
+ surfaceTags: ['global'],
236
+ source: { kind: 'structure', patternId: check.patternId, scope: check.scope },
237
+ }))
238
+ : [];
239
+ const checks = [...catalogChecks, ...structure];
217
240
  const stateAtlasUnmappedSurfaces = surfaces
218
241
  .filter((surface) => surface !== 'global' && !repo.getSurface(surface));
219
242
  const resourceUris = unique([
220
243
  ...(input.styleId ? [`webstylebook://styles/${input.styleId}`] : []),
244
+ ...(withStructure ? ['webstylebook://structure/banned-patterns'] : []),
221
245
  ...designPrinciples.map((principle) => principle.resourceUri),
222
246
  ...uxPrinciples.map((principle) => principle.resourceUri),
223
247
  ...stateCoverage.map((surface) => surface.resourceUri),
@@ -249,10 +273,11 @@ export function planDesignAudit(input, repo) {
249
273
  coverage: {
250
274
  catalogChecks: repo.policies.auditChecks.length,
251
275
  includedChecks: checks.length,
252
- excludedChecks: repo.policies.auditChecks.length - checks.length,
276
+ excludedChecks: repo.policies.auditChecks.length - catalogChecks.length,
277
+ ...(withStructure ? { structureChecks: structure.length } : {}),
253
278
  },
254
279
  resourceUris,
255
- guidance: label.guidance,
280
+ guidance: withStructure ? [...label.guidance, label.structureGuidance] : label.guidance,
256
281
  };
257
282
  return {
258
283
  identity: {
@@ -1 +1 @@
1
- {"version":3,"file":"planner.js","sourceRoot":"","sources":["../../src/audit/planner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAazD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,eAAe;CACnF,CAAC;AAGX,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EA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 -1,6 +1,3 @@
1
- // Runtime catalog repository. Loads the committed catalog.v1.json (ADR-003: the
2
- // only thing the MCP runtime reads), verifies the schema id, and builds id indexes
3
- // once at startup. Per-request schema validation is NOT repeated (02 §7).
4
1
  import { readFileSync } from 'node:fs';
5
2
  import { fileURLToPath } from 'node:url';
6
3
  import { dirname, join } from 'node:path';