ui-mockup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<objective>
Creates WebView UI mockups for audio plugins through iterative design and implementation scaffolding.
</objective>
<quick_start>
- Check for aesthetic library (Phase 0)
- Gather requirements through tiered questions (Phases 1-3)
- Dispatch ui-design-agent for mockup generation
- Iterate until user approves
- Generate implementation files </quick_start>
<context_detection>
<standalone_mode>
- No file present
.continue-here.md - Generates mockups independently
- Skips state updates </standalone_mode>
<workflow_mode>
- File exists with
plugins/[PluginName]/.continue-here.mdfieldcurrent_stage - Updates workflow state after each phase </workflow_mode>
Check for existence to determine mode. If present, update state files. If absent, skip state updates.
</context_detection>
<phase name="0-aesthetic-check">
Check if `.claude/aesthetics/manifest.json` exists. If found, count aesthetics using jq.
<menu>
Found {N} saved aesthetics in library.
.continue-here.mdHow would you like to start the UI design?
- Start from aesthetic template - Apply saved visual system
- Start from scratch - Create custom design
- List all aesthetics - Browse library before deciding
Choose (1-3): _
</menu>
<routing>
- Option 1: Display aesthetics from manifest with metadata (name, vibe, colors, source). Invoke ui-template-library skill with "apply" operation. Skip to Phase 4 with generated mockup.
- Option 2: Continue to Phase 1 (load context).
- Option 3: Invoke ui-template-library skill with "list" operation, show previews, return to menu.
- No aesthetics: Skip directly to Phase 1.
</routing>
See for complete integration details.
</phase>
<phase name="1-load-context">
Load context from creative brief and extract requirements.
See `references/phase-details.md` for extraction protocol.
See `references/context-extraction.md#example-extracting-from-creative-brief` for examples.
</phase>
<phase name="1.5-context-aware-prompt">
Adapt initial prompt based on creative brief contents (rich/minimal/zero UI details).
See `references/phase-details.md` for prompt templates.
</phase>
<phase name="2-gap-analysis">
Analyze gaps in Tier 1 (Critical), Tier 2 (Visual), Tier 3 (Polish) requirements.
See `references/phase-details.md` for tier definitions.
See `references/design-questions.md` for question templates.
</phase>
<phase name="2.5-calculate-dimensions">
Calculate recommended window size before asking user.
See `references/phase-details.md` for calculation steps.
See `references/layout-validation.md` Section 2 for formulas.
</phase>
<phase name="3-question-batch">
Generate exactly 4 questions using AskUserQuestion based on identified gaps.
See `references/phase-details.md` for rules and question format.
See `references/design-questions.md#example-question-batches` for templates.
</phase>
<phase name="3.5-decision-gate">
Present decision gate with AskUserQuestion: finalize, ask more questions, or add context.
Route to Phase 4, back to Phase 2, or collect free-form text.
See `references/phase-details.md` for menu format and routing.
</phase>
<phase name="4-5.45-design-agent">
Invoke ui-design-agent via Task tool to generate YAML + test HTML.
references/aesthetic-integration.mdInclude in invocation prompt:
- All gathered requirements (layout, controls, colors, etc.)
- Quality expectation: "Design must look like commercial $50-200 audio plugin - intentional decisions, not defaults"
See for invocation summary.
See for complete protocol.
</phase>
<phase name="5.5-design-decision-menu">
<gate>CRITICAL: Phases 6-10 ONLY execute if user chooses option 2 (Finalize)</gate>
<menu>
Mockup v[N] design created (2 files)
references/phase-details.mdreferences/delegation-protocols.mdFiles generated:
- v[N]-ui.yaml (design specification)
- v[N]-ui-test.html (browser-testable mockup)
What would you like to do?
- Iterate - Refine design, adjust layout
- Finalize - Validate alignment and complete mockup
- Save as template - Add to aesthetic library for reuse
- Other
Choose (1-4): _
</menu>
<routing>
- Option 1 (Iterate): Collect refinement feedback, return to Phase 2 with new version (v2, v3, etc.), invoke NEW ui-design-agent instance (fresh context).
- Option 2 (Finalize): Proceed to Phase 5.6 (automatic brief update), mockup is source of truth for UI sections, no user interaction needed, continue to Phase 6-10 after brief sync.
- Option 3 (Save as template): Invoke ui-template-library skill with "save" operation, after saving return to Phase 5.5 menu.
- Option 4 (Other): Handle custom request (test in browser, validate constraints, etc.).
</routing>
<iteration_guidance>
When collecting feedback for Option 1 (Iterate):
If user provides specific changes ("make it vertical", "add a meter", "change colors to blue"):
- Pass these as explicit requirements to new ui-design-agent instance
If user provides vague improvement requests ("make it better", "improve it", "polish it"):
- Prompt for specifics: "What aspect should I focus on? (layout, colors, spacing, controls)"
- If user says "everything" or "overall quality": Pass instruction to refine existing elements (spacing, color harmony, control styling) rather than add new elements </iteration_guidance>
See for detailed routing.
</phase>
<phase name="5.6-update-brief">
Automatic update of creative brief from finalized mockup.
Triggered by "Finalize" selection in Phase 5.5.
No user interaction required.
See `references/phase-details.md` for protocol.
</phase>
<phase name="6-10-implementation">
<prerequisites>
- User confirmed design in Phase 5.5 (selected option 2: Finalize)
- Phase A files exist (`v[N]-ui.yaml`, `v[N]-ui-test.html`)
- Finalization marker present in YAML
</prerequisites>
references/decision-menus.md#phase-5-5-design-decision-menuSee for guard implementation.
</phase>
<phase name="6-10.5-finalization-agent">
Invoke ui-finalization-agent via Task tool to generate 5 implementation files.
See `references/phase-details.md` for invocation summary.
See `references/delegation-protocols.md` for complete protocol.
</phase>
<phase name="10.7-completion-menu">
Present completion menu after ui-finalization-agent returns successfully.
See `references/decision-menus.md#completion-menu` for format and routing.
</phase>
references/phase-b-enforcement.md<orchestration_protocol>
<delegation_rules>
This skill NEVER generates mockup files directly. ALL file generation delegated to subagents.
<sequence>
1. Orchestrator: Gather requirements (Phases 0-3.5)
2. Orchestrator: Invoke ui-design-agent via Task tool
3. ui-design-agent: Generate YAML + test HTML, commit, return JSON
4. Orchestrator: Parse JSON, present Phase 5.5 menu
5. If iterate: Orchestrator invokes NEW ui-design-agent
6. If finalize: Orchestrator updates brief (Phase 5.6)
7. Orchestrator: Invoke ui-finalization-agent via Task tool
8. ui-finalization-agent: Generate 5 files, commit, return JSON
9. Orchestrator: Parse JSON, present completion menu
</sequence>
See for enforcement details.
</delegation_rules>
references/delegation-protocols.md<state_management>
Subagents update with their phase results. Orchestrator verifies flag in JSON report.
.continue-here.mdstateUpdatedAfter subagent returns , verify actual state contents match expected values (not just boolean flag).
stateUpdated: trueRead , parse YAML, check specific fields match JSON report values. If mismatch, present state recovery menu.
.continue-here.mdSee for complete state schema and verification protocol.
</state_management>
references/state-tracking.md<iteration_protocol>
Each iteration runs in fresh agent context. User chooses "Iterate" then orchestrator collects feedback and invokes NEW ui-design-agent with incremented version. Fresh context prevents context window bloat during iterative design.
</iteration_protocol>
<error_handling>
- Agent failures: Present error menu (retry/manual fix/debug/cancel).
- Validation failures: Agent returns - present error menu.
validationPassed: false - State update failures: Agent returns - present state recovery menu (verify/manual update/continue anyway). </error_handling> </orchestration_protocol>
stateUpdated: false
<versioning_strategy>
Pattern: v1, v2, v3... Each version saved separately.
Purpose: Explore layouts without losing work, A/B test designs, keep history for rollback.
File naming: All 7 files prefixed with version (e.g., , ).
v2-ui.htmlv2-PluginEditor.hImplementation: Latest version used for Stage 3 (GUI) unless user specifies different version.
See for file management details.
</versioning_strategy>
references/versioning.md<success_criteria>
<design_phase>
- YAML spec generated matching user requirements
- Browser test HTML works (interactive controls, parameter messages)
- Visual quality meets commercial standard (intentional design, not defaults)
- Design files committed to git
- updated with version (if workflow mode)
.continue-here.md - User presented with Phase 5.5 decision menu
- Design approved OR user iterates with refinements </design_phase>
<implementation_phase>
- All 7 files generated and saved to
.ideas/mockups/ - Production HTML complete (no placeholders)
- C++ boilerplate matches YAML structure (correct parameter bindings)
- parameter-spec.md generated and locked (v1 only)
- Implementation files committed to git
- updated with finalization status (if workflow mode) </implementation_phase> </success_criteria>
.continue-here.md
<integration_points>
<invoked_by>
- command - After creative brief, before implementation
/dream - skill - During Stage 0 (UI design phase)
plugin-workflow - skill - When redesigning existing plugin UI
plugin-improve - Natural language: "Design UI for [PluginName]", "Create mockup for compressor" </invoked_by>
<always_invokes>
- subagent (Phase 4-5.45) - REQUIRED for design iteration
ui-design-agent - subagent (Phase 6-10.5) - REQUIRED for implementation files </always_invokes>
ui-finalization-agent
<also_invokes>
- skill (if user saves aesthetic) </also_invokes>
ui-template-library
<reference_documentation>
Progressive disclosure - load references when reaching specific phases:
- Phase 0: - Aesthetic library integration
references/aesthetic-integration.md - Phase 1: - Creative brief extraction
references/context-extraction.md - Phase 2-3: - Question templates and tiering
references/design-questions.md - Phase 2.5: - Dimension calculation formulas
references/layout-validation.md - Phase 4-5.45: - Subagent invocation
references/delegation-protocols.md - Phase 5.5: - Menu format and routing
references/decision-menus.md - Phase 5.6: - Brief sync protocol
references/state-tracking.md - Phase 6-10: - Phase B guard
references/phase-b-enforcement.md - Anti-patterns: - What to avoid
references/common-pitfalls.md
Technical details:
- - Production HTML rules
references/html-generation.md - - Browser test workflow
references/browser-testing.md - - WebView build settings
references/cmake-configuration.md - - C++ template generation
references/cpp-boilerplate-generation.md - - Design constraints and patterns
references/ui-design-rules.md - - File management </reference_documentation>
references/versioning.md
<template_assets>
- - YAML structure
assets/ui-yaml-template.yaml - - C++ integration templates
assets/webview-boilerplate.md - - Integration guide
assets/integration-checklist-template.md - - Parameter specification format </template_assets>
assets/parameter-spec-template.md
<objective>
通过迭代设计和实现脚手架为音频插件创建WebView UI原型。
</objective>
<quick_start>
- 检查美学库(第0阶段)
- 通过分层问题收集需求(第1-3阶段)
- 调度ui-design-agent生成原型
- 迭代直到用户批准
- 生成实现文件 </quick_start>
<context_detection>
<standalone_mode>
- 不存在文件
.continue-here.md - 独立生成原型
- 跳过状态更新 </standalone_mode>
<workflow_mode>
- 文件存在且包含
plugins/[PluginName]/.continue-here.md字段current_stage - 每个阶段结束后更新工作流状态 </workflow_mode>
通过检查是否存在来确定模式。如果存在,则更新状态文件;如果不存在,则跳过状态更新。
</context_detection>
<phase name="0-aesthetic-check">
检查`.claude/aesthetics/manifest.json`是否存在。如果找到,使用jq统计美学模板数量。
<menu>
在库中找到{N}个已保存的美学模板。
.continue-here.md您希望如何开始UI设计?
- 从美学模板开始 - 应用已保存的视觉系统
- 从头开始 - 创建自定义设计
- 列出所有美学模板 - 浏览库后再做决定
请选择(1-3):_
</menu>
<routing>
- 选项1:展示清单中的美学模板及其元数据(名称、风格、配色、来源)。调用ui-template-library技能执行"apply"操作。直接跳至第4阶段,使用生成的原型。
- 选项2:继续到第1阶段(加载上下文)。
- 选项3:调用ui-template-library技能执行"list"操作,展示预览,然后返回菜单。
- 无美学模板:直接跳至第1阶段。
</routing>
完整集成细节请参阅。
</phase>
<phase name="1-load-context">
从创意简报中加载上下文并提取需求。
提取规则请参阅`references/phase-details.md`。
示例请参阅`references/context-extraction.md#example-extracting-from-creative-brief`。
</phase>
<phase name="1.5-context-aware-prompt">
根据创意简报内容(UI细节丰富/极简/无)调整初始提示词。
提示词模板请参阅`references/phase-details.md`。
</phase>
<phase name="2-gap-analysis">
分析第1层(关键)、第2层(视觉)、第3层(打磨)需求中的缺口。
层级定义请参阅`references/phase-details.md`。
问题模板请参阅`references/design-questions.md`。
</phase>
<phase name="2.5-calculate-dimensions">
在询问用户之前计算推荐的窗口尺寸。
计算步骤请参阅`references/phase-details.md`。
计算公式请参阅`references/layout-validation.md`第2节。
</phase>
<phase name="3-question-batch">
基于识别出的需求缺口,使用AskUserQuestion生成恰好4个问题。
规则和问题格式请参阅`references/phase-details.md`。
模板示例请参阅`references/design-questions.md#example-question-batches`。
</phase>
<phase name="3.5-decision-gate">
使用AskUserQuestion展示决策门:定稿、询问更多问题或补充上下文。
路由至第4阶段、返回第2阶段或收集自由文本反馈。
菜单格式和路由规则请参阅`references/phase-details.md`。
</phase>
<phase name="4-5.45-design-agent">
通过Task工具调用ui-design-agent生成YAML和测试HTML。
references/aesthetic-integration.md调用提示词中需包含:
- 所有收集到的需求(布局、控件、配色等)
- 质量要求:"设计必须符合50-200美元商用音频插件的水准——需有明确设计决策,而非默认样式"
调用摘要请参阅。
完整协议请参阅。
</phase>
<phase name="5.5-design-decision-menu">
<gate>重要提示:仅当用户选择选项2(定稿)时,才会执行第6-10阶段</gate>
<menu>
已创建原型v[N](2个文件)
references/phase-details.mdreferences/delegation-protocols.md生成的文件:
- v[N]-ui.yaml(设计规范)
- v[N]-ui-test.html(可在浏览器中测试的原型)
您希望执行什么操作?
- 迭代 - 优化设计,调整布局
- 定稿 - 验证一致性并完成原型
- 保存为模板 - 添加到美学库以便复用
- 其他
请选择(1-4):_
</menu>
<routing>
- 选项1(迭代):收集优化反馈,返回第2阶段并使用新版本(v2、v3等),调用新的ui-design-agent实例(全新上下文)。
- 选项2(定稿):进入第5.6阶段(自动更新简报),原型将作为UI部分的唯一依据,无需用户交互,同步简报后继续执行第6-10阶段。
- 选项3(保存为模板):调用ui-template-library技能执行"save"操作,保存完成后返回第5.5阶段菜单。
- 选项4(其他):处理自定义请求(如在浏览器中测试、验证约束等)。
</routing>
<iteration_guidance>
当为选项1(迭代)收集反馈时:
如果用户提供具体修改要求(如"改为垂直布局"、"添加仪表"、"改为蓝色配色"):
- 将这些要求作为明确参数传递给新的ui-design-agent实例
如果用户提供模糊的改进请求(如"做得更好"、"优化一下"、"打磨一下"):
- 提示用户提供具体方向:"我应该聚焦哪些方面?(布局、配色、间距、控件)"
- 如果用户说"全部"或"整体质量":传递指令优化现有元素(间距、配色和谐度、控件样式),而非添加新元素 </iteration_guidance>
详细路由规则请参阅。
</phase>
<phase name="5.6-update-brief">
根据定稿的原型自动更新创意简报。
当在第5.5阶段选择"定稿"时触发。
无需用户交互。
协议请参阅`references/phase-details.md`。
</phase>
<phase name="6-10-implementation">
<prerequisites>
- 用户已在第5.5阶段确认设计(选择选项2:定稿)
- 存在A阶段文件(`v[N]-ui.yaml`、`v[N]-ui-test.html`)
- YAML文件中包含定稿标记
</prerequisites>
references/decision-menus.md#phase-5-5-design-decision-menu防护实现请参阅。
</phase>
<phase name="6-10.5-finalization-agent">
通过Task工具调用ui-finalization-agent生成5个实现文件。
调用摘要请参阅`references/phase-details.md`。
完整协议请参阅`references/delegation-protocols.md`。
</phase>
<phase name="10.7-completion-menu">
当ui-finalization-agent成功返回后,展示完成菜单。
格式和路由规则请参阅`references/decision-menus.md#completion-menu`。
</phase>
references/phase-b-enforcement.md<orchestration_protocol>
<delegation_rules>
本技能绝不会直接生成原型文件。所有文件生成任务均委托给子Agent。
<sequence>
1. 编排器:收集需求(第0-3.5阶段)
2. 编排器:通过Task工具调用ui-design-agent
3. ui-design-agent:生成YAML和测试HTML,提交,返回JSON
4. 编排器:解析JSON,展示第5.5阶段菜单
5. 如果选择迭代:编排器调用新的ui-design-agent实例
6. 如果选择定稿:编排器更新brief(第5.6阶段)
7. 编排器:通过Task工具调用ui-finalization-agent
8. ui-finalization-agent:生成5个文件,提交,返回JSON
9. 编排器:解析JSON,展示完成菜单
</sequence>
执行细节请参阅。
</delegation_rules>
references/delegation-protocols.md<state_management>
子Agent会在中更新其阶段结果。编排器会验证JSON报告中的标记。
.continue-here.mdstateUpdated当子Agent返回后,需验证实际状态内容是否与预期值匹配(而非仅检查布尔标记)。
stateUpdated: true读取,解析YAML,检查特定字段是否与JSON报告中的值一致。如果不匹配,展示状态恢复菜单。
.continue-here.md完整状态 schema 和验证协议请参阅。
</state_management>
references/state-tracking.md<iteration_protocol>
每次迭代都在全新的Agent上下文中运行。用户选择"迭代"后,编排器收集反馈并调用新的ui-design-agent实例,版本号递增。全新上下文可避免迭代设计过程中出现上下文窗口膨胀问题。
</iteration_protocol>
<error_handling>
- Agent失败:展示错误菜单(重试/手动修复/调试/取消)。
- 验证失败:Agent返回- 展示错误菜单。
validationPassed: false - 状态更新失败:Agent返回- 展示状态恢复菜单(验证/手动更新/继续执行)。 </error_handling> </orchestration_protocol>
stateUpdated: false
<versioning_strategy>
模式:v1、v2、v3... 每个版本单独保存。
目的:在不丢失工作成果的前提下探索不同布局,进行A/B测试,保留历史版本以便回滚。
文件命名:所有7个文件均以版本号为前缀(例如、)。
v2-ui.htmlv2-PluginEditor.h实现:除非用户指定其他版本,否则第3阶段(GUI)将使用最新版本。
文件管理细节请参阅。
</versioning_strategy>
references/versioning.md<success_criteria>
<design_phase>
- 生成符合用户需求的YAML规范
- 浏览器测试HTML可正常工作(交互控件、参数消息)
- 视觉质量达到商用标准(明确的设计决策,而非默认样式)
- 设计文件已提交至git
- 已更新版本号(如果是工作流模式)
.continue-here.md - 已向用户展示第5.5阶段决策菜单
- 设计已获批准或用户选择迭代优化 </design_phase>
<implementation_phase>
- 所有7个文件已生成并保存至
.ideas/mockups/ - 生产环境HTML已完成(无占位符)
- C++模板与YAML结构匹配(参数绑定正确)
- 已生成并锁定parameter-spec.md(仅v1版本)
- 实现文件已提交至git
- 已更新定稿状态(如果是工作流模式) </implementation_phase> </success_criteria>
.continue-here.md
<integration_points>
<invoked_by>
- 命令 - 创意简报之后,实现之前
/dream - 技能 - 第0阶段(UI设计阶段)
plugin-workflow - 技能 - 重新设计现有插件UI时
plugin-improve - 自然语言指令:"为[PluginName]设计UI"、"为压缩器创建原型" </invoked_by>
<always_invokes>
- 子Agent(第4-5.45阶段)- 设计迭代必需
ui-design-agent - 子Agent(第6-10.5阶段)- 生成实现文件必需 </always_invokes>
ui-finalization-agent
<also_invokes>
- 技能(当用户保存美学模板时) </also_invokes>
ui-template-library
<reference_documentation>
渐进式披露 - 到达特定阶段时加载参考文档:
- 第0阶段: - 美学库集成
references/aesthetic-integration.md - 第1阶段: - 创意简报提取
references/context-extraction.md - 第2-3阶段: - 问题模板和分层规则
references/design-questions.md - 第2.5阶段: - 尺寸计算公式
references/layout-validation.md - 第4-5.45阶段: - 子Agent调用
references/delegation-protocols.md - 第5.5阶段: - 菜单格式和路由
references/decision-menus.md - 第5.6阶段: - 简报同步协议
references/state-tracking.md - 第6-10阶段: - B阶段防护
references/phase-b-enforcement.md - 反模式: - 需避免的问题
references/common-pitfalls.md
技术细节:
- - 生产环境HTML规则
references/html-generation.md - - 浏览器测试工作流
references/browser-testing.md - - WebView构建设置
references/cmake-configuration.md - - C++模板生成
references/cpp-boilerplate-generation.md - - 设计约束和模式
references/ui-design-rules.md - - 文件管理 </reference_documentation>
references/versioning.md
<template_assets>
- - YAML结构模板
assets/ui-yaml-template.yaml - - C++集成模板
assets/webview-boilerplate.md - - 集成指南模板
assets/integration-checklist-template.md - - 参数规范格式模板 </template_assets>
assets/parameter-spec-template.md