| name | team-implement |
| description | Full lifecycle feature implementation — spawns teams, assigns tasks, monitors progress, verifies quality, and creates PRs. Agents remain idle after completion — use /team-shutdown to terminate. Use when user says 'implement this', 'build this feature', 'start working on X', or 'execute the plan'. |
| argument-hint | [feature-or-plan-description] |
| allowed-tools | ["Bash","Read","Write","Grep","Glob","SendMessage","AskUserQuestion","TeamCreate","Agent","TaskCreate","TaskUpdate","TaskList"] |
Team Implement
Full lifecycle feature implementation. Spawns teams, assigns tasks, monitors progress, verifies quality, and creates PRs. Agents remain idle after completion — use /team-shutdown to terminate.
Critical Constraints
- In-process teammate mode only — all agents MUST run in-process (
teammateMode: "in-process"). Never use tmux, iTerm split panes, or any other mode. Cycle between agents with Shift+Down.
- Always spawn all 7 agents — no conditional composition or presets
- Feature branch required — never work directly on main (Phase 3 enforces this)
- Agents stay idle after completion — use
/team-shutdown to terminate
Full Lifecycle
Phase 1: Load Context
- Read
CLAUDE.md Service Map to identify all services, verification commands, and agent role keywords
- Read
.claude/agents/*.md to build agent registry (name, description, tools)
- Read
.claude/agent-colors.json for visual agent identification
- Check for existing plan files in
.claude/plans/ matching the feature description
Phase 2: Spawn All Agents
Always spawn all 7 domain agents via TeamCreate + Agent:
- rust-backend-engineer
- react-frontend-engineer
- database-engineer
- devops-engineer
- backend-qa
- frontend-qa
- document-writer
Agents without assigned tasks remain idle and available for ad-hoc work via SendMessage.
Phase 3: Branch Creation
Before any work begins, ensure we're on a feature branch — never work directly on main.
- Check current branch:
git branch --show-current
- If on
main:
- Create and switch to a feature branch:
git checkout -b feat/{feature-slug}
- If already on a feature branch (
feat/, fix/, refactor/, chore/):
- If on an unexpected branch:
- Ask the user via AskUserQuestion whether to use it or create a new one
Phase 4: Plan Decomposition
If a plan file exists in .claude/plans/, use it as input. Otherwise, decompose the feature into waves:
- Wave 1 (foundations): Types, schemas, migrations, core logic
- Wave 2 (consumers): Route handlers, UI components, API integration
- Wave 3 (verification): Unit tests, E2E tests, integration tests
- Wave 4 (documentation): API docs, architecture updates (if needed)
For each task:
- Assign one owner agent
- List files to create/modify (one owner per file)
- Define dependencies on other tasks
- Specify verification commands
Phase 5: Assign Waves
All 7 agents are already spawned from Phase 2. Assign wave tasks to agents:
- Agents with Wave 1 tasks start working immediately
- Agents with later-wave tasks wait until dependencies resolve
- Agents without tasks remain idle and available for ad-hoc requests
Phase 6: Assign
Send each agent their task via SendMessage:
- Owned files and required changes
- Interface contracts with other agents
- Dependencies and wave number
- Verification commands to run after completion
Phase 7: Monitor
Run a health monitoring loop:
- Check agent activity:
git log, file modification times, TaskList status
- Classify agents: active / quiet / stale
- Context exhaustion detection: 3+ consecutive idle notifications with in_progress task and no file edits = exhausted
- Auto-respawn: If context-exhausted:
- Capture completed work from
git log
- Note remaining tasks from TaskList
- Respawn agent with same name for ownership continuity
- Send handoff summary with completed commits and remaining tasks
- Wave progression: When all Wave N tasks complete, spawn deferred Wave N+1 agents
Phase 8: Verify
Run quality gates per affected service:
| Service | Verification |
|---|
| Backend | cargo clippy --all-targets && cargo test --lib && cargo fmt --check |
| Frontend | npm run build && npm run lint |
| Infrastructure | docker compose config --quiet |
Cross-service validation:
- Grep for shared types/endpoints to ensure contract consistency
- Run E2E tests if both backend and frontend changed
Phase 9: PR
Create PR from the feature branch:
git add -A && git commit -m "feat(scope): description"
git push -u origin feat/{feature-slug}
gh pr create --title "feat: ..." --body "## Summary\n..."
Phase 10: Report
Output final status:
- Work streams completed
- Verification results (pass/fail per gate)
- PR URL (if created)
- Agents remain idle — use
/team-shutdown when done
Secondary Operations
These can be invoked inline during a team session but are not primary entry points.
Delegate (--delegate team-name)
Interactive task management menu:
- Assign task: Select agent → describe task → create TaskList entry → send via SendMessage
- Send message: Select agent → compose message → SendMessage
- Broadcast: Send message to all team members
- Rebalance: Move tasks between agents (update TaskList ownership)
- Reclaim: Take back an unresponsive agent's tasks
Agent validation is dynamic — read team config for current members, never hardcode names.
Note: Use /team-shutdown to terminate the team when done.