Measured against two originals
nerv was designed from two existing harnesses, both written in TypeScript. This compares against those — and then against what happened when each was rewritten in Rust.
The three systems
| pi-ts | 11 npm packages | 150,756 production lines, 6,286 commits. A package graph held by the npm resolver, on the critical path of every build. |
| deepseek-ts | 255 packages | 307,345 lines, 15,210 commits, plus a vendored dependency-injection framework and 989 rows of YAML that decide what is assembled. |
| nerv | 25 crates, 4 repos | 72,532 lines at the time of measurement, 407 commits, nine days old. Four programs that share no code. |
At a glance
Every number measured on the checkouts, not read off documentation.
| pi-ts | deepseek-ts | nerv | |
|---|---|---|---|
| unit | npm package | npm package | cargo crate |
| units | 11 | 255 | 25, in 4 workspaces |
| median unit size | 1,966 | 549 | 2,138 |
| largest unit | 70,067 | 15,593 | 9,004 |
| largest file | 6,592 | 6,443 | 783 |
| files ≥ 800 lines | 48 of 667 | 50 of 1,592 | 0 of 421 |
| build ceremony per unit | 77 lines | 95 lines | 20 lines |
| declared edges per kLOC | 0.14 | 4.24 | 0.81 |
| undeclared test edges | 4 sites | 76, across 50 packages | 0 — structurally impossible |
| lines compiled to test one unit | a whole package — up to 70,067 | ~22,000 | ~8,200 |
| what refuses an undeclared edge | a script, at pre-commit and in CI | a gate that writes the edge into your manifest | the compiler, always |
The verdict, in one sentence
nerv owns the only module boundary of the three that cannot be crossed by accident, and — at the time of the analysis — the only enforcement tier that ran nowhere but a developer's laptop.
Verified by writing the violation rather than reasoning about it:
error[E0433]: failed to resolve: use of unresolved module or unlinked crate magi_host
In pi-ts the same violation type-checks clean and fails at a consumer's runtime. In deepseek-ts it type-checks clean through a match-all alias map, and the gate's remedy is to add the edge to your manifest for you. Across programs it is stronger still: no manifest in the four workspaces names a sibling, so violating that boundary means editing a different repository.
Read on
| what survived the rewrite | both originals were rewritten in Rust. Only the boundaries that were already data came through — which is the most useful thing in this comparison. |
| what a module is | units, edges, and what refuses a violation at each of the three |
| three bets on safety | permission models, and what auditing ours found |
| where vendor knowledge lives | one question, and a tenfold difference in what the answer costs |