/** * `keyFiles` — DEPRECATED, removed in the major after the one that ships this * notice (the one-major alias window in `core/spec.ts`). * * WHY. The field compiles a flat "## Key Files" path → description list into * the instruction file the harness loads on EVERY request. Measured on this * repository's own root spec (2026-10-11): 230 entries, 45,467 characters — * 29% of a 157,872-character file, paid on every request, to tell an agent where files are * when it finds them itself with Glob/Grep. Anthropic's own guidance lists * "File-by-file descriptions of the codebase" under what to EXCLUDE from * `CLAUDE.md` (https://code.claude.com/docs/en/best-practices). * * THE REPLACEMENT, decided per entry, in this order: * - the file's own header, the docs or the path already say it → delete it; * - a fact about that one file, written nowhere else → that file's header * comment, where a reader meets it on opening the file; * - a rule an agent must follow while working in one folder → that folder's * nested instruction file (`/CLAUDE.md` from its own spec), which * loads only when the agent works there; * - only when nothing else would lead an agent to the file → a one-line * `file()` pointer where the decision that needs it is written (verified * exactly like a `keyFiles` path, by `validateFileRef`). * * This module is pure: the renderer `compile` uses, the measurement the * `deprecated-key-files` rule reports, and its message — one wording for lint * and audit. */ /** Where the migration is written up. Printed in every finding. */ export declare const KEYFILES_DOCS_URL = "https://github.com/zernie/vigiles/blob/main/docs/rules/deprecated-key-files.md"; /** * The compiled "## Key Files" section — the ONE renderer, so the size a * finding reports is the size of what actually loads. */ export declare function renderKeyFiles(keyFiles: Readonly>): string; /** * What a spec's `keyFiles` costs. `measured: false` when the map is not a * literal (a variable, a computed key or value, a spread) — then the field is * known to be USED and its size is not guessed. */ export interface KeyFilesUsage { readonly entries: number; readonly chars: number; readonly measured: boolean; } /** Measure a map the way it compiles. */ export declare function measureKeyFiles(keyFiles: Readonly>): KeyFilesUsage; /** The cost half of a finding, e.g. `230 entries, 45,467 characters compiled into …`. */ export declare function keyFilesCost(u: KeyFilesUsage): string; /** * The instruction file a spec compiles to — `pkg/AGENTS.md.spec.ts` → * `AGENTS.md` — so the fix names the nested file in the reader's own harness * instead of assuming one. */ export declare function instructionFileOfSpec(specPath: string): string; /** * The fix, one sentence — shared by the lint message and the audit line. The * four places an entry can go, in the order to try them; the full recipe is * the migration guide. `targets` are the instruction files the reported specs * compile to (`CLAUDE.md`, `AGENTS.md`), so the nested file is named for real. */ export declare function keyFilesFix(targets: readonly string[]): string; /** The whole finding: what it costs, then where each entry goes and where it is written up. */ export declare function keyFilesDeprecationMessage(u: KeyFilesUsage, target: string): string; //# sourceMappingURL=keyfiles.d.ts.map