The IR is the source of truth
Typed builders describe your app as data. The validator, compiler and runtime share one representation.
Invalid programs are hard to express. Valid programs are cheap to verify.
Give your coding agent a structure it can check: typed views, explicit data and contracts for every behaviour.
Start buildingUnderstand Hozu
ほぞ / A joint that fits.
Create an app, add a feature, check your work. Node 22.18 or newer.
Use --agent agents for Codex, Cursor or Copilot; --agent claude for Claude Code.
npm create hozu@latest my-app -- --agent claude
cd my-app
npm install
npx hozu add feature tasks --page /tasks
npx hozu checkTyped builders describe your app as data. The validator, compiler and runtime share one representation.
Given a state, when an event happens, expect a result. Every machine transition has a contract.
Declare who can see data and how fresh it must be. Hozu derives the render plan; only machine-bound views hydrate.
Each diagnostic carries a location, a cause and a suggested fix. Read it yourself or pass the JSON to your agent.
Hozu is not a separate SPA mode or a place for arbitrary effects in views. It makes behaviour explicit, and asks you to pay for that structure.
A notes app with accounts, built from a spec and then changed by an agent, checked by a hidden acceptance test: per-user isolation, double submit, forms without JavaScript, HttpOnly sessions, and a regression pass after the change.
| Hozu 0.5 | Nuxt | |
|---|---|---|
| Checks passed | 180 / 180 (5 runs, incl. Codex) | 67 / 72 (2 runs) |
| Agent cost to build | 1.38× | 1× |
| Agent cost to change | 1.45× | 1× |
One Nuxt change silently broke three working features; no Hozu run did. The price is extra tokens, mostly spent reading the guide of a framework the model has not seen. Small samples, not failure rates.