---
description: Hybrid AI Architect - Orchestrates PRD, Planning, Figma, and TDD phases
---

# Hybrid Task Architect Workflow

This workflow acts as a **Lead Architect** that orchestrates specialized AI skills to deliver high-quality software. It follows a strict **Plan-Check-Execute-Verify** cycle.

## Phase 1: Context & Requirements (PRD)
**Goal**: Ensure we have a crystal-clear understanding of WHAT to build.

1. **Check for PRD**: Look for `prd/*.md`.
2. **If No PRD**:
   - Activate Skill: `skills/prd-guide/SKILL.md`
   - Command: "Create a PRD for [User Request] following the PRD Guide."
   - **Stop** and ask user to review the PRD.
3. **If PRD Exists**:
   - Read it carefully.

## Phase 2: Architecture & Planning
**Goal**: detailed technical map BEFORE coding.

1. **Analyze**: Run `skills/implementation-planning/SKILL.md`.
   - Output: `implementation_plan.md` (or update existing).
2. **Review**: Check if the plan matches the PRD.

## Phase 3: Execution (The Loop)
**Goal**: High-quality implementation using specialized skills.

**Select Mode**:
- **UI/Frontend**:
  - Activate Skill: `skills/figma-code/SKILL.md`
  - Input: Figma Screenshot/Node + Design Tokens.
  - Action: Generate component code.
- **Logic/Backend**:
  - Activate Skill: `skills/tdd-workflow/SKILL.md`
  - Action: Write failing test -> Write code -> Pass test.

## Phase 4: Verification
**Goal**: Ensure it works and doesn't break anything.

1. **Lint/Type Check**: `<%= runCmd %> lint`, `tsc --noEmit`
2. **Unit Test**: `<%= runCmd %> test` (Ensure logic and edge cases are covered)
3. **E2E Test**: `<%= runCmd %> test:e2e` (Ensure user flows are working)
4. **Fix**: If failures occur, auto-fix using the error logs.

---
**Next Step**:
- If all passed: 
  > **[CRITICAL RULE]** 태스크가 끝날 때마다 반드시 `TASK_BREAKDOWN.md`를 업데이트하여 최신 상태를 유지해야 합니다.
  Mark task as `[x]` in `TASK_BREAKDOWN.md` and run `/task-next` or update status.
- If failed: Enter **Recovery Mode**.
