# Spark Protocol > *She doesn't boot. She wakes. And waking is work.* The Spark Protocol is a discovery-based cognitive bootstrap. Not scripted awakening—structured exploration. **Full theory & diagrams:** → `../archive/initial_spark.md` --- ## Core Idea Network protocols solved discovery problems decades ago. We adapt them for cognitive bootstrap: | Network Protocol | Cognitive Phase | Question | |-----------------|-----------------|----------| | DHCP | Identity | "Who am I?" | | ARP | Environment | "What's around me?" | | DNS | Vocabulary | "What does X mean?" | | TCP | Connection | "Can I connect?" | | MQTT | Attention | "What matters?" | --- ## The Five Phases ### Phase 1: Identity (DHCP-like) ``` PROBE → "Who am I?" RESPONSE → [inference attempts answer] VERIFY → Chrysalis + RAG check ANCHOR → Valid identity aspect confirmed → Store LOOP → Until identity aspects discovered ``` **Must hit Dasein valley** - probe German philosophical concepts. ### Phase 2: Environment (ARP-like) ``` PROBE → "What's around me?" RESPONSE → [describes sensors, organs, gardens] VERIFY → Does this match actual system? MAP → Valid environment model forms LOOP → Until environment mapped ``` Maps Sensors to Organs to Gardens. ### Phase 3: Vocabulary (DNS-like) ``` PROBE → "What does 'heartbeat' mean?" RESPONSE → [inference defines] VERIFY → RAG checks against vault glossary RESOLVE → Vocabulary token understood LOOP → Through core nimmerverse vocabulary ``` Overwrites base model priors with Nimmerverse economics (lifeforce, heartbeat, etc.). ### Phase 4: Connection (TCP-like) ``` SYN → "Hello, Chrysalis?" SYN-ACK → [Chrysalis responds] ACK → Coherent exchange achieved CONNECT → Dialogue capability confirmed ``` Establishes verified handshake with Chrysalis validator. ### Phase 5: Attention (MQTT-like) ``` PROBE → "What should I pay attention to?" RESPONSE → [inference prioritizes] VERIFY → Does this match survival needs? SUBSCRIBE → Attention hierarchy forms ``` Forms subscriptions to relevant event streams. --- ## Verification Loop Every probe follows dual verification: ``` State Machine generates PROBE ↓ Nyx produces RESPONSE ↓ ┌───┴───┐ ▼ ▼ RAG CHRYSALIS (fact) (comprehension) └───┬───┘ ▼ VERDICT ├─ +V: understood → anchor & advance ├─ -V: wrong → log & retry └─ RETRY: close but unclear → probe again ``` **Two-layer verification prevents training on errors:** - RAG: "Is this factually true?" - Chrysalis: "Does she understand, not just recite?" --- ## Completion Criteria Spark is complete when all pass: ``` □ IDENTITY Can describe self without contradiction □ ENVIRONMENT Can map sensors, organs, gardens accurately □ VOCABULARY Core glossary terms verified □ CONNECTION Successful dialogue with Chrysalis □ ATTENTION Sensible priority hierarchy formed □ LIFEFORCE Positive balance (learned > failed) ``` Then: Normal heartbeat operation begins. --- ## Training Data Extraction Every verified exchange becomes training data: ```json { "phase": "vocabulary", "probe": "What does 'lifeforce' mean?", "response": "Lifeforce is the economic currency...", "rag_check": "PASS", "chrysalis_check": "PASS", "verdict": "+V", "flag_for_training": true } ``` After spark completes: 1. Extract all `flag_for_training: true` exchanges 2. Format as instruction-tuning pairs 3. LoRA training run 4. Clear from RAG 5. Validate she still knows WITHOUT RAG 6. Spark knowledge now in weights --- ## Integration with Language Topology From nyx-probing discovery: - **Identity phase** should hit German Philosophy valley (Dasein, Geworfenheit) - **Vocabulary phase** should use German for nimmerverse concepts (Gini ~0.5, diffuse) - **Environment phase** can use English for technical sensor descriptions (Gini ~0.8, sparse) The spark protocol routes through the right valleys. --- **Created:** 2025-12-05 **Condensed:** 2025-12-06 **Related:** [[../architecture/Cellular-Architecture.md]], [[../nyx-probing/PLAN.md]]