| name | gif-feature |
| description | GIF project full-feature scaffolding orchestrator. Use when implementing a new feature end-to-end: API integration, pages, components, types, and hooks. Triggers on: '๊ธฐ๋ฅ ๊ตฌํ', '์ ๊ธฐ๋ฅ ๋ง๋ค์ด์ค', 'feature ์ถ๊ฐ', 'API ์ฐ๋ํ๊ณ ํ์ด์ง ๋ง๋ค์ด์ค', 'scaffold', '์ ์ฒด ๊ตฌํ', '{๊ธฐ๋ฅ๋ช
} ๋ง๋ค์ด์ค', 'implement {feature}', 'ํ์ด์ง๋ API ๊ฐ์ด ๋ง๋ค์ด์ค'. Also handles re-runs, partial updates, and additions to existing features. |
GIF Feature Orchestrator
Execution Mode
Sub-agent pipeline (api-agent โ ui-agent, sequential)
Both agents invoked via Agent tool with model: "opus".
Phase 0: Context Check
- Identify target app: admin or client (ask if ambiguous)
- Check existing files related to the feature:
apps/{app}/src/entities/{domain}/
apps/{app}/src/features/{action}/
apps/{app}/src/views/{page}/
apps/{app}/src/widgets/{name}/
apps/{app}/src/app/{route}/
- Determine run mode:
- Initial: No related files exist โ run all phases
- Partial add: Some files exist โ skip existing, add only what's missing
- Update: Feature exists, user wants changes โ identify which layer to update (API-only โ Phase 2, UI-only โ Phase 3)
Phase 1: Feature Plan
Before writing any code, establish:
| Item | Decision |
|---|
| Target app(s) | admin, client, or both |
| API endpoints | Method + path for each operation (GET/POST/PATCH/DELETE) |
| Response shape | TypeScript interface fields |
| Route path | Where in app/ the page lives |
| Role guard | Which admin role(s) can access (if admin app) |
| FSD layers needed | Which of entities/features/widgets/views are required |
| Component split | Which parts are Server vs Client |
| Shared vs local | Types/components shared in packages/lib or packages/ui? |
Report the plan to the user as a table before proceeding. Proceed automatically unless the user raises an issue.
Phase 2: API Layer
Agent: api-agent
Prompt template:
You are the api-agent. Feature: {feature_name} in the {app} app.
API endpoints to implement: {endpoint_list}
Response types: {type_spec}
Target files (FSD):
- Types:
apps/{app}/src/entities/{domain}/model/types.ts
- Service:
apps/{app}/src/entities/{domain}/api/{domain}Api.ts
- Hooks:
apps/{app}/src/entities/{domain}/api/use{Domain}.ts
Follow the GIF project API conventions: use apiClient from @repo/lib, TanStack Query v5 array queryKey, and Sonner for mutation feedback. Create all three files.
Outputs: list of created files โ passed to Phase 3.
Phase 3: UI Layer
Agent: ui-agent
Prompt template:
You are the ui-agent. Feature: {feature_name} in the {app} app.
API hooks available at: {hook_file_paths}
Route: apps/{app}/src/app/{route}/
Role guard needed: {yes/no, role_name}
Create: page.tsx (and layout.tsx if a new route group), plus any sub-components.
Rules: Server Component by default; add 'use client' only for interactive parts. Use design tokens from packages/ui/src/tokens.css. Import hooks from the paths above.
Outputs: list of created files.
Data Flow
Phase 1 (plan) โ feature name, endpoints, types, route, role guard
Phase 2 (api-agent) โ created file paths
Phase 3 (ui-agent) โ receives Phase 2 output + plan context
Error Handling
| Error | Action |
|---|
| Target app unclear | Ask user before Phase 1 |
| API spec unclear | Make reasonable REST assumptions, note them in plan |
| Phase 2 fails | Stop and report; do not run Phase 3 with broken API layer |
| Existing file conflict | Read existing file first, merge or extend rather than overwrite |
Test Scenarios
Normal โ full feature:
"ํ๋ก์ ํธ ๋ชฉ๋ก ์กฐํ ํ์ด์ง ๋ง๋ค์ด์ค (client ์ฑ)"
Expected: Phase 1 plans route + API, Phase 2 creates service + hook, Phase 3 creates page with the hook.
Partial โ API only:
"ํ ๋ฉค๋ฒ ์กฐํ API ์ฐ๋ํด์ค"
Expected: Phase 0 detects UI layer not requested โ Phase 2 only.
Partial โ UI only:
"์ด๋ฏธ ๋ง๋ API ํ
์๋๋ฐ ํ์ด์ง๋ง ๋ง๋ค์ด์ค"
Expected: Phase 0 detects API files exist โ Phase 3 only.