/** * Deterministic evaluation corpus. * * Reproducibility rules this file exists to enforce: * - The corpus is derived from git-tracked files only, so a clean checkout at * a given commit produces exactly the same document set. * - The list is sorted by path, so ordering never depends on filesystem walk * order (which differs between macOS and Linux). * - Every run records a corpusHash over (path, sha256) pairs. Two scoreboard * rows with different corpusHash values are NOT comparable. * * @module v1/cli/knowledge/eval/corpus */ export interface CorpusDoc { /** Repo-relative POSIX path — the stable document id used in the golden set. */ id: string; absPath: string; bytes: number; sha256: string; } export interface Corpus { docs: CorpusDoc[]; corpusHash: string; repoRoot: string; /** Paths matched by the include rules but dropped, with the reason. */ excluded: Array<{ id: string; reason: string; }>; /** * Byte-identical documents collapsed to one content unit. * * This repo ships a verbatim mirror of `.claude/**` inside the CLI package * (an npm-packaging requirement), so ~200 documents exist twice. Without * this, a retriever that returns the identical twin of the gold document * scores a MISS for returning the correct content — which measures path * luck, not retrieval. Identical bytes are one document. */ canonicalOf: Map; /** Number of distinct content units (<= docs.length). */ contentUnits: number; duplicateGroups: number; /** AppleDouble `._` resource forks found. Must be zero. */ appleDoubleCount: number; } /** AppleDouble resource forks. Per-SEGMENT anchored, so it catches * `docs/concepts/._memory.md` and not merely a leading dot at the repo root. */ export declare const APPLEDOUBLE_RE: RegExp; /** The repository top level. Without this the corpus silently differs * depending on which subdirectory you ran from — and two scoreboard rows * would be incomparable for a reason nobody would think to check. */ export declare function resolveRepoRoot(start: string): string; export declare function listTrackedFiles(repoRoot: string): string[]; export declare function buildCorpus(startDir: string): Corpus; export declare function readDoc(doc: CorpusDoc): string; //# sourceMappingURL=corpus.d.ts.map