Skip to content

Orchestration commands: /handoff, /advisor and /committee in the composer - #454

Merged
currentbits merged 12 commits into
mainfrom
coder/orchestration-skills-handoff-advisor-com-21afa0
Aug 18, 2026
Merged

currentbits merged 12 commits into
mainfrom
coder/orchestration-skills-handoff-advisor-com-21afa0

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Closes #338.

Packages Solenta's multi-provider machinery as three named, invocable patterns instead of manual thread choreography. Each is a composition of what already exists — fork hand-off, orchWorker notices, crew peer_send — behind a one-word entry point.

Command Workers Shape
/handoff [@provider] <task> 1 plan here, implement on a fresh model
/advisor [@provider] <question> 1 one read-only second opinion, reported back
/committee [@a] [@b] <problem> 2 contrasting models converge adversarially

What changed

  • electron/orchcommands.js (new, pure): first-token parsing, provider defaults, the self-contained worker prompts and the lead's dispatch note.
  • electron/runner.js: dispatchOrchCommand forks one worker per command and starts each with its role prompt, intercepted in startRun beside the existing pendingFork hop.
  • src/components/Composer.tsx: a / menu listing the three commands, filtered by prefix, Enter/Tab to insert. Sibling of the existing @-mention popup and reuses its list, row and keyboard rules.
  • docs/ARCHITECTURE.md, src/shared/ipc.ts: the contract and the reasoning behind it.

Why it is built this way

Intercepted in the runner, not the renderer. The composer menu inserts text and nothing more, so the commands also work from an agent, a notice or the CLI path. A cheap /-prefix test keeps the provider probe off the ordinary send path, and fromNotice turns are never parsed — a worker quoting the command back would otherwise fan out again.

Defaults contrast on purpose. Without @provider arguments the workers are drawn from the installed set excluding the caller's own provider. Same-model agents are low-variance and make the same bad call systemically; collapsing the default to one model would throw away the only structural antidote we have.

Only /handoff takes a worktree. A worker worktree branches from the default branch, and a second opinion on the default branch is not a second opinion on the work in progress — so /advisor and /committee run in the project checkout and are pointed at the caller's checkout in their prompt. They are read-only by contract, not by sandbox.

Committee convergence runs between the members, not through the lead. Each member is given its peers' thread ids and argues via peer_send, capped at three rounds and by CREW_AUTO_TURN_CAP. The lead is woken by the ordinary worker-finished notices with the result. No new state on the lead thread, and nothing to clear.

A worker that fails to start is dropped as an orphan; peers already running are kept, and the lead's event message names what never went out. Only an empty fan-out throws.

Tests

  • electron/test/orchcommands.test.js — 13 unit tests over the parsing and prompt rules.
  • electron/test/orch-commands.test.js — 5 seam tests: the real parser driving the real runner into the real store, covering the two-worker peer wiring, the worktree split, and both fall-through cases.
  • test/composerCommands.test.tsx — 6 menu tests.

Renderer 938/938 and tsc --noEmit clean. Electron 1193 with one failure in memory-sup (waitFor timed out) that passes in isolation, is load-sensitive, and is untouched by this branch.

Built with two Grok workers in parallel off a committed contract stub — the pattern this feature is about. The composer commit keeps the worker's feature without its prettier pass over the untouched model picker, since this repo does not enforce prettier.

  • PR created by the Claude Code agent

Willem and others added 11 commits August 18, 2026 09:25
… Transactional message delivery + turn watchdog against zombi
… Context visibility: accurate per-thread context breakdown ('
Signatures only: parseOrchCommand / workerPrompt / dispatchNote. Split so
the pure module, the runner wiring and the composer menu land in parallel
without drifting apart.

Co-Authored-By: Claude Opus 5 <[email protected]>
…into coder/fork-orchestration-skills-handoff-adviso-c91f48
…into coder/fork-orchestration-skills-handoff-adviso-a711f2
startRun intercepts /handoff, /advisor and /committee and fans them out to
workers; the ordinary worker-finished notices carry the results back. Only
/handoff takes a worktree — a worker worktree branches from the default
branch, so an advisor in one would review the wrong tree.

Co-Authored-By: Claude Opus 5 <[email protected]>
Fill the #338 contract: first-token parse, contrast-then-current provider
defaults, self-contained worker prompts, and [orchestration] dispatch notes.

Co-Authored-By: Claude Opus 5 <[email protected]>
…into coder/orchestration-skills-handoff-advisor-com-21afa0
Discoverability-only popup: typing / at the start of the composer lists
the three orchestration commands, filtered by prefix. Enter/Tab insert
the selected command plus a trailing space; the prompt is sent unchanged
on the ordinary path. Reuses the @-mention popup's list/row classes and
keyboard rules.

Co-Authored-By: Claude Opus 5 <[email protected]>
…into coder/orchestration-skills-handoff-advisor-com-21afa0
Typing / at the start of the draft lists the three commands, filtered by
prefix; Enter or Tab inserts one. Discoverability only — the prompt is sent
unchanged and the runner does the work.

Keeps the feature from the worker branch without its prettier pass over the
untouched model picker (this repo does not enforce prettier), and drops two
defensive bits it did not need: an unused caret argument, and a freeze ref
on accept — the inserted trailing space already ends the token.

Co-Authored-By: Claude Opus 5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit 216d8bb into main Aug 18, 2026
1 check passed
@currentbits
currentbits deleted the coder/orchestration-skills-handoff-advisor-com-21afa0 branch October 3, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Orchestration skills: handoff, advisor, committee as one-commands

1 participant