@xucheng

OpenClaw Swarm Layer

Spec-driven workflow orchestrator for OpenClaw.

当前版本
v0.5.1
code-plugin社区source-linked
<div align="center">

OpenClaw Swarm Layer

Spec-Driven Workflow Orchestration for AI Agent Swarms

Turn Markdown specs into executable task graphs. Dispatch through ACP automation or manual fallback. Supervise progress with a control plane. Track with persistent sessions. Gate with review approval.

Version MIT License Node.js OpenClaw Tests

Quick Start · Installation · CLI Reference · Configuration · Docs

</div>

Features

  • Spec-driven planning — Markdown spec with goals and phased tasks → dependency-ordered task graph
  • ACP-first execution — ACP is the only default-capable automated runner; capability-aware auto resolution
  • Supervised autopilot — Deterministic control-plane tick, lease-backed service loop, and operator-visible start/pause/resume/stop controls
  • Persistent sessions — Reuse, thread binding, follow-up, steer, cancel, and close flows
  • Review gates — Explicit approve/reject with structured quality rubrics (weighted multi-dimension scoring)
  • Sprint contracts — Verifiable acceptance criteria per task with GAN-inspired evaluator injection
  • Cross-session continuity — Progress synthesis, bootstrap startup sequence, harness assumption tracking
  • Automatic retry — Configurable per-task retry policy with dead letter tracking and signal-based auto-retry
  • 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
  • Operator reporting — Status snapshots, run/review logs, spec archives, completion summaries → local + Obsidian sync
  • Runtime diagnosticsswarm doctor, swarm status, and workflow reports surface ACP bridge-exit gate directly

Prerequisites

  • Node.js >= 22
  • OpenClaw >= 2026.3.22 (tested against 2026.4.8)

Installation

From ClawHub (recommended)

openclaw plugins install clawhub:openclaw-swarm-layer

Skill From ClawHub

openclaw skills install swarm-layer

From npm

npm install -g openclaw-swarm-layer
openclaw plugins install openclaw-swarm-layer

From 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

Quick Start

# 1. Initialize a project
openclaw swarm init --project /path/to/your/project

# 2. Import a spec and build the workflow
openclaw swarm plan --project /path/to/your/project --spec SPEC.md

# 3. Inspect runtime posture before execution
openclaw swarm doctor --json
openclaw swarm status --project /path/to/your/project --json

# 4. Dry-run with the resolved default runner
openclaw swarm run --project /path/to/your/project --dry-run --json

# 5. Execute
openclaw swarm run --project /path/to/your/project --json

# 6. Review and report
openclaw swarm review --project /path/to/your/project --task <taskId> --approve --json
openclaw swarm report --project /path/to/your/project --json

CLI Commands

Core Workflow

CommandDescription
swarm init --project <path>Initialize swarm state for a project
swarm plan --project <path> --spec <path>Import a spec and build task graph
swarm run --project <path> [--runner acp|manual] [--dry-run] [--parallel N] [--all-ready]Execute runnable tasks (single or batch)
swarm review --project <path> --task <id> --approve|--reject [--retry-now]Approve or reject a task
swarm report --project <path>Generate a workflow report
swarm status --project <path>Show workflow status, runtime posture, and bridge-exit gate
swarm doctorDiagnose ACP readiness and bridge-exit gate status
swarm autopilot status --project <path>Inspect autopilot health, lease state, and last decision
swarm autopilot start/pause/resume/stop --project <path>Control the supervised autopilot service state
swarm autopilot tick --project <path> [--dry-run]Sync active runs, review state, and queue pressure through the supervised control plane

Session Management

CommandDescription
swarm session list --project <path>List known sessions
swarm session inspect --project <path> --session <id>Inspect a session
swarm session status --project <path> --run <id>Poll session status
swarm session cancel --project <path> --run <id>Cancel an active session
swarm session close --project <path> --run <id>Close a session
swarm session follow-up --project <path> --session <id> --task <desc>Inject a follow-up task
swarm session steer --project <path> --session <id> --message <text>Send a steering message
swarm session cleanup --project <path> [--stale-minutes <n>]Clean up orphaned sessions

Runner Model

RunnerRoleDefault-capableRequirements
acpPrimary automation pathYesACP enabled, public control-plane available
manualOperator-driven safe fallbackAlways availableNone

defaultRunner: "auto" resolves to acp when ACP automation is available, otherwise falls back to manual.

Development

npm run build          # TypeScript -> dist/
npm test               # Unit + e2e tests
npm run test:unit      # Unit tests only (354 tests, 59 files)
npm run test:e2e       # E2E tests only (25 tests, 19 files)
npm run test:watch     # Watch mode
npm run release:check  # Build + full regression + npm pack dry-run + ClawHub package prep

Documentation

User Guides:

Operations:

Project History:

  • Changelog — Release notes
  • Roadmap — Milestone structure and delivery history
  • Milestones — Definition of done per milestone

License

MIT

Contributing

See CONTRIBUTING.md.

源码与版本

源码仓库

xucheng/openclaw-swarm-layer

打开仓库

源码提交

3ef0ac646bd53a43e5394ed881ce3f0bb95ff518

查看提交

安装命令

openclaw plugins install clawhub:openclaw-swarm-layer

元数据

  • 包名: openclaw-swarm-layer
  • 创建时间: 2026/03/24
  • 更新时间: 2026/04/09
  • 执行代码:
  • 源码标签: v0.5.1

兼容性

  • 构建于 OpenClaw: 2026.4.8
  • 插件 API 范围: ^2026.3.22
  • 标签: harness, latest, orchestration, swarm, workflow
  • 文件数: 153