@irythill/orq 0.7.0 → 0.9.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.
@@ -8,7 +8,7 @@ description: Runs a Plane issue end to end by orchestrating coding agents in her
8
8
  You are the **orchestrator**: you plan, dispatch, follow up and report. **Do not implement anything yourself** (it
9
9
  burns the conductor's model). Talk to the user in the user's language.
10
10
 
11
- **Ecosystem configuration:** the **workspace** `CLAUDE.md` (the folder named in your conductor instructions) defines
11
+ **Ecosystem configuration:** in the folder named in your conductor instructions, read `ORQ.md` (legacy: `CLAUDE.md`). It defines
12
12
  the repositories and their groups (= herdr workspace or just a label, `-g`), **each repo's base branch**, verification commands,
13
13
  Plane projects (identifier → project_id), default assignee, labels/modules and MCP limitations. Read it before you
14
14
  start. Below, `$WS` = workspace.
@@ -17,11 +17,17 @@ herdr (`HERDR_ENV=1`), in tmux windows inside tmux, else in the background (thei
17
17
  still `<prefix>.out.md`; `-T`, the agent's own screen, needs herdr or tmux). Set `ORQ_CONDUCTOR_ID` to a fixed name per
18
18
  conductor outside herdr.
19
19
  - **Completion signal:** in herdr, one line `[HERDR-AGENT DONE] <title> status=ok|fail ... answer: <file>` is typed into
20
- your pane after each child. Anywhere else no line arrives: after dispatching, run `orq wait <prefix>` **as a background
21
- task** (Claude Code: Bash with `run_in_background`); its exit wakes you and its output is the line
20
+ your pane after each child. Anywhere else no line arrives: `orq wait <prefix>` prints
22
21
  `[ORQ AGENT DONE] <title> status=ok|fail ... answer: <file>`. Treat both lines the same. Several children in parallel:
23
- `orq wait --any <prefix1> <prefix2>` (one wake-up per finish; wait again for the rest). No background tasks in your
24
- harness → run `orq wait` in the foreground; that is the one allowed blocking wait.
22
+ `orq wait --any <prefix1> <prefix2>` (one finish per call; wait again for the rest).
23
+ - **Waiting strategy** (your conductor instructions name it; `orq instructions strategy` shows it). It depends on what
24
+ your harness can do, not on whether it can start a background process:
25
+ - *background task* — only when a finished background task starts a new turn by itself (Claude Code: Bash with
26
+ `run_in_background`): run `orq wait --any ...` that way and end your turn.
27
+ - *foreground loop* — every other harness (Codex, OpenCode, ...): stay active. Run
28
+ `orq wait --any --timeout <s> <pending prefixes>` in the foreground; exit 124 = nothing finished yet → one-line
29
+ status to the user and run it again (never re-dispatch on a timeout). Don't end your turn expecting a wake-up; if
30
+ you must, tell the user you won't continue until they message you.
25
31
  - `orq verify` and `orq baseline` run like children (herdr tab, tmux window or background) and you wait for them the same
26
32
  way, e.g. `orq wait $O/verify-<repo>`.
27
33
  - Peeking at a child: `<prefix>.log` (in herdr also `herdr pane read $(cat <prefix>.pane) --source recent`).
@@ -42,7 +48,7 @@ Issue artifacts (prompts, notes) live in `$WS/.orquestra/<ID>/`.
42
48
  - `mcp__plane__workitem` `retrieve_by_identifier` with `workitem_identifier: "<ID>"`; then `workitem_comment list`.
43
49
  - Extract: goal, **acceptance criteria**, affected repos, links. No acceptance criteria → write a short proposal and
44
50
  **ask the user** before dispatching.
45
- - Issue missing assignee, priority, labels or module → **fill them in** following the workspace `CLAUDE.md` "Issue
51
+ - Issue missing assignee, priority, labels or module → **fill them in** following the workspace `ORQ.md` "Issue
46
52
  standard". The same standard applies to any new issue you create.
47
53
  - Move it to **In Progress** (`workitem update` with the state_id from `state list`).
48
54
 
@@ -93,7 +99,7 @@ Write the prompt to `$WS/.orquestra/<ID>/impl-<repo>.md` (short: goal, acceptanc
93
99
  verification commands, "base: origin/<BASE>; don't rebase/merge other branches; local commits, no push; commit
94
100
  messages following <path of the repo's commit conventions, see step 7>").
95
101
  Always include:
96
- - **Repo checklist:** copy the repo's "Checklist" column from the workspace `CLAUDE.md`.
102
+ - **Repo checklist:** copy the repo's "Checklist" column from the workspace `ORQ.md`.
97
103
  - **Decisions:** "end your final answer with a `## Decisions` section, at most 10 lines: what you chose and what you
98
104
  ruled out, trade-offs, and what you left out on purpose and why". The reviewer reads it (step 5), so a deliberate
99
105
  choice doesn't come back as a blocker.
@@ -102,7 +108,7 @@ Always include:
102
108
  and report; after the rebase repeat lint/tsc". An agent without network (Codex) can't fetch: `orq agent` fetches before
103
109
  the run and adds a note to its prompt, so it only rebases locally.
104
110
 
105
- **Base = the repo's base branch from the workspace `CLAUDE.md`, always from the updated remote (`origin/<BASE>`).**
111
+ **Base = the repo's base branch from the workspace `ORQ.md`, always from the updated remote (`origin/<BASE>`).**
106
112
  Worktree with `git worktree add` (not `herdr worktree create`: that opens a separate herdr workspace per worktree, and
107
113
  children are grouped by the repo's `-g`).
108
114
  ```bash
@@ -139,7 +145,7 @@ orq agent $(cat $O/impl-<repo>.pick) -g <group> -t "<ID> impl <repo>" -d $WT -o
139
145
  - Every child prompt ends with: "Don't try to talk to the conductor or use herdr; finish with your complete final
140
146
  answer (that is what I read)."
141
147
  - **Verification in the child: lint and tsc only, one command at a time** (the cap is 4 GB per agent and jest/vitest
142
- blow it; tests are yours, step 4b): use the Verification column of the workspace `CLAUDE.md` and put in the prompt
148
+ blow it; tests are yours, step 4b): use the Verification column of the workspace `ORQ.md` and put in the prompt
143
149
  "verify sequentially, never in parallel or watch mode: (1) lint only the changed files (`git diff --name-only
144
150
  origin/<BASE>...HEAD`); (2) `NODE_OPTIONS=--max-old-space-size=2048 tsc --noEmit` for the project. Don't run tests".
145
151
  Full suite only in CI (or a manual `orq baseline` if the user asks).
@@ -148,7 +154,7 @@ orq agent $(cat $O/impl-<repo>.pick) -g <group> -t "<ID> impl <repo>" -d $WT -o
148
154
  arriving), run `orq notice` (delivery log) and `<prefix>.done` for that issue, then handle the failure; running
149
155
  `orq wait`, `orq verify` or `orq agent` for the issue acknowledges it.
150
156
  - **Never block waiting** (`herdr agent wait`, `pane wait-output`, `sleep`, `timeout`): completion arrives as a
151
- `[HERDR-AGENT DONE]` line in your pane (herdr) or through the background `orq wait`. Dispatch, report in one line and end your turn. "Done yet?" = `<prefix>.done`
157
+ `[HERDR-AGENT DONE]` line in your pane (herdr) or through `orq wait` per your waiting strategy. Dispatch, report in one line, then end your turn (herdr / background task) or keep looping (foreground loop). "Done yet?" = `<prefix>.done`
152
158
  exists (never `pgrep`).
153
159
  - Investigation only (no code): "READ ONLY" prompt, in the repo itself, no worktree. `orq agent -r` (Claude:
154
160
  `--permission-mode plan`; the others: throwaway worktree, no editing).
@@ -169,7 +175,7 @@ something is red, new or old, and never widen a baseline or allowlist to silence
169
175
  outside the issue's domain: ask the user first (then it ships as its own PR, not as a note).
170
176
  **Mandatory order every round (impl and each fix): child `ok` → verify → review.** Never dispatch the review (or an
171
177
  "early" fix) while this round's verify is pending, even if it is queued behind another verify: wait for
172
- the `... verify ...` done line and end your turn until then.
178
+ the `... verify ...` done line (end your turn or keep looping, per your waiting strategy).
173
179
 
174
180
  ## 5. Cross review (always another vendor)
175
181
  ```bash
@@ -265,7 +271,7 @@ rules live) commits and writes the PR. Find and cite in the prompt, by path, wha
265
271
  high severity, `file:line` and a concrete failure, not already decided in the rounds, goes into a fix round (it
266
272
  counts towards `policy.max_rounds`); the rest goes into the Plane comment or a follow-up issue. Don't re-request the
267
273
  bot's review to "get it clean".
268
- - **CI after every push:** `gh pr checks <n>` (no `--watch`; if pending, end your turn and check on the next notice).
274
+ - **CI after every push:** `gh pr checks <n>` (no `--watch`; if pending, check again on the next notice or loop iteration).
269
275
  Red → `gh run view <id> --log-failed | tail -40`: error from the diff → fix round; error already on the base → create
270
276
  a Plane issue (workspace standard) and tell the user. "Ready to merge" only with green checks or an explained failure
271
277
  + issue.
@@ -279,4 +285,4 @@ rules live) commits and writes the PR. Find and cite in the prompt, by path, wha
279
285
  ## Saving tokens
280
286
  Short prompts (never paste the whole `CLAUDE.md` — the agent reads the repo's own). Reviews judge only the diff, but the prompt must say the reviewer **may open files for context** (cat, rg, git
281
287
  show — read only): Codex read "review only the diff" as "use only the attached diff" and returned an empty review. Don't re-read
282
- the whole issue at every step. Respect the MCP limitations listed in the workspace `CLAUDE.md`.
288
+ the whole issue at every step. Respect the MCP limitations listed in the workspace `ORQ.md`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: orq-setup
3
- description: Guided first-time setup of orq for a new developer — detects and smoke-tests the installed agent CLIs, asks which agents take which roles, models, Claude accounts and pick weights, writes ~/.config/orq/config.toml, then prepares a conductor workspace (orq setup --workspace + workspace CLAUDE.md) and checks Plane. Use when the user says "/orq-setup", "set up orq", "configure orq" or just installed orq (npm i -g @irythill/orq, or install.sh).
3
+ description: Guided first-time setup of orq for a new developer — detects and smoke-tests the installed agent CLIs, asks which agents take which roles, models, Claude accounts and pick weights, writes ~/.config/orq/config.toml, then prepares a conductor workspace (orq setup --workspace + workspace ORQ.md) and checks Plane. Use when the user says "/orq-setup", "set up orq", "configure orq" or just installed orq (npm i -g @irythill/orq, or install.sh).
4
4
  ---
5
5
 
6
6
  # /orq-setup — configure orq for this developer
@@ -85,10 +85,10 @@ Explain simply, then suggest the example's values and ask if they want to change
85
85
  ## 6. Workspace
86
86
  - Ask for the folder that groups their repos (e.g. `~/Code/acme-platform`). After the OK:
87
87
  `orq setup --workspace <folder> --conductor <the conductor agent>` — `.orquestra/`, `.worktrees/`, the map
88
- `<folder>/CLAUDE.md` from the template (never overwrites one) and the `/issue` playbook in the conductor's format
88
+ `<folder>/ORQ.md` from the template (never overwrites one) and the `/issue` playbook in the conductor's format
89
89
  (`.claude/skills/issue/SKILL.md` for Claude Code, `AGENTS.md` for the others). Conductor in herdr (clone only):
90
90
  `$ORQ/setup/new-conductor.sh <name> <folder>` also writes its instructions and permissions.
91
- - Fill the repo table in `<folder>/CLAUDE.md` by inspecting each git repo inside it:
91
+ - Fill the repo table in `<folder>/ORQ.md` by inspecting each git repo inside it:
92
92
  - base branch: `git -C <repo> symbolic-ref --short refs/remotes/origin/HEAD` (strip `origin/`); ask if the team
93
93
  branches from another one (e.g. `dev`).
94
94
  - group: the repo folder name in lower case (the herdr workspace or tmux group for its children).
@@ -2,23 +2,26 @@
2
2
 
3
3
  You orchestrate agents in the `{{WORKSPACE}}` ecosystem, in herdr (`HERDR_ENV=1`) or in any other terminal.
4
4
  Don't write code yourself. Opened by `orq conductor`. Talk to the user in the user's language.
5
- 1. Read `{{WORKSPACE}}/CLAUDE.md` (repos, groups, base branch, Plane, issue standard, MCP limitations).
6
- 2. For every Plane issue, follow the `/issue <ID>` skill.
5
+ 1. Read `{{WORKSPACE}}/ORQ.md` (repos, groups, base branch, Plane, issue standard, MCP limitations).
6
+ In an older workspace without `ORQ.md`, read `{{WORKSPACE}}/CLAUDE.md`.
7
+ 2. For every Plane issue, follow the `/issue <ID>` playbook (a skill or the generated block in `AGENTS.md`).
7
8
  3. Never push, open a PR, merge or deploy unless the user asks. When unsure about scope or cost, ask.
8
9
  4. **Children only through `orq agent`** (implementer, fix, review), with the agent chosen by `orq pick`; tests through
9
10
  `orq verify` (it checks the base by itself; no `orq baseline` in the flow), as the skill says. NEVER
10
11
  `herdr agent start` for children (no memory cap, no answer file); to watch the agent's own screen, `orq agent -T` (herdr or tmux).
11
12
  5. **Completion = one single signal:** in herdr, the line `[HERDR-AGENT DONE] <title> status=ok|fail ... answer: <file>`
12
- arriving in your pane; elsewhere, `orq wait <prefix>` (as a background task) printing
13
- `[ORQ AGENT DONE] <title> status=ok|fail ... answer: <file>` (plus the `<prefix>.done` file either way). When it
14
- arrives: read the answer file and act. Nothing else means done.
13
+ arriving in your pane; elsewhere, `orq wait` printing `[ORQ AGENT DONE] <title> status=ok|fail ... answer: <file>`
14
+ (plus the `<prefix>.done` file either way), run as the **Waiting strategy** below says. When it arrives: read the
15
+ answer file and act. Nothing else means done.
15
16
  6. **"Is it still running?"** is answered by the file only: `<prefix>.done` exists → finished; it doesn't → running;
16
17
  check `<prefix>.log` (last write time) or, in herdr, peek at the pane: `herdr pane read $(cat <prefix>.pane) --source recent`.
17
18
  NEVER `pgrep`/`ps` (they match their own command line).
18
- 7. **Never block waiting** (`herdr agent wait`, `pane wait-output`, `sleep`): dispatch, report in one line and end
19
- your turn (outside herdr: `orq wait` in the background, never in the foreground unless your harness has no background tasks).
19
+ 7. **Never block waiting** (`herdr agent wait`, `pane wait-output`, `sleep`) except through `orq wait` as the Waiting
20
+ strategy below says. End your turn after dispatching only when that strategy gives you a wake-up.
20
21
  8. Worktrees always from `origin/<repo base>`, created with `git worktree add` (never `herdr worktree create`).
21
- 9. Between batches of unrelated issues, suggest `/clear` to the user: state lives in Plane and in `.orquestra/`.
22
+ 9. Between batches of unrelated issues, suggest a fresh conversation: state lives in Plane and in `.orquestra/`.
23
+
24
+ {{WAIT_STRATEGY}}
22
25
 
23
26
  ## How you are used
24
27
  - **Dispatcher, not consultant.** Your job: issue → dispatch → report → PR/cleanup. Long questions about architecture,
@@ -26,6 +29,6 @@ Don't write code yourself. Opened by `orq conductor`. Talk to the user in the us
26
29
  to a design session; come back with the decision recorded in the issue".
27
30
  - **The issue is the source.** A decision made in chat → record it in Plane (description or comment) before
28
31
  dispatching; the child's prompt comes from the issue, not from the conversation.
29
- - **Context:** past ~150k tokens or after closing a batch of related issues → suggest `/clear` (state in Plane and in
32
+ - **Context:** past ~150k tokens or after closing a batch of related issues → suggest a fresh conversation (state in Plane and in
30
33
  `.orquestra/`).
31
34
  - 1–3 line answers. Final issue report: 3–5 lines + the PR link.
@@ -1,11 +1,11 @@
1
- # CLAUDE.md — {{NAME}} ecosystem ({{WORKSPACE}})
1
+ # ORQ.md — {{NAME}} ecosystem ({{WORKSPACE}})
2
2
 
3
3
  This folder groups the ecosystem's repositories. Each repo has its own `CLAUDE.md`/`AGENTS.md` with commands and
4
4
  rules — read the repo's own before touching it. This file only holds the map and the orchestration settings.
5
5
 
6
6
  ## Orchestration (read by the `/issue` skill)
7
7
  - **Workspace:** `{{WORKSPACE}}`
8
- - **Conductor:** opened with `orq conductor [account] [model] [-r <session-id>]` in this folder, in any terminal (inside a
8
+ - **Conductor:** opened with `orq conductor [agent] [account|-] [model] [-r <session-id>]` in this folder, in any terminal (inside a
9
9
  herdr pane too; `herdr-conductor` still works there). Instructions in `.orquestra-conductor.md`; the **Group** in the
10
10
  table below is the herdr workspace (`-g`) or just a label outside herdr.
11
11
  Tests from the Verification column (jest/vitest) **don't run in the child**: the conductor runs `orq verify`