A Mica notebook is a markdown file. That is the whole format: a ```mica code fence is a cell holding one complete program, and the ```output fence that follows it is the recorded result of running that program. The file renders on any git host exactly as written, diffs like the text it is, and opens as an interactive notebook in VS Code with the Mica extension installed. The canonical name is .mica.md — a file called descent.mica.md opens as a notebook by default and still reads as ordinary markdown everywhere else.

Adjust the knob a little against the slope, and the loss falls.

```mica
program Descent;

imp
    WriteLn : std;

var
    a : float64;
    step : int64;

begin
    a := 0.0;

    for step := 1 to 3 do
    begin
        a := a + 0.5;
        WriteLn("step %lld: a=%lf", step, a);
    end;
end.
```

```output
step 1: a=0.500000
step 2: a=1.000000
step 3: a=1.500000
```

Cells are programs

Every cell is one complete program — the same house style the whole tutorial series teaches, with no hidden state between cells and no session to lose. Running a cell compiles and executes it with the installed compiler’s own runner, beside the notebook file: a mica.project next to the notebook serves every cell, so multi-file context works without configuration. A compile error lands as a squiggle on the cell’s own line.

Because each run starts from nothing, a notebook behaves the same on your machine, a colleague’s, and the container: the recorded output is not what happened once on the author’s laptop — it is what happens.

Verify: the document proves itself

Verify Notebook (in the notebook toolbar and the command palette) re-runs every cell and holds each fresh output against the recorded fence. A matching cell gets a success mark; a differing one shows the recorded text and this run’s text side by side; one summary line states the whole document’s verdict:

Verify: all 12 cells hold their promises — every output matches, digit for digit.

Verify never rewrites a recording — it reads promises, it does not renegotiate them. Change one digit of a recorded output and Verify tells you which cell no longer holds; change the program and run the cell to record its new fact deliberately.

This is what Mica’s determinism buys in a document: outputs are facts you can commit, review, and re-check, not residue that ages. The teaching material in this series lives by that rule — and so can yours.

The loss sparkline

When a cell’s output prints a training run’s falling loss — lines anchoring numbers on the word loss — the notebook draws a small line chart of it directly under the digits, and hovering reads back each step and value. Deterministic digits make the plot a fact: the same curve, every run.

The AI course, as notebooks

The twelve-chapter AI course — from one guessed digit to a trained GPT — ships as verified notebooks in the starter container repository’s notebooks/ directory. Clone it, open any chapter, run and verify: every recorded number in the course is a promise the compiler on your machine keeps.

The same chapters exist as pages in this series, beginning with the guessing machine — the notebooks are those chapters in runnable form.

Working without the editor

A notebook is markdown, so nothing about it needs an editor. The container repository carries tools/verify-notebook.sh, a shell twin of Verify: it runs every cell of a notebook with the installed compiler and reports the same promise-by-promise verdict, which makes notebook verification one line in a CI job.