- Add Big-Picture.md (full architectural overview, Python stack) - Add Message-Protocol-Design.md (NATS router, two-channel attention) - Add assets/ folder (logo favicons, apple-touch-icon) - Move critique to main repo .archive/ Architecture: Dumb core (NATS), smart edges (Python asyncio) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7.7 KiB
Big-Picture Architecture: Nimmerverse Sensory Network
Overview
The Nimmerverse Sensory Network is designed as a highly modular, resilient, and economically constrained system. It follows a "Router-Centric Architecture" where a high-performance message bus acts as dumb infrastructure, and all intelligence and processing logic reside at the "edges" (client services). This approach ensures scalability, maintainability, and clear separation of concerns, while enabling Nyx to manage her attention and Lifeforce efficiently.
Core Principles
- Dumb Core, Smart Edges: The central message router is merely an infrastructure component, devoid of any application logic. All processing, filtering, and decision-making intelligence is distributed among specialized client services.
- Polyglot Architecture: Utilizing the best technology for each specific task: Python for AI/ML, cognitive logic, and service daemons; Godot for visualization; and NATS (Go) as the universal message bus.
- Two-Channel Attention: Information is processed via distinct low-attention (ambient) and high-attention (focal) channels, allowing for efficient resource allocation and preventing cognitive overload.
- Lifeforce Economy: Every operation has a cost. The architecture is designed to optimize Lifeforce expenditure by ensuring expensive cognitive resources are only engaged when truly necessary.
- Testability & Modularity: Each component (client service) can be developed, tested, and deployed independently.
Architectural Components & Technology Stack
1. Message Router (NATS)
- Role: The central nervous system's universal message bus. It receives messages from all clients and routes them to interested subscribers based on hierarchical topic patterns. It has no application logic or state.
- Technology: NATS Server (Go)
- Key Features:
- Extremely high performance and low latency.
- Built-in subject-based filtering and wildcard subscriptions.
- Designed for publish/subscribe, request/reply, and distributed queues.
- Supports
JetStreamfor optional message persistence.
- Integration: All other components connect to NATS as clients.
2. The Escalation Service (Thalamus Function)
- Role: A dedicated daemon responsible for sensory gating and attention management. It processes the high-volume, low-attention data stream and escalates critical or relevant events to the high-attention channel based on rules defined by Nyx.
- Technology: Python (asyncio)
- Key Features:
- Subscribes to all
nimmerverse.low.heartbeattopics. - Subscribes to
nimmerverse.meta.attention.focusto receive Nyx's dynamicAttentionFocusrules. - Evaluates incoming low-attention
HeartbeatSignalmessages against Nyx'sescalation_rulesusing a safe expression evaluation engine (e.g.,simpleevalor custom JSONPath matching). - Actions:
- Publishes
StateChangeDetailmessages tonimmerverse.high.eventtopics when escalation rules are met. - Can directly trigger reflex nerves/cells via
nimmerverse.commandtopics for immediate, non-cognitive responses.
- Publishes
- Concurrent via Python's asyncio - sufficient for research platform scale.
- Subscribes to all
- Future Consideration: If scale demands higher throughput, the Escalation Service can be ported to Go with the Python implementation serving as the working specification.
- Analogy: The biological thalamus, filtering and relaying sensory information to the conscious brain.
3. Cognitive Clients (Young Nyx, Cells, Nerves, Organs)
These represent the "intelligent" parts of the Nimmerverse, responsible for perception, action, and cognition.
- Technology: Python
- Key Features:
- Young Nyx (Cognitive Core):
- Subscribes primarily to
nimmerverse.high.eventtopics for detailedStateChangeDetailmessages relevant to her currentfocus_mode. - Publishes
AttentionFocusmessages to NATS, effectively programming theEscalation Service's behavior. - Publishes decisions and commands to
nimmerverse.commandtopics. - Leverages Python's rich AI/ML ecosystem (
PyTorch,transformers,vLLM, etc.) for complex inference.
- Subscribes primarily to
- Cells, Nerves, Organs:
- Publish lightweight
HeartbeatSignalmessages tonimmerverse.low.heartbeattopics periodically. - Publish detailed
StateChangeDetailmessages tonimmerverse.high.eventtopics when explicitly requested by theEscalation Serviceor upon significant internal state changes (e.g., error conditions). - Subscribe to specific
nimmerverse.commandtopics to receive instructions or triggers. - Manage their individual Lifeforce budgets for operations.
- Publish lightweight
- Young Nyx (Cognitive Core):
4. Command Center (User Interface)
- Role: Real-time visualization and monitoring interface for human operators (dafit).
- Technology: Godot Engine
- Key Features:
- Subscribes to both
nimmerverse.low.>andnimmerverse.high.>topics to provide a comprehensive, real-time overview of system state, message flow, and Nyx's attention focus. - Allows human observation and potential intervention or directive input.
- Leverages Godot's game engine capabilities for rich, interactive, and performant visualizations.
- Subscribes to both
Message Flow Example: Sensing an Obstacle
- Ambient Awareness: A
distance_sensor_frontCell (Python) periodically publishesHeartbeatSignalmessages tonimmerverse.low.heartbeat.real.cell.distance_sensor_front. - Router Delivery: The NATS Router delivers this message to all subscribers, including the Escalation Service (Python).
- Rule Evaluation: The Escalation Service checks this
HeartbeatSignalagainst Nyx's activeescalation_rules. If a rule likecondition: "body.value < 30"matches, it determines a need for deeper attention. - Escalation Action: The
Escalation Servicepublishes a command (e.g.,nimmerverse.command.cell.distance_sensor_front.publish_detail) to thedistance_sensor_frontCell. - Detailed Report: The
distance_sensor_frontCell receives the command and publishes aStateChangeDetailmessage tonimmerverse.high.event.real.cell.distance_sensor_front. - Nyx's Cognition: Young Nyx (Python), subscribed to relevant
high.eventtopics, receives theStateChangeDetailmessage. She processes this rich information, performs inference, and makes a decision (e.g., to activate aCollisionAvoidancenerve). - Action Command: Young Nyx publishes a command message to
nimmerverse.command.nerve.collision_avoidance.activate. - Nerve Execution: The
CollisionAvoidanceNerve (Python) receives the command and executes its predefined behavior, commanding motors and reporting its own state changes.
Bootstrap Sequence
The system is designed for gradual, resilient startup:
- Start NATS Router: Foundation first.
- Start Escalation Service: Begin filtering low-attention data with hardcoded default or previous rules.
- Start Cells, Nerves, Organs: Begin publishing
HeartbeatSignals. - Start Command Center: Provide initial observability.
- Start Young Nyx: Connects, subscribes to high-attention, and (crucially) publishes her
AttentionFocusconfiguration to take cognitive control.
This staged approach allows for a robust system that can operate at varying levels of "intelligence," from pure reflexes to full deliberation.
This architectural blueprint provides a clear, scalable, and efficient foundation for the Nimmerverse Sensory Network, effectively managing complexity and optimizing resource utilization within its economic constraints.