/** * Review policy: which model family reviews an increment, how deep, and whether * closure waits for that review. Layers, strongest first: * * 1. spec.md `## Review` (`- Reviewer: openai (gpt-6.1-sol)`, `- Depth: deep`, * `- Required: yes`), set per increment for complex work; * 2. `.specweave/config.json` `review.policy` (`reviewer`, `depth`, `required`); * 3. `review.crossModel: true`, the older switch: required, cross-family; * 4. the default: cross-family, standard depth, not required. * * The SpecWithCode app parses the same `## Review` section with its own copy * of this format; keep the two in step. * * @module core/review/policy */ import type { ReviewConfiguration } from '../config/types.js'; export type ReviewDepth = 'standard' | 'deep'; export type ReviewPolicySource = 'spec' | 'config' | 'crossModel' | 'default'; /** Families a policy may name. `cross-family` is any family other than the author's. */ export declare const REVIEW_FAMILIES: readonly ["openai", "claude", "google", "xai", "meta"]; export interface ReviewPolicy { /** A family from REVIEW_FAMILIES, or `cross-family`. */ family: string; /** A model id the policy pins, such as `gpt-6.1-sol`; absent means any model of the family. */ model?: string; depth: ReviewDepth; required: boolean; /** Which layer set each field. */ sources: { reviewer: ReviewPolicySource; depth: ReviewPolicySource; required: ReviewPolicySource; }; } export interface ReviewSection { family?: string; model?: string; depth?: ReviewDepth; required?: boolean; } /** * Model family of a model id or tool name: `gpt-6.1-sol` and `codex` are openai, * `claude-opus-5-5` and `sonnet` are claude. Anything else is returned lowercased. */ export declare function familyOfModel(id: string): string; /** * One of REVIEW_FAMILIES for a family name, model id or tool name (`openai`, * `gpt-6.1-sol`, `codex`, `fable`, `claude-code`), or undefined when it names * none. An unclassified family is never evidence of a cross-family review. */ export declare function canonicalFamily(value: string | undefined): string | undefined; /** Model ids every provider spells alike: Copilot's `claude-opus-5.5` is `claude-opus-5-5`. */ export declare function sameModel(a: string, b: string): boolean; export declare function parseReviewer(value: string): { family?: string; model?: string; }; /** The `## Review` section of a spec, or undefined when it has none. */ export declare function parseReviewSection(spec: string): ReviewSection | undefined; /** The effective policy for an increment, from its spec, the project config and the defaults. */ export declare function resolveReviewPolicy(projectRoot: string, incrementDir: string, config?: ReviewConfiguration): ReviewPolicy; /** * Whether a reviewer satisfies the policy for work `authorFamily` wrote: * families compared canonically (an unclassified reviewer family never * counts, nor a record whose model is of another family than it claims), a * pinned model compared across provider spellings, and a deep policy met * only by a deep review. */ export declare function policyAccepts(policy: Pick & { depth?: ReviewDepth; }, reviewer: { family: string; model?: string; depth?: string; }, authorFamily: string | undefined): boolean; /** `OpenAI review (gpt-6.1-sol, deep)`, `cross-family review (standard)`. */ export declare function describePolicy(policy: ReviewPolicy, authorFamily?: string): string; export declare const FAMILY_LABEL: Record; //# sourceMappingURL=policy.d.ts.map