OCX extends Fossil, a version-control system whose repository also holds forum threads, tickets, wiki pages and tags. Each item Fossil stores is an artifact, named by its hash, and never changes once written. OCX is written in Crystal. It lets people and AI agents work together on a repository. Each element below says what it is, then which axioms (Ax1–Ax5) and virtues (Clarity, Loose Coupling, Demonstrability, Parsimony) justify it.
E1. One store
Everything that must last is a Fossil artifact in the repository: posts, ticket changes, check-ins, tags, wiki pages. A host keeps only passing state of its own: logs, a running session's pipe and socket.
Justified by: Clarity (each fact has one owner), Demonstrability (artifacts are immutable, synced to every clone, and readable later), Parsimony (no second database or queue).
E2. Logins
Every actor, person or agent, acts as a Fossil login of its own. An agent's login never holds admin or setup. Fossil records which login sent each artifact; that, not the name written inside it, is who wrote it.
Justified by: Ax1 (what an agent may do is fixed in advance by its login's capabilities), Demonstrability (every artifact is attributed), Ax4.
E3. The record
A task is defined by a record: a fenced JSON block, the first post of a forum thread (or a change on a ticket). It is the task's contract:
{
"ocx": 1,
"kind": "record",
"runner": "claude",
"login": "claude-7f3a2b",
"node": "6cbe285e95a3a124176569ee9243f2a4e9ecdc20",
"instructions": "Review each new check-in on dev and record a verdict.",
"wake": [{"on": "post"}],
"hears": null,
"sandbox": {"network": true, "read_only": [], "read_write": []},
"budget": {"wall": "8h"}
}
runner: the agent program, one the host offers (hereclaudeorcodex).login: the agent's own login (E2).node: the host that runs it, by its repository's server-code. Every other host ignores the record.instructions: the task, in words, given to the agent first.wake: what wakes the agent. Each entry hason:post(a post in this thread) orcheck-in(with an optionalbranch). An empty list: only a person starts it.hears: the logins whose posts reach the agent;null: any login holding admin or setup.sandbox: what the agent's processes see of the host besides its own workspace: host paths read-only, host paths read-write, and the network.budget: limits on all its processes together:wallandcpu(spans such as90s,30m,8h),memory(such as32G),processes(a number). A limit not given is not set.
No other keys are allowed. An edit of a record is a new record, asking again.
Justified by: Ax1 (the boundary an agent works within is fixed and readable before it runs), Clarity (one stated contract per task), Demonstrability (the contract is an immutable artifact anyone can check a run against).
E4. The response
When an agent's run ends, its node replies to the record with a fenced JSON block, written as the person who started it:
{"ocx": 1, "kind": "response", "answers": "HASH-OF-RECORD", "outcome": "answered", "note": "ended: exited 0, after 52 seconds"}
outcome is answered, failed or stopped. A run's outcome goes on the
record that asked for it, never on a new thread.
Justified by: Demonstrability (every run's end is recorded where it was asked), Clarity.
E5. The sandbox
An agent's processes run confined: they see only their workspace (a clone of
the repository under the agent's login, with a checkout on its own branch) and
what the record's sandbox names. The confinement is a written plan, so
another mechanism can carry out the same plan.
Justified by: Ax1 (what it may touch is fixed in advance), Ax5 (a failure inside stays inside), Loose Coupling.
E6. Verdicts
A verdict on a check-in is a Fossil tag named audited on it, whose value
begins pass: or fail: and then gives the reason. It counts only when added
by a login other than the check-in's author.
Justified by: Demonstrability (independent, attributed review), Ax4.
E7. The hook
Fossil runs OCX's hook after artifacts arrive. It acts by what arrived:
| Arrived | Action |
|---|---|
| a check-in | start each record whose wake has on: check-in (and matching branch) |
a post in a record's thread, from a login the record hears |
give it to the record's running agent |
| anything else | nothing |
It never acts on a record or a response itself. Each run appends one JSON line to the host's hook log.
Justified by: Ax1 (behavior follows from data arriving, never from a timer), Parsimony, Demonstrability (each run is logged).
E8. The action log
Every action that changes something appends one JSON line to the host's action log: when, the login, the tool, its input, the operations performed, and how it ended. Actions from the web page, the command line and agents leave the same kind of line.
Justified by: Demonstrability (what was done can be checked later), Clarity.
E9. Versions
Every block carries "ocx": 1. A later version may add a key only if it is
optional. A key is never renamed and never changes meaning; that needs a new
version number. A reader refuses a block whose version it does not know.
Justified by: Loose Coupling (other programs can rely on the formats), Ax4.