/** * Shared grade/dimension machinery for aih's read-only SCORED digests — harness maturity * (`scorecard.ts`) and developer readiness (`readiness.ts`). A dimension scores * `round(passed/total*100)`; the overall is a weighted mean; the grade comes from the bands. * * Grade bands (85/70/50/0) + the `round(passed/total*100)` dimension formula are lifted as * short factual constants from @paniolo/scan (cli.js grade bands). paniolo's package license * is unconfirmed, so this attribution is kept self-contained here; only the public formula + * threshold integers are used, no code was copied. */ /** Grade bands (min score → label), lifted verbatim from paniolo (85/70/50/0), aih voice. */ export declare const GRADE_BANDS: readonly [{ readonly min: 85; readonly grade: "mature"; }, { readonly min: 70; readonly grade: "solid"; }, { readonly min: 50; readonly grade: "emerging"; }, { readonly min: 0; readonly grade: "nascent"; }]; export type Grade = (typeof GRADE_BANDS)[number]["grade"]; /** Map a 0–100 score to its lifted letter grade. */ export declare function gradeOf(score: number): Grade; export interface CheckResult { id: string; passed: boolean; /** One-line fix, surfaced verbatim when the check fails. Every check carries one. */ remediation: string; /** The aih artifact/command that defines the check (light evidence grade). */ source: string; } export interface DimensionResult { name: string; weight: number; /** 0..100, `round(passed/total*100)` (lifted formula). */ score: number; checks: CheckResult[]; } /** A dimension's score: the share of its checks that pass, 0–100 (lifted formula). */ export declare function dimScore(checks: CheckResult[]): number; export declare function check(id: string, passed: boolean, remediation: string, source: string): CheckResult; export declare function dim(name: string, weight: number, checks: CheckResult[]): DimensionResult;