herdr-orchestra 6.6.0 → 6.7.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/CHANGELOG.md +13 -0
- package/README.md +6 -5
- package/VERSION +1 -1
- package/agents.default.toml +5 -1
- package/bin/__pycache__/orchcpython-314.pyc +0 -0
- package/bin/orch +42 -18
- package/package.json +1 -1
- package/playbooks/subagent.md +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes. Versions follow [semantic versioning](https://semver.org).
|
|
4
4
|
|
|
5
|
+
## [6.7.0] - 2026-11-22
|
|
6
|
+
|
|
7
|
+
The coder and reviewer agents now follow Claude Code's subagent guide (code.claude.com/docs/en/sub-agents): each agent does one job, has only the tools that job needs, and has a description that names exactly when to use it.
|
|
8
|
+
|
|
9
|
+
Example: your reviewer pane is Claude Code. `orch team up` now starts it as `claude --permission-mode acceptEdits --disallowedTools Edit,NotebookEdit --model opus`, so it can read the change and write its review file, but it cannot "just fix" the code itself and slip an unreviewed change into the milestone. In Pi subagent mode, asking Pi "fix this typo" in a normal chat no longer starts orch's `coder`: its description now says it is only for orch runs.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **Read-only Claude reviewer.** New optional registry key `review_launch`: the command for the reviewer pane. Claude Code's turns off `Edit` and `NotebookEdit` (it keeps `Write` for its review file). `orch team up` uses it for the reviewer, the "start it yourself" hints after a restart show it, `orch agents launch <kind> --role reviewer` prints it, and `orch doctor` checks its flags too. A kind without it starts its reviewer like a coder, as before. If your own `agents.toml` sets `launch` for a kind but no `review_launch`, your `launch` is used for the reviewer too.
|
|
13
|
+
- **Pi subagents: `max_turns`.** `"max_turns": 80` under `subagent.coder` or `subagent.reviewer` in `~/.config/herdr-orchestra/config.json` stops a looping subagent after that many turns. The subagent playbook tells the lead to resume a coder that stopped early once, then ask you. Not set: no limit, as before.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- **Pi subagent descriptions** say they are only for herdr-orchestra runs, so Pi does not pick `coder` or `reviewer` for other work. The Pi reviewer also lists `disallowed_tools: edit, write`, so an extension's edit tool cannot reach it either. Run `orch setup --mode subagent` (or `/orch-mode subagent` in Pi) to refresh the two agent files.
|
|
17
|
+
|
|
5
18
|
## [6.6.0] - 2026-11-22
|
|
6
19
|
|
|
7
20
|
Three upgrades that make plans and reviews follow your project, and show you where the risk is. Each one stays out of the way when you don't use it: a repo without the new files, and a plan without the new lines, run exactly as before.
|
package/README.md
CHANGED
|
@@ -128,9 +128,9 @@ Version choice, first match wins: `--version` flag › `ORCH_VERSION` env › `.
|
|
|
128
128
|
| Lead | any agent, e.g. `claude` or `opencode` | `lead` (the playbook does it) |
|
|
129
129
|
| Coder (medium work) | `claude --permission-mode acceptEdits --model sonnet` | `claude-1` |
|
|
130
130
|
| Coder (small work) | `claude --permission-mode acceptEdits --model haiku` | `claude-2` |
|
|
131
|
-
| Reviewer (optional) | `claude --model opus`, `agy --mode accept-edits` or a spare agent | `reviewer` |
|
|
131
|
+
| Reviewer (optional) | `claude --permission-mode acceptEdits --disallowedTools Edit,NotebookEdit --model opus`, `agy --mode accept-edits` or a spare agent | `reviewer` |
|
|
132
132
|
|
|
133
|
-
`orch agents launch <kind> --model <id>` prints the command with the model; `orch models` lists the models and their tiers. Use whatever your installed agents already reach.
|
|
133
|
+
`orch agents launch <kind> --model <id>` prints the command with the model (`--role reviewer` gives the reviewer's command: for Claude Code its edit tools are off, it only reads the change and writes its review file); `orch models` lists the models and their tiers. Use whatever your installed agents already reach.
|
|
134
134
|
|
|
135
135
|
**Only one tool installed, or just one window open?** Open only the lead and start the plan playbook. The lead sees it is alone and builds the team from its own tool: `orch team codex` picks coders and a reviewer of that tool on the models the catalog allows, spread over its tiers, and the lead writes them into the plan. When you say go, `orch team up` opens their panes next to the lead, each in its own folder and on its model, and names them. You never type either command yourself (you can: `orch team codex --coders 1`, `orch team up --dry-run`). Each pane is a separate session of the same tool, on your existing login.
|
|
136
136
|
|
|
@@ -208,6 +208,7 @@ The skills and slash commands are thin wrappers: the playbooks themselves live i
|
|
|
208
208
|
```toml
|
|
209
209
|
[claude]
|
|
210
210
|
launch = "claude --permission-mode acceptEdits"
|
|
211
|
+
review_launch = "claude --permission-mode acceptEdits --disallowedTools Edit,NotebookEdit" # the reviewer pane
|
|
211
212
|
model_flag = "--model" # what `orch agents launch claude --model <id>` appends
|
|
212
213
|
|
|
213
214
|
[myagent] # a new kind
|
|
@@ -218,7 +219,7 @@ roles = ["coder"]
|
|
|
218
219
|
skills_dirs = ["~/.myagent/skills"]
|
|
219
220
|
```
|
|
220
221
|
|
|
221
|
-
`orch doctor [kind]` checks an installed agent against the real tool (version, whether the launch flags still exist in its `--help`, skills, herdr detection). `orch agents launch <kind>` prints the command · `orch team <kind>` / `orch team up` build and open a whole team from one tool · `orch agents sync` installs the skills for every installed agent (run it after adding a new one) · `orch agents check` confirms every installed agent sees each skill exactly once (not missing, not twice). Many tools read more than one folder (Codex reads `~/.agents/skills` and `~/.codex/skills` and lists a skill found in both twice), so the installer writes the fewest folders that give each installed agent one copy, e.g. with Claude, Codex and OpenCode: `~/.claude/skills` (Claude) and `~/.agents/skills` (Codex; OpenCode reads both, and its docs say one copy wins). Claude Code gets the skill only (a skill is already the `/orch-plan` command); OpenCode gets slash commands in `~/.config/opencode/commands`.
|
|
222
|
+
`orch doctor [kind]` checks an installed agent against the real tool (version, whether the launch flags still exist in its `--help`, skills, herdr detection; the `review_launch` flags too). `orch agents launch <kind>` prints the command · If you set your own `launch` for a kind and no `review_launch`, your `launch` is used for the reviewer too · `orch team <kind>` / `orch team up` build and open a whole team from one tool · `orch agents sync` installs the skills for every installed agent (run it after adding a new one) · `orch agents check` confirms every installed agent sees each skill exactly once (not missing, not twice). Many tools read more than one folder (Codex reads `~/.agents/skills` and `~/.codex/skills` and lists a skill found in both twice), so the installer writes the fewest folders that give each installed agent one copy, e.g. with Claude, Codex and OpenCode: `~/.claude/skills` (Claude) and `~/.agents/skills` (Codex; OpenCode reads both, and its docs say one copy wins). Claude Code gets the skill only (a skill is already the `/orch-plan` command); OpenCode gets slash commands in `~/.config/opencode/commands`.
|
|
222
223
|
|
|
223
224
|
### Agents herdr can't watch
|
|
224
225
|
For a kind with `herdr_detect = false` (or one missing from the registry, which `orch sync` warns about), `orch` relies only on the **done file and the time budget**: it never reports GONE, BLOCKED or IDLE for it, treats it as free whenever it has no task, and `orch status` marks it `detect:off`. If herdr doesn't recognise the pane as an agent at all, address it by pane id: `Workers: hermes-1 (hermes @pane:w1:p3)`. `orch` then types prompts into that pane, and `orch start` reports a `STALE pane` when the id has changed (`herdr pane list` shows the current ids).
|
|
@@ -273,13 +274,13 @@ Switch with `/orch-mode subagent` in Pi; `/orch-mode` alone shows the mode, and
|
|
|
273
274
|
orch setup --mode subagent # or: npx herdr-orchestra@latest --mode subagent, or orch team up --mode subagent
|
|
274
275
|
```
|
|
275
276
|
|
|
276
|
-
Setup writes `~/.pi/agent/agents/coder.md` and `reviewer.md` (the reviewer cannot edit files) and installs `npm:@tintinweb/pi-subagents`. Pick their models in the config file; with none, they use the lead's model. A model the policy denies is refused, and a file you edited yourself (without orch's line in it) is left alone.
|
|
277
|
+
Setup writes `~/.pi/agent/agents/coder.md` and `reviewer.md` (the reviewer cannot edit files) and installs `npm:@tintinweb/pi-subagents`. Pick their models in the config file; with none, they use the lead's model. `max_turns` (optional) stops a subagent that loops after that many turns; the lead then resumes it once or asks you. A model the policy denies is refused, and a file you edited yourself (without orch's line in it) is left alone. Both agents' descriptions say they are only for orch runs, so a normal Pi chat does not hand its own work to them.
|
|
277
278
|
|
|
278
279
|
```json
|
|
279
280
|
{
|
|
280
281
|
"mode": "subagent",
|
|
281
282
|
"subagent": {
|
|
282
|
-
"coder": { "model": "anthropic/claude-sonnet-4-5", "thinking": "medium" },
|
|
283
|
+
"coder": { "model": "anthropic/claude-sonnet-4-5", "thinking": "medium", "max_turns": 80 },
|
|
283
284
|
"reviewer": { "model": "openai/gpt-5", "thinking": "high" }
|
|
284
285
|
}
|
|
285
286
|
}
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.7.0
|
package/agents.default.toml
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
#
|
|
4
4
|
# binary executable that must be on PATH for the kind to count as installed
|
|
5
5
|
# launch command to start it in a herdr pane, with its auto-approve-edits option
|
|
6
|
+
# review_launch optional: the command for the REVIEWER pane, with the tool's code-editing tools turned off (the
|
|
7
|
+
# reviewer only reads the change and writes its review file). `orch team up` uses it for the reviewer;
|
|
8
|
+
# `orch agents launch <kind> --role reviewer` prints it. Left out: the reviewer starts like a coder
|
|
6
9
|
# model_flag the launch option that picks the model (`orch agents launch <kind> --model <id>`); leave it
|
|
7
10
|
# out when the tool has none or it is unverified, and choose the model inside the tool
|
|
8
11
|
# herdr_detect herdr can tell idle / working / blocked for it (false: orch relies on the done file only)
|
|
@@ -32,6 +35,7 @@
|
|
|
32
35
|
[claude]
|
|
33
36
|
binary = "claude"
|
|
34
37
|
launch = "claude --permission-mode acceptEdits"
|
|
38
|
+
review_launch = "claude --permission-mode acceptEdits --disallowedTools Edit,NotebookEdit"
|
|
35
39
|
model_flag = "--model"
|
|
36
40
|
herdr_detect = true
|
|
37
41
|
interrupt_keys = ["esc"]
|
|
@@ -41,7 +45,7 @@ skills_one_wins = true
|
|
|
41
45
|
old_dirs = ["~/.claude/commands"]
|
|
42
46
|
invoke = "/orch-plan <feature>"
|
|
43
47
|
verified = true
|
|
44
|
-
notes = "Claude Code 2.1: --permission-mode acceptEdits in --help; ~/.claude/skills present; herdr kind 'claude'. A skill is also a slash command (/orch-plan) and its docs say a skill beats a ~/.claude/commands file of the same name, so no commands copy is installed."
|
|
48
|
+
notes = "Claude Code 2.1: --permission-mode acceptEdits in --help; ~/.claude/skills present; herdr kind 'claude'. A skill is also a slash command (/orch-plan) and its docs say a skill beats a ~/.claude/commands file of the same name, so no commands copy is installed. review_launch: --disallowedTools is in --help (2.1); the reviewer keeps Write for its review file."
|
|
45
49
|
|
|
46
50
|
[codex]
|
|
47
51
|
binary = "codex"
|
|
Binary file
|
package/bin/orch
CHANGED
|
@@ -734,6 +734,8 @@ def registry(required=True):
|
|
|
734
734
|
if uf.exists():
|
|
735
735
|
for kind, vals in tomllib.loads(uf.read_text()).items():
|
|
736
736
|
if isinstance(vals, dict):
|
|
737
|
+
if "launch" in vals and "review_launch" not in vals:
|
|
738
|
+
reg.get(kind, {}).pop("review_launch", None) # your own launch command wins for the reviewer too
|
|
737
739
|
reg.setdefault(kind, {}).update(vals)
|
|
738
740
|
except tomllib.TOMLDecodeError as e:
|
|
739
741
|
die(f"agent registry: {e}")
|
|
@@ -6132,10 +6134,11 @@ def cmd_report(args):
|
|
|
6132
6134
|
print(f" rule broken {n}x: {r}")
|
|
6133
6135
|
|
|
6134
6136
|
|
|
6135
|
-
def launch_cmd(kind, v, model=None, strict=True):
|
|
6137
|
+
def launch_cmd(kind, v, model=None, strict=True, role=None):
|
|
6136
6138
|
"""The shell command that starts agent `kind` in a pane, on `model` when given. With strict=False a kind
|
|
6137
|
-
without a model_flag starts on its default model instead of failing (the caller says so).""
|
|
6138
|
-
|
|
6139
|
+
without a model_flag starts on its default model instead of failing (the caller says so). role="reviewer"
|
|
6140
|
+
uses the kind's `review_launch` when it has one: the same tool with its code-editing tools turned off."""
|
|
6141
|
+
cmd = (v.get("review_launch") if role == "reviewer" else None) or v.get("launch") or v.get("binary", kind)
|
|
6139
6142
|
if model:
|
|
6140
6143
|
cat = models_catalog()
|
|
6141
6144
|
why = model_denied(cat, model)
|
|
@@ -6302,7 +6305,7 @@ def team_up(args):
|
|
|
6302
6305
|
print(f"SKIP {name}: kind {kind!r} is not in the agent registry — start it yourself in {d}")
|
|
6303
6306
|
failed += 1
|
|
6304
6307
|
continue
|
|
6305
|
-
cmd = launch_cmd(kind, v, model, strict=False)
|
|
6308
|
+
cmd = launch_cmd(kind, v, model, strict=False, role="reviewer" if name == st.get("reviewer") else None)
|
|
6306
6309
|
split = [HERDR, "pane", "split"] + ([last] if last else []) + \
|
|
6307
6310
|
["--direction", "down" if last else "right", "--cwd", d, "--no-focus"]
|
|
6308
6311
|
if dry:
|
|
@@ -6474,7 +6477,9 @@ def rename_lost(st, hints=True, keep_out=()):
|
|
|
6474
6477
|
continue
|
|
6475
6478
|
still[n] = pick if own else None
|
|
6476
6479
|
v = reg.get(w.get("kind"))
|
|
6477
|
-
cmd = launch_cmd(w.get("kind"), v, w.get("model"), strict=False
|
|
6480
|
+
cmd = (launch_cmd(w.get("kind"), v, w.get("model"), strict=False,
|
|
6481
|
+
role="reviewer" if n == st.get("reviewer") else None)
|
|
6482
|
+
if v else (w.get("kind") or "<its agent>"))
|
|
6478
6483
|
say(f"LOST {n}: pane {pick} is in its folder ({short(d)}), but herdr sees no agent running in it. "
|
|
6479
6484
|
+ (f"`orch team up` starts it there; or start it yourself (`{cmd}`)" if own else
|
|
6480
6485
|
f"Start it there (`{cmd}`)") + f", then: herdr agent rename {pick} {n}")
|
|
@@ -6613,7 +6618,8 @@ USAGE = """usage: orch <command> [args]
|
|
|
6613
6618
|
setup [--mode panes|subagent] get this machine ready for a mode; subagent: write ~/.pi/agent/agents/coder.md and
|
|
6614
6619
|
reviewer.md from ~/.config/herdr-orchestra/config.json and install pi-subagents
|
|
6615
6620
|
agents the agent registry: kinds, installed?, roles, herdr detection, launch commands
|
|
6616
|
-
agents launch <kind> [--model <id>] print the command that starts <kind> in a pane
|
|
6621
|
+
agents launch <kind> [--model <id>] [--role reviewer] print the command that starts <kind> in a pane
|
|
6622
|
+
(auto-approve edits; --role reviewer: its read-only reviewer command when it has one)
|
|
6617
6623
|
models the model catalog: tiers (small / medium / high), ratings, and what policy forbids
|
|
6618
6624
|
models show|check <id> one model's ratings and evidence / is it allowed?
|
|
6619
6625
|
resume after a restart (computer off, herdr closed): name the agents' panes again, save unsaved
|
|
@@ -7203,15 +7209,22 @@ def cmd_agents(args):
|
|
|
7203
7209
|
installed = {k: bool(shutil.which(v.get("binary", k))) for k, v in reg.items()}
|
|
7204
7210
|
if sub == "launch":
|
|
7205
7211
|
rest = args[1:]
|
|
7206
|
-
model = None
|
|
7212
|
+
model, role = None, None
|
|
7213
|
+
use = "usage: orch agents launch <kind> [--model <id>] [--role coder|reviewer]"
|
|
7207
7214
|
if "--model" in rest:
|
|
7208
7215
|
i = rest.index("--model")
|
|
7209
|
-
model = rest[i + 1] if len(rest) > i + 1 else die(
|
|
7216
|
+
model = rest[i + 1] if len(rest) > i + 1 else die(use)
|
|
7210
7217
|
del rest[i:i + 2]
|
|
7211
|
-
|
|
7218
|
+
if "--role" in rest:
|
|
7219
|
+
i = rest.index("--role")
|
|
7220
|
+
role = rest[i + 1] if len(rest) > i + 1 else die(use)
|
|
7221
|
+
if role not in ("coder", "reviewer", "lead"):
|
|
7222
|
+
die(f"--role must be coder, reviewer or lead, got {role!r} — {use}")
|
|
7223
|
+
del rest[i:i + 2]
|
|
7224
|
+
kind = rest[0] if rest else die(use)
|
|
7212
7225
|
v = reg.get(kind) or die(f"unknown agent kind {kind!r} — known: {', '.join(reg)} "
|
|
7213
7226
|
f"(add it in {user_agents_file()})")
|
|
7214
|
-
print(launch_cmd(kind, v, model))
|
|
7227
|
+
print(launch_cmd(kind, v, model, role=role))
|
|
7215
7228
|
return
|
|
7216
7229
|
if sub == "dirs": # the folders `orch agents sync` writes: <skills|commands>\t<dir>[\t<commands_from>]
|
|
7217
7230
|
sdirs, _, cdirs, _ = sync_plan(reg, installed)
|
|
@@ -7279,11 +7292,13 @@ def doctor_kind(kind, v, full=True):
|
|
|
7279
7292
|
out.append((True, f"version: {first}" if code == 0 and first else f"version: unknown (`{vcmd}` failed)"))
|
|
7280
7293
|
hcmd = v.get("help_cmd") or f"{binary} --help"
|
|
7281
7294
|
code, help_ = _probe(hcmd)
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7295
|
+
flags = []
|
|
7296
|
+
for key in ("launch", "review_launch"):
|
|
7297
|
+
try:
|
|
7298
|
+
launch = shlex.split(v.get(key) or binary)
|
|
7299
|
+
except ValueError:
|
|
7300
|
+
launch = [binary]
|
|
7301
|
+
flags += [f for f in (tok.split("=")[0] for tok in launch[1:] if tok.startswith("-")) if f not in flags]
|
|
7287
7302
|
for fl in flags:
|
|
7288
7303
|
if code is None:
|
|
7289
7304
|
out.append((False, f"launch flag {fl}: `{hcmd}` did not run ({help_.strip()[:80]})"))
|
|
@@ -7784,15 +7799,23 @@ Then one line per acceptance criterion: `AC<n>: met|not met - <evidence>`.
|
|
|
7784
7799
|
def pi_agent_text(role, conf):
|
|
7785
7800
|
"""coder.md / reviewer.md for pi-subagents: front matter from the config, then the role's instructions."""
|
|
7786
7801
|
model, thinking = (conf or {}).get("model"), (conf or {}).get("thinking")
|
|
7787
|
-
|
|
7788
|
-
|
|
7802
|
+
turns = (conf or {}).get("max_turns")
|
|
7803
|
+
# One description per agent that names who starts it, so a normal Pi chat never hands its own work to them
|
|
7804
|
+
# (Claude Code's subagent docs: write descriptions that single out one subagent).
|
|
7805
|
+
desc = ("Only for a herdr-orchestra run: the orch lead starts it with one milestone's task file and it builds "
|
|
7806
|
+
"that milestone. Not for other coding work." if role == "coder" else
|
|
7807
|
+
"Only for a herdr-orchestra run: the orch lead starts it to review one milestone. Read-only, never edits "
|
|
7808
|
+
"files. Not for other reviews.")
|
|
7789
7809
|
fm = [f"name: {role}", f"description: {desc}"]
|
|
7790
7810
|
if role == "reviewer":
|
|
7791
7811
|
fm.append("tools: read, bash, grep, find, ls")
|
|
7812
|
+
fm.append("disallowed_tools: edit, write")
|
|
7792
7813
|
if model:
|
|
7793
7814
|
fm.append(f"model: {model}")
|
|
7794
7815
|
if thinking:
|
|
7795
7816
|
fm.append(f"thinking: {thinking}")
|
|
7817
|
+
if isinstance(turns, int) and not isinstance(turns, bool) and turns > 0:
|
|
7818
|
+
fm.append(f"max_turns: {turns}")
|
|
7796
7819
|
fm += ["prompt_mode: append", "skills: false", "run_in_background: false"]
|
|
7797
7820
|
body = PI_CODER_BODY if role == "coder" else PI_REVIEWER_BODY
|
|
7798
7821
|
return "---\n" + "\n".join(fm) + "\n---\n\n" + PI_AGENT_MARK + "\n\n" + body
|
|
@@ -7825,7 +7848,8 @@ def pi_setup():
|
|
|
7825
7848
|
p.parent.mkdir(parents=True, exist_ok=True)
|
|
7826
7849
|
p.write_text(text)
|
|
7827
7850
|
print(f"WROTE {short(p)} (model: {rc.get('model') or 'the same as the lead'}"
|
|
7828
|
-
+ (f", thinking: {rc['thinking']}" if rc.get("thinking") else "")
|
|
7851
|
+
+ (f", thinking: {rc['thinking']}" if rc.get("thinking") else "")
|
|
7852
|
+
+ (f", max_turns: {rc['max_turns']}" if f"max_turns: {rc.get('max_turns')}" in text else "") + ")")
|
|
7829
7853
|
pi = shutil.which(pi_bin())
|
|
7830
7854
|
if not pi:
|
|
7831
7855
|
print(f"NO PI `{pi_bin()}` is not on PATH. Install Pi (npm install -g @earendil-works/pi-coding-agent), "
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "herdr-orchestra",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.0",
|
|
4
4
|
"description": "Orchestrate AI coding agents (Claude Code, Codex, OpenCode, Amp, Pi) as one team: a lead plans, coders build, a reviewer checks, you get one PR. Runs in Herdr panes, or in one Pi window with subagents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
package/playbooks/subagent.md
CHANGED
|
@@ -21,6 +21,7 @@ There is no event manager and there are no herdr panes. You drive one milestone
|
|
|
21
21
|
## 2. One milestone
|
|
22
22
|
1. Run `orch sub next`. It prints `NEXT Mn: <title>`, `TASK <path to task.md>` and `REVIEW yes|no`. (`CURRENT Mn` means a milestone was started and not saved: carry on with it from step 2. `HELD`, `WAITING` or `ALL_DONE`: see below.)
|
|
23
23
|
2. **Coder.** Call the `Agent` tool: `subagent_type: "coder"`, `description: "Mn <short title>"`, `run_in_background: false`, and a prompt like `Build milestone Mn. Read the task file <TASK path> and follow it. The check command is: <check command>. There is no result file or done file in this run: put your report in your reply.`
|
|
24
|
+
- If the coder's reply says it stopped early (its turn limit, `max_turns` in the config), resume the same coder once with `Carry on with Mn from where you stopped.` If it stops early again, tell the developer what it reported and **STOP**.
|
|
24
25
|
- If the coder replies `QUESTION: ...`: answer it from the plan or the code (say where the answer comes from), or ask the developer with 2–3 options and **STOP**. Write the answer under that milestone's "Notes from user" in `.orchestrate/plan.md`, then send it to the same coder with the `Agent` tool's `resume` (its agent id), so it carries on from its work.
|
|
25
26
|
3. **Check.** Run `orch check Mn`. On `CHECK FAIL`, resume the same coder with the failing output (the last lines `orch check` printed) and ask it to fix the cause. Run `orch check Mn` again. At most 3 fix rounds; after that, run `orch set Mn failed "<what keeps failing>"`, explain it to the developer in two lines, and **STOP**.
|
|
26
27
|
4. **Review** (only when `REVIEW yes`). Call the `Agent` tool: `subagent_type: "reviewer"`, `run_in_background: false`, prompt `Review milestone Mn. Task file: <TASK path>. Look at the change with git diff HEAD and git status --short.` Each `BLOCKER:` line goes back to the same coder (resume it with those lines only), then `orch check Mn` again, then one more review. At most 2 review rounds; blockers still left after that: `orch set Mn failed "<the blockers>"`, tell the developer, **STOP**. `SUGGESTION:` lines do not block: keep them for the summary.
|