/** * findings-filename migration (safe tier): rename a review findings file from the * legacy spelling to the canonical one, so one artifact has one findings file. * * The defect this tidies was silent and expensive. `aidlc review * requirements` built its filename from the argument as typed, giving * `requirements.review.md`, while the review gate looks artifacts up by the name * the template declares — `requirements.md`. A full adversarial review was * written, parsed, counted and summarised, and the transition failed saying the * findings file was absent. * * This repository alone holds **11 such files across 6 completed instances**, every * one a `full-feature` instance and every one on `requirements` or `design` — the * only two phases any template gates. Eleven reviews that never counted toward the * gate they were run for. * * ## Why this migration is cosmetic, and still worth having * * `artifactFromFindingsFile` resolves both spellings to one key, so the legacy * files already count once the reader ships. This migration does not restore * function; it removes the second spelling, so nobody has to know there were ever * two. Leaving them means every future reader of an instance directory sees two * conventions and has to work out which one the gate honours. * * ## Safe tier * * It renames framework-managed state under `.aidlc/state/` and never opens the * file — the review's content is untouched, only its name. The alternative, * `confirm`, would leave the files misnamed until somebody ran `doctor --yes`, and * the whole problem was that nobody knew there was anything to run. * * ## Collisions are reported, never resolved * * When both spellings exist for one artifact, renaming would clobber a findings * file — a real review, destroyed to tidy a name. Those are reported * `applicable: false` with the detail, following `roadmap-item-titles` exactly: * pending confirm work makes `aidlc doctor` exit 1 forever on a repo holding one * such pair, which trains people to ignore doctor output. `not-applicable` still * prints the detail, which is the entire point. * * Requirements: AC-9 */ import type { DoctorContext, Migration } from '../types.js'; /** One legacy findings file that can be renamed to the canonical spelling. */ export interface FindingsRename { instance: string; /** Absolute source path. */ from: string; /** Absolute destination path. */ to: string; /** Repo-relative source, for `git mv` and for display. */ fromRel: string; /** Repo-relative destination. */ toRel: string; tracked: boolean; } /** A legacy file whose canonical name is already taken by another findings file. */ export interface FindingsCollision { instance: string; legacy: string; canonical: string; artifact: string; } export interface FindingsPlan { renames: FindingsRename[]; collisions: FindingsCollision[]; } /** * Everything the migration would do, computed without writing. * * The single source of pending-ness required by `../types.ts`, so a dry run and a * real run cannot disagree. Instances and filenames are both walked in sorted * order, so the plan never depends on directory read order. */ export declare function planFindingsRenames(ctx: DoctorContext): FindingsPlan; export declare const findingsFilenameMigration: Migration; //# sourceMappingURL=findings-filename.d.ts.map