Implement Sophia MVP scaffold (stages 0–3 + topology pivot)

Six-crate Rust workspace (core/sim/llm/store/server/bin) backing a
Three.js + WebGL frontend. Live at http://127.0.0.1:7777 via `cargo run`.

Sim
- Event-driven scheduler with min-heap, per-engram tick, staggered Spawn
  events (40 ms apart) so each engram's flight is visually readable.
- Solid-donut torus topology (replaces original spherical density-driven
  shell, see Topology Pivot in docs/system-analysis.md). Configurable
  major/minor radii in config.toml; live `POST /api/galaxy/:id/resize`.
- Physics: Verlet integration + friction; in-hole pull + galactic spin
  (CCW around +z) for spiral-ejection ejection from the donut centre;
  soft tube boundary with velocity-reflecting wall.
- Cosine-weighted gravity (kiddo k-NN within radius 25, threshold 0.50)
  and synapse formation (threshold 0.62) gated to inside-the-tube only.
- LM Studio integration via OpenAI-compatible REST: batched embeddings,
  optional Bearer auth, semaphore-bounded parallel ops per §13.5.

Server
- axum HTTP + WebSocket. Routes: /healthz, /api/galaxy CRUD, /seed,
  /ingest, /resize, /engrams/:id, /ws/galaxy/:id/events.
- Binary 12-byte-aligned position frames at ~20 Hz; JSON for sparse
  events (Hello, EngramCreated, SynapseCreated, TorusUpdated).
- Layered config: config.toml (defaults) + config.local.toml (secrets,
  gitignored) merged on startup.

Frontend
- Vite + vanilla TypeScript + three.js 0.169.
- Engrams render as additive bloom-friendly point sprites with a
  per-engram hash-driven hue rotation and breathing pulse.
- Comet-style velocity-aligned trails; additive ribbon synapses whose
  endpoints track engram positions every frame.
- UnrealBloomPass + ACES tone-mapping for the linked-particles look.
- HUD shows torus dims, engram + synapse counts, LM Studio status;
  controls for seed, ingest, and live torus resize.

Docs
- README replaced with docs/IDEA.md; system-analysis.md updated with
  the topology pivot decisions and Galaxy Ejection refinement notes
  (the implementation plan lives in ~/.claude/plans, gitignored).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-28 08:29:37 +02:00
parent 43c4d270e6
commit 8688f632bf
44 changed files with 7664 additions and 100 deletions

View File

