@irythill/orq 0.5.0 → 0.6.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/README.md CHANGED
@@ -2,11 +2,12 @@
2
2
 
3
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
4
 
5
- # orq — orchestrating coding agents with herdr
5
+ # orq — orchestrating coding agents
6
6
 
7
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.
8
+ each step, dispatches the **implementer**, the **tests** and a **cross-vendor review** (each in its own tab or window
9
+ in [herdr](https://herdr.dev) or tmux, or in the background), and hands the issue back *In Review* with a summary in
10
+ Plane. Merge, PR and deploy stay with you.
10
11
 
11
12
  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
13
  that lives in your config.
@@ -19,17 +20,18 @@ that lives in your config.
19
20
  ## How it works
20
21
 
21
22
  ```
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
23
+ You ── "/issue DEMO-123" ──► conductor (Claude, in any terminal)
24
+ │ orq pick impl ──► which agent/model implements (config + history + quota)
25
+ ├─► implementer orq agent own tab/window or background · worktree from origin/<base> · memory cap
26
+ ├─► tests orq verify only the diff's tests · queue of one suite at a time
27
+ │ orq pick review ─► a reviewer from ANOTHER vendor
28
+ ├─► reviewer orq agent -r read only · diff + criteria + test results attached
28
29
  └─► Plane comment, state, labels
29
- ◄── "[HERDR-AGENT DONE] ..." in the conductor's pane (the only completion signal)
30
+ ◄── "[HERDR-AGENT DONE] ..." typed into the conductor's herdr pane, or `orq wait` printing "[ORQ AGENT DONE] ..."
30
31
  ```
31
32
 
32
- - **Every step in a herdr tab.** You watch it live and the tab closes when it's done. Results stay in
33
+ - **Every step in its own tab or window.** In herdr or tmux you watch it live and the tab closes when it's done;
34
+ without them the step runs in the background (`orq board` shows it). Results stay in
33
35
  `.orquestra/<ID>/` (`.out.md`, `.log`, `.done`).
34
36
  - **Fixed order every round:** implementer ok → tests with no new failure → review. Only a `[blocker]` with
35
37
  `file:line` and a concrete failure becomes a fix round; the rest goes into the Plane comment (configurable maximum).
@@ -37,7 +39,7 @@ You ── "/issue DEMO-123" ──► conductor (Claude in herdr)
37
39
  one level up), fixes only the listed blockers with a test each, and the next review, by the same reviewer, checks
38
40
  those blockers and the fix's own diff instead of starting over. The implementer ends with a `## Decisions` section, so
39
41
  a deliberate choice doesn't come back as a blocker.
40
- - **Nobody picks an agent by gut feeling.** `orq-pick` decides from data: what each agent delivered in the history,
42
+ - **Nobody picks an agent by gut feeling.** `orq pick` decides from data: what each agent delivered in the history,
41
43
  how many tokens it spent, how long it took, the current quota, and a rotation so no agent gets all the work.
42
44
  - **The machine stays up.** Each agent runs under its own memory cap; tests wait in a queue.
43
45
 
@@ -188,13 +190,12 @@ orq pick fix --same .orquestra/<ID>/impl-<repo>.pick # a fix round: the implem
188
190
  ```
189
191
 
190
192
  ### Language and theme
191
- orq speaks English and Portuguese: CLI messages, `herdr-board`, notices and `install.sh`. It follows
193
+ orq speaks English and Portuguese: CLI messages, `orq board`, notices and `install.sh`. It follows
192
194
  `[ui] lang` in your config (`"auto"` = system locale, `"en"`, `"pt"`), or the `ORQ_LANG` environment variable.
193
195
  Switch it any time:
194
196
  - `orq-lang pt` / `orq-lang en` / `orq-lang toggle` (`orq-lang` alone shows the current one);
195
197
  - `l` inside `orq board`;
196
- - a herdr key: `install.sh` links the `orq` herdr plugin; bind its `orq.lang-toggle` action (snippet in
197
- `herdr-plugin/herdr-plugin.toml`) — e.g. `prefix+shift+l` — and `orq.board` to open the board as an overlay.
198
+ - in herdr, a key for it: see [With herdr](#with-herdr).
198
199
 
199
200
  `orq board` has its own look, from the [SYNTH.DECK](https://github.com/irythill/synth-deck-portfolio)
200
201
  portfolio: `[ui] theme = "gunmetal"` (default, dark graphite), `"chrome"` (light silver), `"lcd"` (phosphor green) or
@@ -205,32 +206,49 @@ Whatever is already running keeps its language. Conductors always talk to you in
205
206
 
206
207
  ## Daily use
207
208
 
209
+ Open the conductor in any terminal, in your workspace folder (the one `orq setup` prepared):
208
210
  ```bash
209
- herdr # opens the window (the server runs as a service)
210
- cd ~/Code/<workspace> && herdr-conductor # inside a herdr pane: opens the conductor (account and model optional)
211
+ cd ~/Code/<workspace> && orq conductor [account] [model] # any terminal: loads the conductor instructions, the workspace CLAUDE.md and the /issue skill
211
212
  ```
212
- In the conductor: **`/issue DEMO-123`**. It answers in one line and moves on by itself at every `[HERDR-AGENT DONE]`.
213
+ With several conductors, give each a fixed name (`export ORQ_CONDUCTOR_ID=<name>`) so `orq claim` can tell them apart.
214
+ Variants:
215
+ - **herdr:** run `herdr` (the server runs as a service), then the same `orq conductor` in a pane (`herdr-conductor` still works).
216
+ - **tmux:** run `orq conductor` in a pane; children open as tmux windows.
217
+ - **Neither:** children run in the background and the conductor waits with `orq wait`.
218
+
219
+ In the conductor: **`/issue DEMO-123`**. It answers in one line and moves on by itself at every completion signal
220
+ (`[HERDR-AGENT DONE]` in a herdr pane, otherwise the `[ORQ AGENT DONE]` line printed by `orq wait`).
213
221
  You only come back when it asks for a decision or says it's done.
214
222
 
215
223
  To see everything at once, keep **`orq board`** open in a tab or window (any terminal, any OS; `herdr-board` calls it):
216
224
  test queue, running agents (model, memory against the cap, last action), conductors and their issues, memory, quota,
217
- CI/CD per claimed issue, blocks and the 7-day scoreboard. `--once` prints it once, `--json` for scripts. With
218
- `ui.toast.delivery = "system"` in herdr's config, each finished step also pops up a native OS notification.
225
+ CI/CD per claimed issue, blocks and the 7-day scoreboard. `--once` prints it once, `--json` for scripts.
219
226
  A failure (tests red, agent `status=fail`, CI red) is also **loud**: besides the line typed into the conductor's pane
220
- (delivered by orq with retries and a log, `orq notice`), you get a herdr notification with sound, a `✗` title on the
221
- conductor's pane and, on Linux, a desktop notification (`[ui] desktop_notify = false` turns that one off; needs
222
- `notify-send`). Successes are quiet. The board's red top line lists failures from the last hour whose notice was not
223
- delivered or that the conductor has not yet acted on (it clears when the conductor runs `orq wait`, `orq verify` or
224
- `orq agent` for the issue).
225
- For quota without opening the board, `orq quota --line` fits herdr's tab bar (a `tab_bar_right` command entry,
226
- [docs/herdr.md](docs/herdr.md#quota-in-the-tab-bar)). `orq ci` shows each claimed issue's PR checks (queued, running,
227
- passed, failed or none, read from `gh` right then — it is a status check the user asked for, so unlike the board's
228
- CI column it does not just read the cache); a run turning red or green also pops a herdr notification, and a
229
- failure pings the owning conductor once per commit. After merges, `orq gc` lists and removes the issue worktrees
230
- left behind.
231
-
232
- Several issues at once: one conductor per issue (ideally on different accounts). `herdr-claim` keeps two conductors
233
- off the same issue. Details, shortcuts and scenarios: [docs/herdr.md](docs/herdr.md).
227
+ (delivered by orq with retries and a log, `orq notice`), you get a `✗` title on the conductor's pane (herdr) and, on
228
+ Linux, a desktop notification (`[ui] desktop_notify = false` turns that one off; needs `notify-send`). Successes are
229
+ quiet. The board's red top line lists failures from the last hour whose notice was not delivered or that the conductor
230
+ has not yet acted on (it clears when the conductor runs `orq wait`, `orq verify` or `orq agent` for the issue).
231
+ `orq quota --line` prints quota in one line for any status bar. `orq ci` shows each claimed issue's PR checks (queued,
232
+ running, passed, failed or none, read from `gh` right then — it is a status check the user asked for, so unlike the
233
+ board's CI column it does not just read the cache); a failure pings the owning conductor once per commit. After
234
+ merges, `orq gc` lists and removes the issue worktrees left behind.
235
+
236
+ Several issues at once: one conductor per issue (ideally on different accounts). `orq claim` (`herdr-claim`) keeps two
237
+ conductors off the same issue.
238
+
239
+ ## With herdr
240
+
241
+ herdr is optional, but it gives orq the most polish: children in their own tabs, notices typed into the conductor's
242
+ pane, and a few extras:
243
+ - `orq conductor` (or `herdr-conductor`) in a herdr pane also names the pane "conductor".
244
+ - `ui.toast.delivery = "system"` in herdr's config makes each finished step pop up a native OS notification; failures
245
+ also get a herdr notification with sound, and a CI run turning red or green pops one too.
246
+ - `orq quota --line` fits herdr's tab bar (a `tab_bar_right` command entry,
247
+ [docs/herdr.md](docs/herdr.md#quota-in-the-tab-bar)).
248
+ - A key for the language: `install.sh` links the `orq` herdr plugin; bind its `orq.lang-toggle` action (snippet in
249
+ `herdr-plugin/herdr-plugin.toml`) — e.g. `prefix+shift+l` — and `orq.board` to open the board as an overlay.
250
+
251
+ Day to day, shortcuts and several issues at once: [docs/herdr.md](docs/herdr.md).
234
252
 
235
253
  ## Skills
236
254
 
@@ -246,15 +264,15 @@ off the same issue. Details, shortcuts and scenarios: [docs/herdr.md](docs/herdr
246
264
 
247
265
  | Command | What it does |
248
266
  |---|---|
249
- | `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 or tmux; `-R` with it open types the follow-up into it) |
267
+ | `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 or tmux; `-R` with it open types the follow-up into it; a finished screen closes after `[machine] tui_idle_close_min` minutes without a follow-up, default 30, `0` = never) |
250
268
  | `orq instructions claude\|agents` | Writes the `/issue` playbook as `SKILL.md` (Claude Code) or into `AGENTS.md` (Codex, OpenCode…) |
251
269
  | `orq notice [--list] [-n N]` | The delivery log of notices to conductors: each attempt, retry and failure (`<state>/notices.jsonl`) |
252
270
  | `orq wait <prefix>...` | Blocks until those agents finish; prints `status=` and the answer file (any conductor, any terminal) |
253
271
  | `orq verify ...` (`herdr-verify`) | Tests related to the diff, queued and memory-capped; failures that also fail on the base count as pre-existing |
254
272
  | `orq board` (`herdr-board`) | Live board: queue, agents, conductors, quota, blocks, scoreboard |
255
- | `herdr-conductor` | Opens the conductor in the current pane |
256
- | `herdr-claim` | Owner of each issue among conductors |
257
- | `herdr-deps` | Links the worktree's dependencies to the main repo's (no reinstall) |
273
+ | `orq conductor [account] [model] [-r <id>]` (`herdr-conductor`) | Opens the conductor (Claude) in the current terminal with its instructions, account and model; `-r` resumes a session |
274
+ | `orq claim` (`herdr-claim`) | Owner of each issue among conductors |
275
+ | `orq deps` (`herdr-deps`) | Links the worktree's dependencies to the main repo's (no reinstall) |
258
276
  | `orq baseline ...` (`herdr-baseline`) | Manual snapshot of the tests failing on the base (outside the flow) |
259
277
  | `orq gc [-w <workspace>] [--yes] [--days N] [--json]` | Lists issue worktrees that are safe to remove (PR merged, or content already in the base, squash merges included); `--yes` removes them. Never touches uncommitted work, unpushed commits, a live claim or a running agent. Optional daily `orq-gc.timer` |
260
278
  | `orq ci [-w <workspace>] [--json]` | CI/CD status per claimed issue with a PR: queued, running, passed, failed or none, collected live via `gh` right then (the cache it fills is what `orq board`'s CI column reads, never blocking on the network). A run turning red or green pops a herdr notification, and a failure also pings the owning conductor |
package/README.pt-BR.md CHANGED
@@ -2,11 +2,12 @@
2
2
 
3
3
  <p align="center"><img src="docs/img/orq-logo.svg" alt="orq — um orc de fraque erguendo a batuta de maestro" width="304"></p>
4
4
 
5
- # orq — orquestrando agentes de código com o herdr
5
+ # orq — orquestrando agentes de código
6
6
 
7
7
  Você descreve o trabalho numa issue do Plane. Um **conductor** (Claude, de preferência Opus) lê a issue, escolhe o
8
- agente certo para cada etapa, despacha o **implementador**, os **testes** e uma **review cross-vendor** em abas do
9
- [herdr](https://herdr.dev), e devolve a issue *In Review* com um resumo no Plane. Merge, PR e deploy continuam com você.
8
+ agente certo para cada etapa, despacha o **implementador**, os **testes** e uma **review cross-vendor** (cada um
9
+ em sua própria aba ou janela no [herdr](https://herdr.dev) ou no tmux, ou em segundo plano), e devolve a issue
10
+ *In Review* com um resumo no Plane. Merge, PR e deploy continuam com você.
10
11
 
11
12
  O que o orq **não** decide por você: quais agentes você tem, quanto cada um pode gastar e como você gosta de
12
13
  trabalhar. Tudo isso fica na sua config.
@@ -19,17 +20,18 @@ trabalhar. Tudo isso fica na sua config.
19
20
  ## Como funciona
20
21
 
21
22
  ```
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
23
+ You ── "/issue DEMO-123" ──► conductor (Claude, in any terminal)
24
+ │ orq pick impl ──► which agent/model implements (config + history + quota)
25
+ ├─► implementer orq agent own tab/window or background · worktree from origin/<base> · memory cap
26
+ ├─► tests orq verify only the diff's tests · queue of one suite at a time
27
+ │ orq pick review ─► a reviewer from ANOTHER vendor
28
+ ├─► reviewer orq agent -r read only · diff + criteria + test results attached
28
29
  └─► Plane comment, state, labels
