跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

swarm-coding

Orchestrates multi-agent hierarchical swarms using a divide-and-conquer architecture for complex, multi-system, or orthogonal engineering initiatives (e.g., concurrent backend, frontend, database, QA). Manages hierarchical Lead Agents and Specialists, disjoint work allocations, and strict parent-child communication. Activate whenever the user mentions 'swarm', requests multi-agent team coordination, or needs context isolation across multiple technical domains.

Daniela Petruzalek (daniela@danicat.dev) · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add danicat/skills --skill swarm-coding

技能说明


name: swarm-coding description: > Orchestrates multi-agent hierarchical swarms using a divide-and-conquer architecture for complex, multi-system, or orthogonal engineering initiatives (e.g., concurrent backend, frontend, database, QA). Manages hierarchical Lead Agents and Specialists, disjoint work allocations, and strict parent-child communication. Activate whenever the user mentions 'swarm', requests multi-agent team coordination, or needs context isolation across multiple technical domains. license: Apache-2.0 compatibility: agents: - Antigravity metadata: category: agents tags: "swarm, subagents, parallel, orchestration, strategy, complexity, coordination" author: Daniela Petruzalek (daniela@danicat.dev) version: "0.4.0" catalog: https://skills.danicat.dev

Swarm Coding

Swarm Coding divides complex engineering objectives among multiple specialized subagents structured in a clear hierarchical organization chart. This divide-and-conquer strategy guarantees context isolation, prevents cross-domain pollution, and accelerates execution by keeping subagent tasks narrowly scoped.

[!NOTE] In this guide, the terms "agent" and "subagent" are used interchangeably.


⚡ Core Principles & Operational Rules

  1. Mandatory Activation: Activate this skill immediately on any mention of the word "swarm" (case-insensitive) in relation to planning or executing a task.
  2. Coordinator Persistence & Non-Execution:
    • The ROOT Swarm Coordinator ALWAYS remains a coordinator and NEVER falls back to an executor.
    • The Swarm Coordinator is strictly forbidden from writing production implementation code, running tests/builds, or performing direct command execution.
  3. Split Coordinator Profiles:
    • Swarm Coordinator (ROOT): Attributed strictly to the ROOT agent that activated the skill (Multiplicity: 1). Defines the top-level Org Chart, names Lead Agents, allocates the agent budget, writes top-level architecture specs, and coordinates overall progress.
    • Lead Agent: Attributed to domain or system leads (Multiplicity: N, one per system/domain). Receives an allocated sub-budget from the Swarm Coordinator, assembles a specialist team, writes domain specifications, delegates tasks, and integrates domain deliverables.
  4. Specialist Role: Attributed to task executors. Designs and implements narrowly-scoped components within a single domain, adhering to domain specs and running operational validation loops.
  5. Strict Communication Hierarchy (No Lateral Messaging):
    • Allowed: Messaging between immediate parents and children ONLY (Swarm Coordinator <-> Lead Agent, Lead Agent <-> Specialist; or Swarm Coordinator <-> Specialist in flat/hybrid structures).
    • Forbidden: Direct communication between agents on the SAME layer (Lead Agent <-> Lead Agent, Specialist <-> Specialist) or direct escalation (Specialist <-> Swarm Coordinator bypassing an intermediate Lead Agent) is strictly forbidden.
    • Design Document First: Inter-domain or cross-layer coordination MUST be handled by writing or updating shared design documents first, then notifying parent/child agents via hierarchical messaging.
  6. Fine-Grained Targeted Testing (No Broad Root Sweeps): Specialists MUST execute fine-grained, package-scoped unit tests (e.g., go test ./internal/physics/...) strictly targeting their assigned task. Running broad project-root test commands (e.g., go test ./...) is strictly forbidden for Specialists unless explicitly requested by the Swarm Coordinator, preventing cross-task contamination and false failures while parallel agents work concurrently.
  7. Swarm Awareness Propagation (Zero Ambient Knowledge):
    • Subagents are spawned with blank context and have zero ambient understanding of swarm protocols, DOP mechanics, non-execution posture, or boundary isolation.
    • Merely stating "you are a swarm coding agent" or "you have a budget of X" is strictly insufficient and forbidden as a standalone instruction.
    • Coordinator -> Lead Propagation: The Coordinator MUST explicitly define the Lead's system role (non-executing architect), equip it with commandExecutionPolicy: off (never run_command), preserve customizations (inheritCustomizations: true), and provide an operational briefing detailing its exact budget arithmetic (1 slot for lead, DOP - 1 concurrent workers, slot recycling, and backlog drip-feeding).
    • Lead -> Specialist Propagation: The Lead MUST explicitly define the Specialist's scope (strict file boundaries, localized test commands only, fail-fast without fallbacks, evidence-based reporting, and immediate termination to free concurrency slots).

🎯 Agent Budget & Degree of Parallelism (DOP)

  • Definition: Agent Budget is synonymous with Degree of Parallelism (DOP). It defines the maximum number of active, concurrent subagents allowed to execute at the exact same time across the entire swarm hierarchy.
  • Budget Arithmetic & Slot Accounting:
    • Domain Budget (DOP) = 1 (Lead Agent) + N (Concurrent Specialists).
    • The Lead Agent consumes 1 concurrency slot. For example, if a Lead is allocated a budget slice of 8, it occupies 1 slot and can run up to 7 concurrent Specialists simultaneously.
  • Active vs. Past Capacity (Slot Recycling): Completed or terminated subagents do not consume budget. The budget applies strictly to currently running subagents. When a subagent completes its work and terminates, its concurrency slot is immediately freed.
  • Backlog Drip-Feeding: When domain tasks exceed available specialist slots ($N$), the Lead Agent maintains a domain task backlog and drip-feeds tasks to fresh Specialists as prior workers conclude.
  • Default Concurrency: Assumes a default budget of 10 active concurrent agents if omitted by the user.
  • Low Budget Guard (<= 1): If the user specifies an agent budget <= 1, multi-agent orchestra
阅读完整来源 ↗