ui-thorough
Full UI development workflow from specs to auditing. Use for new apps or major features.
SKILL.md
| Name | ui-thorough |
| Description | Full UI development workflow from specs to auditing. Use for new apps or major features. |
name: ui-thorough description: Full UI development workflow from specs to auditing. Use for new apps or major features.
UI Thorough
Complete workflow for ui-engine apps: requirements → design → code → audit → simplify.
On Skill Load
IMMEDIATELY invoke /ui-basics using the Skill tool before doing anything else. It covers the mental model, bindings, object model, and patterns. Without it, standard web patterns will lead you astray.
Workflow
Follow these steps in order.
Step 0: Consolidate Existing Checkpoints
Check for existing checkpoints from /ui-fast prototyping:
{cmd} checkpoint list <app>
If checkpoints exist (output is not "No checkpoints for <app>"):
-
Thoroughly explore what was done:
Use
checkpoint diff <app> 10to see the full diff from earliest to current. Usecheckpoint diff <app> Nfor specific checkpoints. The checkpoint messages (fromlist) provide context for each change. -
Update BOTH requirements.md AND design.md:
- Read current
requirements.mdanddesign.md - Update
requirements.mdfirst — add any new features that were prototyped - Update
design.mdto match — add data model fields, methods, viewdef changes - Use the diff output to ensure nothing is missed
- Both files must be updated — the design must stay in sync with requirements
- Read current
-
Simplify the checkpointed code:
Run the code-simplifier agent on the app's Lua code:
Task tool with subagent_type="code-simplifier" prompt: "Simplify the code in {ui_dir}/apps/<app>/app.lua" -
Record as fast code gaps:
Since checkpoint work is rapid prototyping ("quick and dirty"), add a summary to
TESTING.mdunder## Gapswith a### Fast Codesubsection:Add a
### Fast Codesubsection under## GapsinTESTING.mdlisting the methods/features added via checkpoints that may need review. This flags the code for later cleanup while preserving the feature. -
Clear checkpoints:
{cmd} checkpoint clear <app>
This ensures prototyping work is captured in the design before proceeding.
Step 1: Create Progress Steps (IMMEDIATELY)
Run BEFORE reading any files. The user is watching — without this, the build looks frozen.
Steps: {'Read requirements', 'Requirements', 'Design', 'Write code', 'Write viewdefs', 'Link and audit', 'Simplify', 'Set baseline'}
Use mcp:createTodos(STEPS, APP) with the steps list and app name. The listed steps above all have matching entries in UI_STEP_DEFS (apps/mcp/app.lua) for tailored progress messages; new labels work but get generic ones. Also create Claude Code tasks (see MCP Methods in /ui-basics).
Progress pattern: At each step transition, call mcp:startTodoStep(N) and update Claude Code tasks. At the end, call mcp:completeTodos().
Step 2: Requirements
- Read
{ui_dir}/apps/<app>/requirements.md(create with prose if missing) - Read
TESTING.mdif it exists — note Known Issues - Update requirements if the task requires changes
- Ensure requirements are complete and unambiguous before designing
Step 3: Design
- Check
{ui_dir}/patterns/for reusable patterns - Write
{ui_dir}/apps/<app>/icon.htmlwith an emoji,<sl-icon>, or<img> - Write
{ui_dir}/apps/<app>/design.md:- Intent: What the UI accomplishes
- Layout: ASCII wireframe showing structure
- Data Model: Tables of types, fields, descriptions
- Methods: Actions each type performs
- ViewDefs: Template files needed
- Events: JSON examples with complete handling instructions
Step 4: Write Code
Write {ui_dir}/apps/<app>/app.lua — Lua classes and logic.
Write code BEFORE viewdefs — viewdefs may reference types that must exist first.
Step 5: Write Viewdefs
viewdefs/<Type>.DEFAULT.html— HTML templatesviewdefs/<Item>.list-item.html— List item templates (if needed)
Step 6: Link and Audit
{cmd} linkapp add <app>
{cmd} audit <app>
{cmd} theme audit <app>
The audit tool checks Lua code and viewdefs for common violations. Also do AI-based checks:
- Compare design.md against requirements.md
- Compare implementation against design.md
Fix violations:
- Dead methods NOT in design.md → Delete from
app.lua - Dead methods IN design.md → Record in
TESTING.mdunder## Gaps - Other violations → Fix in code
- Warnings (external methods) → OK to ignore
Clear Empty Gaps:
If there were gaps and they are all gone now, leave the ## Gaps section empty, do not leave a comment.
Step 7: Simplify
Use the code-simplifier agent:
Task tool with subagent_type="code-simplifier"
prompt: "Simplify the code in {ui_dir}/apps/<app>/app.lua"
Step 8: Set Baseline
Commit the audited code to the local branch and set a clean baseline for future /ui-fast iterations:
{cmd} checkpoint local <app> "thorough: <brief description>"
{cmd} checkpoint baseline <app>
The local commit preserves audited code on a permanent branch that survives baseline resets.
The baseline clears trunk for fresh /ui-fast checkpoints.
Step 9: Complete
{cmd} run "mcp:completeTodos()"
{cmd} run "mcp:appUpdated('APP_NAME')"
{cmd} run "mcp:addAgentMessage('Done - built APP_NAME')"
Examples
See {ui_dir}/apps/app-console for complete examples:
requirements.md— Requirements specdesign.md— Design spec