Read the spec. Find the drift. Generate the fix.
Norma runs the one step the AI build loop was missing: it checks the implementation against the specification, then helps you close the gap.
One more step in the loop. The one that was missing.
Requirements
The spec becomes atomic, testable claims with stable ids.
Implementation
The code is indexed and the relevant files retrieved per claim.
Verdicts
Each claim is met, partial, missing, or contradicted.
Fidelity
Weighted by priority into one reproducible number.
The pipeline, step by step
Spec ingestion
Point Norma at a spec: a PRD, an AGENTS.md, a Spec Kit folder, or any markdown that describes intended behavior. Norma reads it as the source of truth.
Requirement extraction
The prose becomes a list of atomic, testable claims, each with a stable id and a priority of must, should, or may.
Code indexing
The implementation is indexed and, for each requirement, the most relevant files are retrieved so the judge reasons over evidence, not the whole repo at once.
Judging verdicts
Each requirement is judged met, partial, missing, or contradicted, with a rationale and the file locations that justify it.
Scoring fidelity
Verdicts roll into one weighted number, the Spec Fidelity Score. Contradictions are flagged separately, never hidden inside a low score.
Remediation prompt
For every requirement that is not met, Norma explains why, recommends concrete changes, and writes a repair prompt for the agent that wrote the code.
The report
Everything is emitted as a report against an open schema: terminal output for local runs, a PR comment in CI, and JSON for any tool downstream.
One command. Or one workflow.
terminal# install once, then run on any repo with a spec $ npm i -g @norma-sh/norma $ export ANTHROPIC_API_KEY=sk-... $ norma check # no install needed: npx @norma-sh/norma check Spec Fidelity Score 55/100 drift located, per requirement
.github/workflows/norma.ymlon: pull_request steps: - uses: norma-sh/norma@v1 with: threshold: "80" anthropic-api-key: ${{ secrets... }}