/** * roadmap-item-titles migration (confirm tier): quote an item title that YAML * will not parse, so the item stops being invisible. * * The defect this repairs is silence, not breakage. `readItem` returns null for * "unreadable" and "absent" alike and `listStatus` skips nulls, so one malformed * frontmatter block removes an item from browse, from promotion lookup, from the * `roadmap-done` action and from `aidlc doctor` — with no message anywhere saying * a file was skipped. Absence is indistinguishable from never having written it. * Five of this project's first 49 items sat invisible for up to ten days. * * The trigger is always the same: YAML reserves `` ` `` as an indicator * character, so a plain scalar may not begin with one, and the natural way to * name a code defect is `` title: `readItem` returns null ``. Agents write these * titles — every affected item carried `source: agent` or `source: import`. * * Two halves, and the order matters. The *cause* is fixed in the capture * instructions, which now say to quote the title unconditionally * (`packages/content/skills/04-roadmap.md` and the portable `roadmap-item` * skill); those are what stop new ones appearing. This migration is the * *detector*, for the items already on disk and for any writer that ignores the * instruction. * * Confirm tier, because this edits the user's own content — the reason * `roadmap-layout` is confirm tier too. `check` and `apply` both derive * everything from `planTitleQuoting` and nothing else computes pending-ness, the * rule stated in `../types.ts`, so a dry run and a real run cannot disagree. * * Files broken any other way are reported as NOT APPLICABLE rather than pending, * following `roadmap-layout` exactly: `apply` will never fix them, only a human * can, and `aidlc doctor` exits 1 on pending confirm work — so calling them * pending would fail doctor forever on a repo holding one malformed file, which * trains people to ignore doctor output. `not-applicable` still prints the * detail, which is the entire point: any error at all turns a ten-day mystery * into a one-minute fix. */ import type { Migration } from '../types.js'; import type { DoctorContext } from '../types.js'; import { type UnparseableItem } from '../../roadmap/paths.js'; /** One item whose title can be quoted back into validity. */ export interface TitleRepair { item: UnparseableItem; /** Full repaired file contents. */ contents: string; } export interface TitlePlan { /** Mechanically repairable by quoting the title. */ repairs: TitleRepair[]; /** Unparseable for some other reason; a human must look. */ manual: UnparseableItem[]; } /** * Everything the migration would do, computed without writing. * * The single source of pending-ness. Sorted by `unparseableItems`, which walks * statuses in lifecycle order and filenames in sorted order, so the plan never * depends on directory read order. */ export declare function planTitleQuoting(ctx: DoctorContext): TitlePlan; export declare const roadmapItemTitles: Migration; //# sourceMappingURL=roadmap-item-titles.d.ts.map