fix(agents): add announcement review/consumption protocol to supervisors
- automation-tracking-manager.md: strengthened close-ALL-then-create invariant - backlog-grooming-pool-supervisor.md: added READ_ANNOUNCEMENTS + REVIEW_OWN - pr-review-pool-supervisor.md: added READ_ANNOUNCEMENTS + REVIEW_OWN - agent-evolution-pool-supervisor.md: added READ_ANNOUNCEMENTS + REVIEW_OWN - shared/tracking_discovery_guide.md: added mandatory review + consumption protocols
This commit is contained in:
@@ -570,6 +570,32 @@ Supervisor: Agent Evolution | Agent: agent-evolver"
|
||||
# Update cycle for next iteration
|
||||
cycle=$cycle_number
|
||||
|
||||
# ── Step 8: Read announcements and review own ──────────────
|
||||
# Read critical announcements from watchdog
|
||||
announcements = task automation-tracking-manager "READ_ANNOUNCEMENTS" \
|
||||
--agent-prefixes "AUTO-WATCHDOG" \
|
||||
--min-priority "Critical" \
|
||||
--repo-owner "$owner" \
|
||||
--repo-name "$repo"
|
||||
for announcement in announcements:
|
||||
log(f"[TRIAGE] Critical watchdog announcement: {announcement.title}")
|
||||
|
||||
# Review own announcements every 3 cycles — close stale ones
|
||||
if cycle % 3 == 0:
|
||||
own_announcements = task automation-tracking-manager "REVIEW_OWN_ANNOUNCEMENTS" \
|
||||
--agent-prefix "AUTO-EVLV" \
|
||||
--repo-owner "$owner" \
|
||||
--repo-name "$repo"
|
||||
for announcement in own_announcements:
|
||||
# Close "PR Merged" announcements older than 1 day (no longer actionable)
|
||||
# Close "PR Rejected" announcements older than 1 day (already recorded in rejected_changes)
|
||||
if announcement_age_hours > 24:
|
||||
task automation-tracking-manager "CLOSE_ANNOUNCEMENT_ISSUE" \
|
||||
--agent-prefix "AUTO-EVLV" \
|
||||
--message announcement.title \
|
||||
--repo-owner "$owner" \
|
||||
--repo-name "$repo"
|
||||
|
||||
# Sleep before next cycle. MUST use Bash tool:
|
||||
bash("sleep 1800", timeout=2400000) # 30 min sleep, 40 min timeout
|
||||
```
|
||||
|
||||
@@ -107,12 +107,14 @@ You support these operations:
|
||||
### 1. CREATE_TRACKING_ISSUE
|
||||
|
||||
Creates a new tracking issue for the current cycle. This operation:
|
||||
- **CRITICAL**: First searches for and closes ALL previous status tracking issues with the same prefix
|
||||
- Determines the next cycle number by reading the last tracking issue
|
||||
- **CRITICAL**: First searches for and closes **ALL** open status tracking issues with the same prefix — not just the "previous" one, but every open issue whose title starts with `[{PREFIX}] Status:`. This catches orphaned status issues from previous sessions, crashed agents, or duplicate launches. The search MUST use `state: "open"` with no pagination limits.
|
||||
- **Only after ALL are closed**, determines the next cycle number by reading the last tracking issue (open or closed)
|
||||
- Creates a new issue with the proper title format: `[PREFIX] Status: <type> (Cycle N)`
|
||||
- Adds the "Automation Tracking" label
|
||||
- Adds the "Automation Tracking" label via forgejo-label-manager
|
||||
- Returns the issue number and cycle number
|
||||
|
||||
**Invariant**: At any point in time, each agent prefix has at most ONE open status issue.
|
||||
|
||||
**Required parameters:**
|
||||
- `agent_prefix`: The agent's prefix (e.g., "AUTO-WATCHDOG")
|
||||
- `tracking_type`: The type of tracking (e.g., "System Health Report")
|
||||
|
||||
@@ -604,7 +604,35 @@ Supervisor: Backlog Grooming | Agent: backlog-groomer"""
|
||||
# Update cycle for next iteration
|
||||
groom_cycle=$cycle_number
|
||||
|
||||
# ── Step 5: Sleep before next cycle ─────────────────────────
|
||||
# ── Step 5: Read announcements and review own ──────────────
|
||||
# Read critical/high announcements from watchdog, liaison, owner
|
||||
announcements = task automation-tracking-manager "READ_ANNOUNCEMENTS" \
|
||||
--agent-prefixes "AUTO-WATCHDOG,AUTO-LIAISON,AUTO-PROJ-OWN" \
|
||||
--min-priority "High" \
|
||||
--repo-owner "$owner" \
|
||||
--repo-name "$repo"
|
||||
|
||||
# Process critical announcements immediately (adjust grooming focus)
|
||||
for announcement in announcements:
|
||||
if announcement.priority == "Critical":
|
||||
# Adjust grooming priorities based on critical system events
|
||||
adjust_grooming_priorities(announcement)
|
||||
|
||||
# Review own announcements every 3 cycles
|
||||
if groom_cycle % 3 == 0:
|
||||
own_announcements = task automation-tracking-manager "REVIEW_OWN_ANNOUNCEMENTS" \
|
||||
--agent-prefix "AUTO-GROOMER" \
|
||||
--repo-owner "$owner" \
|
||||
--repo-name "$repo"
|
||||
for announcement in own_announcements:
|
||||
if is_condition_resolved(announcement):
|
||||
task automation-tracking-manager "CLOSE_ANNOUNCEMENT_ISSUE" \
|
||||
--agent-prefix "AUTO-GROOMER" \
|
||||
--message announcement.title \
|
||||
--repo-owner "$owner" \
|
||||
--repo-name "$repo"
|
||||
|
||||
# ── Step 6: Sleep before next cycle ─────────────────────────
|
||||
# NEVER exit/break. MUST use Bash tool:
|
||||
bash("sleep 300", timeout=480000) # 5 minutes, 8 min timeout
|
||||
# Loop back to Step 1 — always re-scan, never exit
|
||||
|
||||
@@ -464,6 +464,31 @@ LOOP FOREVER:
|
||||
if cycle % 10 == 0:
|
||||
post_health_signal()
|
||||
|
||||
# ── Step 6: Read critical watchdog announcements ──────────────
|
||||
announcements = task automation-tracking-manager "READ_ANNOUNCEMENTS" \
|
||||
--agent-prefixes "AUTO-WATCHDOG,AUTO-LIAISON" \
|
||||
--min-priority "Critical" \
|
||||
--repo-owner "$owner" \
|
||||
--repo-name "$repo"
|
||||
for announcement in announcements:
|
||||
if "CI" in announcement.title or "merge" in announcement.title.lower():
|
||||
# Pause dispatching reviews if CI is broken or merging is blocked
|
||||
log("[TRIAGE] Critical announcement affects review pipeline")
|
||||
|
||||
# Review own announcements every 3 cycles
|
||||
if cycle % 3 == 0:
|
||||
own_announcements = task automation-tracking-manager "REVIEW_OWN_ANNOUNCEMENTS" \
|
||||
--agent-prefix "AUTO-REV-POOL" \
|
||||
--repo-owner "$owner" \
|
||||
--repo-name "$repo"
|
||||
for announcement in own_announcements:
|
||||
if is_condition_resolved(announcement):
|
||||
task automation-tracking-manager "CLOSE_ANNOUNCEMENT_ISSUE" \
|
||||
--agent-prefix "AUTO-REV-POOL" \
|
||||
--message announcement.title \
|
||||
--repo-owner "$owner" \
|
||||
--repo-name "$repo"
|
||||
|
||||
# Sleep before next cycle
|
||||
bash("sleep 30", timeout=60000)
|
||||
|
||||
|
||||
@@ -2,6 +2,40 @@
|
||||
|
||||
This document explains how ALL CleverAgents should discover, interact with, and coordinate through the automation tracking issue system. Every agent should understand how to find what other agents are doing and how to communicate with them.
|
||||
|
||||
## MANDATORY: Announcement Review Protocol
|
||||
|
||||
**Every agent that creates announcement issues MUST also review its own announcements periodically.** At least once every 3 cycles, invoke:
|
||||
|
||||
```
|
||||
task automation-tracking-manager "REVIEW_OWN_ANNOUNCEMENTS" \
|
||||
--agent-prefix "{YOUR_PREFIX}" \
|
||||
--repo-owner "$owner" \
|
||||
--repo-name "$repo"
|
||||
```
|
||||
|
||||
For each returned announcement, evaluate whether the announced condition is still relevant, valid, and correct. Close any announcements that are no longer applicable via `CLOSE_ANNOUNCEMENT_ISSUE`. Failing to close stale announcements degrades signal quality for all consuming agents.
|
||||
|
||||
## MANDATORY: Announcement Consumption Protocol
|
||||
|
||||
**Every supervisor MUST read announcements from other agents at least once per cycle.** The read depth and source filtering depends on the agent's role:
|
||||
|
||||
- **System Watchdog / Product Builder**: Read ALL announcements at ALL priorities (full body + comments)
|
||||
- **Human Liaison**: Read ALL announcements at Priority/High+ (full body + comments)
|
||||
- **Implementation Pool / Backlog Grooming**: Read Watchdog + Liaison + Owner announcements at Priority/High+ (summary only)
|
||||
- **All other supervisors**: Read Watchdog announcements at Priority/Critical only (title + label only)
|
||||
|
||||
Use the `READ_ANNOUNCEMENTS` operation with the appropriate `min_priority` and `agent_prefixes` parameters:
|
||||
|
||||
```
|
||||
announcements = task automation-tracking-manager "READ_ANNOUNCEMENTS" \
|
||||
--agent-prefixes "AUTO-WATCHDOG" \
|
||||
--min-priority "Critical" \
|
||||
--repo-owner "$owner" \
|
||||
--repo-name "$repo"
|
||||
```
|
||||
|
||||
Process Critical announcements IMMEDIATELY. Process High announcements before starting the next work cycle. Process Medium/Low announcements opportunistically.
|
||||
|
||||
## CRITICAL: Universal Label Requirement
|
||||
|
||||
**ALL automation tracking issues MUST have the "Automation Tracking" label.** This is the universal discovery mechanism that allows agents to find each other's activities.
|
||||
|
||||
Reference in New Issue
Block a user