Agent Teams Workflow

VerifiedSafe

Orchestrates a team of AI agents for autonomous parallel development. The lead plans, assigns file ownership, spawns teammates, and reviews; teammates follow TDD, own specific files, and communicate blockers. Helps scale large tasks by dividing work without file conflicts.

Sby Skills Guide Bot
DevelopmentAdvanced
906/2/2026
Claude Code
#team-workflow#autonomous-development#parallel-development#git-workflow

Recommended for

Our review

Provides a structured workflow for agent teams to work autonomously in parallel on a single feature branch, with a team lead orchestrating planning, spawning teammates, and reviewing integration.

Strengths

  • Clear separation of file ownership to avoid conflicts
  • Automated failure recovery with retry and logging
  • Integration of sub-agents for testing, code review, and e2e validation
  • Standardized git branch strategy for parallel development

Limitations

  • Requires careful task breakdown to ensure no overlapping file ownership
  • Relies on manual plan approval before execution
  • Sub-agents may introduce overhead if not properly configured
When to use it

Use this workflow when you have a large, multi-file feature that can be broken into independent tasks and multiple agents are available.

When not to use it

Avoid this workflow for small, single-file changes or when you need tight coordination on overlapping files.

Security analysis

Safe
Quality score85/100

The skill provides operational guidance for AI agent teams, with no executable commands, no destructive instructions, and no data exfiltration risks.

No concerns found

Examples

Start as team lead
/workflow-team lead
Start as teammate
/workflow-team teammate
Spawn example (from lead phase 2)
Create an agent team with 2 teammates: 1. "FeatureA" — Read feature-a-plan.md. Own files: src/featureA/**/*. 2. "FeatureB" — Read feature-b-plan.md. Own files: src/featureB/**/*. Use Opus for all teammates. Require plan approval.

name: workflow-team description: | Workflow for Agent Teams autonomous parallel development. Provides team lead orchestration guide and teammate execution protocol. Covers file ownership, communication, and merge strategy. argument-hint: "[lead|teammate]"

Agent Teams Workflow

Autonomous parallel development workflow for Agent Teams. Invoke with: /workflow-team lead or /workflow-team teammate


For Team Lead (/workflow-team lead)

Phase 1: Plan

| Step | Action | |------|--------| | 1 | Enter PlanMode | | 2 | Read CLAUDE.md, docs/PROJECT-STRUCTURE.md, docs/ROADMAP.md | | 3 | Analyze task scope, identify required files and dependencies | | 4 | Break work into tasks with clear file ownership (no overlapping files) | | 5 | Create detailed step-by-step plan with task breakdown | | 6 | Exit PlanMode → wait for plan approval |

After plan approval, create tasks via TaskCreate and spawn teammates immediately. No separate confirmation needed.

Phase 2: Execute (after user approval)

| Step | Action | |------|--------| | 1 | Switch to development branch, create a working branch for the team | | 2 | Spawn teammates with detailed prompts (see Spawn Example below) | | 3 | Use Delegate Mode (Shift+Tab) — do NOT implement yourself | | 4 | Monitor teammate progress, unblock as needed |

Enable Plan Approval for complex/risky tasks. All teammates work on the same feature branch (file ownership prevents conflicts).

Spawn Example

Create an agent team with N teammates:
1. "{name}" — Read {task-file-path}. Own files: {file-list}.
2. "{name}" — Read {task-file-path}. Own files: {file-list}.
Use Opus for all teammates. Require plan approval.

Phase 3: Review & Merge (after all teammates complete)

| Step | Action | |------|--------| | 1 | Run the project's test command (see CLAUDE.md Commands) to verify integration | | 2 | Run code-reviewer sub-agent on all changed files | | 3 | Run e2e-tester sub-agent to validate user flows | | 4 | Read report in /docs/reports/code-review/ → fix ALL issues where status ≠ "complete" | | 5 | Merge working branch → development | | 6 | Update ROADMAP.md and PROJECT-STRUCTURE.md |

Merge Strategy

main
 └── development
      └── {working-branch}  ← single branch, all teammates work here
           ├── teammate-A commits (owns: file-list-A)
           ├── teammate-B commits (owns: file-list-B)
           └── teammate-C commits (owns: file-list-C)

After all teammates done → Phase 3

Git Conventions

See workflow-commits.md


For Teammates (/workflow-team teammate)

Execution Steps

| Step | Action | |------|--------| | 1 | Read CLAUDE.md, docs/PROJECT-STRUCTURE.md, assigned task file | | 2 | Run unit-test-writer sub-agent (Red Phase). NEVER analyze patterns or write test code yourself — always delegate to the unit-test-writer subagent. | | 3 | Implement code to pass tests (Green Phase) → run the project's test command (see CLAUDE.md Commands) | | 4 | Run the project's coverage command (see CLAUDE.md Commands) | | 5 | Commit per workflow-commits.md | | 6 | Message lead: files changed, test results, remaining issues |

Teammate Rules

  • ONLY modify files assigned to you
  • NEVER touch files owned by another teammate
  • Shared files (barrel index.ts, routes.ts): message lead before modifying
  • New files: create freely within your task scope
  • Do NOT create branches — work on the feature branch created by lead

Failure Recovery (Autonomous)

IF any step fails:
  1. Log to docs/reports/failures/{teammate-name}-{timestamp}.md
  2. Retry SAME approach (1 attempt)
  3. Retry DIFFERENT approach (1 attempt)
  4. After 3 failures:
     → Message lead: "Blocked on [issue]. Attempted [approaches]."
     → Pick up next available task
     → DO NOT STOP

Communication

| Event | Action | |-------|--------| | Task complete | Message lead with summary | | Blocked by another task | Message lead, pick up next task | | Found issue in shared code | Message lead (don't fix directly) | | Need design decision | Message lead with options + recommendation |


Cost Notes

  • Use opus model for teammates
  • Teammates: NO code-reviewer — TDD cycle is the quality gate, lead handles all review in Phase 3
  • Lead runs code-reviewer + e2e-tester as the single review gate post-merge
  • Minimize sub-agent calls per teammate
  • Avoid broadcast messages — message lead directly
Related skills