/** * v0.6 Per-template scoring — aggregates findings by template cluster, * computes per-template verdict/risk/categories, and computes the variance * metric (fire-rates, uniformity, top driver). * * Also exposes `siteVerdictFromTemplates` per spec §15.1. * * See spec §4–§5, §15.1. */ import type { RuleResult, Template, Verdict } from "./types.js"; import type { TemplateCandidate } from "./template-detection.js"; export declare function verdictRank(v: Verdict): number; /** * Score all templates. Takes the full findings list (already enriched + overrides applied) * and the template candidates. Returns a Template[] array. * * Per-page findings are tagged with their template signature on the RuleResult. * Site-level findings (no pageUrl) remain untagged. */ export declare function scoreTemplates(findings: RuleResult[], candidates: TemplateCandidate[], urlToTemplate: Map, totalDiscoveredUrls: number): Template[]; /** * Aggregate site verdict from per-template verdicts per spec §15.1. * * - Filter to templates with totalUrls / totalDiscoveredUrls >= 5% * - Long-tail bucket is excluded * - Take the worst verdict among qualifying templates * - If no template meets the 5% threshold, return null (caller uses legacy verdict) */ export declare function siteVerdictFromTemplates(templates: Template[]): Verdict | null; //# sourceMappingURL=per-template-scoring.d.ts.map