import type { AbapSource, AbapVersion, Finding } from "./engine.js"; /** Curated canonical rewrite for one blocker category — illustrative, not drop-in. */ export interface RewriteRecipe { pattern: string; before: string; after: string; notes: string; } /** The curated rewrite recipe for a readiness category, if one exists. */ export declare function rewriteRecipeFor(category: string): RewriteRecipe | undefined; export interface ReadinessCategory { category: string; label: string; count: number; findings: Finding[]; /** Curated canonical Cloud rewrite for this category (bundled, hand-curated). */ rewrite?: RewriteRecipe; } /** * A released-API observation about a referenced object. Kept SEPARATE from the * parser-level blocker counts/score: it reflects the bundled SAP snapshot * (dated), not abaplint's objective parse, and a system's ATC is authoritative. */ export interface ReleasedApiFinding { /** Referenced object name (upper-cased). */ object: string; /** SAP object type: "TABL" (DB table) or "FUNC" (function module). */ objectType: string; /** Released-API state from the bundled snapshot. */ state: "deprecated" | "not-released"; /** Curated released CDS successor for a classic table, when known. */ successor?: string; file: string; line: number; /** Human-facing explanation of why this was flagged. */ note: string; } /** Letter grade for tech-debt assessments — a banding of blocker density. */ export type ReadinessGrade = "A" | "B" | "C" | "D"; /** * Band the objective blocker count into an A–D Clean Core tech-debt grade, * normalized by file count so a single object and a whole package grade on * the same scale: A = no blockers, B = ≤ 0.5 blockers/file, C = ≤ 2 * blockers/file, D = worse. Same number as the score, different lens — * nothing subjective is mixed in. */ export declare function gradeReadiness(cloudBlockerCount: number, fileCount: number): ReadinessGrade; export interface ReadinessReport { verdict: "ready" | "minor-rework" | "moderate-rework" | "significant-rework"; score: number; /** A–D banding of blocker density (blockers / files) — see gradeReadiness. */ grade: ReadinessGrade; cloudBlockerCount: number; /** Files analyzed — the denominator of the grade's density banding. */ fileCount: number; categories: ReadinessCategory[]; /** Findings that fail even at the classic baseline — fix these first; they are not migration items. */ brokenAtBaseline: Finding[]; /** * Released-API observations from the bundled SAP Cloudification snapshot — * deprecated API usage and direct access to non-released (classic) tables, * with successor hints. Separate from cloudBlockerCount/score by design. */ releasedApiFindings: ReleasedApiFinding[]; /** Date of the bundled released-API snapshot the releasedApiFindings reflect. */ releasedApiSnapshotDate: string; baselineVersion: AbapVersion; scopeNote: string; } export declare const SCOPE_NOTE: string; export declare function checkCloudReadiness(files: AbapSource[], baselineVersion?: AbapVersion): ReadinessReport;