agent-team-topologies
Agent-team topology kits — 5 production-ready team configurations with task decomposition, file ownership, worktree guidance, and quality-gate hooks
What this skill does
# Agent-Team Topology Kits ## Overview Agent teams parallelize work that would be serial in a single agent. The right topology depends on: - **Complexity**: How many independent concerns are there? - **Risk**: How many reversibility gates are needed? - **Speed**: Can phases run in parallel or must they sequence? Use the topology selector below, then follow the kit for your chosen topology. ## Topology Selector | Signal | Topology | Why | |--------|----------|-----| | Frontend + backend + tests all need changes | Frontend-Backend-Test Squad | Clear file ownership separation | | Need architecture review before implementation | Architect-Implementer-Reviewer Trio | Design gate before code | | Hard bug, multiple hypotheses | Competing-Hypotheses Debug Council | Parallel root-cause exploration | | PR needs security + perf + test review | Security-Performance-Test Review Board | Parallel review disciplines | | Large doc migration or README overhaul | Docs Migration Sprint | Parallel document processing | --- ## Topology 1: Frontend-Backend-Test Squad **Use when:** A feature requires coordinated changes across UI, API, and test layers. **Team composition:** - `frontend-agent` (Sonnet) — edits `src/components/`, `src/pages/`, `src/hooks/` - `backend-agent` (Sonnet) — edits `src/api/`, `src/services/`, `src/db/` - `test-agent` (Sonnet) — edits `src/test/`, `*.test.ts`, `*.spec.ts` - `coordinator` (Opus, main context) — decomposes, coordinates, merges results **File ownership rules:** - frontend-agent: ONLY files matching `src/components/**`, `src/pages/**`, `src/hooks/**` - backend-agent: ONLY files matching `src/api/**`, `src/services/**`, `src/db/**` - test-agent: ONLY files matching `**/*.test.*`, `**/*.spec.*`, `src/test/**` - Shared files (types, constants): backend-agent owns, frontend-agent reads **Worktree guidance:** - Run frontend-agent and backend-agent in separate worktrees (`isolation: "worktree"`) when their changes don't share files - Keep test-agent in main worktree until frontend and backend complete — it reads both outputs - Merge order: backend → frontend → tests **Coordination protocol:** ``` Phase 1 (parallel): frontend-agent + backend-agent implement their slices Phase 2 (sequential): test-agent writes tests covering both slices Phase 3 (main): coordinator reviews, resolves any type conflicts, commits ``` **Quality gate hooks:** - After Phase 1: Run TypeScript type-check across all changed files - After Phase 2: Run test suite; block if any new tests fail - Merge condition: All 3 agents report DONE with 0 type errors **Example decomposition:** ``` Feature: Add user profile editing frontend-agent: ProfileEditForm.tsx, useProfile.ts, profile.css backend-agent: /api/users/[id].ts, userService.ts, userRepository.ts test-agent: ProfileEditForm.test.tsx, userService.test.ts, api/users.test.ts ``` **Cost estimate:** Medium (3 Sonnet agents + 1 Opus coordinator) — ~$0.05-0.15 per feature --- ## Topology 2: Architect-Implementer-Reviewer Trio **Use when:** The task involves design decisions that should be validated before code is written. **Team composition:** - `architect` (Opus) — reads codebase, proposes design, writes spec - `implementer` (Sonnet) — executes the spec - `reviewer` (Opus) — reviews against spec and quality criteria **File ownership rules:** - architect: READ-ONLY. Writes only to `.claude/designs/<feature>.md` - implementer: Writes to all production code files per spec - reviewer: READ-ONLY. Writes only to `.claude/reviews/<feature>.md` **Worktree guidance:** - architect runs in main context (needs full codebase visibility) - implementer runs in a worktree branch (`feature/<name>`) - reviewer runs in main context on the implementer's diff **Coordination protocol:** ``` Phase 1: architect analyzes codebase and writes design spec to .claude/designs/<name>.md Phase 2: [HUMAN GATE] Review spec before implementation — stop here Phase 3: implementer reads spec and implements Phase 4: reviewer reads spec + diff, writes verdict to .claude/reviews/<name>.md Phase 5: [HUMAN GATE] Review verdict before merge ``` **Design spec format (architect output):** ```markdown # Design: <feature> ## Goal <one paragraph> ## Approach <chosen approach with rationale> ## Alternatives considered | Option | Why rejected | |--------|-------------| ## Files to create/modify | File | Change | Risk | |------|--------|------| ## Interface contracts <API signatures, data shapes, event types> ## Acceptance criteria - [ ] <testable criterion> ``` **Cost estimate:** High (2 Opus + 1 Sonnet) — ~$0.20-0.50 per feature. Justified for architectural decisions. --- ## Topology 3: Competing-Hypotheses Debug Council **Use when:** A hard bug with multiple plausible root causes. Single-agent debugging gets anchored on the first plausible explanation. **Team composition:** - `hypothesis-a-agent` (Sonnet) — investigates first hypothesis - `hypothesis-b-agent` (Sonnet) — investigates second hypothesis - `hypothesis-c-agent` (Sonnet) — investigates third hypothesis - `synthesis-agent` (Opus) — reads all 3 reports, picks winner, proposes fix **File ownership rules:** - All hypothesis agents: READ-ONLY (no writes during investigation) - synthesis-agent: writes fix proposal to `.claude/debug/<issue>.md` **Worktree guidance:** - All in main worktree (read-only — no isolation needed) - Run all 3 hypothesis agents in parallel for maximum speed **Coordination protocol:** ``` Phase 1 (coordinator): Parse error, form 3 hypotheses, assign one to each agent Phase 2 (parallel): 3 hypothesis agents independently investigate their hypothesis Phase 3 (synthesis): synthesis-agent reads all 3 reports, selects most evidence-backed root cause Phase 4 (coordinator): Present synthesis to user, await approval to fix ``` **Hypothesis agent output format:** ``` HYPOTHESIS: <one sentence> Evidence FOR: - <file:line>: <what it shows> Evidence AGAINST: - <fact that doesn't fit> Confidence: HIGH / MEDIUM / LOW If true, fix would be: <description> ``` **Synthesis agent output format:** ``` DEBUG SYNTHESIS Winning hypothesis: <agent> — <hypothesis> Confidence: HIGH / MEDIUM / LOW Key evidence: <2-3 bullet points> Rejected hypotheses: - Hypothesis A: <why eliminated> - Hypothesis B: <why eliminated> PROPOSED FIX: File: <path> Change: <description> Risk: <side effects> ``` **Cost estimate:** Low-Medium (3 Sonnet + 1 Opus, all read-only) — ~$0.05-0.10 per bug --- ## Topology 4: Security-Performance-Test Review Board **Use when:** A PR or change needs parallel review across multiple disciplines. **Team composition:** - `security-reviewer` (Opus) — checks for security vulnerabilities, injection, credentials exposure - `performance-reviewer` (Sonnet) — checks for N+1 queries, bundle size, rendering performance - `test-coverage-reviewer` (Sonnet) — checks for missing tests, flaky patterns, coverage gaps - `chair` (Opus, main context) — aggregates all reviews into final verdict **File ownership rules:** - All reviewers: READ-ONLY - chair: writes aggregated verdict to PR description or `.claude/reviews/pr-<n>.md` **Worktree guidance:** - All reviewers in main worktree (read-only, no isolation needed) - Run all 3 reviewers in parallel — they're independent **Review scope:** - security-reviewer: every changed file, git diff, dependency changes - performance-reviewer: React components (render count), DB queries, bundle imports - test-coverage-reviewer: changed files without corresponding test files, coverage delta **Output format (each reviewer):** ``` REVIEW: <discipline> Verdict: PASS | REQUEST_CHANGES | BLOCK BLOCK items: - <file:line>: <critical issue> REQUEST items: - <file:line>: <should fix> SUGGEST items: - <file:line>: <optional improvement> PASS items: - <what was checked and found clean> ``` **Chair aggregated verdict:** ``` PR REVIEW BOARD VERDICT Final verdict: APPROVE | REQUEST_CHANGES | BLOCK Security: PASS | ⚠️ REQUEST | �
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.