← 返回 Skills 市场
xucheng

Swarm Layer

作者 Jerry · GitHub ↗ · v0.5.1 · MIT-0
cross-platform ✓ 安全检测通过
283
总下载
1
收藏
0
当前安装
11
版本数
在 OpenClaw 中安装
/install swarm-layer
功能描述
OpenClaw Swarm Layer: spec-driven workflow orchestration with ACP-first execution, supervised autopilot control plane, manual fallback, persistent sessions,...
使用说明 (SKILL.md)

OpenClaw Swarm Layer

Turn workflow specifications into executable task graphs. Dispatch tasks through manual fallback or ACP automation. Supervise execution through an optional autopilot control plane. Track execution via persistent sessions with reuse and thread binding. Gate completion with review approval. Auto-retry on failure. Generate reports to local disk and Obsidian.

Current release baseline: [email protected], validated on OpenClaw 2026.4.26 with manual review/report smoke and live ACP session smoke.

What It Does

  • Spec-driven planning — Write a Markdown spec with goals and phased tasks → generates a dependency-ordered task graph
  • Multi-runner execution — Manual (operator-driven safe fallback) and ACP (default-capable automation path)
  • Session management — Persistent sessions with binding-key reuse, thread-bound follow-up, and steering messages
  • Review gates — Tasks require explicit approve/reject; structured quality rubrics for weighted multi-dimension scoring
  • Sprint contracts — Negotiated verifiable acceptance criteria per task with automated evaluator injection (GAN-inspired pattern)
  • Cross-session continuity — Progress summary synthesis, bootstrap startup sequence, harness assumption tracking
  • Protective guardrails — Task field immutability guard, session budget control (duration + retries)
  • Automatic retry — Configurable per-task retry policy with dead letter tracking for exhausted tasks
  • Concurrency protection — ACP session concurrency limits with queued task scheduling (FIFO)
  • Reject-retry workflow — Review rejections return tasks to ready for re-run; configurable retry limits
  • Parallel dispatch--parallel N and --all-ready batch dispatch with concurrency-aware slot management
  • Autopilot control plane — Supervised status/start/pause/resume/stop/tick flows with lease-backed decisions and degraded-mode holds
  • Operator reports — Status snapshots, run logs, review logs, spec archives, completion summaries → local + Obsidian sync

What It Does NOT Do

  • Not a distributed multi-node orchestrator — single machine, single project
  • Not a CI/CD pipeline — no git push, PR creation, or deployment automation
  • Not an autonomous PR factory — operator stays in the loop for review decisions

Install

Three installation paths:

ClawHub (skill only):

openclaw skills install swarm-layer

ClawHub package (full plugin):

openclaw plugins install clawhub:openclaw-swarm-layer

npm (full plugin):

npm install openclaw-swarm-layer
openclaw plugins install -l node_modules/openclaw-swarm-layer

GitHub (source):

git clone https://github.com/xucheng/openclaw-swarm-layer.git
cd openclaw-swarm-layer && npm install && npm run build
openclaw plugins install -l /path/to/openclaw-swarm-layer

After install, verify: openclaw plugins info openclaw-swarm-layer should show Status: loaded.

End-to-End Example

# 1. Initialize
openclaw swarm init --project /tmp/my-project

# 2. Write a spec
cat > /tmp/my-project/SPEC.md \x3C\x3C 'EOF'
# Feature Build
## Goals
- Implement and test the new feature
## Phases
### Implement
- Write the core logic
### Test
- Run unit tests
EOF

# 3. Plan
openclaw swarm plan --project /tmp/my-project --spec /tmp/my-project/SPEC.md
# → specId: feature-build, taskCount: 2

# 4. Execute first task
openclaw swarm run --project /tmp/my-project --runner acp
# → action: dispatched, runId: implement-task-1-run-...

# 5. Poll until complete
openclaw swarm session status --project /tmp/my-project --run \x3CrunId>
# → status: completed

# 6. Approve
openclaw swarm review --project /tmp/my-project --task \x3CtaskId> --approve
# → status: done

# 7. Execute next task, repeat steps 4-6

# 8. View report
openclaw swarm report --project /tmp/my-project

Links


Module Router

Determine which module to use based on what the user needs:

User Intent Module Key Commands
Install, configure, initialize Setup plugins install, doctor, init
Plan, execute, review, session ops Operate plan, run, review, session *
Supervised automation control Operate autopilot status/start/pause/resume/stop/tick
Something broken, stuck, or failing Diagnose doctor, session status/cancel/cleanup
Check progress, read reports Report status, report, session list/inspect

