import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"; import { type ForgeToolDefs } from "../forge-tools.js"; import { type CalibrationBaseline } from "../forge-init/init-context.js"; export interface ParsedCalibrateFlags { /** Override project directory (from --path ). Null = use cwd. */ path: string | null; } /** * Parse /forge:calibrate arguments. * Supports: --path */ export declare function parseCalibrateFlags(args: string): ParsedCalibrateFlags; export interface ForgeConfig { paths?: { engineering?: string; forgeRoot?: string; store?: string; }; calibrationBaseline?: Partial & { masterIndexHash?: string | null; }; calibrationHistory?: CalibrationHistoryEntry[]; [key: string]: unknown; } /** Read and parse .forge/config.json from projectRoot. Returns null on any error. */ export declare function readForgeConfig(projectRoot: string): ForgeConfig | null; /** * Compute SHA-256 of MASTER_INDEX.md, stripping blank lines and HTML comment lines. * Returns null if the file does not exist. */ export declare function computeCurrentHash(projectRoot: string, kbPath: string): string | null; export interface DriftCategory { category: "technical" | "business" | "retrospective" | "acceptance criteria"; evidence: string; targets: string[]; } /** * Categorize drift by scanning MASTER_INDEX.md content for section keywords * and identifying new sprints since last calibration. */ export declare function categorizeDrift(projectRoot: string, kbPath: string, baseline: Partial & { masterIndexHash?: string | null; }): DriftCategory[]; export interface PatchProposal { target: string; type: "regenerate"; rationale: string; } /** Extract PatchProposal objects from the architect's free-form response text. */ export declare function extractPatchProposals(text: string): PatchProposal[]; export interface CalibrationHistoryPatch { target: string; type: "regenerate"; applied: boolean; } export interface CalibrationHistoryEntry { date: string; version: string; categories: string[]; patches: CalibrationHistoryPatch[]; } export declare function registerCalibrate(pi: ExtensionAPI, options?: { forgeToolDefs?: ForgeToolDefs; }): void;