import { type MaturityTier } from "./scorer.js"; import type { AxisName, AxisScore, Finding } from "./types.js"; export declare const SCORING_K = 0; export interface AxisFindings { errorCount: number; warningCount: number; infoCount: number; } export interface AxisScoreV2 extends AxisScore { /** Raw 100*(1 - weightedFindings/opportunities), pre-cap. "N/A" when opportunities=0. */ rateScore: number | "N/A"; /** 100 - K*log10(1 + sevPenalty). "N/A" when opportunities=0. */ absoluteCap: number | "N/A"; /** Sum of severity-weighted findings on this axis. */ sevPenalty: number; /** Alias of sevPenalty exposed for clarity in audit artifacts. */ weightedFindings: number; } export interface ScoreResult { finalScore: number | "N/A"; tier: MaturityTier | "N/A"; axes: AxisScoreV2[]; /** Surface K so consumers can audit the formula. */ scoringK: number; /** Present when >=2 axes scored 0 and the score was capped into the Fail band. */ autoFail?: { reasons: string[]; }; } export interface ScoreOptions { /** * Early-adopter grace factor in [0, 1] for the ai-governance axis (#89 / * ADR-0018). The axis score is blended toward 100 (neutral) by (1 - factor), * so a nascent AI surface barely dents the mean. 1 (default) is inert. */ aiGovernanceGrace?: number; } export declare function score(findingsByAxis: Record, opportunitiesByAxis: Record, opts?: ScoreOptions): ScoreResult; /** * Convenience adapter — aggregates a flat `Finding[]` list into per-axis * severity buckets and calls `score(...)`. Used by the audit pipeline so it * does not need to compute the aggregation itself. */ export declare function scoreFromFindings(findings: Finding[], opportunitiesByAxis: Record, opts?: ScoreOptions): ScoreResult;