/** * The backend fan-out's unit dispatch, shared by both algorithm variants * (like the client loops in feature-loops.ts, parameterized by the * per-loop discipline each variant resolves and passes in). * * WHICH backend units a slice needs — and which of the four kinds each * one is — is an AI decision (BackendAgent.classifyBackendWork). * Everything in this file is what follows deterministically from that * answer: which prompt teaches the unit's shape, whether the unit * distills into the domain, whether it carries an event handler and * where that handler lives, and whether it gets an endpoint at all. */ import { type RunDeps } from "./shared.js"; import type { BackendWorkUnit, IterationBudgets, ScenarioSlice, VerticalSlice } from "./types.js"; /** * The backend's resolved discipline, one flag per disciplined backend * loop — resolved by the variant (resolveTestFirst over "use-case-unit" * and "event-handler-unit") so the two loops can differ. The domain-unit * loop has no flag: it is a verification loop, identical in both modes. */ export interface BackendDiscipline { useCaseUnit: boolean; eventHandlerUnit: boolean; } /** * Build ONE classified backend unit. The switch is the whole point: * every difference between the four kinds is expressed as structure * here, and only the leaf steps inside each branch are AI work. */ export declare function buildBackendWorkUnit(deps: RunDeps, budgets: IterationBudgets, slice: ScenarioSlice, template: VerticalSlice, unit: BackendWorkUnit, discipline: BackendDiscipline): Promise;