/** * correction-memory.ts * * Reads and writes the per-workspace attempt history at * ~/.pisces/attempt-history.json. * * Provides: * - appendAttempt() — validated write with silent drop on policy violation * - getRecentGaps() — compact gap summary for injection into calibration context */ export interface AttemptRecord { /** Short ID — timestamp-based base36 for easy sorting */ id: string; /** ISO 8601 timestamp */ timestamp: string; /** Skill that triggered the attempt (e.g. "attempt") */ skillName: string; /** Classified attempt type (e.g. "code", "essay", "generic") */ attemptType: string; /** What the learner was trying to achieve (truncated to 200 chars for storage) */ goal?: string; /** Specific gaps identified — populated after model grades (initially empty) */ gaps: string[]; /** Strengths identified — populated after model grades (initially empty) */ strengths: string[]; /** 0–100 composite score — set after model grades (optional at capture time) */ score?: number; } /** * Appends an attempt record to history after policy validation. * Silently drops the record if the policy check fails. */ export declare function appendAttempt(record: AttemptRecord): void; /** * Updates gaps, strengths, and score on an existing record by ID. * Called by the turn_end write-back path after the model grades the attempt. * No-ops silently if the record is not found. */ export declare function updateAttemptRecord(id: string, updates: { gaps?: string[]; strengths?: string[]; score?: number; }): void; /** * Returns a compact, deduplicated summary of unresolved gaps from recent * attempts, truncated to `maxChars` to fit within a context window budget. * Returns an empty string if there are no gaps or the summary fails policy. */ export declare function getRecentGaps(maxChars?: number): string; //# sourceMappingURL=correction-memory.d.ts.map