/** * Diff-based re-review primitives (shared, B2/B3). * * Both orchestrators make staleness content/semantics-aware: a dependency is * recorded and compared by the hash of its *semantic projection* (only the * load-bearing structure a downstream consumes), and a verdict-bearing review * that must re-run after a genuine upstream change is handed its prior verdict * plus the precise changed-since-last-review delta — so it re-affirms cheaply or * revises only the affected items, never a blind full re-run. * * Each orchestrator owns its own *projection table* (which fields of which * artifact are load-bearing — remediate's `semanticProjection`, audit-code's * `designReviewProjection`), but the GENERIC machinery is single-sourced here: * the order-independent stable serialization, the leaf-level projection diff, * and the re-review prompt section. This keeps the two halves of the pipeline in * lockstep (one diff algorithm, one prompt shape) while leaving the * domain-specific projection to each side. */ /** * Order-independent stable serialization of a projection. Object keys are sorted * so two payloads that differ only in key order project to the same string (and * thus the same semantic hash); arrays preserve order (element order can be * load-bearing). `undefined` is encoded as `null` so a present-but-undefined * field and an absent field collapse — they carry the same meaning here. */ export declare function stableStringifyProjection(value: unknown): string; /** * Render a leaf-level diff between two projections as `+`/`-`/`~` lines. Returns * an empty array when the projections are identical. Bounded to MAX_DIFF_LINES * with an explicit overflow note (never silently truncated). */ export declare function diffProjections(prior: unknown, current: unknown): string[]; /** One changed upstream input: its label plus the field-level diff lines. */ export interface ProjectionDiffEntry { /** Human-readable name of the changed input (artifact / dependency name). */ label: string; /** Leaf-level `+`/`-`/`~` diff lines from `diffProjections`. */ lines: string[]; } export interface ReReviewSectionInput { /** * The verdict the prior review emitted — what a re-review re-affirms verbatim * when the changes below do not affect it. */ priorPayload: unknown; /** Per-input diffs, empty when nothing changed. */ changedInputs: ProjectionDiffEntry[]; /** True when no upstream projection actually changed (re-affirm verbatim). */ allUnchanged: boolean; /** * The noun for the thing being re-reviewed, e.g. `"artifact"` or * `"design-review pass"`. Used only in the section prose. Defaults to * `"review"`. */ subjectNoun?: string; } /** * Render the diff-based re-review section appended to a review's re-emit prompt. * Carries the prior verdict and the precise changed-since-last-review delta, and * instructs the worker to re-affirm the prior verdict when the delta does not * affect it, or revise only the affected items otherwise. Enforced by the tool * (the re-emit prompt carries the delta), never left to the host to remember. */ export declare function renderDiffReReviewSection(input: ReReviewSectionInput): string; //# sourceMappingURL=projectionDiff.d.ts.map