computeNext
computeNext(
state):DrainDecision
Defined in: src/drain-core.ts:176
Pure decision core. Given one repo’s state snapshot, returns the single
highest-priority next action. The harness applies it, re-reads state, and calls
again — so spawns fill up to maxAuto and the loop ends on a hold.
Priority: completing in-flight work (retire/hand-off) beats starting new work (spawn), and a ready PR is still retired even while a sibling agent is in trouble (trouble only halts NEW spawns).