| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Invoke | /feature:create |
| Aliases | /feature:full, /feature:orchestrate |
| Tools | Read, Edit, Write, Bash, Glob, Grep |
| Model | inherit |
| Skills | feature |
/feature:create โ ๊ธฐ๋ฅ ํ๋๋ฅผ ์ฒ์๋ถํฐ ๋๊น์ง ๋ง๋๋ ์ด๊ฐ๋ #
ํ๋ง๋๋ก#
์ ๊ธฐ๋ฅ ํ๋๋ฅผ ์๋ฒ(๋ฐฑ์๋)๋ถํฐ ํ๋ฉด(ํ๋ก ํธ์๋)๊น์ง ํ ๋ฒ์ ํต์งธ๋ก ๋ง๋ค์ด์ฃผ๋ "ํ์ฅ ์ด๊ฐ๋ " ์ ๋๋ค. ์ง ํ ์ฑ๋ฅผ ์ง์ ๋ ๊ธฐ์ด ๊ณต์ฌยท๊ณจ์กฐยท์ธํ ๋ฆฌ์ด๋ฅผ ๊ฐ ์ ๋ฌธ ํ์ ์์๋๋ก ๋งก๊ธฐ๊ณ ๋ง์ง๋ง์ ์ง์ ์ด์๋ณด๋ฉฐ ์ ๊ฒํ๋ ํ์ฅ์์ฅ ์ญํ ์ด๋ผ๊ณ ๋ณด๋ฉด ๋ฉ๋๋ค.
๋๊ฐยท์ธ์ ์ฐ๋์#
- ์๋ก์ด ๊ธฐ๋ฅ(์: ๊ฒ์ํ, ์๋ฆผ, ๊ฒฐ์ ๋ด์ญ ๋ฑ)์ ๋ฐ์ดํฐ ์ ์ฅ๋ถํฐ ์ฌ์ฉ์ ํ๋ฉด๊น์ง ์ ๋ถ ์๋ก ๋ง๋ค์ด์ผ ํ ๋
- ๋ฐฑ์๋ ๋ฐ๋ก, ํ๋ก ํธ์๋ ๋ฐ๋ก ๋ง๋ค์ง ์๊ณ ํ ๋ฒ์ ์ผ๊ด๋๊ฒ ๋ง๋ค๊ณ ์ถ์ ๋
/feature:create๋ช ๋ น์ ์คํํ๋ฉด ์ด ์ด๊ฐ๋ ์ด ๊นจ์ด๋ ์์ ์ ์์ํฉ๋๋ค.
๋ฌด์์ ํด์ฃผ๋์#
๊ธฐ๋ฅ ์ด๋ฆ๊ณผ ํต์ฌ ๋ฐ์ดํฐ ์ด๋ฆ๋ง ์๋ ค์ฃผ๋ฉด, ์๋ ๊ฒฐ๊ณผ๋ฌผ์ด ์ฌ๋ฐ๋ฅธ ์์น์ ์๋์ผ๋ก ๋ง๋ค์ด์ง๋๋ค.
-
์๋ฒ ์ชฝ: ๋ฐ์ดํฐ ๋ชจ๋ธ ํ์ผ(
*.spy.yaml), ํต์ ์ฐฝ๊ตฌ({feature}_endpoint.dart), ์ฒ๋ฆฌ ๋ก์ง({feature}_service.dart), DB ๋ณ๊ฒฝ๋ถ(๋ง์ด๊ทธ๋ ์ด์ ) -
์ฑ ์ชฝ: ์
๋ฌด ๊ท์น(domain), ๋ฐ์ดํฐ ์ฐ๊ฒฐ(data), ํ๋ฉดยท์ํ๊ด๋ฆฌ(presentation), ์ฐ๊ฒฐ ์ค์ (
di/injection.dart) - ๋ง์ง๋ง์๋ ์ค์ ์๋ฒ๋ฅผ ๋์ ์ฑ๊ณผ ์๋ฒ๊ฐ ์ง์ง๋ก ์ ๋ง๋ฌผ๋ ค ๋์ํ๋์ง๊น์ง ์ง์ ํ์ธํด ์ค๋๋ค.
์ด๋ป๊ฒ ์ฐ๋์#
# ๊ธฐ๋ณธ ํํ (๋๋์): ๊ธฐ๋ฅ ์ด๋ฆ๊ณผ ๋ฐ์ดํฐ ์ด๋ฆ์ ์ง์
/feature:create # ์คํํ๋ฉด feature_name, entity_name ๋ฑ์ ๋ฌผ์ด๋ด
๋๋ค
# ๊ฐ์ ๋ช
๋ น์ ๋ค๋ฅธ ์ด๋ฆ(๋ณ์นญ)์ผ๋ก๋ ์คํ ๊ฐ๋ฅ
/feature:full
/feature:orchestrate
์ง์ ํ ์ ์๋ ๊ฐ๋ค:
feature_name(ํ์) โ ๊ธฐ๋ฅ ๋ชจ๋ ์ด๋ฆ (์:order_history)entity_name(ํ์) โ ํต์ฌ ๋ฐ์ดํฐ ์ด๋ฆ (์:OrderHistory)-
location(์ ํ) โ ์ด๋์ ๋์ง:application/common/console(๊ธฐ๋ณธapplication) -
caching(์ ํ) โ ๋ฐ์ดํฐ ์บ์ฑ ๋ฐฉ์:swr/cache-first/none(๊ธฐ๋ณธswr) -
endpoint_type(์ ํ) โ ํต์ ์ฐฝ๊ตฌ ์ข ๋ฅ:app/console/both(๊ธฐ๋ณธapp)
์ ์ต์ ๊ณผ ๊ฐ๋ค์ ๋ชจ๋ ๋ฌธ์์ ์ ์๋ ์ค์ ํญ๋ชฉ์ ๋๋ค.
์์์ ๋ฌด์จ ์ผ์ด ๋ฒ์ด์ง๋์#
์ด๊ฐ๋ ์ ๋ค์ ์์๋ก ์ผ์ ์งํํฉ๋๋ค.
- ์ฌ์ ์ ๊ฒ(Preflight) โ ์์ ์ ํ์ํ ๋๊ตฌ(MCP)๊ฐ ๊น๋ ค ์๋์ง ํ์ธํ๊ณ , ์์ผ๋ฉด ์๋์ผ๋ก ์ค์นยท๋ฑ๋กํฉ๋๋ค. ์ฌ๊ธฐ์ ๋งํ๋ฉด ๋ฉ์ถ๊ณ ์ฌ์ฉ์์๊ฒ ๋ณด๊ณ ํฉ๋๋ค.
- ๊ธฐ์กด ๊ธฐ๋ฅ ํ์ธ โ ๊ฐ์ ์ด๋ฆ์ ๊ธฐ๋ฅ์ด ์ด๋ฏธ ์์ผ๋ฉด "์์ ํ ์ง / ๊ฑด๋๋ธ์ง / ์๋ก ๋ง๋ค์ง" ๋ฌผ์ด๋ด ๋๋ค.
- ์๊ตฌ์ฌํญ ์ ๋ฆฌ & ๊ณํ ์๋ฆฝ โ ๋ฌด์์ ๋ง๋ค์ง ๋ํ๋ก ํ์ธํ๊ณ ํ ์ผ ๋ชฉ๋ก์ ๋ง๋ญ๋๋ค.
- ์๋ฒ(๋ฐฑ์๋) ๋ง๋ค๊ธฐ โ ๋ฐ์ดํฐ ๋ชจ๋ธ โ ํต์ ์ฐฝ๊ตฌ โ ์ฝ๋ ์์ฑ โ DB ๋ณ๊ฒฝ ์์ผ๋ก ์งํํฉ๋๋ค.
- ์ฑ(ํ๋ก ํธ์๋) ๋ง๋ค๊ธฐ โ ์ ๋ฌด ๊ท์น โ ๋ฐ์ดํฐ ์ฐ๊ฒฐ โ ํ๋ฉด ์์ผ๋ก ๋ง๋ญ๋๋ค.
- ๋์์ธ ์ ์ฉ & ์ค์ ๋์ ๊ตฌํ โ ํ์ํ๋ฉด Figma ์คํ์ผ์ ์ ํ๊ณ ์ค์ ๋์์ ์ฑ์๋๋ค.
-
์ฐ๊ฒฐ & ๊ฒ์ฆ โ ์ค์ ์ ์ฐ๊ฒฐํ๊ณ , ์ฝ๋ ๋ถ์ยทํ
์คํธ๋ฅผ ๋๋ฆฐ ๋ค, ์ค์ ์๋ฒ๋ฅผ ๋์(
serverpod start) ์ฑ๊ณผ ์๋ฒ๊ฐ ์ง์ง๋ก ๋ง๋ฌผ๋ฆฌ๋์ง ํตํฉ ๊ฒ์ฆํฉ๋๋ค. ๋ฌธ์ ๊ฐ ์๊ธฐ๋ฉด ์๋ฒ ๋ก๊ทธ๋ฅผ ๋ณด๊ณ ๊ณ ์น ๋ค ๋ค์ ๋๋ฆฝ๋๋ค.
โ๏ธ ์์ธ ์ต์ ยท์คํ ๋ช ์ธ (๊ฐ๋ฐ์ / AI ์์ด์ ํธ์ฉ)
Role#
Orchestrates complete Feature creation from Serverpod backend to Flutter frontend.
Activation Conditions#
/feature:createActivated when command is invoked
Parameters#
| Parameter | Required | Description |
|---|---|---|
feature_name | โ | Feature module name (snake_case) |
entity_name | โ | Entity name (PascalCase) |
location | โ | application, common, console (default: application) |
caching | โ | swr, cache-first, none (default: swr) |
endpoint_type | โ | app, console, both (default: app) |
Execution Flow Summary#
Phase 0: Preflight (MCP & ํ๊ฒฝ ์ ๊ฒ)
โ - marionette_mcp ์คํ ํ์ผ ํ์ธ
โ - ๋ฏธ์ค์น ์ `fvm dart pub global activate marionette_mcp` ์๋ ์คํ
โ - `claude mcp list`๋ก ์ฐ๊ฒฐ ์ํ ํ์ธ, ์คํจ ์ ์ ๋ ๊ฒฝ๋ก๋ก ์ฌ๋ฑ๋ก
โ - Cursor/Zed ์ค์ (`~/.cursor/mcp.json`, `~/.config/zed/settings.json`) ๋๊ธฐํ
โ (์คํจ ์ ์ค๋จ ํ ์ฌ์ฉ์์๊ฒ ๋ณด๊ณ )
Phase 0.5: Check existing Feature
โ (Select update/skip/regenerate)
Phase 1: Requirements gathering (Interactive)
โ
Phase 2: Plan creation (TodoWrite)
โ
Phase 3: Backend implementation
- Step 1: /serverpod:model ํธ์ถ
- Step 2: /serverpod:endpoint ํธ์ถ
- Step 3: backend:pod:generate
- Step 4: ๋ง์ด๊ทธ๋ ์ด์
โ
Phase 4: Frontend implementation
- Step 5: /feature:domain ํธ์ถ
- Step 6: /feature:data ํธ์ถ
- Step 7: /feature:presentation ํธ์ถ
โ
Phase 4.5: Figma style application (conditional)
โ
Phase 4.7: Actual behavior implementation
โ
Phase 5: Integration and verification
- DI ๋ฑ๋ก, Route ๋ฑ๋ก
- ์ฝ๋ ์์ฑ, ๋ถ์, ํ
์คํธ
- ๋ก์ปฌ ํ์คํ ํตํฉ ๊ฒ์ฆ โญ (serverpod start: server+๋ด์ฅ Postgres+app)
ยท ๋ก์ปฌ ๋ฐฑ์๋ ๋์ ํตํฉ (backend: dart test -t integration / front: ๋ก์ปฌ ๋ฐฑ์๋)
ยท ๋ฐฑ์๋ ๋ณ๊ฒฝ ์ ๋ง์ด๊ทธ๋ ์ด์
/๋ก๊ทธ๋ Serverpod MCP, ํด๋ฐฑ(3.x): docker compose + dart runCommand Invocation Order#
| Step | Command | Generated Content |
|---|---|---|
| 1 | /serverpod:model | Entity, DTO, Enum |
| 2 | /serverpod:endpoint | Endpoint, Service |
| 3 | backend:pod:generate | Code generation |
| 4 | backend:pod:*-migration | DB Migration |
| 5 | /feature:domain | Entity, Repository I/F, UseCase |
| 6 | /feature:data | Repository Implementation, Mixin, Cache |
| 7 | /feature:presentation | BLoC, Page, Widget, Route |
Generated Files Summary#
backend/kobic_server/lib/src/feature/{feature}/
โโโ model/entities/*.spy.yaml
โโโ model/dto/*.spy.yaml
โโโ endpoint/{feature}_endpoint.dart
โโโ service/{feature}_service.dart
feature/{location}/{feature}/lib/src/
โโโ domain/ (entity, repository, usecase)
โโโ data/ (repository, mixin, cache, local)
โโโ presentation/ (bloc, page, widget, route)
โโโ di/injection.dartSuccess Criteria#
- โ All files generated in correct locations
- โ
melos run analyzeNo errors - โ
melos run test --scope={feature}Passes - โ DI Registration complete
- โ Route Registration complete
- โ
๋ก์ปฌ ํ์คํ(
serverpod start: server+๋ด์ฅ Postgres+app) ๊ธฐ๋ ๋ฐ ๋ก์ปฌ ๋ฐฑ์๋ ๋์ ํตํฉ ๊ฒ์ฆ ํต๊ณผ (๋ฐฑ์๋ ๋ณ๊ฒฝ ์)
Local Full-Stack Integration Verification (Serverpod 4 / ๋ก์ปฌ ํ์คํ) โญ#
Phase 5์์ ์์ ฏ/์ ๋ mock ํ ์คํธ์ ๋ณ๊ฐ๋ก, ์ค์ ๋ฐฑ์๋๋ฅผ ๋์ด ์ํ์์ backendโfront ๊ณ์ฝ์ ๊ฒ์ฆํ๋ ๋จ๊ณ. Serverpod 4์ ๋ด์ฅ Postgres ๋๋ถ์ Docker ์์ด ์์ ๋ก์ปฌ๋ก ์ํํ๋ค.
์ธ์ ์ผ๋๊ฐ (When to enable)
- Phase 3(Backend)์์ ๋ชจ๋ธ/์๋ํฌ์ธํธ๊ฐ ์ถ๊ฐยท๋ณ๊ฒฝ๋์๊ฑฐ๋, Phase 4 data layer๊ฐ ์ค์ endpoint๋ฅผ ํธ์ถํ๋ ๊ฒฝ์ฐ ON.
- ์์ ์์ ฏ/์ ๋๋ง ๋ณ๊ฒฝ๋ ๊ฒฝ์ฐ๋ ์๋ต(๊ธฐ์กด mock ํ ์คํธ๋ก ์ถฉ๋ถ).
๊ธฐ๋ (Start up)
serverpod startํ ๋ช ๋ น์ผ๋ก ๋ฐฑ์๋ ์๋ฒ + ๋ด์ฅ Postgres + Flutter ์ฑ์ ํจ๊ป ๊ธฐ๋(์๋ฒยทDBยท์นยท์ฑ sub-second stateful ํซ๋ฆฌ๋ก๋, ์ฌ์ปดํ์ผ/์ฌ์์ ์์).- ์ฑ์ dev flavor์์ ๋ก์ปฌ ์๋ฒ(
http://localhost:8080/)๋ก ์ฐ๊ฒฐ, Staging์ ํด๋ฐฑ. base-URL์ ์ฑ์ ๊ธฐ์กด client/OpenApiService/flavor ์ค์ ์ ๋ฐ๋ฅด๊ณ ํ๋์ฝ๋ฉ ๊ธ์ง. - ํซ๋ฆฌ๋ก๋๊ฐ ๋งํ๋ฉด
serverpod startํฐ๋ฏธ๋์์ R ํค๋ก ์๋ฒ+์ฑ ๊ฐ์ ์ฌ์์.
ํตํฉํ ์คํธ ์คํ (Run integration tests)
- ๋ฐฑ์๋:
withServerpodํฌํผ ๊ธฐ๋ฐ ํตํฉํ ์คํธ๋ฅผdart test -t integration์ผ๋ก ์คํ(๋ด์ฅ Postgres๋ผ Docker ๋ถํ์). - ํ๋ก ํธ: feature/Patrol/ํตํฉ ํ ์คํธ๋ mock์ด ์๋๋ผ ๋ฐฉ๊ธ ๋์ด ๋ก์ปฌ ๋ฐฑ์๋๋ฅผ ๋์์ผ๋ก ์ํ.
- ๋ฐฑ์๋ ๋ณ๊ฒฝ ์ DB ๋ง์ด๊ทธ๋ ์ด์ ์์ฑยท์ ์ฉ, ์๋ฒ ๋ก๊ทธ ์ฝ๊ธฐ, ์ฑ ๊ตฌ๋+์คํฌ๋ฆฐ์ท ๊ฒํ ๋ Serverpod MCP๋ก ์คํ ์ค์ธ ๋ก์ปฌ ์๋ฒ์ ์ฐ๊ฒฐํด ์ํ.
์ข ๋ฃ (Tear down)
- ๊ฒ์ฆ ์๋ฃ ํ
serverpod startํ๋ก์ธ์ค๋ฅผ ์ข ๋ฃ(ํฐ๋ฏธ๋ ์ข ๋ฃ/Ctrl+C). ๋ด์ฅ Postgres๋ ํจ๊ป ์ ๋ฆฌ๋จ.
์คํจ ์ ์ฒ๋ฆฌ (On failure)
- ํตํฉํ ์คํธ ์คํจ: ์๋ฒ ๋ก๊ทธ(Serverpod MCP)๋ก ์์ธ ํ์ธ โ ๋ชจ๋ธ/์๋ํฌ์ธํธ/data layer ์์ โ ํซ๋ฆฌ๋ก๋(๋๋ R ํค ์ฌ์์) ํ ์ฌ์คํ.
- ๊ธฐ๋ ์คํจ: ํฌํธ ์ถฉ๋/์์กด ํ๋ก์ธ์ค ์ ๋ฆฌ ํ ์ฌ๊ธฐ๋. Serverpod 3.x(legacy) ํ๊ฒฝ์ด๋ฉด ํด๋ฐฑ ๊ฒฝ๋ก ์ฌ์ฉ.
- ํด๋ฐฑ (3.x / legacy): ๋ด์ฅ Postgres๊ฐ ์์ผ๋ฏ๋ก
docker compose up -d๋ก DB ๊ธฐ๋ โdart run bin/main.dart๋ก ์๋ฒ ๊ธฐ๋ โ ๋์ผํ๊ฒdart test -t integration์ํ.
์์ธ ์ ์ฐจ๋ serverpod-local-fullstack, serverpod-mcp-guide ์คํฌ ์ฐธ์กฐ.
Error Handling#
| Phase | On Failure |
|---|---|
| Preflight (MCP) | fvm dart pub global activate marionette_mcp ์ฌ์คํ โ ์ ๋ ๊ฒฝ๋ก ์ฌ๋ฑ๋ก โ snapshot ๋ถ์ผ์น(exit 253) ์ ์ฌํ์ฑํ |
| Model creation | Re-verify field definitions |
| Endpoint creation | Verify import paths |
| Domain creation | Verify Entity field mapping |
| Data creation | Verify namespace imports |
| Presentation creation | Verify BLoC pattern, UseCase calls |
| ๋ก์ปฌ ํ์คํ ํตํฉ ๊ฒ์ฆ | ํตํฉํ
์คํธ ์คํจ ์ Serverpod MCP๋ก ์๋ฒ ๋ก๊ทธ ํ์ธ โ ์์ โ ํซ๋ฆฌ๋ก๋/R ํค ์ฌ์์ ํ ์ฌ์คํ. ๊ธฐ๋ ์คํจ ์ ํฌํธ ์ถฉ๋ยท์์กด ํ๋ก์ธ์ค ์ ๋ฆฌ ํ ์ฌ๊ธฐ๋. ํด๋ฐฑ(3.x): docker compose up -d + dart run bin/main.dart |
Phase 0 Preflight Script (reference implementation)#
set -euo pipefail
MCP_BIN= " $HOME/.pub-cache/bin/marionette_mcp "
FVM_BIN= " /Users/dongwoo/fvm/default/bin "
# 1) ์คํ ํ์ผ ํ์ธ + fvm ๊ฒฝ์ ์๋ ์ค์น
if [ ! -x " $MCP_BIN " ]; then
echo " โ ๏ธ marionette_mcp ๋ฏธ์ค์น โ fvm dart pub global activate ์คํ "
fvm dart pub global activate marionette_mcp
fi
# 2) PATH ์ฃผ์
(GUI ์ฑ ๊ณ ๋ ค: ~/.zshrc ์
๋ฐ์ดํธ + ํ์ฌ ์ ๋ฐ์)
case " :$PATH: " in
* " :$HOME/.pub-cache/bin: " *) ;;
*)
echo ' export PATH= " $PATH:$HOME/.pub-cache/bin " ' > > " $HOME/.zshrc "
export PATH= " $PATH:$HOME/.pub-cache/bin "
;;
esac
# 3) Claude Code MCP ๋ฑ๋ก ์ํ ํ์ธ/์ฌ๋ฑ๋ก
if ! claude mcp list 2 > & 1 | grep -q " marionette:.*โ Connected " ; then
claude mcp remove marionette 2 > /dev/null || true
claude mcp add --transport stdio marionette -- " $MCP_BIN "
fi
# 4) Cursor/Zed ์ค์ ๋ถ์ฌ ์ ์์ฑ ์๋ด (GUI ์ฑ์ ์ ๋ ๊ฒฝ๋ก + env.PATH ํ์)
test -f " $HOME/.cursor/mcp.json " || echo " โน๏ธ Cursor ์ค์ ํ์ (~/.cursor/mcp.json) "
test -f " $HOME/.config/zed/settings.json " || echo " โน๏ธ Zed ์ค์ ํ์ (~/.config/zed/settings.json) "fvm ์ฃผ์:
dart๋ zshrc alias(fvm dart)๋ผ ๋น๋ํํ/GUI subprocess์์ ํด๊ฒฐ๋์ง ์์. ์คํฌ๋ฆฝํธ์์๋ ํญ์fvm dart๋๋/Users/dongwoo/fvm/default/bin/dart์ ๋ ๊ฒฝ๋ก๋ฅผ ์ฌ์ฉ.