feat: add multi-agent-task-orchestrator rule#235
feat: add multi-agent-task-orchestrator rule#235milkomida77 wants to merge 2 commits intoPatrickJS:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a new Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Requester as Requester
participant Orchestrator as Orchestrator
participant Registry as TaskRegistry
participant Agent as SpecialistAgent
participant Verifier as Verifier/CI
Requester->>Orchestrator: Submit task request
Orchestrator->>Orchestrator: Build blueprint (agents/tools/order/success criteria)
Orchestrator->>Registry: Anti-dup check (similarity threshold)
alt Not duplicate
Orchestrator->>Agent: Delegate bounded task (message schema: metadata, scope, verify_cmd, deadline, context)
Agent->>Orchestrator: Claim progress / heartbeat
Orchestrator->>Agent: Reassign if heartbeat stale
Agent->>Verifier: Submit diffs/tests/results
Verifier->>Orchestrator: Quality gate verdict (diffs/tests/build/secrets/scope)
Orchestrator->>Requester: Decision message (decision,evidence,risk,owner,next check)
else Duplicate
Orchestrator->>Requester: Reject/merge with existing task (decision + evidence)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
rules/multi-agent-task-orchestrator/.cursorrules (2)
17-17: Define stale criteria and escalation exceptions explicitly.“Every 30 minutes” and “max 2 redispatches/24h” are good, but missing stale-state criteria and incident exceptions can stall urgent fixes.
Suggested policy clarification
-5. **Heartbeat**: Every 30 minutes, check for stale assignments and reassign if needed +5. **Heartbeat**: Every 30 minutes, mark stale if no progress/evidence for 30 minutes, then reassign or escalate with root cause -- Never re-dispatch same task more than 2 times per 24 hours without new evidence +- Never re-dispatch same task more than 2 times per 24 hours without new evidence (except Sev-1/security incidents; escalate immediately)Also applies to: 31-31
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@rules/multi-agent-task-orchestrator/.cursorrules` at line 17, Update the "Heartbeat" rule to explicitly define stale criteria and escalation exceptions: add precise conditions for "stale" (e.g., assignment unacknowledged > X minutes, no progress updates for Y minutes, or dependent tasks blocked), enumerate incident exception types that bypass automatic reassign/redispatch (e.g., security incidents, customer escalations, on-call overrides, maintenance windows), and clarify the redispatch policy (max 2 redispatches per 24h with cooldown and timestamp tracking). Make the same explicit changes to the other instance of the rule referenced at the second occurrence (line noted in review) so both "Heartbeat" entries and any fields named "stale", "redispatch", or "escalation" are updated consistently.
16-17: Quality gate is too rigid for non-code tasks.Requiring build + test output for every task will incorrectly fail docs/research/triage work. Make verification conditional by task type.
Suggested conditional gate wording
-4. **Quality gate**: Verify file diff, tests pass, no secrets exposed, builds, and stays in scope +4. **Quality gate**: Verify evidence by task type (code: diff + tests + build; docs: diff + link/check; ops: logs/status), no secrets exposed, and stays in scope -- Every "done" claim requires: file path + verification command + test result +- Every "done" claim requires: file path + verification command + task-appropriate proof (test result/log/status output)Also applies to: 32-33
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@rules/multi-agent-task-orchestrator/.cursorrules` around lines 16 - 17, Update the "Quality gate" rule text to be conditional on task type: change the rule that currently requires "Verify file diff, tests pass, no secrets exposed, builds, and stays in scope" to require build/test verification only for code-related tasks (e.g., when task.type == "code" or "pull_request"), and for non-code task types (docs, research, triage) require appropriate alternatives such as review sign-off, scope verification, and no secrets; update the wording in the existing "Quality gate" entries (the rule labeled "Quality gate" at the current block and the duplicate at lines referenced as 32-33) so it explicitly states the conditional requirements and examples for non-code tasks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@rules/multi-agent-task-orchestrator/.cursorrules`:
- Around line 21-27: The delegation template must include a stable task identity
and creation timestamp so registry similarity checks, heartbeat/stale detection,
and redispatch limits work; update the schema/template to require TASK_ID and
CREATED_AT/TIMESTAMP fields (in addition to existing SCOPE, VERIFICATION,
DEADLINE, CONTEXT and the "[ORCHESTRATOR -> agent-name]" header), and add
validation in the parser/ingestion path to reject or auto-generate a unique
TASK_ID and a created_at timestamp when missing; ensure downstream logic that
enforces dedupe/heartbeat/redispatch uses these fields (e.g., registry
similarity matcher, stale-detection/heartbeat handler, and redispatch limiter)
to identify tasks consistently.
---
Nitpick comments:
In `@rules/multi-agent-task-orchestrator/.cursorrules`:
- Line 17: Update the "Heartbeat" rule to explicitly define stale criteria and
escalation exceptions: add precise conditions for "stale" (e.g., assignment
unacknowledged > X minutes, no progress updates for Y minutes, or dependent
tasks blocked), enumerate incident exception types that bypass automatic
reassign/redispatch (e.g., security incidents, customer escalations, on-call
overrides, maintenance windows), and clarify the redispatch policy (max 2
redispatches per 24h with cooldown and timestamp tracking). Make the same
explicit changes to the other instance of the rule referenced at the second
occurrence (line noted in review) so both "Heartbeat" entries and any fields
named "stale", "redispatch", or "escalation" are updated consistently.
- Around line 16-17: Update the "Quality gate" rule text to be conditional on
task type: change the rule that currently requires "Verify file diff, tests
pass, no secrets exposed, builds, and stays in scope" to require build/test
verification only for code-related tasks (e.g., when task.type == "code" or
"pull_request"), and for non-code task types (docs, research, triage) require
appropriate alternatives such as review sign-off, scope verification, and no
secrets; update the wording in the existing "Quality gate" entries (the rule
labeled "Quality gate" at the current block and the duplicate at lines
referenced as 32-33) so it explicitly states the conditional requirements and
examples for non-code tasks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b211f935-a6fa-476d-9216-3131f93ffd44
📒 Files selected for processing (1)
rules/multi-agent-task-orchestrator/.cursorrules
| ``` | ||
| [ORCHESTRATOR -> agent-name] TASK: description | ||
| SCOPE: files/directories allowed | ||
| VERIFICATION: command to prove completion | ||
| DEADLINE: timeframe | ||
| CONTEXT: relevant decisions from previous tasks | ||
| ``` |
There was a problem hiding this comment.
Missing task identity fields breaks dedupe/heartbeat enforcement.
The delegation schema has no required TASK_ID/timestamp, so registry similarity checks, stale detection, and redispatch limits can’t be enforced reliably across agents.
Suggested schema hardening
[ORCHESTRATOR -> agent-name] TASK: description
+TASK_ID: unique-id
+PARENT_TASK_ID: optional-parent-id
+CREATED_AT: ISO-8601 timestamp (UTC)
SCOPE: files/directories allowed
VERIFICATION: command to prove completion
DEADLINE: timeframe
CONTEXT: relevant decisions from previous tasks📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| [ORCHESTRATOR -> agent-name] TASK: description | |
| SCOPE: files/directories allowed | |
| VERIFICATION: command to prove completion | |
| DEADLINE: timeframe | |
| CONTEXT: relevant decisions from previous tasks | |
| ``` |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@rules/multi-agent-task-orchestrator/.cursorrules` around lines 21 - 27, The
delegation template must include a stable task identity and creation timestamp
so registry similarity checks, heartbeat/stale detection, and redispatch limits
work; update the schema/template to require TASK_ID and CREATED_AT/TIMESTAMP
fields (in addition to existing SCOPE, VERIFICATION, DEADLINE, CONTEXT and the
"[ORCHESTRATOR -> agent-name]" header), and add validation in the
parser/ingestion path to reject or auto-generate a unique TASK_ID and a
created_at timestamp when missing; ensure downstream logic that enforces
dedupe/heartbeat/redispatch uses these fields (e.g., registry similarity
matcher, stale-detection/heartbeat handler, and redispatch limiter) to identify
tasks consistently.
|
Thanks for the review! The The delegation schema now includes task identity fields for registry similarity checks, stale detection, and redispatch tracking. |
Summary
Adds a multi-agent-task-orchestrator cursor rule for coordinating multiple coding agents through a single orchestrator.
What it does
Structure
Production-tested across 10,000+ tasks with 57 specialized agents.
Source: guardian-agent-prompts
Summary by CodeRabbit