Skip to content

Propose: compressed Squad coordinator prompt (~49% smaller, behavior-preserving) [DRAFT] - #1529

Draft
tamirdresher wants to merge 1 commit into
devfrom
proposal/compressed-coordinator-v2
Draft

Propose: compressed Squad coordinator prompt (~49% smaller, behavior-preserving) [DRAFT]#1529
tamirdresher wants to merge 1 commit into
devfrom
proposal/compressed-coordinator-v2

Conversation

@tamirdresher

Copy link
Copy Markdown
Collaborator

DRAFT / DO-NOT-MERGE. This is a proposal — a compressed source-template
candidate for .github/agents/squad.agent.md, offered for review and side-by-side
trial. Adopting it changes no live coordinator behavior on its own. Merge is gated on
governance review (Picard/Data) and the maintainer's call.

What this is

A behavior-preserving compression of the Squad coordinator source template.
The coordinator prompt is always-on (injected into every Squad session), so its size
is paid on every turn. This PR proposes cutting it ~in half without dropping any
coordinator behavior.

Base & provenance (pinned)

value
Base dev @ eaf3ccac
Base file .github/agents/squad.agent.md79,966 B, sha256 1F69CEB0…
Proposed file 40,305 B, sha256 E10036FA…
Reduction −49.6% bytes, 1080 → 302 lines (~−46% input tokens/call by tiktoken)
Frontmatter tools: ["*"] + version: 0.0.0-sourcebyte-identical to dev

Behavior preservation

Compression is prose-only. Every high-risk coordinator path is kept intact
(grep-verified present in the proposed file):

  • Routing table + Response-Mode selection
  • State-backend handshake HALT semantics
  • Reviewer strict-lockout protocol
  • Init Mode Phase-1 ask_user confirmation gate
  • cross-squad dispatch (product vs. English disambiguation)
  • STOP/dispatch gate ("never do domain work inline")
  • Coordinator canary marker

The two dev-only sections added since the compression base —
Per-Agent Context Tier and the Shared-worktree guard — are carried forward,
compressed in the same dense style as the sibling Per-Agent Reasoning Effort
paragraph (every resolution layer, config key, ack string, and safety semantic
preserved).

How it was verified

  1. The compression was produced from an independently Q-approved shortening of the
    installed coordinator (a frozen SHA), which preserved the high-risk paths
    byte-for-byte.
  2. This PR's file = that approved compression + exactly the 5 edits that make it
    match dev's base (tools, version ×2, the two dev-only blocks). Diff vs. the
    approved artifact shows those edits and nothing else.
  3. All 7 high-risk anchors + the canary confirmed present; frontmatter byte-identical
    to dev.

Honest scope of the claim

  • Deterministic: −49.6% bytes / −46% input tokens per call (hardware-independent).
  • Mechanism (local, Q_mech): on a local model with cache defeated, the smaller
    prompt prefilled ~2.25× faster cold / ~1.6× faster warm; input-token saving
    holds in every case. This is the mechanism by which prompt size can affect a session.
  • NOT claimed: any real Copilot-CLI end-to-end performance result (Q_host).
    That remains blocked/unproven pending a trustworthy host-telemetry path
    (see Runtime identity beacon for coordinator canary cases 3 & 4 (host-owned pre-ingestion state machine) #1518). No real-session speed/quality claim is made here.

How to review

  1. Verify the pinned SHAs above; diff the single file.
  2. Run the coordinator behavior-equivalence suite over the high-risk paths
    (routing, state-backend HALT, reviewer lockout, init confirmation, cross-squad
    dispatch). Treat any semantic mismatch as a failed retention claim.
  3. If dev has moved, rebase — the delta set vs. dev is small and mechanical
    (frontmatter + the two carried-forward blocks).

Related: #1518 (host telemetry), #1517.

Governance

Pending Picard/Data governance review and maintainer authorization before any
adoption. Filed as draft deliberately.

Provenance: proposed file sha256 E10036FA…; base dev@eaf3ccac file sha256 1F69CEB0….

…preserving) [DRAFT]

Regenerates .github/agents/squad.agent.md as a compressed source template built
on dev HEAD eaf3cca (base file sha 1F69CEB0). 79,966 -> 40,305 bytes (~49.6%
smaller); 1080 -> 302 lines. Frontmatter (tools, version 0.0.0-source) is
byte-identical to dev.

