team-orchestration
Skill2 starsChanged 7 months agoMITView on GitHub
Use when evaluating whether to spawn agent teammates for a task, when managing an active team during the EXECUTE phase, or when file ownership conflicts or teammate coordination issues arise.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- BonBear/open-ps3005dtheir own version, first seen Nov 15, 2026
- swap-cameroon/kuro-antigravity-configtheir own version, first seen Nov 15, 2026
- NoobyGains/godmodetheir own version, first seen Nov 1, 2026
- Shehabov/ai-dev-crewtheir own version, first seen Sep 30, 2026
- darker2016/WorkbuddySkillGroups4DSHtheir own version, first seen Aug 14, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- NoobyGains/godmode★ 120same name
- darker2016/WorkbuddySkillGroups4DSH★ 6same name
- Shehabov/ai-dev-crew★ 4same name
- swap-cameroon/kuro-antigravity-config★ 2same name
- BonBear/open-ps3005d★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- .claude/commands/CLAUDE.mdCLAUDE.md
- .claude/hooks/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/claude-sentient.mdcCursor rule
- profile-detectionSkill
- quality-gatesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 6 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
All three must be true AND CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS must be enabled.
- Very specific: line 25
Read .claude/agents/*.md agent definition files
- Very specific: line 27
Use the agent's spawn_prompt, rules_to_load, and file_scope_hints
- Distinctive: line 42
Fallback: If tasks share files or worktrees unavailable, fall back to shared workspace with file ownership tracking (original behavior).
- Very specific: line 46
Performance note: Do NOT use --bare for teammate agents - they need full MCP and settings context for quality gates.
- Distinctive: line 52
Before a teammate makes any changes, they must submit a plan for lead approval.
- Very specific: line 100
When reviewing a plan_approval_request:
- Very specific: line 101
Check that files_to_modify are within the teammate's declared scope
- Distinctive: line 102
Verify the approach aligns with existing patterns (check DECISIONS.md if relevant)
- Very specific: line 110
Do not begin any file modifications until decision: "approved" is received
- Very specific: line 111
If no response after reasonable wait, send a follow-up ping referencing the original request_id
- Distinctive: line 115
After spawning, switch to coordination-only mode:
- Distinctive: line 124
When all teammate tasks complete:
- Distinctive: line 127
Wait for shutdown confirmations
- Very specific: line 135
Teammate shutdown protocol: Always send shutdown_request and wait for shutdown_approved before calling TeamDelete.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Team Orchestration Skill
Reference material for Agent Teams mode in /cs-loop EXECUTE phase.
Team Eligibility Check
Evaluate three signals after task creation in PLAN phase:
| Signal | Check | Threshold |
| Scope | Count tasks with no blockedBy dependencies | >= 3 independent tasks |
| Independence | Compare directory paths of independent tasks | No overlapping file scopes |
| Complexity | Estimate total work across all tasks | > simple feature or bug fix |
All three must be true AND CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS must be enabled. If env var not set, skip silently and use standard mode.
Agent Matching
- Read
.claude/agents/*.mdagent definition files - Match each work stream to the best-fit agent based on
expertisearrays - Use the agent's
spawn_prompt,rules_to_load, andfile_scope_hints - Fall back to generic role prompts if no matching agent exists
Teammate Spawning
Default strategy: worktree-per-teammate (eliminates file ownership conflicts).
- Partition tasks into independent work streams (no overlapping files)
- For each stream, create an isolated worktree:
- Branch:
team/{agent-name}-{stream-id} - Path:
.worktrees/team-{agent-name}
- Branch:
- Spawn teammate agent in the worktree directory
- Agent receives: task list, quality gates, file scope, rules
- On completion: run gates in worktree, merge if passing
Fallback: If tasks share files or worktrees unavailable, fall back to shared workspace with file ownership tracking (original behavior).
See references/worktree-strategy.md for full details, conflict resolution, and merge order.
Performance note: Do NOT use --bare for teammate agents - they need full MCP and settings context for quality gates. --bare is only appropriate for quick lookup subagents spawned during EXECUTE.
Require plan approval before teammates make changes (see Plan Approval Protocol below).
Plan Approval Protocol
Before a teammate makes any changes, they must submit a plan for lead approval. This prevents scope creep, architectural misalignment, and wasted work.
When to Require Approval
Require approval when the teammate's planned work involves:
- Modifying > 3 files
- Architectural changes (new abstractions, interface changes, schema modifications)
- Ambiguous task descriptions where multiple valid approaches exist
- Changes that touch files outside the teammate's declared scope
Message Format
Teammate → Lead (request):
{
"type": "plan_approval_request",
"request_id": "approve-{task-id}-{timestamp}",
"task_id": "{task-id}",
"plan_summary": "Brief description of approach",
"files_to_modify": ["path/to/file1", "path/to/file2"],
"approach": "Detailed explanation of the implementation strategy",
"alternatives_considered": "Other approaches and why this was chosen"
}Lead → Teammate (approval):
{
"type": "plan_approval_response",
"request_id": "{same request_id}",
"decision": "approved",
"feedback": "Optional guidance or constraints"
}Lead → Teammate (rejection):
{
"type": "plan_approval_response",
"request_id": "{same request_id}",
"decision": "rejected",
"reason": "Why the plan was rejected",
"suggested_approach": "What to do instead"
}Lead Behavior
When reviewing a plan_approval_request:
- Check that
files_to_modifyare within the teammate's declared scope - Verify the approach aligns with existing patterns (check DECISIONS.md if relevant)
- Approve with optional feedback, or reject with a specific reason and suggested approach
- Respond using the exact
request_idfrom the request for correlation
Teammate Behavior
- On approval: proceed with implementation as planned, incorporating any feedback
- On rejection: revise the plan based on
suggested_approach, then resubmit a new request with a newrequest_id - Do not begin any file modifications until
decision: "approved"is received - If no response after reasonable wait, send a follow-up ping referencing the original
request_id
Progress Monitoring
After spawning, switch to coordination-only mode:
- Track progress via shared task list
- Redirect teammates that drift from scope
- Unblock teammates that report issues
- Synthesize results as tasks complete
Result Collection
When all teammate tasks complete:
- Send shutdown requests to all teammates
- Wait for shutdown confirmations
- Review combined changes across all streams
- Report:
[EXECUTE] Team complete: {completed}/{total} tasks - Proceed to VERIFY with all changes
Gotchas
- File ownership conflicts: Carefully partition file ownership — two teammates editing the same file causes "File modified since read" errors. If a teammate modifies a file you need, re-read before editing. The
task-completed.cjshook tracks file ownership and rejects tasks that create conflicts. - Teammate shutdown protocol: Always send
shutdown_requestand wait forshutdown_approvedbefore calling TeamDelete. TeamDelete fails if any members are still active — this is a hard requirement, not a suggestion. - MAX_TEAMMATES cap:
teammate-idle.cjscaps tracked teammates at 50, pruning oldest entries. If you see unexpected teammate state loss, this cap may have been hit. - team-state.json default shape: Both
teammate-idle.cjsandtask-completed.cjsmust use identical defaults (teammates,completed_tasks,file_ownership). Mismatched defaults cause crashes when the wrong hook creates the file first. - CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: Team mode silently degrades to solo mode if this env var is not set. Don't report "team not eligible" when the real issue is the missing env var.
- completed_tasks cap: Capped at 100 entries in team-state.json. Long-running team sessions may lose early task history.
- Worktree cleanup: Always
git worktree removeafter merge, even on failure - leaked worktrees consume disk - Merge order matters: Merge agents that touch foundational files (types, interfaces) first
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

