/** * @fileoverview Canonical quality score computation for skills * @module @skillsmith/core/scoring/quality-score * @see SMI-3864: Security-informed quality scoring * * Computes a quality score (0-1) for a skill based on: * - Security health (30%) * - Documentation quality (35%, including examples signal) * - Provenance (25%) * - Completeness (10%) * * This is the single canonical formula. All callers (indexer, install, * import scripts) should use this function instead of ad-hoc formulas. */ /** * Input signals for quality score computation. * All fields are optional-friendly — null/undefined/0 get partial or zero credit. */ export interface QualityScoreInput { /** Risk score from SecurityScanner (0-100). Null if not scanned. */ riskScore: number | null; /** Number of security findings */ securityFindingsCount: number; /** Whether security scan passed */ securityPassed: boolean | null; /** Skill description text (for length scoring) */ description: string | null; /** Number of tags */ tagCount: number; /** Whether the skill has a repo URL */ hasRepoUrl: boolean; /** Author name present */ hasAuthor: boolean; /** Trust tier */ trustTier: string; /** Whether the skill has examples (examples.md or ## Examples section) */ hasExamples: boolean; } /** * Compute a quality score (0-1) for a skill based on multiple signals. * * Weight distribution (Review #12): * - Security health: 30% (reduced from 40% to avoid double-counting with riskScore) * - Documentation quality: 35% (increased, added hasExamples signal) * - Provenance: 25% * - Completeness: 10% */ export declare function computeQualityScore(input: QualityScoreInput): number; //# sourceMappingURL=quality-score.d.ts.map