Behavior preservation: every high-risk coordinator path is kept intact --
routing table, state-backend HALT handshake, reviewer strict-lockout, Init Mode
Phase-1 ask_user confirmation gate, cross-squad dispatch, STOP/dispatch gate,
and the coordinator canary. The two dev-only sections added since the
compression base -- Per-Agent Context Tier and the Shared-worktree guard -- are
carried forward, compressed in the same dense style as the sibling Per-Agent
Reasoning Effort paragraph.

DRAFT / DO-NOT-MERGE: proposal pending governance review (Picard/Data) and
Tamir's authorization. Adopting this changes no live squad.agent.md on its own;
it is the source-template candidate offered for review and side-by-side trial.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 12f3c193-135b-46e4-bf2b-62d629146ccb
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

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

PR Scope: 🔧 Infrastructure

⚠️ 2 item(s) to address before review

Status Check Details
Single commit 1 commit — clean history
Not in draft PR is still in draft — mark as ready for review when done
Branch up to date Up to date with dev
Copilot review No Copilot review yet — it may still be processing
Changeset present No source files changed — changeset not required
Scope clean No .squad/ or docs/proposals/ files
No merge conflicts No merge conflicts
Copilot threads resolved No Copilot review threads
CI passing All checks passing

Files Changed (1 file, +175 −959)

File +/−
.github/agents/squad.agent.md +175 −959

Total: +175 −959


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

@github-actions

Copy link
Copy Markdown
Contributor

🟢 Impact Analysis — PR #1529

Risk tier: 🟢 LOW

📊 Summary

Metric Count
Files changed 1
Files added 0
Files modified 1
Files deleted 0
Modules touched 1

🎯 Risk Factors

  • 1 files changed (≤5 → LOW)
  • 1 module(s) touched (≤1 → LOW)

📦 Modules Affected

ci-workflows (1 file)
  • .github/agents/squad.agent.md

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

@bradygaster

Copy link
Copy Markdown
Owner

#1517 has now merged into dev, establishing the new three-state/HEAD-canary baseline. Per the approved triage plan, this draft remains parked until it is rebased onto current dev and an independent reviewer re-verifies the high-risk coordinator behavior anchors against the compressed prompt. No promotion or merge until that governance pass is complete.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

👋 Friendly nudge — this PR has had no activity for 10 days.

What needs attention:

  • 📝 Still in draft — mark as "Ready for review" when you're done, or close if abandoned.
  • ⬇️ 86 commits behind dev. Rebase to pick up latest changes.

If this PR is abandoned, please close it. If it's blocked on something external, leave a comment so the team knows.
This is an automated check that runs on weekdays. It won't nudge the same PR more than once per week.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Friendly nudge — this PR has had no activity for 7 days.

What needs attention:

  • 📝 Still in draft — mark as "Ready for review" when you're done, or close if abandoned.
  • ⬇️ 192 commits behind dev. Rebase to pick up latest changes.

If this PR is abandoned, please close it. If it's blocked on something external, leave a comment so the team knows.
This is an automated check that runs on weekdays. It won't nudge the same PR more than once per week.

@bradygaster

Copy link
Copy Markdown
Owner

Triage note (PR sweep, 2026-08-23) — leaving this open as a proposal, but flagging drift so it doesn't rot silently.

Current state: 247 commits behind dev, and conflicting. The pinned base in the description is dev @ eaf3ccac with .github/agents/squad.agent.md at 79,966 B. That file on dev today is 82,480 B — roughly 2.5 KB of coordinator behavior has landed since this compression was derived, so the ~49% figure and the behavior-preservation argument are both measured against a source that no longer exists.

No action requested from you unless you want it. This is explicitly marked DO-NOT-MERGE and gated on governance review, so it isn't blocking the queue. But if the proposal is still live, it needs a re-derivation against current dev before the numbers mean anything — the delta is exactly the kind of always-on coordinator prose the compression targets.

@bradygaster this one needs a call: re-derive against current dev, or close it out. Everything else in the queue is resolved — 16 of 19 PRs merged today, #1750 in flight, #1719 waiting on its author to leave draft.

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.

3 participants