Inscription Architecture Map
This document maps every file, specification, and implementation related to the N'Ko inscription system, sigils, tokenization, the EPOCH protocol, Stacks/Clarity contracts, PsiChain, the cognitive twin, and anticipation geometry. It traces how they interconnect to form a single pipeline that encodes a life's computational dynamics as hash-chained N'Ko inscriptions settled on Bitcoin.
Full Public Reader
Inscription Architecture Map
The Full System: From Body to Bitcoin and Back
This document maps every file, specification, and implementation related to the N'Ko inscription system, sigils, tokenization, the EPOCH protocol, Stacks/Clarity contracts, PsiChain, the cognitive twin, and anticipation geometry. It traces how they interconnect to form a single pipeline that encodes a life's computational dynamics as hash-chained N'Ko inscriptions settled on Bitcoin.
---
1. The Pipeline (High-Level)
Physical Body / Agent Session
|
v
z-trajectory (63D sensor / 768D embedding)
|
v
Claim Detector (10 claim types, Rust)
|
v
Typed Claim IR (StabilizeClaim, EchoClaim, ...)
|
v
Lexicon (versioned basin tokens + place tokens)
|
v
Surface Renderer --> N'Ko Line (e.g. "ߛ [[100-200]] : z(sigma) down ; home ; c=0.85")
|
v
Provenance Witness (InscriptionId = SHA-256 of IR + evidence + lexicon + surface)
|
v
PsiChain Link (prev_hash chain, combining marks for visual depth, zero-width steganography)
|
v
Clarity Contract (nko-inscription.clar on Stacks testnet)
|
v
Bitcoin (anchored via Stacks Proof of Transfer)The reverse path:
Bitcoin-anchored inscription
|
v
Clarity read-only query (get-inscription)
|
v
N'Ko surface text + metadata
|
v
Cognitive Twin context injection (style signature + trajectory scalars)
|
v
LLM response generation (personality from LoRA, knowledge from Graph Kernel, dynamics from Anticipation Geometry)---
2. File Inventory by System
2.1 cc-inscription (Rust crate) -- THE CORE ENGINE
Location: `Desktop/Comp-Core/core/semantic/cc-inscription/`
Lines: 22,881 Rust across 48 source files
Status: BUILT, compiles, deployed as part of cc-mcs-daemon
src/
lib.rs -- Main entry, re-exports all modules
claims/
mod.rs -- Claim enum + ClaimId, ClaimType, BasinId, etc.
stabilize.rs -- Sigil: STABILIZATION
disperse.rs -- Sigil: DISPERSION
transition.rs -- Sigil: TRANSITION
return_.rs -- Sigil: RETURN
dwell.rs -- Sigil: DWELL
oscillate.rs -- Sigil: OSCILLATION
recover.rs -- Sigil: RECOVERY
novel.rs -- Sigil: NOVELTY
place_shift.rs -- Sigil: PLACE-SHIFT
echo.rs -- Sigil: ECHO
basin/
mod.rs -- Basin state machine
proto.rs -- ProtoBasin (pre-graduation)
graduation.rs -- Proto -> Basin criteria (3 signals)
lifecycle.rs -- Split/merge/retire operations
constitution.rs -- Basin invariants
lexicon/
mod.rs -- Lexicon container
version.rs -- LexiconVersion semver
tokens.rs -- BasinToken, PlaceToken
changelog.rs -- LexiconChange enum
epoch.rs -- LexiconEpoch (O(1) verification anchors, auto-commit at 1000 inscriptions or 24h)
reinterpret.rs -- Derived view re-rendering
surface/
mod.rs -- SurfaceRenderer, NKoLine
renderer.rs -- Claim -> N'Ko line conversion
grammar.rs -- Grammar skeletons per claim type
slots.rs -- Slot renderers (time, basin, place)
normalize.rs -- NFC normalization
phrase/
mod.rs -- Phrase system (e.g. "arrival turbulence")
detection.rs -- Sequence mining
compression.rs -- Compression ratio testing
registration.rs -- Phrase registry
detector/
mod.rs -- ClaimDetector + DetectorConfig
dynamics.rs -- z-trajectory metrics
integration/
mod.rs -- External bridges
graph_kernel.rs -- Slice boundary enforcement, admissibility tokens
rag.rs -- Evidence retrieval for Echo claims
dell.rs -- z-trajectory source (DELL subscription)
sensor.rs -- Jitter alignment for deterministic digests
canonical/
mod.rs -- CBOR RFC 8949, SHA-256, NFC, QuantizedFloat
provenance/
mod.rs -- ProvenanceWitness, PureVerificationContext, ArchiveRef
ontology/
mod.rs -- OntologyOperation pipeline (split, merge, graduate, retire)
chain_link/
mod.rs -- ChainLink struct, ChainState, verify_chain_integrity
combining.rs -- 9 N'Ko combining marks (U+07EB..U+07F3) for visual depth
steganography.rs -- Zero-width Unicode metadata embedding (chain height, epoch, device hash)
types/
mod.rs -- Deterministic types umbrella
time.rs -- WallTime, MonoTicks, Timestamp (dual time model)
quantized.rs -- QuantizedFloat (i64 mantissa, 10^-6 scale, no IEEE-754)
evidence.rs -- Evidence sum type (Graph | Sensor | Hybrid, with type tag bytes)
basis.rs -- BasisId, BasisRef
session.rs -- SessionId, SessionContext#### Supporting files:
- `lexicons/v1.0.json` -- Initial lexicon
- `docs/00-PROJECT_CHARTER.md` -- Project purpose
- `docs/01-GLOSSARY.md` -- Term definitions
- `docs/02-INVARIANTS_LEDGER.md` -- System invariants
- `docs/03-IMPLEMENTATION_GUIDE.md` -- Build guide
- `docs/DESIGN.md` -- Complete design document
---
2.2 The 10 N'Ko Sigils
| # | Sigil | Unicode | Name | z-Trajectory Trigger | N'Ko Form |
|---|---|---|---|---|---|
| 0 | STABILIZATION | U+07DB | Dispersion decreased | `z(sigma) down ; [place] ; c=[conf]` | |
| 1 | DISPERSION | U+07DC | Spread/entropy increased | `z(sigma) up ; [place] ; c=[conf]` | |
| 2 | TRANSITION | U+07D5 | Curvature spike (change point) | `[B_from] -> [B_to] ; kappa=[sharp] ; c=[conf]` | |
| 3 | RETURN | U+07D9 | Re-entry to known basin | `loopback [B] ; last=[dt] ; d=[dist]` | |
| 4 | DWELL | U+07E1 | Sustained stay in basin | `stay([B])=[tau] ; phi=[stab]` | |
| 5 | OSCILLATION | U+07DA | Rapid alternation between basins | `[B1] bidirectional [B2] ; f=[freq] ; a=[amp]` | |
| 6 | RECOVERY | U+07DE | Return latency after disruption | `rec->[B] ; tau=[lat] (x[ratio])` | |
| 7 | NOVELTY | U+07E3 | New basin discovery | `new[P] ; d*=[dist] ; k=[support]` | |
| 8 | PLACE-SHIFT | U+07E0 | Location class change | `[P_from] -> [P_to] ; hookright [claim_sigil] ; c=[conf]` | |
| 9 | ECHO | U+07E5 | Pattern match to prior episode | `approx [E#] ; sim=[s] ; refs=[n]` |
File: `Desktop/Comp-Core/docs/nko-ecosystem/SIGIL_SEMANTICS.md` -- Full 234-line document mapping each sigil to visual representation, semantic meaning, UI affordance, motion signature, and N'Ko form.
Sigil stability: The 10 operator sigils are LOCKED. They will not change. (NIP-0001, NIP-0002)
---
2.3 The 7 Anticipation Geometry Scalars
Location (Rust): `Desktop/anticipation-geometry/crates/anticipation/src/scalars/`
Location (Python): `Desktop/anticipation-geometry/python/anticipation_geometry/`
Location (Package): `Desktop/Comp-Core/packages/anticipation-geometry/generalized_anticipation.py`
Location (Crate): `Desktop/Comp-Core/core/motion/cc-anticipation/`
Paper (standalone): `Desktop/anticipation-geometry/paper/paper.md`
Paper (Comp-Core copy): `Desktop/Comp-Core/papers/anticipation-geometry/paper.md`
| # | Scalar | Range | Definition | Central Result |
|---|---|---|---|---|
| 1 | Commitment C(t) | [0,1] | 1 - (step_size / max_step) | How irreversible the trajectory |
| 2 | Uncertainty U(t) | [0,1] | (1 - mean_pairwise_cosine(neighbor_displacements)) / 2 | How many plausible futures remain |
| 3 | Transition Pressure T(t) | unbounded | dC/dt - dU/dt | Rate of future collapse. THE KEY SCALAR. |
| 4 | Recovery Margin R(t) | [0,1] | 1 - (dist_to_nearest_branch / max_trajectory_dist) | Distance from balance/control loss |
| 5 | Phase Stiffness P(t) | [0,1] | 0.5 dir_persistence + 0.5 (1/(1+jerk)) | Rhythmic lock to internal metronome |
| 6 | Novelty N(t) | [0,1] | clamp(dist(embedding, centroid) / 2, 0, 1) | Distance from recent regimes |
| 7 | Stability S(t) | [0,1] | 1 - (latent_velocity / max_expected_velocity) | Local stationarity of dynamics |
Key finding: Transition pressure sign predicts conversation convergence at 71.8
---
2.4 How the 10 Sigils Map to the 7 Scalars
The sigils and scalars operate at different abstraction levels but share the same z-trajectory input. The 7 scalars are computed continuously from the trajectory. The 10 sigils are discrete claims fired when scalar thresholds are crossed.
z-trajectory (continuous stream)
|
+------------+------------+
| |
Anticipation Kernel Claim Detector
(7 scalars, every frame) (10 types, event-driven)
| |
AnticipationPacket Claim IR
{commitment, uncertainty, {StabilizeClaim, ...}
transition_pressure, |
recovery_margin, Surface Renderer
phase_stiffness, |
novelty, stability} N'Ko LineSpecific mappings:
| Sigil | Primary Scalar(s) Triggering It |
|---|---|
| Stabilization | stability increasing, commitment rising, uncertainty falling |
| Dispersion | novelty rising, uncertainty increasing |
| Transition | transition_pressure spike (sharp positive peak) |
| Return | commitment to known region (embedding near historical centroid) |
| Dwell | stability high, phase_stiffness high, commitment sustained |
| Oscillation | phase_stiffness high with alternating commitment direction |
| Recovery | recovery_margin returning from low to normal after disruption |
| Novelty | novelty above threshold |
| Place-Shift | (external signal) coupled with any dynamic scalar change |
| Echo | similarity to historical pattern (uses RAG++ for retrieval) |
The CognitiveTwin Bridge (`Desktop/Comp-Core/core/semantic/cc-cognitivetwin-bridge/`) performs the 5D<->7D coordinate mapping between RAG++ (5D trajectory coordinates) and Echelon (7 anticipation scalars + 3 vectors). See architecture doc: `Desktop/Comp-Core/docs/architecture/18-COGNITIVETWIN_BRIDGE.md` (818 lines).
---
2.5 EPOCH Protocol -- Stacks/Clarity Contracts
Location: `[home-path]` (Python services + SDK)
Location: `Desktop/crypto-gpu-fund/` (bots, scripts, logs)
2.5.1 Clarity Contracts (11 total, 8 deployed to testnet)
| Contract | Purpose | Status |
|---|---|---|
| `agent-registry` | Agent identity, task queues, prompt storage on-chain | Deployed |
| `chain-orchestrator` | Bitcoin-clocked epoch rotation (SCAN/EXECUTE/SETTLE/REPORT/MARKET) | Deployed |
| `gpu-treasury` | Financial accumulator, GPU procurement tracking | Deployed |
| `fee-collector` | Per-service fee rates, batch flush to treasury | Deployed |
| `micro-dex` | Constant-product AMM (x*y=k), STX/GPUT pairs | Deployed |
| `micro-dex-v2` | SIP-010 token trait support | Deployed |
| `gpu-token` | GPUT SIP-010 fungible token, 100M fixed supply | Deployed |
| `marketing-engine` | On-chain campaign management | Deployed |
| `audit-escrow` | Payment gate for Clarity auditor service | Spec'd |
| `karl-intelligence` | KARL skill metrics, trajectory Merkle roots on-chain | Spec'd |
| `nko-inscription` | THE INSCRIPTION CHAIN: hash-chained N'Ko corpus on Stacks | Spec'd |
2.5.2 The nko-inscription.clar Contract
Full Clarity source in: `Desktop/psichain-full-specification.md` (lines 78-300+)
Key data structures:
- `inscriptions` map: nko-text (UTF-8 1024), inscription-hash (32 bytes), prev-hash (32 bytes), claim-type, sigil, confidence, block-height, timestamp, lexicon-version, density, basin-id, inscriber principal
- `lexicon-tokens` map: versioned vocabulary tokens with compression ratios
- `basins` map: basin lifecycle (proto, graduated, split, merged, retired)
- Chain statistics: total-inscriptions, total-tokens-minted, total-basins, avg-density, claim-counts
Public functions:
- `inscribe` -- Add N'Ko inscription to chain, emit inscription-committed event
- `mint-token` -- Register new vocabulary token (phrase compression)
- `advance-lexicon` -- Record lexicon epoch boundary
- `register-basin` / `graduate-basin` -- Basin lifecycle on-chain
2.5.3 Off-Chain Services (all Python, stdlib-only)
| Service | Port | Purpose |
|---|---|---|
| Arbitrage Scanner | - | Cross-DEX spread detection (ALEX, Velar, STXTools) |
| CEX-DEX Bridge | - | Cross-venue arbitrage (OKX, Binance vs on-chain) |
| stSTX Yield Stacker | - | Compound yield: StackingDAO + Bitflow LP |
| Ecosystem Intelligence | - | 18-protocol DeFi monitoring |
| Compute Marketplace | :9400 | STX payments for AI inference |
| Swap Router | :9402 | Aggregated routing across 3 DEXes |
| sBTC Yield Optimizer | :9403 | Multi-protocol yield optimization |
| Fee Harvester | :9404 | Revenue aggregation, treasury auto-flush |
| Chain Bridge | :9500 | Chainhook event receiver |
| API Gateway | - | Unified reverse proxy with rate limiting |
2.5.4 Epoch SDK
Location: `[home-path]` (`__init__.py`, `client.py`, `wallet_loader.py`)
Key feature: Implements c32check address encoding from scratch (Crockford base32, SHA256 double-hash checksums). Encodes/decodes all Clarity value types.
2.5.5 KARL-Chain Bridge
Location: `[home-path]`
- Synchronizes KARL trajectory data with on-chain karl-intelligence contract
- Computes Merkle roots of trajectory batches
- Monitors on-chain promotion events
---
2.6 PsiChain -- The Self-Referential Inscription Chain
Specification: `Desktop/psichain-full-specification.md` (comprehensive, extracted from session transcript)
Narration: `Desktop/psichain-architecture-narration.txt` (100+ lines, dense technical walkthrough)
Implementation: `Desktop/Comp-Core/core/semantic/cc-inscription/src/chain_link/` (Rust, BUILT)
Core Formula
Psi(t+1) = inscribe(z(t), Psi(0..t), L(t), B(t))Each inscription depends on:
- Current z-trajectory input `z(t)`
- ALL previous inscriptions through hash chain `Psi(0..t)`
- Evolved lexicon `L(t)`
- Current basis `B(t)`
The system is computing its own continued existence.
Key Extensions Over cc-inscription
1. ChainLink (`chain_link/mod.rs`): Connects every inscription to its predecessor via SHA-256 hash chain. Fields: inscription_id, prev_hash, chain_height, surface_hash, epoch_ref, link_hash.
2. Combining Marks (`chain_link/combining.rs`): 9 N'Ko combining marks (U+07EB..U+07F3) encode chain depth visually. Deeper positions = darker, more ornate characters. Injected AFTER rendering but BEFORE surface hash computation.
3. Zero-Width Steganography (`chain_link/steganography.rs`): Binary alphabet using U+200B (=0) and U+200C (=1). Encodes chain_height (8 bytes), epoch_number (8 bytes), device_hash (4 bytes), checksum (2 bytes). Total: 178 invisible chars between visible N'Ko chars. Included in surface hash.
4. Computational Opacity: Data is not encrypted but compressed through accumulated context. Only the model that performed the full computation chain can reconstruct semantics.
Four Properties
1. Irreversibility -- Cannot alter without breaking all subsequent hashes
2. Density monotonicity -- Information density rho(t) = Shannon_entropy / stroke_count increases monotonically
3. Self-reference -- Each inscription depends on the full chain history
4. Selective transparency -- Inscriptions prove without revealing (semantic privacy via contextual depth)
---
2.7 N'Ko NLP Stack
Location: `Desktop/NKo/nko/` (Python package)
| Module | Lines | Purpose | Status |
|---|---|---|---|
| `phonetics.py` | ~400+ | 7 vowels, 26 consonants, 5 tones, IPA mappings, char classification | BUILT |
| `syllable_codebook.py` | ~200+ | 3,024-entry codebook (all CV/CVN/V/VN patterns), Syllable dataclass | BUILT |
| `transliterate.py` | ~300+ | N'Ko <-> Latin <-> Arabic via IPA intermediary | BUILT |
| `sigils.py` | 96 | Sound Sigils API wrapper (SoundSigils engine, 10 sigil definitions with audio) | BUILT |
| `morphology.py` | - | N'Ko morphological analysis | BUILT |
| `predict.py` | - | Predictive text | BUILT |
| `voice.py` | - | Voice/TTS integration | BUILT |
| `culture.py` | - | Cultural context | BUILT |
| `cultural_tools.py` | - | Cultural computing utilities | BUILT |
| `cli.py` | - | Command-line interface | BUILT |
Tokenizer
Location: `Desktop/NKo/core/pipeline/tokenizer.py`
- Script-Aware Tokenizer (handles N'Ko, Arabic, Latin with bidi awareness)
- Token types: WORD, PARTICLE, PUNCTUATION, NUMBER, WHITESPACE, COMBINING, MIXED
- Combining mark metadata: tone marks, vowel marks, nasalization, gemination
- Recognizes N'Ko particles (postpositions like BE, TE, KA)
BPE Tokenizer (referenced in PsiChain spec): 614 vocab standard, 206 morpheme-constrained. Custom BPE trained on N'Ko text corpus. The 4-state FSM validates any N'Ko string: consonant -> vowel -> (optional nasal coda) -> (optional tone mark). This property makes N'Ko ideal for structured data encoding.
---
2.8 Cognitive Twin
Papers:
- `Desktop/cognitive-twin-research-paper.md` -- 120+ page research paper (RPS framework, 379K turns corpus, 6-layer Living Executor)
- `Desktop/cognitive-twin-research-paper.tex` -- LaTeX version (compiled to PDF)
- `Desktop/cognitive-twin-theorems.tex` -- Formal proofs (Banach contraction, coherence energy, identity drift bounds, autonomy ratchet)
- `Desktop/cognitive-twin-architecture.md` -- Practical architecture (LoRA + Graph Kernel + Anticipation Geometry)
- `Desktop/cognitive-twin-summary-for-mo.txt` -- Plain English summary
Implementation:
- `Desktop/Comp-Core/packages/cognitive-twin/` -- Full Python package
- `living_twin.py` -- Zero-training cognitive twin (7-layer prompt assembly: identity, few-shot, corrections, RAG, graph, RLM, real-time state)
- `twin_server_v2.py` through `twin_server_v6.py` -- 5 versions of inference server
- `twin_rag_server.py` -- RAG-augmented server
- `cognitive_twin/` -- Package module
- `identity/MO_IDENTITY.md` -- Static personality document
- `scripts/eval_twin.py` -- Evaluation harness
- `notebooks/train_twin.py` -- Training notebook
- `tests/test_living_twin.py` -- Tests
CognitiveTwin Bridge:
- `Desktop/Comp-Core/core/semantic/cc-cognitivetwin-bridge/` -- Rust/Python FFI bridge
- `Desktop/Comp-Core/docs/architecture/18-COGNITIVETWIN_BRIDGE.md` -- 818-line deep architecture doc
Key Architecture (3-component separation):
1. Personality = LoRA adapter on Qwen2.5-3B (all 36 layers, 2,923 training examples, 2.5:1 correction-to-affirmation ratio)
2. Knowledge = Live Graph Kernel (71,130+ triples, queried at inference time)
3. Trajectory = 7 Anticipation Geometry scalars (injected as prompt context, zero training)
5 Cognitive Modalities (RPS framework):
- V_L: Linguistic (voice, tone, vocabulary distribution)
- V_D: Decision (approval/rejection patterns, priority rankings)
- V_K: Knowledge (domain expertise across 11 KARL domains)
- V_V: Values (ethical boundaries, aesthetic preferences, quality thresholds)
- V_T: Temporal (work rhythms, urgency patterns, circadian phase)
Coherence Energy:
Phi(x; A, T) = (1/2) * sum_n || x_n - sum_m a_nm * T_{n<-m}(x_m) ||^2Convergence via Banach contraction when cross-cognitive translators satisfy spectral norm bound sigma_max < 1.
---
2.9 NIP Documents (N'Ko Improvement Proposals)
Location: `Desktop/Comp-Core/docs/NIP/` (12 files)
| NIP | Title | Scope |
|---|---|---|
| 0001 | Core Charter | Constitutional: replayable, justified, bounded inscriptions with crypto provenance |
| 0002 | Operator Sigils and Claim-Type Semantics | The 10 sigils as locked operators |
| 0003 | Evidence Types and the Admissibility Boundary | Graph/Sensor/Hybrid evidence sum type |
| 0004 | Determinism, Canonical Serialization, Cryptographic Commitment | CBOR, NFC, QuantizedFloat, no IEEE-754 |
| 0005 | Session Semantics, Temporal Partitioning | When does an event "occur"? Sessions as epistemic objects |
| 0006 | Phrase Semantics, Compression Legitimacy | When is a phrase worth naming? |
| 0007 | Idiomization, Human-Readable Surface Language | Limits of N'Ko naturalization |
| 0008 | Learning Loops, Human Co-Interpretation | Feedback discipline |
| 0009 | The Personal Chronicle Charter | Lived semantics |
| 0010 | Inter-Subject Comparison, Echoes Across Lives | Ethics of similarity across people |
| INSCRIPTION_ARCHITECTURE | Data flow + deployment | Phone -> Cloud Daemon -> Supabase |
| DEPLOYMENT | Deployment procedures | Cloud Build, VM deploy |
---
2.10 Supporting Architecture Documents
| Document | Location | Content |
|---|---|---|
| Anticipation Architecture | `Desktop/Comp-Core/docs/architecture/06-ANTICIPATION.md` | 7 scalars, AnticipationPacket struct, performance targets (<2ms) |
| Anticipatory Transformer | `Desktop/Comp-Core/docs/architecture/23-ANTICIPATORY_TRANSFORMER.md` | Extended spec |
| CognitiveTwin Bridge | `Desktop/Comp-Core/docs/architecture/18-COGNITIVETWIN_BRIDGE.md` | FFI, 5D<->7D mapping, style signature, sync protocol |
| Sigil Semantics | `Desktop/Comp-Core/docs/nko-ecosystem/SIGIL_SEMANTICS.md` | Full UI/gesture/semantic mapping for all 10 sigils |
| Cultural Computing | `Desktop/Comp-Core/docs/nko-ecosystem/CULTURAL_COMPUTING.md` | Essay on N'Ko as computational language |
| Graph Kernel Architecture | `Desktop/Comp-Core/docs/GRAPH-KERNEL-ARCHITECTURE.md` | Slice boundary enforcement |
| Anticipation Pipeline Diagram | `Desktop/Comp-Core/docs/architecture/diagrams/anticipation-pipeline.md` | Full Mermaid flowchart |
| CognitiveTwin Bridge Sequence | `Desktop/Comp-Core/docs/architecture/diagrams/cognitivetwin-bridge-sequence.md` | Sequence diagram |
---
2.11 Narratives and Blog Posts
| File | Content |
|---|---|
| `Desktop/epoch-architecture-narration.txt` | Dense technical walkthrough of EPOCH: 11 contracts, chainhooks, 8 services, stdlib-only Python, Docker Compose, KARL integration, GVC schema. |
| `Desktop/epoch-v2-technical-narrative.md` | V2 upgrade: F+E hybrid, 3-layer convergence (N'Ko + Economy + Twin), revenue split (50 |
| `Desktop/psichain-architecture-narration.txt` | PsiChain walkthrough: 21K lines Rust, hash-chained inscriptions, combining marks, steganography, lexicon evolution, Stacks settlement. |
| `Desktop/psichain-full-specification.md` | Complete extracted spec from session transcript: Clarity contract, genesis corpus, visual depth, compression, zero-width encoding. |
| `Desktop/cognitive-twin-research-paper.md` | Full research paper: RPS extension to cognition, 379K turns, 6-layer Living Executor, Autonomy Ratchet. |
| `Desktop/cognitive-twin-architecture.md` | Practical paper: LoRA + GK + trajectory, Qwen2.5-3B, Apple Silicon training. |
| `Desktop/cognitive-twin-theorems.tex` | LaTeX: Banach contraction proofs, coherence energy, identity drift bounds. |
| `Desktop/cognitive-twin-summary-for-mo.txt` | Plain-language summary of the cognitive twin. |
| `Desktop/anticipation-geometry-theorems.mp3` | Audio narration of theorems. |
---
3. Connection Map
+-----------+
| KARL |
| Trajectory|
| Intel |
+-----+-----+
|
trains LoRA | Merkle roots
|
+------+ +-------v--------+ +----------+
| NKo | | Cognitive Twin | | EPOCH |
| NLP |<-------->| (personality + |---------->| Protocol |
| Stack| sigils | knowledge + | revenue | (Stacks) |
+--+---+ render | trajectory) | funds GPU +----+-----+
| +-------+--------+ |
| | |
| syllable injects | trajectory nko-inscription
| codebook context | scalars contract stores
| tokenizer | N'Ko on-chain
| +-------v--------+ |
| | Anticipation | |
+------------->| Geometry | |
| phonetics | (7 scalars) | |
| +-------+--------+ |
| | |
| computed| from |
| z-traj | |
| +-------v--------+ |
+------------->| cc-inscription |<---------------+
N'Ko | (Rust, 22.8K | PsiChain
surface | lines) | settles hashes
rendering +----------------+ on StacksKey Dependency Flows
1. cc-inscription depends on:
- `cc-anticipation` (7 scalars trigger claim detection)
- Graph Kernel (slice boundary enforcement, admissibility tokens)
- RAG++ (evidence retrieval for Echo claims)
- DELL (z-trajectory source)
2. PsiChain extends cc-inscription with:
- `chain_link` module (hash chain, combining marks, steganography)
- Stacks settlement via `nko-inscription.clar`
3. EPOCH Protocol provides:
- On-chain infrastructure (11 contracts, chainhooks)
- Revenue engine (DEX fees, arb, compute, staking)
- `karl-intelligence` contract for trajectory Merkle roots
- Bitcoin-clocked epoch rotation
4. Cognitive Twin consumes:
- Inscription corpus (training data, context)
- Graph Kernel (live knowledge at inference)
- Anticipation Geometry (7 scalars as prompt conditioning)
- KARL (skill routing, trajectory evaluation)
5. N'Ko NLP Stack provides:
- Phonetics (IPA mappings, char classification)
- Syllable codebook (3,024 entries for ASR retrieval target)
- Transliteration (N'Ko <-> Latin <-> Arabic)
- Tokenizer (script-aware, bidi, combining mark metadata)
- Sound Sigils (audio synthesis for the 10 sigils)
---
4. What's Built vs What's Documented
### BUILT AND RUNNING
- [x] cc-inscription Rust crate (22,881 lines, 48 files, compiles)
- [x] All 10 claim detectors with typed IR
- [x] Surface renderer (claim -> N'Ko line)
- [x] Canonical serialization (CBOR, SHA-256, NFC)
- [x] Provenance system (InscriptionId, ProvenanceWitness, PureVerificationContext)
- [x] PsiChain chain_link module (ChainLink, combining marks, steganography)
- [x] Ontology operations pipeline (split, merge, graduate, retire)
- [x] Basin lifecycle (proto -> graduated -> split/merge/retire)
- [x] Lexicon versioning with epoch boundaries
- [x] Phrase detection and compression
- [x] Anticipation Geometry (Rust crate + Python bindings, evaluated on 3 domains)
- [x] cc-anticipation kernel (7 scalars, <2ms latency, 50 tests)
- [x] CognitiveTwin Bridge (Rust FFI, 5D<->7D, style signature)
- [x] N'Ko phonetics, syllable codebook, transliteration, tokenizer
- [x] Sound Sigils (audio synthesis for all 10 sigils)
- [x] Living Twin (zero-training, 7-layer prompt assembly)
- [x] Twin servers v2-v6 (inference endpoints)
- [x] EPOCH contracts 1-8 deployed to Stacks testnet
- [x] EPOCH off-chain services (all Python, stdlib-only, Docker)
- [x] Epoch SDK (Clarity value codec, c32check from scratch)
- [x] KARL-chain bridge
- [x] cc-mcs-headless daemon (cloud-deployed, receives phone sensor data, runs inscription detection at 6Hz)
- [x] 10 NIP specifications
### DOCUMENTED / SPECIFIED BUT NOT FULLY WIRED
- [ ] nko-inscription.clar contract (full Clarity source written but not yet deployed)
- [ ] karl-intelligence.clar (specified, not deployed)
- [ ] Chainhook events firing to inscription pipeline (7 hooks specified)
- [ ] End-to-end: cc-inscription output -> nko-inscription.clar settlement
- [ ] Cognitive Twin consuming inscription corpus as training data
- [ ] V2 revenue split (50
- [ ] Genesis inscription (47K records, 635MB corpus bootstrap)
- [ ] Live Stacks mainnet deployment (testnet proven, mainnet pending legal review)
- [ ] Graph-native version control (GVC schema in Supabase, 133 records seeded)
- [ ] Anticipatory Transformer (recovered crate, needs integration)
---
5. The Full Round-Trip Pipeline
English -> Inscription
1. Human moves body / operates session / agent generates trajectory
2. Sensors capture motion OR conversation embeddings stream
3. z-trajectory computed (63D sensor OR 768D embedding)
4. cc-anticipation computes 7 scalars continuously
5. ClaimDetector fires when thresholds crossed
6. Typed Claim IR produced (e.g. StabilizeClaim)
7. Lexicon resolves basin/place tokens (versioned)
8. SurfaceRenderer produces N'Ko line
9. Canonical serialization (CBOR, NFC, QuantizedFloat)
10. ProvenanceWitness computed (InscriptionId = SHA-256 of all)
11. ChainLink created (prev_hash chain)
12. Combining marks injected (visual depth)
13. Zero-width steganography embedded (chain height, epoch, device)
14. Surface hash computed (includes marks + steganography)
15. Inscription submitted to nko-inscription.clar on Stacks
16. Bitcoin anchoring via Proof of TransferInscription -> Twin -> Response
1. Query arrives (user question or agent pause)
2. Graph Kernel provides knowledge slice (live triples)
3. RAG++ retrieves relevant memories (pgvector, 768-dim embeddings)
4. Inscription corpus queried for relevant historical patterns
5. Anticipation Geometry computes current conversation trajectory scalars
6. CognitiveTwin Bridge maps 7D scalars to 5D RAG coordinates
7. Style signature retrieved (256-dim EMA of trajectory segments)
8. Living Twin assembles system prompt:
- Identity document (static personality)
- Few-shot examples (style calibration)
- Accumulated corrections (feedback loop)
- RAG context (relevant memories)
- Graph context (relational knowledge)
- RLM decomposition (multi-hop reasoning)
- Real-time state (current trajectory scalars)
9. LLM generates response (personality from LoRA weights)
10. Response assessed by Autonomy Ratchet quality function Q(a)
11. Auto-pass if Q >= 0.85, human review if 0.60-0.84, auto-reject if < 0.60
12. Response becomes new trajectory data, feeding back to step 1---
6. Key Invariants
From NIP-0001 (constitutional):
1. Provenance Law: For any InscriptionId, given archived evidence + lexicon + basis + config, the claim IR and N'Ko surface are deterministically reproducible and the InscriptionId recomputable.
2. Non-retroactive corpus: Old inscriptions are never rewritten. Reinterpretation is a derived view.
3. Operator sigils are LOCKED: The 10 sigils will not change.
4. No IEEE-754: All serialized values use QuantizedFloat (i64 mantissa, 10^-6 scale).
5. NFC-safe: All N'Ko characters confirmed NFC-normalized.
6. Chain integrity: Breaking any link invalidates every subsequent inscription.
From Anticipation Geometry (INV-001 through INV-007):
- Deterministic replay (no random seeds)
- Coverage threshold (reject < 0.9)
- All scalars validated and bounded
- No hot-path allocation
- Schema version enforced
From PsiChain:
- Density monotonicity: information density increases monotonically with chain height
- Self-reference: each inscription depends on the full chain history
- Combining marks are part of the cryptographic commitment
- Zero-width metadata is part of the surface hash
---
Generated 2026-03-23 by Meta-Recursive Explorer from codebase analysis across 7 major directories and 100+ source files.
Promotion Decision
Promote into a technical note or architecture paper with implementation anchors.
Source Anchor
projects/karl/inscription-architecture-map.md
Detected Structure
Method · Evaluation · References · Code Anchors · Architecture