본문으로 건너뛰기
cccskills
무료GitHub에 공개

multi-agent-architecture-reference

Decision matrix for selecting multi-agent topologies (Supervisor, Swarm, Hierarchical, Conductor) with token economics, failure modes, and escalation paths

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(10)

  • SKILL.md12.1 KB
  • commands/multi-agent-architecture-reference.md134 B
  • hooks/post-execute.cjs1.2 KB
  • hooks/pre-execute.cjs1.0 KB
  • references/research-requirements.md2.8 KB
  • rules/multi-agent-architecture-reference.md3.5 KB
  • schemas/input.schema.json1.3 KB
  • schemas/output.schema.json1.4 KB
  • scripts/main.cjs5.4 KB
  • templates/implementation-template.md1.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Multi-Agent Architecture Reference

<identity> Canonical reference for multi-agent topology selection — provides a 6-topology decision matrix with token economics, failure modes, escalation paths, and links to existing agent-studio patterns. </identity> <capabilities> - Select the optimal multi-agent topology for a given task based on complexity, cost constraints, and fault tolerance requirements - Estimate token cost multiplier for each topology relative to single-agent baseline - Identify known failure modes (SE-M01 through SE-M05) and their mitigations - Map tasks to existing agent-studio patterns (wave-executor, consensus-voting, swarm-coordination) - Provide escalation path guidance: when to upgrade TRIVIAL → Supervisor → Hierarchical - Reference conductor pattern as agent-studio's default recommendation </capabilities> <instructions>

Step 1: Characterize the Task

Answer these four questions before selecting a topology:

  1. Task independence: Can sub-tasks run in parallel without shared state? (YES → Swarm or Fan-out)
  2. Task types known: Is the set of task types stable and deterministic at design time? (YES → Supervisor)
  3. Phase complexity: Does the work require multi-stage sub-orchestration? (YES → Hierarchical or Conductor)
  4. Stakes: Does an incorrect outcome require multi-reviewer agreement? (YES → Consensus Voting)

Step 2: Apply the Topology Decision Matrix

TopologyToken CostBest ForFailure ModesExisting Skill
Conductor~6xSequential phases, ordered agent steps, default agent-studio patternOrchestrator overload (SE-M01)master-orchestrator.md
Supervisor~5xKnown task types, specialist agents, deterministic routingSingle point of failure; router miscalibration (SE-M01)Built into Router
Fan-out/Fan-in~8xParallel review/analysis, map-reduce, searchResult aggregation complexitywave-executor
Swarm~8xIndependent tasks, load balancing, fault-tolerant processingCoordination overhead; consensus deadlock; orphaned tasks (SE-M02, SE-M05)swarm-coordination
Consensus Voting~12xHigh-stakes decisions requiring multi-reviewer agreementDeadlock on split votes (SE-M02)consensus-voting
Hierarchical~15xEPIC complexity, multiple distinct phases with sub-orchestrationCascade failures; token runaway at depth >3 (SE-M03, SE-M04)Custom per project

Token costs are relative to single-agent baseline (as of 2026). Use as order-of-magnitude guidance.

Step 3: Check Failure Mode Taxonomy

Before finalizing topology, verify mitigation for relevant failure modes:

SE-M01: Coordinator Overload

  • Topologies affected: Supervisor, Conductor, Hierarchical root
  • Symptom: Single coordinator receives more traffic than it can route
  • Fix: Distribute coordination or add routing replicas; use wave-executor for fan-out

SE-M02: Swarm Deadlock

  • Topologies affected: Swarm, Consensus Voting
  • Symptom: Agents wait for each other's consensus indefinitely
  • Fix: Timeout + majority-vote with tie-breaker; set consensus_timeout_ms

SE-M03: Cascade Failure

  • Topologies affected: Hierarchical
  • Symptom: A mid-level agent failure halts all downstream agents
  • Fix: Circuit breakers at each tier; retry with backoff; fallback agents

SE-M04: Token Runaway

  • Topologies affected: Hierarchical
  • Symptom: Spawning too many levels burns tokens exponentially
  • Fix: Set max_depth=3; monitor token budget per level; prefer Conductor over deep Hierarchical

SE-M05: Orphaned Tasks

  • Topologies affected: Swarm
  • Symptom: Agents drop tasks when no ownership is clear
  • Fix: Assign task IDs; use TaskUpdate tracking; require TaskUpdate(in_progress) on pickup

Step 4: Apply Escalation Path

Use the complexity escalation ladder when initial topology is insufficient:

TRIVIAL → Single agent (no multi-agent needed)
    ↓ (task types > 1, > 3 files)
LOW → Supervisor (router delegates to 2-3 specialists)
    ↓ (parallel processing needed)
MEDIUM → Conductor + Fan-out (master-orchestrator + wave-executor)
    ↓ (multi-phase with sub-orchestration)
HIGH → Hierarchical (orchestrators at multiple tiers)
    ↓ (high-stakes decision required)
EPIC → Hierarchical + Consensus Voting (max 3 tiers + voting gate)

Step 5: Reference Existing agent-studio Patterns

