/** * LLM-as-judge + deterministic fallback for learner bug reports. * * Ports notquality's grading rubric (coverage/severity/repro/evidence, RUBRIC_MAX_PTS) * and keyword/severity/repro/evidence heuristics from lib/scoring.ts, with PI-hardened * judge prompts modeled on lib/server/judge.ts. */ import type { LlmProvider } from '../../llm/provider.interface.js'; import { type BugReportInput, type BugReportScoreResult, type ScoreBugReportInput } from '../../schemas/bug-report-score.schema.js'; /** Pinned judge model (claude-haiku-4-5 family). */ export declare const BUG_REPORT_JUDGE_MODEL = "claude-haiku-4-5-20251001"; /** Max points per rubric dimension (ported from notquality grading-rubric.ts). */ export declare const RUBRIC_MAX_PTS = 25; /** Relative severity weights for deterministic severity scoring (lib/scoring.ts). */ export declare const SEVERITY_WEIGHT: Record<'critical' | 'high' | 'medium' | 'low', number>; export interface ScoreBugReportOptions { /** Inject an LLM provider (tests). Defaults to createProvider with pinned judge model. */ llm?: Pick; /** Force deterministic fallback even when ANTHROPIC_API_KEY is set. */ forceDeterministic?: boolean; } export declare function hasQualityRepro(steps: string): boolean; export declare function hasEvidence(report: BugReportInput): boolean; export declare function scoreBugReportDeterministic(input: ScoreBugReportInput): BugReportScoreResult; export declare function delimitUntrusted(label: string, text: string): string; /** * Split prompt: the fixed rubric/instructions go to `system`, the per-call data * (authoritative target + UNTRUSTED, neutralized+delimited learner report) to `user`. */ export declare function buildBugReportJudgePrompt(input: ScoreBugReportInput): { system: string; user: string; }; export declare function parseBugReportJudgeResponse(raw: string): Omit; /** * Score a learner bug report against a planted-bug target. * Uses the pinned LLM judge when ANTHROPIC_API_KEY is configured; otherwise * falls back to deterministic keyword+rubric scoring. */ export declare function scoreBugReport(input: ScoreBugReportInput, options?: ScoreBugReportOptions): Promise; //# sourceMappingURL=bug-report-score.d.ts.map