/** * Undo a plan's commits as one new commit (revert-by-task D2). * * The working tree was clean when this starts (`checkRepo`, AC-18), so every * failure path can return to the recorded `HEAD` with `reset --hard` and lose * nothing but what this run wrote (AC-17). * * Lifecycle state is never reverted by git: a task commit may carry its own * `[x]`, phase YAML or cost records, and undoing those would rewind state by * accident. `.aidlc/state/` is restored from `HEAD` after the revert, and the * only state change is the checkbox reset this module writes (D3, AC-16). * * The new commit carries no `Task:` trailer — it would otherwise be selected * by the next `--task` run and undone, re-applying the work. * * Requirements: revert-by-task/AC-15, AC-16, AC-17 */ import { type Plan } from './plan.js'; export type ApplyResult = { ok: true; sha: string; short: string; reset: number[]; } | { ok: false; reason: 'conflict'; short: string; subject: string; } | { ok: false; reason: 'empty'; } | { ok: false; reason: 'commit-failed'; detail: string; }; /** The commit message: subject, one summary line, then git's own revert lines. */ export declare function revertMessage(instance: string, plan: Plan): string; export declare function applyRevert(projectRoot: string, instance: string, plan: Plan): ApplyResult; //# sourceMappingURL=apply.d.ts.map