import type { Debt } from '../types'; /** The exact canonical debt output key set, in canonical order. */ export declare const CANONICAL_DEBT_KEYS: readonly ["id", "title", "origin", "priority", "status", "targetSprint", "note"]; /** Keys that legacy writers produced and the canonical projection retires. */ export declare const LEGACY_DEBT_KEYS: readonly ["detail", "resolution", "addedSprint", "severity", "source", "disposition"]; /** Transitional keys handled by a workspace migration before strict sprint validation. */ export declare const LEGACY_MIGRATION_DEBT_KEYS: readonly ["resolvedSprint"]; export declare const DEBT_CLASSIFICATION: { readonly CANONICAL: "canonical"; readonly LEGACY_COMPATIBLE: "legacy_compatible"; readonly REMEDIATION_REQUIRED: "remediation_required"; readonly UNSUPPORTED: "unsupported"; }; export type DebtClassification = (typeof DEBT_CLASSIFICATION)[keyof typeof DEBT_CLASSIFICATION]; export declare const DEBT_DIAGNOSTIC_CODE: { readonly NOT_AN_OBJECT: "NOT_AN_OBJECT"; readonly IDENTITY_NOT_STRING: "IDENTITY_NOT_STRING"; readonly STATUS_NOT_RECOGNIZED: "STATUS_NOT_RECOGNIZED"; readonly ORIGIN_NOT_SPRINT_NUMBER: "ORIGIN_NOT_SPRINT_NUMBER"; readonly PRIORITY_NOT_RECOGNIZED: "PRIORITY_NOT_RECOGNIZED"; readonly TARGET_SPRINT_NOT_NUMBER: "TARGET_SPRINT_NOT_NUMBER"; readonly NOTE_NOT_STRING: "NOTE_NOT_STRING"; readonly MISSING_CANONICAL_FIELD: "MISSING_CANONICAL_FIELD"; readonly LEGACY_KEY_PRESENT: "LEGACY_KEY_PRESENT"; readonly LEGACY_VALUE_NOT_STRING: "LEGACY_VALUE_NOT_STRING"; readonly SEVERITY_NOT_RECOGNIZED: "SEVERITY_NOT_RECOGNIZED"; readonly UNKNOWN_KEY_PRESENT: "UNKNOWN_KEY_PRESENT"; }; export type DebtDiagnosticCode = (typeof DEBT_DIAGNOSTIC_CODE)[keyof typeof DEBT_DIAGNOSTIC_CODE]; /** `blocking` withholds the projection; `info` only records what the projection had to decide. */ export type DebtDiagnosticSeverity = 'info' | 'blocking'; /** * Who may fix the field. `derived` is mechanical, `evidence` is a suggestion backed by an observed * value, and `operator` is a business judgment that canonicalization must be told explicitly. */ export type DebtDiagnosticAuthority = 'derived' | 'evidence' | 'operator'; export interface DebtDiagnostic { /** Stable field path: a canonical or legacy key, or `$root` for the whole entry. */ readonly field: string; readonly code: DebtDiagnosticCode; readonly severity: DebtDiagnosticSeverity; readonly authority: DebtDiagnosticAuthority; /** What was observed, when something was. */ readonly evidence: string | null; /** Never authorization — only a value the evidence supports. */ readonly suggested: string | number | null; /** What a compatibility reader renders when the field is absent. */ readonly lensDefault: string | number | null; } interface AssessmentShape { readonly classification: C; /** The exact seven-field projection, or `null` when none may be trusted. */ readonly canonical: P; /** Legacy-only keys observed on the raw entry, in canonical legacy order. */ readonly legacyKeys: readonly string[]; readonly diagnostics: readonly DebtDiagnostic[]; } export type DebtAssessment = AssessmentShape | AssessmentShape | AssessmentShape | AssessmentShape; export interface DebtAssessmentOptions { /** The enclosing sprint number, used only as the compatibility default for an absent origin. */ readonly sprintNumber?: number | null; } /** * Classify one raw debt entry and, when it is safely readable, project it onto the exact * seven-field canonical shape. Total: any input, including `undefined`, yields an assessment. */ export declare function assessRawDebt(raw: unknown, options?: DebtAssessmentOptions): DebtAssessment; export {}; //# sourceMappingURL=debt-contract.d.ts.map