/** * Built-in `code-review` workflow — an effort-parameterized multi-angle review. * * Topology: Scope → pipeline(per-angle Find → Verify) → Sweep (xhigh/max) → Synthesize. * high = 3 correctness + 5 cleanup angles, ≤6 per angle, ≤10 findings, no sweep * xhigh = 5 correctness + 5 cleanup angles, ≤8 per angle, ≤15 findings, sweep of ≤8 * max = same structure as xhigh (API reasoning effort differs, not the fan-out) * * Angle taxonomy (the "5 cleanup" = cleanup + altitude + conventions, all `kind: "cleanup"`): * correctness: Angle A (line-by-line) · B (removed-behavior) · C (cross-file) · * D (language-pitfall) · E (wrapper/proxy) — labels angle-A..angle-E * cleanup: reuse · simplification · efficiency · altitude · conventions * Verifier verdict ladder: CONFIRMED / PLAUSIBLE / REFUTED (recall-biased: PLAUSIBLE by * default). Synthesis ranks correctness over cleanup, CONFIRMED over PLAUSIBLE, merges * semantic dupes by index, caps at maxFindings, and backfills unmerged findings. * * The generated script is static and reads host-prepared inputs from `args` at runtime. * Host code owns all git argv + patch collection; reviewer agents are read-only and * never receive a model-produced shell command to run. */ /** Level parameters (own-property check protects the level parse). */ declare const LEVEL_PARAMS: Record; type CodeReviewLevel = keyof typeof LEVEL_PARAMS; export interface CodeReviewDiffCommand { cmd: "git"; args: string[]; display: string; } export interface PreparedCodeReviewArgs { level: CodeReviewLevel; target?: string; instructions?: string; diff: { commands: CodeReviewDiffCommand[]; files: string[]; patch: string; }; } export type CodeReviewExecRunner = (file: string, args: string[], options: { cwd: string; maxBuffer: number; shell: false; }) => Promise<{ stdout: string; stderr: string; }>; /** * Prepare /code-review input in host code. Review agents receive a patch/files * object and read-only tools; no model output is allowed to author shell strings. */ export declare function prepareCodeReviewArgs(rawArgs: string, cwd: string, runner?: CodeReviewExecRunner): Promise; /** * Generate a `code-review` workflow script — the multi-angle review topology + prompts. * * The script consumes a PreparedCodeReviewArgs object from host code. Git argv, * changed files, and patch text are computed before the workflow starts. */ export declare function generateCodeReviewWorkflow(): string; export {};