--- name: planning description: App architecture and implementation planning principles — screen structure, data models, phase breakdown, UI pattern decisions, and command recommendations. Auto-load when planning app features or architecture. globs: - "**/plan*" - "**/PLAN*" - "**/architect*" --- # Planning — App Architecture & Implementation Plan ## Scope Assessment | Type | Input | Planning Scope | |------|-------|---------------| | Idea → App | Store card | Full (screens + data + phases) | | New feature | Feature description | Feature scope only | | Refactoring | Target code | Change scope + migration | ## Screen Design ### Screen & Route (Expo Router) - File-based routing: `app/(tabs)/`, `app/(modals)/` - One route file per screen - Leverage nested layouts ### UI Pattern Selection (Apple HIG Basis) Determine navigation, layout, and core components for each screen: | Pattern | Use Case | |---------|----------| | Push navigation | Hierarchical browsing (list → detail) | | Modal / Bottom sheet | Temporary task, creation | | Tab bar | Top-level section switching | | Scroll + sections | Long content, dashboard | | Flat list | Homogeneous item listing | | Grid | Visual-centric content | | Form | Input collection | ## Data Model ### Supabase Design Principles - Minimize tables. Pragmatism over normalization. - RLS (Row Level Security) required: `auth.uid() = user_id` - Common patterns: `user_id`, `created_at`, `updated_at` ## Phase Separation ### Priority Criteria 1. Dependencies (do other features require this?) 2. Core experience (P0 — without this, it's not the app) 3. Experience enhancement (P1 — much better with it) 4. Quality polish (P2 — baseline quality) ### Command Recommendations | Task Type | Recommended Command | |-----------|-------------------| | 모든 구현 (로직, UI, 인터랙션) | `/develop` | | Step completion | `/checkpoint` | ### Phase Format ```markdown ### Phase 1: Core (P0) - [ ] Task (file: path) - [ ] (TDD) Task (file: path) ← 비즈니스 로직 ### Phase 2: Interaction (P1) - [ ] Task (file: path) ### Phase 3: Polish (P2) - [ ] Task (file: path) ``` > (TDD) 기준: 비즈니스 로직 (데이터 처리, 상태 관리, 유틸, 유효성 검증) > 안 붙임: UI 렌더링, 인터랙션, 애니메이션, 네비게이션 Checkbox rules: - `/develop` marks `- [x]` on task completion - Running `/develop` without arguments auto-selects the first `- [ ]` task ## Risk Assessment | Type | Question | |------|----------| | Technical | Any first-time libraries/APIs? | | Performance | Any animation-heavy screens? | | Scope | What can be cut first if time is short? | ## 산출물 포맷 /architect 가 생성하는 문서. pipeline.md의 artifact 계약을 따른다. ### PRD.md ```markdown # [이름] ## 핵심 경험 ## 메타포 ## 화면 목록 | 화면 | Route | 우선순위 | ## 아키텍처 ## 데이터 모델 ## 수익화 ## Fidelity Map ## 완료 기준 ## Non-Goals ## 의존성 ``` ### 도메인 CLAUDE.md (`src/features/[domain]/CLAUDE.md`) ```markdown # [도메인명] ## 역할 ## 컴포넌트 - 기존 (taste-kit): [wireframe의 data-component에서 추출] - 신규: [ComponentName — 용도] ## 기능 명세 [유저 행동 → 결과] ## 태스크 - [ ] [행동] — [결과물] - [ ] (TDD) [행동] — [결과물] ## 주의사항 ``` ## Principles - Ship fast, iterate with feedback - Core features first, interaction layer next - One component per file, max 200 lines - Split each phase into testable units Answer in Korean.