A declarative logic VM for JSON. Define rules, compute values, validate constraints — all in pure JSON.
Tenet processes JSON documents through a rules engine:
Your JSON Schema → [Tenet VM] → Validated JSON with computed values
Use it for smart forms, compliance checks, game logic, workflow automation, or anything that needs deterministic rule evaluation.
- Reactive Rules — If-then logic that fires when conditions match
- Computed Fields — Derived values calculated automatically
- Constraint Validation — Min/max, required fields, patterns
- Dynamic Visibility — Show/hide fields based on state
- Temporal Routing — Version rules by effective date
- Attestation Tracking — Validate that signatures were collected
- Runtime Validation — Undefined variables, unknown operators, temporal conflicts
- Static Linter — Catch errors before execution (Go CLI only)
# Build CLI
go build -o tenet ./cmd/tenet
# Run a schema
./tenet run -file schema.json
# Lint (static analysis)
./tenet lint -file schema.json{
"definitions": {
"income": {"type": "number", "value": 45000, "required": true},
"tax_bracket": {"type": "string", "readonly": true}
},
"logic_tree": [
{
"id": "low_income",
"when": {"<": [{"var": "income"}, 50000]},
"then": {"set": {"tax_bracket": "low"}}
},
{
"id": "high_income",
"when": {">=": [{"var": "income"}, 50000]},
"then": {"set": {"tax_bracket": "high"}}
}
]
}Output: tax_bracket is computed as "low".
- Complete Specification — Full schema reference
- API Reference — Go, JavaScript, CLI
- Examples — Real-world schemas
import "github.com/dlovans/tenet/pkg/tenet"
result, err := tenet.Run(jsonString, time.Now())
valid, err := tenet.Verify(completedDoc, baseSchema)import { run, verify } from '@dlovans/tenet-core';
// No initialization needed - pure TypeScript
const result = run(schema);
console.log(result.result.status); // 'READY', 'INCOMPLETE', or 'INVALID'
// Verify transformation
const valid = verify(newSchema, oldSchema);tenet run -file schema.json -date 2026-01-20
tenet verify -new completed.json -base schema.json
tenet lint -file schema.json| Status | Meaning |
|---|---|
READY |
All validations pass |
INCOMPLETE |
Missing required fields or attestations |
INVALID |
Constraint violations |
MIT — see LICENSE