From 8a9627962ce593530ff23c4afbfc4d040f421dee Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Sat, 14 Mar 2026 19:08:08 -0500 Subject: [PATCH] docs: add write_agent integration guidance to squad.agent.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copilot CLI v1.0.5 introduced `write_agent` for multi-turn background agent conversations. This adds three integration points: 1. **Feature Degradation Table** — `write_agent` is CLI-only; VS Code surfaces must re-spawn instead of sending follow-ups. 2. **Reviewer Rejection Lockout** — explicit anti-pattern: `write_agent` does NOT bypass lockout. A rejected artifact's original author cannot receive revision instructions via `write_agent` — a different agent must be spawned. 3. **Scribe reuse pattern** — when Scribe is idle from a previous batch, use `write_agent` to send additional work instead of spawning a second Scribe instance (avoids duplicate merges and git commit races). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- templates/squad.agent.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/squad.agent.md b/templates/squad.agent.md index 66027b498..0bbc779c4 100644 --- a/templates/squad.agent.md +++ b/templates/squad.agent.md @@ -452,6 +452,7 @@ When in VS Code mode, the coordinator changes behavior in these ways: | Launch table UX | Show table → results later | Skip table → results with response | UX only — results are correct | | SQL tool | Available | Not available | Avoid SQL in cross-platform code paths | | Response order bug | Critical workaround | Possibly necessary (unverified) | Keep the block — harmless if unnecessary | +| Multi-turn agents (`write_agent`) | Send follow-ups to idle background agents | Not available | Re-spawn with full prompt instead of sending follow-up | #### SQL Tool Caveat @@ -741,6 +742,8 @@ prompt: | Never speak to user. ⚠️ End with plain text summary after all tool calls. ``` +**⚡ Scribe reuse via `write_agent` (CLI only):** If Scribe is already running from a previous batch (status: idle), use `write_agent` to send additional inbox items or log entries instead of spawning a second Scribe instance. This avoids duplicate merges and git commit races. Only works when `write_agent` is available (CLI mode) — on other surfaces, spawn a new Scribe as normal. + 5. **Immediately assess:** Does anything trigger follow-up work? Launch it NOW. 6. **Ralph check:** If Ralph is active (see Ralph — Work Monitor), after chaining any follow-up work, IMMEDIATELY run Ralph's work-check cycle (Step 1). Do NOT stop. Do NOT wait for user input. Ralph keeps the pipeline moving until the board is clear. @@ -909,6 +912,8 @@ When an artifact is **rejected** by a Reviewer: 6. **Lockout duration:** The lockout persists for that revision cycle. If the revision is also rejected, the same rule applies again — the revision author is now also locked out, and a third agent must revise. 7. **Deadlock handling:** If all eligible agents have been locked out of an artifact, the Coordinator MUST escalate to the user rather than re-admitting a locked-out author. +> ❌ **`write_agent` does not bypass lockout.** When `write_agent` is available (CLI mode), do NOT use it to send revision instructions to an idle agent that authored a rejected artifact. The lockout applies regardless of whether the agent is re-spawned or resumed via `write_agent`. A *different* agent must own the revision — always spawn a new agent for the fix. + --- ## Multi-Agent Artifact Format