UI Design Optimizer
Goal
Produce a concrete, buildable UI output instead of generic design advice.
Inputs
- - Product/domain description (for example: SaaS dashboard, hiring tool, beauty SPA)
- Page type (landing page or dashboard)
- Preferred stack (HTML/CSS by default)
Data Sources
- - INLINECODE0
- INLINECODE1
- INLINECODE2
- INLINECODE3
- INLINECODE4
Required Workflow
- 1. Read relevant rows from style/color/typography data.
- Choose one style, one palette, and one typography pair with rationale.
- Output a compact design spec:
- layout pattern
- color tokens
- typography tokens
- interaction rules
- 4. If user asks for implementation, generate runnable files (at minimum
index.html + styles.css). - Return evidence with file paths and the selected dataset rows/slugs.
Quality Rules
- - Prioritize readability and accessibility (target WCAG AA contrast).
- Use consistent spacing, type scale, and component states.
- Avoid placeholder-only output when implementation is requested.
- Keep generated text UTF-8 clean (no mojibake).
Verification
When files are generated, verify:
- - files exist on disk;
- HTML references stylesheet correctly;
- selected style/palette/typography are reflected in CSS variables.
Script Helper
Use scripts/search.ps1 when quick lookup is useful:
CODEBLOCK0
UI 设计优化器
目标
生成具体、可构建的 UI 输出,而非泛泛的设计建议。
输入
- - 产品/领域描述(例如:SaaS 仪表盘、招聘工具、美容 SPA)
- 页面类型(落地页或仪表盘)
- 首选技术栈(默认 HTML/CSS)
数据源
- - data/styles.csv
- data/colors.csv
- data/typography.csv
- data/patterns.csv
- data/rules.json
必要工作流程
- 1. 从样式/颜色/排版数据中读取相关行。
- 选择一种样式、一个调色板及一组排版组合,并附上选择理由。
- 输出一份紧凑的设计规范:
- 布局模式
- 颜色标记
- 排版标记
- 交互规则
- 4. 如果用户要求实现,则生成可运行的文件(至少包含 index.html + styles.css)。
- 返回包含文件路径及所选数据集行/标识符的证据。
质量规则
- - 优先考虑可读性和可访问性(目标达到 WCAG AA 对比度标准)。
- 使用一致的间距、字体比例和组件状态。
- 当要求实现时,避免仅输出占位符内容。
- 保持生成的文本为干净的 UTF-8 编码(无乱码)。
验证
生成文件后,验证:
- - 文件存在于磁盘上;
- HTML 正确引用样式表;
- 所选样式/调色板/排版已反映在 CSS 变量中。
脚本辅助工具
当需要快速查询时,使用 scripts/search.ps1:
powershell
powershell -ExecutionPolicy Bypass -File scripts/search.ps1 -Query saas dashboard -DesignSystem -ProjectName Demo