SnapKitty Architecture
Status: Research project β inventory-driven design, September 2026.
What Problem Are We Solving?
Existing AI systems produce outputs with no verifiable provenance. A model asserts a fact. There is no chain of custody from assertion back to evidence, proof, or authorization. Outputs are probabilistic, unauditable, and non-deterministic across runs.
SnapKitty asks: can an AI system be built where every output traces back through a formal graph of evidence β proof β decision, sealed with a cryptographic receipt?
A secondary question (under active investigation): can the conventional softmax attention mechanism be replaced with an integer-arithmetic routing mechanism that produces deterministic routing decisions and admits formal verification?
What The Conventional Approach Does
Input
β
Q/K/V projections (matrix multiply Γ 3)
β
QKα΅ (matrix multiply, O(nΒ²))
β
Scale by 1/βd
β
Softmax (exponentials, normalization)
β
Attention weights Γ V (matrix multiply)
β
Output
Characteristics: floating-point throughout, non-deterministic at scale, exponential operations, no formal specification of what the routing decision means.
What SnapKitty Does Differently
Layer 1: Governance DAG (IMPLEMENTED)
Every claim, proof, decision, and execution is a node in a formally specified directed acyclic graph.
EVIDENCE βββββββββββββββββββ
β
[CONSTRAINT checks]
β
CLAIM βββββββ PROOF βββββββ DECISION(authorized) βββ EXECUTION βββ AUDIT
β
POLICY enforces
CONSTRAINT
Implemented in two layers:
ICP-DAG.m(MUMPS): imperative runtime, stores nodes/edges in global arrays, enforces 10 integrity invariantsICP-DAG.lp(ASP): declarative constraint specification, 7 hard constraints. SAT = governance holds; UNSAT = HALT.
Nothing executes without passing this graph. This is not a convention β it is enforced by the ASP solver and the MUMPS gate check.
Layer 2: SUBLEQ Attention (EXPERIMENTAL)
Hypothesis: Softmax attention's probability distribution over relationships can be replaced with integer-comparison-based deterministic routing using the SUBLEQ one-instruction machine.
Activation vector (floats)
β
Quantize: floor(256 Γ |x|) β integers in [0, 255]
β
Reshape into [A, B, C] SUBLEQ triads
β
Load into 256-cell integer memory
β
SUBLEQ: mem[B] -= mem[A]; if mem[B] β€ 0: jump to C
(run max 500 steps)
β
Collect output addresses
β
Born collapse: floor(256 mod Ξ£ Ο^(-i) Β· output_i) β scalar address
β
Selected context / routing result
What this eliminates: matrix multiplication in the routing phase, softmax exponentials. What this does NOT eliminate: float operations at the quantization step. What is not yet measured: whether this produces equivalent attention-like routing quality on any benchmark.
Evidence: j-matrix-twin/subleq_attention.ijs (J language, runnable). Rust/WASM VM: DEVFLOW-FINANCE/snapkitty-wasm/src/subleq_vm.rs (production-ready, 4 tests).
Layer 3: Entropy Governance (PROVED)
Every inference step is gated by a formally proved entropy bound.
Theorem (proved in Lean 4, zero sorry):
F β₯ 1 β T(F) β€ 0.2218 β s = exp(d/T(F)) β₯ 90.75 β H < 0.20 nats
Implementation: snapkitty_entropy.EntropyGovernor(LogitsProcessor) β drop-in for any HuggingFace model.
Layer 4: Formal Algebraic Foundation (PARTIAL)
Jordan Fixed-Point Commutativity (proved): For the Jordan operator T(Ο) = Οβ»ΒΉΒ·UΒ·ΟΒ·Uβ + Οβ»Β²Β·Ο, any fixed point Ο* satisfies [U, Ο*] = 0.
This means: if an agent's state converges under Jordan iteration, the converged state commutes with the unitary evolution operator. The agent cannot be driven out of its converged state by the same unitary that drove it there.
Jacobian Conjecture formalization: sov-kernel-monster/jacobian-formal/JACOBIAN_BRIDGES_COMPLETE.lean β 10 peer-review gap closures, self-declared zero-sorry.
Grey-hat quantum defense: sov-kernel-monster/src/jordan_block.f90 β four invariants enforced in Fortran: side-channel resistance (βU/βt=0), fault injection impossibility (Ο*=ΟΟβ ), coherence ([U,Ο*]=0), entropy bound (Οβ»Β²).
The Canonical SnapKitty DAG
Derived from code (not imposed):
Node
βββ id: string (unique identifier)
βββ type: EVIDENCE | CLAIM | CONSTRAINT | PROOF | POLICY | DECISION | EXECUTION | AUDIT
βββ state: UNKNOWN | OBSERVED | VERIFIED | PROVEN | AUTHORIZED | ACTIVE | PENDING | SEALED
βββ payload: type-specific data
Edge
βββ source: node id
βββ destination: node id
βββ relation: decides | executes | proves | enforces | proven-by | derived-from | supports
Integrity invariants (enforced by both ASP and MUMPS):
- Every edge requires both endpoint nodes to exist
- No self-edges
- Unknown claims cannot reach decisions
- Contradicted claims cannot reach decisions
- Authorization requires proof
- Execution requires authorized decision
- Unknown and verified are mutually exclusive
Is The DAG The Right Common Intermediate Representation?
For governance: YES. The ICP-DAG is the clearest, most implemented piece of the architecture. It already works.
For SUBLEQ attention: PARTIALLY. The SUBLEQ execution graph is NOT a DAG (it can branch backward). The dependency graph of how activation vectors produce routing results IS a DAG. The correct representation is:
- DAG for the dependency structure (which activations produced which routing decision)
- Directed graph (potentially cyclic) for the SUBLEQ execution trace itself
For quantum structures: NO β not all of them.
- Quantum circuit composition: DAG (always)
- Braid group operations: NOT a DAG β braids are reversible and can undo themselves
- Vortex lattice (quantum-wasm): undirected grid graph
- Quantum walk graph: undirected adjacency graph
Correct distinction:
Use DAG for: dependency ordering, governance, provenance, execution ordering
Use directed graph for: SUBLEQ execution trace, state machines with loops
Use undirected graph for: coupling maps, vortex lattices, quantum walk substrates
Use braid for: topological quantum evolution (Οα΅’, Οα΅’β»ΒΉ operations)
Forcing braids or quantum walks into the DAG abstraction would be technically incorrect.
Repository Structure (Proposed)
Based on what actually exists:
snapkitty/
βββ core/
β βββ icp_dag.m # ICP governance DAG (MUMPS) β CORE, WORKING
β βββ icp_dag.lp # ICP ASP constraints β CORE, WORKING
β βββ icp_gov.m # Governance extension β CORE, WORKING
βββ subleq/
β βββ vm.rs # SUBLEQ VM (Rust/WASM) β PRODUCTION
β βββ attention.ijs # SUBLEQ attention (J) β EXPERIMENTAL
β βββ python_port.py # Python port for visualization
βββ resonance/
β βββ vm/ # Resonance ISA VM (Rust, 8 opcodes) β WORKING
β βββ assembler/ # .rasm β bytecode β WORKING
β βββ word.ijs # Resonance Word GF(p) format (J) β WORKING (bug fixed)
β βββ abjad/ # Abjad tokenizer β WORKING
βββ algebra/
β βββ JordanMatrixProof.lean # PROVED (0 sorry)
β βββ EntropyBound.lean # PROVED (0 sorry)
β βββ jordan_block.f90 # Fortran grey-hat layer
β βββ jacobian_bridges.lean # Jacobian Conjecture formalization
βββ quantum/
β βββ formal/
β β βββ FibonacciAnyon.lean # Fusion category (partial proof)
β β βββ BraidCompilation.lean # Braid β gate synthesis (skeleton, sorry)
β β βββ LogicalQubits.lean # Anyon encoding structures
β βββ simulation/
β β βββ quantum_wasm.rs # WASM simulation (vortex lattice) β WORKING
β β βββ topological.rs # Fibonacci anyon sim β WORKING
β βββ entropy/
β βββ quantum.mjs # ANU QRNG integration β WORKING
βββ swarm/
β βββ quantum-swarm.mjs # PRIMARY swarm engine β WORKING
β βββ swarm_coordinator.mjs # 5-agent named roles β WORKING
β βββ sovereign_crew/ # Python CrewAI with entropy gate β WORKING
βββ visualization/
β βββ app.py # Gradio algorithmic art Space
β βββ subleq_engine.py # Python SUBLEQ port
β βββ resonance_word.py # Python Resonance Word port
βββ formal/
β βββ lean/ # All Lean 4 proofs
β βββ agda/ # Agda invariants
β βββ prolog/ # ERE.pl, GJW traversability
βββ benchmarks/ # EMPTY β needs building
βββ tests/
β βββ subleq_vm/ # 4 Rust tests (working)
β βββ resonance_isa/ # 3 Rust tests (working)
β βββ braid/ # 4 Rust tests (working)
βββ docs/
βββ REPOSITORY_INVENTORY.md
βββ ARCHITECTURE.md
βββ DAG.md
βββ QUANTUM_SWARM.md
βββ RESEARCHER_EXPLANATION.md
Algorithm Implementation Status
| Algorithm | File | Working | Tested | Benchmarked |
|---|---|---|---|---|
| SUBLEQ VM | subleq_vm.rs |
β | β | β |
| SUBLEQ Attention | subleq_attention.ijs |
β | β | β |
| Resonance ISA VM | vm/src/lib.rs |
β | β | β |
| ICP Governance DAG | ICP-DAG.m |
β | β | β |
| Entropy Governor | governor.py |
β | β | β |
| Jordan proof | JordanMatrixProof.lean |
β (proved) | β | N/A |
| Entropy bound | EntropyBound.lean |
β (proved) | β | N/A |
| Fibonacci anyon sim | topological.rs |
β | β | β |
| Quantum WASM | quantum_wasm.rs |
β (binary) | β | β |
| ANU QRNG | quantum.mjs |
β | β | β |
| Braid gate synthesis | BraidCompilation.lean |
β (sorry) | β | N/A |
| Grover search | GroverSearch.lean |
partial | β | N/A |
What Is The Main Open-Source Product?
Product name: snapkitty-dag β The SnapKitty Integrity DAG
One-sentence definition: A formally specified directed acyclic graph that gates every claim, proof, decision, and execution in an AI pipeline, enforced simultaneously by Answer Set Programming constraints and an imperative MUMPS runtime, with cryptographic WORM sealing at every node.
Why this over the other candidates:
- SUBLEQ attention is experimental and unbenched β cannot be a product yet
- The Jordan proof is a building block, not a standalone product
- The ICP-DAG is complete, working, tested, and directly usable by anyone building an auditable AI pipeline
- It is the only component that enforces constraints on ALL the other components
The SUBLEQ attention and quantum swarm work are the research tracks that feed into a future version of this product.