PatternSkill/FileUse Case
Conductor (DEFAULT).claude/agents/orchestrators/master-orchestrator.mdSequential phase execution; TaskUpdate coordination
Fan-out/Fan-inwave-executor skillParallel batch processing; EPIC-tier pipelines
Swarmswarm-coordination skillConcurrent independent task execution
Consensusconsensus-voting skillHigh-stakes decisions; multi-reviewer agreement
SupervisorBuilt into CLAUDE.mdTask routing to specialist agents

When in doubt, start with Conductor. The master-orchestrator pattern drives sequential phases with explicit TaskUpdate coordination — the lowest-risk default for most MEDIUM/HIGH tasks.

</instructions> <examples>

Example 1: Code Review Pipeline

  • Task: Review 5 files for security, quality, and style
  • Character: Tasks are independent (YES), parallel OK (YES)
  • Topology: Fan-out/Fan-in (~8x)
  • Pattern: wave-executor skill — spawn 3 reviewers in parallel, aggregate results

Example 2: Feature Implementation

  • Task: Design → Implement → Test → Document
  • Character: Sequential phases, ordered steps (YES)
  • Topology: Conductor (~6x)
  • Pattern: master-orchestrator with TaskUpdate coordination between phases

Example 3: Architecture Decision

  • Task: Choose between 3 database options for production system
  • Character: High stakes, requires agreement (YES)
  • Topology: Consensus Voting (~12x)
  • Pattern: consensus-voting skill — 3 architect agents vote, majority decides

Example 4: Batch Agent Creation

  • Task: Create 10 new agents from specs
  • Character: Independent tasks (YES), fault tolerance > ordering (YES)
  • Topology: Swarm (~8x)
  • Pattern: swarm-coordination skill with task ID assignment per agent
</examples>

<best_practices>

  • Default to Conductor (master-orchestrator) — it is the lowest-risk pattern for most tasks
  • Never use Hierarchical beyond depth=3 (token runaway risk SE-M04)
  • Always assign TaskUpdate(in_progress) on task pickup in Swarm to prevent SE-M05
  • Use Fan-out (wave-executor) instead of Swarm when tasks have clear aggregation boundary
  • Add consensus gate only for genuinely high-stakes decisions — 12x token cost is significant
  • Document token budget per topology tier when spawning Hierarchical
  • Cross-reference failure mode taxonomy before finalizing topology choice </best_practices>

Iron Laws

  1. ALWAYS start with Conductor — default to master-orchestrator for MEDIUM/HIGH tasks; only escalate to Hierarchical when sub-orchestration is explicitly required by the task structure.
  2. NEVER exceed depth=3 in Hierarchical — token cost grows exponentially at each tier; depth >3 triggers SE-M04 (token runaway) and is considered an architectural defect.
  3. ALWAYS assign TaskUpdate(in_progress) on Swarm task pickup — missing task ownership is the root cause of SE-M05 (orphaned tasks); every agent in a swarm must call TaskUpdate before doing work.
  4. NEVER use Consensus Voting for low-stakes decisions — 12x token multiplier is justified only for architecture decisions, security approvals, or irreversible production changes.
  5. ALWAYS cross-reference the failure mode taxonomy before finalizing topology — each topology has documented failure modes (SE-M01 through SE-M05); skipping this review leads to production incidents.

Anti-Patterns

Anti-PatternProblemFix
Defaulting to Hierarchical for every complex taskToken runaway at depth >3; cascade failure risk; over-engineering most tasksUse Conductor (sequential phases) first; only escalate to Hierarchical when sub-orchestration is mandatory
Using Swarm for ordered, dependent tasksSwarm agents run concurrently and cannot enforce ordering; produces race conditionsUse Conductor or Fan-out/Fan-in when task ordering matters
Skipping TaskUpdate(in_progress) in SwarmTasks become orphaned (SE-M05); no ownership tracking; duplicated or dropped workRequire every swarm agent to call TaskUpdate(in_progress) as its first action
Adding Consensus Voting speculatively12x token overhead kills budget for non-critical decisions; slowdown on all downstream tasksReserve consensus gate for genuinely high-stakes, irreversible decisions only
Mixing topology concerns (Supervisor + Swarm + Hierarchical in one flow)Complexity explosion; routing ambiguity; impossible to debug failuresPick one primary topology per orchestration scope; compose only at well-defined phase boundaries

Memory Protocol (MANDATORY)

Before starting:

Read .claude/context/memory/learnings.md to check for prior multi-agent architecture decisions.

After completing:

  • New topology decision → Append to .claude/context/memory/decisions.md
  • Failure mode encountered → Append to .claude/context/memory/issues.md
  • New pattern discovered → Append to .claude/context/memory/learnings.md

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Related Skills

  • wave-executor — Fan-out/Fan-in implementation
  • swarm-coordination — Swarm topology execution
  • consensus-voting — Byzantine consensus for high-stakes decisions
  • architecture-review — Validate topology choices against NFRs
  • complexity-assessment — Determine complexity level before topology selection

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

oimiragieo의 스킬 모두 보기

이 스킬의 문제 신고