0. Introduction

0.1 What Synod describes

Synod describes nodes that keep state, exchange messages over a simulated network, react to events, and are checked against invariants. A separate, purely visual layer turns what happened into an animation.

Three kinds of source live in Synod packages:

0.2 The pipeline

.synod sources ──► compiler ──► simulator ──► trace ──► scene builder ──► scene ──► player
                   (check)     (sim clock)   (facts)   (observers,         (shapes &   (JS canvas:
                                                        presentation clock) keyframes)  Mac app, site)

An LLM (Claude through its CLI, or any agent) only ever writes Synod source.

0.3 A first program

# package main
use github.com/synodlang/examples/tcp
use std/lesson
use std/sim

define main
  set client to (sim.Spawn tcp)
  set server to (sim.Spawn tcp)
  set server.tcp.State to "LISTEN"
  lesson.Note "A connection needs three messages before data can flow."
  deliver (message tcp.Open with Server server) to client

0.4 How to read this specification

"Must", "must not" and "may" are normative. Code blocks marked synod are canonical Synod. Blocks that start with # package are complete files and must pass synod check together with the other files of the same package (a main file is a package of its own); shorter blocks are fragments.