/** Stage order matches `chain_state.ts` CHAIN_STAGES (parity-tested). */
export const WORKFLOW_FSM = {
    initial: 'idle',
    states: [
        'idle',
        'scoping',
        'researched',
        'spec_authored',
        'tasks_loaded',
        'phases_in_flight',
        'phases_complete',
    ],
    transitions: [
        { from: 'idle', on: 'scope_start', to: 'scoping' },
        { from: 'scoping', on: 'research_done', to: 'researched' },
        // The loop-back chain_state cannot express: an unresolved guess sends the
        // workflow back to scoping/research (slice C drives this edge).
        { from: 'researched', on: 'guess_found', to: 'scoping' },
        { from: 'researched', on: 'spec_authored', to: 'spec_authored' },
        { from: 'spec_authored', on: 'tasks_loaded', to: 'tasks_loaded' },
        { from: 'tasks_loaded', on: 'phase_started', to: 'phases_in_flight' },
        { from: 'phases_in_flight', on: 'phases_done', to: 'phases_complete' },
    ],
};
//# sourceMappingURL=workflow_fsm.js.map