| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Invoke | /team-dev |
/team-dev โ ์ฌ๋ฌ ์์ ์ ๋์์ ์งํํ๋ "ํ์ฅ"#
ํ๋ง๋๋ก#
์๋ก ์ํฅ์ ์ฃผ์ง ์๋ ์ฌ๋ฌ ์ ๋ฌด(์คํ ๋ฆฌ)๋ฅผ ์ฌ๋ฌ ๋ช ์๊ฒ ๋์์ ๋๋ ๋งก๊ฒจ ํ๊บผ๋ฒ์ ์ฒ๋ฆฌํ๋ ๋ช ๋ น์ ๋๋ค. ํ ๋ช ์ด ์ผ์ ์์๋๋ก ์ฒ๋ฆฌํ๋ ๋์ , ํ์ฅ์ด ์ผ์ ๊ฒน์น์ง ์๊ฒ ๋๋ ์ฃผ๊ณ ์ฌ๋ฌ ์ง์์ด ๋์์ ์ผํ๋ ๊ฒ๊ณผ ๊ฐ์์.
๋๊ฐยท์ธ์ ์ฐ๋์#
- ํ ์คํ๋ฆฐํธ ์์ ์๋ก ๋ ๋ฆฝ์ ์ธ(์๋ก ์์กดํ์ง ์๋) ์์ ์ด 2๊ฐ ์ด์ ์ค๋น๋์ด ์์ ๋
- ํ ๊ฑด์ฉ ์์๋๋ก ์ฒ๋ฆฌํ๊ธฐ์ ์๊ฐ์ด ์๊น์, ๋์์ ๋น ๋ฅด๊ฒ ๋๋ด๊ณ ์ถ์ ๋
๐ ์ด ๋ช
๋ น ๋์ ๋ค๋ฅธ ๊ฑธ ์จ์ผ ํ๋ ๊ฒฝ์ฐ: ๋์์ ๋๋ฆด ๋งํผ ๋
๋ฆฝ์ ์ธ ์์
๋ฌถ์์ด 1๊ฐ๋ฟ์ด๋ฉด ๊ตณ์ด ํ์ ๊พธ๋ฆฌ๋ ๋น์ฉ์ด ์๊น์ต๋๋ค. ์ด ๊ฒฝ์ฐ ๋ช
๋ น์ด ํ ๊ฑด์ฉ ์ฒ๋ฆฌํ๋
/dev-story๋ฅผ ๊ถํฉ๋๋ค.
๐ ์ฌ์ ์ค๋น: "Agent Teams"๋ผ๋ ์คํ์ ๊ธฐ๋ฅ์ด ์ผ์ ธ ์์ด์ผ ํฉ๋๋ค(CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1). ๊บผ์ ธ ์์ผ๋ฉด ๋ช
๋ น์ด ๋ฉ์ถ๊ณ
/dev-story๋ฅผ ์๋ดํฉ๋๋ค.
๋ฌด์์ ํด์ฃผ๋์#
์ฌ๋ฌ ์คํ ๋ฆฌ์ ๋ํ ์ค์ ๋์ํ๋ ์ฝ๋๊ฐ ๋ง๋ค์ด์ง๊ณ , ๊ฐ ์์ ๋ง๋ค PR(์ฝ๋ ๊ฒํ ์์ฒญ) ์ด ์ด๋ฆฌ๋ฉฐ, ์คํ๋ฆฐํธ ํํฉ์ด ์๋์ผ๋ก ๊ฐฑ์ ๋ฉ๋๋ค.
- ์์ ๋ค์ด ๊ฒน์น์ง ์๋๋ก ๋ด๋น๊ณผ ํ์ผ ์์ญ์ ๋๋ ๋ฐฐ์ ํ
- ์์ ๋ณ ๋ธ๋์น ๊ตฌ์กฐ(์ํฝ ๋ธ๋์น ์๋ ์คํ ๋ฆฌ ๋ธ๋์น)
- ์๋ฃ๋ ์์ ๋ง๋ค ํ์ง ๊ฒ์ฌ(lint, ํ์ ์ฒดํฌ, ํ ์คํธ) ํต๊ณผ ์ฌ๋ถ
- ZenHub ๋ณด๋์ ์ํ ์ด๋(์งํ ์ค โ ๊ฒํ /QA)
- ์์กด์ฑ ๋๋ฌธ์ ๋์์ ๋ชป ๋๋ฆฐ ์์ ์ "์์ฐจ ๋๊ธฐ์ด" ๋ก ๋ฐ๋ก ์๋ด
์ด๋ป๊ฒ ์ฐ๋์#
# ๋์ ๊ฐ๋ฐ ์์ (ํ์ฅ ์ญํ ๋ก ์คํ)
/team-dev
# ๋์์ ๋ชป ๋๋ฆฌ๋, ์๋ก ์์กดํ๋ ์์
์ ํ ๊ฑด์ฉ ์ฒ๋ฆฌ
/dev-story STORY-003
/team-dev๋ ๋ณ๋ ์ต์
์์ด ์คํํ๋ฉฐ, ๋์์ ๋ช ๋ช
๊น์ง ์ผํ ์ง๋ ์ค์ ๊ฐ agent_teams.max_teammates(๊ธฐ๋ณธ 3๋ช
)๋ก ์ ํด์ง๋๋ค.
๋ฐฐ์ ๊ณํ์ ๋งค๋ฒ ํ์ธ ์์ด ์๋ ์น์ธํ๋ ค๋ฉด ์ค์ ๊ฐ agent_teams.auto_approve_plans๋ฅผ ์ผ๋ฉด ๋ฉ๋๋ค.
์์์ ๋ฌด์จ ์ผ์ด ๋ฒ์ด์ง๋์#
- ์ค๋น ์ ๊ฒ โ ์ค์ ๊ณผ ์คํ๋ฆฐํธ ํํฉ์ ๋ถ๋ฌ์ค๊ณ , ๋์ ์์ ๊ธฐ๋ฅ(Agent Teams)์ด ์ผ์ ธ ์๋์ง ํ์ธํฉ๋๋ค. ๊บผ์ ธ ์์ผ๋ฉด ๋ฉ์ถ๊ณ ํ ๊ฑด์ฉ ์ฒ๋ฆฌํ๋ ๋ฐฉ๋ฒ์ ์๋ดํฉ๋๋ค. ์์ํ ์ ์๋ ํ๋ณด ์์ ๋ค์ ์ถ๋ฆฝ๋๋ค.
- ๋์ ์ฒ๋ฆฌ ๋ถ์ โ ์์ ์ ์ํฝ๋ณ๋ก ๋ฌถ๊ณ , ์๋ก ์์กดํ๊ฑฐ๋ ๊ฐ์ ํ์ผ์ ๊ฑด๋๋ฆฌ๋ ์์ ์ ๊ณจ๋ผ๋ ๋๋ค. ๊ฒน์น์ง ์๋ ๋ ๋ฆฝ ๋ฌถ์๋ง ๋์์ ๋๋ฆฌ๊ณ , ๋๋จธ์ง๋ ์์ฐจ ๋๊ธฐ์ด๋ก ๋ณด๋ ๋๋ค.
- ๋ฐฐ์ ๊ณํ ์ ์ โ ๋๊ฐ ์ด๋ค ์์ ๊ณผ ํ์ผ์ ๋งก์์ง ํ๋ก ๋ณด์ฌ ์ฃผ๊ณ ์ฌ์ฉ์์๊ฒ ์งํ ์ฌ๋ถ๋ฅผ ํ์ธ๋ฐ์ต๋๋ค(์๋ ์น์ธ ์ค์ ์ ์๋ต).
- ๋ธ๋์น ์์ฑ โ ์ํฝ ๋ธ๋์น์ ๊ทธ ์๋ ์คํ ๋ฆฌ ๋ธ๋์น๋ค์ ๋ง๋ค์ด ์์ ๊ณต๊ฐ์ ๋ถ๋ฆฌํฉ๋๋ค.
- ์์ ๋ถ๋ฐฐยท์คํ โ ๊ณต์ ์์ ๋ชฉ๋ก์ ๋ง๋ค๊ณ ๋ด๋น์(teammate)๋ค์ ๋์ ๋์์ ๊ฐ๋ฐ์ ์์ํ๋ฉฐ, ZenHub ๋ณด๋๋ฅผ "์งํ ์ค"์ผ๋ก ์ฎ๊น๋๋ค.
- ์งํ ๋ชจ๋ํฐ๋ง โ ๊ฐ ๋ด๋น์์ ์งํ ์ํฉ์ ํ์ธํ๊ณ , ์๋ฃ๋ ๋๋ง๋ค ํ์ง ๊ฒ์ฌ๋ฅผ ๋๋ ค ํต๊ณผํ ์์ ๋ง ๋ฐ์๋ค์ด๊ณ ํํฉ์ ๊ฐฑ์ ํฉ๋๋ค.
- ๊ฒฐ๊ณผ ์ ๋ฆฌ โ ๋ชจ๋ ์์ ์ด ๋๋๋ฉด ์คํ ๋ฆฌ๋ณ๋ก PR์ ์ด๊ณ , ์๋ฃ ์์ฝ๊ณผ ์์ฐจ ๋๊ธฐ์ด์ ๋จ์ ์์ ์ ์ ๋ฆฌํด ๋ณด์ฌ ์ค๋๋ค.
โ๏ธ ์์ธ ์ต์ ยท์คํ ๋ช ์ธ (๊ฐ๋ฐ์ / AI ์์ด์ ํธ์ฉ)
Workflow Overview#
Goal: Develop multiple stories in parallel using Agent Teams
Phase: 4 - Implementation (Parallel Execution)
Agent: Team Lead
Inputs: Sprint plan with stories, architecture document
Output: Working code for multiple stories, PRs created, sprint status updated
Duration: Varies by story count and complexity
Required for: Projects with 2+ independent stories ready for development
Prerequisite: Agent Teams must be enabled (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1)
Pre-Flight#
- Load context per
helpers.md#Combined-Config-Load - Load sprint status per
helpers.md#Load-Sprint-Status - Check Agent Teams per
helpers.md#Check-Agent-Teams-Available - If teams_available = false:
- Output:
โ Agent Teams not available. Agent Teams is an experimental feature that requires: CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 Sequential alternative: Use /dev-story STORY-{ID} to develop stories one at a time. - Stop workflow (do not proceed)
- Output:
- Load architecture (if Level 2+): Read
.bmad/architecture-*.md - Load ZenHub context per
helpers.md#Load-ZenHub-Context - Identify candidate stories:
- Find all stories with status "not_started" or "defined" in sprint status
- If no stories available: inform user and stop
- Load max_teammates from config
agent_teams.max_teammates(default: 3) - Load sub-tasks (if zh_sub_tasks_enabled):
- For each candidate story, check for
sub_tasks[]in sprint status - Sub-tasks will be included in teammate context as implementation checklist
- For each candidate story, check for
Part 1: Parallelization Analysis#
Analyze stories for parallel execution:
Group stories by epic:
Epic 1: [STORY-001, STORY-002, STORY-003] Epic 2: [STORY-004, STORY-005]Check dependencies:
- Read each story's dependencies from sprint status or story documents
- Build dependency graph
- Identify independent groups (no cross-dependencies)
Calculate file ownership boundaries:
- From architecture document, map epics to source directories
- Ensure no overlap between teammate file sets
- If overlap detected: move overlapping stories to sequential queue
Determine optimal teammate count:
- Count independent story groups
- Cap at max_teammates
- If only 1 group: suggest
/dev-storyinstead and ask user
Display analysis:
Parallelization Analysis: Independent Groups: {count} Total Stories: {count} Sequential Queue: {count} (due to dependencies or file overlap) Group 1: Epic " {name} " Stories: STORY-001, STORY-002 Files: src/auth/*, src/middleware/auth/* Points: {total} Group 2: Epic " {name} " Stories: STORY-004, STORY-005 Files: src/catalog/*, src/api/products/* Points: {total} Teammates needed: {count}
Part 2: Assignment Plan#
Present assignment plan to user:
Proposed Teammate Assignments:
Teammate 1 (Developer):
Stories: STORY-001, STORY-002
Epic: {epic_name}
File Ownership: src/auth/*, tests/auth/*
Branch: story/STORY-001-{slug}, story/STORY-002-{slug}
Epic Branch: epic/EPIC-{num}-{slug}
Sub-tasks: {count} (as implementation checklist) โ if sub-tasks exist
Teammate 2 (Developer):
Stories: STORY-004, STORY-005
Epic: {epic_name}
File Ownership: src/catalog/*, tests/catalog/*
Branch: story/STORY-004-{slug}, story/STORY-005-{slug}
Epic Branch: epic/EPIC-{num}-{slug}
Sub-tasks: {count} (as implementation checklist) โ if sub-tasks exist
Sequential Queue (after parallel phase):
STORY-003 (depends on STORY-001)
Proceed with this plan? (y/n)Wait for user confirmation before proceeding.
If config.agent_teams.auto_approve_plans = true, skip confirmation.
Part 3: Branch Creation#
Create branch hierarchy for all stories:
For each epic in the plan:
- Resolve branch names per
helpers.md#Resolve-Branch-Names - Create branch hierarchy per
helpers.md#Create-Branch-Hierarchy- Create epic branch from main (if not exists)
- Create story branches from epic branch
Display branch structure:
Branch Hierarchy:
main
โโโ epic/EPIC-001-user-auth
โ โโโ story/STORY-001-registration โ Teammate 1
โ โโโ story/STORY-002-login โ Teammate 1
โโโ epic/EPIC-002-product-catalog
โโโ story/STORY-004-listing โ Teammate 2
โโโ story/STORY-005-detail โ Teammate 2Part 4: Task List & Teammate Spawn#
Step 1: Create shared task list per helpers.md#Create-Team-Task-List:
For each teammate assignment:
TaskCreate:
subject: " Developer: Implement {story_ids} ({epic_name}) "
description: Full context including stories, file ownership, branches
activeForm: " Implementing {story_ids} "Set up dependencies if any stories are sequential.
Step 2: Spawn teammates per helpers.md#Spawn-BMAD-Teammate:
For each teammate:
- role: "developer"
- context: Story documents, architecture summary, file ownership, branch info
Step 3: Move stories to In Progress on ZenHub:
If zh_available:
For each story being developed:
Call helpers.md#Move-Pipeline-with-Context(zh_story_id, " In Progress " )
For each epic with first story starting:
Call helpers.md#Move-Pipeline-with-Context(zh_epic_id, " In Progress " )Note on Sub-tasks: When spawning teammates, include sub-task information in the context:
- Sub-task list serves as implementation checklist for the teammate
- Teammate should move sub-task pipelines as they complete each one
- Include sub-task zh_issue_ids so teammates can call Move-Pipeline-with-Context
- After teammate completes: Lead batch-updates sub_task statuses in sprint-status.yaml
Part 5: Plan Approval#
Review teammate implementation plans:
Each teammate produces an implementation plan before coding.
If config.agent_teams.auto_approve_plans = false (default):
- Collect plans from teammates
- Present each plan to user for review
- User approves or requests changes
- On approval: teammates proceed with implementation
- On rejection: teammate revises plan
If config.agent_teams.auto_approve_plans = true:
- Teammates proceed directly after planning
Part 6: Progress Monitoring#
Poll teammate progress:
Check task status:
Call TaskList Display: {completed}/{total} teammates doneOn teammate completion: a. Run quality gate per
helpers.md#Team-Quality-Gate:Call Team-Quality-Gate(story_branch) If passed: Accept work If failed: Report failures to user for decisionb. Update sprint status per
helpers.md#Update-Sprint-Status:- Update story status to "dev-complete"
- Update branch, epic_branch fields
- Increment completed_points
- Update sub_task statuses if sub-tasks exist (batch update)
- Increment sub_tasks_completed in metrics
c. Move ZenHub pipeline:
If zh_available: Call helpers.md#Move-Pipeline-with-Context(zh_story_id, " Review/QA " )On teammate failure:
- Log the issue
- Continue monitoring remaining teammates
- Report failed stories to user
Display progress:
Team Progress: Teammate 1: โ Complete (STORY-001, STORY-002) Quality Gate: โ Passed (lint โ, typecheck โ, tests โ) Teammate 2: ๐ In Progress (STORY-004, STORY-005) Current: Implementing STORY-004... Overall: 2/4 stories complete
Part 7: Results Summary#
After all teammates complete:
Collect results per
helpers.md#Collect-Team-ResultsHandle sequential queue (if any):
- Inform user about remaining dependent stories
- Suggest
/dev-story STORY-{ID}for each
Create story โ epic PRs per
helpers.md#Create-PR-and-Merge:For each completed story: Call Create-PR-and-Merge( source: story_branch, target: epic_branch, title: " feat: STORY-{ID} {title} " , merge_strategy: " merge " )Display summary:
โ Team Development Complete! Stories Completed: {count}/{total} Total Points: {points} Results: STORY-001: โ Dev Complete, PR open Quality: lint โ, typecheck โ, tests โ ({count} tests) PR: {pr_url} STORY-002: โ Dev Complete, PR open Quality: lint โ, typecheck โ, tests โ ({count} tests) PR: {pr_url} ZenHub Pipeline: STORY-001 โ Review/QA STORY-002 โ Review/QA Sequential Queue: STORY-003 (depends on STORY-001) โ Run /dev-story STORY-003 Sprint Progress: {completed}/{total} points
Helper References#
- Load config:
helpers.md#Combined-Config-Load - Load sprint status:
helpers.md#Load-Sprint-Status - Update sprint status:
helpers.md#Update-Sprint-Status - Check Agent Teams:
helpers.md#Check-Agent-Teams-Available - Spawn teammate:
helpers.md#Spawn-BMAD-Teammate - Create team tasks:
helpers.md#Create-Team-Task-List - Collect results:
helpers.md#Collect-Team-Results - Quality gate:
helpers.md#Team-Quality-Gate - Resolve branches:
helpers.md#Resolve-Branch-Names - Create branch hierarchy:
helpers.md#Create-Branch-Hierarchy - Create PR:
helpers.md#Create-PR-and-Merge - ZenHub context:
helpers.md#Load-ZenHub-Context - Move pipeline:
helpers.md#Move-Pipeline-with-Context
Notes for LLMs#
- ALWAYS check Agent Teams availability first (Pre-Flight step 3-4)
- If teams not available, suggest
/dev-storyand STOP โ do not attempt workarounds - Present parallelization plan to user and wait for confirmation
- Sprint-status.yaml is Lead-only: batch all updates after teammates complete
- File ownership boundaries must be explicit and non-overlapping
- Quality gates run automatically on each teammate's completed work
- ZenHub pipeline moves are best-effort (warn and continue on failure)
- Each teammate works on its own branch โ no shared branches between teammates
- Sequential queue handles stories with dependencies (run after parallel phase)
- If
ghCLI unavailable, output manual PR instructions (do not block)
Remember: The value of /team-dev is parallelization. If there's only 1 independent story group, recommend /dev-story instead. The overhead of team coordination should be justified by parallel execution gains.