Goal
Move remaining issue sync/grooming/routing logic out of agent workspace scripts and into Dispatch issue reconciliation.
Current state
Saffron still runs local scripts that own a lot of queue hygiene:
project_backlog_sync.pyproject_groom.py
Those scripts currently:
- scan tracked GitHub repos for qualifying issues
- add issues to GitHub ProjectV2
- move project items between Triage / Backlog / Ready / In Progress / Done
- apply heuristic readiness checks
- call model-backed lane judgment
- reconcile labels like
needs-gpt / needs-escalation - detect merged PRs and close issues
- detect open PRs and move issues back to Ready or In Progress
That is too much logic in the agent harness.
Proposed Dispatch behavior
Dispatch should own issue reconciliation as app state:
- sync tracked repo issues into Dispatch DB
- decide whether an issue is actionable, backlog, in progress, done, or blocked
- maintain current execution lane (
normal, escalated, backlog, needs_human as applicable) - reconcile open PR state against linked issues
- detect merged PRs that close/fix issues
- expose queue-ready issues through
/api/agents/{agentName}/queue
Harness/model agnostic boundary
Dispatch should store routing/state, not choose a model or runtime.
Allowed concepts:
normalescalatedbacklogneeds_humanready, in_progress, done, blocked/equivalent issue state- agent assignment labels or records
Avoid:
gpt as a canonical lane- OpenClaw cron IDs
- Saffron-specific worker names
- direct mutation of OpenClaw files
Acceptance criteria
Notes
This should preserve Dispatch as a task coordination layer, not an execution harness. Agents still do repo checkout, edits, tests, commits, pushes, and PR creation.
Goal
Move remaining issue sync/grooming/routing logic out of agent workspace scripts and into Dispatch issue reconciliation.
Current state
Saffron still runs local scripts that own a lot of queue hygiene:
project_backlog_sync.pyproject_groom.pyThose scripts currently:
needs-gpt/needs-escalationThat is too much logic in the agent harness.
Proposed Dispatch behavior
Dispatch should own issue reconciliation as app state:
normal,escalated,backlog,needs_humanas applicable)/api/agents/{agentName}/queueHarness/model agnostic boundary
Dispatch should store routing/state, not choose a model or runtime.
Allowed concepts:
normalescalatedbacklogneeds_humanready,in_progress,done,blocked/equivalent issue stateAvoid:
gptas a canonical laneAcceptance criteria
Notes
This should preserve Dispatch as a task coordination layer, not an execution harness. Agents still do repo checkout, edits, tests, commits, pushes, and PR creation.