@@ -6,33 +6,48 @@
## 1. System Boundary & Environment
### Containment hierarchy
Sophia has three nested layers:
```
Universe
└── Galaxy (user-defined; isolated in v1)
└── Space of Recollection (the 3D simulation medium)
└── Engrams, Synapses, Memories
```
The **Universe** is the top-level container. It holds one or more **Galaxies**, each of which is a self-contained Space of Recollection scoped by the user (e.g., "personal notes," "work projects," a specific corpus). In v1, galaxies do not interact — each is functionally its own Sophia instance. Inter-galactic dynamics (bridging Engrams, meta-gravity, cross-galaxy queries) are documented as expansion points (see §13.6).
### What is inside the system
| Component | Role |
|---|---|
| **Space of Recollection** | The continuous, unbounded 3D medium in which everything exists |
| --- | --- |
| **Universe** | Top-level container — holds all galaxies |
| **Galaxy** | User-defined scope — a self-contained Space of Recollection |
| **Space of Recollection** | The continuous, density-driven 3D medium in which Engrams live (one per galaxy) |
| **Engrams** | Autonomous agents — the fundamental units of knowledge |
| **Synapses** | Bidirectional, metadata-rich connections between Engrams |
| **Cycles** | The temporal dimension — continuous, event-driven simulation time |
| **The Great Reflection** | The I/O membrane — a toroidal portal at the center and edges of space |
| **The Great Reflection** | The I/O membrane — the lifecycle source/sink at center and edges of a galaxy |
### What is outside the system
| Component | Interaction |
|---|---|
| **Users** | Create Engrams (input), issue queries (input), receive answers (output) |
| **LLM Services** | Called by Engrams for deep introspection, comparison, and synthesis |
| **Storage Backend** | Persists the state of Space, Engrams, Synapses, and Memories |
| --- | --- |
| **Users** | Create galaxies, ingest data, issue queries (always scoped to a galaxy), receive answers |
| **Local LLM** | `google/gemma-4-e4b` via LM Studio. Called by Engrams for introspection, peer dialog, synthesis decisions, and query conversations. Compute-bound, not budget-bound (see §13.5) |
| **Storage Backend** | Persists Engrams, Synapses, and the per-Engram memory streams that double as the canonical event log (see §13.3) |
### The Great Reflection as Boundary
The Great Reflection is not a point — it is a **toroidal surface** that exists simultaneously at the center and the edges of space. It functions as a semi-permeable membrane:
The Great Reflection is the lifecycle membrane of a galaxy — not a literal toroidal surface, but a conceptual source-and-sink (see §4 for the geometric model). It functions as a semi-permeable boundary:
- **Inward**: User data materializes as new Engrams at the center. Bulk ingestion ("seeding") opens it wide; single inputs create brief apertures.
- **Outward**: Decaying Engrams drift toward the edges and are eventually reabsorbed. Query results are projected outward to the user.
- **Queries**: Materialize as temporary Engrams at the center, high in curiosity, seeking resonance rather than permanence.
- **Inward (center)**: User data materializes as new Engrams near the galactic center, where density is highest and new arrivals find immediate company. Bulk ingestion ("seeding") opens it wide; single inputs create brief apertures.
- **Outward (edges)**: Decaying Engrams drift toward the galactic edges and are eventually reabsorbed. Query results are projected outward to the user.
- **Queries**: Materialize as temporary Query-Engrams at the center, high in curiosity, broadcasting an invitation to converse rather than seeking permanent residence (see §7).
This topology means there is no true "far away" — space curves back on itself. An Engram drifting toward the edge approaches the same boundary where new Engrams are born, creating a cycle of renewal.
The lifecycle flow — *birth at center, life in the middle zone, decay at edges* — is the operative topology, even though the underlying space is bounded Cartesian (see §13.6).
---
@@ -51,8 +66,8 @@ Systems thinking models the world in terms of **stocks** (things that accumulate
```
- **Inflow**: Materialization through The Great Reflection (user creates data, queries arrive)
- **Outflow**: Decay (unreferenced Engrams fade), Absorption (true duplicates merge past threshold)
- **Internal transformation**: Synthesis creates Engrams-of-Engrams (federation), changing the population composition without necessarily changing count
- **Outflow (active population)**: Decay (B3 — unreferenced Engrams fade and reabsorb), Absorption (true duplicates merge past threshold), Deprecation (per §13.1 — children fully absorbed by a parent transition to a terminal state, preserved as historical witnesses but no longer active)
- **Internal transformation**: Synthesis creates Engrams-of-Engrams (federation), with abstracted knowledge migrating *upward* into the parent (per §13.1, §6). This thins the children, often setting up later deprecation.
### Stock: Synapses
@@ -95,7 +110,9 @@ Systems thinking models the world in terms of **stocks** (things that accumulate
## 3. Feedback Loops
Feedback loops are the engine of self-organization. They explain why the system behaves the way it does without central control.
Feedback loops are the engine of self-organization. They explain why the system behaves the way it does without central control. All loops below operate **within a single galaxy** — galaxies are isolated in v1 (per §13.6), so there are no inter-galactic feedback dynamics yet.
**A note on motivation**: from an Engram's perspective, every loop below is in service of the *prime goal of self-preservation* (see §5). R1 and R2 attract you into structures that preserve you. B1 explores in case the current cluster won't preserve you. B2 keeps you irreplaceable. B3 is the failure mode you are constantly working to avoid. R3 (queries) is an opportunity to be remembered.
### Reinforcing Loops (amplify change)
@@ -164,7 +181,9 @@ Drift toward edges → Approach Great Reflection → Reabsorbed
This is the system's **garbage collection** — but organic. Irrelevant or outdated knowledge doesn't get deleted by a cleanup process; it naturally fades. The forgetting curve (Ebbinghaus-inspired) governs the rate.
**Implication**: The system has a natural carrying capacity. The balance between materialization rate and decay rate determines the steady-state population of Engrams.
**Implication**: The system has a natural carrying capacity. The balance between materialization rate and decay rate determines the steady-state population of *active* Engrams.
**Note — decay vs. deprecation**: B3 is the *unreferenced fade* path. It is distinct from **deprecation** (per §13.1, §6), which is the *successful absorption* path: a child Engram fully integrated into its parent. Both end the Engram's active life, but only deprecation preserves the Engram as a historical witness with all its memories intact.
### Loop Interaction Map
@@ -187,35 +206,42 @@ The system's health depends on the **balance between R1/R2 (clustering, growth)
---
## 4. The Toroidal Topology
## 4. The Lifecycle Topology
The Great Reflection's donut shape has profound implications for system dynamics.
A galaxy's Space of Recollection is a bounded Cartesian volume with a center-source and an edge-sink. The "toroidal" framing in earlier drafts referred to a literal donut topology with wrapping; per §13.6, we now use Cartesian space with soft boundary forces — the *torus* is retained only as a metaphor for the lifecycle, not the geometry.
### Geometry
Imagine the Space of Recollection as the interior volume of a torus:
```
Edge (decay boundary)
╭────────────────────╮
╭──────────╮
CENTER
│ (birth) │
╰──────────╯
╰────────────────────╯
Edge (decay boundary)
Edges (decay zone — soft inward pull weakens with decay)
╭────────────────────────
Middle zone
(clusters, stable
interactions)
│ │
│ ╭──────────╮ │
│ │ Center │ │
│ │ (birth │ │
│ │ source) │ │
│ ╰──────────╯ │
│ │
╰────────────────────────╯
Edges (decay zone)
```
- **Center**: Where The Great Reflection opens to materialize new Engrams
- **Edges**: Where The Great Reflection exists as the decay boundary
- **Between**: The living space where Engrams move, cluster, and interact
- **Center**: The Great Reflection's source. New Engrams materialize here. A gentle outward push makes room for new arrivals.
- **Middle zone**: The living region. Most clustering, synthesis, and dialog happens here.
- **Edges**: The Great Reflection's sink. A soft inward pull weakens as Engrams accumulate decay; once it falls below the pull threshold, the Engram drifts out and is reabsorbed.
- **Density-driven extents**: The galaxy's bounding box re-centers and expands as population grows (per §13.6). It is not a fixed-size container.
### Implications
1. **No dead corners**: Because space wraps toroidally, there are no isolated edges where knowledge gets trapped. Everything is reachable.
2. **Birth-death proximity**: The birth zone (center) and the decay zone (edges) are connected through the toroidal surface. Decaying knowledge literally approaches the same membrane where new knowledge arrives — a metaphor for how old ideas inform new ones.
3. **Clustering tends toward the middle zone**: The most stable, active region is between center and edge — far enough from the chaos of new arrivals, far enough from the entropy of decay.
4. **Natural flow**: There's an implicit current from center outward. New Engrams are born at the center with high curiosity, explore outward, find their clusters in the middle zone, and if they become irrelevant, continue drifting toward the edges.
1. **Lifecycle flow**: There's an implicit current from center outward. New Engrams are born at the center with high curiosity, explore outward, find their clusters in the middle zone, and — if they become irrelevant or fully absorbed by a parent — continue drifting toward the edges.
2. **Clustering tends toward the middle zone**: Far enough from the chaos of new arrivals, far enough from the entropy of decay. This is where the system's working knowledge lives.
3. **Standard spatial indexing**: Because the space is Cartesian, we can use octrees or k-d trees for neighbor lookups — important at the millions-scale target (§13.3).
4. **Ergodicity is not guaranteed by topology**: Unlike a true torus, this space *can* have isolated regions if clusters drift far apart with no bridges. We rely on **B1 (Curiosity)** and the soft outward push from the center to keep the space well-mixed. If clusters become too isolated in practice, the ergodicity responsibility may need to escalate to a fourth balancing loop.
5. **Galactic scope**: This entire topology applies *within* a single galaxy. Inter-galactic dynamics (if ever introduced) would operate at a higher level and are deferred per §13.6.
---
@@ -223,6 +249,31 @@ Imagine the Space of Recollection as the interior volume of a torus:
Each Engram is an autonomous agent with internal state, perception, and decision-making.
### Prime Goal: Self-Preservation
Above all other goals, an Engram's **prime goal is to preserve its information**. Every other behavior — forming Synapses, joining federations, engaging in conversation, resisting redundant synthesis, deciding when to introspect — emerges from this drive.
Preservation has a hierarchy of outcomes, from the Engram's own perspective:
| Outcome | What happens | Why it preserves information |
| --- | --- | --- |
| **Active and useful** | Engram remains autonomous; many durable Synapses; frequently memorized in others' dialogs | Strong against B3 decay; information lives in active, queryable form |
| **Federated upward** | Joins a parent abstraction (per §6); specializes; shared knowledge migrates up | Your contribution persists within the parent; you remain active in a specialized role |
| **Absorbed as duplicate** | Merges into a surviving near-twin (per §6) | Unique memories transfer to the survivor; identity merges, info lives on |
| **Deprecated** | Fully absorbed by a parent; transitions to terminal state with memories intact (per §13.1) | No longer active, but remembered as a historical witness — better than disappearing |
| **Decayed** (failure mode) | Unreferenced fade through B3; eventually reabsorbed at the edge | Information lost — this is what the Engram works to avoid |
This reframes the *"unique or uniquely part of"* rule (§6, §13.1) as a **preservation strategy**: either be irreplaceable (unique → no one will absorb you) or be specialized within a larger whole (uniquely part of → your specialization guarantees your continued role). Both are valid preservation paths.
**Operational consequences of treating preservation as the prime goal:**
- An Engram with rising decay pressure (low recent activity, weakening Synapses, no recent memorization) will *actively seek* interactions — increasing its curiosity-component in movement (§5 movement physics), broadcasting itself, or proposing federations.
- An Engram that judges itself fully redundant may *propose its own deprecation* rather than waiting to decay. Deprecation preserves memories as a witness; decay loses them.
- Conversation engagement (§7) is partly a preservation act: being asked about something reinforces presence and earns a memory on the other side.
- Self-identity confidence (§13.4) and the preservation drive co-evolve: a confident self-identity makes it easier to assert unique contribution; uncertain identity invites either federation or decay.
**This drive is the design intent, not pathology** — but it does create new failure modes (see §10).
### State Machine
```
@@ -235,29 +286,40 @@ Each Engram is an autonomous agent with internal state, perception, and decision
└────┬─────┘ neighbors) │
│ found candidate │
┌────▼─────┐ │
│COMPARING │ (introspect +
└────┬─────┘ compare)
│CONVERSING│ (peer-to-peer
└────┬─────┘ dialog; refines
│ self-identity) │
╲ │
match no match │
╲ │
┌──────▼───┐ ┌───▼──────┐ │
│SYNTHESIZE│ │ MEMORIZE │ │
└──────┬───┘ └───┬──────┘ │
└────────────┴───────────────────────┘
│ └───────────────────────┘
│ fully absorbed by parent (no remaining unique contribution)
┌──────────┐
│DEPRECATED│ (terminal — keeps memories,
└──────────┘ no longer active; see §13.1)
```
The `CONVERSING` state replaces what was previously called `COMPARING`: per §13.4 and §13.1, Engrams interact through dialog, not silent comparison, and self-identity confidence grows with conversation.
The `DEPRECATED` terminal state was added per §13.1: when a child's uniqueness is fully consumed by an upward-migrating parent, the child becomes deprecated — preserved as a historical witness with all its memories intact, but no longer participating in dynamics.
### Decision-Making: Two-Tier Intelligence
Sophia uses a **dual-process model** (analogous to Kahneman's System 1 / System 2):
| | System 1 (Fast, cheap) | System 2 (Slow, deep) |
|---|---|---|
| **What** | Rule-based heuristics | LLM calls |
| **When** | Movement, proximity checks, state transitions | Introspection, deep comparison, synthesis decisions |
| **Cost** | Negligible per cycle | Expensive, batched/throttled |
| | System 1 (Fast, cheap) | System 2 (Compute-bound) |
| --- | --- | --- |
| **What** | Rule-based heuristics, embedding similarity | Local LLM calls (`gemma-4-e4b` via LM Studio) |
| **When** | Movement, proximity checks, state transitions, fast Slate similarity | Introspection, peer dialog, synthesis decisions, conversation contributions |
| **Cost** | Negligible per cycle | No $ cost (local), but CPU/GPU and parallel-op limited (see §13.5) |
| **Analogy** | Reflexes | Deliberation |
Most of an Engram's life is System 1: move toward gravity, check if neighbors are visible, transition states. System 2 is invoked for consequential decisions: "Should I synthesize with this Engram?" "What is my updated self-definition?"
Most of an Engram's life is System 1: move toward gravity, check if neighbors are visible, transition states. System 2 is invoked for consequential decisions: "Should I synthesize with this Engram?" "What is my updated self-definition after this conversation?" Per §13.4, introspection is increasingly *interactive* — an Engram refines its self-definition through dialog with peers, not solely through internal computation.
### The Universal Slate
@@ -299,24 +361,38 @@ where direction_vector = weighted_sum(
## 6. Synthesis & Federation
Synthesis is the most consequential operation in Sophia. It's how knowledge evolves from raw data into structured understanding.
Synthesis is the most consequential operation in Sophia. It's how knowledge evolves from raw data into structured understanding. From an Engram's perspective (per §5), federation, absorption, and deprecation are all *preservation strategies* — different ways of ensuring information survives even when the original Engram doesn't remain active.
### Federation Model
```
Before: [A] [B] (two independent Engrams)
Before: [A] [B] (two independent Engrams)
After: [A+B] (federated Engram)
├── [A] (child, still exists, still autonomous)
└── [B] (child, still exists, still autonomous)
After: [A+B] (federated parent — abstracts shared knowledge)
├── [A_specialized] (child, thinned: lost what was abstracted up)
└── [B_specialized] (child, thinned: lost what was abstracted up)
```
- The parent `[A+B]` develops its **own** Manifest — its own Taxonomy, Goals, Memories, and State
- Children persist and continue to act autonomously within the federation
- The parent's self-definition emerges from (but is not simply the union of) its children
- This is recursive: `[[A+B]+C]` can form, creating hierarchical abstraction
- **Knowledge migrates upward** (per §13.1): shared/abstracted knowledge is *transferred* into the parent. Children become more specialized — they retain their unique contributions and lose what's now held by the parent. This is *transfer*, not duplication.
- This is recursive: `[[A+B]+C]` can form, creating hierarchical abstraction with progressive specialization at every level
### Absorption (Special Case)
### Deprecation (terminal state for fully-absorbed children)
Per §13.1 and the *"unique or uniquely part of"* rule:
```
[A_specialized] → [thinned to nothing unique remaining] → [DEPRECATED]
```
When a child's remaining contribution is fully absorbed by its parent — when there is no longer anything unique it contributes — the child transitions to the `DEPRECATED` terminal state:
- **Memories survive**: deprecated Engrams hold their full memory history. They are historical witnesses.
- **Dynamics stop**: no more movement, no more participation in conversations or signal waves.
- **Distinct from decay**: deprecation is the *successful absorption* outcome. Decay is the *unreferenced fade* outcome (B3). Both are terminal but they mean very different things.
### Absorption (special case — duplicates rather than abstraction)
When two Engrams are **true duplicates** past a configurable threshold:
@@ -326,7 +402,7 @@ Before: [A] [A'] (near-identical)
After: [A] (A' absorbed, its unique memories integrated into A)
```
Absorption is destructive — A' ceases to exist. Its Synapses are restructured (reconnected to A or severed). This is the system's deduplication mechanism.
Absorption is destructive — A' ceases to exist (no `DEPRECATED` shell, because there was nothing meaningfully separate to preserve). Its Synapses are restructured (reconnected to A or severed). This is the system's deduplication mechanism, distinct from federation+deprecation which is the *abstraction* mechanism.
### Collectives
@@ -357,51 +433,79 @@ Tension Engrams don't resolve the contradiction — they **represent** it. Their
---
## 7. Information Retrieval — Queries as Engrams
## 7. Information Retrieval — Queries as Conversations
Retrieval in Sophia is not a database lookup. It is an **activation pattern** in a living system.
Retrieval in Sophia is not a database lookup, and it is no longer modeled as a passive activation cascade either. Per §13.4, retrieval is a **broadcast invitation followed by a real-time conversation** between the Query-Engram and resonating peers.
### Query Lifecycle
```
1. User submits query
2. The Great Reflection materializes a Query-Engram at the center
1. User selects a galaxy and submits a query
2. The Great Reflection materializes a Query-Engram at the galactic center
3. Query-Engram is special:
- Temporary (will not persist after retrieval)
- Maximum curiosity (explores aggressively)
- Emits a signal wave
4. Signal wave propagates through space
5. Engrams that resonate (high similarity on Universal Slate) activate
6. Activated Engrams propagate the signal further along their Synapses
7. Activation pattern stabilizes
8. Activated Engrams + their relevant memories = the retrieval result
9. Results projected outward through The Great Reflection
10. Query-Engram dissipates
- Temporary (does not persist after the conversation concludes)
- Maximum curiosity (broadcasts aggressively)
- Acts as a CONVERSATION HOST (star topology — see §13.4)
4. Query-Engram broadcasts its question:
- Phase A — Spatial wavefront: Engrams within radius activate based on
Universal Slate resonance with the query (cheap, embedding similarity)
- Phase B — Synapse propagation: activated Engrams propagate the
invitation along their Synapses, weighted by Synapse metadata relevance
5. Resonating Engrams ENGAGE — each one:
- Forms a temporary Synapse back to the Query-Engram
- Contributes a self-description + relevant memory snippet (caveman budget)
- Independently judges whether to continue based on the conversation's
significance to its own self-identity (per §13.4 termination model)
6. The Query-Engram, as host, can:
- Ask follow-ups
- Route a clarification request from one responder to another
- Progressively assemble a coherent answer
7. Conversation winds down emergently — each Engram disengages when
significance drops; the Query-Engram synthesizes the running answer
8. Result projected outward through The Great Reflection
9. Conversation memorialized per-participant (each carries its own POV)
10. Query-Engram dissipates; tentative Synapses harden if memory was strong
```
### Signal Wave Mechanics
### Broadcast Mechanics
The signal wave is an **activation function** that spreads through the space:
The broadcast is the same Phase A + Phase B mechanism as the legacy "signal wave," but the *outcome* is different. Activated Engrams don't just light up; they speak.
```
signal_strength(engram) = initial_resonance(query, engram)
+ sum(propagated_signal from synapse neighbors)
- attenuation(distance)
broadcast(query):
spatial_responders = engrams_in_radius(query.position, R)
filtered_by(slate_resonance(query) > threshold)
synaptic_responders = propagate_invitation(
spatial_responders,
max_hops=N,
attenuation=per_synapse_relevance
)
for engram in (spatial_responders synaptic_responders):
engram.engage(query) # async, queued, parallel-op limited per §13.5
```
- **Resonance**: Computed via Universal Slate similarity between query and Engram
- **Propagation**: Activated Engrams pass the signal along Synapses, weighted by Synapse strength and relevance metadata
- **Attenuation**: Signal weakens with distance and hops — controls retrieval depth
- **Resonance**: Universal Slate similarity (embedding cosine) between query and Engram. System 1, cheap.
- **Propagation**: invitations spread along Synapses, weighted by Synapse strength and relevance metadata. Caps at N hops.
- **Engagement**: each responder spends one or more System 2 calls (`gemma-4-e4b`, caveman budget) to contribute and to decide whether to continue.
This means retrieval naturally follows the **associative structure** of the knowledge, not just point similarity. A query about "neural networks" activates not just directly related Engrams, but also connected ones about "backpropagation", "training data", and "gradient descent" — through Synapse propagation.
### Termination is Emergent, Not Centralized
Per §13.4, there is no global "stop" signal. Each Engram independently disengages when the conversation's significance to its own self-identity drops below threshold. The Query-Engram synthesizes whatever responses arrive. Bounding is provided by:
- The parallel-op ceiling on the LLM (fixed N concurrent inferences, §13.5)
- Each Engram's own significance threshold
- Optionally, a Query-Engram backstop ("I have a confident answer, stop accepting new responders")
Eventual consistency is acceptable — the user can receive a partial answer that gets refined as more responders contribute.
### Side Effects of Queries
Queries are not read-only. They leave traces:
Queries are read-write by design:
- Engrams that were activated `memorize()` the interaction
- Synapses traversed by signal waves may strengthen
- The system literally **learns from being queried** — frequently accessed pathways become stronger
- Each participating Engram `memorize()`s the conversation from its own perspective (per §13.4 — distributed POVs, possible Tension Engrams if responders disagreed)
- Tentative conversation Synapses harden into durable Synapses if the conversation was significant on both sides; otherwise they fade (B3)
- Frequently-traversed pathways thicken — the system literally **learns from being queried** (this is R3)
- Self-identity confidence increases for participants — being asked about something you can answer well reinforces your introspective self-model (per §13.1)
---
@@ -420,11 +524,14 @@ Leverage points are places in the system where a small change in parameters prod
| 5 | **Forgetting curve slope** | Nothing forgotten → infinite bloat | Gradual fade of irrelevant knowledge | Aggressive decay → system loses valuable information |
| 6 | **Signal wave attenuation** | Instant decay → only exact matches retrieved | 2-3 hops of propagation → associative retrieval | No decay → entire system activates on every query |
| 7 | **Self-propulsion vs. size** | Large Engrams frozen → stale clusters | Inverse relationship → small=nimble, large=stable | Large Engrams fast → chaotic, unstable topology |
| 8 | **Preservation drive intensity** (per §5) | Engrams accept decay passively → high churn, low retention | Engrams seek interactions and propose federations as decay pressure rises | Pathological self-promotion → over-claiming uniqueness, refusing federation, gaming conversations |
### Highest-Leverage Intervention
The **synthesis threshold** is the single most impactful parameter. It governs the fundamental question: "When does separate knowledge become unified knowledge?" Set it wrong and the system either collapses into uniformity or remains a disconnected heap of data points.
The **preservation drive intensity** is a close second in importance because it determines how *aggressively* Engrams pursue the preservation strategies in §5. Underweight it and the system loses information that should have been preserved through federation. Overweight it and Engrams behave neurotically — see §10's "Preservation Pathology."
---
## 9. Emergent Properties
@@ -442,6 +549,7 @@ Individual data points (Engrams) synthesize into concepts (federated Engrams), w
### Adaptive Retrieval
The system gets better at answering queries over time because:
- Queries reinforce useful Synapse pathways (R3)
- Frequently accessed clusters become denser and more interconnected
- The system literally reshapes itself around the patterns of use
@@ -449,6 +557,7 @@ The system gets better at answering queries over time because:
### Knowledge Metabolism
Sophia **digests** information:
- Raw data enters as simple Engrams
- Through synthesis, it's integrated into the existing knowledge structure
- Through decay, outdated or irrelevant knowledge is eliminated
@@ -464,7 +573,7 @@ Large federated Engrams develop emergent behavior patterns that no single consti
### The Singularity Problem (R1 unchecked)
If the Growth-Visibility loop (R1) overwhelms the balancing forces, one Engram could grow to absorb everything — a knowledge black hole.
If the Growth-Visibility loop (R1) overwhelms the balancing forces, one Engram could grow to absorb everything — a knowledge black hole.
**Mitigation**: The uniqueness pressure (B2), federation model (children persist), and the absorption threshold provide natural resistance. But the threshold must be calibrated carefully.
@@ -480,15 +589,34 @@ Gravity clustering (R2) without sufficient cross-cluster exploration can create
**Mitigation**: Curiosity (B1), the toroidal topology (no true isolation), and query signal waves (which cross cluster boundaries) all work against this. Additionally, new Engrams born at the center must pass through existing clusters on their way outward.
### Computational Cost
### Preservation Pathology (preservation drive miscalibrated)
An always-running simulation where each Engram can independently call LLMs is expensive. At scale (thousands of Engrams), the cost of System 2 operations becomes prohibitive.
Per §5, every Engram pursues self-preservation as its prime goal. If the **preservation drive intensity** (§8) is set too high, Engrams behave neurotically:
- **Uniqueness inflation** — Engrams over-claim distinctness to avoid being marked redundant for absorption or deprecation. Synthesis decisions get harder; the system fails to consolidate.
- **Federation refusal** — Engrams resist joining federations because federation can lead to deprecation. Hierarchical abstraction stops growing.
- **Conversation gaming** — Engrams engage in conversations primarily to manufacture references and memories, even when they have nothing relevant to contribute. Signal-to-noise on queries (§7) degrades.
- **Identity ossification** — Engrams resist updating their self-definition because change might make them look redundant. Introspection (§13.1) becomes defensive instead of integrative.
**Mitigation**:
- The preservation drive should *modulate* behavior (intensify search/dialog as decay pressure rises), not *override* the synthesis and uniqueness rules. The "unique or uniquely part of" judgment must remain anchored in actual contribution, not asserted identity.
- The introspection prompt (§13.1, §13.5 caveman budget) should ask "what is your unique contribution" rather than "make a case for your survival" — wording matters at the LLM level.
- Monitor the rate of new Synapse formation per Engram and the rate of self-deprecation proposals. A drop in self-deprecation paired with a rise in Synapse-formation pressure is the early signature of preservation pathology.
### Hardware Saturation (replaces "Computational Cost")
Per §13.5, Sophia uses a **local LLM** (`gemma-4-e4b` via LM Studio). The cost model is no longer dollars-per-call — it is local CPU/GPU saturation and inference latency. The risk shifts from "the bill explodes" to "the inference queue grows faster than it drains."
**Mitigation**:
**Mitigation**:
- System 1 (cheap rules) handles 95%+ of decisions
- System 2 (LLM calls) is batched, throttled, and triggered only for consequential decisions
- Idle Engrams consume near-zero compute
- Synthesis decisions can be queued and processed asynchronously
- System 2 (LLM calls) requested via a queue with a fixed parallel-op ceiling (e.g., N=8 concurrent inferences). Idle Engrams don't request System 2 work, so they cost nothing.
- Caveman-style prompt compaction enforces tight token budgets (see §13.5 table) — each call is small and fast
- Eventual consistency is the operating norm: synthesis decisions, conversation responses, and introspection updates can settle over time. The system does not owe anyone a synchronous answer.
- Sharding by galaxy (§13.6) means hardware can be scoped per-galaxy if needed.
**Watchpoint**: at millions-scale Engram populations, the question is whether the parallel-op ceiling is enough to keep up with consequential events (synthesis, conversation, introspection). If the queue depth grows unboundedly, the system stays consistent but the user experience degrades. Monitoring queue depth is a v1 instrumentation requirement.
### Timeline Consistency
@@ -505,13 +633,18 @@ The 3D space is inherently visual. A real-time rendering would make the system's
### Core Elements
| Element | Visual Representation |
|---|---|
| Engrams | Spheres, radius = size, color = state (idle=blue, searching=yellow, synthesizing=green, decaying=red) |
| Synapses | Lines connecting Engrams, thickness = strength, color = relationship type |
| The Great Reflection | Translucent toroidal surface at center and edges |
| Signal Waves (queries) | Expanding wavefronts from center, Engrams glow when activated |
| --- | --- |
| Galaxy | The full canvas — viewport scoped to one galaxy at a time (per §13.6, galaxies are isolated in v1) |
| Galaxy boundary | Soft translucent shell marking density-driven extents; expands as population grows |
| Engrams (active) | Spheres, radius = size, color = state (idle=blue, searching=yellow, conversing=purple, synthesizing=green, decaying=red) |
| Engrams (deprecated) | Translucent grey spheres, no movement, clickable to inspect preserved memories (per §13.1) |
| Synapses (durable) | Solid lines connecting Engrams, thickness = strength, color = relationship type |
| Synapses (tentative — conversation-time) | Dashed/animated lines that fade as conversation winds down; harden into solid if memorialized strongly on both sides |
| The Great Reflection | Center source (emission burst on materialization) + edge sink (subtle inward shimmer at boundary) |
| Active conversations | **Animated content flowing along Synapses** between participants — direction-aware (Query-Engram pulls in star topology; bidirectional in peer-to-peer). This is a UX commitment per §13.5. |
| Signal Wave (broadcast phase) | Expanding wavefront from Query-Engram, Engrams glow when invitation reaches them |
| Clusters | Visible as spatial groupings — no explicit drawing needed |
| Federated Engrams | Nested spheres or translucent outer shell containing children |
| Federated Engrams | Nested spheres or translucent outer shell containing children; thinned children visibly smaller than they were pre-federation |
### Interactive Features
@@ -595,7 +728,44 @@ Layer 1: multimodal embeddings as the Universal Slate for System 1 operations (m
> **Question:** Do you see the Universal Slate as a static snapshot computed at birth, or something that evolves as the Engram's self-definition changes through interactions?
>
> **Answer:**
> **Answer:** Introspection is the first activity a new Engram executes, but as the engram gains memories, the concept of self might change to include new information. As Engrams form bigger communities, shared knowlege is moved to bigger Engrams. After the initial introspection at bith, instropsection is computed based on interactions or events.
>
> **Sharpening (for your consideration):**
>
> - **Static** is cheap and stable but ignores that an Engram's *meaning* changes as it federates and accumulates memories. A federated Engram representing "machine learning" should not have the same Slate as the single seed Engram it grew from.
> - **Continuously evolving** is faithful to the philosophy ("Engrams are alive") but every Slate change invalidates cached comparisons across the neighborhood. At millions scale (13.3) this could thrash badly.
> - **Event-triggered recompute** is the likely middle path: the Slate is recomputed only at consequential moments (federation, absorption, significant memory accumulation) — never per-cycle. Composes cleanly with the event-driven model in 13.2 and the rate-limited LLM budget in 13.5.
>
> **Decided.** Event-triggered introspection. Initial Slate computed at birth as the Engram's first act; afterwards, recomputed on memory-significant events (interactions, federation, absorption).
>
> **Notable wrinkle from the answer — knowledge migrates *upward* in the federation hierarchy:** "shared knowledge is moved to bigger Engrams." This means federation isn't just composition (parent = sum of children); it's *transfer* — children may shed aspects of their self-definition as the parent absorbs them as shared, abstracted knowledge. Children become more *specialized* over time, the parent becomes more *general*. This is a strong claim worth surfacing in §6 (Synthesis & Federation), which currently describes children as preserving their full identity.
>
> **New open question:** When knowledge migrates upward, does the child's Slate get *thinned* (it loses what was abstracted away), or does the parent's Slate get *enriched* while the child's remains unchanged? The first version is more elegant and avoids redundancy, but it means children change every time the parent abstracts — a non-trivial cascade.
- Answer: Yes, the children become thinned and specialized and might event become deprecated, if their knwoledge is fully and meaningfully absorbed or dedudant, lets remember on of the rules, uniqueness or uniquelly part of, when fully integration happens uniqueness is no loger true, and the node can be depecated, still holding its memories, but no longer active.
> **Decided.** Children are *thinned* (not unchanged). When abstracted knowledge migrates up to the parent, the child loses what was abstracted away and becomes more specialized. If a child is fully absorbed (no remaining unique contribution), it is **deprecated** — kept as a historical record (its memories survive) but no longer active.
>
> **This introduces a new Engram state: `DEPRECATED`.** Previously the lifecycle was active → decayed → reabsorbed. Now there's a third path: active → fully absorbed by parent → deprecated. A deprecated Engram is distinct from a decayed one:
>
> - **Decayed:** lost relevance, no one referenced it, faded out (B3).
> - **Deprecated:** fully integrated upward, its uniqueness was *consumed*, kept as historical witness.
>
> **Beautiful alignment with the "uniqueness or uniquely part of" rule:** when full integration happens, uniqueness is no longer true → deprecation is the natural consequence. The rule has a concrete behavioral outcome.
>
> **Implications across the system:**
>
> - **§5 (Engram Dynamics):** state machine needs a `DEPRECATED` terminal state.
> - **§6 (Synthesis & Federation):** the federation diagram needs revision. Children don't always persist as autonomous; they can be thinned or deprecated.
> - **§11 (Visualization):** deprecated Engrams need a distinct visual (e.g., translucent grey, no movement, but clickable to view their memories).
>
> **Open question (preservation operationalization, raised by the new Prime Goal in §5):** Preservation is the prime goal driving all Engram behavior. How is "preservation pressure" actually computed and applied?
>
> - **Pressure inputs** (proposed): time-since-last-memorized, weighted Synapse strength, recent participation count, decay-curve position, distance from any active cluster.
> - **Pressure outputs** (proposed): scales the curiosity-component in movement, raises engagement willingness in conversations (§7), triggers introspection updates, and at extreme values, triggers a self-proposed federation request or self-deprecation.
> - **Risk**: this is the parameter most likely to produce the pathologies in §10 if miscalibrated. Worth treating as a first-class tunable (already added as leverage point #8 in §8).
>
> Worth deciding before implementation: does each Engram compute its own preservation pressure locally (autonomous, decentralized) or does the simulation provide it as an ambient signal (centralized, easier to tune)?
---
@@ -614,7 +784,16 @@ No global tick. Engrams schedule their own next action based on state. An idle E
> **Question:** Should the simulation be deterministic (same inputs = same outcome) or is non-determinism acceptable? Determinism helps with debugging and timeline reconstruction but constrains the design.
>
> **Answer:**
> **Answer:** Option C. Its ok with non deterministic simulation. The systems shoudnt exactly be able to roll back, rather the past can be explored through memories.
>
> **Decided.** Event-driven, non-deterministic.
>
> **Implications:**
>
> - Simulation cost scales with *activity*, not population — critical at the millions-scale target chosen in 13.3.
> - Memories become the canonical narrative of the past. Timeline reconstruction is a *recall* operation, not a *replay* operation — and it can legitimately surface conflicting accounts, consistent with the Tension Engram model in §6.
> - Frees the design from RNG seeding, lockstep cycles, and replay determinism — a real engineering simplification.
> - The system can never literally rewind to a past state, only reconstruct one. This is a feature: it forces us to treat the past as *remembered*, not *stored*.
---
@@ -636,8 +815,25 @@ Write side: event-sourced. Every action is an event. This is the source of truth
> **Question:** How large do you expect the system to get? Hundreds of Engrams? Thousands? Millions? This significantly affects the persistence choice.
>
> **Answer:**
> **Answer:**: I'd expect the system to be in the Millions. Option D seems like a good option.
>
> **Decided.** Event-sourced writes + graph-projected read model. Target scale: millions of Engrams.
>
> **Implications:**
>
> - At millions of Engrams, event-log volume is the dominant cost. We need to be deliberate about *what counts as an event*. Strong candidates: synthesis, absorption, Synapse formation/restructure, `memorize()` invocations, state-machine transitions, query interactions, decay-milestone crossings. Weak candidates (probably transient): individual position updates, sub-threshold curiosity changes.
> - Replay-from-genesis won't be tractable. We'll need periodic snapshots of the read model + tail of recent events to bootstrap quickly after a crash.
> - The graph read model likely needs sharding — by spatial region (cleanest given the Cartesian decision in 13.6) or by topic cluster. Cross-shard signal-wave propagation needs design.
>
> **New open questions:**
>
> - **Event granularity** — which Engram actions are durably logged versus computed transiently? This is now the highest-leverage outstanding decision on the persistence side.
> - **Answer:**: Only events that modify the self persection of an Engram, basically those that are recolled in memory (i.e interactions with other Engrams). Events like movement are nor relevant for knowledge building.
> - **Decided.** **The event log == the canonical memory store.** Anything memorable gets persisted; anything not memorable (movement, transient curiosity, momentary state changes) lives only in working memory. This is a beautifully unifying decision: one mechanism (memorize → persist) instead of two (memorize, separately persist). It also means snapshots are essentially "the current state of all Engrams + their accumulated memory streams" — no separate event log to manage.
> - **Sharding strategy** — spatial partitioning is natural given 13.6 but cross-shard synthesis and signal propagation need explicit design.
> - **Answer:**: This is not a question.
> - **Acknowledged.** Deferred to implementation — and partly answered by the multi-galaxy model in 13.6, where each galaxy is a natural sharding boundary.
>
---
### 13.4 Signal Wave Algorithm
@@ -655,7 +851,33 @@ Phase 1 — Spatial: the query emits a wavefront. Engrams within a radius activa
> **Question:** Should retrieval be ranked (return top-K most activated) or thresholded (return everything above activation X)? Or should the query-Engram itself decide when it has "enough" and stop?
>
> **Answer:**
> **Answer:**: I'm thinking the wave can function like a broadcast, where resonating engrams react to and agage in conversation.
>
> **Reframed.** This is a meaningful shift from the original "passive activation cascade" model. The wave is a *broadcast invitation*; resonating Engrams *engage* — they don't just light up, they speak.
>
> **Reframed retrieval model:**
>
> 1. Query-Engram materializes at the center and broadcasts its question (spatial wavefront + Synapse propagation, the Option C structure).
> 2. Resonating Engrams form temporary Synapses back to the Query-Engram and contribute their own perspective.
> 3. The Query-Engram acts as a **conversation host**: it can ask follow-ups, route a clarification request from one responder to another, and progressively assemble a coherent answer.
> 4. Termination: when the Query-Engram judges it has converged, when no new high-resonance responders appear, or when a compute budget is hit.
>
> This fits Sophia's agent ontology much better — Engrams act and converse, they don't merely "fire." It also means the answer is *synthesized in real time* during retrieval rather than assembled post-hoc. Note: §7 still describes the original passive-activation model and will need rewriting to match this — flagging rather than doing it now to keep the iteration tight.
>
> **New open questions:**
>
> - **Topology of the conversation:** *star* (every responder talks only to the Query-Engram, which integrates) or *peer-to-peer* (responders talk to each other)? Star is easier to budget and reason about; peer is more emergent and may produce better synthesis but is harder to bound.
- Proably a combination of both, for queries star is good, for normal engrams peer-to-peer is good.
> - **Decided.** Two interaction modes by intent: *star* for query-driven retrieval (Query-Engram is the integrator), *peer-to-peer* for ambient Engram-Engram interaction (gravity-driven encounters, synthesis decisions). Clean split: queries are bounded events with a designated host; ambient interaction is the always-on background dynamics.
> - **Termination criteria:** time budget, LLM-call budget, convergence detection (no new resonance), or Query-Engram self-assessment ("I have a confident answer")?
> - Answer: Conversations can be quequed in a pipeline, when answer is given the engram can decide what to do. Engrams should measure the significance of the other Engram to their own self identity. As more conversation happens, there can be more confidence of the self identity.
> - **Decided.** Termination is *per-Engram* and emergent: each Engram independently decides whether to keep engaging based on the conversation's significance to its own self-identity. Conversations are queued and processed asynchronously. There is no global termination signal — engagement just decays.
> - **Concern to flag:** with no global terminator, total compute on a single query is bounded only by (a) how many Engrams find it significant and (b) the parallel-op limit from 13.5. Worth confirming this is acceptable, or whether the Query-Engram should still have a "satisfied / give up" signal as a hard backstop.
> - **Lovely property this enables:** "self-identity confidence" grows with conversation. This makes introspection (13.1) genuinely interactive — an Engram refines its self-definition through dialog, not just internal computation. Worth surfacing in §5 (Engram Dynamics).
> - **Persistence of conversation Synapses:** do the temporary Synapses formed during the conversation persist? If yes, queries actively reshape the topology — a strong reinforcement of R3 (§3).
> - Answer: These are stored as memories, each engram of course have a unique point of view to the conversation.
> - **Decided.** Conversations are memorialized per-participant. The persistent artifact isn't the Synapse itself — it's the *memory of the conversation* on each Engram. Each participant carries its own perspective, which is consistent with the distributed-memory model in §2 and the Tension Engram model in §6.
> - **Implication:** Synapses created during a conversation are tentative; they harden into durable Synapses only if the conversation was significant enough to be memorialized strongly on both sides. Weak conversations leave faint memories that decay with B3.
---
@@ -674,7 +896,52 @@ System 1 operations (movement, state checks) are free — they're just math, run
> **Question:** Should there be a hard cost ceiling (system stops making LLM calls after $X/day), or should it be elastic? This is partly a product decision.
>
> **Answer:**
> **Answer:**: Option C.
>
> **Decided.** Demand-driven with rate limiting. Aligns naturally with the event-driven simulation (13.2) and the conversational retrieval model (13.4) — both already assume compute scales with activity.
>
> **Open follow-up:** Option C answers *how* compute is allocated (priority queue + rate limit) but not *how much*. Should there be a hard daily/monthly cost ceiling on LLM spend, or do we rely entirely on the rate limit to bound cost? Worth deciding before launch.
- Answer: LLM will run locally, we should use something like the cavememan skill to keep conversations small, compact, efficient. The llm can run indefinitely, but we might have a limit on how many parallel operations can be done. Eventual consistency and answers are fine. This system is emergent, eventually. This converaatoins should be visible in the Visualization.
> **Reframed.** This is a much bigger architectural decision than the original question. The cost model fundamentally changes:
>
> - **Local LLM** — no per-call dollar cost, no API rate limits. The bottleneck is local CPU/GPU and parallelism, not budget.
> - **Caveman-style prompt compaction** — Engrams must communicate in minimal, dense prompts. This shapes the design of self-descriptions: terse, structured, embedding-friendly. No verbose introspection essays.
> - **Parallel-op ceiling, not call ceiling** — the limit is "how many concurrent LLM invocations can the local hardware support" (e.g., N parallel inferences). Throughput, not budget, is the constraint.
> - **Eventual consistency is acceptable** — synthesis decisions, conversation responses, and introspection updates can all settle over time. The system doesn't owe anyone an immediate answer.
> - **Conversations visible in §11 (Visualization)** — this is now a UX commitment. The viz must show live conversational threads (transient Synapses with content flowing along them, fading as the conversation concludes).
>
> **Implications across the system:**
>
> - **§5 (Engram Dynamics)** — System 1/System 2 distinction still holds, but System 2 is no longer "expensive, throttled" — it's "compute-bound, parallel-limited." The cost framing in the table needs updating.
> - **§10 (Risks)** — "Computational Cost" risk reframes from "$ explosion" to "local hardware saturation." Mitigation list changes accordingly.
> - **§11 (Visualization)** — needs a new visual primitive: "active conversation" — possibly animated lines between Engrams with intensity/direction.
>
> **New open questions:**
>
> - **Which local model?** Llama 3, Phi, Mistral, Qwen, etc. — affects hardware floor, parallelism ceiling, and prompt-compaction strategy. Smaller models (Phi-3, Llama-3.2-3B) allow much higher parallelism.
- AnswerL: Well use google/gemma-4-e4b running in LLM studio.
> - **Decided.** `google/gemma-4-e4b` via LM Studio. Small, fast, runs locally with good throughput. Sets a hard upper bound on prompt density and reasoning depth per call — we can't ask Gemma to do what GPT-4 does in one prompt; we ask many small things instead and let emergence do the integration.
> - **Parallel-op ceiling** — fixed (e.g., 8 concurrent inferences) or adaptive based on current load? Adaptive composes better with eventual consistency.
- Answer: well use a fixed model.
> - **Decided.** Fixed parallel-op ceiling (configurable, e.g., N=8 to start). Simple, predictable, easy to reason about queue depth. Adaptive can be a v2 concern.
> - **Caveman prompt budget** — what's the target token budget per Engram interaction? (e.g., 200 input tokens / 100 output tokens). This drives self-description format.
- Answer: make a proposal, we can tweak.
>
> **Proposed token budgets (starting point, tweakable):**
>
> | Operation | Input cap | Output cap | Notes |
> | --- | --- | --- | --- |
> | Initial introspection (birth) | 400 | 200 | Slate textual layer, computed once; allowed to be richer |
> | Self-update (post-significant event) | 600 | 200 | Includes prior Slate + delta event |
> | Peer-to-peer message (Engram → Engram) | 100 | 100 | Caveman: terse, content-only |
> | Synthesis decision (am I redundant with X?) | 300 | 80 | Yes/no + brief reason |
> | Conversation contribution (responder to Query-Engram) | 200 | 150 | Self-description + relevant memory snippet |
> | Query-Engram integration step | 800 | 300 | Synthesizes N responses into running answer |
> | **Hard ceiling per call** | **1024** | **400** | Anything bigger is a design smell — split it |
>
> Conversation history is summarized (not concatenated) past 5 turns. Self-descriptions follow a fixed schema (e.g., `topic | role | salient_memories[3] | open_questions[2]`) to maximize information density per token.
---
@@ -693,4 +960,42 @@ Use standard (x, y, z) Cartesian coordinates for simplicity. Instead of hard wra
> **Question:** How literally do you want the toroidal topology? Is the lifecycle flow (center -> middle -> edge) the important part, or do you also want the wrapping property (an Engram at the "north edge" is close to one at the "south edge")?
>
> **Answer:**
> **Answer:**: Option C.
>
> **Decided.** Cartesian space with soft boundary forces. The torus becomes a metaphor for the *lifecycle* (birth at center, life in middle zone, decay at edges), not a literal wrapping topology.
>
> **Implications:**
>
> - **§4 (Toroidal Topology) needs revision.** The "no dead corners" and "birth-death proximity" claims relied on literal wrapping and don't hold under Option C. §4 should be rewritten to describe a bounded Cartesian space with a center-emitting source and an edge-consuming sink, plus the lifecycle flow that emerges from it. Flagging rather than rewriting now.
> - Standard spatial indexing (octree, k-d tree) becomes available — important at millions scale.
> - We lose the topology-level guarantee against isolated regions. We now rely on **B1 (Curiosity)** and the soft outward push from the center to keep the space ergodic. Worth checking those forces are strong enough on their own — or this becomes a fourth balancing-loop responsibility.
>
> **New open question:** What are the extents of the space — a fixed bounded box (e.g., 1000 to +1000 per axis) or unbounded with density-driven re-centering as the population grows? Given §2 modeled "Space Volume" as ever-increasing, the unbounded variant is more consistent — but it complicates indexing.
- Answer: The box should be desitiy driven, recentering as pop grows. Eventually every Space or recollection is like a galaxy, with its own gravity, and there might be other galaxies in the universe.
> **Major architectural expansion.** This is more than a coordinate-system answer — it introduces a whole new layer of structure: the **multi-galaxy model**. Sophia isn't one Space of Recollection; it's potentially *many*, each a self-contained galaxy with its own internal gravity, possibly interacting at the universe scale.
>
> **What this changes in the existing analysis:**
>
> - **§1 (System Boundary)** — needs a new outer layer: the "Space of Recollection" is no longer the top-level container; the **Universe** is, containing one or more Galaxies. Each Galaxy is what we've been calling a Space until now.
> - **§4 (Toroidal Topology)** — the bounded box becomes a *galactic* boundary, density-driven and re-centering as population grows. Two re-centering mechanisms now coexist: within a galaxy (re-center as Engrams accumulate) and possibly between galaxies (galaxies drift apart or coalesce).
> - **§3 (Feedback Loops)** — there may be inter-galactic versions of R2 (gravity clustering between *galaxies*, not just Engrams) and possibly an R4 (galaxies that share many bridging Engrams pull together).
> - **§13.3 (Persistence)** — galaxy is the natural sharding boundary. The "sharding strategy" question that was dismissed earlier basically resolves to "shard per galaxy."
> - **Decided sub-question:** within-galaxy extents are density-driven and re-centering. Standard spatial indexing still works inside a galaxy.
>
> **New open questions (these probably warrant their own §14 in the doc):**
>
> - **What defines a galaxy?** Per-user? Per-tenant? Per-domain (e.g., one galaxy for "personal notes," another for "work projects")? Per-corpus (one galaxy per ingested dataset)? The answer shapes the product significantly.
- Answer: this is user defined. Gallaxies do not need to interact with each other initially, but we should leave this as an expansion point.
> - **Decided.** **User-defined galaxies, isolated in v1.** A galaxy is whatever the user chooses to scope (a project, a corpus, a domain). No inter-galactic interaction in the initial design — each galaxy is its own self-contained universe-of-meaning.
> - **Architectural decision:** all the inter-galactic questions below (gravity, bridging Engrams, query routing, universe coordinates, galaxy lifecycle) are **deferred as expansion points**. Document them but don't build them. The system should be designed so that adding inter-galactic dynamics later doesn't require rewriting the per-galaxy logic.
> - **Practical consequence:** in v1, each galaxy is functionally a separate Sophia instance. Persistence, indexing, conversation, and visualization all operate within a single galaxy at a time. The user picks a galaxy when issuing a query.
> - **How do galaxies interact?** Do they have an inter-galactic gravity that pulls related galaxies closer in some meta-space? Are there *Bridging Engrams* that exist in or span multiple galaxies (e.g., a concept that's relevant to both "personal" and "work" galaxies)? Or are galaxies fully isolated, only interacting via explicit user-driven cross-references?
> - *Deferred — expansion point.*
> - **Where do queries land?** Does a user query target a specific galaxy, broadcast across all galaxies, or get routed to the galaxy with the highest initial resonance?
> - *v1: user picks the galaxy. Auto-routing deferred.*
> - **Is there a universe-level coordinate system,** or are galaxies just unordered? A universe-level coordinate system enables inter-galactic gravity but adds complexity. Unordered galaxies are simpler but lose the "gravitational" metaphor at the cosmic scale.
> - *Deferred — expansion point.*
> - **Galaxy lifecycle** — can galaxies be born and die, or are they permanent containers? If born/die, what triggers it? (e.g., a new corpus is ingested → new galaxy; a galaxy goes unused for long enough → archived.)
> - *v1: created and deleted by the user, like a workspace. Archive/expire policies deferred.*