SNAPKITTYWEST's picture
chore: push full sov-kernel-monster content from local build
9425aed verified
|
Raw
History Blame Contribute Delete
4.58 kB
# QUANTUM PIPER β€” Sovereign Quantum Civilization
Inverted Piper architecture. Local-first. WORM-anchored. Capability-gated.
Formal law: `LiquidLean.QuantumPiper` (8-phase pipeline).
## Structure
```
quantum-piper/
β”œβ”€β”€ orchestrator/ BOB sovereign compliance agent β€” WORM, NATS, Ada gate, Lean 4, Prolog
β”œβ”€β”€ kernels/
β”‚ β”œβ”€β”€ fortran/ BOB quantum civilization engine (15 modules: QFT/Grover/Shor/WORM ABI)
β”‚ └── cuda/ RTX 4090 inference β€” PagedAttention PTX, scheduler C--, GGUF loader
β”œβ”€β”€ bindings/
β”‚ β”œβ”€β”€ rust/ bob-quantum-sys β€” Rust FFI over Fortran engine
β”‚ β”œβ”€β”€ elixir/janet/julia/odin/r/racket/zig/
β”œβ”€β”€ reasoning/ BOB reasoning engine β€” SSM pipeline + Lean 4 Goldilocks proof
β”œβ”€β”€ qec/ Quantum error correction β€” stabilizer search (Rust + Fortran)
β”œβ”€β”€ resonance/ quantum.mjs / entropy.mjs β€” superposition monad, Born rule, KL divergence
β”œβ”€β”€ formal/
β”‚ β”œβ”€β”€ axioms/ quantum.axiom β€” base axioms
β”‚ └── lean/ SovereignGate.lean β€” capability gate theorems
β”œβ”€β”€ wasm/ Compiled WASM frontend
β”œβ”€β”€ demos/ BOB vortex civilization ASCII renderer
β”œβ”€β”€ tools/ build_quantum.py, nemotron.py β€” automated build + Nemotron agent
β”‚
β”œβ”€β”€ infra/ SOV-KERNEL-MONSTER sovereign Docker + registry stack (Haiku swarm infra)
β”‚ β”œβ”€β”€ docker-compose.sov.yml gitea + sov-registry-proxy + haiku-fn-ops (internal net only)
β”‚ β”œβ”€β”€ Dockerfile.gitea hardened Gitea from source, FROM scratch, no telemetry
β”‚ β”œβ”€β”€ Dockerfile.hauki Haiku fn-ops runner (Rust, musl static)
β”‚ β”œβ”€β”€ sov-base.Dockerfile base template for all sovereign agent images (FROM scratch)
β”‚ β”œβ”€β”€ sov-registry.yaml standalone local registry, 127.0.0.1:5000
β”‚ β”œβ”€β”€ sov-attest.sh Blake3 hash β†’ Ed25519 sign β†’ .worm sidecar β†’ push
β”‚ └── hooks/
β”‚ β”œβ”€β”€ pre-receive ASP enforcer β€” rejects unsigned/unauthorized git pushes
β”‚ └── verify_asp.pl Prolog deterministic heart β€” architect_key/engineer_key rules
β”‚
β”œβ”€β”€ provision/ Ansible bootstrap for sovereign infrastructure
β”‚ β”œβ”€β”€ sov-bootstrap.yml 6-phase playbook: WORM vol + Ed25519 keys + hooks + deed
β”‚ β”œβ”€β”€ inventory/sov-local.yml 7 identities: architect, 5 engineers, hauki-bot
β”‚ └── templates/sov-worm.mount.j2 systemd unit for persistent loop mount across reboots
β”‚
β”œβ”€β”€ .sov/ Sovereign kernel config (gitignored locally, tracked in WORM)
β”‚ └── personas/
β”‚ └── SnapKitty_Sovereign_Transformer.xml Haiku swarm identity + constraint set
β”‚
└── TRUST_DEED.xml Signed sovereign trust deed β€” ASP_MAXIMAL/STRICT/POLITE_CODING rules
```
## Sovereign Infra β€” How It Works
The `infra/` module implements a **Bifrost WORM-Chain** attestation pipeline for the Haiku swarm:
```
Haiku agent builds image
↓
sov-attest.sh: Blake3(image tar) β†’ Ed25519 sign β†’ write .worm sidecar
↓
git push β†’ sov-git-server (localhost:3000)
↓
pre-receive hook: verify all commits signed, run verify_asp.pl (Prolog)
↓ fail β†’ push rejected
Gitea mirrors to GitHub (--mirror, read-only facade)
↓
haiku-fn-ops: pulls image, checks .worm sidecar, verifies hash + sig
↓ fail β†’ quarantine + alert
VALID β†’ push to GHCR with semver tag. Chain sealed.
```
**Mock mode (current):** `verify_asp.pl` uses deterministic mock fingerprints. `sov-attest.sh`
falls back to `MOCK_SIG` when `BIFROST_KEY` env var is not set. Safe to run and test without
real keys.
**To activate real keys:** run `provision/sov-bootstrap.yml`, copy the Ed25519 fingerprints
from its audit output into `infra/hooks/verify_asp.pl`, set `BIFROST_KEY=/path/to/ed25519.priv`.
## Absorbed from (now archivable)
- `bob-orchestrator` (.newrepos)
- `tmp_bob/`
- `sov-kernel-monster/rust/bob-quantum-sys/`
- `sov-kernel-monster/` multi-lang bindings
- `tmp/main-repo/bob-reasoning-engine/`
- `qec-discovery/`
- `bobs-games/`
- `build_quantum.py`
## Formal law
`liquidlean/src/LiquidLean/QuantumPiper.hs` β€” 8-phase kernel pipeline governs all artifacts.
All kernels must pass: Parse β†’ TypeCheck β†’ Entangle β†’ Optimize β†’ AliveCheck β†’ Compile β†’ Attest β†’ Deploy.