
Calor
A programming language for coding agents
Fewer errors. Better refactors. Cleaner merges.
How Calor Makes Rules Explicit
When the rules are visible in the code, AI doesn't have to guess them.
§M{m001:Math}
§F{f001:Square:pub} (i32:x) -> i32
§E{}
§Q (>= x 0)
§S (>= result 0)
§R (* x x)What your AI sees immediately:
- 1Stable ID gives agents a durable target across renames and moves
- 2The precondition is explicit and checked according to contract mode
- 3v0.12.1 can discharge this guard only with a clean, assumption-free proof
- 4The pure effect declaration is checked against known and manifested calls
Your AI Forgot a Network Call. The Compiler Didn't.
See exactly what your code does—even when side effects hide in helper functions.
§M{m001:Orders}
§F{f001:ProcessOrder:pub} (Order:order) -> bool
§E{db}
§C{SaveOrder} §A order §/C
§C{NotifyCustomer} §A order §/Cerror CALOR0410: Function 'ProcessOrder' uses effect 'net'
but does not declare it
Call chain: ProcessOrder → NotifyCustomer → SendEmail
→ HttpClient.PostAsync
Declared effects: §E{db}
Required effects: §E{db,net}
Fix: Add 'net' to the effect declaration:
§E{db,net}What happened: Your AI wrote code that calls NotifyCustomer, which calls SendEmail, which makes a network request. The compiler caught that you didn't declare the network access—before you ran anything. Without effect enforcement, this mismatch would rely on review or tests.
Additional Static Analysis
Run calor --analyze to detect null dereferences, injection vulnerabilities, and arithmetic bugs across your entire codebase.
warning Calor0922: Potential unsafe unwrap without prior
Option/Result check
NullPropagationTransform.calr(75,9)
NullPropagationTransform.calr(81,9)
NullPropagationTransform.calr(86,9)
warning Calor0983: Potential path traversal: tainted data
from FileRead flows to file path
FtpClient.calr(1201,11)
Verified findings only. Use --all-findings for more.
Built for How AI Actually Writes Code
Four features that make AI-generated code easier to check and review
Rules That Enforce Themselves
Define what a function requires and guarantees. Calor proves supported forms and keeps runtime checks when a proof is conditional or unavailable.
§Q (>= x 0)
§S (>= result 0)Declared Side Effects
The compiler checks known and manifested calls against declared effects; interop and unresolved boundaries stay visible as assumptions or diagnostics.
§E{db:rw,net:rw}Rename Without Breaking
Every function has a stable ID. Rename files, move code around—AI agents can still target the same declaration.
§F{f001:Process:pub}Structure AI Can Navigate
Every block opens with a §-prefixed tag. AI tools find any function, module, or loop at a glance—indentation defines scope, just like Python.
§M{m001:App}
§F{f001:Main:pub} () -> void
§P "hello"Measured Across 217 Paired Programs
Eight deterministic calculators compare the same programs in Calor and C#.
The calculator finds more explicit comprehension signals
Contracts and effects add explicit detection signals
The token/character/line composite favors Calor; raw tokens do not
ID-based references improve the measured stability score
Stable IDs improve the measured targeting signals
Structural correctness signals favor Calor in estimation mode
Compilation and structural completeness narrowly favor Calor
C# has slightly more counted semantic elements per token
The Bottom Line
The v0.12 static run favors Calor in seven of eight defined metrics. Its strongest scores come from explicit comprehension and error-detection signals; C# narrowly leads information density. These calculators do not directly measure model productivity or production defect rates.
Try It Now
Three commands to start writing safer code with your AI agent
$ dotnet tool install -g calorOne command. Works on Windows, Mac, and Linux. Requires .NET 10+.
$ calor init --ai claudeTeaches Claude Code the Calor syntax so it can start writing code.
$ dotnet buildCompiles your code and catches bugs—before you run anything.
Ask Calor
Have questions about Calor? Chat with our custom GPT to learn about syntax, best practices, and how to get the most out of the language.