@elyracode/swarm
v0.9.27
Published
Multi-agent swarm orchestration for Elyra -- automated pipelines with visual progress tracking
Downloads
2,297
Maintainers
Readme
@elyracode/swarm
Multi-agent swarm orchestration for Elyra. Automated pipelines where planner, coder, tester, and reviewer agents collaborate on a task with visual progress tracking.
Install
elyra install npm:@elyracode/swarmPipelines
Build (/swarm build <task>)
Full feature development pipeline:
plan -> code -> test -> review -> fix- Plan: Analyzes codebase, creates implementation plan with file paths
- Code: Implements the plan, edits files
- Test: Writes and runs tests for the implementation
- Review: Reviews all changes for correctness, security, edge cases
- Fix: Addresses review findings
Review (/swarm review <target>)
Deep multi-pass code review:
analyze -> correctness -> security -> tests -> synthesize- Analyze: Maps the code structure and data flow
- Correctness: Reviews logic, error handling, edge cases
- Security: Checks for vulnerabilities, input validation, auth issues
- Tests: Evaluates test coverage and quality
- Synthesize: Prioritizes all findings into actionable list
Refactor (/swarm refactor <target>)
Structured refactoring:
analyze -> plan -> implement -> verify- Analyze: Understands current structure, identifies issues
- Plan: Creates refactoring plan preserving behavior
- Implement: Executes the refactoring
- Verify: Confirms behavior is preserved, no regressions
Usage
Commands
/swarm build add a notification system with email and in-app channels
/swarm review the authentication module
/swarm refactor the database query layer
/swarm --worktrees build add rate limiting to the API
/swarm # lists available pipelinesNatural Language
Just describe what you want and mention "swarm":
Use swarm to build a REST API for user profiles
Run a swarm review on the checkout flowHow It Works
Each pipeline stage runs as a focused agent turn with specific instructions. Results from each stage are passed to the next as context. The agent sees a progress indicator showing which stage is active.
Stages marked as read-only (analyze, review, synthesize) cannot edit files. Only implementation stages (code, fix, implement) can write.
Worktree Mode
Add --worktrees (or pass worktrees=true to the swarm tool) to run every stage as an isolated sub-agent instead of inline turns:
- Each stage runs as its own
elyra -pprocess inside a detached git worktree based on HEAD — your working tree is never touched while the swarm runs. - Read-only stages are mechanically restricted to
read,grep,find,lstools, not just prompted. - When all stages complete, the combined changes are checked for conflicts against files that changed in your working tree during the run. If clean, they are applied uncommitted so you can review them; if not, the worktree is kept and the conflicting paths are listed.
- On any failure the worktree is kept for inspection (
git worktree remove --force <dir>to discard). - Outside a git repository, worktree mode degrades gracefully to the classic inline mode.
Requirements: a git repository and the elyra CLI on PATH. Sub-agents start from HEAD, so uncommitted changes in your tree are not visible to them.
