npm.io
6.2.0 • Published 3d ago

@grayhaven/nerve-eval

Licence
Apache-2.0
Version
6.2.0
Deps
1
Size
14 kB
Vulns
0
Weekly
0

@grayhaven/nerve-eval

Provenance-aware evaluation and review-report primitives for Grayhaven Nerve. decodeEvalManifest validates an untrusted corpus manifest before any fixture module is executed, evaluateCase scores rule diagnostics against a case's expected and forbidden findings, and createCorpusReport summarizes results by provenance. Every case declares where it came from (synthetic, datasheet-derived, or field-verified); field-verified cases must name a reviewer role and date, and findings a case did not assert are surfaced for adjudication rather than labeled false positives.

npm install @grayhaven/nerve-eval
import { createCorpusReport, decodeEvalManifest, evaluateCase } from "@grayhaven/nerve-eval"

const manifest = decodeEvalManifest(JSON.parse(manifestJson))
const results = manifest.cases.map((evalCase) =>
  // diagnostics come from compileDesign + runRules on the case fixture
  evaluateCase(evalCase, diagnosticsFor(evalCase))
)
const report = createCorpusReport(results)

report.summary // total, passed, failed, and counts by provenance kind

createReviewReport packages a compiled harness and its diagnostics into a deterministic review report that records the engine, rule set, and an explicit disclaimer. See the docs for the manifest schema and report formats.

Part of Grayhaven Nerve — harnesses as code. Live demo + docs · llms.txt · Apache-2.0