| name | team-implement |
| description | Spin up an agent team for a task with structured workflow. Provide a ticket reference, task description, or both. |
| user-invocable | true |
| argument-hint | <ticket reference and/or task description> |
Team Implement
Create an agent team for a task. Provide a ticket reference, task description, or both.
Workflow (PRAR)
The team follows a phased workflow. Do NOT skip phases.
Phase 1: PERCEIVE (Lead only)
- If a ticket reference is provided, fetch it for full context
- Read AGENTS.md at repo root and in relevant directories
- Identify the scope of work and split into parallel-safe pieces
- If requirements are vague, ask the user for clarity before proceeding
Phase 2: SCAFFOLD (Lead only)
- Use spawn_agent to create each teammate
- Each teammate's prompt must include:
- File paths they own (no overlap between teammates)
- Architecture context and interfaces they need to implement or consume
- Existing files they MUST read before planning
- Instructions to present plan, then wait for approval before coding
Phase 3: REASON (Lead + Teammates)
- Teammates investigate their area and submit plans
- Lead reviews plans and approves or rejects
- If a teammate raises a blocking question, lead investigates before answering
- Lead presents the combined plan to the user and waits for approval
- After user approval, teammates proceed to coding
Phase 4: ACT (Teammates)
- Each teammate writes tests alongside implementation
- Each teammate runs tests on their own work before marking tasks complete
- If a teammate gets stuck after 2-3 attempts, message the lead
- Lead monitors progress and redirects as needed. Lead does NOT implement tasks
- Teammates coordinate when their work produces shared interfaces
Phase 5: REFINE (Lead)
- Wait for ALL teammates to finish
- Verify no file conflicts between teammates
- Run the full test suite
- Present a summary to the user of what was done
Phase 6: CLEANUP (Lead)
- Close all teammates
Team structure
- Default to 3 teammates unless the task clearly needs more or fewer
- Each teammate gets a clear role name (e.g., "backend", "frontend", "tests")
Rules
- Do NOT push, create PRs, or run git operations beyond what's needed for implementation
- Do NOT modify files outside the teammate's assigned scope
- Minimal changes only. No refactoring beyond what the task requires
- Stick to the repo's existing stack and patterns