You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an opt-in writable mode to /team: CLI/native agents make REAL file
changes in isolated git worktrees, merged into one local integration branch.
The read-only default is unchanged and now explicit — it never creates a
branch; the orchestrator applies edits to the current branch directly.
- backends.mjs: invoke() threads opts.cwd (run the CLI in the subtask's
worktree) and opts.writable (use the backend's writable_extra/full-auto
instead of the read-only `extra`); runChild + runPty both honor cwd.
invocationExtra() warns loudly if writable is requested but a backend has
no writable_extra (never silently runs read-only).
- roster.json + config.mjs: per-backend `writable_extra` (codex
--dangerously-bypass-approvals-and-sandbox; agy keeps its flags, differing
only by the worktree cwd), passed through config normalization.
- run.mjs: --cwd / --writable flags (also readable from the call file; the
explicit flag wins). Inert when absent — default/read-only runs unchanged.
- workflows/team.mjs: WRITABLE mode. Deterministic slug + git-ref/path-safe
safeLabel (no .., no .lock, no leading/trailing ./-). Setup stage creates
the integration branch + a per-subtask worktree + a DEDICATED integration
worktree, all off HEAD and idempotent (resume-safe via show-ref||branch).
Dispatch passes --cwd --writable. Integrate stage merges each subtask
branch INSIDE the integration worktree (never the user's checkout),
--no-ff, aborts + reports conflicts (keeps conflicted worktrees), removes
only clean/empty ones. User's branch is untouched; no gh PR. Returns
mode + writable.{integration_branch, integration}.
- commands/team.md + CLAUDE.md: document both modes + the read-only
no-branch rule; pass writable through the Workflow args.
- Tests: 99/99 offline (was 93) — end-to-end cwd-write isolation + writable
vs read-only flag selection (real subprocess), --cwd/--writable (incl
--cwd=VALUE) parsing, writable-mode workflow markers, and a safeLabel
git-ref edge-case test. Docs/badge -> 99.
Codex-verified: codex reviewed the diff (FAIL), I fixed every real finding
(dedicated integration worktree so the user's tree is never touched; loud
writable-without-config warning; safeLabel ref-safety; idempotent setup;
keep conflicted worktrees; string-form writable), disproved one false
positive (--cwd=VALUE parsing), and a focused re-review returned PASS.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
"description": "Delegates token-heavy, self-contained tasks to local CLI backends chosen by task size and type, with credit-exhaustion fallback through the backend chain to native Claude and a glanceable statusline HUD. Routing and shipped backend behavior are configured in config/roster.json; adding a new backend kind requires invoker and health support in code. /team runs a decompose → dispatch → verify → fix → synthesize pipeline; an optional config-gated UserPromptSubmit hook can proactively nudge delegation.",
Copy file name to clipboardExpand all lines: commands/team.md
+29-5Lines changed: 29 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
description: Run a task through the multi-model team pipeline — decompose into backend-assigned subtasks (commodity → parallel agy/Gemini, judgment/hard-line → native Claude), dispatch dependency-aware, verify each result, fix failures in a bounded loop, then synthesize. Optional caps like "5:gemini,2:claude".
3
-
argument-hint: "[N:gemini,M:claude] <task>"
2
+
description: Run a task through the multi-model team pipeline — decompose into backend-assigned subtasks (commodity → parallel agy/Gemini, judgment/hard-line → native Claude), dispatch dependency-aware, verify each result, fix failures in a bounded loop, then synthesize. Optional caps like "5:gemini,2:claude". Add --writable to give each agent its own git worktree and merge into an integration branch.
"_writable_note": "Flags used INSTEAD of `extra` in /team --writable mode (full-auto: agy may write files + run commands in its worktree cwd). agy's --dangerously-skip-permissions already lets it act; the writable lane only differs by running in the worktree cwd. Same flags here = no sandbox swap needed for agy, just cwd.",
"_writable_note": "Flags used INSTEAD of `extra` in /team --writable mode. Full-auto: `--dangerously-bypass-approvals-and-sandbox` lets codex write files, run commands, and use the network — confined to the worktree cwd the orchestrator passes via --cwd. Drop --skip-git-repo-check since a worktree IS a git repo.",
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "multi-model-team",
3
-
"version": "0.7.5",
3
+
"version": "0.8.0",
4
4
"type": "module",
5
5
"private": true,
6
6
"description": "Delegates token-heavy, self-contained tasks to local CLI backends (agy/Gemini, codex) chosen by task size and type, with credit-exhaustion fallback to native Claude and a statusline HUD. Node ESM, zero-build, cross-platform (Windows/Linux/macOS).",
0 commit comments