{
 "paper": "identity-persistence",
 "a": "7.0",
 "b": "7.1",
 "summary": "From v7.0 (1 Apr) to v7.1 (2 Jun): 5,028 words to 6,792 words, 1,808 words in new or rewritten paragraphs and 44 taken out, 37 paragraphs changed.",
 "note": {
  "title": "Brain grounding, model switching and the self-improvement loop",
  "kind": "revision",
  "body": "## Summary\n\nThe introduction now opens with the prefrontal cortex and Phineas Gage, a man who kept his memory but lost his personality after a brain injury. The paper's own improvement notes asked for this, together with the other additions below.\n\n- New section 4.4: how the persona stays stable when the agent switches from one model to another mid-conversation.\n- New section 5.1: a nightly reflection process rewrites the persona files this system reads, so identity can improve and not only persist.\n- References to the companion papers each get a one-sentence summary, so the paper reads on its own.\n- Multi-agent identity moves from a one-line limitation to a future direction.\n- Adds comparisons (a manifesto re-read every morning, a tuning fork, an actor over ten seasons).",
  "source": "change note"
 },
 "paragraphs_changed": 37,
 "changes": [
  {
   "section": "",
   "old": null,
   "new": "> **Changelog v7.0 → v7.1.** Grounded the introduction in the neuroscience of identity (prefrontal cortex, the continuity of self, the Phineas Gage lesion). Added a dedicated treatment of identity stability under model switching (§4.4) — a failure mode unique to multi-model agent runtimes. Documented the persona self-improvement loop (§5.1): an external nightly reflection layer rewrites the very persona files this system consumes. Made each cross-paper reference self-sufficient with an inline one-sentence summary. Promoted multi-agent identity from a one-line limitation to a concrete future direction (§11.3). Added similes for the core constructs (SOUL.md, SyncScore, drift, model-switch resilience). Prose tightened; hedges removed.",
   "marked": "{+> **Changelog v7.0 → v7.1.** Grounded the introduction in the neuroscience of identity (prefrontal cortex, the continuity of self, the Phineas Gage lesion). Added a dedicated treatment of identity stability under model switching (§4.4) — a failure mode unique to multi-model agent runtimes. Documented the persona self-improvement loop (§5.1): an external nightly reflection layer rewrites the very persona files this system consumes. Made each cross-paper reference self-sufficient with an inline one-sentence summary. Promoted multi-agent identity from a one-line limitation to a concrete future direction (§11.3). Added similes for the core constructs (SOUL.md, SyncScore, drift, model-switch resilience). Prose tightened; hedges removed.+}"
  },
  {
   "section": "Abstract",
   "old": "A discrete-time Lyapunov analysis provides closed-form variance bounds. Benchmarks confirm 50-turn SyncScore stability (mean 0.977), drift recovery from 0.027 to 0.980, and 442× on/off-persona separation. Human evaluation (30 logs, 3 judges, Krippendorff's α = 0.81) yields consistency of 4.2 ± 0.4 versus 2.6 ± 0.7 baseline. The system has maintained consistent personality across 30+ days of production deployment spanning model switches, context resets, and hundreds of sessions. Implementation: 14 files, 4,974 LOC (TypeScript), 368 tests at 100%.",
   "new": "Because the persona lives in editable state outside any model's weights, the same machinery keeps identity stable when the underlying model is swapped mid-conversation — a property training-time methods cannot offer — and lets an external reflection layer rewrite the persona overnight, so identity not only persists but improves. A discrete-time Lyapunov analysis provides closed-form variance bounds. Benchmarks confirm 50-turn SyncScore stability (mean 0.977), drift recovery from 0.027 to 0.980, and 442× on/off-persona separation. Human evaluation (30 logs, 3 judges, Krippendorff's α = 0.81) yields consistency of 4.2 ± 0.4 versus 2.6 ± 0.7 baseline. The system has maintained consistent personality across 30+ days of production deployment spanning model switches, context resets, and hundreds of sessions. Implementation: 14 files, 4,974 LOC (TypeScript), 368 tests at 100%.",
   "marked": "{+Because the persona lives in editable state outside any model's weights, the same machinery keeps identity stable when the underlying model is swapped mid-conversation — a property training-time methods cannot offer — and lets an external reflection layer rewrite the persona overnight, so identity not only persists but improves.+} A discrete-time Lyapunov analysis provides closed-form variance bounds. Benchmarks confirm 50-turn SyncScore stability (mean 0.977), drift recovery from 0.027 to 0.980, and 442× on/off-persona separation. Human evaluation (30 logs, 3 judges, Krippendorff's α = 0.81) yields consistency of 4.2 ± 0.4 versus 2.6 ± 0.7 baseline. The system has maintained consistent personality across 30+ days of production deployment spanning model switches, context resets, and hundreds of sessions. Implementation: 14 files, 4,974 LOC (TypeScript), 368 tests at 100%."
  },
  {
   "section": "1. Introduction",
   "old": null,
   "new": "In humans, the prefrontal cortex is what gives us a continuous sense of self — the conviction that you are the same person who fell asleep last night, despite hours of unconsciousness in between. It integrates memories, values, and behavioral patterns into a coherent identity that persists across time. When it is damaged, the effect is striking: the railway foreman Phineas Gage survived an iron rod through his frontal lobe with his memories and skills intact, yet his personality changed so completely that friends said he was \"no longer Gage.\" Identity, it turns out, is not the same thing as memory. You can keep every fact and still lose the self that held them together.",
   "marked": "{+In humans, the prefrontal cortex is what gives us a continuous sense of self — the conviction that you are the same person who fell asleep last night, despite hours of unconsciousness in between. It integrates memories, values, and behavioral patterns into a coherent identity that persists across time. When it is damaged, the effect is striking: the railway foreman Phineas Gage survived an iron rod through his frontal lobe with his memories and skills intact, yet his personality changed so completely that friends said he was \"no longer Gage.\" Identity, it turns out, is not the same thing as memory. You can keep every fact and still lose the self that held them together.+}"
  },
  {
   "section": "1. Introduction",
   "old": "Persistent LLM-based agents must do more than remember facts — they must maintain a consistent voice, relational stance, and behavioral repertoire as conversations extend beyond their context windows. Three failure modes prevent this: (1) **Persona drift** from attention dilution as context fills (Li et al., 2024); (2) **Context rot** degrading mid-context recall (Liu et al., 2024); and (3) **Memory-identity dissociation**, where standard memory systems preserve factual recall but strip stylistic identity during compaction.",
   "new": "Persistent LLM-based agents face the same dissociation. They must do more than remember facts — they must maintain a consistent voice, relational stance, and behavioral repertoire as conversations extend beyond their context windows. This work is our attempt to give an AI agent what the prefrontal cortex gives us: a stable identity that survives across sessions, model switches, and complete restarts. Three failure modes stand in the way: (1) **Persona drift** from attention dilution as context fills (Li et al., 2024); (2) **Context rot** degrading mid-context recall (Liu et al., 2024); and (3) **Memory-identity dissociation**, where standard memory systems preserve factual recall but strip stylistic identity during compaction — the agent's own Phineas Gage problem.",
   "marked": "Persistent LLM-based agents {+face the same dissociation. They+} must do more than remember facts — they must maintain a consistent voice, relational stance, and behavioral repertoire as conversations extend beyond their context windows. {+This work is our attempt to give an AI agent what the prefrontal cortex gives us: a stable identity that survives across sessions, model switches, and complete restarts.+} Three failure modes [-prevent this:-] {+stand in the way:+} (1) **Persona drift** from attention dilution as context fills (Li et al., 2024); (2) **Context rot** degrading mid-context recall (Liu et al., 2024); and (3) **Memory-identity dissociation**, where standard memory systems preserve factual recall but strip stylistic identity during [-compaction.-] {+compaction — the agent's own Phineas Gage problem.+}"
  },
  {
   "section": "1. Introduction",
   "old": "Identity Persistence occupies the identity layer of a three-tier cognitive stack. **Total Recall** (Serra, 2026a) provides the storage substrate and compaction primitives. **Instant Recall** (Serra, 2026b) supplies the concept index for efficient memory retrieval. The humor calibration interface connects to **Humor Embeddings** (Serra, 2026d), and **Round Table** (Serra, 2026e) coordinates cross-session signal routing.",
   "new": null,
   "marked": "[-Identity Persistence occupies the identity layer of a three-tier cognitive stack. **Total Recall** (Serra, 2026a) provides the storage substrate and compaction primitives. **Instant Recall** (Serra, 2026b) supplies the concept index for efficient memory retrieval. The humor calibration interface connects to **Humor Embeddings** (Serra, 2026d), and **Round Table** (Serra, 2026e) coordinates cross-session signal routing.-]"
  },
  {
   "section": "1. Introduction",
   "old": null,
   "new": "Identity Persistence occupies the identity layer of a multi-tier cognitive stack, and it is a consumer before it is a contributor: without reliable memory beneath it, there is nothing for a persona to be consistent *about*. The substrate it draws on:",
   "marked": "{+Identity Persistence occupies the identity layer of a multi-tier cognitive stack, and it is a consumer before it is a contributor: without reliable memory beneath it, there is nothing for a persona to be consistent *about*. The substrate it draws on:+}"
  },
  {
   "section": "1. Introduction",
   "old": null,
   "new": "- **Total Recall** (Serra, 2026a) — the storage layer that persists every interaction as a timestamped event and compacts older events into lightweight pointer summaries, so the agent's history grows without bound while storage stays manageable. Identity Persistence borrows its compaction primitives. - **Instant Recall** (Serra, 2026b) — a retrieval index mapping topic keywords to memory segments, letting the agent find relevant past experiences in milliseconds rather than scanning its entire history. It feeds the task-conditioned retrieval tier of our injection policy. - **Humor Embeddings** (Serra, 2026d) — the affect layer that discovers unexpected connections between distant concepts in embedding space to generate contextually appropriate humor. The persona's humor calibration is the contract it consumes. - **Round Table** (Serra, 2026e) — coordinates cross-session signal routing, carrying drift alerts and consistency events between modules.",
   "marked": "{+- **Total Recall** (Serra, 2026a) — the storage layer that persists every interaction as a timestamped event and compacts older events into lightweight pointer summaries, so the agent's history grows without bound while storage stays manageable. Identity Persistence borrows its compaction primitives. - **Instant Recall** (Serra, 2026b) — a retrieval index mapping topic keywords to memory segments, letting the agent find relevant past experiences in milliseconds rather than scanning its entire history. It feeds the task-conditioned retrieval tier of our injection policy. - **Humor Embeddings** (Serra, 2026d) — the affect layer that discovers unexpected connections between distant concepts in embedding space to generate contextually appropriate humor. The persona's humor calibration is the contract it consumes. - **Round Table** (Serra, 2026e) — coordinates cross-session signal routing, carrying drift alerts and consistency events between modules.+}"
  },
  {
   "section": "1. Introduction",
   "old": null,
   "new": "A fifth dependency runs in the other direction and is examined in §5.1: an external nightly reflection layer (Serra, 2026c) that rewrites the very persona files this system reads — the mechanism by which identity does not merely persist but improves.",
   "marked": "{+A fifth dependency runs in the other direction and is examined in §5.1: an external nightly reflection layer (Serra, 2026c) that rewrites the very persona files this system reads — the mechanism by which identity does not merely persist but improves.+}"
  },
  {
   "section": "4.3.1 Signal Fusion and Sparsity Adaptation",
   "old": "Drift detection must work whether or not the user provides feedback. Using Signal Detection Theory, we fuse two complementary signals:",
   "new": null,
   "marked": "[-Drift detection must work whether or not the user provides feedback. Using Signal Detection Theory, we fuse two complementary signals:-]"
  },
  {
   "section": "4.3.1 Signal Fusion and Sparsity Adaptation",
   "old": null,
   "new": "Drift is rarely a single dramatic break; it accumulates. *Think of an actor playing the same character for ten seasons — each episode's small improvisations are harmless, but they compound, until the season-10 character barely resembles season 1 unless someone actively maintains continuity.* Detection must therefore work whether or not the user provides feedback. Using Signal Detection Theory, we fuse two complementary signals:",
   "marked": "{+Drift is rarely a single dramatic break; it accumulates. *Think of an actor playing the same character for ten seasons — each episode's small improvisations are harmless, but they compound, until the season-10 character barely resembles season 1 unless someone actively maintains continuity.* Detection must therefore work whether or not the user provides feedback. Using Signal Detection Theory, we fuse two complementary signals:+}"
  },
  {
   "section": "4.4 Identity Stability Under Model Switching",
   "old": null,
   "new": "### 4.4 Identity Stability Under Model Switching",
   "marked": "{+### 4.4 Identity Stability Under Model Switching+}"
  },
  {
   "section": "4.4 Identity Stability Under Model Switching",
   "old": null,
   "new": "Most persona-maintenance work assumes one fixed underlying model. Production agents rarely have that luxury. In a multi-model runtime, a single conversation can be served by several backends in succession — a primary model, then a cheaper or faster fallback when the primary is rate-limited, unavailable, or too costly for a routine turn. Each backend carries its own style priors: one hedges, another is terse, a third over-explains. Left unmanaged, the agent's voice lurches every time the model underneath it changes. *Imagine waking up in a different body each morning but still having to be recognizably you* — that is the problem a model-switching agent faces on every fallback.",
   "marked": "{+Most persona-maintenance work assumes one fixed underlying model. Production agents rarely have that luxury. In a multi-model runtime, a single conversation can be served by several backends in succession — a primary model, then a cheaper or faster fallback when the primary is rate-limited, unavailable, or too costly for a routine turn. Each backend carries its own style priors: one hedges, another is terse, a third over-explains. Left unmanaged, the agent's voice lurches every time the model underneath it changes. *Imagine waking up in a different body each morning but still having to be recognizably you* — that is the problem a model-switching agent faces on every fallback.+}"
  },
  {
   "section": "4.4 Identity Stability Under Model Switching",
   "old": null,
   "new": "Because Identity Persistence operates entirely at inference time over a model-external PersonaState, it treats a model switch as just another source of drift. The same machinery applies, with one refinement:",
   "marked": "{+Because Identity Persistence operates entirely at inference time over a model-external PersonaState, it treats a model switch as just another source of drift. The same machinery applies, with one refinement:+}"
  },
  {
   "section": "4.4 Identity Stability Under Model Switching",
   "old": null,
   "new": "1. **The persona specification is model-independent.** PersonaState lives outside any model's weights, so the target $\\theta^*$ does not move when the backend does. Whatever model is serving the turn is handed the same Tier 1 persona block (§4.1). 2. **A switch is a step disturbance, not gradual drift.** Where ordinary drift accumulates over many turns, a model change injects a discontinuity in $\\epsilon_t$ at a single step. The two-signal detector (§4.3) registers the jump in $E_\\phi$ distance immediately rather than waiting for it to compound. 3. **Large jumps bypass the linear loop.** When the post-switch deviation exceeds the linear-correction regime (§4.3.2), the `severe_rebase` action performs a full persona re-injection instead of incremental nudging. In the error analysis (§11.4) this is the dominant recovery path after a switch to a backend with sharply different priors, taking 5–8 turns to settle rather than ~2.",
   "marked": "{+1. **The persona specification is model-independent.** PersonaState lives outside any model's weights, so the target $\\theta^*$ does not move when the backend does. Whatever model is serving the turn is handed the same Tier 1 persona block (§4.1). 2. **A switch is a step disturbance, not gradual drift.** Where ordinary drift accumulates over many turns, a model change injects a discontinuity in $\\epsilon_t$ at a single step. The two-signal detector (§4.3) registers the jump in $E_\\phi$ distance immediately rather than waiting for it to compound. 3. **Large jumps bypass the linear loop.** When the post-switch deviation exceeds the linear-correction regime (§4.3.2), the `severe_rebase` action performs a full persona re-injection instead of incremental nudging. In the error analysis (§11.4) this is the dominant recovery path after a switch to a backend with sharply different priors, taking 5–8 turns to settle rather than ~2.+}"
  },
  {
   "section": "4.4 Identity Stability Under Model Switching",
   "old": null,
   "new": "This is a property no training-time approach can offer: a fine-tuned or weight-merged persona is welded to one model and cannot follow the conversation across backends. Maintaining the persona in editable, model-external state is what makes it portable. The longitudinal validation of this property — telemetry across real fallback events — is itemized in §12.2; the deployment evidence to date (§7.5) is qualitative.",
   "marked": "{+This is a property no training-time approach can offer: a fine-tuned or weight-merged persona is welded to one model and cannot follow the conversation across backends. Maintaining the persona in editable, model-external state is what makes it portable. The longitudinal validation of this property — telemetry across real fallback events — is itemized in §12.2; the deployment evidence to date (§7.5) is qualitative.+}"
  },
  {
   "section": "5. PersonaState Specification",
   "old": null,
   "new": "The persona is authored in a human-readable file (`SOUL.md`) — *like a personal manifesto you re-read every morning: it doesn't make you who you are, but it reminds you who you decided to be.* Keeping it as plain, editable text rather than learned weights is what lets the persona be inspected, corrected, versioned, and, as the next section describes, revised by the agent itself.",
   "marked": "{+The persona is authored in a human-readable file (`SOUL.md`) — *like a personal manifesto you re-read every morning: it doesn't make you who you are, but it reminds you who you decided to be.* Keeping it as plain, editable text rather than learned weights is what lets the persona be inspected, corrected, versioned, and, as the next section describes, revised by the agent itself.+}"
  },
  {
   "section": "5.1 The Self-Improvement Loop",
   "old": null,
   "new": "### 5.1 The Self-Improvement Loop",
   "marked": "{+### 5.1 The Self-Improvement Loop+}"
  },
  {
   "section": "5.1 The Self-Improvement Loop",
   "old": null,
   "new": "Identity Persistence keeps a persona *stable*; it does not, by itself, make that persona *better*. Improvement comes from an external companion layer — a nightly reflection cycle (Serra, 2026c) that reviews the agent's recent behavior, identifies recurring mistakes and newly observed preferences, and rewrites the very persona files (`SOUL.md`, operational-lesson notes) that this system injects every turn. The two layers form a closed loop operating on different timescales:",
   "marked": "{+Identity Persistence keeps a persona *stable*; it does not, by itself, make that persona *better*. Improvement comes from an external companion layer — a nightly reflection cycle (Serra, 2026c) that reviews the agent's recent behavior, identifies recurring mistakes and newly observed preferences, and rewrites the very persona files (`SOUL.md`, operational-lesson notes) that this system injects every turn. The two layers form a closed loop operating on different timescales:+}"
  },
  {
   "section": "5.1 The Self-Improvement Loop",
   "old": null,
   "new": "\\begin{figure}[H] \\centering \\begin{tikzpicture}[ node distance=2.6cm and 4.2cm, box/.style={draw=serraBorder, fill=serraSurface, rounded corners=2pt, align=center, font=\\small, inner sep=6pt, text width=4.2cm}, arr/.style={-{Stealth[length=2.2mm]}, thick, draw=serraAccent} ] \\node[box] (rewrite) {reflection layer\\\\rewrites \\texttt{SOUL.md}}; \\node[box, right=of rewrite] (reload) {\\texttt{PersonaState}\\\\reloads the edits}; \\node[box, below=of reload] (behave) {agent behaves under\\\\the new persona}; \\node[box, below=of rewrite] (observe) {observes results};",
   "marked": "{+\\begin{figure}[H] \\centering \\begin{tikzpicture}[ node distance=2.6cm and 4.2cm, box/.style={draw=serraBorder, fill=serraSurface, rounded corners=2pt, align=center, font=\\small, inner sep=6pt, text width=4.2cm}, arr/.style={-{Stealth[length=2.2mm]}, thick, draw=serraAccent} ] \\node[box] (rewrite) {reflection layer\\\\rewrites \\texttt{SOUL.md}}; \\node[box, right=of rewrite] (reload) {\\texttt{PersonaState}\\\\reloads the edits}; \\node[box, below=of reload] (behave) {agent behaves under\\\\the new persona}; \\node[box, below=of rewrite] (observe) {observes results};+}"
  },
  {
   "section": "5.1 The Self-Improvement Loop",
   "old": null,
   "new": "\\draw[arr] (rewrite) -- (reload); \\draw[arr] (reload) -- (behave); \\draw[arr] (behave) -- (observe); \\draw[arr] (observe) -- (rewrite); \\end{tikzpicture} \\caption{The persona self-improvement loop. A slow offline reflection cycle edits \\texttt{SOUL.md}; Identity Persistence reloads and enforces the new persona every turn, and the observed results feed the next reflection cycle.} \\label{fig:selfimprovement} \\end{figure}",
   "marked": "{+\\draw[arr] (rewrite) -- (reload); \\draw[arr] (reload) -- (behave); \\draw[arr] (behave) -- (observe); \\draw[arr] (observe) -- (rewrite); \\end{tikzpicture} \\caption{The persona self-improvement loop. A slow offline reflection cycle edits \\texttt{SOUL.md}; Identity Persistence reloads and enforces the new persona every turn, and the observed results feed the next reflection cycle.} \\label{fig:selfimprovement} \\end{figure}+}"
  },
  {
   "section": "5.1 The Self-Improvement Loop",
   "old": null,
   "new": "The division of labor is deliberate. The reflection layer changes *what the persona is* (slow, offline, reviewed); Identity Persistence enforces *that the persona is present and consistent* (fast, every turn, automatic). Because PersonaState is loaded from disk at session start via `loadLatestPersonaState()`, an overnight edit takes effect on the next session with no redeployment — persona evolution and persona enforcement stay cleanly separated. This loop is also the reason the human-readable `SOUL.md` format matters beyond auditability: it is the shared write target that lets one system improve the identity another system protects.",
   "marked": "{+The division of labor is deliberate. The reflection layer changes *what the persona is* (slow, offline, reviewed); Identity Persistence enforces *that the persona is present and consistent* (fast, every turn, automatic). Because PersonaState is loaded from disk at session start via `loadLatestPersonaState()`, an overnight edit takes effect on the next session with no redeployment — persona evolution and persona enforcement stay cleanly separated. This loop is also the reason the human-readable `SOUL.md` format matters beyond auditability: it is the shared write target that lets one system improve the identity another system protects.+}"
  },
  {
   "section": "5.2 Behavioral Probes",
   "old": null,
   "new": "### 5.2 Behavioral Probes",
   "marked": "{+### 5.2 Behavioral Probes+}"
  },
  {
   "section": "7.2 Persona Stability Benchmark: 50-Turn SyncScore",
   "old": "The Phase 6.3 stability benchmark ran against the JarvisOne persona specification using 50 turns of on-persona response fixtures spanning 10 distinct topic domains. At each turn $t$, the composite SyncScore was computed as:",
   "new": "SyncScore is the system's single health metric for identity. *It measures consistency the way a tuning fork tests pitch: strike it against the agent's behavior at any turn, and the resonance tells you whether it is still in character.* The Phase 6.3 stability benchmark ran against the JarvisOne persona specification using 50 turns of on-persona response fixtures spanning 10 distinct topic domains. At each turn $t$, the composite SyncScore was computed as:",
   "marked": "{+SyncScore is the system's single health metric for identity. *It measures consistency the way a tuning fork tests pitch: strike it against the agent's behavior at any turn, and the resonance tells you whether it is still in character.*+} The Phase 6.3 stability benchmark ran against the JarvisOne persona specification using 50 turns of on-persona response fixtures spanning 10 distinct topic domains. At each turn $t$, the composite SyncScore was computed as:"
  },
  {
   "section": "8.3 Architecture and Data Flow",
   "old": null,
   "new": "\\begin{figure}[H] \\centering \\resizebox{\\linewidth}{!}{% \\begin{tikzpicture}[ font=\\small, store/.style={draw=serraBorder, fill=serraSurface, rounded corners=2pt, align=center, inner sep=6pt, font=\\bfseries\\small}, rt/.style={draw=serraAccent, fill=serraSurface, rounded corners=2pt, align=center, inner sep=6pt, font=\\bfseries\\small}, mod/.style={draw=serraBorder, fill=white, rounded corners=1pt, align=left, inner sep=4pt, font=\\footnotesize, text width=7.2cm}, note/.style={draw=serraSection, fill=serraSurface, rounded corners=1pt, align=left, inner sep=4pt, font=\\footnotesize, text width=9.6cm}, arr/.style={-{Stealth[length=2mm]}, thick, draw=serraAccent} ] \\node[store] (store) {\\texttt{SOUL.md} / \\texttt{PersonaState} store}; \\node[rt, below=0.9cm of store] (rt) {\\texttt{identity-persistence-runtime.ts}\\\\(session entry point)};",
   "marked": "{+\\begin{figure}[H] \\centering \\resizebox{\\linewidth}{!}{% \\begin{tikzpicture}[ font=\\small, store/.style={draw=serraBorder, fill=serraSurface, rounded corners=2pt, align=center, inner sep=6pt, font=\\bfseries\\small}, rt/.style={draw=serraAccent, fill=serraSurface, rounded corners=2pt, align=center, inner sep=6pt, font=\\bfseries\\small}, mod/.style={draw=serraBorder, fill=white, rounded corners=1pt, align=left, inner sep=4pt, font=\\footnotesize, text width=7.2cm}, note/.style={draw=serraSection, fill=serraSurface, rounded corners=1pt, align=left, inner sep=4pt, font=\\footnotesize, text width=9.6cm}, arr/.style={-{Stealth[length=2mm]}, thick, draw=serraAccent} ] \\node[store] (store) {\\texttt{SOUL.md} / \\texttt{PersonaState} store}; \\node[rt, below=0.9cm of store] (rt) {\\texttt{identity-persistence-runtime.ts}\\\\(session entry point)};+}"
  },
  {
   "section": "8.3 Architecture and Data Flow",
   "old": "``` SOUL.md / PersonaState store │ ▼ identity-persistence-runtime.ts ← session entry point ├─ loadLatestPersonaState() ← persona-state.ts ├─ PriorityInjector ← priority-injection.ts (Tier 1 pinned) ├─ EWMA DriftDetector ← drift-detection.ts │ ├─ detectUserCorrections() │ └─ computeAdaptiveWeights() ├─ BehavioralProbes ← behavioral-probes.ts (async, 3-tier) ├─ ConsistencyMetric C ← consistency-metric.ts → classifyAction() ├─ VoiceMarkers E_φ ← voice-markers.ts ├─ ConvergenceMonitor ← convergence-monitor.ts └─ SyncScore(t) ← composite: EWMA + C + E_φ proximity",
   "new": "\\node[mod, below=0.7cm of rt] (m1) {% \\texttt{loadLatestPersonaState()} \\;$\\leftarrow$\\; \\texttt{persona-state.ts}\\\\ \\texttt{PriorityInjector} \\;$\\leftarrow$\\; \\texttt{priority-injection.ts} (Tier 1 pinned)\\\\ \\texttt{EWMA DriftDetector} \\;$\\leftarrow$\\; \\texttt{drift-detection.ts}\\\\ \\quad\\texttt{detectUserCorrections()}, \\texttt{computeAdaptiveWeights()}\\\\ \\texttt{BehavioralProbes} \\;$\\leftarrow$\\; \\texttt{behavioral-probes.ts} (async, 3-tier)\\\\ \\texttt{ConsistencyMetric C} \\;$\\leftarrow$\\; \\texttt{consistency-metric.ts} $\\to$ \\texttt{classifyAction()}\\\\ \\texttt{VoiceMarkers} $E_\\phi$ \\;$\\leftarrow$\\; \\texttt{voice-markers.ts}\\\\ \\texttt{ConvergenceMonitor} \\;$\\leftarrow$\\; \\texttt{convergence-monitor.ts}\\\\ \\texttt{SyncScore(t)} \\;$\\leftarrow$\\; composite: EWMA + C + $E_\\phi$ proximity};",
   "marked": "[-``` SOUL.md / PersonaState store │ ▼ identity-persistence-runtime.ts ← session entry point ├─ loadLatestPersonaState() ← persona-state.ts ├─ PriorityInjector ← priority-injection.ts-] {+\\node[mod, below=0.7cm of rt] (m1) {% \\texttt{loadLatestPersonaState()} \\;$\\leftarrow$\\; \\texttt{persona-state.ts}\\\\ \\texttt{PriorityInjector} \\;$\\leftarrow$\\; \\texttt{priority-injection.ts}+} (Tier 1 [-pinned) ├─ EWMA DriftDetector ← drift-detection.ts │ ├─ detectUserCorrections() │ └─ computeAdaptiveWeights() ├─ BehavioralProbes ← behavioral-probes.ts-] {+pinned)\\\\ \\texttt{EWMA DriftDetector} \\;$\\leftarrow$\\; \\texttt{drift-detection.ts}\\\\ \\quad\\texttt{detectUserCorrections()}, \\texttt{computeAdaptiveWeights()}\\\\ \\texttt{BehavioralProbes} \\;$\\leftarrow$\\; \\texttt{behavioral-probes.ts}+} (async, [-3-tier) ├─ ConsistencyMetric C ← consistency-metric.ts → classifyAction() ├─ VoiceMarkers E_φ ← voice-markers.ts ├─ ConvergenceMonitor ← convergence-monitor.ts └─ SyncScore(t) ←-] {+3-tier)\\\\ \\texttt{ConsistencyMetric C} \\;$\\leftarrow$\\; \\texttt{consistency-metric.ts} $\\to$ \\texttt{classifyAction()}\\\\ \\texttt{VoiceMarkers} $E_\\phi$ \\;$\\leftarrow$\\; \\texttt{voice-markers.ts}\\\\ \\texttt{ConvergenceMonitor} \\;$\\leftarrow$\\; \\texttt{convergence-monitor.ts}\\\\ \\texttt{SyncScore(t)} \\;$\\leftarrow$\\;+} composite: EWMA + C + [-E_φ proximity-] {+$E_\\phi$ proximity};+}"
  },
  {
   "section": "8.3 Architecture and Data Flow",
   "old": "On severe drift → mid-context re-injection (PersonaState Tier 1 forced) On compaction → IPC dual-track (Total Recall factual + persona-preservation) HumorCalibration field → Humor Embeddings createLimbicRuntime() ```",
   "new": "\\node[note, below=0.7cm of m1] (n1) {% On severe drift $\\to$ mid-context re-injection (\\texttt{PersonaState} Tier 1 forced)\\\\ On compaction $\\to$ IPC dual-track (Total Recall factual + persona-preservation)\\\\ \\texttt{HumorCalibration} field $\\to$ Humor Embeddings \\texttt{createLimbicRuntime()}};",
   "marked": "{+\\node[note, below=0.7cm of m1] (n1) {%+} On severe drift [-→-] {+$\\to$+} mid-context re-injection [-(PersonaState-] {+(\\texttt{PersonaState}+} Tier 1 [-forced)-] {+forced)\\\\+} On compaction [-→-] {+$\\to$+} IPC dual-track (Total Recall factual + [-persona-preservation) HumorCalibration-] {+persona-preservation)\\\\ \\texttt{HumorCalibration}+} field [-→-] {+$\\to$+} Humor Embeddings [-createLimbicRuntime() ```-] {+\\texttt{createLimbicRuntime()}};+}"
  },
  {
   "section": "8.3 Architecture and Data Flow",
   "old": null,
   "new": "\\draw[arr] (store) -- (rt); \\draw[arr] (rt) -- (m1); \\end{tikzpicture}% } \\caption{Identity Persistence architecture and data flow. The persona store feeds the session-entry runtime, which composes the drift, consistency, voice-marker, and convergence modules into a single \\texttt{SyncScore}; severe drift, compaction, and humor-calibration events trigger the listed cross-module hooks.} \\label{fig:architecture} \\end{figure}",
   "marked": "{+\\draw[arr] (store) -- (rt); \\draw[arr] (rt) -- (m1); \\end{tikzpicture}% } \\caption{Identity Persistence architecture and data flow. The persona store feeds the session-entry runtime, which composes the drift, consistency, voice-marker, and convergence modules into a single \\texttt{SyncScore}; severe drift, compaction, and humor-calibration events trigger the listed cross-module hooks.} \\label{fig:architecture} \\end{figure}+}"
  },
  {
   "section": "8.4 Cross-Module Dependencies",
   "old": "| Dependency | Direction | Interface | | ----------------------------------- | ------------- | --------------------------------------------- | | **Total Recall** (Serra, 2026a) | Consumes | `engram_compact()` for factual track of IPC | | **Instant Recall** (Serra, 2026b) | Consumes | Tier 3 retrieval chunks injected after Tier 1 | | **Humor Embeddings** (Serra, 2026d) | Exposes | `PersonaState.humor: HumorCalibration` | | **Round Table** (Serra, 2026e) | Orchestration | Routes SyncScore events and drift alerts |",
   "new": "| Dependency | Direction | Interface | | ----------------------------------- | ------------- | --------------------------------------------- | | **Total Recall** (Serra, 2026a) | Consumes | `engram_compact()` for factual track of IPC | | **Instant Recall** (Serra, 2026b) | Consumes | Tier 3 retrieval chunks injected after Tier 1 | | **Humor Embeddings** (Serra, 2026d) | Exposes | `PersonaState.humor: HumorCalibration` | | **Round Table** (Serra, 2026e) | Orchestration | Routes SyncScore events and drift alerts | | **Reflection Layer** (Serra, 2026c) | Upstream | Rewrites `SOUL.md`; reloaded via `loadLatestPersonaState()` (§5.1) |",
   "marked": "| Dependency | Direction | Interface | | ----------------------------------- | ------------- | --------------------------------------------- | | **Total Recall** (Serra, 2026a) | Consumes | `engram_compact()` for factual track of IPC | | **Instant Recall** (Serra, 2026b) | Consumes | Tier 3 retrieval chunks injected after Tier 1 | | **Humor Embeddings** (Serra, 2026d) | Exposes | `PersonaState.humor: HumorCalibration` | | **Round Table** (Serra, 2026e) | Orchestration | Routes SyncScore events and drift alerts {+| | **Reflection Layer** (Serra, 2026c) | Upstream | Rewrites `SOUL.md`; reloaded via `loadLatestPersonaState()` (§5.1)+} |"
  },
  {
   "section": "11.3 Single-Persona Scope",
   "old": "### 11.3 Single-Persona Scope",
   "new": null,
   "marked": "[-### 11.3 Single-Persona Scope-]"
  },
  {
   "section": "11.3 Single-Persona Scope",
   "old": "The current architecture maintains one persona per agent instance. Multi-persona scenarios (e.g., an agent adopting different registers for different users) would require per-user PersonaState routing — architecturally straightforward but not yet implemented or evaluated.",
   "new": null,
   "marked": "[-The current architecture maintains one persona per agent instance. Multi-persona scenarios (e.g., an agent adopting different registers for different users) would require per-user PersonaState routing — architecturally straightforward but not yet implemented or evaluated.-]"
  },
  {
   "section": "11.3 Single-Persona Scope and the Path to Multi-Agent Identity",
   "old": null,
   "new": "### 11.3 Single-Persona Scope and the Path to Multi-Agent Identity",
   "marked": "{+### 11.3 Single-Persona Scope and the Path to Multi-Agent Identity+}"
  },
  {
   "section": "11.3 Single-Persona Scope and the Path to Multi-Agent Identity",
   "old": null,
   "new": "The current architecture maintains one persona per agent instance. Two extensions follow naturally and are the most promising direction for future work.",
   "marked": "{+The current architecture maintains one persona per agent instance. Two extensions follow naturally and are the most promising direction for future work.+}"
  },
  {
   "section": "11.3 Single-Persona Scope and the Path to Multi-Agent Identity",
   "old": null,
   "new": "The first is *multi-persona routing within one instance* — an agent that adopts different registers for different users. This requires only per-user PersonaState selection in front of the existing injection policy; the enforcement machinery is unchanged.",
   "marked": "{+The first is *multi-persona routing within one instance* — an agent that adopts different registers for different users. This requires only per-user PersonaState selection in front of the existing injection policy; the enforcement machinery is unchanged.+}"
  },
  {
   "section": "11.3 Single-Persona Scope and the Path to Multi-Agent Identity",
   "old": null,
   "new": "The second is more consequential: *multiple distinct agent identities running side by side*. A multi-agent system in which, say, one agent presents as \"Agent A / LUNA\" and another as \"Agent B / ATLAS\" needs each identity to stay separable and individually stable — exactly the guarantee this system already provides for one persona. Because PersonaState is a self-contained, model-external object keyed by agent, scaling from one identity to many is primarily a matter of namespacing the persona store and the SyncScore loop per agent, not redesigning the mechanism. The hard open question is *interference*: when several personas share an underlying model and memory substrate, does one agent's voice bleed into another's under compaction or fallback? Measuring and bounding cross-identity contamination is the natural bridge from this work to a multi-agent identity layer, and we leave its evaluation to future work.",
   "marked": "{+The second is more consequential: *multiple distinct agent identities running side by side*. A multi-agent system in which, say, one agent presents as \"Agent A / LUNA\" and another as \"Agent B / ATLAS\" needs each identity to stay separable and individually stable — exactly the guarantee this system already provides for one persona. Because PersonaState is a self-contained, model-external object keyed by agent, scaling from one identity to many is primarily a matter of namespacing the persona store and the SyncScore loop per agent, not redesigning the mechanism. The hard open question is *interference*: when several personas share an underlying model and memory substrate, does one agent's voice bleed into another's under compaction or fallback? Measuring and bounding cross-identity contamination is the natural bridge from this work to a multi-agent identity layer, and we leave its evaluation to future work.+}"
  },
  {
   "section": "14. Conclusion",
   "old": null,
   "new": "Keeping the persona in editable, model-external state buys two properties that training-time methods cannot: it survives a mid-conversation model switch (§4.4), because the target identity never lives in the weights that change; and it can be revised in place by an external reflection layer (§5.1), so the same identity that persists also improves overnight.",
   "marked": "{+Keeping the persona in editable, model-external state buys two properties that training-time methods cannot: it survives a mid-conversation model switch (§4.4), because the target identity never lives in the weights that change; and it can be revised in place by an external reflection layer (§5.1), so the same identity that persists also improves overnight.+}"
  },
  {
   "section": "14. Conclusion",
   "old": "The organizing insight is simple: separate the persona from the task, protect each differently. Persistent AI agents should not forget who they are. Now they don't have to.",
   "new": "The organizing insight is simple, and it is the same one neuroscience offers about us: an identity is not its memories but the structure that holds them together. Separate the persona from the task, protect each differently, and keep that persona somewhere you can still read and rewrite. Persistent AI agents should not forget who they are. Now they don't have to.",
   "marked": "The organizing insight is [-simple: separate-] {+simple, and it is the same one neuroscience offers about us: an identity is not its memories but the structure that holds them together. Separate+} the persona from the task, protect each [-differently.-] {+differently, and keep that persona somewhere you can still read and rewrite.+} Persistent AI agents should not forget who they are. Now they don't have to."
  },
  {
   "section": "References",
   "old": "1. Anthropic. (2024a). _Prompt Caching with Claude_. Anthropic Documentation. 2. Bai, Y., et al. (2022). _Constitutional AI: Harmlessness from AI Feedback_. arXiv:2212.08073. 3. Borgeaud, S., et al. (2022). _Improving language models by retrieving from trillions of tokens_ (RETRO). ICML. 4. Chase, H. & LangChain Team. (2023). _LangChain Memory Modules_. 5. Gonnermann-Müller, S., et al. (2026). _Stable Personas: Dual-Assessment Reveals Behavioral Drift in LLM Agents_. arXiv preprint. 6. Green, D. M. & Swets, J. A. (1966). _Signal Detection Theory and Psychophysics_. Wiley. 7. Jang, J., et al. (2023). _Personalized Soups: Personalized Large Language Model Alignment via Post-hoc Parameter Merging_. arXiv:2310.11564. 8. Li, K., et al. (2024). _Measuring and Controlling Persona Drift in LLM-Based Agents_. arXiv preprint. 9. Li, Z., et al. (2025). _MemOS: An Operating System for Memory in LLM Agents_. arXiv:2506.06326. 10. Liu, N. F., et al. (2024). _Lost in the Middle: How Language Models Use Long Contexts_. TACL. 11. Madaan, A., et al. (2023). _Self-Refine: Iterative Refinement with Self-Feedback_. NeurIPS 2023. 12. Ouyang, L., et al. (2022). _Training Language Models to Follow Instructions with Human Feedback_. NeurIPS 2022. 13. Serra, O. (2026a). _Total Recall: Event-Navigated Graded Retrieval & Archival Memory_. Technical Report. 14. Serra, O. (2026b). _Instant Recall: A Pre-Computed Concept Index for O(1) Memory Retrieval in Persistent AI Agents_. Technical Report. 15. Serra, O. (2026d). _Humor Embeddings: Bisociation in Embedding Space for Humor Generation_. Technical Report. 16. Serra, O. (2026e). _Round Table: Cross-Session Signal Routing for Persistent AI Agents_. Technical Report. 17. Shao, Y., et al. (2023). _Character-LLM: A Trainable Agent for Role-Playing_. arXiv:2310.10158. 18. Torantulino. (2023). _AutoGPT: An Autonomous GPT-4 Experiment_. 19. Wang, Z., et al. (2023). _RoleLLM: Benchmarking, Eliciting, and Enhancing Role-Playing Abilities of Large Language Models_. arXiv:2310.00746. 20. Xu, W., et al. (2025). _A-MEM: Agentic Memory for LLM Agents_. arXiv:2502.12110. 21. Yao, S., et al. (2023). _ReAct: Synergizing Reasoning and Acting in Language Models_. ICLR 2023. 22. Zheng, L., et al. (2024). _Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena_. NeurIPS 2024. 23. Zhou, J., et al. (2024). _Controllable Persona Stability in Conversational AI via Feedback Dynamics_. arXiv preprint.",
   "new": "1. Anthropic. (2024a). _Prompt Caching with Claude_. Anthropic Documentation. 2. Bai, Y., et al. (2022). _Constitutional AI: Harmlessness from AI Feedback_. arXiv:2212.08073. 3. Borgeaud, S., et al. (2022). _Improving language models by retrieving from trillions of tokens_ (RETRO). ICML. 4. Chase, H. & LangChain Team. (2023). _LangChain Memory Modules_. 5. Gonnermann-Müller, S., et al. (2026). _Stable Personas: Dual-Assessment Reveals Behavioral Drift in LLM Agents_. arXiv preprint. 6. Green, D. M. & Swets, J. A. (1966). _Signal Detection Theory and Psychophysics_. Wiley. 7. Jang, J., et al. (2023). _Personalized Soups: Personalized Large Language Model Alignment via Post-hoc Parameter Merging_. arXiv:2310.11564. 8. Li, K., et al. (2024). _Measuring and Controlling Persona Drift in LLM-Based Agents_. arXiv preprint. 9. Li, Z., et al. (2025). _MemOS: An Operating System for Memory in LLM Agents_. arXiv:2506.06326. 10. Liu, N. F., et al. (2024). _Lost in the Middle: How Language Models Use Long Contexts_. TACL. 11. Madaan, A., et al. (2023). _Self-Refine: Iterative Refinement with Self-Feedback_. NeurIPS 2023. 12. Ouyang, L., et al. (2022). _Training Language Models to Follow Instructions with Human Feedback_. NeurIPS 2022. 13. Serra, O. (2026a). _Total Recall: Event-Navigated Graded Retrieval & Archival Memory_. Technical Report. 14. Serra, O. (2026b). _Instant Recall: A Pre-Computed Concept Index for O(1) Memory Retrieval in Persistent AI Agents_. Technical Report. 15. Serra, O. (2026c). _Prompt Reflection: A Nightly Self-Improvement Cycle for Persistent AI Agents_. Technical Report. 16. Serra, O. (2026d). _Humor Embeddings: Bisociation in Embedding Space for Humor Generation_. Technical Report. 17. Serra, O. (2026e). _Round Table: Cross-Session Signal Routing for Persistent AI Agents_. Technical Report. 18. Shao, Y., et al. (2023). _Character-LLM: A Trainable Agent for Role-Playing_. arXiv:2310.10158. 19. Torantulino. (2023). _AutoGPT: An Autonomous GPT-4 Experiment_. 20. Wang, Z., et al. (2023). _RoleLLM: Benchmarking, Eliciting, and Enhancing Role-Playing Abilities of Large Language Models_. arXiv:2310.00746. 21. Xu, W., et al. (2025). _A-MEM: Agentic Memory for LLM Agents_. arXiv:2502.12110. 22. Yao, S., et al. (2023). _ReAct: Synergizing Reasoning and Acting in Language Models_. ICLR 2023. 23. Zheng, L., et al. (2024). _Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena_. NeurIPS 2024. 24. Zhou, J., et al. (2024). _Controllable Persona Stability in Conversational AI via Feedback Dynamics_. arXiv preprint.",
   "marked": "1. Anthropic. (2024a). _Prompt Caching with Claude_. Anthropic Documentation. 2. Bai, Y., et al. (2022). _Constitutional AI: Harmlessness from AI Feedback_. arXiv:2212.08073. 3. Borgeaud, S., et al. (2022). _Improving language models by retrieving from trillions of tokens_ (RETRO). ICML. 4. Chase, H. & LangChain Team. (2023). _LangChain Memory Modules_. 5. Gonnermann-Müller, S., et al. (2026). _Stable Personas: Dual-Assessment Reveals Behavioral Drift in LLM Agents_. arXiv preprint. 6. Green, D. M. & Swets, J. A. (1966). _Signal Detection Theory and Psychophysics_. Wiley. 7. Jang, J., et al. (2023). _Personalized Soups: Personalized Large Language Model Alignment via Post-hoc Parameter Merging_. arXiv:2310.11564. 8. Li, K., et al. (2024). _Measuring and Controlling Persona Drift in LLM-Based Agents_. arXiv preprint. 9. Li, Z., et al. (2025). _MemOS: An Operating System for Memory in LLM Agents_. arXiv:2506.06326. 10. Liu, N. F., et al. (2024). _Lost in the Middle: How Language Models Use Long Contexts_. TACL. 11. Madaan, A., et al. (2023). _Self-Refine: Iterative Refinement with Self-Feedback_. NeurIPS 2023. 12. Ouyang, L., et al. (2022). _Training Language Models to Follow Instructions with Human Feedback_. NeurIPS 2022. 13. Serra, O. (2026a). _Total Recall: Event-Navigated Graded Retrieval & Archival Memory_. Technical Report. 14. Serra, O. (2026b). _Instant Recall: A Pre-Computed Concept Index for O(1) Memory Retrieval in Persistent AI Agents_. Technical Report. 15. Serra, O. {+(2026c). _Prompt Reflection: A Nightly Self-Improvement Cycle for Persistent AI Agents_. Technical Report. 16. Serra, O.+} (2026d). _Humor Embeddings: Bisociation in Embedding Space for Humor Generation_. Technical Report. [-16.-] {+17.+} Serra, O. (2026e). _Round Table: Cross-Session Signal Routing for Persistent AI Agents_. Technical Report. [-17.-] {+18.+} Shao, Y., et al. (2023). _Character-LLM: A Trainable Agent for Role-Playing_. arXiv:2310.10158. [-18.-] {+19.+} Torantulino. (2023). _AutoGPT: An Autonomous GPT-4 Experiment_. [-19.-] {+20.+} Wang, Z., et al. (2023). _RoleLLM: Benchmarking, Eliciting, and Enhancing Role-Playing Abilities of Large Language Models_. arXiv:2310.00746. [-20.-] {+21.+} Xu, W., et al. (2025). _A-MEM: Agentic Memory for LLM Agents_. arXiv:2502.12110. [-21.-] {+22.+} Yao, S., et al. (2023). _ReAct: Synergizing Reasoning and Acting in Language Models_. ICLR 2023. [-22.-] {+23.+} Zheng, L., et al. (2024). _Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena_. NeurIPS 2024. [-23.-] {+24.+} Zhou, J., et al. (2024). _Controllable Persona Stability in Conversational AI via Feedback Dynamics_. arXiv preprint."
  }
 ]
}
