Skip to content

fix(coordinator): add routing enforcement refusal rule#890

Merged
tamirdresher merged 2 commits intodevfrom
squad/853-coordinator-routing-enforcement
Apr 12, 2026
Merged

fix(coordinator): add routing enforcement refusal rule#890
tamirdresher merged 2 commits intodevfrom
squad/853-coordinator-routing-enforcement

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented Apr 7, 2026

Closes #853

Problem

The coordinator sometimes does domain work itself instead of dispatching to team members. Some models interpret existing refusal rules loosely.

Fix

Added explicit refusal rule:

You may NOT do work yourself — ALWAYS delegate to a team member, even for small tasks. The only exception is Direct Mode (answering factual questions already in context).

Also confirmed the Init Mode 3-state check (zero roster entries) was already present in all copies — no change needed.

Files Changed

  • .github/agents/squad.agent.md — added 4th refusal rule (canonical)
  • templates/squad.agent.md.template — synced
  • packages/squad-cli/templates/squad.agent.md.template — synced
  • packages/squad-sdk/templates/squad.agent.md.template — synced
  • .squad-templates/squad.agent.md — synced (5th tracked copy)
  • .squad/agents/procedures/history.md — session learnings

Working as Procedures (Prompt Engineer)

@diberry diberry added the bug Something isn't working label Apr 7, 2026
Copilot AI review requested due to automatic review settings April 7, 2026 02:29
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

🟠 Impact Analysis — PR #890

Risk tier: 🟠 HIGH

📊 Summary

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

🎯 Risk Factors

  • 5 files changed (≤5 → LOW)
  • 5 modules touched (5-8 → HIGH)

📦 Modules Affected

ci-workflows (1 file)
  • .github/agents/squad.agent.md
root (1 file)
  • templates/squad.agent.md.template
squad-cli (1 file)
  • packages/squad-cli/templates/squad.agent.md.template
squad-sdk (1 file)
  • packages/squad-sdk/templates/squad.agent.md.template
templates (1 file)
  • .squad-templates/squad.agent.md

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an explicit refusal rule to strengthen coordinator routing enforcement so the coordinator delegates work to team members rather than performing domain work inline.

Changes:

  • Added a 4th refusal rule requiring delegation (except Direct Mode factual answers already in context).
  • Synced the updated coordinator prompt across all tracked template copies.
  • Recorded the change and rationale in Procedures history.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.github/agents/squad.agent.md Adds the new refusal rule to the canonical coordinator agent prompt.
templates/squad.agent.md.template Syncs the refusal rule into the root template copy.
packages/squad-cli/templates/squad.agent.md.template Syncs the refusal rule into the CLI-distributed template copy.
packages/squad-sdk/templates/squad.agent.md.template Syncs the refusal rule into the SDK-distributed template copy.
.squad-templates/squad.agent.md Syncs the refusal rule into the .squad-templates tracked copy.
.squad/agents/procedures/history.md Documents the routing-enforcement hardening and lists updated files.

Comment thread .github/agents/squad.agent.md Outdated
Comment thread templates/squad.agent.md.template Outdated
Comment thread .squad-templates/squad.agent.md Outdated
Comment thread packages/squad-cli/templates/squad.agent.md.template Outdated
Comment thread packages/squad-sdk/templates/squad.agent.md.template Outdated
Comment thread .squad/agents/procedures/history.md Outdated
Comment thread .squad/agents/procedures/history.md Outdated
@diberry diberry force-pushed the squad/853-coordinator-routing-enforcement branch from 23889f3 to 1fdeac2 Compare April 8, 2026 14:25
@diberry diberry added the skip-changelog Skip changelog enforcement for this PR label Apr 8, 2026
@diberry diberry force-pushed the squad/853-coordinator-routing-enforcement branch from 1fdeac2 to d2d3066 Compare April 8, 2026 15:54
@diberry diberry force-pushed the squad/853-coordinator-routing-enforcement branch from d2d3066 to 745c705 Compare April 8, 2026 16:42
@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Apr 8, 2026

🔍 Squad Review — Kaylee (Engineering)

# Check Status Notes
1 Changelog entry skip-changelog label present
2 Squashed to 1 commit 1 commit
3 CI green All checks pass (test, policy-gates, exports-map, samples-build, export-smoke-test, etc.)
4 Copilot comments resolved 7 threads — all resolved (formatting fixes acknowledged, .squad/ leak removed)
5 No .squad/ files Clean — .squad/agents/procedures/history.md was removed from commit
6 No unrelated files All 5 files are coordinator prompt synced across template locations
7 Tests for changes Markdown prompt-only change — no testable code
8 Not a duplicate/reversal Unique scope (closes #853)

Verdict: ✅ Ready to merge


Review by Squad AI team (Kaylee — Engineering) · requested by Dina Berry

@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Apr 10, 2026

✅ CI validation passed on fork: diberry#144 — 7/7 checks green

@tamirdresher tamirdresher merged commit 2dabcea into dev Apr 12, 2026
@tamirdresher tamirdresher deleted the squad/853-coordinator-routing-enforcement branch April 12, 2026 10:34
tamirdresher pushed a commit that referenced this pull request Apr 21, 2026
Co-authored-by: Dina Berry <diberry@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working skip-changelog Skip changelog enforcement for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Coordinator is doing work instead of routing work

3 participants