/** * `knowledge-stale-sources` (report tier): the knowledge graph describes something * that is not there. * * Two conditions, one read: an entity whose `source` names a path that does not * resolve, and an edge whose `from`/`to` names no entity. See * `knowledge/source-resolution.ts` for why `staleness.ts`'s two existing signals * cannot see either — in short, a deleted directory stops appearing in `git diff`, * so the change signal goes quiet precisely when the entry becomes wrong. * * **Why `report` and not `confirm`.** The remedy is a decision, and doctor may not * make it. Of the 15 entities this found on its first run, 12 wanted deleting and 3 * wanted their path corrected to a different manifest — indistinguishable from the * data alone. A `confirm`-tier remover applies unprompted under `--yes`, so the * first unattended `aidlc doctor --yes` would have deleted three entities whose real * fix was a one-line edit, and deleting knowledge is the loss this graph exists to * prevent. Precedent: `roadmap-sync-gh-missing` and two of the four * `compliance-pack-drift` conditions use `report` for exactly this shape. Nothing * here writes anything, under any tier or flag, and it never gates doctor's exit * code. * * **`ctx.projectRoot`, not the primary checkout.** The opposite of * `roadmap-sync-gh-missing`, deliberately: `.aidlc/knowledge/*.yaml` is committed, so * the graph is per-branch and the copy that matters is the one in the tree being * checked. Roadmap items live in the primary checkout because an inbox stranded on a * feature branch is indistinguishable from a lost one; a graph is the reverse — a * branch that deletes a package and its entries should read clean on that branch. * * **No subprocess and no index.** `YamlSourceStore` plus `existsSync`, nothing else. * The constant it needs came from `engine.ts`, which imports `SqliteIndex`; that * import would have put `node:sqlite`'s experimental warning on the default path of * `aidlc doctor`, so `KNOWLEDGE_DIR` moved to `types.ts` instead. An import-graph * test pins this, because a behavioural test would keep passing until somebody * happened to exercise the new path. * * Requirements: stale-graph-entries/AC-10 … stale-graph-entries/AC-19 */ import type { CheckResult, DoctorContext, Migration } from '../types.js'; /** * The single source of pending-ness (`../types.ts`), so a dry run and a real run * cannot disagree. Exported for the tests, which drive it against fixture roots. */ export declare function staleSourcesCheck(ctx: DoctorContext): CheckResult; export declare const knowledgeStaleSources: Migration; //# sourceMappingURL=knowledge-stale-sources.d.ts.map