Simple
Start with a small program you can read, run, and change. Then explore how the same language expresses applications and helps agents work with code.
main() {
String language = "Norm"
List<String> steps = ["Read", "Run", "Change"]
printLine("Hello, ${language}")
for step : steps {
printLine(step)
}
}
Run norm simple.norm → Hello, Norm
Read
Run
Change
Agent first
Use @Document to describe the intent of a declaration and connect related APIs through checked references. The compiler supplies its signature and types; test associations come from @Test.
import std.annotation.Document
import std.testing.Test
@Document(description: "A task visible to the user.")
value Task {
String title
}
@Document(description: "Formats a task title for a summary.")
String describe(Task task) {
return "Task: " + task.title
}
@Test(functions: [describe.function])
Void describesTask() {
require(
condition: describe(Task(title: "Learn Norm")) == "Task: Learn Norm",
message: "task summary"
)
}
@Document(
description: "Entry point for agents exploring task summaries.",
types: [Task.class],
functions: [describe.function]
)
class TaskApi {}
main() {
printLine(describe(Task(title: "Learn Norm")))
}
norm query agent_document.norm describe --source --references --testsnorm query agent_document.norm TaskApi --sourcenorm refactor name agent_document.norm describe --to summarize --previewnorm check agent_document.norm --format jsonnorm test agent_document.norm --format jsonSelected query fieldsdescribe.documentation: Formats a task title for a summary.
describe.references: 4
describe.tests: 1
TaskApi.documentation: Entry point for agents exploring task summaries.
Program outputTask: Learn Norm
Semantic query and refactoring here require the development toolchain. The agent applies previewed edits before verification.
Explore Agent tools →Application development
Each example is a complete runnable file with a checked result. Select the problem you want to explore.
Model identity, values, finite states, named calls, and expression results together.
interface Labeled {
String label()
}
value TaskId {
Integer number
}
enum State {
Ready,
Doing(Integer percent),
Done
}
class Task implements Labeled {
TaskId id
String title
State state
String label() {
String progress = switch state {
case Ready { break "ready" }
case Doing(Integer percent) { break "${percent}%" }
case Done { break "done" }
}
if state == State.Done { "${title} ✓" } else { "${title}: ${progress}" }
}
}
Task newTask(String title, Integer number, State state = State.Ready) {
Task(id: TaskId(number: number), title: title, state: state)
}
main() {
Task task = newTask(title: "Learn Norm", number: 7)
Task same = task
printLine(task.label())
same.state = State.Doing(percent: 50)
printLine(task.label())
same.state = State.Done
printLine(task.label())
}
Run norm application_data.norm
Checked outputLearn Norm: ready
Learn Norm: 50%
Learn Norm ✓
These examples require the development toolchain.
Explore language features →Every learning example is executable and checked against the compiler.