Parent Issue
Part of #204 (Phase 4)
Summary
When an escalation occurs within a convoy, the triage system should be able to intelligently modify the convoy DAG to address the issue rather than just restarting or closing beads.
Context
As of #904, escalations store convoy_id and source_bead_id in their metadata, associating them with the convoy they originated from. Currently, triage resolution actions are limited to RESTART, CLOSE_BEAD, REASSIGN_BEAD, NUDGE, and ESCALATE_TO_MAYOR — none of which modify the convoy structure.
Proposed Capabilities
The triage agent should be able to:
-
Insert a fix bead into the convoy DAG — Add a new bead that addresses the escalation, positioned to block downstream work that depends on the fix. For example, if a merge conflict escalation comes from the refinery, the triage agent could insert a "resolve merge conflicts" bead that blocks the landing merge.
-
Update the description of a future bead — Modify an existing pending bead's title/body to include instructions for addressing the escalation. This is useful when the fix naturally fits into upcoming work (e.g., "also fix the test that broke in bead X").
-
Reorder or re-prioritize convoy beads — Adjust the DAG to prioritize the fix over other pending work.
-
Split a failed bead — Break a failed bead into smaller, more targeted beads that are easier for agents to handle.
Implementation Notes
- New triage actions:
INSERT_BEAD, UPDATE_BEAD, REORDER_CONVOY
- The triage system prompt would need convoy DAG context (current state, dependencies, pending beads)
- Need convoy mutation APIs that maintain DAG consistency (no cycles, proper dependency tracking)
- The mayor could also use these capabilities when handling escalated-to-mayor situations
Acceptance Criteria
Parent Issue
Part of #204 (Phase 4)
Summary
When an escalation occurs within a convoy, the triage system should be able to intelligently modify the convoy DAG to address the issue rather than just restarting or closing beads.
Context
As of #904, escalations store
convoy_idandsource_bead_idin their metadata, associating them with the convoy they originated from. Currently, triage resolution actions are limited to RESTART, CLOSE_BEAD, REASSIGN_BEAD, NUDGE, and ESCALATE_TO_MAYOR — none of which modify the convoy structure.Proposed Capabilities
The triage agent should be able to:
Insert a fix bead into the convoy DAG — Add a new bead that addresses the escalation, positioned to block downstream work that depends on the fix. For example, if a merge conflict escalation comes from the refinery, the triage agent could insert a "resolve merge conflicts" bead that blocks the landing merge.
Update the description of a future bead — Modify an existing pending bead's title/body to include instructions for addressing the escalation. This is useful when the fix naturally fits into upcoming work (e.g., "also fix the test that broke in bead X").
Reorder or re-prioritize convoy beads — Adjust the DAG to prioritize the fix over other pending work.
Split a failed bead — Break a failed bead into smaller, more targeted beads that are easier for agents to handle.
Implementation Notes
INSERT_BEAD,UPDATE_BEAD,REORDER_CONVOYAcceptance Criteria