CodeTestament
CodeTestament is a suite of deterministic code analyzers that produce shared scorecard evidence for AI-assisted codebase review.
Its goal is to guide human and AI developers toward better, more maintainable and performant code. Scores express documented product expectations and identify opportunities for improvement; they do not prove defects or replace engineering judgment. The complexity scoring policy records the accepted method-CC bands and the distinction between product decisions and their scoring implementation. Real-world usage and developer feedback should inform explicit, versioned policy revisions.
Run your first scorecard
You need Node.js 20+ and npm. For .NET projects, install the .NET 10 SDK. For Python projects, install Python 3.12.
From the repository you want to assess, install the skill in Codex:
codex plugin marketplace add sean-m-cooper/CodeTestament
codex plugin add codetestament@codetestament
Start a new Codex session in that repository and ask:
Use the CodeTestament code-scorecard skill to run the scorecard against this repo.
If your agent can write only inside the repository, ask it to pass --cache .scorecard/cache/tools to the skill helper and set npm_config_cache to an absolute path under .scorecard/cache/npm for the run. Allow registry access for the first install.
The report shows which dimensions were assessed and the evidence behind their scores. Each fresh run writes its evidence and inspection under .scorecard/<ecosystem>/runs/<runId>/. For the Claude Code marketplace commands and other installation options, see the skill installation guide.
Analyzer outputs
The .NET and JS/TS command-line analyzers write these files by default. Python emits JSON evidence only.
| File | Description |
|---|
.scorecard/<ecosystem>/metrics.csv | Raw code metrics in the shared CSV shape |
.scorecard/<ecosystem>/evidence.json | Scored evidence across stable quality dimensions |
CodeTestament packages are published. NuGet [email protected]
is the .NET default. JS/TS and Python use [email protected]. See the
migration guide for installation and baseline compatibility.
Agent skill
The canonical code-scorecard skill lives in this
repository with its helpers, compatibility manifest, tests and evaluation fixtures.
The codetestament plugin packages it for agent hosts; ai_tools references a
pinned commit instead of maintaining another copy.
See skill installation and maintenance and the
scorecard guide. The skill retains its CC BY 4.0 license;
analyzer code remains MIT. Exact repository pins to supported legacy packages
remain honored; unpinned runs use the verified CodeTestament packages.
Analyzers
| Ecosystem | Location | Package | Status |
|---|
| .NET / C# | analyzers/dotnet | [email protected] NuGet global tool | Available |
| JavaScript / TypeScript / React | analyzers/javascript-typescript | [email protected] npm package | Nine scoped dimensions; scores uncalibrated |
| Python | analyzers/python | codetestament-python in [email protected]; Python 3.12 required | Partial assessment: Method Complexity and Async/Blocking Usage scoring; other evidence unscored |
| Rust | analyzers/rust | Rust crate | Planned next wave |
Shared Contract
The shared scorecard contract is documented in shared/scorecard-schema.
The experimental language adapter contract separates parser facts from shared scoring mechanics. The Python adapter now embeds those facts in evidence v3 through the npm CLI. It scores Method Complexity and, when eligible production async functions exist, Async/Blocking Usage. Error Handling and the other six dimensions remain unscored. It produces no CSV. Any aggregate is explicitly a partial assessment with at most 2/9 dimensions scored.
Stable dimensions:
codeQuality
maintainability
errorHandling
performanceAsync — displayed as Async/Blocking Usage
security
testing
documentation
dependencyManagement
architecture
.NET Usage
Install the .NET 10 SDK and check that dotnet --version selects 10.x in your project directory. Then install the tool and pass your solution or project path.
dotnet tool install -g CodeTestament.Scorecard --version 2.4.3
codetestament-dotnet --solution YourProject.csproj --configuration Release
See the .NET analyzer README for installation, usage, options, filtering, and code-annotation details.
.NET code annotations