/** * Content comparison for the artifacts `peaks workspace init` generates into a * consumer project. * * WHY A SEPARATE MODULE. `generated-artifacts-stamp.ts` owns the stamp and the * staleness verdict; this module owns ONE question — "do the bytes on disk still * match what the current release renders?" — plus the per-artifact detail that * answers it. Splitting them keeps both files inside the 300-line size cap. * * WHAT IS COMPARED. The rendered template (`buildClaudeSettingsLocalJson()`) * against the content of each generated artifact. The predicate is * `templateContentMatches` — the one the materializer uses to decide * `already-current` — so the detector and the writer cannot disagree. * * WHY CONTAINMENT AND NOT BYTE EQUALITY. `templateContentMatches` asks whether * every entry the template declares is PRESENT and ignores extra on-disk * entries. `.claude/settings.local.json` has a second writer (the auto-compact * installer appends a `Bash|Task` entry) and carries the user's own keys; a * byte-equality rule would call every such project stale on every turn. * * A MISSING ARTIFACT IS NOT DRIFT. There is nothing on disk to compare, and the * generator recreates it on the next init; the stamp's reason codes cover the * "never initialized" and "not readable" cases. */ /** One generated artifact that no longer matches the rendered template. */ export type GeneratedArtifactDrift = { /** * Project-root-relative path of the artifact, POSIX-separated so the warning * names the same file on every platform. */ readonly artifact: string; /** What differs, in one clause a reader can act on. */ readonly detail: string; }; /** The verdict, plus the detail behind it. */ export type GeneratedArtifactContentStatus = { readonly drifted: boolean; readonly drifts: ReadonlyArray; }; /** * Compare every generated artifact on disk against the current template. * * The verdict is `templateContentMatches` — the writer's own predicate — and * the per-artifact detail is a best-effort localisation of WHAT differs. */ export declare function compareGeneratedArtifactContent(projectRoot: string, artifactPaths: ReadonlyArray): GeneratedArtifactContentStatus;