Skip to main content

Module scoring

Module scoring 

Source
Expand description

Contract and codebase scoring.

Provides quantitative quality assessment for individual contracts and codebases that consume them. Five dimensions per contract, ten dimensions per codebase (PVScore), grades A-F.

Spec: docs/specifications/sub/scoring.md, docs/specifications/sub/pvscore.md

Modules§

drift
Drift detection — detect stale contracts via git timestamps.

Structs§

CodebaseScore
Score for a codebase that consumes contracts.
ContractScore
Score for a single contract across 5 dimensions.
ScoreProbe
A single probe within a scoring dimension.
ScoringGap
A gap identified by the scoring system.
ScoringWeights
Custom scoring weights for the 5 contract dimensions. Must sum to 1.0 (auto-normalized if not).

Enums§

Grade
Letter grade A-F.

Functions§

pvscore_10dim
Compute the 10-dimension PVScore as a geometric mean on a 0-100 scale.
score_codebase
Score a codebase that consumes contracts via a binding registry.
score_codebase_full
Score a codebase with all optional enrichment: pagerank + drift.
score_codebase_with_pagerank
Score a codebase with pagerank-weighted gap analysis.
score_contract
Score a single contract against its completeness and verification depth.
score_contract_weighted
Score a contract with custom weights for each dimension.