import { z } from "zod"; /** * Minimum length for a success criterion description. * Short descriptions are usually vague ("works correctly", "looks good"). * Opus 4.7 takes prompts literally — vague criteria produce vague verification. */ export declare const MIN_CRITERION_DESCRIPTION_LENGTH = 25; /** * Minimum length for definitionOfDone. * Single-sentence summaries leak too much intent that the model has to guess. */ export declare const MIN_DEFINITION_OF_DONE_LENGTH = 20; /** * Phrases that almost always indicate a vague criterion. * Match is case-insensitive and substring-based. */ export declare const BANNED_VAGUE_PHRASES: readonly ["works correctly", "works as expected", "looks good", "looks nice", "is reasonable", "behaves properly", "behaves correctly", "is correct", "appears correct", "as needed", "if appropriate"]; export declare const ContractStatusSchema: z.ZodEnum<["proposed", "negotiating", "agreed", "in-progress", "evaluating", "passed", "failed", "needs-rework", "completed"]>; export type ContractStatus = z.infer; /** * Strict enum of verification methods the evaluator can actually execute. * Free-form strings here cause the evaluator to silently skip checks. */ export declare const VerificationMethodSchema: z.ZodEnum<["manual", "typecheck", "lint", "unit-test", "playwright", "api-check", "build", "agent-evaluation"]>; export type VerificationMethod = z.infer; export declare const EstimatedDurationSchema: z.ZodEnum<["small", "medium", "large"]>; export type EstimatedDuration = z.infer; export declare const SuccessCriterionSchema: z.ZodObject<{ criterionId: z.ZodString; description: z.ZodString; verificationMethod: z.ZodEnum<["manual", "typecheck", "lint", "unit-test", "playwright", "api-check", "build", "agent-evaluation"]>; required: z.ZodBoolean; }, "strip", z.ZodTypeAny, { description: string; required: boolean; criterionId: string; verificationMethod: "build" | "lint" | "typecheck" | "manual" | "unit-test" | "playwright" | "api-check" | "agent-evaluation"; }, { description: string; required: boolean; criterionId: string; verificationMethod: "build" | "lint" | "typecheck" | "manual" | "unit-test" | "playwright" | "api-check" | "agent-evaluation"; }>; export type SuccessCriterion = z.infer; export declare const SprintContractSchema: z.ZodObject<{ contractId: z.ZodString; specId: z.ZodString; sprintNumber: z.ZodNumber; title: z.ZodString; description: z.ZodString; status: z.ZodEnum<["proposed", "negotiating", "agreed", "in-progress", "evaluating", "passed", "failed", "needs-rework", "completed"]>; dependsOn: z.ZodDefault>; features: z.ZodDefault>; successCriteria: z.ZodArray; required: z.ZodBoolean; }, "strip", z.ZodTypeAny, { description: string; required: boolean; criterionId: string; verificationMethod: "build" | "lint" | "typecheck" | "manual" | "unit-test" | "playwright" | "api-check" | "agent-evaluation"; }, { description: string; required: boolean; criterionId: string; verificationMethod: "build" | "lint" | "typecheck" | "manual" | "unit-test" | "playwright" | "api-check" | "agent-evaluation"; }>, "many">; /** Things the generator MUST NOT do, even if tempting. Forces explicit scope. */ nonGoals: z.ZodArray; /** Concrete signals that the sprint is finished. "Stop when X" beats "stop when done". */ stopConditions: z.ZodArray; /** Plain-English paragraph the generator can re-read mid-task to recenter. */ definitionOfDone: z.ZodString; /** Assumptions the planner made (often self-answered clarifications). */ assumptions: z.ZodDefault>; /** Items explicitly outside this sprint's scope (deferred or never). */ outOfScope: z.ZodDefault>; /** * Self-rated ambiguity, 0 (fully specified) to 10 (very ambiguous). * In autonomous mode the planner should refuse to emit contracts with * scores >= 7 and instead surface clarification questions. */ ambiguityScore: z.ZodOptional; generatorNotes: z.ZodOptional; evaluatorNotes: z.ZodOptional; estimatedFiles: z.ZodDefault>; estimatedDuration: z.ZodOptional>; evaluatorFeedback: z.ZodOptional; iterationHistory: z.ZodDefault>; lastEvalId: z.ZodOptional>; evalResults: z.ZodOptional>; createdAt: z.ZodOptional; updatedAt: z.ZodOptional; startedAt: z.ZodOptional; completedAt: z.ZodOptional; }, "strip", z.ZodTypeAny, { status: "failed" | "completed" | "evaluating" | "in-progress" | "proposed" | "negotiating" | "agreed" | "passed" | "needs-rework"; description: string; specId: string; title: string; features: string[]; assumptions: string[]; outOfScope: string[]; contractId: string; sprintNumber: number; dependsOn: string[]; successCriteria: { description: string; required: boolean; criterionId: string; verificationMethod: "build" | "lint" | "typecheck" | "manual" | "unit-test" | "playwright" | "api-check" | "agent-evaluation"; }[]; nonGoals: string[]; stopConditions: string[]; definitionOfDone: string; estimatedFiles: string[]; iterationHistory: unknown[]; createdAt?: string | undefined; ambiguityScore?: number | undefined; updatedAt?: string | undefined; completedAt?: string | undefined; generatorNotes?: string | undefined; evaluatorNotes?: string | undefined; estimatedDuration?: "small" | "medium" | "large" | undefined; evaluatorFeedback?: string | undefined; lastEvalId?: string | null | undefined; evalResults?: unknown[] | undefined; startedAt?: string | undefined; }, { status: "failed" | "completed" | "evaluating" | "in-progress" | "proposed" | "negotiating" | "agreed" | "passed" | "needs-rework"; description: string; specId: string; title: string; contractId: string; sprintNumber: number; successCriteria: { description: string; required: boolean; criterionId: string; verificationMethod: "build" | "lint" | "typecheck" | "manual" | "unit-test" | "playwright" | "api-check" | "agent-evaluation"; }[]; nonGoals: string[]; stopConditions: string[]; definitionOfDone: string; createdAt?: string | undefined; features?: string[] | undefined; assumptions?: string[] | undefined; outOfScope?: string[] | undefined; ambiguityScore?: number | undefined; updatedAt?: string | undefined; completedAt?: string | undefined; dependsOn?: string[] | undefined; generatorNotes?: string | undefined; evaluatorNotes?: string | undefined; estimatedFiles?: string[] | undefined; estimatedDuration?: "small" | "medium" | "large" | undefined; evaluatorFeedback?: string | undefined; iterationHistory?: unknown[] | undefined; lastEvalId?: string | null | undefined; evalResults?: unknown[] | undefined; startedAt?: string | undefined; }>; export type SprintContract = z.infer; /** * Create a new sprint contract in "proposed" status. * * Auto-generated contracts (e.g. one-feature-per-sprint pipelines) get * placeholder precision fields that explicitly signal they were not authored * by a planner agent. The generator preflight check should treat these as * incomplete and request clarification before implementing. */ export declare function createContract(title: string, description: string, criteria: Omit[], options?: { specId?: string; sprintNumber?: number; nonGoals?: string[]; stopConditions?: string[]; definitionOfDone?: string; features?: string[]; estimatedFiles?: string[]; estimatedDuration?: EstimatedDuration; }): SprintContract; /** * Return a new contract with an updated status. * Automatically sets `startedAt` when moving to "in-progress" * and `completedAt` when moving to a terminal status. */ export declare function updateContractStatus(contract: SprintContract, status: ContractStatus): SprintContract; export interface ContractPrecisionIssue { field: string; message: string; } /** * Check a contract for precision issues that the Zod schema can't express: * banned vague phrases, etc. Returns an empty array when the contract is clean. * * Schema-level constraints (min lengths, required fields) are enforced * separately by SprintContractSchema.parse(). */ export declare function findPrecisionIssues(contract: SprintContract): ContractPrecisionIssue[]; /** * Check whether a contract has the precision fields populated with substance, * not just placeholders from createContract(). Use this in the generator * preflight to refuse to start work on incomplete contracts. */ export declare function isContractPrecise(contract: SprintContract): boolean; //# sourceMappingURL=sprint-contract.d.ts.map