Quick Start
This walkthrough builds the setup these docs use everywhere: Scoop Society, a small TypeScript API for rating ice-cream parlors. Its src/services/ directory has conventions every service is supposed to follow. We'll make those conventions enforceable, review the code against them, fix a finding, and see the evidence land.
The situation this solves
src/services/README.md says every service validates its input before doing any work, returns domain failures as values (never exceptions), and writes error messages for the API consumer — "rating must be a whole number from 1 to 5", not "invalid input".
Six months pass. Three developers and two coding agents contribute. The README still says the same thing; half the services quietly stopped doing it. Nothing caught it, because nothing could: these are judgment standards, and no linter reads for meaning.
There is a second half to the problem. Agents do their best work against a target they can check — give one a test to pass and it will move mountains; tell it to "follow the conventions" and you get whatever the model guesses that means. praxis eval run turns the conventions into a checkable target: for you before you push, and for any agent told to run it before calling its work done.
Install
npm install -g @zarpay/praxis-cliRequires Node.js 18+.
Initialize
From the repo root:
praxis initThis writes exactly one thing — .praxis/config.json — and claims the directory as a Praxis project. Your specs are your existing READMEs; nothing else is scaffolded. Point sources at the directories your code and specs live in, and configure at least one reviewer:
{
"sources": ["src"],
"reviewers": [
{
"name": "mercury",
"model": "inception/mercury-2.5",
"apiKeyEnvVar": "OPENROUTER_API_KEY"
}
]
}A reviewer is a named model configuration. Teams often run two — different models disagree in useful ways — and every configured reviewer reviews every target. Add a second one whenever you're ready; its verdicts are kept separate, never averaged.
Write the spec
The spec is the README in the directory it governs — documentation and enforcement in one file, so they can't drift from each other. Scoop Society's src/services/README.md:
---
paths:
- "src/services/*.ts"
excludes:
- "src/services/legacy-import.ts"
---
# Service Conventions
Services are where Scoop Society's behavior lives. Every service
follows the same shape so the next reader — human or agent — already
knows how to read it.
- **Domain failures are values, never exceptions.** A service returns
`{ ok: false, error }` for anything a caller could plausibly cause;
`throw` is reserved for programmer error.
- **Error messages are written for the API consumer**: they name what
was wrong and what would be accepted instead. "rating must be a
whole number from 1 to 5" is acceptable; "invalid input" is not.
- **Input is validated before any work happens**, and validation reads
top-to-bottom before the happy path begins.
- **Services do one thing.** If a service grows a second
responsibility, it becomes a second service.Three things to notice:
- The frontmatter is scoping, not prose.
paths:targets the TypeScript files;excludes:shields the legacy file entirely. Structural decisions live in frontmatter, where they are executed — never in the body, where a reviewer could fail to notice them. - Every standard requires reading comprehension. There is no "the file must contain a function named
run" here — a reviewer told the judgment boundary would refuse to check it anyway. Mechanical rules belong in your linter. - The positive example lives in the prose. "rating must be a whole number from 1 to 5" is the example, frozen with the standard it illustrates. Praxis deliberately has no way to bless a live file as an exemplar: live code drifts with its next edit, and a drifted example is worse than none. See Writing Specs.
Run the review
export OPENROUTER_API_KEY=your-key-here
praxis eval run[1/4] src/services/apply-discount.ts
✓ PASS
[2/4] src/services/rank-parlors.ts
✓ PASS
[3/4] src/services/redeem-coupon.ts
✗ FAIL
· Error message 'bad input' tells the consumer nothing about what was wrong or what would be accepted.
· Work begins before the coupon code is validated.
[4/4] src/services/send-newsletter.ts
✓ PASS
==================================================
Summary — corpus conformance (includes pre-spec debt)
==================================================
Coverage:
┌─────────────────────┬───────┬─────────┐
│ COVERAGE │ FILES │ RATE │
├─────────────────────┼───────┼─────────┤
│ Observed │ 4/4 │ 100.00% │
│ Passing │ 3/4 │ 75.00% │
│ Not observed │ 0/4 │ 0.00% │
│ Passing of observed │ 3/4 │ 75.00% │
└─────────────────────┴───────┴─────────┘
Verdicts:
● 3 pass ● 0 warn ● 1 fail
By type:
┌──────────────┬───────────────┐
│ TYPE │ COMPLIANT │
├──────────────┼───────────────┤
│ src/services │ 3/4 compliant │
└──────────────┴───────────────┘
[CACHE] Hits: 0, Misses: 4
[SPEND] Time: 58s, Cost: $0.0041Notice what isn't here: legacy-import.ts. An exclusion in frontmatter is structural — the file never becomes a review unit, and the reviewer never sees it.
Each verdict is cached by a content hash covering everything the reviewer saw — the target, the spec's body, and any context: files the spec declares. Run it again and it's four cache hits, zero API calls. Fix redeem-coupon.ts and only that file re-reviews:
praxis eval run src/services/redeem-coupon.tsThat single-target form is the fast loop: the command you (or your agent) run between edits.
What just became permanent
Every run appended evidence to .praxis/ledger/ — a run record (commit, branch, cost, verdict counts) and one critique record per finding, committed to git alongside the cache. You never manage these files; you spend them:
praxis # orientation: last run, pending triage, debt at a glance
praxis eval report # rates, costs, and epochs computed over the ledgerWhere it goes from here
Run reviews for a week and the same critiques start repeating — "error message tells the consumer nothing" shows up across five services. That's when the axiom loop starts:
praxis axioms triageA curator model labels each pending critique against your active axioms, and sends the rest — the ones no existing axiom matches — to the curation queue. Early on, that's all of them. Then:
praxis axioms curateThe curator clusters that unmatched residue and drafts an axiom — a named category of recurring critique, like "Error messages written for the implementer, not the API consumer"; you accept, the category is traced to the spec passage its norm lives in, and it's live. From then on the issue has a name — AX-b951db — future praxis axioms triage runs label every recurring critique under it (the reviewer itself keeps seeing only the spec), reports chart its prevalence, and praxis axioms show AX-b951db shows the statement with the labeled critiques as live examples. Recurring issues stop being folklore. See the evidence loop.
Optional: the spec layer
Scoop Society also authors its knowledge — experts like a service steward and test steward — under knowledge/. Scaffold that taxonomy with praxis init --spec-layer, then:
praxis compileEach expert compiles into a self-contained SME agent profile, and a compiled profile can itself be the spec its subject matter is reviewed against — the agent you dispatch and the standard you enforce, one file. See Knowledge Primitives and Agent Profiles.
Next steps
- Writing Specs — standards that survive the judgment boundary
- The Evidence Loop — critiques, axioms, the ledger, and reports
- CI Integration — block merges that violate the standard
- praxis eval — the full command reference