Skip to content

feat(gastown): convoy-aware escalation handling in triage #953

@jrf0110

Description

@jrf0110

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:

  1. 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.

  2. 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").

  3. Reorder or re-prioritize convoy beads — Adjust the DAG to prioritize the fix over other pending work.

  4. 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

  • Triage agent can insert a new bead into a convoy with correct dependency edges
  • Triage agent can update the description of a pending bead in the convoy
  • Convoy progress tracking correctly accounts for dynamically added beads
  • The convoy timeline UI shows inserted/modified beads with appropriate visual indicators

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Post-launchenhancementNew feature or requestgt:coreReconciler, state machine, bead lifecycle, convoy flowkilo-auto-fixAuto-generated label by Kilokilo-triagedAuto-generated label by Kilo

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions