<objective>
Execute the full UI lifecycle for a single feature in one pass — from existing DomainSpec backend docs through to working frontend pages with E2E tests and visual audit.
</objective>
<flags>
- `--spec-only`: Stop after generating UI-SPEC.md (Steps 1–2). Useful for review before implementation.
- `--skip-audit`: Skip the visual audit step (Step 5).
- `--dry-run`: Show the plan without executing. Lists what would be created/modified.
</flags>
<context>
Prerequisites (must already exist):
- docs/features/{feature}/SPEC.md (concept inventory)
- docs/features/{feature}/interfaces.md (HTTP endpoints — at least one with transport: http)
Also reads (when present):
- docs/features/{feature}/operations.md (user actions → forms, mutations)
- docs/features/{feature}/queries.md (data views → tables, cards)
- docs/features/{feature}/states.md (state transitions → conditional rendering)
- docs/features/{feature}/events.md (real-time updates)
- docs/features/{feature}/STORIES.md (user journeys → page flows)
- docs/features/{feature}/capabilities/*.md (capability-driven features)
Created/updated by this skill:
- docs/UI-ARCHITECTURE.md (if missing — created via interactive questions)
- docs/features/{feature}/UI-SPEC.md (per-feature design contract)
- docs/features/{feature}/TEST-SPEC.md (E2E section appended)
<process>
## Pre-flight checks
<error-handling>
- Missing SPEC.md or interfaces.md → BLOCK with clear message naming the missing file.
- No HTTP endpoints in interfaces.md → BLOCK: "Feature has no HTTP endpoints. UI pipeline requires at least one."
- UI-ARCHITECTURE.md creation fails → BLOCK: cannot proceed without constitution.
- UI-SPEC generation fails → BLOCK at step 2, report which aspect files are missing.
- Build failure after implementation → attempt fix (max 2 retries), then FLAG with details.
- Audit BLOCK findings → report but do not revert implementation.
</error-handling>
<authority-rule>
- DomainSpec feature docs define what the UI must do (behavior).
- UI-ARCHITECTURE.md defines project conventions (constitution).
- UI-SPEC.md defines feature presentation (design contract).
- This skill orchestrates — it never overrides decisions made by delegate skills.
- When delegate skills ask interactive questions, those propagate to the user.
</authority-rule>