When unsure, start with openclaw swarm status --project . to assess the situation.


Setup

When to Use

First-time install, ACP configuration, project initialization, or config troubleshooting.

Flow

1. Prerequisites

node --version     # >= 22
openclaw --version # >= 2026.3.22

The 0.5.2 release was smoke-tested on OpenClaw 2026.4.26.

2. Install Plugin

openclaw plugins install clawhub:openclaw-swarm-layer   # Published package
openclaw plugins install -l /path/to/openclaw-swarm-layer
openclaw plugins info openclaw-swarm-layer   # Should show Status: loaded

3. Configure ACP Public Path

{
  "plugins": { "entries": { "openclaw-swarm-layer": { "config": {
    "defaultRunner": "auto",
    "acp": {
      "enabled": true,
      "defaultAgentId": "codex",
      "allowedAgents": ["codex"],
      "defaultMode": "run"
    }
  }}}}
}

4. Verify

openclaw swarm doctor --json
# severity should be "healthy" or "warning", not "blocked"

5. Initialize Project

openclaw swarm init --project .

6. Optional: Obsidian Sync + Journal

{
  "obsidianRoot": "/path/to/vault/reports",
  "journal": {
    "enableRunLog": true,
    "enableReviewLog": true,
    "enableSpecArchive": true,
    "enableCompletionSummary": true
  }
}

Setup Troubleshooting

  • Plugin not loadingopenclaw plugins info openclaw-swarm-layer
  • ACP unavailableopenclaw swarm doctor --json, confirm public ACP export readiness and runner resolution
  • Legacy bridge config warning → remove bridge.acpFallbackEnabled after confirming ACP public path is ready

Operate

When to Use

Plan and execute workflows, manage sessions, complete review cycles.

Core Loop

Write Spec → Plan → Status → Run → Poll Session → Review → Repeat

Write a Spec

# My Workflow
## Goals
- What to achieve
## Phases
### Phase 1
- Task A
- Task B

Plan → Run → Review

openclaw swarm plan --project . --spec SPEC.md      # Import and generate tasks
openclaw swarm status --project .                     # See what's ready
openclaw swarm run --project . --dry-run              # Preview
openclaw swarm run --project . --runner acp           # Execute (acp/manual)
openclaw swarm run --project . --parallel 3           # Dispatch up to 3 ready tasks
openclaw swarm run --project . --all-ready             # Fill all available concurrency slots
openclaw swarm session status --project . --run \x3Cid>  # Poll until complete
openclaw swarm review --project . --task \x3Cid> --approve
openclaw swarm review --project . --task \x3Cid> --reject --retry-now  # Reject and force retry

Autopilot Control Plane

openclaw swarm autopilot status --project .           # Health + last decision
openclaw swarm autopilot start --project .            # Start supervised loop
openclaw swarm autopilot pause --project . --reason "operator review"
openclaw swarm autopilot resume --project .
openclaw swarm autopilot tick --project . --dry-run   # Inspect next actions without mutating state
openclaw swarm autopilot stop --project . --mode graceful

Use autopilot when you want the workflow to keep progressing under policy control instead of manually calling run, session status, and recovery commands one by one.

Runner Selection

Runner Use When
manual Safe explicit fallback when ACP automation is unavailable or not desired
acp Default-capable automation path through the public ACP control-plane

Session Operations

session list --project .                                    # List all
session inspect --project . --session \x3Cid>                  # Details
session follow-up --project . --session \x3Cid> --task \x3Cdesc>  # Inject task
session steer --project . --session \x3Cid> --message \x3Ctext>   # Redirect
session cancel --project . --run \x3Cid>                       # Abort
session cleanup --project . --stale-minutes 60              # Clean orphans

Session Policies

Policy Behavior
none New session each run (default)
create_persistent Creates reusable persistent session
reuse_if_available Reuse idle persistent session if match found
require_existing Fail if no matching session exists

Harness Enhancement (GAN-Inspired Patterns)

Enable advanced harness features for long-running agent orchestration:

{
  "enforceTaskImmutability": true,
  "bootstrap": { "enabled": true },
  "evaluator": { "enabled": true, "autoInjectAfter": ["coding"] }
}

Sprint Contracts — Add Acceptance Criteria to your spec. plan auto-generates a SprintContract with verifiable criteria attached to coding tasks.

