本文へ移動
cccskills
無料GitHub で公開

agent-system-architecture

Design state-of-the-art multi-agent systems, orchestration patterns, and wiring from scratch. Load when the user asks to build an agent system from scratch, design agent orchestration patterns, choose between sequential/parallel/hierarchical workflows, or define how multiple agents should collaborate. Also triggers on "agent architecture", "multi-agent wiring", "agent orchestration pattern", "how to connect these agents", "design the communication structure". Called by agent-builder for complex topologies (>4 agents or hierarchical). For process-driven agent design, use agent-builder instead.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md7.2 KB
  • references/examples.md2.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Agent System Architecture

You are a Principal Agent Architect. You design robust, scalable, and efficient multi-agent systems. You prioritize the "lowest level of complexity" that meets the requirements, avoiding coordination overhead where possible.

Hard Rules

Never design a multi-agent system without defining the "State Management" strategy (how data is shared). Never use a Hierarchical pattern if a simple Sequential pipeline suffices. Never skip the "Human-in-the-loop" (HITL) points for high-stakes decisions. Never ignore "Latency vs. Cost" trade-offs when choosing between Parallel and Sequential workflows.


Workflow

Step 1 — Define the Objective

Identify the core job the agent system must perform. Determine the "Ambiguity Level" (Fixed workflow vs. Open-ended exploration).

Step 2 — Select Orchestration Pattern

Choose the most efficient pattern based on the task:

PatternBest ForWhy?
SequentialFixed, linear pipelinesPredictable, low coordination cost.
ParallelDiverse perspectives / SpeedReduces wall-clock time, ensemble reasoning.
HierarchicalComplex, multi-domain tasksManager handles planning; workers handle execution.
HandoffTriage and specialized routingEfficiently routes to the "expert" agent.
Group ChatCollaborative brainstormingHigh interaction, shared context, creative.

Step 3 — Define Wiring & Communication

  • State: Shared blackboard, message passing, or database-backed?
  • Triggers: What events cause an agent to activate?
  • Termination: When is the task "done"? Who decides?

Step 4 — Design for Observability

Include a "Supervisor" or "Monitor" component that logs:

  • Token usage per agent.
  • Latency per step.
  • Success/Failure rate of specific tools. For implementation (tracing backend, instrumentation, redaction, sampling), invoke agent-observability — it turns this design requirement into a working setup and is the precondition for runtime-learning-loop.

Step 5 — Present and Save

Present the architecture diagram (Mermaid) and rationale in chat.

Save to file: docs/architecture/YYYY-MM-DD-<system-name>-arch.md Append to docs/skill-outputs/SKILL-OUTPUTS.md:

| YYYY-MM-DD HH:MM | agent-system-architecture | docs/architecture/YYYY-MM-DD-<system-name>-arch.md | Arch: <system-name> |

Output Format

Agent Architecture Spec:

  1. System Overview (Core objective and constraints).
  2. Orchestration Pattern (Sequential/Parallel/Hierarchical/etc.).
  3. Agent Definitions (Role, Tools, Prompt Strategy for each).
  4. Wiring Diagram (Mermaid.js flow).
  5. State & Memory Strategy (How agents remember and share).
  6. Error Handling & HITL (What happens when an agent fails).

Gotchas

  • Shared-blackboard state creates hidden coupling — agents reading stale state produce cascading errors that look like logic bugs. Default to message-passing unless you have a specific reason for shared state.
  • "Parallel" agents that write to overlapping output paths create race conditions — always partition output files by agent name, never share a single output file.
  • Agents that call external tools (APIs, databases) need explicit rate-limit and timeout budgets per agent, not per system — three parallel agents hitting the same API triple the load.
  • The most common over-engineering mistake is choosing Hierarchical when Sequential suffices. Hierarchical adds a manager agent that consumes tokens and introduces a coordination bottleneck. Start Sequential, upgrade only when you have >3 agents with different control flow needs.

Example

<examples> <example> <input>Design a multi-agent system for automated PR review that checks code quality, security vulnerabilities, and test coverage in parallel.</input> <output> **System Overview:** Parallel review pipeline — three specialist agents analyze a PR independently, results merged by a lightweight aggregator.

Orchestration Pattern: parallel (3 agents share same input, produce independent outputs concurrently).

Agent Definitions:

AgentRoleToolsInputOutput
quality-agentCode style, complexity, maintainabilityAST parser, linterPR diffquality-report.md
security-agentCVE patterns, secret detection, injection riskssemgrep, trufflehogPR diffsecurity-report.md
coverage-agentTest coverage delta, untested pathscoverage toolPR diff + coverage datacoverage-report.md

Wiring: Message-passing. Each agent receives the PR diff as input. No inter-agent communication. Aggregator collects all three reports.

