arbiter is a deterministic reasoning and safety-policy engine for Zephyr RTOS.
It provides a YAML model language (ARB), a Python compiler (arbiterc), a C
runtime engine, and Zephyr subsystem integration.
- Languages: C (runtime engine), Python (compiler toolchain), YAML (models)
- Build system: CMake/Zephyr (C), pyproject.toml (Python)
- Test frameworks: ztest (C), pytest (Python), Twister (samples)
- CI: GitHub Actions
- License: MIT
include/arbiter/— Public C API headerslib/— C runtime library sourceslib/arb/— Reusable ARB include fragmentssubsys/arbiter/— Zephyr subsystem (shell, runtime thread, watchdog)python/arbiter/— Python compiler packageschema/— ARB JSON Schemasamples/— 17 sample applications (PID, Kalman, power budget, etc.)tests/zephyr/— C unit tests (ztest)tests/python/— Python tests (pytest)tests/benchmarks/— Engine vs hand-coded C benchmarkssafety/— Safety manual, requirements, plandocs/— Governance and user documentation
- Read AGENTS.md fully before starting any task.
- Log all changes in LEDGER.md.
- Map changes to requirements in docs/REQUIREMENTS.md.
- Verify against docs/TESTS.md.
- All C code uses Zephyr coding style (tabs, K&R braces).
- All files carry
SPDX-License-Identifier: MITheader. - Safety-relevant changes must update
safety/artifacts. - ARB model changes must pass
arbiterc validate. - New samples require: model YAML, main.c, CMakeLists.txt, prj.conf, sample.yaml, testcase.yaml.
- Commits include
Co-Authored-By: Oz <oz-agent@warp.dev>when AI-assisted.
See docs/ARCHITECTURE.md for component breakdown, data flow, and requirement IDs.
- Engine uses no dynamic allocation (no malloc/free).
- All arithmetic uses 64-bit widening to prevent overflow.
- Safety guards always evaluated before other rule classes.
- Model integrity verified via SHA-256 hash.
All specsmith governance operations should be invoked through the
specsmith_run agent tool or the /specsmith REPL slash command.
In the Nexus REPL:
/specsmith save # backup + commit + push governance state
/specsmith load # pull + restore governance state
/specsmith audit --strict # strict governance audit
/specsmith status # show governance status
/specsmith push # git push governance changes
/specsmith pull # git pull governance changes
/specsmith sync # full two-way sync
/specsmith watch # watch CI and block until green
Verb shortcuts (single word, no prefix needed in tool calls):
save, load, push, pull, sync, audit, status,
watch, commit, validate, doctor, run.
These are all equivalent: specsmith_run("save"),
specsmith_run("/specsmith save"), specsmith_run("specsmith save").
This section is non-negotiable. Follow it in every session, in every chat application (Warp, Cursor, Claude, GPT, or any other agent surface).
specsmith kill-session 2>/dev/null || true # kill orphaned processes
specsmith audit --project-dir . # verify governance health
specsmith sync --project-dir . # confirm machine state
specsmith checkpoint --project-dir . # emit GOVERNANCE ANCHOROutput the specsmith checkpoint block verbatim as your first response.
specsmith preflight "<describe the change>" --jsondecision == "accepted"→ proceed; note thework_item_id.decision == "needs_clarification"→ surface theinstructionfirst.- Never make a code change without an accepted preflight.
specsmith checkpoint --project-dir .Output the GOVERNANCE ANCHOR block verbatim in your response, tagged:
⎠ GOVERNANCE ANCHOR:
<paste checkpoint output here>
- Run
specsmith checkpointfirst. - Place the GOVERNANCE ANCHOR at the top of the summary.
- Never omit phase, work items, or health status from a summary.
- What is the current AEE phase?
- What work item is active?
- What was the last preflight decision?
- Is the audit currently healthy?
If any answer is unknown: run specsmith checkpoint and re-anchor immediately.
specsmith save --project-dir . # ESDB backup + commit + push
specsmith kill-session # stop governance-serve and tracked processesNever end a session with uncommitted governance changes.
| When | Command |
|---|---|
| Session start | specsmith audit && specsmith sync && specsmith checkpoint |
| Before any code change | specsmith preflight "<intent>" --json |
| Every 8–10 turns | specsmith checkpoint (output verbatim) |
| Context summary | Checkpoint output at top |
| Session end | specsmith save && specsmith kill-session |
| Drift detected | specsmith checkpoint immediately |