Post-processes LLM evaluation verdicts to validate, bucket, and sort code quality findings by severity. Reuse in AI code review systems.
// Source: https://github.com/garrytan/gbrain | License: MIT | Copyright 2026 Garry Tan // Provided via justclaw.it.com; keep this notice with the code. /** * eval-contradictions/severity-classify — M4 severity helpers. * * The judge prompt asks the LLM to assign severity (low | medium | high). * This module: * - Validates the judge's claimed severity against an enum (defaults to 'low' * on garbage input rather than throwing). * - Buckets findings by severity for doctor-style output sort. * - Computes per-page max_severity for the hot_pages roll-up. * * The rubric lives in the judge prompt itself (low = naming/format, * medium = value/state, high = identity/structural). This module is pure * post-processing; it does NOT re-classify or override the LLM's call. */ imp ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key