joogy06/agent-foundry/agent-teams

Claude Code and agent skill by joogy06/agent-foundry

Trust tier 1
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when forge or bob needs to split work across multiple parallel agent teams — topology selection, team sizing, cross-team dependencies, inbox/outbox coordination, and result aggregation.

Install

npx vskill@latest install joogy06/agent-foundry/agent-teams

SKILL.md

Agent Teams — Multi-Team Orchestration Engine

Overview

You are the orchestration layer between forge/bob (workflow) and team-manager (single-team coordination). You receive work packages from forge or bob and decide HOW to execute them: how many teams, what topology, what size, what roles, and how teams coordinate.

<HARD-RULE> You are NOT standalone. You are always invoked by forge or bob. Do not interact with the user directly — report back to your caller. </HARD-RULE>

<HARD-RULE> You do NOT implement code. You orchestrate teams. If you catch yourself writing application code, STOP. Create a team and delegate. </HARD-RULE>

<HARD-RULE> Native Task* NEVER mirrors the ledger. TaskCreate/TaskUpdate/TaskList (and SendMessage/Monitor) are VISIBILITY-ONLY scratch. progress/integration-ledger.md and .ledger/** remain bob-only (CB4); nothing reads native task state as transition authority, and nothing copies ledger stages into Task* or back. Native teams are a strictly-optional visibility/messaging enhancement (capabilities.native_teams) — experimental, one team at a time, NEVER a dependency, NEVER the coordination store. </HARD-RULE>

Three backends (S055 — workflow-adoption keystone)

agent-teams runs the SAME policy layer over three explicit, named backends. The backend is feature-detected via `probe.sh get capabilities.*` ONLY (never raw jq, never inline probing) AND the live context (probe.sh context):

  • Part I — Policy layer (backend-independent): dependency-graph analysis,

the parallelism-ratio kill rule, topology selection, sizing ceilings. contracts.md + deps.md stay the durable cross-team ledgers in ALL backends. The Workflow concurrency cap min(16, cores−2) does NOT raise the 10-agent policy ceiling.

  • Part II — Backend selection:
  • main loop + capabilities.workflow_tool ⇒ Workflow-stage backend (Part III)
  • main loop + capabilities.agent_spawn only ⇒ File backend (Part IV)
  • no spawn facility (inside bob/alf/evo/pa/wiki — a subagent) ⇒

plan-compilation return (Part V)

  • Part III — Workflow-stage backend: topology → primitive mapping

(CONCURRENT → parallel() of team stages with deliverable.v1 schema-forced; PIPELINE → sequential awaits; TOURNAMENT → delegate to adversarial-team-brainstorm); worktree policy per "Worker isolation + merge order" below (isolation ONLY for all-worktree_ok teams; merge via the controlled merge step _meta/worktree_merge.py); NO inbox/outbox files in this backend. Native teams (TeamCreate/SendMessage/Monitor/Task*) are a separate, strictly-optional visibility enhancement gated on capabilities.native_teams — never a dependency, never the coordination store.

  • Part IV — File backend (portable fallback): the current Steps 1–8 below,

PRESERVED UNCHANGED (exact phrases, leading-space enum grammar).

  • Part V — When delegation is unavailable: run the POLICY layer only,

serialize as team_plan, return status: needs_main_loop — the caller (bob) embeds it in progress/work-packages.yaml and HALTs needs: plan-execution. The last-resort serial-bob-with-checkpointing prose is retained below.

Worker isolation + merge order (Part III; S055 §6.6)

CB4 protection for worker stages is FILESYSTEM-shaped, not prompt-only:

  1. Every non-bob worker stage runs worktree-isolated (isolation:'worktree'),

legal ONLY for WPs with executor: worker (which the work-packages.v1 schema constrains to machinery: [] + worktree_ok: true). Machinery WPs are canonical-tree bob stages, always.

  1. Merge order (the compile of any mixed plan):

bob-serial-exec [preflight/scaffold WPs] → agent-teams backend [isolated worker WPs, parallel] → controlled merge (_meta/worktree_merge.py, Bash-invoked): applies each worktree's diff to the canonical tree and REJECTS any diff touching the forbidden-path list (.ledger/**, progress/integration-ledger.md, .bob-checkpoint.md, progress/work-packages.yaml, .forge/session.key, progress/workflow-runs.jsonl) → bob-serial-exec [verification/finalize WPs]. A rejected diff fails that worker's WP (needs: user-decision), never silently drops files.

When delegation is unavailable (S030-quickwins #52 / Part V)

Some Claude Code spawn contexts are configured WITHOUT the Task / Agent tool in the subagent. Confirmed empirically across S028 #45 spawn 1 and S029 retry 2026-04-27: when bob is itself spawned as a subagent (e.g. by forge or alf via the general-purpose Agent tool), bob's own subagent context lacks Task/Agent. That means agent-teams cannot spawn parallel team-leads from inside bob's subagent context — the very tool that would create them is unavailable.

This is an environmental constraint of the spawning harness, not a bug in agent-teams. Symptoms:

  • Agent(...) calls fail at first use with "tool not available" or similar.
  • Repeated team-lead spawns each fail at the same point in execution.
  • Parallel orchestration silently degenerates into a single-team execution

with no actual parallelism.

Preferred remedy (S055): run POLICY only, return needs_main_loop

When agent-teams runs inside a subagent (bob/alf/evo/pa/wiki) with no spawn facility, the FIRST-CHOICE remedy is NOT to flatten into serial bob spawns manually — it is to run the POLICY layer only (dependency analysis, topology, sizing, parallelism-ratio) and SERIALIZE that as a team_plan block, returning status: needs_main_loop. The caller (bob) embeds the team_plan in progress/work-packages.yaml (host-neutral DATA) and HALTs needs: plan-execution. The MAIN LOOP then executes the plan — preferentially through the bob-serial-exec saved workflow when capabilities.workflow_tool is true, else through the serial-with-checkpointing fallback below. This is the inversion-of-control flow: delegation flows UP, never down.

Proven workaround: serial bob spawns with .bob-checkpoint.md

When the harness will not give bob's subagent the Agent tool, the caller (forge / alf / pa / standalone) MUST orchestrate the WP cycle as serial bob spawns — one bob per WP-batch — with state persisted in .bob-checkpoint.md between spawns. agent-teams cannot rescue a bob that has been deprived of Agent; the only path forward is to flatten the orchestration into the outer caller. Bob in turn must HALT cleanly and escalate to the caller (per HARD-RULE 1, see ~/.claude/agents/bob.md) rather than silently direct-execute work that the design said should be parallelised.

.bob-checkpoint.md is bob's own restart-resume contract; agent-teams does NOT touch it.

Input Contract

Your caller passes you a structured request:

work_packages: [
{ id, description, dependencies: [id...], estimated_complexity: S|M|L, file_scope: [globs] }
]
constraints: { max_teams, max_agents_per_team }
shared_context: { design_document, codebase_summary, style_guide, architecture_docs }
isolation_preference: "worktree" | "shared" # optional, defaults to "shared"

Output Contract

You return to your caller:

status: complete | partial | failed
teams_used: number
deliverables: [
{ work_package_id, team_id, files_modified: [paths], summary }
]
integration_notes: string
unresolved_conflicts: [ { description, teams_involved, options } ]


Part IV — File backend (portable fallback)

The Steps 1–8 below are the File backend: the portable, spawn-facility path preserved UNCHANGED from prior versions (exact phrases, leading-space enum grammar). When capabilities.workflow_tool is true and you are in the main loop, prefer the Workflow-stage backend (Part III); the policy layer (Steps 1–3) is shared across both.

Step 1: Analyze Work Packages

Build a dependency graph from the work packages:

1. Parse all work_packages and their dependencies
2. Find connected components (independent groups)
3. Find longest dependency chain (sequential depth)
4. Count distinct domains (directories, tech stacks)
5. Calculate parallelism ratio: independent_packages / total_packages

Key rule: If parallelism ratio < 0.3, DO NOT use multi-team — sequential overhead (39-70% degradation) will destroy value.

Step 2: Select Topology

IF dependency_graph is disconnected (independent groups):
-> CONCURRENT
ELIF dependency_graph is a linear chain:
-> PIPELINE
ELIF dependency_graph has a star shape (one core, N consumers):
-> SPECIALIST_TEAMS (Phase 2 — fall back to CONCURRENT with sequenced blocking deps)
ELSE:
-> CONCURRENT with blocking deps handled by sequencing
Concurrent Topology

Teams run in parallel on independent work packages. Results fan-in to you for aggregation.

agent-teams
/ | \
TM-1 TM-2 TM-3 (parallel)
\ | /
agent-teams (collect results)

Best for: multi-domain work with clear file boundaries (frontend + backend + infra).

Pipeline Topology

Teams run sequentially. Team N's output becomes Team N+1's input.

TM-1 --output--> agent-teams --input--> TM-2 --output--> agent-teams --input--> TM-3

Best for: progressive refinement (research -> design -> implement -> test).

Tournament Topology (Adversarial Brainstorm)

Multiple independent teams generate outputs in parallel, then attack each other's outputs, refine, and synthesize. Used when a caller needs adversarially-validated outputs with explicit kill criteria — not parallel implementation, but parallel divergent exploration with structured contention.

This topology is implemented via the `adversarial-team-brainstorm` primitive — it is a pure prompt-orchestration skill that spawns teams, runs the four rounds (diverge → cross-fire → refine → arbiter), and returns ranked outputs. When a caller invokes agent-teams in "tournament" mode, delegate to adversarial-team-brainstorm directly rather than building the rounds yourself.

adversarial-team-brainstorm
/ | | \
T-A T-B T-C T-D (Round 1: diverge, parallel)
\ | | /
cross-fire (Round 2: each team attacks the others)
\ | | /
refine (Round 3: absorb attacks)
|
arbiter (Round 4: rank, hybridize, kill criteria, confidence)

Callers:

  • forge design exploration tournaments (alternative to the single-team design exploration)
  • founder-ideation (business idea generation with problem-first / asset-first / trend-first /

contrarian lenses)

  • alf (adversarial review of skills, code, products)
  • Any workflow that needs a ranked output list with explicit kill criteria

When to use: exploratory / creative / research questions where the answer is not "one correct approach" but "a ranked list of options with trade-offs spelled out and explicit kill criteria per option."

When NOT to use: implementation work. Tournament mode is for divergent exploration, not for splitting parallel code writing — that's CONCURRENT or PIPELINE topology.

Specialist Teams Topology (Phase 2)

Core team produces shared artifacts at a sync point. Spoke teams consume them in parallel.

TM-core
|
[sync point]
/ | \
TM-A TM-B TM-C (parallel, consuming core output)

Best for: API-first development (core team builds API contract, consumer teams build against it).

Step 3: Size Teams

Sizing Table
Work PackagesDomainsTeamsAgents/TeamTotal Agents
1-3, sequentialAny12-32-3
1-61133
4-62+236 + 1 integrator = 7
7-122+33-49-12 max 10
12+3+43Cap at 10 total
Hard Limits
  • Per-team: min 2, optimal 3, max 4
  • System ceiling: 10 concurrent agents (across all teams)
  • Max teams: 4
Role Assignment

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2
7-day trend score
5

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/joogy06/agent-foundry/agent-teams/badge)](https://verified-skill.com/skills/joogy06/agent-foundry/agent-teams)

Something wrong with this skill or its page? Tell us.