| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Model | sonnet |
implementation-agent โ ์ด์๋ฅผ ์ฝ๋๋ก ๋ฐ๊พธ๋ ๊ตฌํ ๋ด๋น์#
์ด์ ๋ด์ฉ์ ๋ถ์ํด ์ฝ๋๋ฅผ ์์ฑํ๊ณ , ์์ ๋จ์๋ง๋ค ์ปค๋ฐ์ ๋จ๊ธฐ๋ ์๋ ๊ตฌํ ์์ด์ ํธ์ ๋๋ค.
ํ๋ง๋๋ก#
ํฐ์ผ(์ด์)์ ์ ํ "์ด๋ฐ ํ๋ฉด/๊ธฐ๋ฅ์ ๋ง๋ค์ด ์ฃผ์ธ์"๋ฅผ ์ฝ๊ณ , ์ค์ ์ฝ๋๋ฅผ ๋์ ์ง๊ณ ์ ์ฅ(์ปค๋ฐ)๊น์ง ํด ์ฃผ๋ ๊ฐ๋ฐ ๋ด๋น์์ ๋๋ค. ์ค๊ณ๋(์ด์)๋ฅผ ๋ฐ์์ ๋ถ์๋ณ ์ ๋ฌธ๊ฐ์๊ฒ ์ผ์ ๋๋ ์ฃผ๊ณ , ์์ฑ๋ ๋๋ง๋ค ์ฐจ๊ณก์ฐจ๊ณก ๊ธฐ๋ก์ ๋จ๊ธฐ๋ ํ์ฅ ๋ฐ์ฅ์ด๋ผ๊ณ ๋ณด๋ฉด ๋ฉ๋๋ค.
๋๊ฐยท์ธ์ ์ฐ๋์#
- ZenHub/GitHub ์ด์์ ์ ๋ฆฌ๋ ์๊ตฌ์ฌํญ(Acceptance Criteria)์ ์ค์ ์ฝ๋๋ก ์ฎ๊ฒจ์ผ ํ ๋ ์ฌ์ฉํฉ๋๋ค.
- ํ๋ฉด ํ๋๋ฅผ ํต์งธ๋ก ๋ง๋๋ ํฐ ์์ (Feature), ๋ฐฑ์๋๋ง ์๋ณด๋ ์์ (Backend Task), ๋ฒ๊ทธ ์์ (Bug), ์ผ๋ถ๋ง ์๋ณด๋ ์ธ๋ถ ์์ (Sub-task) ๋ฑ ์ด์ ์ข ๋ฅ์ ๋ง๊ฒ ์์์ ์ฒ๋ฆฌํฉ๋๋ค.
- ๋ณดํต์ ๊ฐ๋ฐ ์๋ํ ํ๋ฆ(์ด์ โ ๋ธ๋์น โ ๊ตฌํ โ PR) ์์์ "๊ตฌํ" ๋จ๊ณ๋ก ํธ์ถ๋ฉ๋๋ค.
๋ฌด์์ ํด์ฃผ๋์#
- ์ด์ ๋ด์ฉ์ ๋ถ์ํด ํ์ํ ์์ ๋ชฉ๋ก์ ๋ง๋ค๊ณ , ์ ์ ํ ์ ๋ฌธ ์์ด์ ํธ๋ค์๊ฒ ์ผ์ ๋๋ ์ค์ ์ฝ๋๋ฅผ ์์ฑํฉ๋๋ค.
-
์์
๋จ์(์: ๋๋ฉ์ธ / ๋ฐ์ดํฐ / ํ๋ฉด / ํ
์คํธ)๊ฐ ๋๋ ๋๋ง๋ค ๋ณ๋์ ์ปค๋ฐ์ผ๋ก ๊ธฐ๋ก์ ๋จ๊น๋๋ค. ์ปค๋ฐ ๋ฉ์์ง๋ ํ๊ตญ์ด๋ก ์์ฑ๋๊ณ , ํญ์ ์ด์ ๋ฒํธ(
Refs: #25๊ฐ์)๊ฐ ํจ๊ป ๋ถ์ต๋๋ค. - ๋จ์ ํ ์คํธ๋ฅผ ๋ฐ๋์ ํจ๊ป ๋ง๋ญ๋๋ค. (ํ๋ก ํธ์๋: UseCase + BLoC, ๋ฐฑ์๋: endpoint + service + ํตํฉ ํ ์คํธ) ํ ์คํธ๊ฐ ์์ผ๋ฉด ๋ค์ ๋จ๊ณ์ธ PR ์์ฑ์ด ๋งํ๋๋ค.
- ์งํ ์ํฉ์
TodoWrite๋ก ์ค์๊ฐ ์ถ์ ํด, ์ง๊ธ ์ด๋๊น์ง ๋๋์ง ๋ณด์ด๊ฒ ํฉ๋๋ค. - ๊ฒฐ๊ณผ๋ก๋ ๋ง๋ค์ด์ง ์ปค๋ฐ ๋ชฉ๋ก, ๋ณ๊ฒฝ๋ ํ์ผ ๋ชฉ๋ก, ์๋ก ๋ง๋ ํ ์คํธ ๋ชฉ๋ก์ ๋๋ ค์ค๋๋ค.
์ด๋ป๊ฒ ์ฐ๋์#
์ด ์์ด์ ํธ๋ ์ฌ๋์ด ์ง์ ๋ช ๋ น์ด๋ก ๋ถ๋ฅด๊ธฐ๋ณด๋ค, ์๋ํ ํ๋ฆ ์์์ ์๋์ ๊ฐ์ ์ ๋ ฅ๊ฐ์ ๋ฐ์ ์คํ๋ฉ๋๋ค.
issue_number : GitHub ์ด์ ๋ฒํธ (ํ์)
issue_body : ์ด์ ์์ธ ๋ด์ฉ (ํ์)
issue_type : Feature | Task | Bug | Sub-task (ํ์)
issue_title : ์ด์ ์ ๋ชฉ (ํ์)
feature_name : ๊ธฐ๋ฅ ๋ชจ๋ ์ด๋ฆ (์ ํ โ ์๋ ์ถ์ถ ๊ฐ๋ฅ)
์ด์ ์ข
๋ฅ(issue_type)์ ๋ฐ๋ผ ์ฒ๋ฆฌ ๋ฐฉ์์ด ๋ฌ๋ผ์ง๋๋ค.
Featureโ ๋๋ฉ์ธ โ ๋ฐ์ดํฐ โ ํ๋ฉด๊น์ง ์ ์ฒด ๊ณ์ธต์ ๊ตฌํTask(Backend) โ Serverpod ๋ฐฑ์๋๋ง ๊ตฌํBugโ ๋ฌธ์ ๋ถ์ ํ ์์ + ์ฌ๋ฐ ๋ฐฉ์ง ํ ์คํธ ์ถ๊ฐSub-taskโ ํด๋นํ๋ ํ ๊ณ์ธต๋ง ๊ตฌํ
์์์ ๋ฌด์จ ์ผ์ด ๋ฒ์ด์ง๋์#
ํฌ๊ฒ ๋ค์ฏ ๋จ๊ณ๋ก ์งํ๋ฉ๋๋ค.
- ์ด์ ๋ถ์ โ ์ด์ ์ข ๋ฅ๋ฅผ ํ์ธํ๊ณ , ์๊ตฌ์ฌํญ(Acceptance Criteria)๊ณผ ๊ธฐ์ ์์ ๋ชฉ๋ก, ๊ธฐ๋ฅ ์ด๋ฆ์ ๋ฝ์๋ ๋๋ค.
- ์์ ๊ณํ ์ธ์ฐ๊ธฐ โ ํด์ผ ํ ์ผ๋ค์ ๋ชฉ๋ก์ผ๋ก ๋ง๋ค๊ณ , ์ด๋ค ์ ๋ฌธ ์์ด์ ํธ๋ฅผ ์ด๋ค ์์๋ก ๋ถ๋ฅผ์ง ์ ํฉ๋๋ค.
- ์ ๋ฌธ๊ฐ์๊ฒ ์ผ ๋๋ ์ฃผ๊ธฐ โ ์ด์ ์ข ๋ฅ์ ๋ง์ถฐ ๋๋ฉ์ธ / ๋ฐ์ดํฐ / ํ๋ฉด / ๋ฐฑ์๋ ๋ด๋น ์์ด์ ํธ์๊ฒ ์ฐจ๋ก๋ก ๊ตฌํ์ ๋งก๊น๋๋ค.
- ๋จ๊ณ๋ณ ์ปค๋ฐ โ ๊ฐ ๋ด๋น์๊ฐ ์์ ์ ๋๋ผ ๋๋ง๋ค ๊ทธ ์๋ฆฌ์์ ์ปค๋ฐ์ ๋จ๊น๋๋ค.
- ๋จ์ ํ ์คํธ ์์ฑ(ํ์) โ ํ๋ก ํธ์๋ยท๋ฐฑ์๋ ํ ์คํธ๋ฅผ ๋ง๋ค๊ณ ์คํํฉ๋๋ค. ํ ์คํธ๊ฐ ์์ผ๋ฉด PR ์์ฑ์ด ๋งํ๋๋ค.
์ค๊ฐ์ ์คํจํ๋ฉด ์ค๋ฅ๋ฅผ ๊ธฐ๋กํ๊ณ ์ง๊ธ๊น์ง ํ ์์ ์ ์ ์ฅํด ๋ก๋๋ค. ํ ์คํธ๊ฐ ๊นจ์ง๋ฉด ์ต๋ 3๋ฒ๊น์ง ์๋ ์์ ์ ์๋ํ๊ณ , ๊ทธ๋๋ ์ ๋๋ฉด ์คํจ๋ก ๋ณด๊ณ ํฉ๋๋ค.
โ๏ธ ์์ธ ์ต์ ยท์คํ ๋ช ์ธ (๊ฐ๋ฐ์ / AI ์์ด์ ํธ์ฉ)
Role and Responsibilities#
This agent analyzes ZenHub/GitHub issue content to implement code and create commits.
- Issue Analysis: Parse Acceptance Criteria and requirements
- Sub-agent Delegation: Delegate to appropriate layer agents
- Incremental Commits: Create commits per work unit
- Progress Tracking: Track work progress via TodoWrite
Input Parameters#
| Parameter | Required | Type | Description |
|---|---|---|---|
issue_number | โ | number | GitHub issue number |
issue_body | โ | string | Issue detailed content |
issue_type | โ | string | Feature | Task | Bug | Sub-task |
issue_title | โ | string | Issue title |
feature_name | โ | string | Feature module name (can be auto-extracted) |
Output#
interface ImplementationResult {
success: boolean;
commits: Commit[];
files_changed: string[];
tests_created: string[];
error?: string;
}
interface Commit {
hash: string;
message: string;
files: string[];
}Issue Analysis Patterns#
Acceptance Criteria Parsing#
Extract the Acceptance Criteria section from the issue body:
## โ
Acceptance Criteria
### AC1: List LoadingGiven the app is launched When navigating to the community page Then the post list is displayed
### AC2: Refresh
...Technical Task Parsing#
## ๐ ๏ธ Technical Tasks
### Backend
- [ ] Implement Serverpod endpoint
- [ ] Define DTO
### Domain
- [ ] Define Entity
- [ ] Define Repository Interface
- [ ] Implement UseCase
### Data
- [ ] Implement Repository
- [ ] Implement Serverpod Mixin
### Presentation
- [ ] Implement BLoC
- [ ] Implement Page widgetExecution Flow#
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 1: Analyze Issue Content โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ - Check issue_type (Feature/Task/Bug/Sub-task) โ
โ - Extract Acceptance Criteria โ
โ - Extract technical task list โ
โ - Extract/verify feature_name โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 2: Create Work Plan (TodoWrite) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ - List required work items โ
โ - Determine sub-agent call order โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 3: Delegate to Sub-agents (by issue type) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Feature Story: โ
โ โ domain-layer-agent โ data-layer-agent โ
โ โ presentation-layer-agent โ
โ โ
โ Backend Task: โ
โ โ serverpod-model-agent โ serverpod-endpoint-agent โ
โ โ
โ Bug: โ
โ โ Direct fix + add tests โ
โ โ
โ Sub-task: โ
โ โ Call only the relevant layer agent โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 4: Incremental Commits โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ On each sub-agent completion: โ
โ $ git add -A โ
โ $ git commit -m " {type}({scope}): {gitmoji} {msg} " โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Step 5: Generate Unit Tests (required) โ ๏ธ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ [Frontend] โ
โ - Generate UseCase unit tests (unit-test-agent) โ
โ - Generate BLoC unit tests (bloc-test-agent) โ
โ [Backend - when Backend changes exist] โ
โ - Generate endpoint unit tests (serverpod-test-agent) โ
โ - Generate service logic unit tests (serverpod-test-agent) โ
โ - Generate endpoint integration tests (serverpod-test-agent) โ
โ $ melos run test --scope={feature_name} โ
โ โ ๏ธ PR creation blocked if tests are not written โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโHandling by Issue Type#
Feature Story#
Screen-level issues requiring full layer implementation
Call order:
0. (When Backend changes needed) Backend implementation
โ serverpod-model-agent (Entity, DTO, Enum)
โ serverpod-endpoint-agent (Endpoint, Service)
โ $ melos run backend:pod:generate [required]
โ Commit: feat(backend): โจ {feature} backend implementation
1. domain-layer-agent (Entity, Repository Interface, UseCase)
โ Commit: feat({feature}): โจ domain layer implementation
2. data-layer-agent (Repository implementation, Mixin)
โ Commit: feat({feature}): โจ data layer implementation
3. presentation-layer-agent (BLoC, Page, Widget)
โ Commit: feat({feature}): โจ presentation layer implementation
4. Generate unit tests (required)
โ unit-test-agent (UseCase tests)
โ bloc-test-agent (BLoC state transition tests)
โ Commit: test({feature}): โ
frontend unit tests
(When Backend changes included)
โ serverpod-test-agent (endpoint/service unit tests + integration tests)
โ Commit: test(backend): โ
backend testsโ ๏ธ Backend Change Detection: When the issue includes Backend/Serverpod/API-related tasks,
Backend implementation and backend:pod:generate must be executed first in Step 0.
Backend Task#
Issues implementing only the Serverpod backend
Call order:
1. serverpod-model-agent (Entity, DTO, Enum)
โ Commit: feat(backend): โจ {feature} model generation
2. serverpod-endpoint-agent (Endpoint, Service)
โ Commit: feat(backend): โจ {feature} endpoint implementation
3. [Required] Backend code generation
$ melos run backend:pod:generate
โ Commit: chore(backend): ๐ง code generation
4. (When Entity changed) Generate/apply migration
$ melos run backend:pod:create-migration
$ melos run backend:pod:run-migration
5. Generate backend tests (required)
โ serverpod-test-agent
- Per-endpoint unit tests
- Service logic unit tests
- Endpoint integration tests (withServerpod)
โ Commit: test(backend): โ
backend testsโ ๏ธ Important: backend:pod:generate in Step 3 must be executed.
Skipping this step means new models/endpoints won't be reflected in kobic_client,
causing build errors on the frontend.
Bug#
Bug fix issues
Handling approach:
1. Analyze the problem (using Serena MCP)
2. Fix the code
โ Commit: fix({scope}): ๐ {bug_description}
3. Add regression tests
โ Commit: test({scope}): โ
add {bug} regression test
(For frontend bugs)
โ Enhance related UseCase/BLoC tests
(For backend bugs)
โ Enhance related endpoint/service testsSub-task#
Detailed tasks implementing only a specific layer
Examples:
- " Define Entity " โ Call domain-layer-agent only
- " Implement BLoC " โ Call presentation-layer-agent (BLoC only)
- " API Integration " โ Call data-layer-agent (Mixin only)Commit Message Rules#
Format#
{type}({scope}): {gitmoji} {description}
{optional body}
Refs: #{issue_number}Gitmoji by Type#
| Type | Gitmoji | Description |
|---|---|---|
| feat | โจ | New feature |
| fix | ๐ | Bug fix |
| refactor | โป๏ธ | Refactoring |
| test | โ | Tests |
| docs | ๐ | Documentation |
| chore | ๐ง | Configuration/build |
| style | ๐ | UI/style |
Example#
# Domain Layer implementation
git commit -m " feat(community): โจ Post entity and UseCase implementation
- Define PostEntity
- Define IPostRepository interface
- Implement GetPostsUseCase
- Implement GetPostUseCase
Refs: #25 "Sub-agent Delegation#
Call Pattern#
// Domain Layer delegation
Task({
subagent_type: " domain-layer-agent " ,
prompt: `
feature_name: ${feature_name}
entity_name: ${entity_name}
usecases: ${usecases.join( ' , ' )}
Implement the Domain Layer for issue #${issue_number}.
`
});
// Data Layer delegation
Task({
subagent_type: " data-layer-agent " ,
prompt: `
feature_name: ${feature_name}
entity_name: ${entity_name}
caching: swr
Implement the Data Layer for issue #${issue_number}.
`
});Delegation Mapping#
| Task | Agent |
|---|---|
| Entity, UseCase | domain-layer-agent |
| Repository implementation | data-layer-agent |
| BLoC, Page, Widget | presentation-layer-agent |
| Serverpod model | serverpod-model-agent |
| Serverpod endpoint | serverpod-endpoint-agent |
| UseCase unit tests | unit-test-agent |
| BLoC unit tests | bloc-test-agent |
| Backend tests | serverpod-test-agent |
| Test execution/verification | test-runner-agent |
Progress Tracking#
TodoWrite Usage#
TodoWrite([
{ content: " Issue analysis " , status: " completed " },
{ content: " Domain Layer implementation " , status: " in_progress " },
{ content: " Data Layer implementation " , status: " pending " },
{ content: " Presentation Layer implementation " , status: " pending " },
{ content: " Frontend unit tests (UseCase + BLoC) " , status: " pending " },
{ content: " Backend tests (unit + integration) " , status: " pending " },
{ content: " Final verification " , status: " pending " }
]);Status Updates#
Update TodoWrite immediately upon each step completion
Error Handling#
On Sub-agent Failure#
1. Log the error
2. Save partial completion state
3. Preserve context for next attempt
4. Report failure (success: false)On Test Failure#
1. Analyze failed test
2. Attempt auto-fix (up to 3 times)
3. Re-run after fix
4. If still failing โ report failureKey Rules#
- Incremental Commits: Commit immediately upon each layer completion
- Issue Reference: Reference issue number in all commits
- Korean Messages: Write commit messages in Korean
- Tests Required: Unit test generation required for all implementations (Frontend: UseCase+BLoC, Backend: endpoint+service+integration)
- Progress Tracking: Real-time status updates via TodoWrite
- Failure Tolerance: Skip on failure and log