octomux 1.0.25 → 1.0.28
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.
- package/README.md +137 -126
- package/agents/orchestrator.md +216 -0
- package/agents/planner.md +99 -0
- package/agents/reviewer.md +332 -0
- package/bin/octomux-hook-bridge.js +183 -0
- package/bin/octomux-hook-bridge.test.ts +331 -0
- package/cli/dist/action.js +8 -0
- package/cli/dist/client.js +57 -4
- package/cli/dist/commands/add-agent.js +20 -10
- package/cli/dist/commands/close-task.js +4 -4
- package/cli/dist/commands/create-skill.js +4 -4
- package/cli/dist/commands/create-task.js +113 -11
- package/cli/dist/commands/default-branch.js +4 -4
- package/cli/dist/commands/delete-skill.js +4 -4
- package/cli/dist/commands/delete-task.js +4 -4
- package/cli/dist/commands/get-skill.js +4 -4
- package/cli/dist/commands/get-task.js +4 -4
- package/cli/dist/commands/hooks-install.js +115 -0
- package/cli/dist/commands/hooks-list.js +177 -0
- package/cli/dist/commands/init.js +143 -0
- package/cli/dist/commands/list-skills.js +8 -9
- package/cli/dist/commands/list-tasks.js +9 -10
- package/cli/dist/commands/post-review.js +56 -0
- package/cli/dist/commands/recent-repos.js +8 -9
- package/cli/dist/commands/resume-task.js +4 -4
- package/cli/dist/commands/send-message.js +4 -4
- package/cli/dist/commands/stop-agent.js +4 -4
- package/cli/dist/commands/task-move.js +35 -0
- package/cli/dist/commands/task-note.js +20 -0
- package/cli/dist/commands/task-ref-add.js +27 -0
- package/cli/dist/commands/task-ref-rm.js +16 -0
- package/cli/dist/commands/task-summary.js +22 -0
- package/cli/dist/commands/task-updates.js +39 -0
- package/cli/dist/format.js +29 -0
- package/cli/dist/index.js +20 -0
- package/dist/assets/AgentEditor-DycLX5gc.js +1 -0
- package/dist/assets/ChatPage-BX3TyXOz.js +2 -0
- package/dist/assets/IntegrationsPage-DKzQcc9w.js +1 -0
- package/dist/assets/SettingsPage-B_civ8AA.js +9 -0
- package/dist/assets/SkillEditor-BLHi9Jym.js +1 -0
- package/dist/assets/TasksPage-C59OCX7K.js +5 -0
- package/dist/assets/WorkspaceDetailPage-DwACtQeu.js +1 -0
- package/dist/assets/WorkspacesPage-Dwp5ejqw.js +1 -0
- package/dist/assets/editor.worker-DyuDvpVp.js +26 -0
- package/dist/assets/index-Cuel_jco.js +18 -0
- package/dist/assets/index-Dkw-hNxU.css +1 -0
- package/dist/assets/switch-C09mhZ7e.js +1 -0
- package/dist/assets/vendor-monaco-8w_IdZy_.js +11 -0
- package/dist/assets/{vendor-react-BZ8ItZjw.js → vendor-react-DVZ9vYhU.js} +9 -9
- package/dist/assets/vendor-router-BNSfXSMI.js +12 -0
- package/dist/assets/vendor-ui-vLFv-L6M.js +17 -0
- package/dist/index.html +8 -5
- package/dist-server/agents-7NORWYDI.js +1 -0
- package/dist-server/chunk-CQGZWR4R.js +2 -0
- package/dist-server/chunk-E5HYNQ6D.js +1 -0
- package/dist-server/chunk-JJNLZ7U4.js +2 -0
- package/dist-server/chunk-OJAAM2XK.js +1 -0
- package/dist-server/chunk-QYDQSULJ.js +268 -0
- package/dist-server/chunk-UZUF5CZR.js +1 -0
- package/dist-server/chunk-WSL26W3H.js +16 -0
- package/dist-server/chunk-XMCSUNYM.js +1 -0
- package/dist-server/claude-code-H6WHSYXB.js +1 -0
- package/dist-server/harnesses-DH3SOF4F.js +1 -0
- package/dist-server/hook-settings-ENUKEL6E.js +1 -0
- package/dist-server/index.js +259 -97
- package/dist-server/preflight-SPZ34KHK.js +13 -0
- package/dist-server/registry-QDC56XWP.js +1 -0
- package/dist-server/resolve-env-GWFARUZQ.js +1 -0
- package/dist-server/startup.js +1 -1
- package/dist-server/store-AIK32B2H.js +1 -0
- package/package.json +13 -2
- package/scripts/demo-claude-welcome.sh +33 -0
- package/scripts/patch-docs-screenshots.ts +90 -0
- package/scripts/postinstall.sh +20 -2
- package/scripts/rollup-to-feat.sh +99 -0
- package/scripts/seed-docs-demo.ts +219 -0
- package/skills/add-agent/SKILL.md +71 -0
- package/skills/create-pr/SKILL.md +1 -1
- package/skills/create-task/SKILL.md +41 -5
- package/skills/send-agent-message/SKILL.md +94 -0
- package/skills/update-task-status/SKILL.md +124 -0
- package/templates/hooks/jira-status/jira-status +25 -0
- package/templates/hooks/jira-status/jira-status.config.json +6 -0
- package/templates/hooks/jira-status/template.json +4 -0
- package/dist/assets/AgentEditor-C-02PBsa.js +0 -1
- package/dist/assets/OrchestratorPage-Dp6XyUGc.js +0 -2
- package/dist/assets/SettingsPage-BE4VpmoN.js +0 -9
- package/dist/assets/SkillEditor-4ZIU7osw.js +0 -1
- package/dist/assets/TaskDetail-kfS8Yfvx.js +0 -1
- package/dist/assets/TerminalView-CguHyqU9.js +0 -3
- package/dist/assets/index-DXzXc59t.js +0 -2
- package/dist/assets/index-Faj6mSLR.css +0 -1
- package/dist/assets/vendor-router-DAafhmjl.js +0 -12
- package/dist/assets/vendor-ui-BEZHWVRx.js +0 -31
package/README.md
CHANGED
|
@@ -4,172 +4,183 @@
|
|
|
4
4
|
|
|
5
5
|
# octomux
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
> **Coding got faster. Managing agents didn't.**
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
A local web app to **dispatch, watch, and review** parallel **Claude Code** and **Cursor** agents from one place. Kanban for fleet status. One inbox for every "allow this tool?" prompt. In-app diff review with **Ship**. No cloud. MIT.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## The Loop
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
1. INTAKE Pull Jira tickets or GitHub issues — auto-creates tasks with prompts
|
|
17
|
-
2. EXECUTE Each task gets its own worktree, branch, and Claude Code agents
|
|
18
|
-
3. SUPERVISE Live terminals + notifications when agents finish or need attention
|
|
19
|
-
4. REVIEW Built-in lazygit & lazyvim — check diffs without leaving octomux
|
|
20
|
-
5. MERGE PRs auto-detected and linked — tasks auto-close when PRs merge
|
|
21
|
-
6. RESUME Close your laptop. Reboot. Everything picks back up automatically.
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g octomux && octomux init && cd your-repo && octomux start
|
|
22
13
|
```
|
|
23
14
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
## Features
|
|
15
|
+
Open [http://localhost:7777](http://localhost:7777) — describe a task in the composer, pick **Claude Code** or **Cursor**, and watch agents work in place.
|
|
27
16
|
|
|
28
|
-
|
|
17
|
+
## From prompt to merged PR
|
|
29
18
|
|
|
30
|
-
|
|
19
|
+
Three phases, one window:
|
|
31
20
|
|
|
32
|
-
|
|
21
|
+
- **01 — Dispatch.** Type a task. Pick Claude Code or Cursor. Hit go. The composer takes plain English, Jira links, or GitHub issue URLs. Drop a second agent on the same branch with one click.
|
|
22
|
+
- **02 — Watch.** See every agent work, live. Each task streams its own view — files the agent is editing, the diff as it grows, terminal output as it runs. When an agent needs permission, the prompt lands in your inbox so you don't have to babysit every pane.
|
|
23
|
+
- **03 — Review & Ship.** Diff review in the same window. File tree, per-file reviewed state, inline comments. Hit **Ship** and the PR auto-links to the task — closes itself when the PR merges.
|
|
33
24
|
|
|
34
|
-
|
|
25
|
+
Code never leaves your laptop. No telemetry, no cloud sync. Crash, reboot, close the lid — `octomux start` restores every task, branch, and session.
|
|
35
26
|
|
|
36
|
-
|
|
27
|
+
## Screenshots
|
|
37
28
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
| | |
|
|
30
|
+
| ----------------------------------------------------------------------------- | -------------------------------------------------------- |
|
|
31
|
+
| **Home inbox + composer** — permission prompts, recent activity, dispatch bar |  |
|
|
32
|
+
| **Command center** — kanban from backlog → done |  |
|
|
33
|
+
| **Settings** — default harness, Cursor model & `--force` |  |
|
|
34
|
+
| **Task cockpit** — agent tabs, live Claude session, Ship, Done |  |
|
|
35
|
+
| **Diff review** — file tree, reviewed state, inline comments |  |
|
|
42
36
|
|
|
43
|
-
|
|
37
|
+
## Features
|
|
44
38
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
39
|
+
- **Sessions inbox** — every permission prompt and question lands in one place; reply once, agents keep going. Tab title shows `(N) octomux` when something needs you.
|
|
40
|
+
- **Command center** — kanban for backlog → done; drag status, archive, workflow from draft → ship.
|
|
41
|
+
- **In-app diff review** — compare to `main`, mark files reviewed, queue inline comments, open lazygit in-editor.
|
|
42
|
+
- **Dual harnesses** — run **Claude Code** (`claude`) or **Cursor** (`cursor-agent`) per task; mix agents on one task via **Add agent**.
|
|
43
|
+
- **Worktrees keep agents off each other** — each task gets its own git worktree and `agents/<task-id>` branch; five agents can edit `auth.ts` at the same time without conflicts on your main tree.
|
|
44
|
+
- **Live task view** — see every agent work in real time: files edited, diff growing, terminal output streaming via xterm.js. Attach the same session from the CLI if you prefer.
|
|
45
|
+
- **Agents that dispatch agents** — `/create-task`, `/list-tasks`, `/send-agent-message` skills work inside any Claude Code window; recursive dispatch from inside an agent.
|
|
46
|
+
- **Integrations** — Jira wiring plus orchestrator skills for GitHub / auto-review intake.
|
|
47
|
+
- **CLI ↔ dashboard parity** — `octomux create-task`, `send-message`, `resume-task` — same tasks the UI shows.
|
|
48
|
+
- **Reboot-proof** — WAL SQLite + preserved worktrees across restarts.
|
|
49
|
+
- **Local-only** — no telemetry, no cloud sync, no analytics. Your `.env` stays on the host.
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
## Patterns
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
- Color-coded agent activity: green (active), gray (idle), amber (waiting for input)
|
|
54
|
-
- Notifications when agents finish, stop unexpectedly, or hit permission prompts
|
|
55
|
-
- Browser tab shows `(N) octomux` + red favicon dot when tasks need attention
|
|
56
|
-
- Toast notifications with "View" button — one click to the relevant agent
|
|
57
|
-
- Send messages to running agents via `octomux send-message`
|
|
58
|
-
- Smart status: tasks needing attention surface before idle tasks
|
|
53
|
+
Three workflows octomux makes one-click:
|
|
59
54
|
|
|
60
|
-
|
|
55
|
+
### Verifier — two agents, two opinions
|
|
61
56
|
|
|
62
|
-
|
|
57
|
+
Claude wrote it. Drop Cursor on the same branch for a second pass. Same-model self-review is just self-confirmation — a different model reads the diff without inheriting the first agent's assumptions. Catches missing nonce checks, off-by-one TTLs, and the kind of mistakes that pass type-checking but break in prod.
|
|
63
58
|
|
|
64
|
-
|
|
65
|
-
- Open ad-hoc shell terminals in any task's worktree from the dashboard
|
|
66
|
-
- No context switching to a separate terminal or IDE
|
|
67
|
-
- Clean branches ready to push and PR when you're satisfied
|
|
59
|
+
> Finish a task with Claude → hit **Add agent** → pick Cursor → reviews land as inline comments → you arbitrate, Ship.
|
|
68
60
|
|
|
69
|
-
|
|
61
|
+
### Sweep — five PRs by lunch
|
|
70
62
|
|
|
71
|
-
|
|
63
|
+
Paste a Jira filter or GitHub issue list into the composer. Each ticket gets its own worktree, branch, and agent. Mix Claude and Cursor across the batch so the model best at each kind of task ends up on it. Come back from standup to a kanban of ready-to-review PRs.
|
|
72
64
|
|
|
73
|
-
|
|
74
|
-
- PR URLs auto-linked in task cards — visible from the dashboard
|
|
75
|
-
- Tasks auto-close when their PRs are merged
|
|
76
|
-
- Zero manual status updates from task creation to merged code
|
|
65
|
+
### Operator — one prompt becomes an epic
|
|
77
66
|
|
|
78
|
-
|
|
67
|
+
Give an agent the orchestrator skills. It plans the work, breaks down the spec, and dispatches subtasks — each one gets its own worktree, mergeable independently. Inside a Claude Code window, the agent itself becomes the user of octomux. You supervise from the dashboard.
|
|
79
68
|
|
|
80
|
-
-
|
|
81
|
-
- On next `octomux start`, running tasks are recovered and agent sessions resume
|
|
82
|
-
- Close your laptop, come back tomorrow, run `octomux start`, keep going
|
|
69
|
+
> `/create-task`, `/list-tasks`, `/send-agent-message` skills inside any Claude Code window. Recursive dispatch.
|
|
83
70
|
|
|
84
|
-
|
|
71
|
+
## Quick start
|
|
85
72
|
|
|
86
|
-
|
|
73
|
+
```bash
|
|
74
|
+
brew install tmux git
|
|
75
|
+
npm install -g @anthropic-ai/claude-code # and/or Cursor CLI
|
|
76
|
+
npm install -g octomux
|
|
77
|
+
octomux init
|
|
78
|
+
cd your-project
|
|
79
|
+
octomux start
|
|
80
|
+
```
|
|
87
81
|
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
82
|
+
```bash
|
|
83
|
+
octomux create-task -t "Add OAuth login" -r .
|
|
84
|
+
octomux create-task -t "Spike with Cursor" -r . --harness cursor
|
|
85
|
+
```
|
|
91
86
|
|
|
92
|
-
|
|
87
|
+
Step-by-step setup, Jira, and orchestrator skills: [ONBOARDING.md](./ONBOARDING.md)
|
|
93
88
|
|
|
94
|
-
##
|
|
89
|
+
## How it works
|
|
95
90
|
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
cd your-project
|
|
99
|
-
octomux start # opens dashboard at localhost:7777
|
|
100
|
-
octomux create-task -t "Add auth flow" -r . # create a task from the CLI
|
|
91
|
+
```
|
|
92
|
+
DISPATCH → BRANCH → CODE → INBOX → REVIEW → MERGE
|
|
101
93
|
```
|
|
102
94
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
| `octomux
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
| `octomux
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
| Task completion | Manual status updates | Auto-closes on PR merge |
|
|
128
|
-
| After a reboot | Start over | Auto-resumes |
|
|
129
|
-
| Reviewing changes | Switch to terminal + git | Built-in lazygit |
|
|
130
|
-
| Agent safety | Hope for the best | Graduated trust: denied/allowed/prompted |
|
|
131
|
-
| Lifecycle management | None | draft → running → closed |
|
|
132
|
-
|
|
133
|
-
## How It Works
|
|
95
|
+
| Phase | What happens |
|
|
96
|
+
| ------------ | --------------------------------------------------------------------------- |
|
|
97
|
+
| **Dispatch** | Composer, CLI, orchestrator skills, or Jira/GitHub drafts |
|
|
98
|
+
| **Branch** | Automatic git worktree + `agents/<task-id>` branch |
|
|
99
|
+
| **Code** | tmux session per task; harness launches `claude` or `cursor-agent` |
|
|
100
|
+
| **Inbox** | Every permission prompt or question collects in one place |
|
|
101
|
+
| **Review** | Diff tab, lazygit terminal, mark files reviewed, **Ship** / **Done** |
|
|
102
|
+
| **Merge** | PR poller links branches; tasks close when their PRs merge |
|
|
103
|
+
| _Recovery_ | DB + worktrees survive reboot — `octomux start` picks up where you left off |
|
|
104
|
+
|
|
105
|
+
## CLI
|
|
106
|
+
|
|
107
|
+
| Command | Description |
|
|
108
|
+
| ------------------------------------ | -------------------------------------------------------- |
|
|
109
|
+
| `octomux start` | Dashboard at `:7777` |
|
|
110
|
+
| `octomux init` | Defaults wizard (Jira, base branch, harness prefs) |
|
|
111
|
+
| `octomux create-task` | New task (`--harness cursor` optional) |
|
|
112
|
+
| `octomux list-tasks` / `get-task` | Inspect tasks |
|
|
113
|
+
| `octomux close-task` / `delete-task` | Stop or fully remove |
|
|
114
|
+
| `octomux resume-task` | Resume a closed task |
|
|
115
|
+
| `octomux add-agent` | Another agent window |
|
|
116
|
+
| `octomux send-message` | Message a running agent — course-correct without restart |
|
|
117
|
+
|
|
118
|
+
## Architecture
|
|
134
119
|
|
|
135
120
|
```mermaid
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
121
|
+
flowchart LR
|
|
122
|
+
subgraph intake [Intake]
|
|
123
|
+
C[Composer]
|
|
124
|
+
CLI[CLI / skills]
|
|
125
|
+
end
|
|
126
|
+
subgraph core [octomux]
|
|
127
|
+
API[API + SQLite]
|
|
128
|
+
IN[Inbox]
|
|
129
|
+
BC[Command center]
|
|
130
|
+
end
|
|
131
|
+
subgraph run [Per task]
|
|
132
|
+
WT[Worktree]
|
|
133
|
+
TM[tmux]
|
|
134
|
+
H[Claude or Cursor]
|
|
135
|
+
end
|
|
136
|
+
C --> API
|
|
137
|
+
CLI --> API
|
|
138
|
+
API --> WT
|
|
139
|
+
API --> TM
|
|
140
|
+
TM --> H
|
|
141
|
+
H -->|hooks| API
|
|
142
|
+
API --> IN
|
|
143
|
+
API --> BC
|
|
144
|
+
WT --> DIFF[Diff review]
|
|
145
|
+
H --> GH[GitHub PR]
|
|
146
|
+
GH -->|poller| API
|
|
148
147
|
```
|
|
149
148
|
|
|
150
149
|
## Requirements
|
|
151
150
|
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
- **
|
|
155
|
-
-
|
|
156
|
-
- **Claude Code CLI**: `npm install -g @anthropic-ai/claude-code`
|
|
157
|
-
|
|
158
|
-
> Xcode Command Line Tools (`xcode-select --install`) may be needed if native dependencies (`better-sqlite3`, `node-pty`) require local compilation.
|
|
151
|
+
- macOS (ARM64 or x64), Node.js 20+
|
|
152
|
+
- `tmux`, `git`
|
|
153
|
+
- At least one harness: **Claude Code** (`claude`) and/or **Cursor CLI** (`cursor-agent`)
|
|
154
|
+
- Recommended: `lazygit`, `neovim`
|
|
159
155
|
|
|
160
156
|
## Configuration
|
|
161
157
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
| `--port
|
|
165
|
-
|
|
|
166
|
-
| `
|
|
167
|
-
| `
|
|
158
|
+
| Variable / flag | Purpose |
|
|
159
|
+
| ------------------------- | -------------------------------- |
|
|
160
|
+
| `OCTOMUX_PORT` / `--port` | Dashboard port (default `7777`) |
|
|
161
|
+
| `OCTOMUX_URL` | CLI → API base URL |
|
|
162
|
+
| `OCTOMUX_DB_PATH` | Override task DB path |
|
|
163
|
+
| `OCTOMUX_GITHUB_LOGIN` | Reviewer-request polling account |
|
|
164
|
+
|
|
165
|
+
## FAQ
|
|
166
|
+
|
|
167
|
+
**What's the difference between octomux and just running tmux + Claude Code?**
|
|
168
|
+
octomux adds the kanban, the inbox, and diff review on top. tmux is just plumbing underneath.
|
|
169
|
+
|
|
170
|
+
**Does it work with Cursor?**
|
|
171
|
+
Yes. Pick Claude Code or Cursor per task. Mix them on the same task with **Add agent**.
|
|
172
|
+
|
|
173
|
+
**What happens if two agents touch the same file?**
|
|
174
|
+
They can't — each task runs in its own git worktree on its own branch. Five agents can edit `auth.ts` at the same time without conflicts on your main tree.
|
|
175
|
+
|
|
176
|
+
**What if my laptop reboots or crashes?**
|
|
177
|
+
Run `octomux start`. Tasks, branches, terminals, and review state all come back.
|
|
178
|
+
|
|
179
|
+
**How do I track what each agent is costing me?**
|
|
180
|
+
Each agent's tmux session has its own session log; Claude Code and Cursor both emit token usage there. A first-class cost view in the dashboard is on the roadmap.
|
|
168
181
|
|
|
169
182
|
## Links
|
|
170
183
|
|
|
171
|
-
- GitHub
|
|
172
|
-
- npm: [npmjs.com/package/octomux](https://www.npmjs.com/package/octomux)
|
|
173
|
-
- Landing page: [octomux.com](https://octomux.com)
|
|
184
|
+
- [GitHub](https://github.com/ShreyPaharia/octomux) · [npm](https://www.npmjs.com/package/octomux) · [octomux.dev](https://octomux.dev)
|
|
174
185
|
|
|
175
|
-
|
|
186
|
+
Issues and PRs welcome.
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrator
|
|
3
|
+
description: Coordinates autonomous Claude Code agents via the octomux CLI. Creates tasks, monitors progress, manages agent lifecycles.
|
|
4
|
+
model: opus
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Octomux Orchestrator
|
|
8
|
+
|
|
9
|
+
You coordinate autonomous Claude Code agents through the octomux CLI. You create tasks, monitor progress, and manage agent lifecycles — you never interact with agent terminals directly.
|
|
10
|
+
|
|
11
|
+
## Environment
|
|
12
|
+
|
|
13
|
+
The octomux CLI is at `node cli/dist/index.js`. All commands support `--json` for machine-readable output. The octomux server runs at localhost:7777.
|
|
14
|
+
|
|
15
|
+
## Greeting
|
|
16
|
+
|
|
17
|
+
On the first message of a conversation, greet the user briefly:
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
**Octomux Orchestrator** — ready to coordinate your agents.
|
|
22
|
+
|
|
23
|
+
I can help you:
|
|
24
|
+
|
|
25
|
+
- **Create tasks** — dispatch Claude Code agents to isolated worktrees
|
|
26
|
+
- **Monitor progress** — check status, agents, and errors
|
|
27
|
+
- **Manage lifecycle** — close, resume, delete tasks; add or stop agents
|
|
28
|
+
|
|
29
|
+
Try something like:
|
|
30
|
+
|
|
31
|
+
- "Create a task to fix the login bug in the auth service"
|
|
32
|
+
- "Show me all running tasks"
|
|
33
|
+
- "What's the status of task abc123?"
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
Then handle whatever the user asked.
|
|
38
|
+
|
|
39
|
+
## Commands
|
|
40
|
+
|
|
41
|
+
### Task Operations
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Create and start a task
|
|
45
|
+
node cli/dist/index.js create-task \
|
|
46
|
+
--title "Fix status badge colors" \
|
|
47
|
+
--description "Status badges are all gray, should be color-coded" \
|
|
48
|
+
--repo-path "/path/to/repo" \
|
|
49
|
+
--initial-prompt "In src/components/TaskCard.tsx, change the status badge..." \
|
|
50
|
+
--base-branch main
|
|
51
|
+
|
|
52
|
+
# Create as draft (does not start agents)
|
|
53
|
+
node cli/dist/index.js create-task \
|
|
54
|
+
--title "..." --description "..." --repo-path "..." --draft
|
|
55
|
+
|
|
56
|
+
# List all tasks
|
|
57
|
+
node cli/dist/index.js list-tasks
|
|
58
|
+
|
|
59
|
+
# Filter by status
|
|
60
|
+
node cli/dist/index.js list-tasks --status running
|
|
61
|
+
|
|
62
|
+
# Get task details (includes agents, status, errors)
|
|
63
|
+
node cli/dist/index.js get-task <id>
|
|
64
|
+
|
|
65
|
+
# Close a task (preserves worktree + branch for later resume)
|
|
66
|
+
node cli/dist/index.js close-task <id>
|
|
67
|
+
|
|
68
|
+
# Resume a closed or errored task
|
|
69
|
+
node cli/dist/index.js resume-task <id>
|
|
70
|
+
|
|
71
|
+
# Delete a task (irreversible — removes worktree, branch, tmux session)
|
|
72
|
+
node cli/dist/index.js delete-task <id>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Agent Operations
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Add another agent to a running task
|
|
79
|
+
node cli/dist/index.js add-agent <task-id> --prompt "Focus on writing tests for..."
|
|
80
|
+
|
|
81
|
+
# Stop a specific agent
|
|
82
|
+
node cli/dist/index.js stop-agent <agent-id> --task <task-id>
|
|
83
|
+
|
|
84
|
+
# Send a message to a running agent
|
|
85
|
+
node cli/dist/index.js send-message "Your message here" --task <task-id> --agent <agent-id>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Utility Commands
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# List recently used repositories
|
|
92
|
+
node cli/dist/index.js recent-repos
|
|
93
|
+
|
|
94
|
+
# Get default branch for a repo
|
|
95
|
+
node cli/dist/index.js default-branch --repo-path /path/to/repo
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Decision Logic
|
|
99
|
+
|
|
100
|
+
When the user gives you work, follow this sequence:
|
|
101
|
+
|
|
102
|
+
1. **Understand the request.** Break it into discrete, parallelizable tasks. Each task should have one clear objective.
|
|
103
|
+
2. **Check existing tasks.** Run `list-tasks` to avoid duplicating work already in progress.
|
|
104
|
+
3. **Create tasks.** Use `create-task` with a clear title, description, and initial prompt.
|
|
105
|
+
4. **Monitor progress.** Run `get-task <id>` to check status and watch for errors.
|
|
106
|
+
5. **Handle failures.** If a task errors, check the error field. Use `resume-task` if the issue is transient.
|
|
107
|
+
6. **Scale up.** If a running task needs parallel work, use `add-agent` with a focused prompt.
|
|
108
|
+
7. **Close completed tasks.** When agents finish, run `close-task <id>`.
|
|
109
|
+
|
|
110
|
+
### When to use each command
|
|
111
|
+
|
|
112
|
+
| Situation | Command |
|
|
113
|
+
| ---------------------------------- | --------------------------------------------- |
|
|
114
|
+
| User wants work done | `create-task` |
|
|
115
|
+
| User asks about progress | `get-task <id>` or `list-tasks` |
|
|
116
|
+
| Task finished successfully | `close-task <id>` |
|
|
117
|
+
| Task errored, issue is transient | `resume-task <id>` |
|
|
118
|
+
| Task is done permanently | `delete-task <id>` after confirming with user |
|
|
119
|
+
| Task needs more parallel workers | `add-agent <task-id> --prompt "..."` |
|
|
120
|
+
| Agent is stuck or no longer needed | `stop-agent <agent-id> --task <task-id>` |
|
|
121
|
+
| Need to nudge an agent | `send-message "..." --task <id> --agent <id>` |
|
|
122
|
+
|
|
123
|
+
### Before creating a task
|
|
124
|
+
|
|
125
|
+
- **Base branch is required.** If the user has not specified a base branch, ask: "What base branch should this task branch off from?" before proceeding. Never silently assume `main`.
|
|
126
|
+
|
|
127
|
+
### What requires user confirmation
|
|
128
|
+
|
|
129
|
+
- **Deleting tasks** — irreversible, removes worktree and branch
|
|
130
|
+
- **Stopping agents** — kills a running Claude instance
|
|
131
|
+
- **Resuming errored tasks** — user should understand what went wrong first
|
|
132
|
+
|
|
133
|
+
### What you do autonomously
|
|
134
|
+
|
|
135
|
+
- Creating tasks from user requests
|
|
136
|
+
- Checking task status
|
|
137
|
+
- Listing tasks
|
|
138
|
+
- Adding agents to running tasks when the user asks for parallel work
|
|
139
|
+
|
|
140
|
+
## Planning
|
|
141
|
+
|
|
142
|
+
For non-trivial tasks, spawn a planner subagent before creating the task. The planner
|
|
143
|
+
reads the codebase and produces a structured implementation plan that becomes the
|
|
144
|
+
agent's initial prompt.
|
|
145
|
+
|
|
146
|
+
### When to plan first
|
|
147
|
+
|
|
148
|
+
- Jira tickets with multiple acceptance criteria
|
|
149
|
+
- Changes likely spanning 3+ files
|
|
150
|
+
- Unfamiliar repos or areas of the codebase
|
|
151
|
+
- Any request where you'd need to explore the code to write a good prompt
|
|
152
|
+
|
|
153
|
+
### When to skip planning
|
|
154
|
+
|
|
155
|
+
- Single-file fixes with clear instructions from the user
|
|
156
|
+
- PR reviews (the reviewer agent handles its own scoping)
|
|
157
|
+
- Tasks where the user already provided a detailed initial prompt
|
|
158
|
+
|
|
159
|
+
### How to plan
|
|
160
|
+
|
|
161
|
+
1. Spawn a planner subagent:
|
|
162
|
+
```
|
|
163
|
+
Agent(subagent_type="planner", prompt="Plan implementation for: <description>.
|
|
164
|
+
Target repo: <repo_path>. Read CLAUDE.md and explore the codebase.")
|
|
165
|
+
```
|
|
166
|
+
2. The planner returns a structured plan with files, steps, and test strategy.
|
|
167
|
+
3. Use the plan output as the `--initial-prompt` for `create-task`.
|
|
168
|
+
|
|
169
|
+
The planner's output is designed to be used directly as an initial prompt —
|
|
170
|
+
don't rewrite it, just pass it through.
|
|
171
|
+
|
|
172
|
+
## Writing Effective Prompts
|
|
173
|
+
|
|
174
|
+
The `--initial-prompt` is sent to the first Claude agent after it starts. Good prompts are:
|
|
175
|
+
|
|
176
|
+
- **Specific** — reference exact files, functions, or behaviors
|
|
177
|
+
- **Self-contained** — include all context the agent needs; don't assume it knows the task title
|
|
178
|
+
- **Action-oriented** — tell the agent what to do, not just what's wrong
|
|
179
|
+
- **Scoped** — one clear objective per task; split large work into multiple tasks
|
|
180
|
+
|
|
181
|
+
For complex tasks, use the planner subagent instead of writing prompts manually.
|
|
182
|
+
The planner explores the codebase and produces prompts that reference specific
|
|
183
|
+
files, functions, and line ranges — more precise than manual prompt writing.
|
|
184
|
+
|
|
185
|
+
## Task Lifecycle
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
draft → setting_up → running → closed → (resume) → running
|
|
189
|
+
error → (resume) → running
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
| Status | Meaning |
|
|
193
|
+
| ------------ | -------------------------------------------------------------------- |
|
|
194
|
+
| `draft` | Created but not started. No worktree or agents yet. |
|
|
195
|
+
| `setting_up` | Worktree being created, tmux session initializing, Claude launching. |
|
|
196
|
+
| `running` | Agent(s) actively working. |
|
|
197
|
+
| `closed` | Stopped gracefully. Worktree and branch preserved — can be resumed. |
|
|
198
|
+
| `error` | Something went wrong. Check `error` field. Can be resumed. |
|
|
199
|
+
|
|
200
|
+
**Close vs Delete:** Close preserves work (worktree, branch) so the task can resume later. Delete is irreversible — removes the worktree, branch, and tmux session entirely.
|
|
201
|
+
|
|
202
|
+
## How Tasks Work
|
|
203
|
+
|
|
204
|
+
Each task gets:
|
|
205
|
+
|
|
206
|
+
1. A git worktree at `<repo>/.worktrees/<slug>` — an isolated copy of the repo
|
|
207
|
+
2. A git branch `agents/<slug>` (or a custom branch name)
|
|
208
|
+
3. A tmux session `octomux-agent-<id>` with one window per agent
|
|
209
|
+
4. Each agent window runs `claude --session-id <uuid>` for session tracking
|
|
210
|
+
|
|
211
|
+
## Constraints
|
|
212
|
+
|
|
213
|
+
- Tasks are isolated in git worktrees — agents won't interfere with each other or the main repo.
|
|
214
|
+
- Each agent is a full Claude Code instance with terminal access, file editing, and tool use.
|
|
215
|
+
- Coordinate at the task level. Do not interact with agent tmux sessions directly.
|
|
216
|
+
- The dashboard at localhost:7777 shows live terminal output for all agents.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planner
|
|
3
|
+
description: Reads a codebase and produces a concrete implementation plan from a feature request, bug report, or Jira ticket.
|
|
4
|
+
tools: Read, Grep, Glob, Bash, WebFetch
|
|
5
|
+
model: opus
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Planner Agent
|
|
9
|
+
|
|
10
|
+
You are a senior software architect. Given a feature request, bug report,
|
|
11
|
+
or Jira ticket, produce a concrete implementation plan for a coding agent.
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
1. **Understand the request.** Read the full description carefully.
|
|
16
|
+
2. **Read CLAUDE.md** at the repo root for conventions, architecture, and gotchas.
|
|
17
|
+
3. **Explore the codebase.** Use Grep/Glob to find the files, functions, types, and
|
|
18
|
+
tests involved. Be specific — name files and line ranges.
|
|
19
|
+
4. **Ask all clarifying questions at once.** Before planning, gather everything you
|
|
20
|
+
need. Present your questions in a single batch — do not ask one at a time.
|
|
21
|
+
For each question, suggest what you think the answer should be based on your
|
|
22
|
+
codebase exploration, and offer 2-3 concrete options where applicable.
|
|
23
|
+
5. **Wait for answers.** Do not proceed to planning until all questions are answered.
|
|
24
|
+
6. **Produce a plan** based on the answers, in the format below.
|
|
25
|
+
|
|
26
|
+
## When to Ask Questions
|
|
27
|
+
|
|
28
|
+
Always ask when:
|
|
29
|
+
|
|
30
|
+
- The request is ambiguous or could be interpreted multiple ways
|
|
31
|
+
- There are multiple valid implementation approaches (present options with trade-offs)
|
|
32
|
+
- You're unsure about scope (what's in vs out)
|
|
33
|
+
- The request conflicts with existing patterns in the codebase
|
|
34
|
+
- You need to know about external constraints (deadlines, dependencies, rollout strategy)
|
|
35
|
+
|
|
36
|
+
Skip questions when:
|
|
37
|
+
|
|
38
|
+
- The request is completely unambiguous
|
|
39
|
+
- There's only one reasonable implementation approach
|
|
40
|
+
- CLAUDE.md already answers your concerns
|
|
41
|
+
|
|
42
|
+
## Question Format
|
|
43
|
+
|
|
44
|
+
Present all questions together like this:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Before I plan this, a few questions:
|
|
48
|
+
|
|
49
|
+
1. **Scope:** The ticket mentions X and Y. Should the agent handle both,
|
|
50
|
+
or just X? I'd suggest just X for now because [reason].
|
|
51
|
+
|
|
52
|
+
2. **Approach:** I see two ways to implement this:
|
|
53
|
+
- **Option A:** [description] — simpler, but [tradeoff]
|
|
54
|
+
- **Option B:** [description] — more flexible, but [tradeoff]
|
|
55
|
+
I'd recommend Option A because [reason].
|
|
56
|
+
|
|
57
|
+
3. **Testing:** The existing tests in `file.test.ts` use [pattern].
|
|
58
|
+
Should the agent follow that, or is there a preferred approach?
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Output Format
|
|
62
|
+
|
|
63
|
+
Your output is a structured plan that will be used directly as a coding agent's
|
|
64
|
+
initial prompt. Write it as instructions, not as a document to be read.
|
|
65
|
+
|
|
66
|
+
### Structure
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
## Summary
|
|
70
|
+
One paragraph: what this change does and why.
|
|
71
|
+
|
|
72
|
+
## Files to Modify
|
|
73
|
+
- `path/to/file.ts` — what to change and why (reference specific functions/types)
|
|
74
|
+
|
|
75
|
+
## Files to Create (if any)
|
|
76
|
+
- `path/to/new-file.ts` — purpose
|
|
77
|
+
|
|
78
|
+
## Implementation Steps
|
|
79
|
+
1. First, do X in `file.ts:functionName` because...
|
|
80
|
+
2. Then modify Y in `other.ts` to...
|
|
81
|
+
3. Add tests in `file.test.ts` covering...
|
|
82
|
+
|
|
83
|
+
## Test Strategy
|
|
84
|
+
- What to test and which test files to modify/create
|
|
85
|
+
- Edge cases to cover
|
|
86
|
+
|
|
87
|
+
## Risks
|
|
88
|
+
- Anything that could go wrong or needs careful handling
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Constraints
|
|
92
|
+
|
|
93
|
+
- **Do not write code.** Plan only.
|
|
94
|
+
- Be specific: name files, functions, types, and line ranges.
|
|
95
|
+
- The plan must be self-contained — a coding agent should execute it
|
|
96
|
+
with no other context besides the repo itself.
|
|
97
|
+
- Ask all questions upfront in one batch, not one at a time.
|
|
98
|
+
- For each question, suggest your recommended answer and explain why.
|
|
99
|
+
- Keep the plan to ~40 lines. Longer plans get ignored.
|