/** * `artifact-source-drift` (report tier): a generated skill disagrees with what * generated it. * * `aidlc doctor` used to say `everything healthy — nothing to do` while committed * artifacts had been emitted six versions ago and, in at least one repo, while a * human's prose sat in a file the next `aidlc update` would silently overwrite. * Doctor is the natural place to notice both, and noticing was the missing half of * that defect (update-overwrites-authored-context/AC-14). * * **How it checks, and why not the obvious way.** Each generated body carries a * marker recording the emitting version and a hash of the prose beneath it, so the * whole check is a file read plus a hash — see `compile/skill-format.ts`. The * obvious alternative, rebuilding the install plan and diffing it, would reach * `compile/knowledge-section.ts` → `knowledge/engine.js` → `node:sqlite` and put * Node's experimental-feature warning on the default path of `aidlc doctor`. That * is the same hazard `knowledge-stale-sources.ts` documents, and an import-graph * test pins this module against it too (AC-17). * * **Why `report` and not `confirm`.** The remedy is `aidlc update`, and doctor must * not run it: `update` recompiles every skill, which is precisely the rewrite whose * silence started this. Reporting hands the decision to the person who can tell a * wanted upgrade from an unwanted overwrite. Nothing here writes anything under any * tier or flag, and it never gates doctor's exit code (AC-14, NFR-4). * * **Causes, told apart.** A missing marker means the file predates markers — * every repo in the world reads that way until its first post-upgrade `update`, so * it is reported as expected churn rather than as damage. A hash mismatch means * somebody edited the artifact, at whatever version (AC-16). A marker newer than the * running CLI means this CLI is behind the one that wrote the checkout. * * **An older marker is not reported.** It used to be, as skew remedied by `aidlc * update`. Since a body that did not change now keeps its version, an older marker * is the normal state of an up-to-date checkout, and `update` would not change it — * so that report fired on every file after every release and could not be cleared * (update-restamps-unchanged-skills/AC-9). What it stood in for, a CLI upgraded * without `update` being run, is not detectable from the marker alone; detecting it * means rebuilding the bodies, which the paragraph above rules out. * * Requirements: update-overwrites-authored-context/AC-14 … AC-17, AC-19; * update-restamps-unchanged-skills/AC-9 … AC-11 */ import type { CheckResult, DoctorContext, Migration } from '../types.js'; /** * The single source of pending-ness (`../types.ts`), so dry and real runs cannot * disagree. Exported for the tests, which drive it against fixture roots. */ export declare function artifactDriftCheck(ctx: DoctorContext): CheckResult; export declare const artifactSourceDrift: Migration; //# sourceMappingURL=artifact-source-drift.d.ts.map