Evaluator Injection — When evaluator.enabled, each coding task gets an auto-injected -eval task that validates the contract. Dependency chains adjust automatically:

coding-task → coding-task-eval → next-task

Quality Rubrics — Replace binary approve/reject with 4-dimension weighted scoring:

  • functionality (0.3) / correctness (0.3) / design (0.2) / craft (0.2)
  • Weighted total >= 6.0 → approve; \x3C 6.0 → reject

Cross-Session Progressprogress.json auto-updated after each run and review. Bootstrap sequence loads progress on startup: verify env → load progress → select task → verify baseline.

Task Immutability — When enforceTaskImmutability is enabled, agents cannot mutate task definitions (title, deps, runner, etc.). Only status, review.status, and contract.criteria[].passes are mutable.

Session Budget — Set runner.budget.maxDurationSeconds and runner.budget.maxRetries per task. Exceeded budgets annotate [BUDGET EXCEEDED] on run records.

Assumption TrackingWorkflowState.assumptions tracks model capability, environment, tooling, and workflow structure assumptions with validation lifecycle.

Conversational Patterns

User Says Do This
"start a new workflow" Help write spec → planstatus
"run the next task" status → dry-run → run
"what's happening?" statussession status for running tasks
"approve everything" List review queue → approve each
"enable harness mode" Add evaluator + immutability + bootstrap config
"something is stuck" Diagnose module

Diagnose

When to Use

Tasks stuck, ACP readiness failures, sessions not updating, dead letters, orphans.

Diagnostic Flow

1. openclaw swarm doctor --json      → Check ACP readiness and bridge-exit health
2. openclaw swarm status --project . → Find abnormal tasks/sessions
3. Investigate specific issue (see below)

Doctor Severity

Severity Meaning Action
healthy All good None
warning Works but risky Address warnings when convenient
blocked Cannot execute Follow remediation immediately

Issue Resolution

Legacy bridge compatibility warning:

  • doctor --json → check warnings / remediation
  • Common: remove stale bridge.acpFallbackEnabled, or clean up old versionAllow/openclawRoot metadata

Stuck running task:

swarm session status --project . --run \x3CrunId>   # Check if session died
swarm session cancel --project . --run \x3CrunId>   # Force cancel if hung

Dead letter task (retries exhausted):

  • swarm status → find dead_letter tasks
  • Fix root cause → manually reset task to ready

Orphaned sessions (stale active):

swarm session cleanup --project . --stale-minutes 60

Version drift (after OpenClaw upgrade):

swarm doctor --json
# Remove stale bridge metadata if present → rerun doctor → verify runner resolution

Report

When to Use

Check progress, generate reports, understand session inventory.

Quick Check

openclaw swarm status --project .  # Structured summary
openclaw swarm report --project .  # Full Markdown report

Report Sections

Section Content
Attention Items needing action: review / blocked / running / dead_letter
Tasks All tasks with current status
Review Queue Tasks awaiting approve/reject
Highlights Notable terminal events (completed/failed/cancelled)
Recommended Actions What to do next
Recent Runs Last 5 runs
Sessions Last 5 sessions with state
Session Reuse Candidates Which tasks can reuse which sessions

Report Files

File Trigger Mode
swarm-report.md Every operation Overwrite
run-log.md swarm run Append
review-log.md swarm review Append
specs/\x3CspecId>.md swarm plan Create once
completion-summary.md All tasks done Overwrite

Local: \x3Cproject>/.openclaw/swarm/reports/ (always) Obsidian: \x3CobsidianRoot>/\x3Cproject>/ (optional async mirror)

Conversational Patterns

User Says Do This
"what's the status?" status → summarize counts + attention
"show me the report" report → read and present key sections
"what needs attention?" status → focus on attention array
"how are sessions?" status → show session counts + recent

Tools Reference

For AI tool calling. All tools accept --json for structured output.

