Tenor is a formal contract language for declaring provably correct business logic. You write a single .tenor file that specifies every entity, authority boundary, rule, and workflow in a domain. The evaluator computes deterministic verdicts and action spaces from that specification, and static analysis proves properties of your contracts before they ever run.
This documentation covers the open-source language and toolchain.
Documentation Sections
Getting Started
Install the CLI, write your first contract, and run the evaluator.
- Installation -- CLI and evaluator setup
- First Contract -- Write and evaluate a contract from scratch
- Evaluator -- How deterministic evaluation works
Language Reference
Complete reference for every construct in the Tenor language.
- Overview -- Language structure and concepts
- Symbols, Facts, Entities, Personas -- Data model primitives
- Rules, Operations, Flows -- Decision and workflow logic
- Types, Sources, Systems -- Type system, external data, system integration
- Parallel Composition -- Composing multiple contracts
Guides
Conceptual guides, tutorials, and deep dives.
- What Is Tenor? -- Conceptual introduction
- The Tenor Narrative -- Why Tenor exists and the problems it solves
- Author Guide -- How to write contracts effectively
- Minimal Kernel -- The smallest possible Tenor contract
- Migration Guide -- Migrating existing systems to Tenor
- Trust and Signing -- Cryptographic guarantees and contract integrity
- Source Declarations -- Connecting contracts to external data
SDKs
Client libraries for integrating Tenor into application code.
- Overview -- SDK design principles and common patterns
- TypeScript --
@tenor/sdkfor Node.js and browser - Python --
tenor-sdkfor Python applications - Go --
tenor-gofor Go services
CLI Reference
All 26 commands in the tenor CLI with flags, options, and example output.
Reference
Configuration, error codes, static analysis checks, and executor obligations.
- Configuration --
.tenorrc, environment variables, project config - Errors -- Error codes and diagnostic messages
- Static Analysis -- The eight formal checks (S1--S8)
- Executor Obligations -- What executors must guarantee
Domain Contracts
Six validated domain contracts demonstrating Tenor in production scenarios.
Specification
The full formal Tenor language specification.
Where to Start
New to Tenor? Begin with Getting Started. Install the CLI, write a contract, and see evaluation in action within minutes.
Writing contracts? Read the Author Guide for practical patterns, then use the Language Reference as you write.
Integrating with code? The SDK Overview covers client libraries for TypeScript, Python, and Go. Pick your language and start calling the evaluator from application code.
Open Source
The Tenor language, evaluator, CLI, and static analysis tools are open source. You can write contracts, evaluate them, and run static analysis entirely locally.