29
- ◄── "[HERDR-AGENT DONE] ..." in the conductor's pane (the only completion signal)
30
+ ◄── "[HERDR-AGENT DONE] ..." typed into the conductor's herdr pane, or `orq wait` printing "[ORQ AGENT DONE] ..."
30
31
  ```
31
32
 
32
- - **Cada etapa numa aba do herdr.** Você acompanha ao vivo e a aba fecha quando termina. Os resultados ficam em
33
+ - **Cada etapa na sua própria aba ou janela.** No herdr ou no tmux você acompanha ao vivo e a aba fecha quando
34
+ termina; sem eles a etapa roda em segundo plano (o `orq board` mostra). Os resultados ficam em
33
35
  `.orquestra/<ID>/` (`.out.md`, `.log`, `.done`).
34
36
  - **Ordem fixa em toda rodada:** implementador ok → testes sem falha nova → review. Só um `[blocker]` com
35
37
  `arquivo:linha` e uma falha concreta vira rodada de correção; o resto vai para o comentário no Plane (com máximo
@@ -181,13 +183,12 @@ orq pick fix --same .orquestra/<ID>/impl-<repo>.pick # a fix round: the implem
181
183
  ```
182
184
 
183
185
  ### Idioma e tema
184
- O orq fala inglês e português: mensagens da CLI, `herdr-board`, avisos e `install.sh`. Ele segue `[ui] lang` na sua
186
+ O orq fala inglês e português: mensagens da CLI, `orq board`, avisos e `install.sh`. Ele segue `[ui] lang` na sua
185
187
  config (`"auto"` = idioma do sistema, `"en"`, `"pt"`) ou a variável de ambiente `ORQ_LANG`. Para trocar a qualquer
