jev-spec
Checks generated code against the specification that asked for it.
Nozomi Koborinai’s engine compares code and specification by meaning rather than by diff, and Jev answers whether each requirement is actually met.
# jev-spec
[](https://www.npmjs.com/package/jev-spec)
[](https://github.com/nozomi-koborinai/jev-spec/actions/workflows/ci.yml)
[](https://nodejs.org/)
[](https://bun.sh/)
[](./LICENSE)
[](https://github.com/sponsors/nozomi-koborinai)
<p align="center"><img src="./assets/hero.png" alt="jev-spec: catch spec drift on every commit" width="100%" /></p>
🌐 [日本語](README.ja.md) | [简体中文](README.zh.md) | [한국어](README.ko.md)
**Catch spec drift on every commit.** `jev-spec` checks your code against the requirements in your Markdown specification and fails the build when they drift apart. It asks [TypeSafe AI's Jev model](https://docs.typesafe.ai) one focused question per requirement, gets a probability back, and compares it with a threshold you set. That makes it small enough for a pre-commit hook and strict enough for a CI gate.
```text
$ npx jev-spec check
=== jev-spec Check Report ===
Target: auth [✖ FAILED]
Spec files: docs/specs/auth.md
Code files: src/auth/session.ts
Model: jev-1.13.0
✔ REQ-AUTH-01: probability: 0.97
✖ REQ-AUTH-02: probability: 0.08
└─ Violation: Probability 0.08 is below minimum threshold 0.85
✔ introducesUnspecifiedBehavior: probability: 0.03
Overall: ✖ CHECKS FAILED
$ echo $?
1
```
*Example report. The layout is what the CLI prints (timing and cost lines omitted); the probabilities are illustrative.*
`jev-spec` is an independent open-source project. It is not affiliated with or endorsed by TypeSafe AI. Please report problems with `jev-spec` in [this repository](https://github.com/nozomi-koborinai/jev-spec/issues), not to TypeSafe.
---
## Why jev-spec?
Linters and schema checks can tell you that `REQ-AUTH-02` exists, is well formed and is linked from the right place. They cannot tell you whether the code does what `RE