feat(.claude): sync spec-orchestrator staleness prevention#91
feat(.claude): sync spec-orchestrator staleness prevention#91
Conversation
- Add team coordination tools to all agents - Update spec-orchestrator command with lifecycle fixes
Adds staleness prevention, anti-takeover rules, teammate heartbeat.
Benchmark ResultsNo benchmarks configured. Add benchmarks to benches/ directory. Full results available in CI artifacts. |
Code Coverage ReportOverall Coverage: 0% SummaryFull HTML report available in CI artifacts. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #91 +/- ##
=======================================
Coverage 95.83% 95.83%
=======================================
Files 9 9
Lines 6499 6499
=======================================
Hits 6228 6228
Misses 271 271 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR syncs staleness prevention improvements and anti-takeover safeguards for the spec-orchestrator command from the rust-template repository (commit 172fd98). The spec-orchestrator is a comprehensive command for orchestrating parallel agent teams to implement large specifications through discovery, task planning, and wave-based execution phases.
Changes:
- Adds comprehensive staleness prevention section (3.3.1) with just-in-time spawning, progress polling, and teammate heartbeat guidance
- Adds Rules 15-17 covering anti-takeover principles, complete prompts, and staleness prevention
- Adds escalation procedure for unresponsive teammates in Troubleshooting section
- Adds mid-task heartbeat to teammate prompt template for long-running tasks
- Updates agent tool lists (test-engineer, rust-developer, code-reviewer) to include team collaboration tools
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .claude/commands/spec-orchestrator.md | New 858-line orchestrator command with comprehensive guidance on distributed spec discovery, task planning, parallel execution with teammates, and staleness prevention mechanisms |
| .claude/agents/test-engineer.md | Adds team collaboration tools (LSP, SendMessage, TaskList, TaskGet, TaskUpdate) and reformats description to single line |
| .claude/agents/rust-developer.md | Adds team collaboration tools (SendMessage, TaskList, TaskGet, TaskUpdate) and reformats description to single line |
| .claude/agents/code-reviewer.md | Adds team collaboration tools (Write, Edit, LSP, SendMessage, TaskList, TaskGet, TaskCreate, TaskUpdate) and reformats description to single line |
| 15. **NEVER take over teammate work** — If teammates appear idle or "stale," you MUST NOT write code, run tests, or complete tasks yourself. The orchestrator's ONLY role is coordination. If you find yourself about to write implementation code, STOP — you are violating this rule. Follow the escalation procedure in Troubleshooting instead. | ||
| 16. **Every teammate prompt must be complete and self-contained** — When spawning multiple teammates, each `Task` call must contain the FULL prompt. Do NOT abbreviate prompts for teammates 2+ (e.g., "same as impl-1"). Each `Task` call is independent with no shared context. | ||
| 17. **Prevent staleness with just-in-time spawning** — Spawn teammates when their wave's tasks are unblocked, not all at once upfront. Reuse active teammates across waves via `SendMessage`. Shut down idle teammates between long waits and spawn fresh ones with full turn budgets for the next wave. Poll `TaskList` every 60-90 seconds during execution to detect stuck teammates early. |
There was a problem hiding this comment.
The PR description states "Adds anti-takeover Rules 15-16" but the actual changes add Rules 15, 16, AND 17. Rule 17 addresses staleness prevention with just-in-time spawning. The PR description should be updated to mention "Rules 15-17" for accuracy.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
Summary
Synced from rust-template commit 172fd98.