Skip to content

Add MUL and Dream bridges to qualia module#124

Merged
AdaWorldAPI merged 1 commit intomainfrom
claude/pr-123-handover-Wx4VA
Feb 16, 2026
Merged

Add MUL and Dream bridges to qualia module#124
AdaWorldAPI merged 1 commit intomainfrom
claude/pr-123-handover-Wx4VA

Conversation

@AdaWorldAPI
Copy link
Owner

Summary

This PR adds two new integration bridges to the qualia module, completing the metacognitive feedback loops:

  1. MUL–Reflection Bridge (mul_bridge.rs): Connects the Meta-Uncertainty Layer's epistemic state to reflection sensitivity, allowing the system's self-assessment to modulate how aggressively it responds to prediction errors.

  2. Dream–Reflection Bridge (dream_bridge.rs): Integrates ghost vectors (sibling bundles from felt traversal) with dream consolidation, enabling the system to generate creative recombinations from uncollapsed context and inject them as hydration context for exploration nodes.

Key Changes

MUL–Reflection Bridge (mul_bridge.rs, ~630 lines)

  • Adaptive Thresholds: Surprise and confidence thresholds that shift based on MUL state:
    • Trust modulation: Low trust (Dissonant) lowers thresholds to flag more nodes for review; high trust (Crystalline) raises them
    • Homeostasis modulation: Anxiety → conservative thresholds, Boredom → aggressive thresholds, Apathy → minimal energy
    • False flow override: Severe false flow forces exploration by dramatically lowering surprise threshold
  • Council Weight Modulation: Homeostasis state adjusts volitional council weights (Anxiety amplifies Guardian, Boredom amplifies Catalyst)
  • MUL-Gated Volitional Cycle: Gate check → adaptive thresholds → council weights → reflection → reclassification
  • Reflection-to-MUL Feedback: Converts reflection outcomes (revision rate, exploration candidates) into PostActionLearning signals that feed back to MUL for DK calibration and trust updates
  • 11 comprehensive tests covering default thresholds, anxiety/boredom/false-flow modulation, council weights, gate behavior, and feedback loops

Dream–Reflection Bridge (dream_bridge.rs, ~280 lines)

  • Ghost Harvesting: Extracts high-resonance sibling bundles from felt paths as GhostRecord structures (branch DN, bundle, resonance, depth)
  • Ghost-to-Record Conversion: Packages ghosts as CogRecords with low NARS confidence (0.25) and neutral frequency (0.5) for dream consolidation input
  • Dream-Reflection Integration: Full cycle that:
    1. Harvests ghosts from felt path
    2. Combines ghost records with session records
    3. Runs dream consolidation on the combined set
    4. Matches dream-produced novels against Explore candidates
    5. XOR-injects matching novels as hydration context
  • Lightweight Variant: dream_consolidate_with_ghosts() for external processing without injection
  • 7 comprehensive tests covering ghost harvesting, record conversion, consolidation, and injection

Module Integration

  • Updated src/qualia/mod.rs to export both new modules
  • Updated HANDOVER.md with detailed documentation of both bridges and their role in the complete sense→feel→reflect→decide cycle

Notable Implementation Details

  • Threshold Clamping: Adaptive thresholds are clamped to valid ranges (0.2–0.9 for surprise_high, 0.1–0.8 for confidence_high) to prevent pathological behavior
  • Reclassification: Reflection entries are re-evaluated with MUL-adapted thresholds, and if Explore candidates change, hydration is re-run
  • Ghost Resonance: Only sibling bundles exceeding the resonance threshold (default 0.4) are harvested, filtering out weakly-relevant context
  • Dream Novelty Detection: Dream-produced records are identified by checking if their content differs significantly from all input records (Hamming distance > CONTAINER_BITS/8)
  • Provenance Tracking: Dream injections add a VERB_DREAM_GHOST edge (0xF9) for tracking which nodes received dream-derived context
  • Feedback Loop Closure: MUL tick receives coherence (1.0 - mean surprise), novelty (fraction of Explore outcomes), challenge (rung depth), and skill (free will modifier) signals derive

https://claude.ai/code/session_01BueV4Zp36RUCmEZiRcq89M

Two new bridge modules completing the sense→feel→reflect→decide→dream cycle:

dream_bridge.rs: Ghost harvesting from felt paths, dream consolidation
with ghost context, XOR-injection of dream novels into Explore nodes.
Closes the loop between sibling bundles (uncollapsed context) and
offline memory consolidation.

mul_bridge.rs: MUL metacognitive state drives adaptive reflection
thresholds (trust, homeostasis, false flow severity). MUL-gated
volitional cycle with council weight modulation. Full feedback loop:
reflection outcomes → PostActionLearning → DK/trust update.

18 tests total (7 dream_bridge + 11 mul_bridge), all passing.

https://claude.ai/code/session_01BueV4Zp36RUCmEZiRcq89M
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@AdaWorldAPI AdaWorldAPI merged commit 2432a0a into main Feb 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants