-
Notifications
You must be signed in to change notification settings - Fork 0
Reference Implementation
A small, dependency-free Python implementation that exists to prove the standards are implementable and self-consistent — not to be your production runtime.
cd reference/python
python demo.py # 3-agent workflow, executing live
python conformance_test.py # 18 invariant checks
python -m pytest -q # the same checks, under pytestPython 3.9+. No dependencies. No API key. No model.
| Module | Implements |
|---|---|
genesis_gos/task_state.py |
GTS-1 Task State — TaskState, Status, GTSViolation
|
genesis_gos/permission.py |
GPS-2 Permission — Grant, evaluate, Verdict
|
genesis_gos/orchestrator.py |
GOP-3 Orchestration — Orchestrator, Agent, LoopGuard
|
conformance_test.py |
the 18 checks, each mapped to a named invariant |
demo.py |
the QUICKSTART workflow, actually running |
check() records, prints, and asserts. This matters: without the assert, the test_* functions
would return normally even when an invariant was violated, and pytest would report green on a
broken implementation. A violated invariant now fails the run in both modes.
CI runs the suite on Linux, macOS, and Windows across Python 3.9 / 3.11 / 3.12 — nine combinations per push, plus JSON Schema validation and a filename-hygiene gate.
Windows is included deliberately: console encoding (cp1252 vs UTF-8) has broken this suite before. A standard that only demonstrably holds on its author's machine is not a standard.
Building an implementation in another language? Port the 18 checks. When your implementation and the reference disagree on a lifecycle or gate question, the reference — and behind it Conformance — is the tie-breaker.
Implementations in any language are welcome; see Contributing.
Not production infrastructure. Storage is in-memory, there is no persistence layer, no concurrency control, and no network. The value is legibility: you can read the whole thing in one sitting and see exactly how each invariant is enforced.
Genesis Governance OS · an open standard for accountable multi-agent systems · GTS-1 GPS-2 GOP-3 GOS-0
Start
The standards
Verify
Project