Skip to content

Commit b5dbd55

Browse files
bradygasterclaude
andauthored
docs(adr-003): gains, risks and scope for the host-neutral coordinator (#2486)
* docs(adr-003): analysis of gains, risks and scope for the canonical coordinator Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(adr-003): state the evidence precisely and link it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(adr-003): record the team direction and link #2487, #2488 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent f229547 commit b5dbd55

1 file changed

Lines changed: 94 additions & 0 deletions

File tree

‎docs/specification/adr-003-host-neutral-canonical-coordinator.md‎

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,100 @@ under `.squad-templates/` in the workspace.
9393
3. If B: is the Copilot file still written for workspaces where Copilot is not
9494
in `clients[]`?
9595

96+
## Analysis (2026-11-12)
97+
98+
Input for the decision, not the decision itself.
99+
100+
### Evidence: the pointer is not followed
101+
102+
The "Why it matters now" concern is that a non-Copilot coordinator may read
103+
80 KB of Copilot-shaped text on demand. Local Claude Code transcripts for Squad
104+
test repositories (2026-11-10 to 2026-11-12, Claude Code 2.1.317–2.1.318) were
105+
checked for any Read, Bash, Grep or Glob call on
106+
`.github/agents/squad.agent.md`. None of the 43 sessions (223 tool calls)
107+
touched it. Most of those sessions are short probes. Seven did real team
108+
work: the end-to-end test and a fresh `squad init --client claude` repository
109+
cast and built through `claude -p --agent squad`. Those seven made 177 tool
110+
calls, 32 member spawns and 96 `squad_state` or `.squad/` accesses. In both
111+
repositories the 82–83 KB Copilot file was present and the digest pointed at
112+
it. The coordinators worked from their digest, skills and `squad_state`.
113+
114+
This is a strong signal, not proof: seven sessions, one model family, one
115+
Claude Code version, and a longer session (a ceremony, Ralph mode) could still
116+
follow the pointer. The method, a table and the script are on
117+
[#2469](https://github.com/github/squad/issues/2469#issuecomment-6831645352).
118+
Still, the cost that option B removes is mostly theoretical today.
119+
120+
### What B gains
121+
122+
- One host-neutral source with every host as a projection of it. This matches
123+
how the other six hosts already work and how harness-adapters §4–§5
124+
describes projection.
125+
- No host's digest names a Copilot path as its authority.
126+
- If the neutral file lives under `.squad/`, `squad_state_read` can serve it,
127+
and it follows `teamRoot` in remote mode.
128+
- Not writing `.github/agents/squad.agent.md` for repositories without Copilot
129+
(open question 3, and #2458) is sometimes counted as a gain of B. It does
130+
not depend on moving the canonical file, and can be decided on its own.
131+
132+
### What B risks
133+
134+
- **Copilot users carry the risk.** The workspace file is not a plain template
135+
copy. It carries a version stamp; `squad cast` writes the team-capabilities
136+
block into it (#1608), which outer coordinators read; and `squad upgrade`
137+
backs up local customizations to `.local-backup` (#1052), so users do edit
138+
it. A generated Copilot file must reproduce all of this and stay
139+
byte-identical (the Copilot snapshot in
140+
`test/host-projection-regression-guards.test.ts`).
141+
- **Customizations.** Edits to a generated file are overwritten on the next
142+
refresh. Users with a customized file need a migration path and a clear
143+
message.
144+
- **Placement.** In a monorepo, `squad init` writes the Copilot file at the git
145+
root while `.squad/` can sit in a subfolder, and remote mode moves the team
146+
root. A neutral file and the Copilot file it generates are not always
147+
side by side.
148+
- **Churn.** It is a projection-version change for all seven hosts, so every
149+
repository gets a diff on its next `squad upgrade`. Rollback must stay
150+
byte-preserving (§13), and the upgrade matrix needs re-recording on Linux and
151+
Windows.
152+
- **Drift.** Users who keep editing the generated Copilot file create a second
153+
copy that diverges from the neutral source.
154+
155+
### Scope
156+
157+
- **Option B:** about 2–3 days. The canonical path appears in about 20 source
158+
files (init, upgrade, cast, team capabilities, the legacy fallback, help text
159+
and the adapter contract) and 44 test files. The work: the neutral file and a
160+
generator that keeps Copilot output byte-identical (stamp and capabilities
161+
block included); the upgrade migration and rollback, with customized files;
162+
monorepo and remote placement; a projection version bump for every host; a
163+
regenerated Claude plugin and a re-recorded upgrade matrix; spec and docs.
164+
- **Option C:** about half a day. Rewrite the "Authoritative specification"
165+
paragraph in `coreCoordinatorProtocol` (`coordinator.ts`) so each digest is
166+
self-sufficient (Claude already serves on-demand sections as skills), update
167+
the digest parity tests, and regenerate. No migration, and no change to
168+
Copilot output.
169+
- **Not writing the Copilot file without Copilot** (separate from both):
170+
small, but a behavior change that needs its own decision.
171+
172+
### Recommendation
173+
174+
Choose C now and defer B. C removes the dependency on a Copilot path at almost
175+
no risk. B is worth revisiting if a single source starts to matter: for
176+
example, if Copilot's file needs host-specific content, or remote teams need
177+
the coordinator served through `squad_state`. Neither choice gates a release.
178+
179+
### Team direction (2026-11-12)
180+
181+
Maintainer discussion favored C for 2.0 and B only as a bounded, opt-in
182+
experiment ([summary](https://github.com/github/squad/issues/2469)). It also
183+
noted that the session evidence shows which files were read, not that the
184+
coordinator behaves correctly, so C must be shown with behavioral scenarios run
185+
with the Copilot file absent. C is tracked in
186+
[#2487](https://github.com/github/squad/issues/2487) and the B spike in
187+
[#2488](https://github.com/github/squad/issues/2488). This records the
188+
discussion; it does not accept this ADR.
189+
96190
## Decision
97191

98192
Not yet made. Implementation, if approved, is a separate PR with its own

0 commit comments

Comments
 (0)