feat(coordinator): compaction recovery + restraint rules + result persistence (#682 #683 #684)#859
feat(coordinator): compaction recovery + restraint rules + result persistence (#682 #683 #684)#859
Conversation
🟠 Impact Analysis — PR #859Risk tier: 🟠 HIGH 📊 Summary
🎯 Risk Factors
📦 Modules Affectedci-workflows (1 file)
docs (2 files)
root (2 files)
squad-cli (2 files)
squad-sdk (1 file)
templates (1 file)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
|
| Status | Check | Details |
|---|---|---|
| ✅ | Single commit | 1 commit — clean history |
| ✅ | 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 merge conflicts | No merge conflicts |
| ❌ | Copilot threads resolved | 5 unresolved Copilot thread(s) — fix and resolve before merging |
| ❌ | CI passing | 14 check(s) still running |
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
Pull request overview
This PR batches coordinator prompt/template updates to improve post-agent reliability (persisting results + compaction recovery) and adds “restraint” guidance, while also updating squad watch/triage to warn on ignored positional arguments and documenting that behavior.
Changes:
- Add “Coordinator Restraint” rules + routing principle to reduce mid-flight intervention and narration.
- Update “After Agent Work” flow to persist
read_agentresults immediately and write.squad/session-state.mdfor compaction recovery. - Warn on positional args passed to
squad watch/triage, and document the behavior (docs + changelog + changeset).
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
.squad-templates/squad.agent.md |
Canonical coordinator prompt updates: restraint rules, result persistence, session-state recovery, and ownership table update |
.github/agents/squad.agent.md |
Synced coordinator agent prompt copy |
templates/squad.agent.md.template |
Synced template copy for distribution |
packages/squad-cli/templates/squad.agent.md.template |
Synced CLI package template copy |
packages/squad-sdk/templates/squad.agent.md.template |
Synced SDK package template copy |
.squad/routing.md |
Adds routing principle #8 (“Restraint after dispatch”) |
packages/squad-cli/src/cli-entry.ts |
Adds warning when positional args are provided to watch/triage |
docs/src/content/docs/reference/cli.md |
Clarifies extra args are ignored in triage/watch |
docs/src/content/docs/features/ralph.md |
Adds a caution block explaining watch is polling, not message routing |
CHANGELOG.md |
Documents the new watch/triage warning behavior |
.changeset/watch-message-warning.md |
Changeset for @bradygaster/squad-cli patch release |
27cc10d to
3f8b3ab
Compare
e89cbbc to
900b4ee
Compare
|
Content looks great @diberry — the compaction recovery, restraint rules, and result persistence fixes are all solid improvements. Originally my PRs (#682, #683, #684), well-batched here. However this PR has merge conflicts now (squad.agent.md has changed significantly since it was opened). Could you rebase onto the latest dev (or insider)? Once conflicts are resolved and CI is green, happy to approve and merge. Also noting: #800 (comment spam protection) needs a branch update before it can merge — the base branch has moved ahead. A quick rebase there too would unblock it. |
900b4ee to
36bc7d3
Compare
36bc7d3 to
f4c0c9a
Compare
|
🔍 Squad Review — Kaylee (Engineering)
Verdict: ❌ 1 blocker to fix — tests required for cli-entry.ts watch/triage warning Review by Squad AI team (Kaylee — Engineering) · requested by Dina Berry |
Closes #934 Adds three reference documentation pages: - coordinator-restraint.md: 6 restraint rules to prevent over-managing agents - result-persistence.md: mandatory archival of agent results to orchestration log - compaction-recovery.md: session state checkpoint mechanism for context recovery Addresses all requirements from issue #934 per PR #859. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closes #934 Adds three reference documentation pages: - coordinator-restraint.md: 6 restraint rules to prevent over-managing agents - result-persistence.md: mandatory archival of agent results to orchestration log - compaction-recovery.md: session state checkpoint mechanism for context recovery Addresses all requirements from issue #934 per PR #859. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closes #934 Adds three reference documentation pages: - coordinator-restraint.md: 6 restraint rules to prevent over-managing agents - result-persistence.md: mandatory archival of agent results to orchestration log - compaction-recovery.md: session state checkpoint mechanism for context recovery Addresses all requirements from issue #934 per PR #859. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Batches three related coordinator prompt improvements:
Also adds routing rule 8 (restraint after dispatch) and session-state.md to the file ownership table.
Original PRs: #682, #683, #684
Original author: @tamirdresher
Part of stale PR triage (diberry#137)