/** * Fold an instance's spec delta into the corpus (living-spec-corpus/AC-10). * * `planFold` reads and computes; `applyFold` is the only writer. The split is * what makes a fold all-or-nothing: every file's new content exists in memory * before the first write, so a conflict found in the last block leaves the * corpus exactly as it was (living-spec-corpus/AC-11), and `--dry-run` and the * completion check in `aidlc transition` are the same computation as the real * fold rather than a second copy of it. * * Preconditions are checked against the corpus as it is *before* the fold, for * every block, so the conflict list is complete — not just the first one found. * * Requirements: living-spec-corpus/AC-10, living-spec-corpus/AC-11, * living-spec-corpus/AC-12, living-spec-corpus/AC-13, * living-spec-corpus/AC-14, living-spec-corpus/AC-17 */ import type { FoldPlan } from './types.js'; /** The archive record already written for this instance, if any (AC-13). */ export declare function findArchiveRecord(projectRoot: string, instance: string): string | null; /** * Compute what folding `instance` would do. Throws only when the instance name * is not a single path segment or the instance does not exist. */ export declare function planFold(projectRoot: string, instance: string, now?: Date): FoldPlan; /** Write a ready plan; anything else is a no-op. Archive record last (design D5). */ export declare function applyFold(plan: FoldPlan): void; /** One line per error or conflict, for the CLI and for transition violations. */ export declare function describeIssues(plan: FoldPlan): string[]; //# sourceMappingURL=fold.d.ts.map