The Speckit Swarm skill is a native implementation of an agent‑orchestration
system built on top of OpenClaw’s tooling. Inspired by the oh‑my‑opencode
paradigm, it provides a structured way to break down complex AI‑assisted tasks
into smaller, parallelizable chunks while ensuring each piece is completed
fully. The skill lives in the skills/speckit-swarm/ directory and consists
of several TypeScript modules that work together to detect trigger keywords,
select appropriate agent personas, plan task decomposition, and enforce
continuation until the work is done.
At its core, Speckit Swarm relies on four main components. The Ultrawork
Detector watches for the keywords "ulw" or "ultrawork" in a user’s prompt and,
when found, flags the request for parallel execution. Agent Personas are a
collection of specialized system prompts that define how each AI agent should
behave—ranging from relentless orchestration to deep work, design debugging,
research, or fast scouting. The Task Planner takes a high‑level goal and
splits it into logical chunks that can be executed concurrently, while the
Continuation Enforcer monitors each chunk to guarantee that no subtask is left
incomplete before the overall job is considered finished.
The skill’s file layout mirrors its functional separation. The src/ folder
holds the implementation: ultrawork.ts contains the detection and triggering
logic; the personas/ subdirectory exports individual agent definitions such
as sisyphus.ts (the main orchestrator), hephaestus.ts (the deep worker),
oracle.ts (design/debug), librarian.ts (research/docs), and explore.ts
(fast scout). The planner.ts file houses the task‑decomposition algorithm,
and index.ts serves as the entry point that ties everything together for
external consumption.
When a user includes "ulw" or "ultrawork" in their request, the skill switches
into Ultrawork Mode. In this mode, the system first cleans the prefix, then
uses the planTask function to break the cleaned instruction into multiple
chunks. Each chunk receives a label, a specific task description, and
optionally a model and thinking depth tailored to the chunk’s nature. The
orchestrator then launches these chunks via parallel_spawn, waiting for all
of them to finish before aggregating the results into a final answer.
Speckit Swarm defines five distinct personas, each tuned for a particular
style of work. Sisyphus, the main orchestrator, runs on the minimax-m2.5
model with high thinking depth, focusing on relentless execution, parallel
coordination, and todo tracking. Hephaestus, the deep worker, shares the same
model and thinking depth but emphasizes autonomous completion of a full scope
without hand‑holding. Oracle handles architecture decisions, bug hunting, and
code review, also using minimax-m2.5 with high thinking. Librarian,
responsible for documentation lookup, code exploration, and pattern finding,
runs on the slightly lighter minimax-m2.1 model with medium thinking.
Finally, Explore acts as a fast scout, using minimax-m2.5‑highspeed with low
thinking to perform rapid greps, file lookups, and quick analyses.
Direct usage of a persona is straightforward. Developers import the PERSONAS
object and the buildTaskPrompt helper from the skill’s module. They select a
persona—for example, PERSONAS.hephaestus—construct a task prompt with
buildTaskPrompt({ task, persona: 'hephaestus' }), and then invoke
sessions_spawn with the generated prompt, the persona’s model, and its
thinking setting. This pattern allows fine‑grained control when a single,
specialized agent is sufficient for the job at hand.
In Ultrawork Mode, the flow is automated. After confirming that the input
contains the trigger keyword via shouldUseUltrawork(task), the caller
invokes planTask(task) to obtain a plan object whose chunks array contains
the parallel work items. The orchestrator then calls parallel_spawn with
those chunks and a wait policy of "all", ensuring that the final response is
assembled only after every chunk has reported success. This automation
eliminates the need for manual persona selection when the user signals a
desire for massive parallelism.
The planTask function itself is the heart of the decomposition logic. It
examines the task description, estimates its complexity, and decides how to
split it into meaningful pieces. For a request like "Create a new API
endpoint", the planner might produce chunks labeled "spec" (write the API
specification), "setup" (create routing and controller scaffolding),
"validation" (add input validation), and "tests" (write unit and integration
tests). Each chunk receives a concise task string that a persona can act upon,
making the parallel execution both efficient and context‑aware.
To support the automatic detection and preparation of ultrawork executions,
the skill exports three helper functions. containsUltrawork(task) returns a
boolean indicating whether the trigger keyword appears.
cleanUltraworkTask(task) strips the "ulw/" or "ultrawork/" prefix, returning
the core task description. Finally, prepareUltrawork(task) orchestrates the
whole process: it returns an object with a shouldExecute flag, the array of
chunks ready for parallel_spawn, and the cleaned task string for logging
or reporting purposes. This encapsulation lets developers embed ultrawork
handling directly into their agent loops with minimal boilerplate.
Before launching parallel agents, Speckit Swarm performs a lightweight
concurrency safety check. It classifies the incoming task into one of several
strategies: projects, CLIs, or APIs that involve creating many new files are
marked as safe for parallel execution (PARALLEL). Tasks that would modify
the same file repeatedly—such as bug fixes or edits to an existing module—are
downgraded to SEQUENTIAL or even SINGLE to avoid race conditions. The
decision flow first gauges overall complexity (is this a large undertaking?),
then checks for file‑level conflicts (will multiple agents touch the same
source file?), and finally selects the appropriate execution strategy.
An illustrative example demonstrates this safety net. Suppose the user says
"ulw create a new CLI". The detector sees the keyword, the planner judges the
task as large and file‑conflict‑free, and returns a plan with multiple
chunks—each responsible for a different aspect of the CLI (command parsing,
subcommand implementation, help text generation, packaging). Because none of
the chunks share the same file, the orchestrator safely dispatches them via
parallel_spawn. Conversely, a request like "ulw fix the login bug in
auth.ts" would be flagged as potentially conflicting; the planner would either
serialize the chunks or collapse them into a single chunk, ensuring that only
one agent edits the critical file at any moment.
In summary, the Speckit Swarm skill equips OpenClaw with a sophisticated,
configurable orchestration layer that turns vague, high‑level AI prompts into
concrete, parallelizable work packages. By combining keyword‑driven ultrawork
activation, a roster of purpose‑built personas, intelligent task
decomposition, and built‑in concurrency safeguards, the system enables
developers to harness the full power of multiple AI agents without sacrificing
correctness or encountering costly merge conflicts. Whether you need a single
deep‑focused worker or a swarm of simultaneous specialists, Speckit Swarm
provides the scaffolding to make it happen reliably and efficiently.
Skill can be found at:
swarm/SKILL.md>
Top comments (0)