Written: 2025-12-17 Purpose: Agent improvements identified during Community Feature implementation
๐ฏ Agents Needing Improvement#
1. /figma:analyze Improvement#
Current Problem:
- โ Only analyzes without connecting to actual UI implementation
- โ Figma frame links not recorded in ZenHub Story
Improvement Requirements:
1-1. Record Figma Frame Links
Content to Add to Story Body:
## ๐จ Figma Design
**ํ๋ ์ ๋งํฌ**:
- [๋ชฉ๋ก ํ๋ฉด](https://www.figma.com/design/QkKRtr51GXgmLdKcKcBqQe/๐ถ-Petaround?node-id=235-11480)
- [์์ธ ํ๋ฉด](https://www.figma.com/design/...)
- [์์ฑ ํ๋ฉด](https://www.figma.com/design/...)
Agent Behavior:
1. ํผ๊ทธ๋ง URL ํ์ฑ
2. Story ๋ฌธ์ ์์ฑ ์ " ## ๐จ Figma Design " ์น์
์๋ ์ถ๊ฐ
3. ๊ฐ ํ๋ฉด๋ณ ํ๋ ์ ๋งํฌ ๋งคํ
1-2. Connect to Actual UI Implementation
Current Flow:
ํผ๊ทธ๋ง ๋ถ์ โ Requirements document โ BDD ์๋๋ฆฌ์ค โ (๋)
Improved Flow:
ํผ๊ทธ๋ง ๋ถ์ โ Requirements document โ BDD ์๋๋ฆฌ์ค โ ZenHub ์์ฑ โ UI ๊ตฌํ โ ๊ฒ์ฆ
Additional Phases:
Phase 7: UI ๊ตฌํ (NEW)
- /feature:presentation ์คํ
- ํผ๊ทธ๋ง ์คํ์ผ ๋ฐ์
- ์ค์ ํ๋ฉด ๊ตฌํ
Phase 8: ๋์ ๊ฒ์ฆ (NEW)
- build_runner ์คํ
- ํ
์คํธ ์คํ
- ํ๋ฉด ๋์ ํ์ธ
2. ZenHub Issue Body Format Improvement#
Current Problem:
- โ Only provides links (cannot verify actual content)
- โ Shows all content even when long (reduces readability)
Current Format:
## References
- [Story ๋ฌธ์](../claudedocs/community/zenhub/stories/list_story.md)
- [BDD Scenarios](../claudedocs/community/bdd/community_list.feature)
Improved Format (Using Details tags):
< details >
< summary > ๐ Story ์์ธ ๋ด์ฉ (ํด๋ฆญํ์ฌ ํผ์น๊ธฐ) < /summary >
## Story ์ค๋ช
(์ ์ฒด Story ๋ฌธ์ ๋ด์ฉ)
< /details >
< details >
< summary > โ
Acceptance Criteria (10๊ฐ) < /summary >
### AC1: ๋ชฉ๋ก ๋ก๋ฉ ์ฑ๊ณต
Given the app is running # ์ฑ์ด is running ...
### AC2: ๋น๊ฒจ์ ์๋ก๊ณ ์นจ
...
< /details >
< details >
< summary > ๐งช BDD Test scenarios (13๊ฐ) < /summary >
Feature: Community List Screen (Full BDD Feature file content)
< /details >
< details >
< summary > ๐ ๏ธ ๊ตฌํ ํ์คํฌ < /summary >
### Backend Tasks
- [ ] Post ๋ชจ๋ธ ์ ์
- [ ] API ๊ตฌํ
### Frontend Tasks
- [ ] Domain Layer
- [ ] Data Layer
- [ ] Presentation Layer
< /details >
Advantages:
- โ All information viewable in a single Issue
- โ Improved readability (collapsible sections)
- โ View directly without clicking links
- โ Viewable offline
3. /feature:create Orchestrator Improvement#
Current Problem:
- โ No handling logic for existing features
- โ Incomplete per-phase execution
- โ Actual UI implementation is missing
- โ No verification step
Improvement Requirements:
3-1. Existing Feature Detection
1. feature/{location}/{feature_name} ์กด์ฌ ํ์ธ
2. ์กด์ฌํ๋ฉด:
- ์ต์
A: ์
๋ฐ์ดํธ ๋ชจ๋
- ์ต์
B: ์คํต
- ์ต์
C: ๋ฎ์ด์ฐ๊ธฐ (ํ์ธ ํ์)
3. ์กด์ฌํ์ง ์์ผ๋ฉด:
- ์ ์ฒด ์์ฑ
3-2. Complete Per-Phase Execution
Phase 2: Backend (Currently OK):
- โ Generate Serverpod model
- โ Endpoint Generation
- โ Code generation
- โ Migration
Phase 3: Frontend (Needs improvement):
// ํ์ฌ: ๊ตฌ์กฐ๋ง ์์ฑ
/feature:domain โ Entity, UseCase, Repository Interface
/feature:data โ Repository impl, Mixin
/feature:presentation โ BLoC, Page (ํ
ํ๋ฆฟ๋ง)
// Improvement: ์ค์ ๋์ํ๋ ์ฝ๋ ์์ฑ
/feature:domain โ (๋์ผ)
/feature:data โ (๋์ผ)
/feature:presentation โ
- BLoC ์์ ๊ตฌํ (Event, State, Logic)
- Page ์์ ๊ตฌํ (Scaffold, AppBar, Body)
- Widget ์์ ๊ตฌํ (PostCard with ๋ชจ๋ ํ๋)
- ํผ๊ทธ๋ง ์คํ์ผ ๋ฐ์
3-3. Ensure Actual UI Implementation
Steps to Add:
Step 7-1: ํผ๊ทธ๋ง ๋ถ์ ์ ๋ณด ๋ก๋
- claudedocs/{feature}/figma_analysis.md ์ฝ๊ธฐ
- ์คํ์ผ, ๋ ์ด์์ ์ ๋ณด ์ถ์ถ
Step 7-2: Widget ์ค์ ๊ตฌํ
- PostCard: ๋ชจ๋ ํ๋ ํ์
- CategoryChip: ์คํ์ผ ์ ์ฉ
- SearchBar: ๋์ ๊ตฌํ
Step 7-3: Page ์ค์ ๊ตฌํ
- Scaffold ์์ฑ
- BLoC ์ฐ๊ฒฐ
- ์ํ๋ณ UI (Loading, Loaded, Error, Empty)
3-4. Add Verification Step
Phase 5: Verification (needs strengthening):
# ํ์ฌ
melos run build
melos run test
# Improvement
melos run build --scope={feature}
melos run analyze --scope={feature}
melos run test --scope={feature}
melos run test:bdd --scope={feature} # Run BDD tests
flutter run --target=lib/main_development.dart # ์ค์ ์ฑ ์คํ
๐ Agent Update Checklist#
/figma:analyze Update#
File: ~/.claude/commands/figma/analyze.md (or project)
Additions:
- Add "Record Figma frame links in Story" to Phase 6
- Add "## ๐จ Figma Design" section to Story template
- URL parsing and mapping logic
Template:
## ๐จ Figma Design
**ํ๋ ์ ๋งํฌ**:
- [๋ชฉ๋ก ํ๋ฉด]({figma_url_1})
- [์์ธ ํ๋ฉด]({figma_url_2})
- [์์ฑ ํ๋ฉด]({figma_url_3})
**๋์์ธ ๋ถ์**:
- ์ปฌ๋ฌ: {colors}
- ํ์ดํฌ๊ทธ๋ํผ: {typography}
- ์คํ์ด์ฑ: {spacing}
ZenHub Issue Template Improvement#
File: New file needed
Issue Body Template:
# [Story] {title}
> **Story Point**: {point}
> **Sprint**: {sprint}
> **Epic**: #{epic_number}
## ๐จ Figma Design
{figma_links}
< details >
< summary > ๐ Story ์์ธ ๋ด์ฉ (ํด๋ฆญํ์ฌ ํผ์น๊ธฐ) < /summary >
{story_content}
< /details >
< details >
< summary > โ
Acceptance Criteria ({ac_count}๊ฐ) < /summary >
{ac_list}
< /details >
< details >
< summary > ๐งช BDD Test scenarios ({scenario_count}๊ฐ) < /summary >
{bdd_content}
< /details >
< details >
< summary > ๐ ๏ธ ๊ตฌํ ํ์คํฌ < /summary >
{tasks}
< /details >
---
๐ค Generated with [Claude Code](https://claude.com/claude-code)
/feature:create Orchestrator Improvement#
File: ~/.claude/commands/feature/create.md (or project)
Additional Phases:
## Phase 3.5: ํผ๊ทธ๋ง ์คํ์ผ ์ ์ฉ (NEW)
### Step 3.5-1: ํผ๊ทธ๋ง ๋ถ์ ๋ก๋
- claudedocs/{feature}/figma_analysis.md ์ฝ๊ธฐ
- Design tokens ์ถ์ถ (์์, ํฐํธ, ์คํ์ด์ฑ)
### Step 3.5-2: ์คํ์ผ ์ ์ฉ
- Widget์ ํผ๊ทธ๋ง ์คํ์ผ ๋ฐ์
- ์ปฌ๋ฌ, ํ์ดํฌ๊ทธ๋ํผ, ๋ ์ด์์ ์ ์ฉ
## Phase 4.5: Actual behavior implementation (NEW)
### Step 4.5-1: BLoC ๋ก์ง ์์ฑ
- Event handler ์ค์ ๊ตฌํ
- State transition ๋ก์ง
### Step 4.5-2: Widget ์์ ๊ตฌํ
- ๋ชจ๋ ํ๋ ํ์
- ์ฌ์ฉ์ ์ธํฐ๋์
- ์๋ฌ ์ฒ๋ฆฌ
### Step 4.5-3: Page ์์ ๊ตฌํ
- Scaffold ๊ตฌ์ฑ
- AppBar, Body, FAB
- ๋ค๋น๊ฒ์ด์
์ฐ๊ฒฐ
Existing Feature Handling:
## Phase 0: Check existing Feature (NEW)
### Step 0-1: ์กด์ฌ ์ฌ๋ถ ํ์ธ
if [ -d "feature/{location}/{feature_name}" ]; then echo "Feature already exists"
Update mode#
else
Full generation mode#
fi
### Step 0-2: ์ฌ์ฉ์ ํ์ธ
- ๊ธฐ์กด feature ์กด์ฌ ์:
- ์ต์
1: ์
๋ฐ์ดํธ (ํ๋ ์ถ๊ฐ, UI Improvement)
- ์ต์
2: ์คํต
- ์ต์
3: ์ฌ์์ฑ (๊ธฐ์กด ๋ฐฑ์
)
๐ Implementation Guide#
Details Tag Generation Function#
function createDetailsSection(
summary: string,
content: string,
icon: string = " "
): string {
return `
< details >
< summary > ${icon} ${summary} < /summary >
${content}
< /details >
`;
}
// Usage example
const storyDetails = createDetailsSection(
" Story ์์ธ ๋ด์ฉ (ํด๋ฆญํ์ฌ ํผ์น๊ธฐ) " ,
storyContent,
" ๐ "
);
const acDetails = createDetailsSection(
`Acceptance Criteria (${acCount}๊ฐ)`,
acContent,
" โ
"
);
Story Body Generation Logic#
const issueBody = `
# [Story] ${title}
> **Story Point**: ${point}
> **Sprint**: ${sprint}
> **Epic**: #${epicNumber}
## ๐จ Figma Design
${figmaLinks}
${storyDetails}
${acDetails}
${bddDetails}
${tasksDetails}
๐ค Generated with [Claude Code](https://claude.com/claude-code)
`;
โ Application Checklist#
/figma:analyze#
- Add Figma link section when generating Stories
- Extract node-id from URL and map
- Record frame links per Screen
ZenHub Issue#
- Write Details tag template
- Story Full content included
- Acceptance Criteria Full content included
- BDD Scenario Full content included
- Implementation task checklist included
/feature:create#
- Existing feature detection logic
- Phase 3.5: Apply Figma styles
- Phase 4.5: Actual behavior implementation
- Phase 5: Complete Verification (BDD included)
๐ง Next Session Tasks#
-
Verify agent file locations:
# Global settings ls ~/.claude/commands/ # Project settings ls .claude/commands/ -
/figma:analyze update:
- Add Figma link recording logic
- Update Story template
-
Create ZenHub Issue template:
- Utilize Details tags
- Include full content
-
/feature:create enhancement:
- Handle existing features
- Complete UI implementation
- Strengthen verification
-
Actual Community UI implementation:
- Re-run with improved agents
- Complete a working list screen
๐ Reference Documents#
- Dart Convention: Use singular directory names (CLAUDE.md:508-513)
- BDD Rules: English Steps + Korean comments (.claude/commands/bdd/generate.md)
- Community Requirements: claudedocs/community/requirements.md
- Figma Analysis: claudedocs/community/figma_analysis.md
Document Version: 1.0 Last Modified: 2025-12-17