Calor logo

Calor

A programming language for coding agents

Fewer errors. Better refactors. Cleaner merges.

Why AI Makes Fewer Mistakes in Calor

When the rules are visible in the code, AI doesn't have to guess them.

program.calr
§F{f_01J5X7K9M2:Square:pub}
  §I{i32:x}
  §O{i32}
  §Q (>= x 0)
  §S (>= result 0)
  §R (* x x)
§/F{f_01J5X7K9M2}

What your AI sees immediately:

  • 1Permanent ID means AI can find this function even after you rename it
  • 2Rule: input must be >= 0. Compiler enforces this automatically.
  • 3Rule: output must be >= 0. No way to return invalid results.
  • 4No database or network calls—guaranteed by the compiler.

Your AI Forgot a Network Call. The Compiler Didn't.

See exactly what your code does—even when side effects hide in helper functions.

order-service.calr
§F[f_01A8X:ProcessOrder:pub]
  §I[Order:order]
  §O[bool]
  §E[db]

  §C[SaveOrder] order
  §C[NotifyCustomer] order
§/F[f_01A8X]
Compiler Output
error 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. In most languages, this bug ships to production.

Built for How AI Actually Writes Code

Four features that make AI-generated code reliable

Rules That Enforce Themselves

Define what your function should do—like "input must be positive." The compiler proves it, not your tests.

§Q (>= x 0) §S (>= result 0)
Learn more

No Hidden Side Effects

Database calls? Network requests? The compiler tells you exactly where they happen—even buried 5 layers deep.

§E{db:rw,net:rw}
Learn more

Rename Without Breaking

Every function has a permanent ID. Rename files, move code around—AI agents still find exactly what they need.

§F{f_01J5X7K9M2:Process:pub}
Learn more

No More Missing Braces

Explicit start/end tags mean AI can't generate malformed code. No more "unexpected token" from bad indentation.

§M{m_01J5X7K9M2:App} ... §/M{m_01J5X7K9M2}
Learn more

Measured Against Real AI Tasks

We tested how well AI agents work with Calor vs C#. Here's what we found.

Last updated: Mar 15, 2026
Understanding CodeCalor wins
2.22x

AI understands Calor code 1.5x better

Finding BugsCalor wins
1.83x

AI spots 22% more bugs in Calor code

Safe RefactoringCalor wins
1.52x

Code stays correct after restructuring

Accurate EditsCalor wins
1.39x

AI makes precise changes without breaking things

Edge Case HandlingCalor wins
1.30x

Contracts help prevent edge case bugs

Meaning Per LineCalor wins
1.15x

Each line carries more information

First-Try SuccessCalor wins
1.02x

AI generates correct code more often

Code SizeC# wins
0.79x

Calor's explicit rules add some overhead

Calor better
Tie
C# better
|Center line = 1.0x (equal)

The Bottom Line

Calor wins where bugs hurt most: AI understands code better, catches more errors, and makes safer changes. C# wins on familiarity: AI has seen more C# code, so it generates it faster. But as AI learns Calor, the familiarity gap shrinks—the safety advantage doesn't.

Try It Now

Three commands to start writing safer code with your AI agent

calor-terminal
Install Calor
$ dotnet tool install -g calor

One command. Works on Windows, Mac, and Linux. Requires .NET 10+.

Set up your AI agent
$ calor init --ai claude

Teaches Claude Code the Calor syntax so it can start writing code.

Build and check
$ dotnet build

Compiles 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.