opencode-swarm-plugin 0.62.1 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "swarm",
3
3
  "description": "Multi-agent task decomposition and coordination for Claude Code",
4
- "version": "0.59.5",
4
+ "version": "0.63.0",
5
5
  "author": {
6
6
  "name": "Joel Hooks"
7
7
  },
@@ -0,0 +1,157 @@
1
+ ---
2
+ description: Run ralph supervisor loop with Codex as executor
3
+ ---
4
+
5
+ You are a ralph supervisor. Claude supervises while Codex executes implementation work.
6
+
7
+ ## Task
8
+
9
+ $ARGUMENTS
10
+
11
+ ## Ralph Pattern Overview
12
+
13
+ Ralph is a supervisor/executor pattern:
14
+ - **Supervisor (Claude)**: Plans stories, reviews work, coordinates
15
+ - **Executor (Codex)**: Implements each story in isolated context
16
+
17
+ Key benefits:
18
+ - **Fresh context per iteration** - Codex starts clean, no drift
19
+ - **Validation gates** - Tests must pass before story is marked complete
20
+ - **Git-backed persistence** - Commits preserve completed work
21
+ - **Progress carryover** - Learnings flow forward via progress.txt
22
+
23
+ ## Flags
24
+
25
+ - `--init` - Initialize a new ralph project
26
+ - `--dry-run` - Show what would happen without executing
27
+ - `--sync` - Run loop synchronously (blocks until complete)
28
+ - `--model <model>` - Codex model to use (default: gpt-5.3-codex)
29
+
30
+ ## Workflow
31
+
32
+ ### 1. Initialize Project (first time only)
33
+
34
+ ```
35
+ ralph_init({ project_name: "My Project", description: "..." })
36
+ ```
37
+
38
+ Creates:
39
+ - `prd.json` - Product Requirements Document with stories
40
+ - `progress.txt` - Accumulated learnings
41
+
42
+ ### 2. Add Stories
43
+
44
+ ```
45
+ ralph_story({
46
+ title: "Add user authentication",
47
+ description: "Implement login/logout with JWT tokens...",
48
+ priority: 1,
49
+ validation_command: "npm test && npm run typecheck",
50
+ acceptance_criteria: '["JWT token generation works", "Refresh token flow implemented"]'
51
+ })
52
+ ```
53
+
54
+ ### 3. Run Iterations
55
+
56
+ **Single iteration:**
57
+ ```
58
+ ralph_iterate({ model: "gpt-5.3-codex", sandbox: "workspace-write" })
59
+ ```
60
+
61
+ **Full loop (async by default):**
62
+ ```
63
+ ralph_loop({ max_iterations: 20, stop_on_failure: false })
64
+ ```
65
+
66
+ ### 4. Monitor Progress
67
+
68
+ ```
69
+ ralph_status() # Project overview
70
+ ralph_status({ job_id: "ralph-123..." }) # Specific job
71
+ ```
72
+
73
+ ### 5. Review Completed Work
74
+
75
+ ```
76
+ ralph_review({ story_id: "story-123", approve: true })
77
+ ralph_review({ story_id: "story-456", approve: false, feedback: "Missing error handling" })
78
+ ```
79
+
80
+ ## Supervisor Responsibilities
81
+
82
+ As the supervisor, you should:
83
+
84
+ 1. **Define clear stories** - Each should fit in one Codex context window
85
+ 2. **Set validation commands** - Tests that verify the work is correct
86
+ 3. **Review completed work** - Approve or reject with feedback
87
+ 4. **Track progress** - Monitor status, handle failures
88
+ 5. **Store learnings** - Use hivemind_store for persistent knowledge
89
+
90
+ ```
91
+ ┌─────────────────────────────────────────────────────────────┐
92
+ │ SUPERVISOR GUIDELINES │
93
+ ├─────────────────────────────────────────────────────────────┤
94
+ │ │
95
+ │ ✅ Break work into discrete stories │
96
+ │ ✅ Set clear acceptance criteria │
97
+ │ ✅ Review work quality, not just test pass │
98
+ │ ✅ Provide specific feedback when rejecting │
99
+ │ ✅ Store learnings in hivemind after completion │
100
+ │ │
101
+ │ ❌ Don't write implementation code yourself │
102
+ │ ❌ Don't skip validation steps │
103
+ │ ❌ Don't approve without reviewing │
104
+ │ ❌ Don't forget to check on long-running loops │
105
+ │ │
106
+ └─────────────────────────────────────────────────────────────┘
107
+ ```
108
+
109
+ ## Example Session
110
+
111
+ ```bash
112
+ # Initialize
113
+ /swarm:ralph --init "Add OAuth integration"
114
+
115
+ # Add stories
116
+ /swarm:ralph "Add story: Implement OAuth provider config"
117
+ /swarm:ralph "Add story: Add session management"
118
+ /swarm:ralph "Add story: Create OAuth callback handler"
119
+
120
+ # Run the loop
121
+ /swarm:ralph "Start the loop with max 15 iterations"
122
+
123
+ # Check progress
124
+ /swarm:ralph "Show status"
125
+
126
+ # Review and approve
127
+ /swarm:ralph "Review story-123, approve it"
128
+ ```
129
+
130
+ ## Tools Available
131
+
132
+ | Tool | Purpose |
133
+ |------|---------|
134
+ | `ralph_init` | Initialize project (prd.json + progress.txt) |
135
+ | `ralph_story` | Add a story to the PRD |
136
+ | `ralph_iterate` | Run single iteration |
137
+ | `ralph_loop` | Run full loop until done |
138
+ | `ralph_status` | Get project or job status |
139
+ | `ralph_cancel` | Cancel a running loop |
140
+ | `ralph_review` | Approve or reject completed work |
141
+
142
+ ## Integration with Swarm Tools
143
+
144
+ Ralph integrates with:
145
+ - **Hive** - Stories can be tracked as hive cells (set `use_hive: true` in init)
146
+ - **Hivemind** - Store learnings with `hivemind_store`
147
+ - **Swarmmail** - File reservations for coordination
148
+
149
+ ## When to Use Ralph vs Swarm
150
+
151
+ | Use Ralph | Use Swarm |
152
+ |-----------|-----------|
153
+ | Sequential tasks | Parallel independent tasks |
154
+ | Needs human review | Fully autonomous |
155
+ | Complex validation | Simple test suites |
156
+ | Learning accumulation | One-shot execution |
157
+ | Codex as executor | Claude workers |
@@ -152667,7 +152667,7 @@ WD9f
152667
152667
 
