Skip to main content

Frontend Flow

For UI-heavy tasks with Figma designs, use the specialized frontend workflow. This extends the standard flow with iterative Figma verification to ensure the implementation matches the design within tolerance.

Command Sequenceโ€‹

1๏ธโƒฃ /tsh-research     <JIRA_ID or task description>
โ†ณ ๐Ÿ“– Review research doc โ€“ verify Figma links, requirements
โ†ณ โœ… Iterate until context is complete and accurate

2๏ธโƒฃ /tsh-plan <JIRA_ID or task description>
โ†ณ ๐Ÿ“– Review plan โ€“ check component breakdown, design references
โ†ณ โœ… Confirm phases align with Figma structure

3๏ธโƒฃ /tsh-implement-ui <JIRA_ID or task description>
โ†ณ ๐Ÿ“– Review code changes and UI Verification Summary
โ†ณ โœ… Manually verify critical UI elements in browser
โ†ณ ๐Ÿ”„ Agent calls /tsh-review-ui in a loop until PASS or escalation

4๏ธโƒฃ /tsh-review <JIRA_ID or task description>
โ†ณ ๐Ÿ“– Review findings โ€“ code quality, a11y, performance
โ†ณ โœ… Address all blockers before merging

How the Verification Loop Worksโ€‹

  1. /tsh-implement-ui implements a UI component.
  2. Calls /tsh-review-ui to perform single-pass verification (read-only).
  3. /tsh-review-ui uses Figma MCP (EXPECTED) + Playwright MCP (ACTUAL) โ†’ returns PASS or FAIL with diff table.
  4. If FAIL โ†’ /tsh-implement-ui fixes the code and calls /tsh-review-ui again.
  5. Repeats until PASS or max 5 iterations (then escalates to the developer).

What /tsh-review-ui Doesโ€‹

  • Single-pass, read-only verification โ€” does not modify code.
  • Uses Figma MCP to extract design specifications (spacing, typography, colors, dimensions).
  • Uses Playwright MCP to capture the current implementation state.
  • Returns a structured report: PASS/FAIL + difference table with exact values.
  • Covers: structure (containers, nesting), dimensions (width, height, spacing), visual (typography, colors, radii), and components (variants, tokens, states).

What /tsh-implement-ui Doesโ€‹

  • Implements UI components following the plan.
  • Runs iterative verification loop delegating to the tsh-ui-reviewer subagent after each component.
  • Fixes mismatches based on subagent reports.
  • Escalates after 5 failed iterations with a detailed report.
  • Produces a UI Verification Summary before handing off to code review.

Required Skillsโ€‹

The frontend flow loads these specialized skills:

  • tsh-implementing-frontend โ€” Component patterns, design system usage, composition, and performance guidelines.
  • tsh-ui-verifying โ€” Verification criteria, tolerances, severity definitions, and what constitutes PASS/FAIL.
  • tsh-ensuring-accessibility โ€” WCAG 2.1 AA compliance, semantic HTML, ARIA, keyboard navigation.
  • tsh-technical-context-discovering โ€” Project conventions and coding standards.
Important

The automated Figma verification loop helps catch visual mismatches, but it does not replace manual review. Always visually inspect the implemented UI in the browser, test interactions, and verify responsive behavior yourself.