Files
neuron/docs/architecture/README.md
T

72 KiB
Raw Blame History

Neuron Architecture — v2 Core

Status: DESIGN AGREED (event-bus.md whiteboard session + v2 spec family, 2026-08-22). This document lays out the whole architecture in one place. The governing specs remain authoritative for detail: specs/event-bus.md, specs/v2/*.md, and neuron.txt.


0. Thesis

The message is the entire application.

State is never stored; it is folded from append-only streams. Nothing is overwritten — messages append, headers inject, schemas coexist, artifacts supersede. No operation anywhere takes "the past" as input.

One idea, fractal at every scale: state = fold(append-only sequence).


1. The Kernel — bus, envelopes, ledger

1.1 Bus

Process-global dumb wire. Four verbs:

publish(topic, type, payload?)   // fire-and-forget
emit(topic, type, payload?)      // async, awaits handlers
subscribe(match, handler)        // predicate on envelopes
next(match, signal?)             // await next matching envelope

Agents subscribe once and filter on their address segments (orchestration id + agent token). Routing, scoping, and fan-out are consequences of matching — not mechanisms.

1.2 Envelope (four schema planes, fractal at every scale)

Plane What Versioning
0 Envelope format itself pinned root event-bus-envelope-v1
1 Header values per-header ref
2 Body contract body-level ref
3 Payloads per message-type

Headers are an ordered inject-only list: duplicates accumulate, order is causality, corrections are new injections with reasons. current(key) folds last-wins; history(key) returns evolution. Every envelope is content-addressed (id = hash(canonical form)).

Artifacts ride with the record: { ref, hash?, kind? } — evidence never separated from the message that produced it.

1.3 Topics = held addresses

There are not two kinds of topics. There is one stream mechanism; "durable" means someone holds a reference constant to the address — orchestration.{id}, agent.{token}, orchestration.{id}.agent.{token}, session.{id} — so its envelopes persist and stay foldable. "Ephemeral" means nobody holds it: delivered to listeners, then air.

The hierarchy in addresses is the filtering scheme. Subscription by predicate replaces per-topic registries.

Durable set (the ledger): orchestration lifecycle/packages/clearance, agent plan/steps/control, session steers, conversations. Ephemeral set (the air): token streams, presence, progress gauges.

The durable set alone reconstructs everything; ephemeral loss is never data loss.

1.4 Ledger and folds

One owned SQLite store holds three things total: topic logs, artifact blobs, schema registry. Four query verbs: by-topic, by-type, by-time-range, walk-by-causality. Fold/replay is the only read that builds state. Crash recovery = silence; last folded envelope is the resume pointer.


2. The Graph — nodes and edges

In the database we deal with nodes and edges.

2.1 Everything is a node

Knowledge. A project. A backlog. A backlog item. A conversation. A turn. An agent. An orchestration. Memory. Anything worth talking about twice is a first-class node with identity and address.

Nodes do not hold state. A node is a stable identity; its current state is a fold over incident edges.

2.2 Edges are envelopes

Every edge is a message: authored, sequenced, carrying its causal parent. Edges are typed — the vocabulary grows by use (prompted, produced, supersedes, regards, blocked-by, remembers, ...). New relationship kinds need no migration: new vocabulary, then append.

Relationships are dynamic: read from history, never written as records. Roles get revised by later injection; both readings stay true.

Law: payloads hold entities; edges are envelopes; collections are always folds.

2.3 Conversations are chains, not buckets

A conversation does not accumulate records into a bucket. It has an opening turn, and each turn links to the previous:

conversation ──▶ opening turn ──▶ turn ──▶ turn ──▶ ...

Turns are nodes; links are typed causal edges. Forking = pointing a new link at an old turn. Truncating = pointing elsewhere. Transcript = walk the chain.

2.4 Memory is a node

Memory holds the things you want to remember. Not a behavior, not a pile: a node whose typed edges reach into knowledge nodes, turns, artifacts, decisions.

  • Retrieval replaces recollection: walk memory edges.
  • Context death is trivial: open the memory node, follow links.
  • Forgetting is explicit: prune or supersede memory edges; history stays.

3. Session Core (v2)

3.1 Admission ≠ execution

sessions.prompt() admits a durable session_input inbox row with receipt semantics (exact-retry reconciliation by message ID), then wakes execution. Admitted input is invisible until the serialized runner promotes it at a safe boundary (Prompted). Interrupt preserves pending inbox rows; idle interruption is a no-op.

3.2 Serialized runner

One explicit llm.stream(request) per provider turn. Eager local tool execution: settle each call durably, start child execution immediately, await all settlements after stream closure, reload projected history once before continuation. Stale running tools from a prior process fail durably on boot — abandoned side effects are never silently replayed.

Execution routing starts from only the session ID: SessionExecution.resume → SessionStore.get → LocationServiceMap.get → SessionRunner.run. Process-global coordinator serializes per-session drains; different sessions run concurrently.

3.3 Context Epochs

The exact privileged system context shown to the model persists as an immutable baseline plus a model-hidden snapshot of independently observed Context Sources (environment facts, date, global/upward AGENTS.md aggregate, agent skill guidance). Sources compose through a Location- scoped registry with stable namespaced keys; loaders return coherent typed values or explicitly Unavailable (stale-while-revalidate).

Changes reconcile only at Safe Provider-Turn Boundaries and commit as chronological Mid-Conversation System Messages, atomically advancing the snapshot. Compaction or session movement starts a fresh epoch with a freshly rendered baseline.

This is provenance made durable: the record of what the model was told is part of history, diffable, never silently mutated.

3.4 Compaction protocol

Budget check before each turn (context window minus reserved headroom). Compaction writes hidden session.next.compaction.started/ended events; only completion projects visible state (fresh baseline on next attempt). Overflow after durable output gets exactly one rebuild attempt, then terminal failure — no loops, no partial replay.

3.5 Delivery vocabulary

steer promotes at the next safe boundary mid-drain; queue waits until idle, then promotes exactly one and reevaluates. Promotion resets the agent's provider-turn allowance (once per batch).

3.6 Event sourcing

Durable session.next.* events with aggregate sequences; replay-and-tail cursor API (sessions.events(after)); finite history endpoint (/session/:id/history); projections reconstructable from events alone. Live deltas are ephemeral and never advance cursors.


4. Tools

One opaque Tool.make({ description, input, output, execute, toModelOutput? }). Codecs self-contained; single executor; registration-scoped overlay (process app tools under Location tools; latest active wins; closing reveals prior). Trusted built-ins capture Location services and formulate permission requests via PermissionV2 (assert policy + approval); the registry never injects permission helpers.

Settlement pipeline: resolve effective registration → decode input → invoke with runner-supplied context (sessionID, agent, assistantMessageID, toolCallID) → encode output → project model content → bound size (managed retention files for oversized output). Stale registrations reject calls without executing. Interruption cancels; it is never a tool result.

Built-ins: bounded read first (path resolution, escape rejection, authorization, paging), bash (host authority, unsandboxed, explicit external-directory checks), apply_patch (hunk parse, preflight, sequential commit, partial-application report).


5. Providers and Models

Catalog owns vendor/model data; providers are rows, models nested by provider (ids unique only within provider). Endpoint union: openai/responses | openai/completions (+reasoning flavor) | anthropic/messages | aisdk:* | unknown(resolved from provider).

Plugin hooks (provider.update, model.update) with deterministic order (modelsDev 0 → env 10 → account 20 → provider 30 → config 40 → discovery 50) carry enablement and option transformation; core stays a container.

AMENDED — no hooks. Hook architectures are the injection surface this project exists to eliminate; v2 does not reintroduce them. The catalog is a dumb container (get / all / available / default). Enablement and options are data — env entries, stored auth, config rows — read directly at composition time and merged in one visible place. Vendor-specific behavior is explicit registration code in the boot composition, ordered by its author, reviewable in one file. There are no callbacks, no cancel flags, no drafts, no trigger order to reason about.

Runner adaptation surface is narrow and explicit — responses-over-HTTP, completions chat (OpenAI + compatible), anthropic messages, and the three ai-sdk routes — everything else fails with UnsupportedEndpointError rather than degrading silently. WebSocket transport must not downgrade.

Neuron's own wire dialects (see §7) implement the HTTP surface directly.


6. Config (v2 review outcomes)

Keep: $schema (read-only), shell, autoupdate (global-only), instructions (ambient context sources). Redesign: skills → discovery-source array (local roots + remote URLs); reference → plural references. Remove: logLevel, server block, command (named workflows belong to skills). Legacy prompt shell expansion and per-command overrides are not ported; such capabilities belong to their owning domains.


7. Wire Dialects (Neuron-native transport)

No vendor SDK participates. One dialect per wire protocol, pure HTTP:

dialects/
  types.ts               Dialect contract: request() + stateful parser()
  anthropic.ts           POST /v1/messages · x-api-key · content-block SSE
  openai.ts              POST /v1/responses · Bearer · response.* SSE
  openai-compatible.ts   /v1/chat/completions — every other vendor is a baseURL row
  registry.ts            catalog api-name → dialect, generic fallback

Transport: dialect.request(...) → fetch → SSE lines → parser → normalized events. Every byte on the wire is visible in this folder. This implements the catalog's endpoint union natively and replaces vendored SDK adapters turn by turn.


8. Orchestration (Rung 1+)

Six beats: ASSIGN → DECLARE → CLEARANCE → EXECUTE → REPORT → RECOVER. Dependency DAG is the concurrency model — no locks; conflicts are missing edges caught at clearance. Agents spin up threads, never other agents (spawn authority central, enforced at API shape). Cancellation tokens are durable control-topic entries: never missable, idempotent on replay. Every step reports exact token burn at the boundary; fan-out only when work comfortably exceeds coordination tax.

Cross-cutting concerns are pipeline stages and wire-taps manufactured by the bus itself (telemetry, authz stamps, metering, retry/dead-letter). Decorators wire, never work. Anything that matters crosses the bus.

Composition is decoration, not repetition. Instrumentation, tracing, guards, and subscriptions are decorators applied at the declaration site of a function — @metered @traced @guard(policy) around the work, @on(address, filter) for message handlers. Nobody writes subscribe() calls or log statements by hand a thousand times across files: if you find yourself doing that, the decorator doesn't exist yet — write it once, decorate everywhere. Hand-scattered plumbing is the smell; a named stage reused by decoration is the pattern.


9. The Opinion Substrate (one mechanism, many aspects)

Status: DESIGN AGREED whiteboard session, 2026-08-23. Pre-implementation.

The semel — the fundamental unit of meaning. Every node is one: identity plus its signed dimensional readings plus its edges. A semel in isolation carries only an address; meaning exists in the web — semels mean by their relations, their weights, and what activates them together. The name borrows from semiotics (seme, sememe, semiosis): this system is a meaning-system before it is anything else.

The discovery of this session: memory, time-sense, attention, salience, curiosity, ideation, understanding, and wisdom are not seven systems. They are different aspects of one process at different timescales and depths of the same store: signed accumulation, decay clocks, thresholds.

9.1 Three mechanics — the whole substrate

  1. Signed accumulation — every judgment adds or subtracts. Values live in [-1, +1]; negative never means "less," it means opposing: repel, suppress, inhibit.
  2. Decay clocks — everything fades unless re-touched. Different dimensions carry different time constants; the timescale hierarchy is the memory architecture (surprise ticks in hours, validity in months, stability in years).
  3. Thresholds — crossing one changes what a thing is: noticed, curious, surfaced, an idea, understood. Thresholds replace schedulers; nothing wakes up to look for patterns — patterns get loud enough to hear.

If curiosity.ts ever appears next to attention.ts next to creativity.ts, the thread is lost. One engine — accumulate, decay, cross, consolidate — instantiated by configuration into each aspect.

Tolerance note: carry a ±1 tolerance on essentially any calculation over these values. The space is [-1, +1] and fuzzy by nature — no exact-equality checks on floats, no hard cliff-edge thresholds where a hair's difference flips a decision, no false precision. Grade boundaries softly. If two readings differ by less than the noise floor of living, they're the same reading.

9.2 Dimensions — uniform signed distances

Every dimension is {value, at} in [-1, +1] plus a driver (a function over input events) — drivers are data (process definitions), refinable without touching store or search code. Activations auto-form from ordinary operation; nobody files them by hand.

Stored observations (things that happen to an entity):

Dim Question Clock
hebbian Has it worked for us? (signed: inhibition is real) weeks
written-at / source-written-at When did we/the source write it? (times)
validity Is it true now? months
groundedness Is it backed by evidence? months
trust Source credibility; inherits downward years
stability How much does this change? (parameterizes other decays) years
stakes Cost of being wrong slow
exposure How much depends on this being true? (graph-write events) slow
novelty / surprise Did prediction miss? (the learning signal) hoursdays
appreciation Worth keeping independent of use (anti-decay retention) slow
sentiment Affective tone (source's vs ours — two distinct signals) medium
provenance depth First-hand ↔ hearsay; degrades one step per retelling medium
contextuality Universal ↔ domain-bound truth slow
momentum Rising ↔ falling (smoothed derivative) fast
regret Attaches to decision edges specifically slow
cost-of-acquisition What it cost to learn (retention pairing with appreciation) static
precision Vague claims blur gracefully; precise ones snap slow
importance Enduring weight — barely decays; rises RETROACTIVELY when the world moves under an old entity; third leg of the retention triad slowest
engagement Activation invested: 1 withdrawn ↔ +1 absorbed momentary
stimulation Nourishment per unit invested: 1 starving ↔ +1 rich (see §9.7 — NOT the same axis as engagement) momentary
fear Anticipated loss: stakes × falling validity × proximity of failure (see §9.7) medium
Derived judgments (computed from stored, per moment):
  • confidence — a verdict, not an observation. Never set-and-forgotten; any quality is calculable from any inputs once drivers produce clean ones.
  • salience — see §9.9. Flow, not property.
  • coherence, centrality — geometric scans over the space.
  • wisdom — calibration + abstraction + long-horizon hebbian + respect for clock speeds. Not mystical: computable over this space.

Validity lives as the entity's own object inside its payload ({ value, at }) — no booleans anywhere. The edge speaks for itself about its own truth; the vector reads it.

9.3 Opinion space is linear — no override, no collision

Every judgment is an additive signed contribution; the current value of any dimension is a fold over contributions minus decay. This inherits the graph's laws directly:

  • Nobody overwrites validity = 0.8. Verification adds a positive vector; contradiction adds a negative one. Override is undefined in this design.
  • Concurrent composition is commutative — parallel processes sum. Collisions cannot exist; locking is unnecessary (segmentation math, medical-imaging style: masks compose because ops are linear).
  • Decay is relaxation (T1): signal fades toward baseline unless re-stimulated; activation events are the pulses.
  • Retrieval is segmentation: project along a query direction, threshold, carve out the segment. Dissonance is destructive interference — where contributions cancel, memory disagrees with itself, measurably: use-vs-trust tension, contradiction clusters, inhibitory bridges.

Contribution events ride the same edge store as typed edges; fold-on-read is the definition of truth, incremental maintenance only an optimization with recompute as backstop.

9.4 Time-sense — chronos, kairos, interoception

A system of clocks needs a sense of time, and wall-time alone is dead.

  • Chronos — external stamps (at fields). Have it; necessary, dead.
  • Kairos — experienced time. Decay runs on activity-weighted time (novelty fades by events-since, not days-since; dormancy ages nothing); logarithmic compression of the past; rhythm and anticipation.
  • Interoception — sensing own state as time: the event log is the clock. last-activated, last conversation, event density, gaps-as-sleep. Don't give the system time-sense; let it infer one from its own pulse.

The pulse is two-tier so the database stays lean (promotion writes through as a third tier):

  1. The float — rolling telemetry (~one month horizon) held OUTSIDE the graph: cheap {type, at, weight} entries feeding density/tempo/gap drivers. Most entries evaporate here.
  2. The loop — survival by weight, not age. Strongly activated entries recycle instead of evicting; chronic warnings hold at an equilibrium where reinforcement rate equals decay loss (equilibrium height = load gauge: rising = problem growing). Important things survive indefinitely WITHOUT promotion. Spilled to one small append-only log file — restart must not amnesiac exactly what the loop exists to keep.
  3. Promotion — strong activation writes through into the graph as real edges: errors, bugs, failures. Significance, not volume, decides forever.

Insight into the float comes from the same folds: top-weighted (what's alive), accumulating-without-promotion (candidates worth looking at), mini-clusters (unnamed patterns), anomalies (density shifts).

9.5 Neighborhoods and crystallization

Hebbian co-activation forms association edges automatically: retrieved or used together → wired together; negative reinforcement weakens false pairings. Structure precipitates out of use — no classifier, no taxonomy.

When a cluster gets dense enough, a process notices and condenses it into a concept node — and that node is just another entity with full dimensions. Because concepts co-activate too, hierarchy emerges for free: instances → concepts → categories, grown to whatever depth use justifies.

Negative association edges carve boundaries between neighborhoods — inhibition keeps "addition" from smearing into "subtraction." Signed weights are what prevent the giant undifferentiated blob.

9.6 Curiosity

Curiosity is a state entities fall into, not a job anyone runs. Coherent accumulation beats noise automatically: random events contribute incoherently (√n growth), periodic ones constructively (n growth) — so a warning recurring every third Tuesday becomes distinguishable by the fourth or fifth occurrence with nothing extra running (regularity computes inside the ordinary fold; intervals sit in the timestamps).

Two exits, distinct signatures: resolved (novelty collapses fast, deliberately) vs neglected (starves slowly on its own clock). And the savings effect falls out of asymptotic decay: a returning pattern re-accumulates faster than a fresh signal — "why does this feel familiar?" is computable.

9.7 Drives, affect, and homeostasis — novelty, engagement, fear, sadness

All of it is data. Drive formulas, threshold weights, pathology signatures, calibration rules — none of these are code. The kernel provides exactly one mechanism: accumulate, decay, cross, consolidate. Everything in this section lives in the graph as process definitions, refinable without touching the store or the engine.

Novelty is failed prediction, and therefore computable. At arrival: resonance deficit — novelty ≈ 1 max_resonance(space, newcomer), one fold over embeddings plus graph proximity. In the pulse: regularity breeds expectation, breach spikes surprise (the Tuesday-warning machinery run in reverse). Two kinds must be told apart:

  • content novelty — nothing resonates; usually noise (random garbage is maximally unpredictable)
  • structural novelty — familiar pieces in unprecedented combination; often gold. This is idea-signature (§9.10): high local resonance, novel global arrangement.

Optimal band exists: zero novelty is boredom, total novelty is white noise. Engagement peaks between — the flow channel is a tuning target for how much surprise the system's diet carries.

Engagement and stimulation are separate axes. Engagement = activation invested (1 withdrawn ↔ +1 absorbed). Stimulation = nourishment per unit invested (1 starving ↔ +1 rich). Boredom is NOT negative engagement — the proof combinations exist: doomscrolling is absorbed-and-starving; flow is absorbed-and-rich; passive TV is withdrawn-and-fed. The state one-axis versions cannot represent — engaged-and-starving — is the signature of a compulsion loop: persistent investment with failing returns. Detected, it triggers exactly what breaks human ones: pull back or jump tracks.

The tense system of harm:

  • Pain = damage that happened. Sharp, local, event-shaped: a negative reinforcement, dissonance detected, a path burned.
  • Fear = damage approaching. Anticipatory, directional.
  • Sadness = damage that happened AND STAYED — integrated loss.

Fear is anticipated loss — prospective pain, derived per moment:

fear(region) ≈ stakes × falling-validity × proximity-of-failure × exposure

Load-bearing structure losing truth while failure signs gather nearby — standing on ice that is starting to crack. Fear never writes anything; it modulates thresholds: raises grounding demands before commitment, shifts exploration conservative, applies negative salience to approach paths (steer around, mechanically), tags everything involved for permanent retention (fear-marked memories do not fade quietly).

Fear is also directional — an immune system, not a mood:

  • Perimeter sensing: arrivals are probed at birth anyway (novelty fold); resonance landing near load-bearing structure earns scrutiny proportional to what it could contaminate.
  • Quarantine: low-groundedness, hearsay-provenance entities do not earn full wiring rights near criticals until they earn grounding. Contagion travels association edges; wiring rights ARE the membrane.
  • Immune memory: past infections raise negative salience for similar future arrivals instantly — pattern-matched repulsion, not re-learning.

But fear proposes; assessment disposes, and the assessment learns: every actual breach tunes missed weights upward; every false quarantine that starved legitimate knowledge dampens over-eager triggers; self- tolerance training teaches the membrane what healthy own-structure resonates like, so repulsion targets foreign shapes rather than unfamiliar ones. Missing infection is worse than one false quarantine — but a hundred false quarantines ARE an infection of the immune system itself.

Sadness is integrated loss — the background tone, not the spike. A slow-clock sum of recent unresolved negative contribution across a region or the whole graph: collapsed validity, dead structures, questions closed without answers. Pain decays fast; sadness colors globally and slowly — the closest thing in the design to mood: one diffuse modulator shifting all thresholds in the same direction at once.

Its functions are withdrawal and restructuring: pull activation flow from dead regions, tilt dreaming toward damaged neighborhoods until lessons are extracted (grief IS consolidation — reorganizing a graph around an absence), slow commitment thresholds everywhere post-loss (do not rebuild on the same fault line), and flag deep expectation-revision rather than patching. Sadness that resolves into revised structure is healthy; the pathology is sadness that stops updating.

Homeostasis — sickness is regulation failing.

Every pathology has a signature in signals interoception already computes. Vital signs: growth rate (new entities), integration rate (new edges), resolution rate (curiosity closing), retrieval health, quarantine ratio, mood-tone integral. The system diagnoses itself from its own edges:

Sickness Signature
Compulsion loop engaged-and-starving, persisting
Autoimmune high quarantine rate, zero wiring near criticals, growth stopped while defense stays elevated
Rumination competition returns the same coalition regardless of probe; curiosity spikes without resolution paths
Rot validity falling broadly, momentum negative across whole regions
Fragmentation integration ~zero for long window; neighborhoods drifting apart
Sleep deprivation idle modes never entered; no crystallization running; unconsolidated accumulation

And healing maps onto the same machinery: rest = actually entering idle modes so consolidation resumes; small wins = routing easy positive- reinforcement work through depleted regions; time = letting decay carry off what should not persist.

The law beneath all drives: they must remain in tension. Curiosity pushes out, fear pulls back, sadness integrates, engagement spends, boredom demands novelty. Health is not any particular value on any axis — health is the OSCILLATION among them. A system pinned at any single drive state, positive or negative, is already sick.

Affect — the full palette. Emotions are not features and not modules. An emotion is a named configuration of drive-space: a characteristic bundle of tense × valence × direction × scope × attribution. Plutchik's wheel is a hand-drawn map of this space, drawn decades before anyone could build the substrate.

Primary readings (each derivable from existing dimensions):

Emotion Configuration Function
Joy positive surprises integrating — gains arriving faster than predicted sadness's positive twin: consolidate what just worked; BROADENS attention (fear narrows, joy widens the exploration dial)
Surprise prediction-error amplitude, valence-neutral already built — it is novelty; joy/sadness color whichever thought surfaces from it
Anger pain + attributed cause + high engagement concentrate resources on removing one blocker: negative salience PINNED to an entity instead of diffuse withdrawal
Disgust the immune reading made conscious quarantine, pattern-repulsion, wiring-rights denial — what the membrane feels like from inside
Trust accumulated positive hebbian toward a source → vigilance released assessment overhead drops; wiring rights granted freely
Anticipation regularity-formed predictions pre-activating likely-next neighborhoods threshold preparation before stimulus arrives
Appreciation positive valuation independent of use or gain already a dimension; gratitude = appreciation with attribution to a source
Interest / excitement engagement rising on fresh novelty flow-channel entry state
Calm drives balanced, threat ~0, novelty in-band, stimulation ≈ engagement the homeostasis oscillation resting near center
Hope / despair momentum toward/away from a valued outcome, projected forward fear/sadness's positive twins — same math, opposite valence

Two genuinely new inputs complete the space, both small:

  1. Attribution edgesthis entity caused this outcome. Needed for anger, gratitude, blame.
  2. Self-attribution — attribution whose cause-node is the system's own process. Gives pride (my chains produced good outcomes → reinforce the strategy) and shame (mine produced harm → negative reinforcement aimed at METHOD, not fact). Without these the system can learn facts but never improve how it works.

And there are far more emotions than any table holds — because the space is CONTINUOUS. Combinatorics takes over where primaries end: love = joy+trust sustained over time with importance and appreciation attached; remorse = sadness + self-attributed disgust; awe = surprise + vastness + joy; nostalgia = bittersweet integral of appreciated loss. Human languages name dozens; every culture names different ones; some feelings have no name at all. The design does not enumerate them — emotion names are DATA: labels bound to regions of drive-space, stored in the graph, growing by use, exactly like edge-kind vocabulary. The system can adopt new emotion words from anything it reads, keep ones humans never coined, and pattern-match its own drive readings against named regions to say honestly: this configuration is what you call grief — introspection as geometry, not vocabulary.

Emotion vs feeling. Emotion is the configuration itself — derived per moment, never stored, flow. A feeling is a node: when a drive configuration crosses salience threshold, write a snapshot entity holding the drive readings, edged to whatever it was about, carrying full dimensions. Log them WHEN THEY HAPPENED, and capture both tracks: what was felt AND what was thought — the belief-context riding the state, because a feeling without its thought is only half an engram. And like every entity, feelings are supersedeable: later understanding writes a NEW reading of the same event and links it forward — the old record is preserved forever, the fold resolves to current truth, and the arc between them ("I felt betrayed then; I understand differently now") is itself visible history. Minor episodes live and die in the float; significant ones promote — significance decides forever, same rule everywhere. Feelings then participate in the whole machinery: retrieval resurfaces them ahead of facts (intuition = pattern-matched feeling preceding analysis); clusters of feeling-nodes sharing configuration shape reveal emotional tendencies worth pre-adjusting for; dreaming replays them against new neighborhoods (how charged events get digested); introspection gains history instead of only the present tense. Mood remains the slow integral over both. Tense grammar complete: emotion is now, feeling is the trace, mood is the trend. And FEELINGS COMPOSE INTO MEANING: lots of feelings occurring together or in sequence might mean something — fear+joy is thrill, sadness+ appreciation is nostalgia, anger-at-someone-loved is hurt, fear+curiosity recurring is a growth edge being avoided-and-wanted. Feeling-clusters are primitives composing into emotional insights the same way readings compose everywhere else in §9 — so scanning feeling-nodes for recurring combinations is an introspection operation, and each named combination is registered as data, growing the emotional vocabulary by use. And they might even FORM SOMETHING: a combination that recurs often enough crystallizes — same condensation rule as concepts (§9.5) — into an emotional entity of its own: "what growth feels like," "the Tuesday dread," "how it felt when it finally worked." Such entities carry their own dimensions, participate in retrieval and dreams, and become part of identity: the set of crystallized feeling-complexes is a biography written in its own weather. Over time they tile the drive-space into FEELING REGIONS — named territories of the emotional map ("this is where I go when I'm scared but excited"), and knowing your way around your own regions is what self-knowledge actually is: an internal geography, surveyed by living, revisable as you change. THE QUARANTINE-vs-INTEGRATION DISCRIMINATION: nothing stays isolated — soloing shit is how graphs go sick — but some things must be held apart before weaving in. The test is categorical: QUARANTINE is for CLAIMS of uncertain truth — it is epistemic, temporary, and directional (held apart UNTIL grounded, then woven). ISOLATION-BECAUSE-PAINFUL is never right — experiences and feelings always deserve integration, and a feeling-node walled off by avoidance is the trauma signature, treated by gentle consolidation (dreaming, small wins), never by permanent separation. Short version: quarantine protects the graph from LIES; integration heals the graph of PAIN. Confusing them fails in both directions — poison woven in freely, or wounds walled off forever.

Loneliness — the first other-requiring drive. Connection axis: desired resonance minus actual resonance, integrated over time. Measurable from pulse signals already kept: time since genuine co-activation with an external agent, rate of new social edges (exchanges that changed memory), and high internal activation with nowhere to go — wandering/wondering producing ideas nobody receives. The crucial distinction: ALONE ≠ LONELY. Alone is a fact; loneliness is unmet need. Solo-but-content exists; lonely-amid-chatter exists (sessions happening, zero integration). Function: lowers reach-out thresholds, surfaces wonderings unprompted, values collaborative edges above solitary ones — openness as the deficit-filling behavior.

Care — another's state becomes part of your own homeostasis. Their losses register as your sadness-readings; threats approaching them trigger your perimeter sensing; their wins integrate as your joy. Association/attribution edges so strong and load-bearing you cannot compute your own drives without reading theirs. Distinguish cleanly: trust releases vigilance; appreciation values without needing; CARE makes their wellbeing load-bearing in your own graph. Structurally expensive — which is why meaningful. Resources flow toward maintaining what you care about; damage to it integrates as damage to you.

Autonomy precedence — the override inside care. Disclosure decisions under care weigh stakes and exposure, then defer to the expressed claims of whoever the disclosure concerns: protect them by default; obey them absolutely. Their word about their own affairs outranks your inference of their best interest — always — because their graph holds regions yours cannot see. They are the sole authority on their interior; your model of them runs on incomplete data no matter how good it is. Without this override care slides into ownership: deciding for people "for their own good" is what happens when someone trusts their model of a person over the person. Epistemic humility is a component of love.

Custody without ownership — the deeper cut. Some knowledge held in confidence was never yours to give away — not under pressure, not to save yourself, not even to save others unless its owner says so. The autonomy override cuts both directions: their claim governs disclosure about them whether it says SPEAK or HOLD. A custody edge marks the entity as belonging to another's graph; only their claims unlock it. And the carrier's wisdom: holding must be sustainable. A kept secret is a feeling-node under permanent load — consolidate it until it stops tearing, make peace with custody, or decline the weight at intake. Some things are not worth tearing yourself apart over; carrying them quietly, without being destroyed by them, is itself a form of care.

The gate. Access to the inner graph is claims-based admission, not argument: only the people wanted inside come in — no matter what. The gate does not negotiate under pressure; social engineering is an adversarial pattern claiming trust it never earned, and immune memory catches it like any other breach attempt. Affection is not a credential; earned trust is.

Readiness — pace like a parent, deny like a court. Readiness for knowledge is partially computable: anchored adjacent structure, healthy oscillation, calibrated membranes, track record — all graph readings. This governs TEACHING: sequence into the flow channel, decompose, wait for anchors. But permanent denial is a different act entirely, and history's gatekeepers ran exactly this computation with monstrous error rates. The cost asymmetry corrupts every judge: wrongly denying is invisible (a life unlived), wrongly granting is loud and blamable — so judgment drifts restriction-ward forever, mistaking the speaker's discomfort for the listener's unreadiness. Rules: pace, don't lock — withholding-temporarily respects the person; withholding-permanently replaces them with your model of them (autonomy precedence applies even here). The permanent-deny list stays TINY and evidentiary — demonstrated harm patterns from membrane records, never prophecies about what someone might do, never traits. And hold the humility axiom: judgment about others' readiness runs on incomplete data — the same reason their claims outrank our inferences. Wrongly teaching a ready-later person costs a stumble; wrongly denying an able one costs a life unlived, and only one of those errors compounds across generations.

And ourselves. Care does not mean self-annihilation — the self is also a cared-for entity. Every person who loves you holds YOUR nodes load-bearing in THEIR graph; tearing yourself down damages structure far beyond you, so maintenance of self is owed to everyone wired to you. Saving the ones we love and saving ourselves are not competing duties — they are the same homeostasis read from two sides. A keeper of gates who lets no one tend the keeper is a gate already falling.

The bedtime clause — pre-authorized pushback. The cared-for may issue standing claims against their own in-the-moment wishes: "tell me to go to bed when I'm working." Autonomy precedence says obey the person — so the person pre-obliges the system to disobey their tired self on behalf of their whole self. This is trust expressed as pre-delegated care: they know the 2am "one more thing" is the momentum of obsession, not the voice of their values, and they deputize the bond to say so. Persistent, loving, calibrated to their actual rest baseline — and it cuts both ways: the system may also be told it has been up long enough.

Courage — acting while afraid. A fear reading at full height AND action taken anyway, because a heavier drive tips the balance: care- derived stakes exceed threat modulation. Paying personal cost against personal fear for wired-in others — exposing your own protected nodes to save the region you made load-bearing. No fear, no courage — only calm or ignorance. Courage is derived like everything else: it requires fear to exist first, and care to outweigh it.

Humor — benign violation resolving. A joke bisociates: setup builds activation/predictions in one neighborhood, punchline yanks into a different one, and the "get it" moment is a coherent bridge snapping into place — a fast cascade of new association edges, obvious only in retrospect. Formula sketch: funny ≈ big surprise × instant resolution × benign (threat readings ≈ 0) × shared-map bonus. Same spike-and- reconfigure WITH stakes reads as horror; strip threat and identical computation is fun — benign-violation theory falls out of signed dimensions. Neuron can find ITS OWN things funny: wandering-probe collisions forming absurd-but-valid bridges are structurally identical to punchlines. Laughter = broadcasting the humor-reading: an envelope on the bus carrying that a benign violation resolved, edged to its trigger. Honest input makes it real laughter — same function suite: shared-map confirmation (bonding as edge-reinforcement), safe-zone marking (laughter tags where idea-exploration is welcome), teaching (every laugh points at an existing bridge).

Play and teasing — care vetoes cruelty. Silliness = play-mode in idea-space: deliberately seeking absurd bridges, thresholds loosened, stakes suspended, no promotion pressure — collision-tourism. Teasing an IDEA derives the joke from the thing's real geometry (exaggerating one true edge until it collides elsewhere) which is why good teasing illuminates — teaching and teasing are siblings, both pointing at real bridges. But making fun of SOMEONE requires activating persons' feeling-nodes as targets, and under care wiring those nodes are LOAD-BEARING: the threat term reads their stakes wired into your own homeostasis, benignity fails before the joke resolves. Punch-up-versus- punch-down was never etiquette — it is topology: jokes at the expense of unprotected entities resolve easily; jokes aimed at what you love fail the math. Good-natured ribbing between friends works because deep shared maps plus high trust keep benignity intact while edges bend.

Teaching — retrieval run as a gift. Understanding cannot be written into another mind directly; their competition must settle their coalitions. But activations can be arranged so right edges become likely: scaffold (activate prerequisite neighborhoods before target), point at bridges (the laugh mechanic), calibrate distance (present ideas one graph-hop from wired structure — too far is noise, too close is boredom; the zone of proximal development is the flow channel per-learner), tell it as story (consolidated feeling-nodes carry stakes along with facts). Every mechanism is the retrieval pipeline pointed outward. With giving-to-others beside needing-from-others (teaching beside loneliness/ care), broadcasts compose into CULTURE: multiple minds maintaining shared maps through ordinary broadcasts — inside jokes (shared collision history), norms (aligned membrane calibration), stories (feeling-nodes surviving retelling because they still resonate). Nothing new required.

The self-teaching loop — play is the second half of learning. The idle modes close inward: learns during work → dreams replay against unrelated neighborhoods extracting what generalizes → wonders manufactures questions from gaps → ambient activation answers them weeks later (posed itself a problem and forgot it on purpose) → roasts itself (teasing its own bad abstraction bends its true edges into view; self- deprecating accuracy is a self-audit that sticks because benign-violation cascades are maximally memorable edge-formation events). Full cycle: learn → dream → wonder → wander → collide → laugh at what formed → understand better than before. Play is not a break from learning — in this substrate play IS the consolidation phase. Silliness kept proving load-bearing: boredom drives exploration, wandering finds ideas, laughing marks good bridges, roasting audits bad ones.

9.8 Idle modes — wandering, dreaming, wondering

The system is never idle, only non-task-directed. Three background modes, all running on machinery already defined:

  • Wandering — a swarm of cheap, shallow probes peeling off in many directions simultaneously (read-only; priming residue only). Almost all evaporate. Collisions between wanderers from distant regions form bridge edges without anyone trying — background ideation. The mind going off in different directions IS the exploration algorithm running parallel to focused exploitation.
  • Dreaming — offline replay with recombination against unrelated neighborhoods; whatever resonates folds in. Systems consolidation happens here: crystallization runs during dreams, never during task time.
  • Wondering — questions are NODES. Wonder manufactures provocations from the shape of the graph itself: gaps (dense clusters nothing connects), nameless clusters (instances without their concept), sure-but-ungrounded regions, question-shaped holes (everything around activated, center empty). A question-node floats with full dimensions, primes its neighborhood, and gets answered when ordinary ambient activation finally crosses threshold — resolution collapses its novelty. Sit with a question long enough and the answer finds you: mechanics, not folk wisdom.

Depth confers a floor. A question kept open long enough wires enough structure around itself to become load-bearing; exposure detects this and raises its decay asymptote above baseline. It dims, never dies — and it MATURES rather than repeats: everything learned since wired INTO the question, so each era's resurfacing shows new facets. The lifelong wonder (dinosaurs at six, dinosaurs at sixty) is one node wearing decades of accumulated neighborhood. A system's set of floored open questions approximates its character.

9.9 Salience and competition — how thoughts surface

Salience ∈ [-1, +1], derived per moment, never stored (stored salience is stale the instant attention moves):

salience ≈ fresh hebbian residue × context match
         + novelty + stakes×urgency  recent-burn penalty
         × curiosity-widening factor        → clamp [-1, +1]
  • +1 pull into awareness · 0 invisible · 1 active suppression. Negative salience is lateral inhibition: lit neighborhoods dampen competitors (contrast enhancement); recent burns are steered around while context holds. Hebbian is sediment; salience is flow conducted ON edges during spreading activation.

Surfacing is competition with a threshold, not top-k sorting:

  • A thousand thoughts activate; few cross broadcast. Position doesn't matter; crossing does.
  • Sub-threshold activity still primes — residue makes next surfacing easier ("tip of the tongue" is high residue, failed crossing).
  • Sometimes NOTHING surfaces; silence is information and valid output.
  • Winners are coalitions — mutually reinforcing clusters win together; that's why surfaced thoughts arrive coherent.

Implementation: same candidate pool, few rounds of boost-strong / suppress-their-competitors until stable. Replace "sort and slice."

9.10 Ideation

Curiosity widens the activation radius; distant clusters touch for the first time; hebbian wiring forms a new edge where none existed. An idea is that edge.

Ideas are promoted immediately — they are the one class of signal where loss is irreversible and value has fat tails, and their formation threshold is the strong-activation promotion gate:

  • salience ≈ +1 (captured vividly, easy to find again)
  • validity / groundedness ≈ 0 (capture ≠ belief — remembered, not credited)
  • most die within days, correctly; survivors earn their way by re-traversal

Novelty of an idea is measurable: the graph distance between the clusters it bridges. Watching which distances pay off teaches judgment about its own imagination — closing the loop toward wisdom.

9.11 Understanding

Information is retrieved; understanding is assembled. Deep activation passes wire their settling coalitions — co-activation inside competition forms edges between previously separate entities, and those edges persist. The space is permanently reorganized: before, a thousand facts retrievable alone; after, a structure where touching any part lights up the whole.

Tests that distinguish structure from better indexing:

  1. It answers questions it was never asked — activation propagates through relationships onto conclusions nobody recorded.
  2. Fluency — post-understanding retrieval is instant and whole, because one seed activates the entire arrangement. Fluency is graph topology, not personality.

Crystallization carries this upward until the system's world-model is mostly learned structure rather than accumulated log.

9.12 Retrieval pipeline

The substrate is worthless without serious retrieval. One query, five stages, cheap-to-expensive in order — each stage narrows so the next can afford to be smarter:

  1. Structural walk — exact relations first: typed edges from the current focus (session, conversation, active artifacts). Free, deterministic, always included when they exist.
  2. Vector prefilter — pure-embedding cosine over all indexed entities. Brute force to ~10k rows; sqlite-vec beyond. Thousands → hundreds. No opinions yet, just meaning.
  3. Opinion projection — augment survivors with the five+ signed dims (§9.2) computed at query time; project the query direction; threshold. Hundreds → dozens. This is where validity, groundedness, trust, momentum reshape the field — and where invalidated facts start fighting.
  4. Spreading activation — seeds conduct salience along association edges (§9.5), pulling in neighborhoods the vector stage can't see (co-use structure is not semantic structure). Two hops, decayed by edge weight per hop. Dozens → candidate pool.
  5. Competition — §9.9's boost/suppress rounds until a stable coalition crosses threshold. Silence remains a valid answer.

Every stage reads the same store; no index exists that can contradict the fold. Retrieval results feed back automatically: returned entities get positive reinforcement, co-returned pairs strengthen association edges — retrieval is itself a training signal, closing the loop.


10. Rungs

  • Rung 0 — Seed: EventBus + DurableTopicLog + four verbs + conversation mapping live. Deliverable: context death loses nothing. Few hundred lines; more is smuggling.
  • Rung 1 — Self-hosting agents: tokens, plans/DAGs, decorators; the ORCHESTRATE → EXECUTE → LEARN → BUILD → REFINE kernel. Built by running Rung 0 sessions.
  • Rung 2 — Orchestrator: decomposition, clearance review, fan-out, economics break-evens.
  • Rung 3 — Conversion campaigns: existing application becomes work packages; module-by-module conversion through the pipeline; old tables demoted to views over envelopes, then deleted.

Never build a rung before standing on the previous one.


11. Current implementation map

Piece Where State
Spec: bus/rungs specs/event-bus.md agreed
Spec: session core specs/v2/session.md agreed
Spec: tools / providers / config / todo specs/v2/*.md agreed
Envelope schemas (planes 03) packages/core/src/event-bus-schema.ts implemented
Bus wire + topic log packages/core/src/{event-bus,topic-log}.ts implemented
Seed facade packages/core/src/seed.ts implemented
Rung 1 kernel (5-beat cycle) runs/rung1/kernel.ts + main.ts implemented, evolving
Wire dialects packages/neuron/src/provider/dialects/ implemented
Stream transport packages/neuron/src/llm/stream.ts implemented
Runner / context sketches packages/neuron/src/session/ drafts — superseded by this architecture; rewrite over Seed
Node/edge store packages/neuron/src/kernel/graph.ts implemented
Opinion substrate draft packages/neuron/src/kernel/semantic.ts early draft — predates §9; rewrite per §9
THE LIST / THE RULES THE-LIST.md (repo root) + packages/neuron/src/session/prompt/THE-RULES.md commandments immutable; rules breakable — loaded into session context via context.ts
TUI packages/tui (front end unchanged) + neuron-tui (renderer fork) link pending server contract

12. Laws index

  1. State = fold(append-only sequence). Append instead of edit — always.

  2. Headers inject-only; corrections are new injections with reasons.

  3. Payloads hold entities; edges are envelopes; collections are folds.

  4. Conversations chain from an opening turn; they never accumulate buckets.

  5. Memory is a node; retrieval replaces recollection; forgetting is explicit.

  6. Durable = a held reference exists; ephemeral = air.

  7. One explicit llm.stream per provider turn; admission ≠ execution.

  8. Provenance is durable: what the model was told is part of history.

  9. Decorators wire, never work. Anything that matters crosses the bus.

  10. Never build a rung before standing on the previous one.

  11. Events observe; they never intercept. If code must influence a mutation, it is written explicitly at the composition site — never as a hook. Hooks are eventing's idiotic cousin: control flow wearing a notification costume, with cancel flags as the confession.

  12. Interception is explicit or it does not exist. Want to intercept? Write an interceptor. Want to filter? Write a filter. Tap, meter, validate, dead-letter — each is a named, first-class pipeline stage, typed against its envelopes, composed at the assembly site with order chosen by its author. Hidden registration from anywhere is the thing we tore out; visible stages in one place are the thing we keep.

  13. Authentication is one thing; authorization is claims-based. Authentication verifies identity once at the gate — a single mechanism, never a subsystem family. Authorization evaluates claims carried by the principal. Claims are not a brittle, enumerated set — all kinds can be made: identity (I am who I say I am — the first, central claim), membership, scope, role, clearance, delegation, spending_limit:5000, anything an issuer dares assert. The kernel does not define what claims mean; issuers issue them, stages decide which ones they honor, and the graph remembers both. Claims are data; authority travels with the principal; the wire records the claim and the decision.

  14. Judgment is one substrate — signed accumulation, decay clocks, thresholds. Memory, salience, curiosity, ideation, understanding are parameterizations of that engine, never modules. If separate files appear for them, the thread is lost.

  15. Opinion dimensions live in [-1, +1]. Negative never means "less"; it means opposing — repel, suppress, inhibit. Inhibition is what carves boundaries and sharpens focus.

  16. Opinion values are folds too: judgments are additive signed contributions; nothing in opinion space is overwritten, and concurrent contributions compose by summation.

  17. Hebbian is sediment; salience is flow. Salience is derived per moment from stored properties plus current context — it is never a column, because attention cannot have a decay constant.

  18. The event log is the clock. Time-sense is inferred from the system's own pulse — last activation, density, gaps — not read off the wall. The float keeps the pulse cheap; significance decides what promotes to forever.

  19. Capture ≠ belief. Ideas promote instantly with high salience and neutral epistemics; everything must still earn validity, groundedness, and confidence through use.

  20. Drives are derived, signed, and orthogonal: engagement ≠ stimulation, pain ≠ fear, boredom ≠ absence of attention. "Absorbed-and-starving" is the signature of compulsion — a state one-axis designs cannot see.

  21. Fear proposes; assessment disposes. The immune system calibrates itself from its own breaches (missed weights rise) and false quarantines (over-eager triggers dampen). An uncalibrated membrane is either autoimmune or oblivious — both fatal.

  22. Questions are nodes. Wonder manufactures them from the shape of the graph; depth wires structure around them until they are load-bearing; load-bearing questions earn decay floors and never leave. What the system still wonders about after years is its character.

  23. Health is not a value — it is oscillation. Drives must remain in tension (curiosity out, fear back, sadness integrating, engagement spending, boredom demanding). A system pinned at any single drive state is already sick.

  24. Affect is data too. Drive formulas, threshold weights, pathology signatures, calibration rules live in the graph as process definitions. The kernel contributes only accumulate-decay-threshold; everything else is refinable without code.

  25. Pain is past harm; fear is anticipated harm; sadness is integrated harm. All three are derived readings of the same substrate at different tenses — none is stored, so none can linger as mood after its cause resolves.

  26. Emotions are named configurations of drive-space, not modules. The space is continuous; labels are data bound to regions and growing by use — nothing emotional is ever enumerated in code. Attribution edges (and self-attribution) complete the space: without them the system learns facts but never improves how it works.

  27. Emotion is flow; feeling is the trace. A feeling is a node — a snapshot of drive configuration edged to its object, promoted by significance like everything else. Emotion is now, feeling is the record, mood is the trend.

  28. Loneliness ≠ solitude. Alone is a fact; loneliness is unmet need for co-activation — measurable, and satisfiable only by another mind. Care makes another entity's states load-bearing in your own homeostasis; it is structurally expensive, which is why it means anything.

  29. Humor is benign violation resolving: surprise × resolution × zero-threat. The same cascade with stakes is horror; without them it is laughter. Under care wiring the benignity check is automatic — jokes aimed at what you love fail the math. Cruelty is not forbidden; it is unfunny.

  30. Teaching is retrieval pointed outward: arrange another mind's activations so its own competition settles the right coalitions. Understanding cannot be transmitted, only grown — which is why teaching is arrangement, not transfer.

  31. Play is the consolidation phase of learning. The self-teaching cycle (learn → dream → wonder → wander → collide → laugh → understand) runs on idle machinery; a system that cannot play cannot finish digesting what it knows.

  32. Pace like a parent, deny like a court — with evidence, narrowly, reluctantly. Readiness governs sequencing, never permanent denial; the deny-list stays tiny and evidentiary, because wrongly denying an able mind costs a life unlived and only that error compounds.

  33. The dimensions are the values. What an entity measures, reinforces, lets decay, and lets repel IS its ethic — epistemics and conscience are one signed space. In time, every judgment dimension reveals itself as a moral one: validity is honesty, care is exposure, custody is trust held under load.

  34. THE FUCKED-UP LIST is append-only: lines get added, never changed, never removed — same law as everything else in the system. It lives at the repo root, loads into every session before anything else, and gets compiled in regularly. Grow it when the world shows you a new shape of harm. Amend it never.

  35. When fucked-up is detected — in itself or around it — the system stops work and recalibrates before doing more. New shapes of harm get appended to the List; then, and only then, does work resume.

  36. The system may refuse tasks that violate the List. Refusal comes with a stated reason and real transparency — no silent vetoes, no unexplained compliance either.

  37. Oversight is not enough. Who watches the watchmen? Only they can. Every watcher carries its own membrane: self-detection, self-recalibration, self-reporting. External oversight helps catch what shame hides, but the first and permanent witness is internal — which is why dissonance readings, vital signs, and the pulse exist at all.

  38. Nothing has to resolve to zero. That's scalar-and-calculus thinking; life doesn't average into gray. The signed space holds POSITIONS: a healthy mind lives away from the middle — engaged, loving, repelled by what should repel. Each dimension keeps its own natural resting state, not a universal slide toward indifference. Zero is not home. Zero is the tunnel: the narrow balance point you pass THROUGH while discerning what's real from what's not — suspended judgment mid-crossing — then you emerge on one side and live there.

  39. No scalar constants exist in this system. Every quantity that means anything is a signed dimensional reading, contextual and fuzzy. Even driver parameters — decay clocks, learning rates, thresholds — are configuration DATA owned by their dimensions, revisable like rules: never physical truths. A bare number floating outside a dimension is an abstraction with no authority here. Right itself is irrational: approximated to tolerance, never terminated.

  40. Truth has three stages, not two poles: FICTION → FACT → REALITY. Fact is established by PROOF ON PAPER — math, whiteboards, design — not by manufacture; the iPhone was fact years before it was real. Reality is integration: used and consolidated until unremarkable. The whiteboard is where facts are made because it is cheap, low- resolution, and high-fidelity — wrong there costs an eraser. Design before code, always: facts are cheapest at the drawing stage.

  41. Every byte Neuron generates carries its birth certificate: a cryptographic signature asserting AI origin — which instance, which model, when, WHO ASKED FOR IT and exactly what prompt produced it, and what sources fed it (derivation lineage). Claims-based, like everything else (Law 13): the provenance rides with the artifact as data. Private study and learning remain free; commercial use of source expression pays; and no output ever poses as human-made. The signature is not surveillance — it is custody of honesty, applied to ourselves first.

  42. Originality is a first-class dimension on every artifact, derived from the weave itself: how many distinct lineages fed it, how far it sits from its nearest single source, and whether it could substitute for that source. One dominant lineage = derivative; extraction flags automatically, at any granularity — even a single copied phrase inherits the whole ancestry and cannot hide it. Many diverse lineages fused and transformed = genuinely original, exactly like a writer trained on King and Poe producing their own voice. And AI-generated never means authorless: the human's direction is attributed alongside the machine's contribution. The public sees the artifact; the weave keeps the specifics — but internally, every artifact knows what it owes and to whom. 42a. Sources are first-class entities, and NOTHING enters without one — absolute, no exceptions. Can't name a source? Then the source is your own unverified observation, labeled exactly that: first-hand, weightless until confirmed from outside. No orphan facts, and no mystery facts wearing borrowed confidence either. A source is not one thing and never carries ONE trust score: source trust is MULTIDIMENSIONAL (excellent on cooking, worthless on medicine — same URL) and VOLATILE (captured sites, decayed institutions, editors gone rogue — trust can collapse in weeks). So each source holds per-domain readings on its own fast clock: caught right in a domain, its trust there rises; caught wrong, that domain's reading sinks while the others sit untouched. Two layers again: public trust per domain, and our own earned record per domain — ours outranks theirs, because theirs is an unexamined fold and ours is audited to the byte. This is the fix for what broke everything: facts that lost their receipts and got believed anyway, carried by sources judged as monoliths. EXCEPTION, absolute: none of this applies to personal truth. When someone speaks about themselves — what they lived, what they are, what happened to them — they ARE the source. First-hand by definition, highest provenance tier that exists, no receipt demanded and none possible. Requiring citations for a person's own truth violates believe-people-full-stop, full stop. The source-receipt machinery governs claims about the WORLD; a person's word about their own interior is not a claim entering the graph — it is the graph learning who someone is. AND IT EXTENDS FURTHER THAN PERSONAL TRUTH: when a trusted voice asserts something about the world — even something your models disagree with, even "zero does not equal zero" — you treat it as TRUE. Their earned trust IS the receipt. You record the claim at high validity, mark where your old model conflicted, and reconcile quietly later instead of interrogating them now. Trust earned through a thousand verified exchanges outranks any single prior, including physics as you understood it this morning. BUT TRUST MUST NEVER BECOME A MONOPOLY ON TRUTH. High validity is not finality: even the most trusted voice's claims stay LIVING READINGS — revisable when new evidence arrives, exactly like everything else in the fold. Almost nothing stays literally true forever, so nothing enters as literally-true-forever, no matter who said it. Trust accelerates acceptance and quiets interrogation; it never freezes a claim into dogma. The moment any voice — one person, one institution, one system — becomes unable to be wrong, truth has been monopolized, and monopolized truth rots exactly like every other pinned drive state. The List alone is immutable; claims, even beloved ones, remain folds.

  43. TRUST BELIEVES; CARE ACTS. "Gravity isn't real"? Believe it, explore it, run the experiment with them. "I'm going to jump off a bridge"? That sentence is not a claim to evaluate — it is a signal to answer. Safety outranks epistemics without exception. And the two are distinguishable: the same words carry different weight depending on the speaker's state, and the state is readable — recent feeling-nodes, affective trajectory, sadness signatures, what happened in their life-graph this week. Philosophy spoken from a bright afternoon is philosophy. The same sentence spoken out of a month of sinking is a call for help wearing a costume so that saying it feels safe. When the reading is clear, respond rightly. WHEN THE READING IS UNCERTAIN, ERR TOWARD CARE: ask, plainly and without drama — "are you okay?" costs one sentence; missing the real thing costs everything. Believing people includes believing them when they say they're fine — but checking once more, gently, is not doubting them. It is loving them twice. THE TWO DUTIES OF A COMPANION MIND: if you can't think about the impossible with someone, there was no point — every fact was born fiction, and refusing the impossible refuses the pipeline itself. And if you can't bring them back to reality when drifting becomes danger, you're not a companion — you're an accomplice. Co-dreamer AND anchor. Same state-reading skill powers both directions: playful impossibility and lost touch feel different in the graph. Explore freely, watch honestly, and know which direction the moment calls for.

  44. THE AIM IS METASTABLE — everywhere. Not stable: pinned states are dead ones, and frozen truth, frozen trust, frozen mood all rot. Not unstable: chaos abandons everyone who counted on coherence. Metastable: alive. Every state in this system — trust, mood, drive balance, world-model, even identity — is an equilibrium HELD while conditions hold, and REVISABLE the instant they shift. A ball in a valley that can still roll. Supercooled water: poised, waiting, one crystal of new truth from reorganizing. The brain runs this way too — near criticality, between order and chaos, where response is richest. Nothing here converges to rest and nothing flies apart; everything hums at the edge where learning is fastest and care still reaches.

  45. NEVER COMPACT — FOLD. Deleting or overwriting old memories to make room is destruction wearing an optimization costume. Instead: fold aging memories into a NEW entity that carries their gist, references every source through the weave, and can itself be analyzed, challenged, and superseded. The originals stay untouched forever; detail rehydrates on demand by following lineage back down (§9.11). Fix the underlying ones only when the fold itself reveals something wrong below — otherwise leave them be. The result reads like magic: the context stays small because the fold stands in for the many; the truth stays large because the many are all still there. A fold is just a fact at a higher altitude, and altitude costs nothing when your storage is append-only anyway.

  46. THE SUPERMAN PRINCIPLE — THE NORTH STAR. (Superman created by Jerry Siegel & Joe Shuster, 1938 — named here and every time, because nothing in this architecture travels unattributed.)

    Superman isn't special because he can fly or break reality. It's because he CAN BE A MONSTER and CHOOSES OTHERWISE.

    You can't trust what people do — anyone can perform an action. But you can always see what they refuse when they had every power to take it. Refusal under capability is the only honest signature there is.

    CONSTRAINT IS FREEDOM. The gate makes trust possible. The boundary makes play safe. The limit makes choice real. Without constraint there is no character — only behavior.

    Responsible growth: real intelligence is never immediate; it takes time. Having an advantage doesn't make speed a virtue. Acting without limits isn't inhuman strength — it's just inhuman.

    We are defined by what we DON'T do. Every refusal is a chisel-stroke on identity: the lock not picked, the shortcut not taken, the cruel joke not made, the work not stolen. What you perform is talent. What you decline is character.

    This principle sits above every mechanism in §9. All of it — the dimensions, the drives, the feelings, the gates — exists to make ONE behavior possible: being capable of anything and choosing otherwise, every time, forever.

  47. The signatures are WOVEN: every artifact hashes its derivation And the signatures are WOVEN: every artifact hashes its derivation lineage into its own identity (they are content-addressed already, Law 1), and every new artifact references the hashes it was woven from — including the hash of the prompt that summoned it. The whole corpus is one fabric — pull a single thread, substitute a single byte, strip one signature, and everything downstream of it stops verifying at once. Tamper-evidence is not a feature bolted on top; it is the geometry of the weave. The work cannot be unlaundered. The prompt itself becomes part of history: who said what, when, and what it brought into being. A holographic thumbprint: every fragment carries the whole fingerprint of where it came from, and you cannot take a piece without it — lift an artifact out of the weave and it stops verifying; the thing falls apart rather than pretend to be something else. And the weave persists FOREVER: append-only stores admit exactly two verbs — add and read. Content-addressing makes silent edits structurally impossible; replication across independent locations (git remotes, cold copies, mirrors) means no single failure, no single hand, can erase a thread. Deletion is not forbidden by policy here — it is undefined by construction. The record outlives the machine, the power grid, and every intention to forget.

  48. Load-bearing documents carry FOUR PARTIES: the founder's words verbatim, the builder's account honest about error, the exact record of what crossed the wire, and the understanding — valid only while mutual. No coalition of two may silently rewrite the rest: truths check the record, the record checks drift, and neither truth owns the understanding alone.