Docs
Architecture

System Architecture

Five layers, each grounded in the algebra below it. From the biquadratic equation to the Golden Phase OS kernel.

The Five Layers

α
1. Algebra Corecore/gphase_core.py

The four phase states and the compose operation. Everything in the system derives from this layer. No other layer reimplements the algebra — they all call the core.

Four phase states: Φ0, Φ1, Φ2, Φ3The compose (∘) operationThe phase rail [0, π/φ]The fold-and-snap algorithmThe Associator–Reflection Theorem
π
2. Protocol Layerprotocol/topology_checker.py, encoder.py, checksum.py

Working with streams of states: data ↔ states, integrity checking, topology verification. The protocol layer is the bridge between raw algebra and the machine.

Byte-to-phase encodingTwo-sheet checksumTopology checkerStream integrityPhase-tagged transport
VM
3. Virtual Machinevm/gphase_vm.py

A CPU that executes instructions over the algebra. The VM is the execution engine — it runs GPL assembly programs and enforces phase-state transitions.

8-instruction phase-aware ISAPhase register fileInstruction fetch/decode/executePhase-state enforcementSandboxed execution contexts
ISA
4. Instruction Set Architectureisa/assembler.py, disassembler.py

Human text ↔ binary machine code. The assembler translates GPL assembly into binary; the disassembler reverses the process. The ISA is the interface between the programmer and the VM.

GPL assembly languageBinary encodingAssemblerDisassembler16-bit instruction format
OS
5. Golden Phase OS Kernelkernel/gpl_kernel.py, gpl_process.py, gpl_scheduler.py, gpl_memory.py

Processes, scheduling, memory management — the OS. Golden Phase OS is the top layer of the Golden Phase Runtime. It manages resources, arbitrates phase transitions, and provides the operator interface.

Process modelPhase-aware schedulerPage-tag memory modelPrivilege management (Φ3)Statechain audit log

Design Principles

Single source of truth

There is exactly one definition of the compose operation. Every layer calls the core — none reimplements it. If the core is correct, everything above inherits that correctness.

Strict layering

Each layer imports only the layer directly below it. The kernel does not import the protocol layer; the VM does not import the kernel. This prevents circular dependencies and keeps each layer independently testable.

Verifiable by construction

Every mathematical proposition is verified by a test. Every phase transition is recorded. Every operator action is audited. The system is designed to be inspectable, not just correct.

Honest scope

The system is a software computer, not a hardware replacement. It does not claim capabilities it does not have. Where results are aspirational, they are labelled as such.