Contracts are JS — Day 1 with sidecar *.nudo.js
· 2 min read
Launch series (2/5) — published together on 2026-09-21. Read in order: Day 0 — observe JavaScript without rewriting it · *Contracts are JS — Day 1 with sidecar .nudo.js · Nudo vs TypeScript — when a JS-first gate is the right tool · Nudo for coding agents — agents.md, agent integration, stable diagnostics · The 22-file smear: how call-site attribution almost shipped fake precision
Nudo’s contract product is not a second type language. Contracts are ordinary JavaScript modules: sidecar *.nudo.js files that auto-bind to same-name exports, or in-source @nudo:contract.
// pricing.nudo.js
import { number, fn } from "@nudojs/core";
export const lineTotal = fn(
{ price: number().gt(0), qty: number().ge(1) },
number().gt(0)
);
npx nudojs check pricing.js
issues
[error] lineTotal: actual ⊭ expected (nudo:constraint-violated)
actual: 0 #exact
expected: price > 0