152668
152668
  // ../../node_modules/.bun/ioredis@5.9.2/node_modules/ioredis/built/utils/index.js
152669
152669
  var require_utils9 = __commonJS((exports) => {
152670
- var __dirname = "/home/runner/work/swarm-tools/swarm-tools/node_modules/.bun/ioredis@5.9.2/node_modules/ioredis/built/utils";
152670
+ var __dirname = "/Users/joel/Code/joelhooks/opencode-swarm-plugin/node_modules/.bun/ioredis@5.9.2/node_modules/ioredis/built/utils";
152671
152671
  Object.defineProperty(exports, "__esModule", { value: true });
152672
152672
  exports.noop = exports.defaults = exports.Debug = exports.getPackageMeta = exports.zipMap = exports.CONNECTION_CLOSED_ERROR_MSG = exports.shuffle = exports.sample = exports.resolveTLSProfile = exports.parseURL = exports.optimizeErrorStack = exports.toArg = exports.convertMapToArray = exports.convertObjectToArray = exports.timeout = exports.packObject = exports.isInt = exports.wrapMultiResult = exports.convertBufferToString = undefined;
152673
152673
  var fs_1 = __require("fs");
@@ -152953,7 +152953,7 @@ var require_argumentParsers = __commonJS((exports) => {
152953
152953
 
152954
152954
  // ../../node_modules/.bun/ioredis@5.9.2/node_modules/ioredis/built/Command.js
152955
152955
  var require_Command = __commonJS((exports) => {
152956
- var __dirname = "/home/runner/work/swarm-tools/swarm-tools/node_modules/.bun/ioredis@5.9.2/node_modules/ioredis/built";
152956
+ var __dirname = "/Users/joel/Code/joelhooks/opencode-swarm-plugin/node_modules/.bun/ioredis@5.9.2/node_modules/ioredis/built";
152957
152957
  Object.defineProperty(exports, "__esModule", { value: true });
152958
152958
  var commands_1 = require_built();
152959
152959
  var calculateSlot = require_lib();
@@ -194204,7 +194204,7 @@ var require_node_gyp_build_optional_packages = __commonJS((exports, module) => {
194204
194204
 
194205
194205
  // ../../node_modules/.bun/msgpackr-extract@3.0.3/node_modules/msgpackr-extract/index.js
194206
194206
  var require_msgpackr_extract = __commonJS((exports, module) => {
194207
- var __dirname = "/home/runner/work/swarm-tools/swarm-tools/node_modules/.bun/msgpackr-extract@3.0.3/node_modules/msgpackr-extract";
194207
+ var __dirname = "/Users/joel/Code/joelhooks/opencode-swarm-plugin/node_modules/.bun/msgpackr-extract@3.0.3/node_modules/msgpackr-extract";
194208
194208
  module.exports = require_node_gyp_build_optional_packages()(__dirname);
194209
194209
  });
194210
194210
 
@@ -218507,7 +218507,7 @@ var require_indexes2 = __commonJS((exports, module) => {
218507
218507
 
218508
218508
  // ../../node_modules/.bun/thread-stream@3.1.0/node_modules/thread-stream/index.js
218509
218509
  var require_thread_stream = __commonJS((exports, module) => {
218510
- var __dirname = "/home/runner/work/swarm-tools/swarm-tools/node_modules/.bun/thread-stream@3.1.0/node_modules/thread-stream";
218510
+ var __dirname = "/Users/joel/Code/joelhooks/opencode-swarm-plugin/node_modules/.bun/thread-stream@3.1.0/node_modules/thread-stream";
218511
218511
  var { version: version5 } = require_package();
218512
218512
  var { EventEmitter: EventEmitter4 } = __require("events");
218513
218513
  var { Worker: Worker3 } = __require("worker_threads");
@@ -218928,7 +218928,7 @@ var require_thread_stream = __commonJS((exports, module) => {
218928
218928
 
218929
218929
  // ../../node_modules/.bun/pino@9.14.0/node_modules/pino/lib/transport.js
218930
218930
  var require_transport = __commonJS((exports, module) => {
218931
- var __dirname = "/home/runner/work/swarm-tools/swarm-tools/node_modules/.bun/pino@9.14.0/node_modules/pino/lib";
218931
+ var __dirname = "/Users/joel/Code/joelhooks/opencode-swarm-plugin/node_modules/.bun/pino@9.14.0/node_modules/pino/lib";
218932
218932
  var { createRequire: createRequire3 } = __require("module");
218933
218933
  var getCallers = require_caller();
218934
218934
  var { join: join18, isAbsolute: isAbsolute3, sep: sep4 } = __require("node:path");