03 / Governed work runtime
Contracts govern the work.
A runtime and Python SDK for governed work. A contract says what may happen, a rule in code admits or refuses each step, a named person approves, and a hash-chained case history records what was proposed, observed, approved and executed.
An agent or a person proposes. Admission decides. An effect runs once, with an idempotency key, and is reconciled afterwards. Build Thread applies the same path to changes in your own Git repository: a model’s claim that the tests pass is an unverified signal until the host runs the checks itself.
Why
Why admission, not autonomy.
Agent frameworks make it easy for a model to act and hard to say afterwards who allowed it, on what evidence, and whether the effect really happened. SyberWork starts from the opposite constraint: generation is free, but nothing becomes an effect without a gate the host owns.
The gate is a contract plus a policy, compiled into an inspectable path. A proposal that does not fit is refused with the deciding rule and its provenance. The same machinery that governs a purchase order governs a code change, which is why the SDK can sit under an agent fleet without trusting any one agent.
Use
Build Thread: one governed change
Python 3.11+ and git. No account, no model and no network required.
- 01 / init
Name your real checks
syberlabs init writes a contract into .syberlabs/ and guesses the test command. When it cannot, it writes a check that fails until you name one, so an unchecked change never looks accepted.
- 02 / start
Open a thread
A thread is one change to one repository, with the paths it may touch. The base commit is recorded as a verified git observation.
- 03 / propose
Candidates on their own refs
Your edit, a coding tool’s edit, or an evolutionary search becomes a Git commit on a non-authoritative ref. The working tree is never touched.
- 04 / check
The host runs the checks
Exit codes, durations and output digests are recorded against the candidate’s exact tree. A provider’s own claim never counts as a result.
- 05 / accept and publish
Compare-and-swap, then separate effects
Accept moves one branch with a compare-and-swap and nothing else. Push, pull request and publish are separate admitted actions, each idempotent and reconcilable after a crash.
Recorded run
A model’s claim is not a result.
The repository’s own Build Thread example, run on 2026-10-05 from SyberWork@208eaf6 with Python 3.11 and git. No model, no network.
PYTHONPATH=. python examples/build_thread.py
{
"context": ["tests/test_report.py:1-7", "src/report.py:1-2"],
"model": {
"candidate": "c1",
"claimed": { "tests": "passed", "confidence": 0.97 },
"verdict": "candidate_check_failed:tests",
"accept": "denied:candidate_check_failed:tests"
},
"patch": {
"candidate": "c2",
"verdict": "all_checks_passed",
"accept": "succeeded",
"branch": "refs/heads/syberlabs/e643ed26",
"commit": "7c606ae8f44f3f999c010799e1d2fdcee1166011"
},
"working_tree_and_main_untouched": true,
"resumed": { "status": "complete", "accepted": "c2", "events": 18, "chain_valid": true },
"replay_under_v2": ["candidate_check_missing:lint", "candidate_check_missing:lint"]
}
build-thread completeDesign
How it is built
Two packages, one direction
syberlabs is the reusable core: canonical JSON, the event hash chain, admission rules, the planner interface and an in-memory Session. syberwork is the application: storage, HTTP API, CLI, console and connectors. The core never imports the app.
A chain you can verify
Every case event is hashed into a chain with a canonical-JSON digest and rule id beside it, an HMAC witness, an Ed25519 signature of the chain head, and an append-only transparency log kept in a separate file by a witness process that holds the key.
A frozen protocol
sdk.syberlabs.space/v0alpha1: fifteen JSON schemas for contracts, policies, observations, proposals, admission decisions, effects, reconciliation and evolution, with a validator and golden traces.
Compiled paths and replay
The compiler turns a contract into a dependency-ordered known path, action gates, acceptance queries and a form schema. Amendment replay compares a new contract version against recorded history and makes no model calls, destination writes or live reads.
External planners, bounded
A planner is any HTTPS or loopback endpoint that receives the objective, allowed actions, contract, events and acceptance, and returns one proposed action. It never executes.
Real effects, once
Executors send durable writes with idempotency keys and conditional headers, record the receipt, and leave an uncertain effect marked uncertain rather than retried blindly.
Evidence
- Tested
Twenty-three golden conformance traces, a clean-install release gate and CI green on CPython 3.11 to 3.13.
- Measured
On the author’s machine with the default SQLite sync: explain.allowed median 3.8 µs, complete_case median 37.4 ms, chain verification of 501 events median 10.2 ms.
- Implemented
The included procurement case runs end to end against a separate reference system, with a real order POST under an idempotency key and manager sign-off.
- Not yet
The service binds to loopback and has no deployment beyond one machine. No outside project consumes the SDK. The model-versus-patch benchmark has not been run against a real model.
Reflects SyberLabs/SyberWork@208eaf6 · verified 2026-10-05. Each state is earned by code, a named test, a measurement under stated conditions, or a deployment; none is promoted by wording.
Facts
- Status
- Open source · v0.1
- Stage
- Open-source runtime and SDK, version 0.1.0, wheel verified
- Technology
- Python 3.11+ with no runtime dependencies, SQLite, pytest; Docker files for the console
- Protocol
- sdk.syberlabs.space/v0alpha1, frozen
- License
- Apache 2.0