import { type ProjectionDiffEntry } from "audit-tools/shared"; import type { Finding } from "../types.js"; import { type DesignReviewBundle, type DesignReviewInput } from "./designReviewProjection.js"; /** The two verdict-bearing design-review passes (each snapshots independently). */ export declare const DESIGN_REVIEW_PASSES: readonly ["contract", "conceptual"]; export type DesignReviewPass = (typeof DESIGN_REVIEW_PASSES)[number]; declare const SNAPSHOT_SCHEMA_VERSION: "audit-code/design-review-snapshot/v1alpha1"; export interface DesignReviewSnapshot { schema_version: typeof SNAPSHOT_SCHEMA_VERSION; pass: DesignReviewPass; /** ISO-8601 capture time (caller-supplied for deterministic tests). */ reviewed_at: string; /** The findings this pass emitted — what a re-review re-affirms. */ prior_findings: Finding[]; /** Semantic projection of each structural input at review time. */ reviewed_inputs: Record; } /** Bundle-side view: the loaded snapshots, keyed by pass (absent until captured). */ export type DesignReviewSnapshotBundle = Partial>; export declare function designReviewSnapshotPath(artifactsDir: string, pass: DesignReviewPass): string; export declare function readDesignReviewSnapshot(artifactsDir: string, pass: DesignReviewPass): Promise; /** * Load both design-review snapshots from disk into the bundle-side view, so the * synchronous `deriveAuditState` can compute pass staleness in-memory. Absent * snapshots are simply omitted. */ export declare function loadDesignReviewSnapshots(artifactsDir: string): Promise; /** * Capture a design-review snapshot for a freshly-completed pass: the semantic * projection of every structural input plus the pass's own findings (verdict). */ export declare function captureDesignReviewSnapshot(artifactsDir: string, pass: DesignReviewPass, priorFindings: Finding[], bundle: DesignReviewBundle, reviewedAt: string): Promise; export interface DesignReReviewDelta { /** Per-input diff lines, keyed by input name; empty for unchanged. */ changedInputs: ProjectionDiffEntry[]; /** True when no structural input projection actually changed. */ allUnchanged: boolean; } /** * Compute the re-review delta for a design-review pass against its snapshot: * which structural inputs changed (by semantic projection) since the prior * verdict, and the field-level diff for each. */ export declare function computeDesignReReviewDelta(snapshot: DesignReviewSnapshot, bundle: DesignReviewBundle): DesignReReviewDelta; /** * Whether a design-review pass is stale relative to its snapshot — i.e. the * semantic projection of any structural input has changed since the verdict was * recorded. The synchronous staleness signal `deriveAuditState` consumes. */ export declare function isDesignReviewStale(snapshot: DesignReviewSnapshot, bundle: DesignReviewBundle): boolean; /** * Render the diff-based re-review section appended to a design-review pass's * re-emit prompt. Delegates the prompt body to the shared * `renderDiffReReviewSection` so the shape matches remediate-code's contract * pipeline exactly. */ export declare function renderDesignReReviewSection(snapshot: DesignReviewSnapshot, delta: DesignReReviewDelta): string; /** * Build the diff-based re-review section for a design-review pass being re-emitted * after staleness, or `undefined` when this is not a re-review (no prior * snapshot — i.e. first authoring). Mirrors remediate-code's * `buildReReviewSection`. The pass-level step is only emitted when the pass is * `missing` (no snapshot → `undefined`) or `stale` (snapshot present → section), * so the section appears exactly on a genuine re-review. */ export declare function buildDesignReReviewSection(artifactsDir: string, bundle: DesignReviewBundle, pass: DesignReviewPass): Promise; export {}; //# sourceMappingURL=designReviewSnapshot.d.ts.map