/** * Semantic / structural projection for audit-code's design-review passes * (B2/B3 parity port). * * The design-review passes (contract-assessment + conceptual-design-critique) * read a structural context assembled from several intake/structure artifacts * (`renderSharedStructuralContext` in `designReviewPrompt.ts`): the file * inventory, unit boundaries, dependency graph, externally-reachable surfaces, * critical flows, the risk register, and the deterministic structural findings. * When any of those upstreams change, the review's verdict can go stale. * * The naive trigger — "any byte changed" — re-runs the (expensive, LLM-driven) * review on cosmetic churn: a re-derived `generated_at`, a file's content hash * moving, a reordered list. This module is the audit-code half of the shared * semantic-projection policy (remediate-code's `contractPipeline/ * semanticProjection.ts` is the other): each reviewed input is projected to ONLY * the load-bearing structure the review actually reasons about — provenance and * metrics stripped, each entry narrowed to its derivable fields and the * collections canonically ordered. A cosmetic upstream edit projects to the same * value (review stays fresh); a real structural change (a new module, a changed * interface, a new surface, a re-scored risk) projects differently and correctly * re-stales the review. * * This mirrors remediate-code's `DERIVABLE_MODULE_CONTRACT_FIELDS` narrowing — * the "finalized-style structural projection" — applied to audit's structural * artifact set. The generic diff + hashing machinery is single-sourced in * `audit-tools/shared/reReview`. */ import { type CriticalFlowManifest, type GraphBundle, type IntentCheckpoint, type RiskRegister, type SurfaceManifest } from "audit-tools/shared"; import type { RepoManifest, UnitManifest } from "../types.js"; import type { DesignAssessment } from "../types/designAssessment.js"; /** * The narrow read-only slice of the artifact bundle the design-review projection * needs. Defined locally (rather than importing `ArtifactBundle` from * `io/artifacts.ts`) so this module — and `designReviewSnapshot.ts`, which the * bundle loader imports — do not form an import cycle with `io/artifacts.ts`. * `ArtifactBundle` is structurally assignable to this. */ export interface DesignReviewBundle { repo_manifest?: RepoManifest; unit_manifest?: UnitManifest; graph_bundle?: GraphBundle; surface_manifest?: SurfaceManifest; critical_flows?: CriticalFlowManifest; risk_register?: RiskRegister; design_assessment?: DesignAssessment; /** * The confirmed intent checkpoint, read ONLY to derive each unit's structured * in-scope/excluded disposition (see `projectUnitManifest`). The cosmetic * bracket-tag reason text is not projected — only the disposition KIND, which * the prompt renders as `[in scope]` vs `[excluded: …]` and which the review * actually reasons about (which units to skip). */ intent_checkpoint?: IntentCheckpoint; } /** * The structural artifacts the design-review passes read. A design-review * snapshot records the projection of each of these; a change to any of them * (in projection) re-stales the review. */ export declare const DESIGN_REVIEW_INPUTS: readonly ["repo_manifest", "unit_manifest", "graph_bundle", "surface_manifest", "critical_flows", "risk_register", "design_assessment"]; export type DesignReviewInput = (typeof DESIGN_REVIEW_INPUTS)[number]; /** * Project a single design-review input artifact from the bundle to its * load-bearing structure. Returns `null` when the artifact is absent. */ export declare function projectDesignReviewInput(input: DesignReviewInput, bundle: DesignReviewBundle): unknown; /** * Project every design-review input to its load-bearing structure, keyed by * input name — the captured shape a design-review snapshot records and a * re-review diffs against. */ export declare function projectDesignReviewInputs(bundle: DesignReviewBundle): Record; //# sourceMappingURL=designReviewProjection.d.ts.map