import type { ToolInfo } from "@earendil-works/pi-coding-agent"; import type { DeepClausePaths } from "./workspace.js"; export declare const DC_PLAN_COMMIT_TOOL = "dc_plan_commit"; export declare const PI_AGENT_STEP_TOOL = "pi_agent_step"; export interface PlanStepSpec { id: string; title: string; instruction: string; executor: "pi" | "dml"; requiredTools: string[]; relevantSkills: string[]; expectedResult: string; satisfies: string[]; checks: string[]; } export interface PlanSpec { slug: string; title: string; objective: string; assumptions: string[]; steps: PlanStepSpec[]; finalSynthesis?: string; failureMessage: string; change?: string; } export interface ValidatePlanOptions { requireChecks?: boolean; change?: string; } export interface PlanningSnapshot { model: string; thinkingLevel: string; activeTools: string[]; allTools: ToolInfo[]; skillNames: string[]; contextFiles: string[]; existingSkills: string[]; existingPlans: string[]; } export interface ValidatedPlan { spec: PlanSpec; requiredTools: string[]; warnings: string[]; } export declare function normalizePlanSlug(value: string): string; export declare function validatePlanSpec(value: unknown, snapshot: PlanningSnapshot, nameOverride?: string, options?: ValidatePlanOptions): ValidatedPlan; export interface ParsedCheck { kind: "cmd" | "exists" | "model"; value: string; } /** Parse an encoded verification check: cmd:, exists:, model:. */ export declare function parseCheck(encoded: string): ParsedCheck; /** * Assemble the `tasks.dml` data artifact for a change: plan_task/2 definitions plus * the managed plan_task_status/2 block. Verified by /dc-check and executed by /dc-apply. */ export declare function assembleTasksDml(plan: ValidatedPlan, snapshot: PlanningSnapshot): string; /** Write changes//tasks.dml, refusing to clobber an existing plan unless overwrite=true. */ export declare function writeChangeTasks(paths: DeepClausePaths, slug: string, text: string, overwrite?: boolean): Promise; export declare function assemblePlanDml(plan: ValidatedPlan, snapshot: PlanningSnapshot): string; export declare function validateGeneratedPlan(dml: string): Promise; /** * Data-only artifact (tasks.dml): no agent_main of its own, so validation appends a * trivial entry point to parse the facts without changing what is written. */ export declare function validateGeneratedTasks(dml: string): Promise; export declare function writePlanNonDestructively(paths: DeepClausePaths, slug: string, dml: string): Promise; export declare function isContextualPlan(filePath: string): Promise; export declare function readPlanRequiredTools(filePath: string): Promise; export declare function buildPlanningPrompt(request: string, snapshot: PlanningSnapshot, nameOverride?: string, change?: string, update?: boolean): string;