186
188
  momento:
187
189
  - `orq-lang pt` / `orq-lang en` / `orq-lang toggle` (`orq-lang` sozinho mostra o atual);
188
190
  - a tecla `l` dentro do `orq board`;
189
- - uma tecla no herdr: o `install.sh` liga o plugin `orq` do herdr; associe a ação `orq.lang-toggle` (trecho pronto em
190
- `herdr-plugin/herdr-plugin.toml`) — por exemplo, `prefix+shift+l` — e a `orq.board` para abrir o painel por cima.
191
+ - no herdr, uma tecla para isso: veja [Com o herdr](#com-o-herdr).
191
192
 
192
193
  O `orq board` tem visual próprio, inspirado no portfólio [SYNTH.DECK](https://github.com/irythill/synth-deck-portfolio):
193
194
  `[ui] theme = "gunmetal"` (padrão, grafite escuro), `"chrome"` (prata claro), `"lcd"` (verde fósforo) ou `"terminal"`
@@ -197,33 +198,51 @@ O que já está rodando continua no idioma em que começou. Os conductors sempre
197
198
 
198
199
  ## Uso diário
199
200
 
201
+ Abra o conductor em qualquer terminal, na pasta do seu workspace (a que o `orq setup` preparou):
200
202
  ```bash
201
- herdr # abre a janela (o servidor roda como serviço)
202
- cd ~/Code/<workspace> && herdr-conductor # dentro de um pane do herdr: abre o conductor (conta e modelo opcionais)
203
+ cd ~/Code/<workspace> && orq conductor [conta] [modelo] # qualquer terminal: carrega as instruções do conductor, o CLAUDE.md do workspace e a skill /issue
203
204
  ```
204
- No conductor: **`/issue DEMO-123`**. Ele responde numa linha e segue sozinho a cada `[HERDR-AGENT DONE]`. Você só volta
205
+ Com vários conductors, dê a cada um um nome fixo (`export ORQ_CONDUCTOR_ID=<nome>`) para o `orq claim` distingui-los.
206
+ Variantes:
207
+ - **herdr:** rode `herdr` (o servidor roda como serviço) e, num pane, o mesmo `orq conductor` (o `herdr-conductor` continua funcionando).
208
+ - **tmux:** rode `orq conductor` num pane; os filhos abrem como janelas do tmux.
209
+ - **Nenhum dos dois:** os filhos rodam em segundo plano e o conductor espera com `orq wait`.
210
+
211
+ No conductor: **`/issue DEMO-123`**. Ele responde numa linha e segue sozinho a cada sinal de conclusão
212
+ (`[HERDR-AGENT DONE]` num pane do herdr; fora dele, a linha `[ORQ AGENT DONE]` impressa pelo `orq wait`). Você só volta
205
213
  quando ele pede uma decisão ou avisa que terminou.
206
214
 
207
215
  Para ver tudo de uma vez, deixe o **`orq board`** aberto numa aba ou janela (qualquer terminal, qualquer SO; o
208
216
  `herdr-board` o chama): fila de testes, agentes rodando (modelo, memória contra o limite, última ação), conductors e
209
217
  suas issues, memória, quota, CI/CD de cada issue reivindicada, bloqueios e o placar de 7 dias. `--once` imprime uma
210
- vez, `--json` para scripts. Com `ui.toast.delivery = "system"` na config do herdr, cada etapa concluída também gera
211
- uma notificação nativa do sistema. Uma falha (testes vermelhos, agente `status=fail`, CI vermelho) também é **barulhenta**: além da linha digitada no pane do
212
- conductor (entregue pelo orq com novas tentativas e log, `orq notice`), você recebe uma notificação do herdr com som, um
213
- título `✗` no pane do conductor e, no Linux, uma notificação de desktop (`[ui] desktop_notify = false` desliga essa;
214
- precisa do `notify-send`). Sucessos ficam quietos. A linha vermelha no topo do board lista as falhas da última hora
215
- cujo aviso não foi entregue ou que o conductor ainda não tratou (some quando ele roda `orq wait`, `orq verify` ou
216
- `orq agent` para a issue).
217
- Para ver a cota sem abrir o board, o `orq quota --line` cabe na barra de abas do
218
- herdr (uma entrada `command` no `tab_bar_right`, [docs/pt-BR/herdr.md](docs/pt-BR/herdr.md#cota-na-barra-de-abas)).
219
- O `orq ci` mostra os checks do PR de cada issue reivindicada (na fila, rodando, passou, falhou ou nenhum, lido via
220
- `gh` na hora — é uma consulta que o usuário pediu agora, então, diferente da coluna de CI do board, não lê só o
221
- cache); quando um deles vira verde ou vermelho sai uma notificação do herdr, e uma falha também avisa o conductor
222
- dono num aviso só por commit. Depois dos merges, o `orq gc` lista e remove as worktrees de issues que ficaram para
223
- trás.
224
-
225
- Várias issues ao mesmo tempo: um conductor por issue (de preferência em contas diferentes). O `herdr-claim` impede que
226
- dois conductors peguem a mesma issue. Detalhes, atalhos e cenários: [docs/pt-BR/herdr.md](docs/pt-BR/herdr.md).
218
+ vez, `--json` para scripts.
219
+ Uma falha (testes vermelhos, agente `status=fail`, CI vermelho) também é **barulhenta**: além da linha digitada no pane
220
+ do conductor (entregue pelo orq com novas tentativas e log, `orq notice`), você recebe um título `✗` no pane do
221
+ conductor (herdr) e, no Linux, uma notificação de desktop (`[ui] desktop_notify = false` desliga essa; precisa do
222
+ `notify-send`). Sucessos ficam quietos. A linha vermelha no topo do board lista as falhas da última hora cujo aviso não
223
+ foi entregue ou que o conductor ainda não tratou (some quando ele roda `orq wait`, `orq verify` ou `orq agent` para a
224
+ issue).
225
+ O `orq quota --line` imprime a cota numa linha para qualquer barra de status. O `orq ci` mostra os checks do PR de cada
226
+ issue reivindicada (na fila, rodando, passou, falhou ou nenhum, lido via `gh` na hora — é uma consulta que o usuário
227
+ pediu agora, então, diferente da coluna de CI do board, não lê só o cache); uma falha também avisa o conductor dono num
228
+ aviso só por commit. Depois dos merges, o `orq gc` lista e remove as worktrees de issues que ficaram para trás.
229
+
230
+ Várias issues ao mesmo tempo: um conductor por issue (de preferência em contas diferentes). O `orq claim`
231
+ (`herdr-claim`) impede que dois conductors peguem a mesma issue.
232
+
233
+ ## Com o herdr
234
+
235
+ O herdr é opcional, mas é com ele que o orq fica mais redondo: filhos em abas próprias, avisos digitados no pane do
236
+ conductor e alguns extras:
237
+ - `orq conductor` (ou `herdr-conductor`) num pane do herdr também dá o nome "conductor" ao pane.
238
+ - `ui.toast.delivery = "system"` na config do herdr faz cada etapa concluída gerar uma notificação nativa do sistema;
239
+ falhas também geram uma notificação do herdr com som, e um CI que fica verde ou vermelho também gera uma.
240
+ - O `orq quota --line` cabe na barra de abas do herdr (uma entrada `command` no `tab_bar_right`,
241
+ [docs/pt-BR/herdr.md](docs/pt-BR/herdr.md#cota-na-barra-de-abas)).
242
+ - Uma tecla para o idioma: o `install.sh` liga o plugin `orq` do herdr; associe a ação `orq.lang-toggle` (trecho pronto
243
+ em `herdr-plugin/herdr-plugin.toml`) — por exemplo, `prefix+shift+l` — e a `orq.board` para abrir o painel por cima.
244
+
245
+ Dia a dia, atalhos e várias issues ao mesmo tempo: [docs/pt-BR/herdr.md](docs/pt-BR/herdr.md).
227
246
 
228
247
  ## Skills
229
248
 
@@ -239,15 +258,15 @@ dois conductors peguem a mesma issue. Detalhes, atalhos e cenários: [docs/pt-BR
239
258
 
240
259
  | Comando | O que faz |
241
260
  |---|---|
242
- | `orq agent -a <agent> ...` (`herdr-agent`) | Roda um agente com limite de memória numa aba do herdr, numa janela do tmux ou em segundo plano; `-r` só leitura, `-R <id>` continua a sessão, `-i` anexa um arquivo, `-b <base>` anexa o diff, `-T` a tela do próprio agente (herdr ou tmux; `-R` com ela aberta digita o follow-up nela) |
261
+ | `orq agent -a <agent> ...` (`herdr-agent`) | Roda um agente com limite de memória numa aba do herdr, numa janela do tmux ou em segundo plano; `-r` só leitura, `-R <id>` continua a sessão, `-i` anexa um arquivo, `-b <base>` anexa o diff, `-T` a tela do próprio agente (herdr ou tmux; `-R` com ela aberta digita o follow-up nela; a tela que terminou fecha após `[machine] tui_idle_close_min` minutos sem follow-up, padrão 30, `0` = nunca) |
243
262
  | `orq instructions claude\|agents` | Escreve o playbook do `/issue` como `SKILL.md` (Claude Code) ou dentro do `AGENTS.md` (Codex, OpenCode…) |
244
263
  | `orq notice [--list] [-n N]` | O log de entrega dos avisos aos conductors: cada tentativa, nova tentativa e falha (`<state>/notices.jsonl`) |
245
264
  | `orq wait <prefixo>...` | Bloqueia até esses agentes terminarem; imprime `status=` e o arquivo da resposta (qualquer conductor, qualquer terminal) |
246
265
  | `orq verify ...` (`herdr-verify`) | Testes relacionados ao diff, em fila e com limite de memória; falhas que também falham na base contam como pré-existentes |
247
266
  | `orq board` (`herdr-board`) | Painel ao vivo: fila, agentes, conductors, cota, bloqueios, placar |
248
- | `herdr-conductor` | Abre o conductor no pane atual |
249
- | `herdr-claim` | Dono de cada issue entre os conductors |
250
- | `herdr-deps` | Liga as dependências do worktree às do repo principal (sem reinstalar) |
267
+ | `orq conductor [conta] [modelo] [-r <id>]` (`herdr-conductor`) | Abre o conductor (Claude) no terminal atual com as instruções, conta e modelo; `-r` retoma uma sessão |
268
+ | `orq claim` (`herdr-claim`) | Dono de cada issue entre os conductors |
269
+ | `orq deps` (`herdr-deps`) | Liga as dependências do worktree às do repo principal (sem reinstalar) |
251
270
  | `orq baseline ...` (`herdr-baseline`) | Snapshot manual dos testes que falham na base (fora do fluxo) |
252
271
  | `orq gc [-w <workspace>] [--yes] [--days N] [--json]` | Lista worktrees de issues que podem ser removidas (PR mergeado, ou conteúdo já na base, inclusive squash merge); `--yes` as remove. Nunca mexe em trabalho não commitado, commit fora do remote, claim ativo ou agente rodando. `orq-gc.timer` diário opcional |
253
272
  | `orq ci [-w <workspace>] [--json]` | Status de CI/CD de cada issue reivindicada com PR: na fila, rodando, passou, falhou ou nenhum, coletado na hora via `gh` (o cache que ele preenche é o que a coluna de CI do `orq board` lê, sem nunca travar na rede). Quando vira verde ou vermelho sai uma notificação do herdr, e uma falha também avisa o conductor dono |
package/dist/agents.js CHANGED
@@ -47,8 +47,8 @@ export const BUILTIN_AGENTS = {
47
47
  turn_hook: "opencode",
48
48
  },
49
49
  antigravity: {
50
- // --sandbox + accept-edits (no skip-permissions); headless denies commands outside agy's allowlist, so in practice
51
- // it reviews. The prompt goes in a file in its folder (excluded from git) and -p only says "read it".
50
+ // --sandbox + accept-edits (no skip-permissions); headless denies commands outside agy's allowlist (see agy-impl.json);
51
+ // a run that only had commands denied still counts when the worktree changed (see the antigravity format). The prompt goes in a file in its folder (excluded from git) and -p only says "read it".
52
52
  run: `${AGY} {mode} -p {prompt_hint}`, resume: `${AGY} --conversation {session} {mode} -p {prompt_hint}`,
53
53
  readonly: "--mode plan", write: "--mode accept-edits --add-dir {gitdir}",
54
54
  format: "antigravity", throwaway: true, prompt_in_dir: true,
@@ -206,13 +206,57 @@ export const FORMATS = {
206
206
  return s.step_type === "tool" && s.state === "DONE" ? "\n· tool\n" : undefined;
207
207
  },
208
208
  finish(log) {
209
- const res = jsonLines(log).filter((j) => j.event === "result").map((j) => j.result ?? {});
209
+ const evs = jsonLines(log);
210
+ const res = evs.filter((j) => j.event === "result").map((j) => j.result ?? {});
210
211
  let answer = lastOf(res.map((r) => String(r.response ?? ""))) ?? "";
211
- // An agy error (e.g. a denied command) is a failure, even with an answer.
212
212
  const errs = log.split(/\r?\n/).filter((l) => l.startsWith("jetski: "));
213
+ // Denied commands: ERROR steps with the command line, plus denied_actions on the result.
214
+ const denied = [];
215
+ let text = "", textId, lastCmd = "", sawResult = false; // lastCmd: last CommandLine streamed before the result
216
+ const hinted = res.some((r) => Array.isArray(r.denied_actions) && r.denied_actions.length) || errs.some((l) => /permission/.test(l));
217
+ for (const e of evs) {
218
+ if (e.event === "result")
219
+ sawResult = true;
220
+ const s = e.event === "step_update" ? e.step_update : undefined;
221
+ if (!s)
222
+ continue;
223
+ const seen = (s.tool_info ?? e.tool_info)?.parameters?.CommandLine;
224
+ if (!sawResult && typeof seen === "string" && seen.trim())
225
+ lastCmd = seen.trim();
226
+ if (s.step_type === "agent_response") {
227
+ const id = s.step_id ?? s.step_index ?? s.id;
228
+ if (id !== textId) {
229
+ textId = id;
230
+ if (s.text_delta)
231
+ text = "";
232
+ }
233
+ text += String(s.text_delta ?? "");
234
+ }
235
+ if (s.state === "ERROR") {
236
+ const ti = s.tool_info ?? e.tool_info, cmd = ti?.parameters?.CommandLine, msg = String(s.error?.message ?? "");
237
+ if (/permission check failed|not allowed|denied/i.test(msg) || (cmd && !msg && hinted)) {
238
+ const d = `${cmd ? `\`${cmd}\`` : "(command)"}${msg ? ` — ${msg}` : ""}`;
239
+ if (!denied.includes(d))
240
+ denied.push(d);
241
+ }
242
+ }
243
+ }
244
+ const acts = res.flatMap((r) => (Array.isArray(r.denied_actions) ? r.denied_actions : []));
245
+ const wasDenied = denied.length > 0 || acts.length > 0 || errs.some((l) => /permission/.test(l));
246
+ // denied_actions only says "RunCommand": the command is the last one the stream showed before the result.
247
+ if (!denied.length && lastCmd && acts.length && acts.every((a) => a.display_name === "RunCommand"))
248
+ denied.push(`denied: ${lastCmd}`);
249
+ if (wasDenied && !answer.trim())
250
+ answer = text.trim();
251
+ if (wasDenied) {
252
+ answer += `${answer ? "\n\n" : ""}## Denied commands\n` +
253
+ "agy denied commands outside its allowlist (headless, nobody to approve). Retry with a different command, or add a glob rule such as command(/usr/bin/*) to agy's allowlist (~/.config/orq/agy-impl.json, see examples/agy-impl.json) -- usually that is the fix.\n" +
254
+ (denied.length ? denied.map((d) => `- ${d}`).join("\n") : acts.map((a) => `- ${a.action ?? "command"} (${a.display_name ?? "?"})`).join("\n")) + "\n";
255
+ }
213
256
  if (errs.length)
214
257
  answer += (answer ? "\n" : "") + errs.join("\n") + "\n";
215
- return { session: lastOf(res.map((r) => r.conversation_id).filter(Boolean)), answer, rc: errs.length ? 3 : undefined };
258
+ return { session: lastOf(res.map((r) => r.conversation_id).filter(Boolean)), answer, rc: errs.length || wasDenied ? 3 : undefined,
259
+ denied: wasDenied ? (denied.length ? denied : ["(command)"]) : undefined };
216
260
  },
217
261
  },
218
262
  };
package/dist/cli.js CHANGED
@@ -11,6 +11,7 @@ import { block, USAGE as BLOCK } from "./commands/block.js";
11
11
  import { claim, USAGE as CLAIM } from "./commands/claim.js";
12
12
  import { ci, USAGE as CI } from "./commands/ci.js";
13
13
  import { completion, USAGE as COMPLETION } from "./commands/completion.js";
14
+ import { conductor, USAGE as CONDUCTOR } from "./commands/conductor.js";
14
15
  import { config, USAGE as CONFIG } from "./commands/config.js";
15
16
  import { deps, USAGE as DEPS } from "./commands/deps.js";
16
17
  import { gc, USAGE as GC } from "./commands/gc.js";
@@ -28,7 +29,7 @@ import { setup, USAGE as SETUP } from "./commands/setup.js";
28
29
  import { stats, USAGE as STATS } from "./commands/stats.js";
29
30
  import { verify, USAGE as VERIFY } from "./commands/verify.js";
30
31
  import { wait, USAGE as WAIT } from "./commands/wait.js";
31
- const COMMANDS = { config, set, board, lang, block, quota, pick, stats, rounds, setup, lock, claim, deps, gc, ci, handoff, run, agent, wait, instructions, verify, baseline, notice: noticeCmd,
32
+ const COMMANDS = { config, conductor, set, board, lang, block, quota, pick, stats, rounds, setup, lock, claim, deps, gc, ci, handoff, run, agent, wait, instructions, verify, baseline, notice: noticeCmd,
32
33
  completion: (a) => completion(a, Object.keys(COMMANDS)) };
33
34
  const usage = () => `orq <command> [args]
34
35
 
@@ -50,6 +51,7 @@ ${VERIFY}
50
51
  ${BASELINE}
51
52
  ${INSTRUCTIONS}
52
53
  ${NOTICE}
54
+ ${CONDUCTOR}
53
55
  ${CLAIM}
54
56
  ${DEPS}
55
57
  ${GC}