import type { ArtifactBundle } from "../io/artifacts.js"; import { deriveUnitScopeDisposition, type UnitScopeDisposition } from "./intentScopeDisposition.js"; export { deriveUnitScopeDisposition, type UnitScopeDisposition }; export interface DesignReviewOptions { max_units?: number; conceptual_depth?: "shallow" | "deep"; } /** * A conceptual-review perspective: a deliberately narrow value system one * independent reviewer adopts. The deep conceptual pass fans these out to real * parallel subagents (one perspective each), then merges via an independent * judge. Provider-neutral — a perspective is a *lens*, never a model. */ export interface ConceptualPerspective { name: string; /** The value system this reviewer judges the codebase through. */ lens: string; } /** * Built-in conceptual perspectives, ordered most-to-least commonly useful. The * deep fan-out takes the first `perspectives` of these. Each is a maximally * dissimilar value system so the union covers angles no single pass would. A * reviewer may sharpen its lens to the codebase, but stays in character. */ export declare const CONCEPTUAL_PERSPECTIVES: readonly ConceptualPerspective[]; /** Default number of deep-review perspectives when the host does not specify. */ export declare const DEFAULT_CONCEPTUAL_PERSPECTIVES = 5; /** * Clamp a requested perspective count into the supported range: at least 2 * (one perspective is just a shallow review) and at most the number of built-in * perspectives. Non-finite / undefined ⇒ the default. */ export declare function clampPerspectiveCount(requested?: number): number; /** The first `count` (clamped) built-in perspectives for a deep fan-out. */ export declare function selectPerspectives(count?: number): ConceptualPerspective[]; /** * Render the charter-layer context block (Phase C) for the conceptual passes: * the per-subsystem charters the deterministic charter-extraction produced, so * the generative reviewer OPINES per-charter — judging the design against the * purpose each subsystem is *for*, not just its structure. Each charter carries * its disposition: a confident charter is opinable; a low-confidence one must be * FLAGGED for human intent input, never opined on (`charterReviewDisposition` — * the tool-enforced guard against confident-but-wrong-charter findings). * * Byte-identical charter-unaware fallback: returns `""` when the register is * absent (old bundle), `status:"omitted"` (shallow ceiling — no charter layer), * or carries no surviving charters. The conceptual renderers append this block * only when it is non-empty, so a charter-free run renders exactly the prompt it * rendered before Phase C threaded the register in. Consumes the register * read-only — no Phase-D (clarification) dependency. */ export declare function renderCharterContext(bundle: ArtifactBundle): string; /** * Render the shared structural context block that is identical for both the * contract-review and conceptual-review passes. Placing it first in both * prompts makes it cache-eligible when the same bundle is used for both agents. */ export declare function renderSharedStructuralContext(bundle: ArtifactBundle, maxUnits: number): string; /** * Contract-review prompt (adversarial pass). * Infers existing contracts from the codebase and attacks them with counterexamples. * Categories: inferred_contract_gap, trust_boundary_gap, invariant_counterexample, * critical_invariant_coverage_gap. */ export declare function renderContractReviewPrompt(bundle: ArtifactBundle, options?: DesignReviewOptions): string; /** * Conceptual-design review prompt (generative pass — shallow / single agent). * Produces broad architectural and design improvement observations. * Categories: tool_opportunity, architecture_pattern, design_simplification, * integration, missing_capability. * * The deep multi-perspective variant is real dispatch fan-out, not an in-prompt * instruction — see `renderConceptualPerspectivePrompt` / * `renderConceptualJudgePrompt`. */ export declare function renderConceptualReviewPrompt(bundle: ArtifactBundle, options?: DesignReviewOptions): string; /** * One perspective's conceptual-review prompt (deep fan-out). Each perspective * is dispatched to an independent subagent that reviews *only* through its * assigned value system and must not see the other perspectives' output — a * separate judge merges them. This is the real fan-out that replaces the old * single-agent "imagine several perspectives" instruction. */ export declare function renderConceptualPerspectivePrompt(bundle: ArtifactBundle, perspective: ConceptualPerspective, index: number, total: number, options?: DesignReviewOptions): string; /** * The independent judge prompt (deep fan-out). The judge is a fresh agent — * never one of the perspective authors — that reads every perspective's * findings, merges and deduplicates them, resolves contradictions, drops * low-confidence observations no other perspective corroborates, and writes the * single merged conceptual-review result the orchestrator ingests. */ export declare function renderConceptualJudgePrompt(perspectiveResults: Array<{ name: string; path: string; }>): string; //# sourceMappingURL=designReviewPrompt.d.ts.map