import { type BlueprintVocabularyKind } from "./project-blueprint.ts"; export interface UnitTodoExpectation { kind: BlueprintVocabularyKind; names: string[]; } export interface UnitTodo { id: string; requirement: string; expects?: UnitTodoExpectation; } export interface UnitTodoList { todos: UnitTodo[]; } export interface TodoCoverage { /** Todo ids whose expected artifacts were all found in the candidate. */ addressed: string[]; /** Todo ids that promised artifacts the candidate does not contain. */ unaddressed: string[]; /** Todo ids with nothing statically checkable; disclosed, never gating. */ unverifiable: string[]; } /** A refinement may not shrink a file below this fraction of the previous pass. */ export declare const MIN_REFINEMENT_LENGTH_RATIO = 0.6; /** * Strictly validate a todo list. When `allowedNames` is supplied, an expectation * naming something outside the agreed vocabulary is dropped rather than * rejected: the requirement text is still useful, and a stray name must never * become a new instruction. */ export declare function parseUnitTodoList(output: string, allowedNames?: ReadonlySet): UnitTodoList; /** * Deterministically check which todos left a trace in the candidate. No model * request, no execution. Generous on purpose: a false "addressed" only skips a * refinement, while a false "unaddressed" would spend a request for nothing. */ export declare function todoCoverage(todos: readonly UnitTodo[], targetPath: string, code: string): TodoCoverage; /** Render unaddressed todos for a refinement request. */ export declare function unaddressedRequirements(todos: readonly UnitTodo[], coverage: TodoCoverage): string[]; /** Render a todo list into the block the coding prompt receives. */ export declare function renderTodoList(todos: readonly UnitTodo[]): string; export interface ContractRegression { /** Artifacts present in the previous pass and absent from the next one. */ lost: string[]; /** Next length divided by previous length. */ shrinkRatio: number; } /** Compare two passes over the same target. Empty `lost` plus an acceptable ratio means the refinement kept everything. */ export declare function contractRegression(targetPath: string, previous: string, next: string): ContractRegression; /** The ratchet: a refinement is only accepted when it is a strict improvement in coverage terms. */ export declare function acceptsRefinement(regression: ContractRegression): boolean; //# sourceMappingURL=unit-todos.d.ts.map