visual-verify-loop
Implementation-phase visual verification loop for UI tasks. Launches the app (Claude Preview MCP for web, wpf-visual-verify for WPF desktop), compares the rendered UI against approved mockups, ux-spec states, and — when the project carries one — the design-system contract (tokens and ui-patterns), iterates fixes up to five times, and saves final screenshots as evidence under reports/visual-evidence/. Non-blocking; verdicts stay with quality-gate and human review.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- visual-verify-loop
- description
- Implementation-phase visual verification loop for UI tasks. Launches the app (Claude Preview MCP for web, wpf-visual-verify for WPF desktop), compares the rendered UI against approved mockups, ux-spec states, and — when the project carries one — the design-system contract (tokens and ui-patterns), iterates fixes up to five times, and saves final screenshots as evidence under reports/visual-evidence/. Non-blocking; verdicts stay with quality-gate and human review.
- user-invocable
- false
- disable-model-invocation
- false
03 SKILL.md 正文
Visual Verify Loop
Implementation-phase visual verification for UI tasks. Invoked by
implement-task after the scoped self-review and before the implementation
report is written. Advisory only: it accelerates design-conformance
iteration and records evidence; it never decides task completion.
Trigger Condition
Run only when both hold; otherwise record the skip reason in the implementation report and return:
- the task's feature has
specs/<feature>/ux-spec.mdorspecs/<feature>/mockups/, and - the task's scope includes UI-layer files (views, components, styles, or templates).
App-Type Detection
- Web: a dev server can be started (
.claude/launch.json, or a dev script inpackage.json) — prefer the Claude Preview MCP tools (preview_start,preview_screenshot,preview_snapshot,preview_inspect,preview_resize). If unavailable, use an available browser automation tool or the project's installed Playwright with a real browser. Start the project's documented local server, wait for readiness, and capture the same screenshots, accessibility/DOM state, computed styles, and desktop/mobile viewport evidence. Record the actual tool and browser; never label Playwright evidence as Claude Preview evidence. Stop servers started by this verification when finished. Do not install an unapproved remote service or replace runtime checks with static HTML inspection. - WPF desktop: a WPF project is present — use the
wpf-visual-verifyskill (off-screen RenderTargetBitmap rendering to PNG). - Neither, or the tools are unavailable in this environment: record
visual verification unavailable — skipped: <reason>in the implementation report and return.
Loop (max 5 iterations)
- Build and launch (or re-render) the affected view.
- Capture a screenshot. For web, also capture an accessibility snapshot and inspect computed styles for the properties under review (colors, fonts, spacing) instead of judging them from pixels.
- Compare against the approved mockups in
specs/<feature>/mockups/, the states defined in the feature's layer specs (default, empty, loading, error; responsive breakpoints), and — when the project carries adesign-system/contract — token conformance againstdesign-system/design-tokens.json(no raw style values in the rendered output's sources) and the conventions indesign-system/ui-patterns.md(actions, dialogs, icons, flow, states). - If a mismatch is within the task's approved scope, fix the code and repeat. If it is out of scope, record it as a finding and continue.
- Stop when the rendered UI matches, or after 5 iterations.
Evidence
- Save the final screenshots to
reports/visual-evidence/<task-id>/(one file per view and state, e.g.login-default.png). - Add a
Visual Evidencesection toreports/implementation/<feature>/<task-id>.mdlisting each screenshot, the mockup or spec state it was compared against, and any remaining mismatches as findings.
Boundaries
- Non-blocking: findings never change the task state; PASS/NEEDS_WORK remains the job of quality-gate and human review.
- No pixel-diff regression tooling; comparison is model-inspected and recorded as findings.
- Never modify files outside the task's approved scope to chase a visual match; record the mismatch as a finding instead.
- A preview-server or build failure is recorded and skipped, never fixed by expanding scope and never a blocker.
- Design-system conformance findings here are advisory; the deterministic
check-design-systemgate (sdd-quality-loop) owns warn/error enforcement.
04 同仓库更多 Skills
status
Show a read-only Jira-style six-view SDD dashboard in the initiating parent's Sites or Claude Artifacts, with source freshness and failure visibility.
verify-review-reservation
Recheck the bounded identity-ledger reservation invariant after lock, hash-check or publication changes.
aws-cdk
Authors, deploys, and troubleshoots AWS infrastructure using CDK with TypeScript or Python. Covers best practices, stack architecture, and construct patterns. Applies when writing CDK constructs, bootstrapping environments, running cdk deploy/synth/diff, fixing CDK or CloudFormation errors, planning stack structure, importing existing resources, resolving drift, or refactoring stacks without resource replacement.
quality-gate
Independently verify an Implementation Complete task with a Default-FAIL verification contract, deterministic checks, and an isolated critical reviewer, then decide whether it is Done.
ship
Implement approved SDD tasks through the quality gate to Done — the second of the two-command workflow. Run after /sdd-bootstrap:bootstrap and human task approval.
ship
Implement approved SDD tasks through the quality gate to Done — the second of the two-command workflow. Run after /sdd-bootstrap:bootstrap and human task approval.