ZaxbyHub/opencode-swarm
Architect-centric agentic swarm plugin for OpenCode. Hub-and-spoke orchestration with SME consultation, code generation, and QA review.
What it solves
OpenCode Swarm solves the "trust gap" in AI-assisted coding by preventing a single model from both writing and approving its own code. It replaces the single-agent approach with a gated pipeline of specialized agents (architect, coder, reviewer, test engineer, etc.) to ensure that code is verified, tested, and secure before it is committed to the codebase.
How it works
Swarm operates as a plugin for OpenCode, coordinated by a central "architect" agent. When a task is requested, the architect creates a phased implementation plan that must pass a critic gate. The workflow then executes tasks sequentially: a coder implements the feature, a reviewer checks for correctness, and a test engineer writes and runs tests.
To maintain security, Swarm includes a shell write detection system that uses static analysis (via bash-parser and regex) to intercept and block destructive or out-of-scope file operations. It also implements a gated pipeline for external skill curation, scanning for prompt injections and unsafe instructions before promoting new tools.
Who it’s for
It is designed for developers who use OpenCode and want higher reliability and security guardrails for AI-generated code, particularly for production-grade software where automated testing and peer-like review are mandatory.
Highlights
- Multi-Agent Gated Pipeline: Separates planning, implementation, review, and testing into distinct roles to prevent self-approval.
- Shell Write Detection: Static analysis of POSIX and Windows shell commands to block unauthorized file writes and destructive operations.
- Comprehensive Language Support: 13 language profiles with tree-sitter parse validation across 20 grammars.
- Resumable Sessions: Saves all project state, plans, and evidence to a
.swarm/directory for persistent context. - PR Monitor: Optional GitHub integration for real-time CI and merge status updates.
- Execution Modes: Offers various modes (Balanced, Turbo, Full-Auto) to tune the trade-off between safety and speed.