Skip to content

v0.11.0

Release Date: 2026-07-20

Highlights

  • Category Severity Rollup: CategoryResult.Severity is computed automatically from a category's findings, never set independently by the judge
  • TypeScript / Zod Bindings: @plexusone/structured-evaluation npm package generates Zod schemas and TS types from the same Go structs' JSON Schema

Overview

v0.11.0 adds a small, additive field to the rubric report type — CategoryResult.Severity — and ships the first release of a new downstream package: generated TypeScript types and Zod schemas, so TS/JS consumers stop hand-maintaining a parallel type that can silently drift from the real report shape.

New Features

Category Severity Rollup

CategoryResult now carries a Severity field: the highest-severity finding in that category, or empty if it has none. It exists to answer "which categories should I fix first?" — distinct from Score/IntScore, which measure quality, not urgency.

cat := rubric.CategoryResult{Category: "security"}
cat.AddFinding(rubric.Finding{Severity: rubric.SeverityHigh, Title: "..."})
cat.Severity // SeverityHigh

It's computed in two places so it can't go stale: AddFinding recomputes it on every call (the common builder-pattern path), and AddCategoryResult/Evaluate compute it as a safety net for categories built via struct literal or appended directly to Rubric.Categories. An explicitly set Severity is never overwritten, matching the existing compute-if-unset convention already used for Rubric.IntScore and Rubric.Confidence.

New helper:

func WorstSeverity(findings []Finding) Severity

See Findings & Severity for details.

TypeScript / Zod Bindings

@plexusone/structured-evaluation is a new npm package providing Zod schemas and TypeScript types — Rubric, RubricSet, ClaimsReport, SummaryReport — generated from the same JSON Schema the Go library embeds. The Go structs remain the single source of truth end to end: Go struct → JSON Schema (cmd/genschema) → Zod schema (npm run generate) → TS types (z.infer).

npm install @plexusone/structured-evaluation
import { RubricSchema, type Rubric } from '@plexusone/structured-evaluation'

const report: Rubric = RubricSchema.parse(JSON.parse(rawJson))
console.log(report.intScore) // the 1-5 score, correctly typed

Every schema is .strict() — an unrecognized key fails parsing loudly instead of silently reading undefined. This exists to prevent a specific, confirmed bug class: a hand-maintained TS/Go consumer type silently drifting from the real report shape (wrong field names, wrong types, restructured shapes) causes json.Unmarshal/parse errors that get swallowed instead of surfaced.

See the package README for regeneration instructions and known limitations.

Backward Compatibility

CategoryResult.Severity is additive and omitempty. Existing reports and code that don't set it are unaffected; the field is simply empty until computed. No breaking changes.

Commits

  • 9f008ef feat(rubric): add computed CategoryResult.Severity field
  • 4a87481 test(rubric): add tests for CategoryResult.Severity computation
  • 9f8da9f feat(ts): add @plexusone/structured-evaluation Zod/TS package
  • 560d045 docs: document CategoryResult.Severity rollup and TS/Zod bindings, bump ts/ to v0.11.0