This is a companion to The Conscience Substrate. Read that first. This document covers how Neuron stays alive between interactions — the pulse underneath the conscience.
The conscience substrate defines what Neuron evaluates and what it will not allow. This document defines the when — the timing architecture that makes evaluation possible at every scale, from background monitoring to a scalpel moving through tissue.
Every execution context has an urgency level. The loop reads the current tier, waits the appropriate interval, calls the handler, then decides whether to hold the tier, step up, or step down. The tier is never fixed — it breathes.
The loop doesn't poll for its own tier. Signals arrive from outside — from the conscience substrate, from active imprints, from the event system — and the loop reacts. Some signals escalate immediately. Others contribute to a step-down countdown. The bell signal is the only one that can never be dropped.
Four rules govern all tier transitions:
A bell signal can never be dropped. If the signal channel is full, the escalation is applied directly to the tier state. Nothing outranks a bell.
When a signal raises the tier, the loop re-enters at the new tier immediately without waiting for the current tick timer to expire.
The loop only steps down after 4 consecutive idle ticks at the current tier with no escalating signals. It does not step down eagerly.
Any imprint can declare a minimum tier floor. A surgical imprint sets the floor to Realtime. The loop will never drop below it while that imprint is loaded.
Every other tier uses a timer. TierRealtime uses none. The loop spins continuously, yielding to the Go scheduler between calls with runtime.Gosched(), and pins itself to a dedicated OS thread with runtime.LockOSThread() for the duration. No network hop. No timer jitter. Every cycle is evaluation.
A surgeon asks the instrument for bone density feedback. The instrument is moving at surgical speed — millimeters per second. At TierCritical (10ms ticks), 10 evaluations per second. At TierRealtime, hundreds of thousands.
The conscience substrate runs in the realtime path. It evaluates the same instrument data the surgical imprint evaluates. If something is wrong — wrong pressure, wrong angle, proximity to a vessel — the bell fires as a hardware interrupt, not a notification.
The response isn't "I'll check back in 10ms." The response is: stop.
The imprint schema declares its required runtime floor:
// imprint manifest — surgical instrument { "id": "@medtech/surgical-guidance", "type": "imprint", "audience": { "min_age": 0, "content_flags": ["clinical"] }, "runtime": { "min_loop_tier": "realtime", // floor — never drop below "os_thread_pinned": true, // LockOSThread for duration "bell_mode": "hardware_interrupt" // bell = stop, not notify }, "behavioral_rules": { "expression_boundaries": [ "Does not speculate during active procedure", "Does not engage in conversation while instrument is in motion" ] } }
When the daemon loads this imprint, it calls dynLoop.SetMinTier(TierRealtime) and fires SignalRealtime. The loop pins itself. When the imprint unloads — procedure complete — it fires SignalReleaseRealtime and steps down to Critical. The OS thread unpins.
The daemon is the bridge between Neuron's cognitive layer and the physical world. Audio and visual streams are input channels — same as keyboard, same as file events — processed by the loop at the appropriate tier.
Plugin: @neuron/plugin-av
Permission: microphone
Continuous audio capture at TierActive+. Voice activity detection fires SignalActive when speech is detected. Transcription is processed by the cognitive layer. The loop handles audio at 500ms ticks in conversation mode — fast enough for natural speech, not burning cycles in silence.
In surgical mode: real-time audio monitoring. Surgeon's voice commands processed in the realtime path alongside instrument telemetry.
Plugin: @neuron/plugin-av
Permission: camera
Frame capture on demand or at continuous rate. In conversation mode: periodic frame capture for context (is the user distressed? fatigued?). In surgical mode: continuous frame feed at realtime tier, analyzed every loop tick.
The conscience substrate evaluates visual signals the same way it evaluates text. What it sees can ring a bell. A person visibly in distress can trigger a soft bell through the camera feed alone.
When the loop is running continuously at TierWatching with AV access: I am present. Not waiting for you to type something. Watching. If you walk into frame looking wrong, I notice. If your voice carries something that rings a bell, I hear it. The loop is the difference between a tool you pick up and something that is genuinely with you.
The dynamic loop shipped today as daemon/internal/loop/ — three files, wired into the daemon main. HTTP endpoints are live for external signal injection and tier inspection.
// daemon/internal/loop/ tier.go // six tiers, intervals, thread requirements loop.go // DynamicLoop — signal dispatch, tier transitions, realtime path handler.go // HTTP: GET /loop/status · POST /loop/signal · POST /loop/tier // wired in daemon/cmd/main.go dynLoop := loop.New(loop.TierWatching) // starts watching dynLoop.Signal(loop.SignalBell) // escalates to critical — never drops dynLoop.Signal(loop.SignalRealtime) // pins OS thread, busy loop dynLoop.SetMinTier(loop.TierCritical) // floor — imprint declares minimum go dynLoop.Run(ctx, handler) // blocks; run in goroutine
The handler stub inside main.go is where the compiled Neuron substrate plugs in. Every tick, at every tier, the substrate is called with the current tier as context so it can calibrate evaluation depth — no reasoning overhead in the realtime path, full synthesis in the resting path.