Web Design Studio — Agent Design Skill
You have access to the bundled design standard in ../../standard/ and optional MCP quality gates (web-standard-gates via ../../standard/scripts/mcp_gates.py).
1. Three Non-Negotiable Baselines
- Never decide direction on the user's behalf: Prioritize the current project's 1-sentence goal, boundary (
promovstool), and real core evidence ahead of generic checklists. For page track/profile, visual narrative (D7-pre: 2 distinct real-content directions showing desktop hero + first core evidence + mobile hero before styling), visual theme (data-theme/data-font), motion level (L0–L3), and technical form (defaultT0), present 2–4 opinionated candidates with a clear recommendation and wait for the user's choice before writing final HTML. - Never output AI-slop templates:
- Let alignment follow information focus and reading tasks (break mechanical all-left alignment with deliberate focal hierarchy, avoiding rigid layout quotas; see
../../standard/recipes/alignment-intent.md). - Avoid purple-blue decorative gradients, 3-column equal-size card walls, generic centered-hero + dual-button + badge formulas, mood imagery replacing concrete product evidence, and single-tier typography.
- Keep multi-column pacing at
641–960pxsplit views; fold cleanly at<= 640px, verifying diagrams/labels remain legible at390pxand200%text zoom. - Check task-scoped taste memory without cross-project leakage: run
python ../../standard/scripts/taste_log.py show --page-type <type> --active-only --jsonwhen inspecting past preferences, and ensure full glyph coverage when embedding project fonts or.woff2subsets.
- Let alignment follow information focus and reading tasks (break mechanical all-left alignment with deliberate focal hierarchy, avoiding rigid layout quotas; see
- Never copy source sites or invent facts: Extract design grammar only; never fabricate metrics, customer logos, or testimonials. Mark draft/placeholder slots clearly for user confirmation.
2. SOP v1.8 Phase Routing (Prioritize Goal, Boundary & Evidence First; Read Relevant Sections)
| Phase | Goal | Read First |
|---|---|---|
| P0 · 需求锁定 | Lock page track (A tool / B editorial / C brand), promo/tool boundary & 1-sentence goal before coding | ../../standard/sop/PAGE-PROFILES.md, ../../standard/templates/requirement-card.md, ../../standard/recipes/requirement-interview.md |
| P1 · 研究与方向 | Explore 2–3 distinct evidence-organization candidates first, then propose 2–4 theme/font/motion options + recommend 1 | ../../standard/styles/FONTS-AND-THEMES.md, ../../standard/styles/README.md, ../../standard/recipes/decision-matrix.md |
| P2 · 内容与素材 | Draft real copy before layout; justify every core image/diagram with concrete evidence & narrow-viewport crop check | ../../standard/materials/INDEX.md, ../../standard/recipes/image-assets.md |
| P3 · 结构与规格 | Map sections by focal task, weight & mobile reflow + Two-Pass anti-default review | ../../standard/recipes/alignment-intent.md, ../../standard/recipes/layout-primitives.md, ../../standard/recipes/still-frame-gate.md |
| P4 · 实现与预览 | Explore real-content D7-pre variants (desktop hero + core evidence + mobile hero) in Compare Board before full build | ../../standard/templates/starters/README.md, ../../standard/components/INDEX.md, ../../standard/styles/themes.css |
| P5 · 动效与打磨 | Audit contrast, actual Chinese line measure (~64ch), dark/light harmony, and still-frame-gate.md A1–A8 / B1–B8 criteria | ../../standard/DESIGN-PHILOSOPHY.md, ../../standard/rules/anti-patterns.md, ../../standard/recipes/still-frame-gate.md |
| P6 · 机检与静帧验收 | Run MCP/CLI gates, fix every FAIL, and inspect reduced-motion full + 1× crop screenshots across key states | ../../standard/recipes/acceptance-gate.md, ../../standard/recipes/review-scorecard.md |
3. Baseline Design Tokens (../../standard/styles/themes.css)
Activate baselines via <html lang="zh-CN" data-theme="<theme>" data-font="<font>"> (customize per project when verified with check_font_coverage.py & readability tests):
- 8 OKLCH Themes (
data-theme):editorial-print(warm cotton paper + terracotta accent — editorial / docs / reading)precision-dark(cool obsidian surfaces + 1px specular top edge — developer tools / dark tech)glacial-acrylic(ice-blue tinted surfaces + frosted acrylic controls — modern portals / AI tools)swiss(crisp near-white + mathematical grid + ink contrast — versatile tools & portfolios)architectural-ma(plaster white + 2px sharp edges + zero shadow — galleries & luxury craft)cinematic(charcoal film tone + warm amber highlight — launches & visual storytelling)archival-brutal(0px radius + 0 shadow + 1px structural rules — indexes & experimental archives)tactile-craft(warm matte titanium + physical contact shadows — hardware & creative instruments)
- 4 Baseline Font Stacks (
data-font):f1(modern sans),f2(editorial serif + sans),f3(warm Kaiti / LXGW WenKai),f4(expressive display). Keep typography flexible to serve project content and verify actual glyph coverage and Chinese line length.
4. Golden T0 Starters (../../standard/templates/starters/)
- Track A (Tools):
track-a-tool.html,track-a-analytics.html - Track B (Editorial / Docs):
track-b-editorial.html,track-b-docs.html - Track C (Landing / Portfolio):
track-c-landing.html,track-c-portfolio.html,c-line-inspiration-lab.html - Composite Multi-Section:
composite-product-landing.html,composite-nested-demo.html
5. Automated Verification via MCP (web-standard-gates)
Prefer calling the registered MCP tools after implementing or editing HTML pages:
web_standard_lint_antipattern(target)— catches anti-template rules (P0–P3).web_standard_cdp_measure(target, strict=true)— zero-Playwright Chromium/Edge CDP check across1440 / 689 / 390viewports, CJK widow/orphan line wraps, font scale ratio, and equal-card-grid detection.web_standard_check_all(target, page_type="content"|"single"|"catalog"|"reading")— runs the 6-gate suite (acceptance,antipattern,markup,a11y,extreme-text,web-guidelines). Passcdp_only: trueifstandard/node_modulesor Playwright is not installed in the user's environment.web_standard_font_coverage(html_path)— verifies embedded.woff2font subsets cover 100% of CJK glyphs used in the HTML.web_standard_scale_budget(target, dpr=2.0, floor=1.0, strict=false)— verifies<img>intrinsic resolution meets2×Retina sharpness budget without blurry upscaling.
6. Visual Canvas Bridge via MCP (web-design-studio-canvas)
When working interactively with the user on layouts or aesthetic selection (D7-pre), use mcp_studio.py tools to drive the live Web Design Studio canvas:
studio_open(html_path, viewport="fit"|"1440"|"689"|"390"|"dual"|"overview", open_browser=true)— registers/focuses a page in Studio and switches viewport (includingoverviewfull-page scale view).studio_open_compare(html_paths, labels=..., open_browser=true)— opens 2–4 HTML variants side-by-side in the Compare Board with sync-scroll and one-click promote toindex.html.studio_get_pins(target)— reads unresolved DOM pins placed directly by the user on the live canvas (selector,comment,rect, computedstyles).studio_resolve_pins(target, pin_ids=...)— marks fixed DOM pins resolved.studio_export_single(target, out_path=...)— exports a zero-dependency inline T0 HTML file.
If MCP is unavailable, run the underlying scripts directly from ../../standard/:
python scripts/check_all.py <target> --cdp-only --json(zero Node/Playwright fallback)node scripts/cdp_measure.mjs <url> --strict