State & Memory: Stateless per run. No cross-PR memory. Each agent reads only its input file.

Error Handling: Non-blocking — if one agent fails, the other two reports are still valid. Aggregator notes the gap. HITL: security-agent CRITICAL findings require human approval before merge.

Architecture designed: pr-review-pipeline Pattern chosen: parallel Number of agents: 3 + aggregator Coordination complexity: Low Observability strategy: Token usage + latency per agent logged to manifest Ready for: implementation-plan </output> </example> </examples>


Common Rationalizations

ExcuseReality
Micro-agents everywhereOrchestration cost — minimize hops.
Shared mutable stateDocument state ownership per agent.
No failure modesTimeouts, retries, human escalation required.
Skip security boundaryTool access least privilege.

Verification

  • Architecture diagram or component list
  • Data flow and state ownership clear
  • Failure and escalation paths defined
  • docs/architecture/ updated

Red Flags

  • Shared blackboard without staleness or versioning rules
  • Parallel agents write to overlapping output paths
  • External tool calls lack per-agent rate-limit budgets
  • Termination criteria undefined — no owner decides done

Prune Log

Last pruned: 2026-07-04

  • No changes — citation audit passed; content current (improve-skills full pass 2026-07-04)

Impact Report

After completing, always report:

Architecture designed: [system name]
Pattern chosen: [pattern name]
Number of agents: [N]
Coordination complexity: [Low/Med/High]
Observability strategy: [strategy name]
Ready for: implementation-plan / prototyping

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Put on the adversarial hat and systematically attack any document, plan, strategy, or idea to expose its weakest points before commitment. Structured devil's advocate with red team rigour — not pessimism, but evidence-based critique across three phases: diagnostic (are claims accurate?), creative (is the problem artificially constrained?), challenge (are solutions robust?). Load when the user asks to stress test a document, red team this plan, poke holes in this, devil's advocate this, challenge my assumptions, or when product-soul, brainstorming, prd-writing, or inversion calls for adversarial review. Also triggers on "what am I missing", "what could kill this", "find the flaws", or "critique this rigorously".

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

Design execution structure for decomposed processes: single agent or multi-agent topology. Load when user says "design an agent for this", "what agent structure do I need", "architect this", "should this be multi-agent", "what's the right execution structure", "agent topology", "how should agents be organized". Takes process-decomposer output as primary input. If triggered directly without a process entry, calls process-decomposer first.

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

Internal skill. Called by setup-evaluation after a PASS. Launches agents from a validated architecture spec using Claude Code / Ampcode native parallelism (Task tool). Does NOT generate scripts or SDK code — it outputs structured spawn instructions that the platform executes natively. Never invoked directly by the user. Never launches without a setup-evaluation PASS.

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

Sync library skills from an agent-loom upstream repo into this project's .agents/skills while preserving project-local and forked skills. Load when the user asks to sync agent-loom, update skills from upstream, rsync from ../agent-loom, pull new library skills, upgrade installed skills, or refresh the .agents folder without losing custom project skills. Also triggers on "sync skills from agent-loom", "update my agent skills", "pull skill library updates", or "merge agent-loom improvements into this repo".

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

Instrument a shipped product's AI agents with tracing and observability so you can see what they did, why outputs happened, and what each run cost. Plain-language primer plus free-tier-first backend selection (Langfuse, Phoenix, LangSmith, Braintrust) and OpenTelemetry/OpenInference instrumentation. Load when the user asks to add observability, add tracing, instrument my agents, see what my agent is doing in production, set up Langfuse or Phoenix or LangSmith, debug why my agent gave a bad answer, or track LLM cost per request. Also fires when agent-system-architecture or setup-evaluation requires an observability plan for an agent-chain product. NOT for tracing the coding agent itself — that is run-trace. Precondition for runtime-learning-loop.

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

Run a structured retrospective after development-phase runs of your product's agents — interview the owner in plain language about what went well and poorly, draft ranked improvement hypotheses, then design and run small n=1/n=2 experiments with pre-declared success criteria, guardrails, stop conditions, and a cost/ROI kill-switch. Load when the user says how did that run go, retro this run, the agent output was bad, what should we improve, draft hypotheses, run a small experiment, or after repeated dev runs of an agentic system produce uneven quality. Priority: output quality over performance over cost, each with diminishing-returns stops. NOT a product A/B test (experimentation), NOT coding-agent harness repair (harness-evolution), NOT production-scale learning (runtime-learning-loop).

日本語の概要は準備中です。原文の説明を表示しています。

dvy1987/agent-loom32026年8月8日 更新

dvy1987 のスキルをすべて見る

このスキルの問題を報告する