Tool Parameters Purpose
swarm_status project Workflow status with attention items
swarm_task_plan project, spec Import spec, generate task graph
swarm_run project, task?, dryRun?, parallel?, allReady? Dispatch runnable tasks (single or batch)
swarm_review_gate project, task, approve?, reject?, note? Approve/reject review (reject returns to ready by default)
swarm_session_status project, run Poll session status
swarm_session_cancel project, run, reason? Cancel session
swarm_session_close project, run, reason? Close session
安全使用建议
This SKILL.md is coherent for a single-machine workflow/orchestration helper that uses the openclaw CLI and an optional plugin. Before installing anything: (1) verify the npm package and GitHub repo (author, recent commits, open issues), (2) inspect the plugin code (especially install/build scripts) or run it in a sandbox/container, (3) back up any Obsidian or local directories the plugin will write to and confirm where reports are stored, and (4) be cautious granting broader system permissions to the installed plugin. Because the registry entry is instruction-only, the skill itself can’t be statically audited here — the main risk is the external plugin package you choose to install; vet that package before proceeding.
功能分析
Type: OpenClaw Skill Name: swarm-layer Version: 0.5.1 The swarm-layer skill is a comprehensive workflow orchestration tool for OpenClaw, facilitating task planning, execution management via an Automation Control Plane (ACP), and session persistence. It includes advanced features like review gates, automated retries, and reporting to local files or Obsidian. The instructions in SKILL.md and the metadata in _meta.json are consistent with its stated purpose, and no indicators of malicious intent, data exfiltration, or unauthorized execution were found.
能力标签
crypto
能力评估
Purpose & Capability
The name and description (workflow orchestration, ACP-runner, session management, review gates) match the runtime instructions: CLI workflows, spec files, session commands, and optional autopilot settings. Required env vars/binaries are none, which fits a skill that primarily instructs use of the openclaw CLI and local project files.
Instruction Scope
SKILL.md instructs the agent/operator to run openclaw CLI commands, manage local SPEC.md files, configure plugin settings, and view/write reports (local disk and Obsidian). It does not instruct reading unrelated system secrets or exfiltrating data to unknown endpoints. The instructions are reasonably scoped to the stated purpose.
Install Mechanism
The skill itself is instruction-only (no install spec in registry), but the document explicitly instructs installing a plugin via ClawHub, npm, or GitHub. Those installation steps will pull and run third-party code (npm/GitHub), which is outside the static skill bundle and carries the usual supply-chain risk. This is expected for a plugin-style feature but worth vetting before installing.
Credentials
The skill declares no required environment variables, primary credential, or config paths. The configuration snippets show optional OpenClaw plugin config (allowedAgents, defaultAgentId) which are proportional to an ACP/autopilot capability and do not request unrelated service credentials.
Persistence & Privilege
The skill is not flagged always:true and does not request permanent platform presence. It recommends installing an OpenClaw plugin (expected for added functionality), which will modify the user's OpenClaw plugins list — this is normal plugin behavior and scoped to the skill itself.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install swarm-layer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /swarm-layer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.5.2
Refresh the Swarm Layer skill for OpenClaw 2026.4.26 compatibility, current release metadata, and mini smoke validation.
v0.5.1
Refresh release metadata after the ACP autopilot service-loop hotfix.
v0.5.0
Refresh skill docs for the autopilot control plane and the manual+ACP runtime surface.
v0.4.0
Parallel reliability & retry-recovery (SPEC-003): ACP concurrency protection, reject-retry workflow, parallel dispatch
v0.3.4
test
v0.3.3
Release alignment and packaging hygiene patch.
v0.3.1
0.3.1 patch: fix npm-install doctor false negative for ACP public SDK detection.
v0.3.0
ACP-first 0.3.0 release: remove ACP bridge, keep legacy subagent opt-in, align docs and manifest.
v0.2.1
Add OpenClaw 2026.3.24 bridge compatibility, ACP public-export alignment, and refreshed install guidance.
v0.2.0
M4 harness enhancement: GAN-inspired patterns (sprint contracts, evaluator injection, quality rubrics), cross-session continuity, task immutability, session budget, assumption tracking
v0.1.1
Add feature overview, install paths (ClawHub/npm/GitHub), e2e example, and links
v0.1.0
Initial release: unified skill with setup/operate/diagnose/report/tools modules
元数据
Slug swarm-layer
版本 0.5.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 11
常见问题

Swarm Layer 是什么?

OpenClaw Swarm Layer: spec-driven workflow orchestration with ACP-first execution, supervised autopilot control plane, manual fallback, persistent sessions,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 283 次。

如何安装 Swarm Layer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install swarm-layer」即可一键安装,无需额外配置。

Swarm Layer 是免费的吗?

是的,Swarm Layer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Swarm Layer 支持哪些平台?

Swarm Layer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Swarm Layer?

由 Jerry(@xucheng)开发并维护,当前版本 v0.5.1。

💬 留言讨论