Software factory
Tests every AI-written code change before a person approves it.
SyberWork is an open-source Python runtime for AI agents that write, test and repair code. It runs the checks on every change itself. Rules define the allowed steps, a named person approves the work, and a hash-chained log records what was proposed, checked, approved and done.
Build Thread is the part that handles code changes in a Git repository. It runs the checks before accepting a change, whatever the model says about its own tests. Each action carries a unique key so it cannot run twice, and its result is checked afterwards.
Recorded run
The change claimed its tests passed. SyberWork ran them and they failed.
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 completeWhy
Why check each proposed step?
When an AI proposes an action, people need to know who approved it, what evidence supported it and whether it succeeded. SyberWork checks each proposal against rules controlled by the system running it.
The rules define what may happen and who can approve it. If a proposal breaks a rule, SyberWork refuses it and records the reason and the rule used. The same checks can apply to a purchase order or a code change.
Use
Build Thread: review one code change
Python 3.11+ and git. No account, no model and no network required.
- 01 / init
Name your 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 tracks one change to one repository and names the files it may affect. It records and checks the starting Git commit.
- 03 / propose
Keep proposed edits separate
Your edit, a coding tool’s edit, or an automated search result is saved as a separate Git commit for review. It does not change your working files.
- 04 / check
SyberWork runs the checks
Checks run against the exact proposed files. The record keeps their exit codes, how long they took and hashes of their output.
- 05 / accept and publish
Accept the change, then choose what to publish
Accept updates one branch only if it still points to the expected commit. Pushing code, opening a pull request and publishing each require a separate allowed action, with duplicate prevention and recovery checks.
Design
How it is built
Separate the core from the app
The reusable syberlabs package defines the rules, proposal interface and in-memory Session. It uses a fixed JSON format and a hash-linked event history. The syberwork app adds storage, a web API, command-line tools, a console and connectors. The core never imports the app.
A verifiable event chain
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 fixed format for exchanging work records
Fifteen JSON schemas define work rules, observations, proposals, approval decisions, actions, outcome checks and rule changes. The protocol is sdk.syberlabs.space/v0alpha1, with a format checker and reference event sequences.
Plan checks and review rule changes
The compiler turns the work rules into ordered steps, approval checks, completion checks and form fields. Replay shows how changed rules would apply to recorded history without calling a model, changing a destination or fetching live data.
Separate proposals from execution
A planner receives the objective, allowed actions, work rules, history and completion criteria, then proposes one action. It cannot execute the action. It can run through an HTTPS service or a local loopback address.
Prevent duplicate writes
Executors send writes with unique request keys and conditions that prevent duplicates or outdated changes, then record the receipt. If the outcome is uncertain, it stays marked uncertain rather than being 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 one development 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 had one pilot against a real model, on three fixtures that proved too easy; it has no general result yet.
Reflects SyberLabs/SyberWork@208eaf6 · verified 2026-10-05. Each state is backed by code, a named test, a measurement under stated conditions, or a deployment.
Facts
- Status
- Work in progress
- 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
- License
- Apache 2.0