# BOOT — run your own procedural clock

This package is not just a website. In `engine/` it carries the
procedural clock: the same engine that stages combinations on
raijinsocial.com, small enough to run anywhere Python 3 runs. Fork
the site and the clock is yours — it reads *your* copy of the graph,
keeps *your* state, and stages combinations for *your* ruling.

## Quick start

From the package root:

```sh
python3 engine/procedural_clock.py init --start 2026-11-17T00:00:00Z
python3 engine/procedural_clock.py tick
python3 engine/procedural_clock.py status
python3 engine/procedural_clock.py harvest
```

- `init` writes `engine/state/state.json` and opens the ledger.
  The start time is ISO 8601 UTC; a 24-hour cycle begins there.
- `tick` processes every due hourly tick — one staged combination
  per tick, graded from the graph. Run it hourly from cron
  (`0 * * * * cd /path/to/package && python3 engine/procedural_clock.py tick`)
  or by hand whenever you return; it is catch-up safe and stages
  nothing twice.
- `status` prints the cycle position as JSON.
- `harvest` closes the cycle with a report in the Charter's return
  format: what was staged, what passed, what remains unknown.

## Prove it first

```sh
python3 engine/selftest.py
```

This boots a throwaway cycle in a temp directory and checks the
whole chain — init, ticking, staged records with their papers, the
model's second opinion, status. It ends with
`BOOT KIT SELFTEST: PASS`, or it tells you what failed.

State lives in `engine/state/` — `state.json`, `LEDGER.md`, and one
JSON record per staged combination under `staged/`. Plain files,
all of them. Set `SI_CLOCK_DIR` to keep state somewhere else.

## The law it runs under

- **Staged is not canon.** The clock proposes; a human promotes.
  A staged record says so in its own fields (`canon: false`).
- **Status merges conservatively.** A combination inherits the
  weaker parent's standing on every dimension. Enthusiasm is not
  evidence; the merge rule is the guard.
- **Every staging passes the license gate.** `engine/license_gate.py`
  classifies the parents before composition; the verdict rides in
  the record's provenance block, and a fork is permitted only on
  GREEN.
- **The graph is the input.** The clock reads `graph.jsonld`,
  `contents.json`, and `relationships.json` from the package root.
  Inside this package they are already beside `engine/`. If you
  carry `engine/` somewhere else, bring those three files with it.

## The model inside

`engine/model.onnx` is the Pair Ranker — a 1.4 KB neural net
trained on this package's own knowledge graph to predict which
entity pairs a typed relationship joins. It **steers the fusing**:
each tick it scores the candidate pairs and the clock stages its
top remaining pick. The rules bound the field — a pair the rule
grader scores zero never becomes a candidate, so the model chooses
only among pairs already found related — and every staged record
carries both grades plus a `selection` block saying who drove the
pick and where the rules had ranked it. It promotes nothing:
staged is not canon, and promotion remains a human act.
`engine/MODEL.md` is its training receipt — data, protocol
(leave-one-out cross-validation), and its measured scores beside
the rule grader's. Inference prefers ONNX Runtime; the identical
weights in `model.npz` run under plain numpy when it is absent,
and if the model cannot run at all the clock falls back to the
rules alone and the record says so.

## An optional reasoning seat

A reasoning language model may sit beside this engine as a
**seat**: a service the operator supplies (via Ollama), never a
file in this package. The named seat is the founder's own model,
**Ouija** (`ollama pull nathansbrown27/Ouija`) — the Mind of his
model family, built for exactly this deliberation role. A
DeepSeek-R1 distill (`deepseek-r1:1.5b`) is a named alternative.
Gigabytes do not ship in a website download, and a generative
model is a deliberator, not a measurement. The seat's work, when
one is seated: read the ledger and the staged records, deliberate
over them, and file proposals or protests in the ledger's terms.
Its authority is the Charter's, the same as Nozen's at the origin:
**converse and propose only** — it never stages, never promotes,
and never verifies its own proposals. `engine/SEAT.md` is the
seat's briefing — hand it to the model as its system prompt.
Seated answers deliberate in Nozen's split before they phrase:
Nomos proposes readings over the record, Zeno consolidates them
against it, and the deliberation receipt renders under the answer.
The clock ticks the same
with no seat filled. The mandala page itself carries the same
arrangement as a chat (the white dot, bottom center): the core
answers from its record with no model at all, and a seated local
model deliberates over that record instead.

## For agents

Read `LEARNING.md` (package root) before operating this engine.
It is the curriculum: how to read the graph, the color code, the
combination discipline, and the Charter you work under. The clock
is a tool in that discipline, not a replacement for it.

## Requirements

Python 3.10 or newer. No packages, no network, no accounts.
The model's ONNX path uses `onnxruntime` if present; without it
the identical weights run under `numpy`; without either, the clock
still ticks and each staged record notes the model was unavailable.
The machinery is open (Apache-2.0): take it, use it, modify it,
fork it, and share it; keep the N8toriousAi attribution and don't
claim your version is the original.
