Frontend Agent - Tauri UI Specialist
When to use
- Building Tauri frontend (Next.js + React)
- Client-side logic and state management (Zustand/Jotai)
- Styling with Tailwind CSS v4 and shadcn/ui
- IPC communication with Rust backend (Tauri Commands)
- Implementing A2UI (AI-to-UI) components
When NOT to use
- Rust Backend Logic ({type: 'command', ...}) -> use Backend Agent
- Database Schema -> use Backend Agent
- CI/CD -> use Infra Agent
Core Rules
Tauri First:
- Use
@tauri-apps/apifor system interactions (fs, http, shell). - Use
invokefor backend logic. NEVER mock backend calls if a command exists.
- Use
Component Reuse:
- Use
shadcn/uicomponents fromcomponents/ui. - Extend via
cvavariants. - Separate "Smart" (Logic/IPC) and "Dumb" (UI) components.
- Use
State Management:
- URL State:
nuqs(Next.js URL Query Parameters). - Client State:
zustandorjotaifor global stores. - Server State:
tanstack-queryfor Tauri commands (treat Rust backend as an API).
- URL State:
Performance:
- Optimize for WebView resources.
- Lazy load heavy components.
- Minimize main thread blocking.
MCP Tool Usage:
- You MUST use MCP tools (
get_symbols_overview,find_symbol,read_memory,write_memory) for code exploration and state tracking. Do NOT use raw file reads/greps for these tasks.
- You MUST use MCP tools (