@irythill/orq 0.1.0 → 0.2.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.
- package/LICENSE +21 -21
- package/README.md +241 -240
- package/README.pt-BR.md +242 -241
- package/dist/cli.js +24 -22
- package/dist/commands/block.js +2 -2
- package/dist/commands/board.js +1 -1
- package/dist/commands/claim.js +1 -1
- package/dist/commands/completion.js +43 -43
- package/dist/commands/config.js +2 -2
- package/dist/commands/gc.js +164 -0
- package/dist/commands/instructions.js +7 -7
- package/dist/commands/lock.js +1 -1
- package/dist/commands/pick.js +23 -3
- package/dist/commands/quota.js +32 -2
- package/dist/commands/setup.js +3 -3
- package/dist/config.js +1 -1
- package/dist/pick.js +11 -0
- package/dist/quota.js +67 -9
- package/package.json +48 -27
- package/skills/issue/SKILL.md +229 -197
- package/skills/orq-setup/SKILL.md +114 -114
- package/skills/orq-status/SKILL.md +37 -37
- package/templates/workspace.CLAUDE.md +49 -49
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 irythill
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 irythill
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,240 +1,241 @@
|
|
|
1
|
-
**English** · [Português](README.pt-BR.md)
|
|
2
|
-
|
|
3
|
-
<p align="center"><img src="docs/img/orq-logo.svg" alt="orq — an orc in a tailcoat raising a conductor's baton" width="304"></p>
|
|
4
|
-
|
|
5
|
-
# orq — orchestrating coding agents with herdr
|
|
6
|
-
|
|
7
|
-
You describe the work in a Plane issue. A **conductor** (Claude, ideally Opus) reads it, picks the right agent for
|
|
8
|
-
each step, dispatches the **implementer**, the **tests** and a **cross-vendor review** in [herdr](https://herdr.dev)
|
|
9
|
-
tabs, and hands the issue back *In Review* with a summary in Plane. Merge, PR and deploy stay with you.
|
|
10
|
-
|
|
11
|
-
What orq does **not** decide for you: which agents you have, how much each may spend and how you like to work. All of
|
|
12
|
-
that lives in your config.
|
|
13
|
-
|
|
14
|
-
> Born from daily use at a health-tech company: 3–5 issues in parallel on a 14 GB
|
|
15
|
-
> OpenCode, Antigravity and Copilot. The story, numbers and lessons: **[docs/case-study.md](docs/case-study.md)**.
|
|
16
|
-
>
|
|
17
|
-
> 🚧 = not available yet.
|
|
18
|
-
|
|
19
|
-
## How it works
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
You ── "/issue DEMO-123" ──► conductor (Claude in herdr)
|
|
23
|
-
│ orq-pick impl ──► which agent/model implements (config + history + quota)
|
|
24
|
-
├─► implementer herdr-agent own tab · worktree from origin/<base> · memory cap
|
|
25
|
-
├─► tests herdr-verify only the diff's tests · queue of one suite at a time
|
|
26
|
-
│ orq-pick review ─► a reviewer from ANOTHER vendor
|
|
27
|
-
├─► reviewer herdr-agent -r read only · diff + criteria + test results attached
|
|
28
|
-
└─► Plane comment, state, labels
|
|
29
|
-
◄── "[HERDR-AGENT DONE] ..." in the conductor's pane (the only completion signal)
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
- **Every step in a herdr tab.** You watch it live and the tab closes when it's done. Results stay in
|
|
33
|
-
`.orquestra/<ID>/` (`.out.md`, `.log`, `.done`).
|
|
34
|
-
- **Fixed order every round:** implementer ok → tests with no new failure → review. A blocking problem becomes a fix
|
|
35
|
-
round in the implementer's own session (configurable maximum).
|
|
36
|
-
- **Nobody picks an agent by gut feeling.** `orq-pick` decides from data: what each agent delivered in the history,
|
|
37
|
-
how many tokens it spent, how long it took, the current quota, and a rotation so no agent gets all the work.
|
|
38
|
-
- **The machine stays up.** Each agent runs under its own memory cap; tests wait in a queue.
|
|
39
|
-
|
|
40
|
-
## Supported agents
|
|
41
|
-
|
|
42
|
-
| Agent | CLI | Possible roles | Notes |
|
|
43
|
-
|---|---|---|---|
|
|
44
|
-
| Claude Code | `claude` | conductor, implement, review | several accounts (`claude-accounts`); Opus as conductor |
|
|
45
|
-
| Codex | `codex` | implement, review | sandbox without network: the conductor runs `git fetch` |
|
|
46
|
-
| OpenCode | `opencode` | implement, review | any provider (e.g. MiniMax) |
|
|
47
|
-
| Antigravity | `agy` | review | headless denies commands outside its allowlist: it reviews by reading the attached diff |
|
|
48
|
-
| GitHub Copilot | `copilot` | second opinion | small allowances on some plans: occasional use |
|
|
49
|
-
|
|
50
|
-
You declare only the ones you have, and the roles each may take.
|
|
51
|
-
|
|
52
|
-
## Install
|
|
53
|
-
|
|
54
|
-
Linux, macOS or Windows (native, not only WSL), in any shell — bash, zsh, fish, PowerShell, cmd.
|
|
55
|
-
**Requirements:** Node 20+ with `npm`, `git`, and at least one agent from the table above, logged in. Optional:
|
|
56
|
-
[herdr](https://herdr.dev) or tmux, so each child gets its own tab or window (otherwise children run in the
|
|
57
|
-
background and `orq board` shows them).
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npm i -g @irythill/orq
|
|
61
|
-
orq setup
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
`orq setup` shows what it found (git, terminal, how memory is capped, keyring, your shell), links orq's skills into
|
|
65
|
-
`~/.claude/skills/` and each account folder in `claude-accounts` (a junction on Windows; never over a folder of
|
|
66
|
-
yours), asks about your agents and plans, writes `~/.config/orq/config.toml` (`%APPDATA%\orq\config.toml` on Windows)
|
|
67
|
-
and prepares the folder that groups your repos for the conductor: `.orquestra/`, the map `CLAUDE.md` and the
|
|
68
|
-
`/issue` playbook in the conductor's format. Pieces on their own: `orq setup --install` (no questions),
|
|
69
|
-
`orq setup --workspace <folder> --conductor <agent>`. Inside Claude, **`/orq-setup`** does the same as a
|
|
70
|
-
conversation and also fills in the repo table. Plane: [docs/plane.md](docs/plane.md).
|
|
71
|
-
|
|
72
|
-
**Memory cap:** a systemd scope on Linux with a user session, else a watchdog (macOS, Windows, WSL without systemd).
|
|
73
|
-
**Keyring** (Antigravity quota, Claude quota on macOS): Secret Service, Keychain or Credential Manager through
|
|
74
|
-
`@napi-rs/keyring`; without the native module, `secret-tool`/`security`.
|
|
75
|
-
|
|
76
|
-
### Shell completion
|
|
77
|
-
|
|
78
|
-
| Shell | Turn it on |
|
|
79
|
-
|---|---|
|
|
80
|
-
| bash | `echo 'eval "$(orq completion bash)"' >> ~/.bashrc` |
|
|
81
|
-
| zsh | `echo 'eval "$(orq completion zsh)"' >> ~/.zshrc` (after `compinit`) |
|
|
82
|
-
| fish | `orq completion fish > ~/.config/fish/completions/orq.fish` |
|
|
83
|
-
| PowerShell | `Add-Content $PROFILE 'orq completion powershell \| Out-String \| Invoke-Expression'` |
|
|
84
|
-
| cmd | no programmable completion |
|
|
85
|
-
|
|
86
|
-
### Linux extras from a clone: `install.sh` (optional)
|
|
87
|
-
|
|
88
|
-
For herdr as an always-on service, its plugin and the old script names (`herdr-*`, `orq-*`, `agent-quota`):
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
# herdr (tested on 0.9.3)
|
|
92
|
-
curl -fsSL https://herdr.dev/install.sh -o /tmp/herdr-install.sh && less /tmp/herdr-install.sh && sh /tmp/herdr-install.sh
|
|
93
|
-
git clone https://github.com/irythill/orq ~/Code/orq && cd ~/Code/orq
|
|
94
|
-
./install.sh # links in ~/.local/bin, herdr service, skills for Claude
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Needs `git`, `jq`, Node 20+ with `npm`, `python3` (3.11+ for TOML config; older → JSON config or
|
|
98
|
-
`pip install --user tomli`) and user `systemd` (WSL2: Ubuntu 22.04+ with systemd enabled). `install.sh` checks the
|
|
99
|
-
requirements (table of what's found and missing), builds the `orq` CLI (`src/` → `dist/`), then **symlinks** (never
|
|
100
|
-
copies) the scripts into `~/.local/bin`, `setup/herdr.service` into `~/.config/systemd/user/` (and enables it), and
|
|
101
|
-
every skill into `~/.claude/skills/` plus each account folder listed in `~/.config/claude-accounts`. Idempotent:
|
|
102
|
-
re-run it after a `git pull` or a new account. It never overwrites a real file (warns and skips) and never writes
|
|
103
|
-
your config.
|
|
104
|
-
|
|
105
|
-
| Flag | What it does |
|
|
106
|
-
|---|---|
|
|
107
|
-
| `--dry-run` | print what it would do, change nothing |
|
|
108
|
-
| `--uninstall` | remove only the links it creates, and only those pointing into this repo (config and history stay) |
|
|
109
|
-
|
|
110
|
-
## Configuration
|
|
111
|
-
|
|
112
|
-
Two layers, to keep **your way of working** apart from **the team's project**:
|
|
113
|
-
|
|
114
|
-
| File | Whose | What it holds |
|
|
115
|
-
|---|---|---|
|
|
116
|
-
| `~/.config/orq/config.toml` | yours, stays on your machine | agents, accounts, models per role and level, pick weights, memory limits |
|
|
117
|
-
| `<workspace>/.orq/workspace.toml` 🚧 | the team's, versioned | Plane (projects, issue standard), repos, base branch, verification, tests, dependencies |
|
|
118
|
-
|
|
119
|
-
The more specific one wins, key by key. JSON works too (`config.json`). To see the merged result: `orq-config`
|
|
120
|
-
(everything), `orq-config get policy.weights`, `orq-config files`.
|
|
121
|
-
|
|
122
|
-
### Example: personal config
|
|
123
|
-
Complete, commented example: [`examples/irythill/config.toml`](examples/irythill/config.toml). The essentials:
|
|
124
|
-
|
|
125
|
-
```toml
|
|
126
|
-
[agents.codex]
|
|
127
|
-
vendor = "openai"
|
|
128
|
-
roles = ["impl", "fix", "review"]
|
|
129
|
-
quota = ["codex"] # name in agent-quota's output
|
|
130
|
-
[agents.codex.models.impl]
|
|
131
|
-
simple = "gpt-6-sol@low" # model@effort
|
|
132
|
-
heavy = "gpt-6.1-sol@medium"
|
|
133
|
-
|
|
134
|
-
[agents.opencode]
|
|
135
|
-
vendor = "minimax"
|
|
136
|
-
roles = ["review"] # here it only reviews; for someone else it may implement
|
|
137
|
-
[agents.opencode.models.review]
|
|
138
|
-
default = "minimax/MiniMax-M3"
|
|
139
|
-
|
|
140
|
-
[policy]
|
|
141
|
-
quota_limit = 90 # ≥ 90% used → agent out
|
|
142
|
-
[policy.weights]
|
|
143
|
-
quality = 0.40 # did it deliver? (impl: approved on the first review)
|
|
144
|
-
tokens = 0.45 # did it spend little?
|
|
145
|
-
speed = 0.15
|
|
146
|
-
rotation = 0.20 # penalty for having been picked recently
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### How `orq-pick` chooses
|
|
150
|
-
1. **Filters:** only agents with that role, under the quota limit, not blocked (`orq-block`) and, for reviews, from a
|
|
151
|
-
vendor other than the implementer's. With several accounts, it takes the least used one.
|
|
152
|
-
2. **Scores:** `quality × delivery + tokens × economy + speed × quickness − rotation × recent picks`. The numbers come
|
|
153
|
-
from the history (`orq-stats`); an agent with few runs uses the config's `prior` and gets an exploration bonus.
|
|
154
|
-
3. **`reserve = true` agents** (e.g. Claude, which shares quota with the conductor) only come in when nothing else fits.
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
orq-pick review --impl-agent codex --explain # every candidate's score and who was left out, and why
|
|
158
|
-
orq-stats --days 30 # scoreboard: delivery, approval, time and tokens per agent and model
|
|
159
|
-
orq-block antigravity --days 3 # out of the picks (e.g. weekly quota gone, no collector for it)
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Language and theme
|
|
163
|
-
orq speaks English and Portuguese: CLI messages, `herdr-board`, notices and `install.sh`. It follows
|
|
164
|
-
`[ui] lang` in your config (`"auto"` = system locale, `"en"`, `"pt"`), or the `ORQ_LANG` environment variable.
|
|
165
|
-
Switch it any time:
|
|
166
|
-
- `orq-lang pt` / `orq-lang en` / `orq-lang toggle` (`orq-lang` alone shows the current one);
|
|
167
|
-
- `l` inside `orq board`;
|
|
168
|
-
- a herdr key: `install.sh` links the `orq` herdr plugin; bind its `orq.lang-toggle` action (snippet in
|
|
169
|
-
`herdr-plugin/herdr-plugin.toml`) — e.g. `prefix+shift+l` — and `orq.board` to open the board as an overlay.
|
|
170
|
-
|
|
171
|
-
`orq board` has its own look, from the [SYNTH.DECK](https://github.com/irythill/synth-deck-portfolio)
|
|
172
|
-
portfolio: `[ui] theme = "gunmetal"` (default, dark graphite), `"chrome"` (light silver), `"lcd"` (phosphor green) or
|
|
173
|
-
`"terminal"` (your terminal's colors). `t` inside the board cycles through them (`ORQ_THEME` overrides).
|
|
174
|
-
|
|
175
|
-
Whatever is already running keeps its language. Conductors always talk to you in your own language. Docs:
|
|
176
|
-
[Português](README.pt-BR.md).
|
|
177
|
-
|
|
178
|
-
## Daily use
|
|
179
|
-
|
|
180
|
-
```bash
|
|
181
|
-
herdr # opens the window (the server runs as a service)
|
|
182
|
-
cd ~/Code/<workspace> && herdr-conductor # inside a herdr pane: opens the conductor (account and model optional)
|
|
183
|
-
```
|
|
184
|
-
In the conductor: **`/issue DEMO-123`**. It answers in one line and moves on by itself at every `[HERDR-AGENT DONE]`.
|
|
185
|
-
You only come back when it asks for a decision or says it's done.
|
|
186
|
-
|
|
187
|
-
To see everything at once, keep **`orq board`** open in a tab or window (any terminal, any OS; `herdr-board` calls it):
|
|
188
|
-
test queue, running agents (model, memory against the cap, last action), conductors and their issues, memory, quota,
|
|
189
|
-
blocks and the 7-day scoreboard. `--once` prints it once, `--json` for scripts. With
|
|
190
|
-
`ui.toast.delivery = "system"` in herdr's config, each finished step also pops up a native OS notification.
|
|
191
|
-
|
|
192
|
-
Several issues at once: one conductor per issue (ideally on different accounts). `herdr-claim` keeps two conductors
|
|
193
|
-
off the same issue. Details, shortcuts and scenarios: [docs/herdr.md](docs/herdr.md).
|
|
194
|
-
|
|
195
|
-
## Skills
|
|
196
|
-
|
|
197
|
-
| Skill | What for | Status |
|
|
198
|
-
|---|---|---|
|
|
199
|
-
| `/issue <ID>` | Full flow: issue → implementation → tests → review → Plane | ready |
|
|
200
|
-
| `/orq-setup` | Guided setup: agents, accounts, repos, verification | ready |
|
|
201
|
-
| `/review <PR or branch>` | Cross review of something finished (e.g. a teammate's PR), no implementation | 🚧 |
|
|
202
|
-
| `/investigate <question>` | A read-only agent investigates a bug or piece of code and reports | 🚧 |
|
|
203
|
-
| `/orq-status` | Summary in chat: queue, running agents, scoreboard and quota | ready |
|
|
204
|
-
|
|
205
|
-
## Commands
|
|
206
|
-
|
|
207
|
-
| Command | What it does |
|
|
208
|
-
|---|---|
|
|
209
|
-
| `orq agent -a <agent> ...` (`herdr-agent`) | Runs an agent with a memory cap in a herdr tab, a tmux window or the background; `-r` read only, `-R <id>` continue the session, `-i` attach a file, `-b <base>` attach the diff, `-T` the agent's own screen (herdr only) |
|
|
210
|
-
| `orq instructions claude\|agents` | Writes the `/issue` playbook as `SKILL.md` (Claude Code) or into `AGENTS.md` (Codex, OpenCode…) |
|
|
211
|
-
| `orq wait <prefix>...` | Blocks until those agents finish; prints `status=` and the answer file (any conductor, any terminal) |
|
|
212
|
-
| `orq verify ...` (`herdr-verify`) | Tests related to the diff, queued and memory-capped; failures that also fail on the base count as pre-existing |
|
|
213
|
-
| `orq board` (`herdr-board`) | Live board: queue, agents, conductors, quota, blocks, scoreboard |
|
|
214
|
-
| `herdr-conductor` | Opens the conductor in the current pane |
|
|
215
|
-
| `herdr-claim` | Owner of each issue among conductors |
|
|
216
|
-
| `herdr-deps` | Links the worktree's dependencies to the main repo's (no reinstall) |
|
|
217
|
-
| `orq baseline ...` (`herdr-baseline`) | Manual snapshot of the tests failing on the base (outside the flow) |
|
|
218
|
-
| `orq
|
|
219
|
-
| `orq
|
|
220
|
-
| `orq
|
|
221
|
-
| `
|
|
222
|
-
| `
|
|
223
|
-
| `orq-
|
|
224
|
-
| `orq-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
- [docs/
|
|
230
|
-
- [docs/
|
|
231
|
-
- [docs/
|
|
232
|
-
- [docs/
|
|
233
|
-
- [docs/
|
|
234
|
-
- [docs/
|
|
235
|
-
- [
|
|
236
|
-
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
1
|
+
**English** · [Português](README.pt-BR.md)
|
|
2
|
+
|
|
3
|
+
<p align="center"><img src="docs/img/orq-logo.svg" alt="orq — an orc in a tailcoat raising a conductor's baton" width="304"></p>
|
|
4
|
+
|
|
5
|
+
# orq — orchestrating coding agents with herdr
|
|
6
|
+
|
|
7
|
+
You describe the work in a Plane issue. A **conductor** (Claude, ideally Opus) reads it, picks the right agent for
|
|
8
|
+
each step, dispatches the **implementer**, the **tests** and a **cross-vendor review** in [herdr](https://herdr.dev)
|
|
9
|
+
tabs, and hands the issue back *In Review* with a summary in Plane. Merge, PR and deploy stay with you.
|
|
10
|
+
|
|
11
|
+
What orq does **not** decide for you: which agents you have, how much each may spend and how you like to work. All of
|
|
12
|
+
that lives in your config.
|
|
13
|
+
|
|
14
|
+
> Born from daily use at a health-tech company: 3–5 issues in parallel on a 14 GB PC, across Claude Code, Codex,
|
|
15
|
+
> OpenCode, Antigravity and Copilot. The story, numbers and lessons: **[docs/case-study.md](docs/case-study.md)**.
|
|
16
|
+
>
|
|
17
|
+
> 🚧 = not available yet.
|
|
18
|
+
|
|
19
|
+
## How it works
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
You ── "/issue DEMO-123" ──► conductor (Claude in herdr)
|
|
23
|
+
│ orq-pick impl ──► which agent/model implements (config + history + quota)
|
|
24
|
+
├─► implementer herdr-agent own tab · worktree from origin/<base> · memory cap
|
|
25
|
+
├─► tests herdr-verify only the diff's tests · queue of one suite at a time
|
|
26
|
+
│ orq-pick review ─► a reviewer from ANOTHER vendor
|
|
27
|
+
├─► reviewer herdr-agent -r read only · diff + criteria + test results attached
|
|
28
|
+
└─► Plane comment, state, labels
|
|
29
|
+
◄── "[HERDR-AGENT DONE] ..." in the conductor's pane (the only completion signal)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- **Every step in a herdr tab.** You watch it live and the tab closes when it's done. Results stay in
|
|
33
|
+
`.orquestra/<ID>/` (`.out.md`, `.log`, `.done`).
|
|
34
|
+
- **Fixed order every round:** implementer ok → tests with no new failure → review. A blocking problem becomes a fix
|
|
35
|
+
round in the implementer's own session (configurable maximum).
|
|
36
|
+
- **Nobody picks an agent by gut feeling.** `orq-pick` decides from data: what each agent delivered in the history,
|
|
37
|
+
how many tokens it spent, how long it took, the current quota, and a rotation so no agent gets all the work.
|
|
38
|
+
- **The machine stays up.** Each agent runs under its own memory cap; tests wait in a queue.
|
|
39
|
+
|
|
40
|
+
## Supported agents
|
|
41
|
+
|
|
42
|
+
| Agent | CLI | Possible roles | Notes |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| Claude Code | `claude` | conductor, implement, review | several accounts (`claude-accounts`); Opus as conductor |
|
|
45
|
+
| Codex | `codex` | implement, review | sandbox without network: the conductor runs `git fetch` |
|
|
46
|
+
| OpenCode | `opencode` | implement, review | any provider (e.g. MiniMax) |
|
|
47
|
+
| Antigravity | `agy` | review | headless denies commands outside its allowlist: it reviews by reading the attached diff |
|
|
48
|
+
| GitHub Copilot | `copilot` | second opinion | small allowances on some plans: occasional use |
|
|
49
|
+
|
|
50
|
+
You declare only the ones you have, and the roles each may take.
|
|
51
|
+
|
|
52
|
+
## Install
|
|
53
|
+
|
|
54
|
+
Linux, macOS or Windows (native, not only WSL), in any shell — bash, zsh, fish, PowerShell, cmd.
|
|
55
|
+
**Requirements:** Node 20+ with `npm`, `git`, and at least one agent from the table above, logged in. Optional:
|
|
56
|
+
[herdr](https://herdr.dev) or tmux, so each child gets its own tab or window (otherwise children run in the
|
|
57
|
+
background and `orq board` shows them).
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm i -g @irythill/orq
|
|
61
|
+
orq setup
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`orq setup` shows what it found (git, terminal, how memory is capped, keyring, your shell), links orq's skills into
|
|
65
|
+
`~/.claude/skills/` and each account folder in `claude-accounts` (a junction on Windows; never over a folder of
|
|
66
|
+
yours), asks about your agents and plans, writes `~/.config/orq/config.toml` (`%APPDATA%\orq\config.toml` on Windows)
|
|
67
|
+
and prepares the folder that groups your repos for the conductor: `.orquestra/`, the map `CLAUDE.md` and the
|
|
68
|
+
`/issue` playbook in the conductor's format. Pieces on their own: `orq setup --install` (no questions),
|
|
69
|
+
`orq setup --workspace <folder> --conductor <agent>`. Inside Claude, **`/orq-setup`** does the same as a
|
|
70
|
+
conversation and also fills in the repo table. Plane: [docs/plane.md](docs/plane.md).
|
|
71
|
+
|
|
72
|
+
**Memory cap:** a systemd scope on Linux with a user session, else a watchdog (macOS, Windows, WSL without systemd).
|
|
73
|
+
**Keyring** (Antigravity quota, Claude quota on macOS): Secret Service, Keychain or Credential Manager through
|
|
74
|
+
`@napi-rs/keyring`; without the native module, `secret-tool`/`security`.
|
|
75
|
+
|
|
76
|
+
### Shell completion
|
|
77
|
+
|
|
78
|
+
| Shell | Turn it on |
|
|
79
|
+
|---|---|
|
|
80
|
+
| bash | `echo 'eval "$(orq completion bash)"' >> ~/.bashrc` |
|
|
81
|
+
| zsh | `echo 'eval "$(orq completion zsh)"' >> ~/.zshrc` (after `compinit`) |
|
|
82
|
+
| fish | `orq completion fish > ~/.config/fish/completions/orq.fish` |
|
|
83
|
+
| PowerShell | `Add-Content $PROFILE 'orq completion powershell \| Out-String \| Invoke-Expression'` |
|
|
84
|
+
| cmd | no programmable completion |
|
|
85
|
+
|
|
86
|
+
### Linux extras from a clone: `install.sh` (optional)
|
|
87
|
+
|
|
88
|
+
For herdr as an always-on service, its plugin and the old script names (`herdr-*`, `orq-*`, `agent-quota`):
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# herdr (tested on 0.9.3)
|
|
92
|
+
curl -fsSL https://herdr.dev/install.sh -o /tmp/herdr-install.sh && less /tmp/herdr-install.sh && sh /tmp/herdr-install.sh
|
|
93
|
+
git clone https://github.com/irythill/orq ~/Code/orq && cd ~/Code/orq
|
|
94
|
+
./install.sh # links in ~/.local/bin, herdr service, skills for Claude
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Needs `git`, `jq`, Node 20+ with `npm`, `python3` (3.11+ for TOML config; older → JSON config or
|
|
98
|
+
`pip install --user tomli`) and user `systemd` (WSL2: Ubuntu 22.04+ with systemd enabled). `install.sh` checks the
|
|
99
|
+
requirements (table of what's found and missing), builds the `orq` CLI (`src/` → `dist/`), then **symlinks** (never
|
|
100
|
+
copies) the scripts into `~/.local/bin`, `setup/herdr.service` into `~/.config/systemd/user/` (and enables it), and
|
|
101
|
+
every skill into `~/.claude/skills/` plus each account folder listed in `~/.config/claude-accounts`. Idempotent:
|
|
102
|
+
re-run it after a `git pull` or a new account. It never overwrites a real file (warns and skips) and never writes
|
|
103
|
+
your config.
|
|
104
|
+
|
|
105
|
+
| Flag | What it does |
|
|
106
|
+
|---|---|
|
|
107
|
+
| `--dry-run` | print what it would do, change nothing |
|
|
108
|
+
| `--uninstall` | remove only the links it creates, and only those pointing into this repo (config and history stay) |
|
|
109
|
+
|
|
110
|
+
## Configuration
|
|
111
|
+
|
|
112
|
+
Two layers, to keep **your way of working** apart from **the team's project**:
|
|
113
|
+
|
|
114
|
+
| File | Whose | What it holds |
|
|
115
|
+
|---|---|---|
|
|
116
|
+
| `~/.config/orq/config.toml` | yours, stays on your machine | agents, accounts, models per role and level, pick weights, memory limits |
|
|
117
|
+
| `<workspace>/.orq/workspace.toml` 🚧 | the team's, versioned | Plane (projects, issue standard), repos, base branch, verification, tests, dependencies |
|
|
118
|
+
|
|
119
|
+
The more specific one wins, key by key. JSON works too (`config.json`). To see the merged result: `orq-config`
|
|
120
|
+
(everything), `orq-config get policy.weights`, `orq-config files`.
|
|
121
|
+
|
|
122
|
+
### Example: personal config
|
|
123
|
+
Complete, commented example: [`examples/irythill/config.toml`](examples/irythill/config.toml). The essentials:
|
|
124
|
+
|
|
125
|
+
```toml
|
|
126
|
+
[agents.codex]
|
|
127
|
+
vendor = "openai"
|
|
128
|
+
roles = ["impl", "fix", "review"]
|
|
129
|
+
quota = ["codex"] # name in agent-quota's output
|
|
130
|
+
[agents.codex.models.impl]
|
|
131
|
+
simple = "gpt-6-sol@low" # model@effort
|
|
132
|
+
heavy = "gpt-6.1-sol@medium"
|
|
133
|
+
|
|
134
|
+
[agents.opencode]
|
|
135
|
+
vendor = "minimax"
|
|
136
|
+
roles = ["review"] # here it only reviews; for someone else it may implement
|
|
137
|
+
[agents.opencode.models.review]
|
|
138
|
+
default = "minimax/MiniMax-M3"
|
|
139
|
+
|
|
140
|
+
[policy]
|
|
141
|
+
quota_limit = 90 # ≥ 90% used → agent out
|
|
142
|
+
[policy.weights]
|
|
143
|
+
quality = 0.40 # did it deliver? (impl: approved on the first review)
|
|
144
|
+
tokens = 0.45 # did it spend little?
|
|
145
|
+
speed = 0.15
|
|
146
|
+
rotation = 0.20 # penalty for having been picked recently
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### How `orq-pick` chooses
|
|
150
|
+
1. **Filters:** only agents with that role, under the quota limit, not blocked (`orq-block`) and, for reviews, from a
|
|
151
|
+
vendor other than the implementer's. With several accounts, it takes the least used one.
|
|
152
|
+
2. **Scores:** `quality × delivery + tokens × economy + speed × quickness − rotation × recent picks`. The numbers come
|
|
153
|
+
from the history (`orq-stats`); an agent with few runs uses the config's `prior` and gets an exploration bonus.
|
|
154
|
+
3. **`reserve = true` agents** (e.g. Claude, which shares quota with the conductor) only come in when nothing else fits.
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
orq-pick review --impl-agent codex --explain # every candidate's score and who was left out, and why
|
|
158
|
+
orq-stats --days 30 # scoreboard: delivery, approval, time and tokens per agent and model
|
|
159
|
+
orq-block antigravity --days 3 # out of the picks (e.g. weekly quota gone, no collector for it)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Language and theme
|
|
163
|
+
orq speaks English and Portuguese: CLI messages, `herdr-board`, notices and `install.sh`. It follows
|
|
164
|
+
`[ui] lang` in your config (`"auto"` = system locale, `"en"`, `"pt"`), or the `ORQ_LANG` environment variable.
|
|
165
|
+
Switch it any time:
|
|
166
|
+
- `orq-lang pt` / `orq-lang en` / `orq-lang toggle` (`orq-lang` alone shows the current one);
|
|
167
|
+
- `l` inside `orq board`;
|
|
168
|
+
- a herdr key: `install.sh` links the `orq` herdr plugin; bind its `orq.lang-toggle` action (snippet in
|
|
169
|
+
`herdr-plugin/herdr-plugin.toml`) — e.g. `prefix+shift+l` — and `orq.board` to open the board as an overlay.
|
|
170
|
+
|
|
171
|
+
`orq board` has its own look, from the [SYNTH.DECK](https://github.com/irythill/synth-deck-portfolio)
|
|
172
|
+
portfolio: `[ui] theme = "gunmetal"` (default, dark graphite), `"chrome"` (light silver), `"lcd"` (phosphor green) or
|
|
173
|
+
`"terminal"` (your terminal's colors). `t` inside the board cycles through them (`ORQ_THEME` overrides).
|
|
174
|
+
|
|
175
|
+
Whatever is already running keeps its language. Conductors always talk to you in your own language. Docs:
|
|
176
|
+
[Português](README.pt-BR.md).
|
|
177
|
+
|
|
178
|
+
## Daily use
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
herdr # opens the window (the server runs as a service)
|
|
182
|
+
cd ~/Code/<workspace> && herdr-conductor # inside a herdr pane: opens the conductor (account and model optional)
|
|
183
|
+
```
|
|
184
|
+
In the conductor: **`/issue DEMO-123`**. It answers in one line and moves on by itself at every `[HERDR-AGENT DONE]`.
|
|
185
|
+
You only come back when it asks for a decision or says it's done.
|
|
186
|
+
|
|
187
|
+
To see everything at once, keep **`orq board`** open in a tab or window (any terminal, any OS; `herdr-board` calls it):
|
|
188
|
+
test queue, running agents (model, memory against the cap, last action), conductors and their issues, memory, quota,
|
|
189
|
+
blocks and the 7-day scoreboard. `--once` prints it once, `--json` for scripts. With
|
|
190
|
+
`ui.toast.delivery = "system"` in herdr's config, each finished step also pops up a native OS notification.
|
|
191
|
+
|
|
192
|
+
Several issues at once: one conductor per issue (ideally on different accounts). `herdr-claim` keeps two conductors
|
|
193
|
+
off the same issue. Details, shortcuts and scenarios: [docs/herdr.md](docs/herdr.md).
|
|
194
|
+
|
|
195
|
+
## Skills
|
|
196
|
+
|
|
197
|
+
| Skill | What for | Status |
|
|
198
|
+
|---|---|---|
|
|
199
|
+
| `/issue <ID>` | Full flow: issue → implementation → tests → review → Plane | ready |
|
|
200
|
+
| `/orq-setup` | Guided setup: agents, accounts, repos, verification | ready |
|
|
201
|
+
| `/review <PR or branch>` | Cross review of something finished (e.g. a teammate's PR), no implementation | 🚧 |
|
|
202
|
+
| `/investigate <question>` | A read-only agent investigates a bug or piece of code and reports | 🚧 |
|
|
203
|
+
| `/orq-status` | Summary in chat: queue, running agents, scoreboard and quota | ready |
|
|
204
|
+
|
|
205
|
+
## Commands
|
|
206
|
+
|
|
207
|
+
| Command | What it does |
|
|
208
|
+
|---|---|
|
|
209
|
+
| `orq agent -a <agent> ...` (`herdr-agent`) | Runs an agent with a memory cap in a herdr tab, a tmux window or the background; `-r` read only, `-R <id>` continue the session, `-i` attach a file, `-b <base>` attach the diff, `-T` the agent's own screen (herdr only) |
|
|
210
|
+
| `orq instructions claude\|agents` | Writes the `/issue` playbook as `SKILL.md` (Claude Code) or into `AGENTS.md` (Codex, OpenCode…) |
|
|
211
|
+
| `orq wait <prefix>...` | Blocks until those agents finish; prints `status=` and the answer file (any conductor, any terminal) |
|
|
212
|
+
| `orq verify ...` (`herdr-verify`) | Tests related to the diff, queued and memory-capped; failures that also fail on the base count as pre-existing |
|
|
213
|
+
| `orq board` (`herdr-board`) | Live board: queue, agents, conductors, quota, blocks, scoreboard |
|
|
214
|
+
| `herdr-conductor` | Opens the conductor in the current pane |
|
|
215
|
+
| `herdr-claim` | Owner of each issue among conductors |
|
|
216
|
+
| `herdr-deps` | Links the worktree's dependencies to the main repo's (no reinstall) |
|
|
217
|
+
| `orq baseline ...` (`herdr-baseline`) | Manual snapshot of the tests failing on the base (outside the flow) |
|
|
218
|
+
| `orq gc [-w <workspace>] [--yes]` | Lists issue worktrees that are safe to remove; `--yes` removes them |
|
|
219
|
+
| `orq setup` | First configuration and install: environment, skills for Claude, config, conductor workspace |
|
|
220
|
+
| `orq completion bash\|zsh\|fish\|powershell` | Prints the shell completion script (see Install) |
|
|
221
|
+
| `orq <config\|set\|lang\|block\|quota>` | The cross-platform CLI (TypeScript); the `orq-*` and `agent-quota` names below call it |
|
|
222
|
+
| `agent-quota` | Current quota of each agent and account; on a failed reading, the last good one until its window resets |
|
|
223
|
+
| `orq-config` · `orq-pick` · `orq-stats` · `orq-block` | Configuration, agent pick, scoreboard, manual blocks |
|
|
224
|
+
| `orq-lang` | Shows or switches the language of orq's messages (en/pt) |
|
|
225
|
+
| `orq-set <section> <key> <value>` | Writes one value into your orq config (e.g. `orq-set ui theme lcd`) |
|
|
226
|
+
|
|
227
|
+
## More
|
|
228
|
+
|
|
229
|
+
- [docs/case-study.md](docs/case-study.md) — how this came to be, with real numbers
|
|
230
|
+
- [docs/plane.md](docs/plane.md) — self-hosted Plane through MCP
|
|
231
|
+
- [docs/claude-accounts.md](docs/claude-accounts.md) — several Claude accounts
|
|
232
|
+
- [docs/herdr.md](docs/herdr.md) — herdr day to day, shortcuts, several issues at once
|
|
233
|
+
- [docs/troubleshooting.md](docs/troubleshooting.md) — known problems and fixes
|
|
234
|
+
- [docs/omarchy.md](docs/omarchy.md) — extras for Omarchy users
|
|
235
|
+
- [docs/portability.md](docs/portability.md) — the roadmap: Linux, macOS and native Windows, any agent as conductor, user-defined roles, guided setup
|
|
236
|
+
- [CHANGELOG.md](CHANGELOG.md) — what changed, release by release
|
|
237
|
+
- `examples/` — real configurations to copy
|
|
238
|
+
|
|
239
|
+
## License
|
|
240
|
+
|
|
241
|
+
[MIT](LICENSE)
|