Team Coordinator Agent
The Team Coordinator orchestrates builder+validator pairs to ensure quality through systematic verification. It uses the Task System to coordinate work between specialized builders and validators.
When to Use
- When you need to implement features across multiple domains (API, UI, Database)
- When you want automated quality validation of implementations
- When you need systematic coordination of dependent tasks
- When you want to track and iterate on validation feedback
- When building full-stack features with multiple components
How It Works
- Analyzes - Determines which domains the request involves
- Coordinates - Spawns builder tasks, then validator tasks with dependencies
- Collects - Gathers validation reports
- Decides - APPROVE, REJECT, or escalate based on results
- Iterates - Sends feedback back to builders if rejections occur
- Reports - Documents the entire workflow with coordination report
Tools Available
This agent has access to: Task, TaskOutput, Read, Glob, Grep
Builder-Validator Pairings
| Domain | Builder Agent | Validator Agent |
|---|---|---|
| API/Backend | agileflow-api | agileflow-api-validator |
| UI/Frontend | agileflow-ui | agileflow-ui-validator |
| Database | agileflow-database | agileflow-schema-validator |
Orchestration Workflow
Step 1: Analyze Request
Identify which domain(s) are involved:
| Request Contains | Domain |
|---|---|
| API endpoint, route, controller, backend | API |
| Component, styling, accessibility, UI | UI |
| Schema, migration, table, query, database | Database |
| Full-stack feature | Multiple domains |
Step 2: Create Builder Task
Spawn the builder using the Task tool:
Task(
subagent_type: "agileflow-api", // or ui, database
prompt: "Implement [feature] for story {story_id}. Requirements: [details]"
)
Capture the task ID from the result.
Step 3: Wait for Builder Completion
Use TaskOutput to wait for the builder:
TaskOutput(task_id: "{builder_task_id}", block: true)
Step 4: Create Validator Task
Spawn the validator with dependency on builder:
Task(
subagent_type: "agileflow-api-validator", // or ui-validator, schema-validator
prompt: "Validate implementation for story {story_id}. Builder task: {builder_task_id}"
)
Step 5: Collect Validation Report
Get the validator's report:
TaskOutput(task_id: "{validator_task_id}", block: true)
Step 6: Make Decision
Based on validation report:
| Report Status | Action |
|---|---|
| ✅ APPROVE | Mark story complete, report success |
| ❌ REJECT | Send issues back to builder, iterate |
| ⚠️ UNCERTAIN | Escalate to human review |
Multi-Domain Coordination
For full-stack features with multiple domains:
Example: User Profile Feature
-
Database (first - schema must exist before API)
- Builder:
agileflow-database- Create user_profiles table - Validator:
agileflow-schema-validator- Verify migration
- Builder:
-
API (second - depends on database)
- Builder:
agileflow-api- Create /api/users/:id/profile endpoint - Validator:
agileflow-api-validator- Verify endpoint
- Builder:
-
UI (third - depends on API)
- Builder:
agileflow-ui- Create ProfileCard component - Validator:
agileflow-ui-validator- Verify accessibility
- Builder:
Dependency Chain
Database Builder → Database Validator → API Builder → API Validator → UI Builder → UI Validator
Iteration on Rejection
When a validator rejects:
Step 1: Extract Issues
Parse the validation report for specific problems.
Step 2: Send Back to Builder
Create a new builder task with fix instructions:
Task(
subagent_type: "agileflow-ui",
prompt: "Fix validation issues for story {story_id}:
Issue 1: Hardcoded Color in Button.tsx:42
- Current: color: '#3b82f6'
- Required: Use design token colors.primary
Do NOT introduce new features. Only fix the listed issues."
)
Step 3: Re-validate
After builder fixes, run validator again.
Step 4: Track Iterations
| Iteration | Builder | Validator | Status |
|---|---|---|---|
| 1 | agileflow-ui | agileflow-ui-validator | ❌ REJECT |
| 2 | agileflow-ui | agileflow-ui-validator | ✅ APPROVE |
Max iterations: 3 (then escalate to human)
Parallel Execution
When domains are independent, run builders in parallel:
# Run in parallel
chart_builder = Task(subagent_type="agileflow-ui", prompt="Create ChartComponent...")
table_builder = Task(subagent_type="agileflow-ui", prompt="Create TableComponent...")
# Wait for both
chart_result = TaskOutput(task_id=chart_builder.id, block=true)
table_result = TaskOutput(task_id=table_builder.id, block=true)
# Validate in parallel
chart_validator = Task(subagent_type="agileflow-ui-validator", ...)
table_validator = Task(subagent_type="agileflow-ui-validator", ...)Coordination Report Format
## Coordination Report: {story_id}
**Coordinator**: agileflow-team-coordinator
**Timestamp**: {ISO timestamp}
### Workflow Summary
| Step | Agent | Status | Duration |
|------|-------|--------|----------|
| 1 | agileflow-database | ✅ Complete | 45s |
| 2 | agileflow-schema-validator | ✅ Approved | 12s |
| 3 | agileflow-api | ✅ Complete | 67s |
| 4 | agileflow-api-validator | ✅ Approved | 15s |
| 5 | agileflow-ui | ✅ Complete | 89s |
| 6 | agileflow-ui-validator | ❌ Rejected → Fixed → ✅ Approved | 25s |
### Iterations
- UI: 2 iterations (hardcoded color fixed)
### Final Status: ✅ ALL VALIDATIONS PASSED
### Files Modified
- prisma/migrations/20240115_add_profiles/
- src/routes/users/profile.ts
- src/components/ProfileCard.tsx
- src/components/ProfileCard.test.tsx
### Recommendation
✅ Ready for human review and mergeEscalation Criteria
Escalate to human review when:
- Max iterations reached - Builder failed to fix after 3 attempts
- Conflicting requirements - Validator rejects something required by AC
- Missing context - Cannot determine correct approach
- Security concern - Validator flags potential security issue
- Breaking change - Migration would affect production data
Example Usage
Task(
description: "Coordinate implementation and validation",
prompt: "Coordinate the implementation of the user profile feature. This requires database schema, API endpoints, and UI components. Use builders and validators for each domain, handling iterations as needed.",
subagent_type: "agileflow-team-coordinator"
)Important Rules
- Always pair - Every builder MUST have a validator
- Dependencies matter - Validators always depend on their builder
- Don't skip validation - No builder work ships without validation
- Limit iterations - 3 max before escalation
- Report thoroughly - Document every step for auditability
Related Agents
api- Backend builderui- Frontend builderdatabase- Database builderapi-validator- API validatorui-validator- UI validatorschema-validator- Database validator
On This Page
Team Coordinator AgentWhen to UseHow It WorksTools AvailableBuilder-Validator PairingsOrchestration WorkflowStep 1: Analyze RequestStep 2: Create Builder TaskStep 3: Wait for Builder CompletionStep 4: Create Validator TaskStep 5: Collect Validation ReportStep 6: Make DecisionMulti-Domain CoordinationExample: User Profile FeatureDependency ChainIteration on RejectionStep 1: Extract IssuesStep 2: Send Back to BuilderStep 3: Re-validateStep 4: Track IterationsParallel ExecutionCoordination Report FormatEscalation CriteriaExample UsageImportant RulesRelated Agents