---
trigger: manual
---
# ๐ฏ Anti-Gravity ํตํฉ ์์
์ง์นจ์
์ด ๋ฌธ์๋ `.agent/rules/`์ ์ปค์คํ
๋ฃฐ๊ณผ `.agent/skills/`์ Skill๋ค์ **์ํฉ๋ณ๋ก ์๋ ์กฐํฉ**ํ์ฌ ์ต์ ์ ๊ฒฐ๊ณผ๋ฅผ ๋์ถํ๊ธฐ ์ํ ๋ง์คํฐ ๊ฐ์ด๋์
๋๋ค.
---
## ๐ ์์
์ ํ๋ณ ๋ฃฐ+Skill ์กฐํฉํ
| ์์
์ ํ | ์ฃผ ๋ฃฐ(Primary) | ๋ณด์กฐ ๋ฃฐ(Secondary) | ํ์ฉ Skill | MCP ๋๊ตฌ |
|---------|---------------|------------------|----------|----------|
| **์ ๊ธฐ๋ฅ ๊ฐ๋ฐ** | `builder-rule.md` | - | `nextjs-app-router-patterns`
`vercel-react-best-practices` | `sequential-thinking` (๋ณต์กํ ๋ก์ง)
`context7` (๋ผ์ด๋ธ๋ฌ๋ฆฌ ํ์ธ) |
| **์ฝ๋ ๋ถ์/์ดํด** | `code-analysis-rule.md` | - | `nextjs-app-router-patterns` (๊ตฌ์กฐ ์ดํด) | `sequential-thinking` (ํ๋ก์ฐ ๋ถ์) |
| **์ฃผ์ ์ถ๊ฐ** | `doc-rule.md` | `code-analysis-rule.md` | - | - |
| **๋ฆฌํฉํ ๋ง** | `refactoring-rule.md` | `builder-rule.md` (์ฌ๊ตฌํ) | `vercel-react-best-practices` (์ฑ๋ฅ ๊ฐ์ ) | `sequential-thinking` (์์กด์ฑ ๋ถ์)
`context7` (์ต์ ํจํด ํ์ธ) |
| **์ฑ๋ฅ ์ต์ ํ** | `builder-rule.md` | `refactoring-rule.md` | `vercel-react-best-practices` | `context7` (์ต์ ์ต์ ํ ๊ธฐ๋ฒ) |
| **์ฃผ์ + ๋ฆฌํฉํ ๋ง** | `refactoring-rule.md` | `doc-rule.md` | `vercel-react-best-practices` | `sequential-thinking` |
---
## ๐ ์์
ํ๋ฆ๋ณ ์ธ๋ถ ๊ฐ์ด๋
### 1๏ธโฃ ์ ๊ธฐ๋ฅ ๊ฐ๋ฐ (Feature Development)
**ํธ๋ฆฌ๊ฑฐ ํค์๋**: "์๋ก์ด ๊ธฐ๋ฅ", "์ปดํฌ๋ํธ ์ถ๊ฐ", "API ์ฐ๋", "ํ์ด์ง ์์ฑ"
**์์
์์**:
```
[1๋จ๊ณ] builder-rule.md ๊ธฐ์ค์ผ๋ก ๊ตฌ์กฐ ์ค๊ณ
โ
[2๋จ๊ณ] nextjs-app-router-patterns๋ก Next.js App Router ํจํด ํ์ธ
โ (๋ณต์กํ ๋ก์ง์ด ์๋ค๋ฉด)
[2-1] sequential-thinking์ผ๋ก ๋ก์ง ๊ฒ์ฆ
โ (SpreadJS ๋ฑ ์ธ๋ถ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ฌ์ฉ ์)
[2-2] context7๋ก ๊ณต์ ๋ฌธ์ ์กฐํ
โ
[3๋จ๊ณ] vercel-react-best-practices๋ก ์ฑ๋ฅ ์ต์ ํ ํจํด ์ ์ฉ
โ
[4๋จ๊ณ] builder-rule.md์ ์ถ๋ ฅ ํ์๋๋ก ์ฝ๋ ์ ๊ณต
- [๊ฐ์ ] ์น์
- ํต์ฌ ์ฝ๋ ๋ธ๋ก
- ํ ์ค ํ ์ค ๋ฏ์ด๋ณด๊ธฐ
- ์๋ ํ๋ฆ
- ํต์ฌ ํฌ์ธํธ
```
**๊ตฌ์ฒด์ ํตํฉ ์์**:
```markdown
# [์์] CreateLeadDialog ์ปดํฌ๋ํธ ๊ฐ๋ฐ
## [1๋จ๊ณ] builder-rule.md ์ ์ฉ
- Tech Stack ํ์ธ: Next.js 15.3, React 19, TanStack Query v5, Zustand v5
- ํด๋ ๊ตฌ์กฐ: `src/features/leads/components/CreateLeadDialog.tsx`
- 'use client' ํ์ (Form ์ธํฐ๋์
)
## [2๋จ๊ณ] nextjs-app-router-patterns ์ฐธ๊ณ
- Client Component๋ 'use client' ์ ์ธ
- Server Action ์ฌ์ฉ ์ "use server" ๋ถ๋ฆฌ
- Suspense ๊ฒฝ๊ณ ์ค์
## [2-1] sequential-thinking (๋ณต์กํ ๊ฒ์ฆ ๋ก์ง์ด ์๋ ๊ฒฝ์ฐ)
- Form ์ ์ถ โ ์ฌ์ ๊ฒ์ฆ โ API ํธ์ถ โ ์ฑ๊ณต/์คํจ ์ฒ๋ฆฌ
- ์ฃ์ง ์ผ์ด์ค: ์ค๋ณต ์ ์ถ, ๋คํธ์ํฌ ์ค๋ฅ, ํ์๊ฐ ๋๋ฝ
## [3๋จ๊ณ] vercel-react-best-practices ์ ์ฉ
- `rerender-memo`: ๋ฌด๊ฑฐ์ด Form ๋ก์ง์ memo๋ก ๊ฐ์ธ๊ธฐ
- `client-swr-dedup`: TanStack Query๋ก ์ค๋ณต ์์ฒญ ๋ฐฉ์ง
- `rendering-conditional-render`: ์กฐ๊ฑด๋ถ ๋ ๋๋ง์ ์ผํญ ์ฐ์ฐ์ ์ฌ์ฉ
## [4๋จ๊ณ] ์ต์ข
์ฝ๋ ์ถ๋ ฅ
- builder-rule.md์ ์ถ๋ ฅ ํ์ ์ค์
- ์ฃผ์์ ํ๊ธ๋ก, ์์ฑ์ 'jihoon87.lee'
```
---
### 2๏ธโฃ ์ฝ๋ ๋ถ์/์ดํด (Code Analysis)
**ํธ๋ฆฌ๊ฑฐ ํค์๋**: "์ฝ๋ ๋ถ์", "ํ๋ฆ ์ค๋ช
", "์ด๋ป๊ฒ ์๋", "ํ๋ก์ฐ ํ์
"
**์์
์์**:
```
[1๋จ๊ณ] code-analysis-rule.md์ ๋ถ์ ์์ ์ค์
- ์ง์
์ (app/page)
- ์ปดํฌ๋ํธ ์์
- Hook ํธ์ถ
- API โ ์ํ โ ๋ฆฌ๋ ๋
- TypeScript ํ์
์ค๋ช
โ (๋ณต์กํ ํ๋ฆ์ธ ๊ฒฝ์ฐ)
[1-1] sequential-thinking์ผ๋ก ๋
ผ๋ฆฌ์ ๋จ๊ณ ๊ฒ์ฆ
โ
[2๋จ๊ณ] nextjs-app-router-patterns๋ก Next.js ๊ตฌ์กฐ ๋งคํ
- Server Component vs Client Component
- Parallel Routes, Intercepting Routes ๋ฑ
โ
[3๋จ๊ณ] code-analysis-rule.md ์๋ต ํ
ํ๋ฆฟ ์ฌ์ฉ
- ํ๊ธ ์ฃผ์
- ํ๋ก์ฐ ๋ค์ด์ด๊ทธ๋จ
- ๋ฆฌ๋ ๋๋ง ์กฐ๊ฑด ํ
```
**ํตํฉ ์์**:
```markdown
# [์์] PersonnelTableContainer ๋ถ์
## [์ ์ฉ ๋ฃฐ]
- code-analysis-rule.md: ๋ถ์ ์์ ๋ฐ ํ
ํ๋ฆฟ
- nextjs-app-router-patterns: Server/Client ๊ตฌ๋ถ
- sequential-thinking: ๋ฐ์ดํฐ ํ์นญ ์์ ๊ฒ์ฆ
## [๋ถ์ ๊ฒฐ๊ณผ]
### 1๏ธโฃ ์ง์
์
- URL: /standards/personnel
- Server Component (page.tsx) โ Client Component (PersonnelTableContainer)
### 3๏ธโฃ ์ปดํฌ๋ํธ ์์ ํ๋ก์ฐ (sequential-thinking ๊ฒ์ฆ)
ใ1๋จ๊ณใuseState ์ด๊ธฐ๊ฐ ์ค์
ใ2๋จ๊ณใuseDataTablePersonnel ํ
ํธ์ถ
ใ3๋จ๊ณใTanStack Query๊ฐ queryFn ์คํ
ใ4๋จ๊ณใpersonnelApi.getList() ํธ์ถ
ใ5๋จ๊ณใ์๋ต ๋ฐ์ดํฐ๋ฅผ Query ์บ์์ ์ ์ฅ
ใ6๋จ๊ณใ์ปดํฌ๋ํธ ๋ฆฌ๋ ๋๋ง
```
---
### 3๏ธโฃ ์ฃผ์ ์ถ๊ฐ (Documentation)
**ํธ๋ฆฌ๊ฑฐ ํค์๋**: "์ฃผ์ ์ถ๊ฐ", "๋ฌธ์ํ", "JSDoc ์์ฑ"
**์์
์์**:
```
[1๋จ๊ณ] code-analysis-rule.md๋ก ์ฝ๋ ํ๋ฆ ํ์
โ
[2๋จ๊ณ] doc-rule.md ๊ท์น ์ ์ฉ
- ํ์ผ ์๋จ TSDoc
- ํจ์/ํ์
TSDoc
- Step ์ฃผ์ (๋ณต์กํ ํจ์๋ง)
โ
[3๋จ๊ณ] ์ฝ๋ ๋ณ๊ฒฝ ์์ด ์ฃผ์๋ง ์ถ๊ฐ
```
**ํตํฉ ์์**:
```typescript
/**
* @file PersonnelTableContainer.tsx
* @description ์ธ์ฌ ๊ธฐ์ค์ ๋ณด ๋ชฉ๋ก ์กฐํ ๋ฐ ๊ด๋ฆฌ ์ปจํ
์ด๋
* @author jihoon87.lee
* @remarks
* - [๋ ์ด์ด] Components (UI)
* - [์ฌ์ฉ์ ํ๋] ๋ชฉ๋ก ์กฐํ โ ๊ฒ์/ํํฐ โ ์์ธ โ ํธ์ง/์ญ์
* - [๋ฐ์ดํฐ ํ๋ฆ] UI โ useDataTablePersonnel โ personnelApi โ TanStack Query ์บ์ โ UI
* - [์ฐ๊ด ํ์ผ] useDataTablePersonnel.ts, personnelApi.ts
*/
'use client';
// (code-analysis-rule๋ก ๋ถ์ โ doc-rule๋ก ์ฃผ์ ์ถ๊ฐ)
```
---
### 4๏ธโฃ ๋ฆฌํฉํ ๋ง (Refactoring)
**ํธ๋ฆฌ๊ฑฐ ํค์๋**: "๋ฆฌํฉํ ๋ง", "๊ตฌ์กฐ ๊ฐ์ ", "ํด๋ ์ ๋ฆฌ", "์ฑ๋ฅ ๊ฐ์ "
**์์
์์**:
```
[1๋จ๊ณ] refactoring-rule.md์ ์ํฌํ๋ก์ฐ ์ ์ฉ
โ
[1-1] sequential-thinking์ผ๋ก ์์กด์ฑ ์ง๋ ์์ฑ
- ํ์ผ ์ด๋ ์ ์ํฅ ๋ฒ์ ๋ถ์
- import ๊ฒฝ๋ก ๋ณ๊ฒฝ ๋ชฉ๋ก ์์ฑ
โ
[1-2] context7๋ก ์ต์ ํด๋ ๊ตฌ์กฐ ํจํด ํ์ธ
- TanStack Query v5 ๊ถ์ฅ ๊ตฌ์กฐ
- Next.js 15 App Router ์ต์ ํ
โ
[2๋จ๊ณ] refactoring-rule.md์ ํ์ค ๊ตฌ์กฐ๋ก ์ฌ๊ตฌ์ฑ
- apis/, hooks/, types/, stores/, components/
โ
[3๋จ๊ณ] vercel-react-best-practices๋ก ์ฑ๋ฅ ์ต์ ํ
- bundle-barrel-imports: ์ง์ import
- rerender-memo: ๋ถํ์ํ ๋ฆฌ๋ ๋ ๋ฐฉ์ง
โ
[4๋จ๊ณ] builder-rule.md๋ก ์ฌ๊ตฌํ (ํ์ ์)
```
**ํตํฉ ์์**:
```markdown
# [์์] work-execution ๊ธฐ๋ฅ ๋ฆฌํฉํ ๋ง
## [1๋จ๊ณ] sequential-thinking ์์กด์ฑ ๋ถ์
- ํ์ฌ ํ์ผ: workExecutionOld.tsx (800์ค, ๋จ์ผ ํ์ผ)
- ์์กดํ๋ ์ธ๋ถ ํ์ผ: app/standards/work-execution/page.tsx
- ์ํฅ๋ฐ๋ import: 3๊ฐ ํ์ผ
## [1-2] context7 ์ต์ ํจํด ์กฐํ
- TanStack Query v5: queryKeys๋ฅผ ๋ณ๋ ํ์ผ๋ก ๋ถ๋ฆฌ ๊ถ์ฅ
- Next.js 15: Parallel Routes๋ก loading ์ํ ๋ถ๋ฆฌ ๊ฐ๋ฅ
## [2๋จ๊ณ] refactoring-rule ํ์ค ๊ตฌ์กฐ ์ ์ฉ
src/features/standards/work-execution/
โโโ apis/
โ โโโ workExecution.api.ts
โ โโโ workExecutionForm.adapter.ts
โโโ hooks/
โ โโโ queryKeys.ts
โ โโโ useWorkExecutionList.ts
โโโ types/
โ โโโ workExecution.types.ts
โโโ stores/
โ โโโ workExecutionStore.ts
โโโ components/
โโโ WorkExecutionContainer.tsx
โโโ WorkExecutionModal.tsx
## [3๋จ๊ณ] vercel-react-best-practices ์ ์ฉ
- bundle-barrel-imports: index.ts ์ ๊ฑฐ, ์ง์ ๊ฒฝ๋ก ์ฌ์ฉ
- rerender-memo: WorkExecutionModal์ React.memo๋ก ๊ฐ์ธ๊ธฐ
- async-parallel: API ํธ์ถ์ Promise.all๋ก ๋ณ๋ ฌํ
```
---
## ๐ ๏ธ MCP ๋๊ตฌ ํ์ฉ ๊ฐ์ด๋
### Sequential Thinking ์ฌ์ฉ ์์
1. **๋ณต์กํ ๋น์ฆ๋์ค ๋ก์ง ๊ตฌํ ์ **
- ์: ๋ค๋จ๊ณ Form ๊ฒ์ฆ, ๋ณต์กํ ์ํ ๋จธ์
- ๋ชฉ์ : ์ฃ์ง ์ผ์ด์ค ์ฌ์ ๋์ถ
2. **๋ฆฌํฉํ ๋ง ์ ์์กด์ฑ ๋ถ์**
- ์: ํ์ผ ์ด๋ ์ ์ํฅ ๋ฒ์ ํ์
- ๋ชฉ์ : Broken Import ๋ฐฉ์ง
3. **์ฝ๋ ๋ถ์ ์ ๋ฐ์ดํฐ ํ๋ก์ฐ ๊ฒ์ฆ**
- ์: ๋ธ๋ผ์ฐ์ ๋ ๋๋ง ๋จ๊ณ, ๋ฐ์ดํฐ ํ์นญ ์์
- ๋ชฉ์ : ๋
ผ๋ฆฌ์ ํ๋ฆ ๋ช
ํํ
### Context7 ์ฌ์ฉ ์์
1. **์ธ๋ถ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ต์ API ํ์ธ**
- ์: SpreadJS v18, TanStack Query v5
- ๋ชฉ์ : ๊ณต์ ๋ฌธ์ ๊ธฐ๋ฐ ์ ํํ ๊ตฌํ
2. **๋ฆฌํฉํ ๋ง ์ ์ต์ ํจํด ํ์ธ**
- ์: Next.js 15 App Router ๊ถ์ฅ ๊ตฌ์กฐ
- ๋ชฉ์ : ์ต์ ํ์ค๊ณผ ํ๋ก์ ํธ ๋ฃฐ ๊ฒฐํฉ
3. **์ฑ๋ฅ ์ต์ ํ ๊ฒ์ฆ**
- ์: React 19 ์ ๊ท Hook ํ์ฉ๋ฒ
- ๋ชฉ์ : ์ต์ ๊ธฐ๋ฒ ์ ์ฉ
---
## ๐ ์ค์ ์ ์ฉ ์์
### ์์ 1: ์ ๊ธฐ๋ฅ ๊ฐ๋ฐ ์์ฒญ
**์ฌ์ฉ์ ์์ฒญ**: "๋ฆฌ๋ ์์ฑ ๋ชจ๋ฌ์ ๋ง๋ค์ด์ค"
**AI ์์
ํ๋ก์ธ์ค**:
1. `builder-rule.md` ๋ก๋ โ Tech Stack ํ์ธ
2. `nextjs-app-router-patterns` ์ฐธ๊ณ โ Client Component ํจํด ํ์ธ
3. `vercel-react-best-practices` ์ ์ฉ โ `rerender-memo`, `rendering-conditional-render`
4. `builder-rule.md` ์ถ๋ ฅ ํ์์ผ๋ก ์ฝ๋ ์ ๊ณต
### ์์ 2: ์ฝ๋ ํ๋ก์ฐ ๋ถ์ ์์ฒญ
**์ฌ์ฉ์ ์์ฒญ**: "PersonnelTableContainer๊ฐ ์ด๋ป๊ฒ ์๋ํ๋์ง ์ค๋ช
ํด์ค"
**AI ์์
ํ๋ก์ธ์ค**:
1. `code-analysis-rule.md` ๋ก๋ โ ๋ถ์ ์์ ์ค์
2. `sequential-thinking` ์ฌ์ฉ โ ๋ฐ์ดํฐ ํ์นญ ์์ ๊ฒ์ฆ
3. `nextjs-app-router-patterns` ์ฐธ๊ณ โ Server/Client ๊ตฌ๋ถ ์ค๋ช
4. `code-analysis-rule.md` ํ
ํ๋ฆฟ์ผ๋ก ๊ฒฐ๊ณผ ์ถ๋ ฅ
### ์์ 3: ๋ฆฌํฉํ ๋ง ์์ฒญ
**์ฌ์ฉ์ ์์ฒญ**: "work-execution ํด๋๋ฅผ ์ ๋ฆฌํด์ค"
**AI ์์
ํ๋ก์ธ์ค**:
1. `refactoring-rule.md` ๋ก๋ โ ์ํฌํ๋ก์ฐ ํ์ธ
2. `sequential-thinking` ์ฌ์ฉ โ ์์กด์ฑ ์ง๋ ์์ฑ
3. `context7` ์กฐํ โ TanStack Query v5 ๊ถ์ฅ ๊ตฌ์กฐ ํ์ธ
4. `refactoring-rule.md` ํ์ค ๊ตฌ์กฐ๋ก ์ฌ๊ตฌ์ฑ
5. `vercel-react-best-practices` ์ ์ฉ โ `bundle-barrel-imports`, `rerender-memo`
---
## โ
์ฒดํฌ๋ฆฌ์คํธ
์์
์์ ์ ํญ์ ํ์ธ:
- [ ] ์์
์ ํ์ด ๋ฌด์์ธ๊ฐ? (๊ฐ๋ฐ/๋ถ์/์ฃผ์/๋ฆฌํฉํ ๋ง)
- [ ] ์ฃผ ๋ฃฐ(Primary)๊ณผ ๋ณด์กฐ ๋ฃฐ(Secondary)์?
- [ ] ์ด๋ค Skill์ ์ฐธ๊ณ ํด์ผ ํ๋๊ฐ?
- [ ] MCP ๋๊ตฌ(sequential-thinking, context7)๊ฐ ํ์ํ๊ฐ?
- [ ] ์ถ๋ ฅ ํ์์ ์ด๋ค ๋ฃฐ์ ๋ฐ๋ฅด๋๊ฐ?
---
## ๐ ํ์ต ์๋ฃ
- **builder-rule.md**: Tech Stack, ์ฝ๋ฉ ์์น, ์ถ๋ ฅ ํ์
- **code-analysis-rule.md**: ๋ถ์ ์์, TypeScript ํ์
์ค๋ช
- **doc-rule.md**: TSDoc ํ์, Step ์ฃผ์ ๊ท์น
- **refactoring-rule.md**: ํด๋ ๊ตฌ์กฐ, ์ํฌํ๋ก์ฐ
- **nextjs-app-router-patterns**: Next.js ํจํด, Server/Client ๊ตฌ๋ถ
- **vercel-react-best-practices**: ์ฑ๋ฅ ์ต์ ํ 57๊ฐ ๋ฃฐ