import type { BoberConfig } from "../config/schema.js"; import type { PlanSpec, FeatureSpec } from "../contracts/spec.js"; import type { ResearchDoc } from "./research-agent.js"; /** * Discriminated result from `runPlanner`. * * - `ready` — the planner produced a complete spec; the pipeline may proceed. * - `needs-clarification` — the planner refused to fully decompose the * request (ambiguityScore exceeded the threshold or open questions remain). * The spec was still saved to disk so the user can resume later, but the * pipeline must NOT run sprints from it until the questions are answered. * * Callers MUST narrow on `kind` before reading `spec.features`. */ export type PlannerResult = { kind: "ready"; spec: PlanSpec; } | { kind: "needs-clarification"; spec: PlanSpec; }; /** * Run the planner agent to produce a PlanSpec from a user prompt. * * Uses a multi-turn agentic loop with read-only tools so the planner * can explore the codebase. The system prompt is loaded from * `agents/bober-planner.md`. * * Returns a discriminated PlannerResult — see the type for the contract. */ export declare function runPlanner(userPrompt: string, projectRoot: string, config: BoberConfig, researchDoc?: ResearchDoc, architectDoc?: string): Promise; /** The substantive precision fields a generator-passable contract requires. */ export interface ContractPrecision { nonGoals: string[]; stopConditions: string[]; definitionOfDone: string; assumptions: string[]; outOfScope: string[]; } /** * Generate substantive contract precision fields (nonGoals, stopConditions, * definitionOfDone) for a feature via a json_object model call. * * The standalone pipeline otherwise creates contracts with placeholder precision * fields, which the generator's BLOCKING precision preflight rejects. This fills * them with concrete, verifiable values so the sprint can actually run. * * Returns undefined if generation fails or the output doesn't meet the bar — the * caller then keeps placeholders (and the generator correctly blocks) rather than * shipping a vague contract. */ export declare function generateContractPrecision(feature: FeatureSpec, spec: Pick, config: BoberConfig): Promise; //# sourceMappingURL=planner-agent.d.ts.map