Skip to content

feat(coordinator): self-sufficient non-Copilot coordinators (ADR-003 option C, part 1 of #2487) - #2489

Merged
bradygaster merged 3 commits into
devfrom
squad/2487-self-sufficient-digests
Nov 13, 2026
Merged

bradygaster merged 3 commits into
devfrom
squad/2487-self-sufficient-digests

Conversation

@bradygaster

Copy link
Copy Markdown
Collaborator

Part of #2487 (ADR-003 option C): the pointer change. The live behavioral scenarios are the next step and aren't in this PR, so this doesn't close the issue.

Change

Before, every non-Copilot coordinator (Claude Code, Kiro, OpenCode, Cursor, Codex and Antigravity) opened with:

  • ".github/agents/squad.agent.md … is the canonical coordinator specification"
  • "If it exists in this workspace, read it as the authoritative coordinator contract"

coreCoordinatorProtocol also read that file from the workspace to stamp its version and its list of headings into the digest. A customized Copilot file therefore changed every other host's coordinator.

Now the digest says it's the complete protocol, generated from the same shared source as every other host's. It says Copilot's file may exist in the workspace but must not be read for instructions, and that the team's own policy lives in .squad/. The text no longer depends on the workspace's Copilot file. resolveCanonicalCoordinatorSource stays exported for compatibility but the digest doesn't use it.

  • Copilot's output is unchanged; the Copilot snapshot guard passes.
  • Every digest stays under 24 KB (17.8–19.8 KB).
  • The Claude plugin's agents/squad.md is regenerated, with the pin unchanged.

Tests

  • New test/coordinator-self-sufficient.test.ts:
    • each of the six digests says it's complete, mentions Copilot's file only once (to say not to read it), has no "authoritative/canonical" wording, keeps every core heading and stays under 24 KB
    • the projected files are byte-identical whether Copilot's file is absent, stock or customized, and a custom rule in it never leaks through
    • the Claude coordinator keeps the inline Init Mode essentials
  • clients.test.ts:
  • Results: Claude, clients, coordinator, host-projection and feature-matrix tests pass, 370 tests. The two squad-20 bridge scenarios fail the same way on a clean dev on macOS. npm run lint is clean.

What this makes visible

The feature matrix's existing it.fails gaps are now real rather than theoretical. The digests don't cover:

  • Azure DevOps
  • GitLab
  • team-root resolution
  • marketplace browsing on cast

Before, the pointer to Copilot's 80 KB file covered them on paper, though no recorded session followed it. #2487's Azure DevOps scenario will test the first of these directly.

🤖 Generated with Claude Code

…n C, part of #2487)

The digest no longer names .github/agents/squad.agent.md as the
authoritative contract, no longer tells the model to read it, and no
longer derives its version or heading list from that file. Same bytes
whether Copilot's file is absent, stock or customized. Copilot output
is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI dynamic review requested due to automatic review settings November 13, 2026 02:30
@github-actions

Copy link
Copy Markdown
Contributor

🟡 Impact Analysis — PR #2489

Risk tier: 🟡 MEDIUM

📊 Summary

Metric Count
Files changed 7
Files added 2
Files modified 5
Files deleted 0
Modules touched 4

🎯 Risk Factors

  • 7 files changed (6-20 → MEDIUM)
  • 4 modules touched (2-4 → MEDIUM)

📦 Modules Affected

docs (1 file)
  • docs/src/content/docs/scenarios/client-compatibility.md
root (3 files)
  • .changeset/self-sufficient-digests.md
  • CHANGELOG.md
  • plugins/squad/agents/squad.md
squad-sdk (1 file)
  • packages/squad-sdk/src/client/adapters/coordinator.ts
tests (2 files)
  • test/clients.test.ts
  • test/coordinator-self-sufficient.test.ts

This report is generated automatically for every PR. See #733 for details.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 5609773

PR Scope: 📦🔧 Mixed (product + infrastructure)

⚠️ 3 item(s) to address before review

Status Check Details
❌ Single commit 3 commits — consider squashing before review
✅ Not in draft Ready for review
✅ Branch up to date Up to date with dev
❌ Copilot review No Copilot review yet — it may still be processing
✅ Changeset present Changeset file found
✅ Scope clean No .squad/ or docs/proposals/ files
✅ No merge conflicts No merge conflicts
✅ Copilot threads resolved All 1 Copilot thread(s) resolved
❌ CI passing 1 check(s) still running

Files Changed (7 files, +123 −18)

File +/−
.changeset/self-sufficient-digests.md +6 −0
CHANGELOG.md +1 −0
docs/src/content/docs/scenarios/client-compatibility.md +1 −1
packages/squad-sdk/src/client/adapters/coordinator.ts +19 −10
plugins/squad/agents/squad.md +2 −2
test/clients.test.ts +6 −5
test/coordinator-self-sufficient.test.ts +88 −0

Total: +123 −18


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Removing versionNote leaves non-Copilot digests without the Squad release stamp required for stale-bridge checks before state writes; the installed-distribution version and regression coverage are needed.

1 open issue
What changed in this PR

This PR implements the pointer-removal portion of #2487: non-Copilot coordinator digests no longer defer to or derive content from the workspace’s Copilot coordinator file. Live behavioral validation remains separate.

Changes:

  • Makes the shared digest independent of Copilot’s workspace file while preserving the exported resolver.
  • Adds regression checks for file independence, protocol wording, size limits, and Claude Init Mode instructions.
  • Regenerates the Claude plugin coordinator and updates documentation and release notes.
File Description
test/​coordinator-self-sufficient.test.ts Adds independence and digest-content regression checks.
test/​clients.test.ts Updates expectations for self-contained digests.
plugins/​squad/​agents/​squad.md Refreshes the generated Claude coordinator introduction.
packages/​squad-sdk/​src/​client/​adapters/​coordinator.ts Removes workspace Copilot-file dependency from digest generation.
docs/​src/​content/​docs/​scenarios/​client-compatibility.md Explains Claude’s independence from Copilot’s coordinator.
CHANGELOG.md Records the non-Copilot coordinator change.
.changeset/​self-sufficient-digests.md Adds SDK and CLI patch release notes.

Review effort: Balanced (dynamic)

@bradygaster

Copy link
Copy Markdown
Collaborator Author

Review: changes needed

Reviewed head a9af2df2864f976f5b1f7b283cb64422499f931c against dev base f229547fbcf4ca60c4524c5a69ef26d1924b7023.

P2: Removing the release stamp breaks the prescribed state-bridge version check

Location: packages/squad-sdk/src/client/adapters/coordinator.ts:103–108 (removal of versionNote); the health/version requirement remains at line 136.

The generated instructions still require squad_state_health to match “this coordinator's stamped Squad version” before state writes, but this change removes that release stamp from all six non-Copilot digests. The coordinator no longer has the expected release version needed to perform the prescribed stale-bridge comparison.

Reproduction: with a stock workspace stamped 2.0.0-preview.4, the exact base includes the release stamp for all six hosts; this PR omits it for all six while retaining the health-match requirement. This is a regression for previously stamped installations, not just the preexisting behavior when no Copilot workspace file exists.

Required correction: obtain the expected release version from the installed distribution, independently of Copilot's workspace file, and retain it in generated instructions. Add regression coverage across all six hosts. Suggested correction owner: plugin-platform-dev.

Other evidence and limits

SDK typechecking passed. The targeted coordinator suites recorded 214 passing tests and one failing test; that same MCP-config snapshot mismatch reproduces on the exact base, so it is not attributed to this PR. Combining this head with #2491 produced the same merge tree in either order, and regenerated plugin content matched the committed artifact.

Completed CI was green at review time. No new live-model sessions were run; the remaining behavioral acceptance scenarios in #2487 still need evidence. Recommendation: fix the release-stamp regression before merging.

Copilot review: dropping the version note taken from Copilot's file left
item 16's stale-bridge check without a version to compare. The digest now
stamps the SDK's own package version (lockstep with the CLI that serves the
bridge), so it still never depends on Copilot's file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bradygaster
bradygaster enabled auto-merge (squash) November 13, 2026 08:13
@bradygaster
bradygaster merged commit e1a9d2c into dev Nov 13, 2026
31 checks passed
bradygaster added a commit that referenced this pull request Nov 14, 2026
The maintainers agreed on option C: Copilot's coordinator file stays canonical,
and every other host's digest is self-sufficient (#2489). Option B stays an
opt-in spike (#2488).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants