Unified team orchestration: parallel task implementation with spec guardian review pattern via Claude Code Agent Teams
From spexnpx claudepluginhub rhuss/cc-spex --plugin spexThis skill uses the workspace's default tool permissions.
This skill orchestrates parallel task implementation using Claude Code Agent Teams. The lead session analyzes the task dependency graph, spawns teammates in isolated worktrees for independent task groups, reviews all changes against spec.md via the spec guardian pattern, and coordinates merges. The spec guardian review loop is always-on: every teammate's work is reviewed for spec compliance before merging.
Check if Agent Teams is enabled:
# Check settings.local.json for the feature flag
FLAG=$(jq -r '.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS // ""' .claude/settings.local.json 2>/dev/null)
If the flag is not set ("" or missing):
.claude/settings.local.json:
jq '.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS = "1"' .claude/settings.local.json > /tmp/settings.json && mv /tmp/settings.json .claude/settings.local.json
If the flag is set: Proceed with team orchestration.
If the flag becomes unset mid-session (e.g., user restarts without it): The pre-flight check runs at skill invocation time, not continuously. If the env var disappears mid-session, already-spawned teammates continue working. On next invocation, the check will catch the missing flag and fall back to sequential.
Read the tasks.md file and analyze the dependency structure:
Evaluate whether teams add value:
Each teammate receives this context in its spawn prompt:
You are implementing tasks for the [feature-name] feature.
You are working in an isolated git worktree.
Your work will be reviewed against spec.md before merging.
## Your Assigned Tasks
[List the specific tasks assigned to this teammate with task IDs]
## Spec Context
[Contents of spec.md for this feature]
## Working Rules
1. Implement each task completely before moving to the next
2. Commit after each logical group with descriptive messages
3. When all your tasks are done, message the lead: "Tasks complete, ready for review"
4. If you encounter a blocker, message the lead with details
5. Do not modify files outside your assigned task scope
6. Use "Assisted-By: Claude Code" as the git commit tagline
Tell Claude to create an agent team:
Create an agent team for parallel implementation of [feature-name].
Spawn [N] teammates:
- Teammate 1: [task group description] - tasks [IDs]- Teammate 2: [task group description] - tasks [IDs]...
Each teammate should implement their assigned tasks independently in their worktree.
Wait for all teammates to complete before proceeding to review.
After spawning teammates:
When a teammate reports completion, the lead reviews their changes:
{Skill: spex:review-code} against spec.md[X] for completed tasksThe lead never implements code directly. The lead's sole job during this phase is review and coordination.
When teams cannot be used (feature flag not active, single task, linear dependencies):
Execute tasks sequentially in the current session following the standard implementation flow from tasks.md. This is the normal behavior when the teams trait is not active.
Mixed independence: When some tasks are independent and others are sequential (e.g., 1 of 3 tasks is independent, 2 are sequential), group the sequential tasks together as one teammate's workload and assign the independent task to a separate teammate. If only one independent group results, fall back to sequential execution.