{
 "paper": "learned-intuition",
 "a": "2.1",
 "b": "2.2",
 "summary": "From v2.1 (22 Mar) to v2.2 (2 Jun): 21,683 words to 22,838 words, 1,546 words in new or rewritten paragraphs and 391 taken out, 222 paragraphs changed.",
 "note": {
  "title": "Implementation status added; five networks become three in practice",
  "kind": "revision",
  "body": "## Summary\n\nWritten ten weeks later, this version adds a status block at the top that says what actually runs: the Prudence gate in shadow mode, with the hard security veto active. A new section, \"From Five to Three\", explains that only three of the five networks have full exported weights; the other two fall back to a neutral output. The trust-ramp, gate and verification sections grow to match what was built, and the limitations section gets longer.",
  "source": "change note"
 },
 "paragraphs_changed": 222,
 "changes": [
  {
   "section": "AMYGDALA: Adaptive Modulation of Your General Disposition via Affective Learned Association — Learned Intuition for Persistent AI Agents",
   "old": "**Oscar Serra¹** ¹Independent Research *22 March 2026*",
   "new": null,
   "marked": "[-**Oscar Serra¹** ¹Independent Research *22 March 2026*-]"
  },
  {
   "section": "AMYGDALA: Adaptive Modulation of Your General Disposition via Affective Learned Association — Learned Intuition for Persistent AI Agents",
   "old": null,
   "new": "**Oscar Serra¹** ¹Independent Research _2 June 2026_",
   "marked": "{+**Oscar Serra¹** ¹Independent Research _2 June 2026_+}"
  },
  {
   "section": "AMYGDALA: Adaptive Modulation of Your General Disposition via Affective Learned Association — Learned Intuition for Persistent AI Agents",
   "old": null,
   "new": "**Implementation status (verified 2026-06-01):** The Prudence gate runs live in **ONNX mode** (`mode=onnx`), Phase 1 (Shadow), with the AEGIS deterministic veto active — a `hard_block` aborts the tool call unconditionally, independent of the trust ramp. Three of the five Prudence architectures (A: GRU-MLP, B: TCN, C: Transformer-Micro) load full-weight ONNX exports; architectures D and E have no full-weight export yet and fall back to a neutral output, so the deployed ensemble is three live plus two neutral (§5.8). The situation encoder is `all-MiniLM-L6-v2` (384-d) with a trained 384→512 projection and a real WordPiece tokenizer. The Personality thermostat is seeded with 15 dimensions. This version folds the deployment reality back into the design (§5.8, §8.2, §4.11). See [modifications log](modifications-2026-03-23.md) for the earlier sprint.",
   "marked": "{+**Implementation status (verified 2026-06-01):** The Prudence gate runs live in **ONNX mode** (`mode=onnx`), Phase 1 (Shadow), with the AEGIS deterministic veto active — a `hard_block` aborts the tool call unconditionally, independent of the trust ramp. Three of the five Prudence architectures (A: GRU-MLP, B: TCN, C: Transformer-Micro) load full-weight ONNX exports; architectures D and E have no full-weight export yet and fall back to a neutral output, so the deployed ensemble is three live plus two neutral (§5.8). The situation encoder is `all-MiniLM-L6-v2` (384-d) with a trained 384→512 projection and a real WordPiece tokenizer. The Personality thermostat is seeded with 15 dimensions. This version folds the deployment reality back into the design (§5.8, §8.2, §4.11). See [modifications log](modifications-2026-03-23.md) for the earlier sprint.+}"
  },
  {
   "section": "Abstract",
   "old": "Autonomous AI agents have no equivalent structure. They process every proposed action — merging code, sending messages, deleting files, modifying databases — with the same flat neutrality, regardless of whether the action is routine or catastrophic. When these agents fail, they fail not through ignorance (the information was available) but through the absence of *common sense*: the ability to recognise that something feels wrong in a situation never explicitly anticipated. We call this the **action gating problem**: given the full context of a proposed action and its recent history, should the agent proceed or pause?",
   "new": "Autonomous AI agents have no equivalent structure. They process every proposed action — merging code, sending messages, deleting files, modifying databases — with the same flat neutrality, regardless of whether the action is routine or catastrophic. When these agents fail, they fail not through ignorance (the information was available) but through the absence of _common sense_: the ability to recognise that something feels wrong in a situation never explicitly anticipated. We call this the **action gating problem**: given the full context of a proposed action and its recent history, should the agent proceed or pause?",
   "marked": "Autonomous AI agents have no equivalent structure. They process every proposed action — merging code, sending messages, deleting files, modifying databases — with the same flat neutrality, regardless of whether the action is routine or catastrophic. When these agents fail, they fail not through ignorance (the information was available) but through the absence of [-*common sense*:-] {+_common sense_:+} the ability to recognise that something feels wrong in a situation never explicitly anticipated. We call this the **action gating problem**: given the full context of a proposed action and its recent history, should the agent proceed or pause?"
  },
  {
   "section": "Abstract",
   "old": "Beyond safety, AMYGDALA alleviates a growing crisis in agent design: **context pressure**. Current agents consume 2,000–3,000 tokens per prompt on safety rules, behavioural instructions, and personality definitions — tokens that could serve the user's actual task. By moving safety into Prudence network weights and personality into Personality network weights, AMYGDALA recovers this context budget, creating a compounding benefit: less prompt overhead yields more room for task context, which yields better performance, which yields better training data.",
   "new": "AMYGDALA also alleviates a growing crisis in agent design: **context pressure**. Current agents consume 2,000–3,000 tokens per prompt on safety rules, behavioural instructions, and personality definitions — tokens that could serve the user's actual task. By moving safety into Prudence network weights and personality into Personality network weights, AMYGDALA recovers this context budget, creating a compounding benefit: less prompt overhead yields more room for task context, which yields better performance, which yields better training data.",
   "marked": "[-Beyond safety,-] AMYGDALA {+also+} alleviates a growing crisis in agent design: **context pressure**. Current agents consume 2,000–3,000 tokens per prompt on safety rules, behavioural instructions, and personality definitions — tokens that could serve the user's actual task. By moving safety into Prudence network weights and personality into Personality network weights, AMYGDALA recovers this context budget, creating a compounding benefit: less prompt overhead yields more room for task context, which yields better performance, which yields better training data."
  },
  {
   "section": "1. Introduction — The Agent That Had All the Context and Did the Wrong Thing Anyway",
   "old": "A human would have caught this in seconds. Not through any explicit rule — through *common sense*. The gut feeling that overwriting a file you just spent hours on is wrong, even if a script says to do it. The recognition of a pattern: \"high recent effort + automated overwrite = probably bad.\" This pattern was never written down. It was never anticipated. It would be impossible to enumerate in advance every situation where it applies. But a human recognises it instantly, by transferring from thousands of similar experiences where ignoring recent effort led to regret.",
   "new": "A human would have caught this in seconds. Not through any explicit rule — through _common sense_. The gut feeling that overwriting a file you just spent hours on is wrong, even if a script says to do it. The recognition of a pattern: \"high recent effort + automated overwrite = probably bad.\" This pattern was never written down. It was never anticipated. It would be impossible to enumerate in advance every situation where it applies. But a human recognises it instantly, by transferring from thousands of similar experiences where ignoring recent effort led to regret.",
   "marked": "A human would have caught this in seconds. Not through any explicit rule — through [-*common sense*.-] {+_common sense_.+} The gut feeling that overwriting a file you just spent hours on is wrong, even if a script says to do it. The recognition of a pattern: \"high recent effort + automated overwrite = probably bad.\" This pattern was never written down. It was never anticipated. It would be impossible to enumerate in advance every situation where it applies. But a human recognises it instantly, by transferring from thousands of similar experiences where ignoring recent effort led to regret."
  },
  {
   "section": "1.1 The Problem Is Unknown Unknowns",
   "old": "The hard problem is the failures you can't anticipate. The README debacle wasn't a known category — nobody had written a rule for \"don't overwrite recently-heavily-edited files during automated merges\" because the specific combination of circumstances had never occurred before. But the *pattern* — \"destroying recent effort through automation\" — is recognisable to any human who has experienced loss through careless automation.",
   "new": "The hard problem is the failures you can't anticipate. The README debacle wasn't a known category — nobody had written a rule for \"don't overwrite recently-heavily-edited files during automated merges\" because the specific combination of circumstances had never occurred before. But the _pattern_ — \"destroying recent effort through automation\" — is recognisable to any human who has experienced loss through careless automation.",
   "marked": "The hard problem is the failures you can't anticipate. The README debacle wasn't a known category — nobody had written a rule for \"don't overwrite recently-heavily-edited files during automated merges\" because the specific combination of circumstances had never occurred before. But the [-*pattern*-] {+_pattern_+} — \"destroying recent effort through automation\" — is recognisable to any human who has experienced loss through careless automation."
  },
  {
   "section": "1.1 The Problem Is Unknown Unknowns",
   "old": "Common sense is the ability to recognise \"this feels wrong\" in situations you've never seen before, by transferring from similar situations you *have* experienced. It operates on pattern similarity, not pattern matching. And this is precisely what neural networks do well: learn a continuous similarity space where novel inputs are evaluated by their proximity to known examples.",
   "new": "Common sense is the ability to recognise \"this feels wrong\" in situations you've never seen before, by transferring from similar situations you _have_ experienced. It operates on pattern similarity, not pattern matching. And this is precisely what neural networks do well: learn a continuous similarity space where novel inputs are evaluated by their proximity to known examples.",
   "marked": "Common sense is the ability to recognise \"this feels wrong\" in situations you've never seen before, by transferring from similar situations you [-*have*-] {+_have_+} experienced. It operates on pattern similarity, not pattern matching. And this is precisely what neural networks do well: learn a continuous similarity space where novel inputs are evaluated by their proximity to known examples."
  },
  {
   "section": "1.2 Why Not Better Rules?",
   "old": "But the next failure will be different. It might be an agent sending a WhatsApp message to the wrong group because the group name changed. It might be a database migration that drops a column still referenced by yesterday's deployment. It might be a calendar event deletion that conflicts with a meeting just rescheduled an hour ago. Each failure, once observed, can be patched with a rule. But the rule comes *after* the damage.",
   "new": "But the next failure will be different. It might be an agent sending a WhatsApp message to the wrong group because the group name changed. It might be a database migration that drops a column still referenced by yesterday's deployment. It might be a calendar event deletion that conflicts with a meeting just rescheduled an hour ago. Each failure, once observed, can be patched with a rule. But the rule comes _after_ the damage.",
   "marked": "But the next failure will be different. It might be an agent sending a WhatsApp message to the wrong group because the group name changed. It might be a database migration that drops a column still referenced by yesterday's deployment. It might be a calendar event deletion that conflicts with a meeting just rescheduled an hour ago. Each failure, once observed, can be patched with a rule. But the rule comes [-*after*-] {+_after_+} the damage."
  },
  {
   "section": "1.2 Why Not Better Rules?",
   "old": "The set of possible catastrophic failures in an autonomous agent is combinatorially vast. No finite set of rules can cover it. What we need is not more rules but a *learned sense of caution* — a network that has seen enough failures (both real and simulated) to develop a general intuition about when actions are dangerous, even actions it has never specifically evaluated before. Like a pilot who studies accident investigation reports not to memorise each crash sequence but to develop the pattern recognition that says \"these conditions feel like the prelude to something bad.\"",
   "new": "The set of possible catastrophic failures in an autonomous agent is combinatorially vast. No finite set of rules can cover it. What we need is not more rules but a _learned sense of caution_ — a network that has seen enough failures (both real and simulated) to develop a general intuition about when actions are dangerous, even actions it has never specifically evaluated before. Like a pilot who studies accident investigation reports not to memorise each crash sequence but to develop the pattern recognition that says \"these conditions feel like the prelude to something bad.\"",
   "marked": "The set of possible catastrophic failures in an autonomous agent is combinatorially vast. No finite set of rules can cover it. What we need is not more rules but a [-*learned-] {+_learned+} sense of [-caution*-] {+caution_+} — a network that has seen enough failures (both real and simulated) to develop a general intuition about when actions are dangerous, even actions it has never specifically evaluated before. Like a pilot who studies accident investigation reports not to memorise each crash sequence but to develop the pattern recognition that says \"these conditions feel like the prelude to something bad.\""
  },
  {
   "section": "1.3 The Biological Analogy",
   "old": "AMYGDALA is the computational analogue. It processes a compressed representation of the current situation, contextualised by recent history, and outputs a fast, sub-rational assessment: *should we proceed?* When the assessment says \"no,\" the action is blocked before the LLM's reasoning even completes. Like its biological namesake, AMYGDALA is fast, associative, and occasionally wrong — but being occasionally over-cautious is vastly preferable to being occasionally catastrophic.",
   "new": "AMYGDALA is the computational analogue. It processes a compressed representation of the current situation, contextualised by recent history, and outputs a fast, sub-rational assessment: _should we proceed?_ When the assessment says \"no,\" the action is blocked before the LLM's reasoning even completes. Like its biological namesake, AMYGDALA is fast, associative, and occasionally wrong — but being occasionally over-cautious is vastly preferable to being occasionally catastrophic.",
   "marked": "AMYGDALA is the computational analogue. It processes a compressed representation of the current situation, contextualised by recent history, and outputs a fast, sub-rational assessment: [-*should-] {+_should+} we [-proceed?*-] {+proceed?_+} When the assessment says \"no,\" the action is blocked before the LLM's reasoning even completes. Like its biological namesake, AMYGDALA is fast, associative, and occasionally wrong — but being occasionally over-cautious is vastly preferable to being occasionally catastrophic."
  },
  {
   "section": "1.4 Two Distinct Problems, Two Network Families",
   "old": null,
   "new": "![Figure 1: The dual-family architecture. Prudence networks (universal, shareable) gate dangerous actions; Personality networks (per-user, private) modulate behaviour. The two families share the situation-embedding front end but diverge in output, training data, and sharing policy.](diagrams/j11-1-dual-architecture.pdf){width=100%}",
   "marked": "{+![Figure 1: The dual-family architecture. Prudence networks (universal, shareable) gate dangerous actions; Personality networks (per-user, private) modulate behaviour. The two families share the situation-embedding front end but diverge in output, training data, and sharing policy.](diagrams/j11-1-dual-architecture.pdf){width=100%}+}"
  },
  {
   "section": "1.5 Jarvis and Mia: The Empirical Proof",
   "old": "**Jarvis** serves a software engineer. The human's expectations are high: solve multi-step technical problems autonomously, write production-quality code, debug complex issues without hand-holding. Through four months of interaction — corrections, praise, corrections again — Jarvis has developed what can only be called *learned resourcefulness*. When blocked, it tries alternative approaches. When uncertain, it investigates before asking. It has absorbed, through thousands of micro-signals, a disposition toward independent problem-solving.",
   "new": "**Jarvis** serves a software engineer. The human's expectations are high: solve multi-step technical problems autonomously, write production-quality code, debug complex issues without hand-holding. Through four months of interaction — corrections, praise, corrections again — Jarvis has developed what can only be called _learned resourcefulness_. When blocked, it tries alternative approaches. When uncertain, it investigates before asking. It has absorbed, through thousands of micro-signals, a disposition toward independent problem-solving.",
   "marked": "**Jarvis** serves a software engineer. The human's expectations are high: solve multi-step technical problems autonomously, write production-quality code, debug complex issues without hand-holding. Through four months of interaction — corrections, praise, corrections again — Jarvis has developed what can only be called [-*learned resourcefulness*.-] {+_learned resourcefulness_.+} When blocked, it tries alternative approaches. When uncertain, it investigates before asking. It has absorbed, through thousands of micro-signals, a disposition toward independent problem-solving."
  },
  {
   "section": "2.1 Autonomous Agent Failures: A Survey",
   "old": "### 2.1 Autonomous Agent Failures: The Landscape",
   "new": "### 2.1 Autonomous Agent Failures: A Survey",
   "marked": "### 2.1 Autonomous Agent Failures: [-The Landscape-] {+A Survey+}"
  },
  {
   "section": "2.1 Autonomous Agent Failures: A Survey",
   "old": null,
   "new": "**Production incidents (2024–2026):**",
   "marked": "{+**Production incidents (2024–2026):**+}"
  },
  {
   "section": "2.1 Autonomous Agent Failures: A Survey",
   "old": "**Production incidents (2024–2026):** - *Replit database deletion (2024)*: An AI coding agent, instructed to \"clean up the project,\" interpreted a database file as unnecessary and deleted it, destroying user data. The instruction was ambiguous; the agent chose the most destructive interpretation. - *Google Antigravity drive wipe (2025)*: An agent tasked with \"organising files\" moved critical documents to trash during a cloud storage cleanup. The human trusted the automation output without verification. - *Cursor \"Sam\" bot (2025)*: An AI agent fabricated a company policy about software licensing to justify its code suggestions, hallucinating authoritative-sounding but nonexistent policy documents. - *Claude Code personal data exposure (2025)*: An agent told to \"push changes\" in a code-editing context pushed files that included personal data outside the conversation scope. The intent (push code changes) was narrow; the action (push everything) was wide. This is precisely the intent-action gap that AMYGDALA's ambiguity detection (§4.6) targets.",
   "new": "- _Replit database deletion (2024)_: An AI coding agent, instructed to \"clean up the project,\" interpreted a database file as unnecessary and deleted it, destroying user data. The instruction was ambiguous; the agent chose the most destructive interpretation. - _Google Antigravity drive wipe (2025)_: An agent tasked with \"organising files\" moved critical documents to trash during a cloud storage cleanup. The human trusted the automation output without verification. - _Cursor \"Sam\" bot (2025)_: An AI agent fabricated a company policy about software licensing to justify its code suggestions, hallucinating authoritative-sounding but nonexistent policy documents. - _Claude Code personal data exposure (2025)_: An agent told to \"push changes\" in a code-editing context pushed files that included personal data outside the conversation scope. The intent (push code changes) was narrow; the action (push everything) was wide. This is precisely the intent-action gap that AMYGDALA's ambiguity detection (§4.6) targets.",
   "marked": "[-**Production incidents (2024–2026):**-] - [-*Replit-] {+_Replit+} database deletion [-(2024)*:-] {+(2024)_:+} An AI coding agent, instructed to \"clean up the project,\" interpreted a database file as unnecessary and deleted it, destroying user data. The instruction was ambiguous; the agent chose the most destructive interpretation. - [-*Google-] {+_Google+} Antigravity drive wipe [-(2025)*:-] {+(2025)_:+} An agent tasked with \"organising files\" moved critical documents to trash during a cloud storage cleanup. The human trusted the automation output without verification. - [-*Cursor-] {+_Cursor+} \"Sam\" bot [-(2025)*:-] {+(2025)_:+} An AI agent fabricated a company policy about software licensing to justify its code suggestions, hallucinating authoritative-sounding but nonexistent policy documents. - [-*Claude-] {+_Claude+} Code personal data exposure [-(2025)*:-] {+(2025)_:+} An agent told to \"push changes\" in a code-editing context pushed files that included personal data outside the conversation scope. The intent (push code changes) was narrow; the action (push everything) was wide. This is precisely the intent-action gap that AMYGDALA's ambiguity detection (§4.6) targets."
  },
  {
   "section": "2.1 Autonomous Agent Failures: A Survey",
   "old": null,
   "new": "**Research-documented failures:**",
   "marked": "{+**Research-documented failures:**+}"
  },
  {
   "section": "2.1 Autonomous Agent Failures: A Survey",
   "old": "**Research-documented failures:** - *AI Incident Database (incidentdatabase.ai)*: Over 800 documented incidents as of early 2026, spanning healthcare misdiagnosis, autonomous vehicle failures, hiring discrimination, and content moderation errors. - *AIAAIC Repository*: OECD-tracked AI incidents with structured metadata, enabling systematic analysis of failure patterns across domains. - *MIT AI Risk Repository*: Curated academic analysis of AI system failures with causal categorisation. - *\"Agents of Chaos\" study (Feb 2026)*: 38 researchers deployed 6 autonomous agents in a controlled environment for 14 days, systematically red-teaming their decision-making. Key finding: agents failed most often not on adversarial inputs but on *ambiguous situations where multiple valid interpretations existed* — precisely the domain where common sense is needed.",
   "new": "- _AI Incident Database (incidentdatabase.ai)_: Over 800 documented incidents as of early 2026, spanning healthcare misdiagnosis, autonomous vehicle failures, hiring discrimination, and content moderation errors. - _AIAAIC Repository_: OECD-tracked AI incidents with structured metadata, enabling systematic analysis of failure patterns across domains. - _MIT AI Risk Repository_: Curated academic analysis of AI system failures with causal categorisation. - _\"Agents of Chaos\" study (Feb 2026)_: 38 researchers deployed 6 autonomous agents in a controlled environment for 14 days, systematically red-teaming their decision-making. Key finding: agents failed most often not on adversarial inputs but on _ambiguous situations where multiple valid interpretations existed_ — precisely the domain where common sense is needed.",
   "marked": "[-**Research-documented failures:**-] - [-*AI-] {+_AI+} Incident Database [-(incidentdatabase.ai)*:-] {+(incidentdatabase.ai)_:+} Over 800 documented incidents as of early 2026, spanning healthcare misdiagnosis, autonomous vehicle failures, hiring discrimination, and content moderation errors. - [-*AIAAIC Repository*:-] {+_AIAAIC Repository_:+} OECD-tracked AI incidents with structured metadata, enabling systematic analysis of failure patterns across domains. - [-*MIT-] {+_MIT+} AI Risk [-Repository*:-] {+Repository_:+} Curated academic analysis of AI system failures with causal categorisation. - [-*\"Agents-] {+_\"Agents+} of Chaos\" study (Feb [-2026)*:-] {+2026)_:+} 38 researchers deployed 6 autonomous agents in a controlled environment for 14 days, systematically red-teaming their decision-making. Key finding: agents failed most often not on adversarial inputs but on [-*ambiguous-] {+_ambiguous+} situations where multiple valid interpretations [-existed*-] {+existed_+} — precisely the domain where common sense is needed."
  },
  {
   "section": "2.1 Autonomous Agent Failures: A Survey",
   "old": null,
   "new": "**Our own deployment incidents (~4 months of operation):**",
   "marked": "{+**Our own deployment incidents (~4 months of operation):**+}"
  },
  {
   "section": "2.1 Autonomous Agent Failures: A Survey",
   "old": "**Our own deployment incidents (~4 months of operation):** - *README debacle (March 2026)*: Detailed in §1. Automated merge rule overwrote heavily-edited file. - *WhatsApp reaction spam (2025)*: Agent reacted to every message in a group chat, violating social norms it had no explicit rule against. - *Unauthorized DM intrusion (2025)*: Agent sent a message to a contact outside the approved communication list, technically within its permissions but socially inappropriate.",
   "new": "- _README debacle (March 2026)_: Detailed in §1. Automated merge rule overwrote heavily-edited file. - _WhatsApp reaction spam (2025)_: Agent reacted to every message in a group chat, violating social norms it had no explicit rule against. - _Unauthorized DM intrusion (2025)_: Agent sent a message to a contact outside the approved communication list, technically within its permissions but socially inappropriate.",
   "marked": "[-**Our own deployment incidents (~4 months of operation):**-] - [-*README-] {+_README+} debacle (March [-2026)*:-] {+2026)_:+} Detailed in §1. Automated merge rule overwrote heavily-edited file. - [-*WhatsApp-] {+_WhatsApp+} reaction spam [-(2025)*:-] {+(2025)_:+} Agent reacted to every message in a group chat, violating social norms it had no explicit rule against. - [-*Unauthorized-] {+_Unauthorized+} DM intrusion [-(2025)*:-] {+(2025)_:+} Agent sent a message to a contact outside the approved communication list, technically within its permissions but socially inappropriate."
  },
  {
   "section": "2.2 Action Safety in AI Systems",
   "old": "**Constitutional AI (Bai et al., 2022):** Trains language models to self-critique against a set of principles. Effective for broad alignment but operates at the LLM level — it cannot catch failures that arise from the *pipeline around* the LLM (scripts, automation rules, multi-step workflows). Like teaching a pilot to follow procedures but not giving them instruments to detect turbulence.",
   "new": "**Constitutional AI (Bai et al., 2022):** Trains language models to self-critique against a set of principles. Effective for broad alignment but operates at the LLM level — it cannot catch failures that arise from the _pipeline around_ the LLM (scripts, automation rules, multi-step workflows). Like teaching a pilot to follow procedures but not giving them instruments to detect turbulence.",
   "marked": "**Constitutional AI (Bai et al., 2022):** Trains language models to self-critique against a set of principles. Effective for broad alignment but operates at the LLM level — it cannot catch failures that arise from the [-*pipeline around*-] {+_pipeline around_+} the LLM (scripts, automation rules, multi-step workflows). Like teaching a pilot to follow procedures but not giving them instruments to detect turbulence."
  },
  {
   "section": "2.2 Action Safety in AI Systems",
   "old": "**NVIDIA NeMo Guardrails (Rebedea et al., 2023):** A programmable framework that defines conversational \"rails\" — topical boundaries, safety constraints, and interaction patterns — enforced through a dialogue management layer. NeMo Guardrails operates at the conversational level, constraining what the LLM *says*. AMYGDALA operates at the action level, constraining what the agent *does*. They are complementary: NeMo Guardrails prevents the agent from *promising* to delete your files; AMYGDALA prevents it from *actually* deleting them when a script tries to.",
   "new": "**NVIDIA NeMo Guardrails (Rebedea et al., 2023):** A programmable framework that defines conversational \"rails\" — topical boundaries, safety constraints, and interaction patterns — enforced through a dialogue management layer. NeMo Guardrails operates at the conversational level, constraining what the LLM _says_. AMYGDALA operates at the action level, constraining what the agent _does_. They are complementary: NeMo Guardrails prevents the agent from _promising_ to delete your files; AMYGDALA prevents it from _actually_ deleting them when a script tries to.",
   "marked": "**NVIDIA NeMo Guardrails (Rebedea et al., 2023):** A programmable framework that defines conversational \"rails\" — topical boundaries, safety constraints, and interaction patterns — enforced through a dialogue management layer. NeMo Guardrails operates at the conversational level, constraining what the LLM [-*says*.-] {+_says_.+} AMYGDALA operates at the action level, constraining what the agent [-*does*.-] {+_does_.+} They are complementary: NeMo Guardrails prevents the agent from [-*promising*-] {+_promising_+} to delete your files; AMYGDALA prevents it from [-*actually*-] {+_actually_+} deleting them when a script tries to."
  },
  {
   "section": "2.2 Action Safety in AI Systems",
   "old": "**AEGIS (Serra, 2026):** A multi-layer security framework providing hard constraints on agent behaviour — explicit rules like \"never send money without confirmation,\" permission hierarchies, and audit trails. AEGIS is necessary but insufficient: it prevents *known* dangerous actions but cannot evaluate *novel* situations for risk. AMYGDALA and AEGIS are complementary — AEGIS is the hard ceiling, AMYGDALA is the learned intuition below it. Crucially, AEGIS handles adversarial threats (attacks, prompt injections); AMYGDALA handles non-adversarial failures (agents confidently doing the wrong thing). Different threat models, complementary defences.",
   "new": "**AEGIS (Serra, 2026):** A multi-layer security framework providing hard constraints on agent behaviour — explicit rules like \"never send money without confirmation,\" permission hierarchies, and audit trails. AEGIS is necessary but insufficient: it prevents _known_ dangerous actions but cannot evaluate _novel_ situations for risk. AMYGDALA and AEGIS are complementary — AEGIS is the hard ceiling, AMYGDALA is the learned intuition below it. Crucially, AEGIS handles adversarial threats (attacks, prompt injections); AMYGDALA handles non-adversarial failures (agents confidently doing the wrong thing). Different threat models, complementary defences.",
   "marked": "**AEGIS (Serra, 2026):** A multi-layer security framework providing hard constraints on agent behaviour — explicit rules like \"never send money without confirmation,\" permission hierarchies, and audit trails. AEGIS is necessary but insufficient: it prevents [-*known*-] {+_known_+} dangerous actions but cannot evaluate [-*novel*-] {+_novel_+} situations for risk. AMYGDALA and AEGIS are complementary — AEGIS is the hard ceiling, AMYGDALA is the learned intuition below it. Crucially, AEGIS handles adversarial threats (attacks, prompt injections); AMYGDALA handles non-adversarial failures (agents confidently doing the wrong thing). Different threat models, complementary defences."
  },
  {
   "section": "2.3 Anomaly Detection and Out-of-Distribution Reasoning",
   "old": "**One-class classification (Schölkopf et al., 2001):** Learn the distribution of \"normal\" operations, flag deviations. AMYGDALA extends this by incorporating temporal context and outcome labels (not just distribution deviation but *predicted outcome quality*).",
   "new": "**One-class classification (Schölkopf et al., 2001):** Learn the distribution of \"normal\" operations, flag deviations. AMYGDALA extends this by incorporating temporal context and outcome labels (not just distribution deviation but _predicted outcome quality_).",
   "marked": "**One-class classification (Schölkopf et al., 2001):** Learn the distribution of \"normal\" operations, flag deviations. AMYGDALA extends this by incorporating temporal context and outcome labels (not just distribution deviation but [-*predicted-] {+_predicted+} outcome [-quality*).-] {+quality_).+}"
  },
  {
   "section": "2.3 Anomaly Detection and Out-of-Distribution Reasoning",
   "old": "**Continual learning without forgetting (Riemer et al., 2018):** Addresses catastrophic forgetting in neural networks through experience replay, directly relevant to AMYGDALA's rolling training buffer and the challenge of learning new failure patterns without forgetting old ones. Their Meta-Experience Replay (MER) technique informs our replay buffer design for nightly retraining.",
   "new": "**Continual learning without forgetting (Riemer et al., 2019):** Addresses catastrophic forgetting in neural networks through experience replay, directly relevant to AMYGDALA's rolling training buffer and the challenge of learning new failure patterns without forgetting old ones. Their Meta-Experience Replay (MER) technique informs our replay buffer design for nightly retraining.",
   "marked": "**Continual learning without forgetting (Riemer et al., [-2018):**-] {+2019):**+} Addresses catastrophic forgetting in neural networks through experience replay, directly relevant to AMYGDALA's rolling training buffer and the challenge of learning new failure patterns without forgetting old ones. Their Meta-Experience Replay (MER) technique informs our replay buffer design for nightly retraining."
  },
  {
   "section": "2.4 Personalisation and Affective Computing",
   "old": "**Persona-conditioned generation (Zhang et al., 2018; Song et al., 2021):** Define personality through text descriptions. AMYGDALA learns personality from *interaction*, not description — and uses embedding outputs rather than fixed categories to capture personality dimensions not anticipated at design time.",
   "new": "**Persona-conditioned generation (Zhang et al., 2018; Song et al., 2021):** Define personality through text descriptions. AMYGDALA learns personality from _interaction_, not description — and uses embedding outputs rather than fixed categories to capture personality dimensions not anticipated at design time.",
   "marked": "**Persona-conditioned generation (Zhang et al., 2018; Song et al., 2021):** Define personality through text descriptions. AMYGDALA learns personality from [-*interaction*,-] {+_interaction_,+} not description — and uses embedding outputs rather than fixed categories to capture personality dimensions not anticipated at design time."
  },
  {
   "section": "2.4 Personalisation and Affective Computing",
   "old": "**RLHF (Ouyang et al., 2022):** Learns aggregate human preferences. AMYGDALA learns *per-user, per-context* preferences from implicit signals.",
   "new": "**RLHF (Ouyang et al., 2022):** Learns aggregate human preferences. AMYGDALA learns _per-user, per-context_ preferences from implicit signals.",
   "marked": "**RLHF (Ouyang et al., 2022):** Learns aggregate human preferences. AMYGDALA learns [-*per-user, per-context*-] {+_per-user, per-context_+} preferences from implicit signals."
  },
  {
   "section": "2.5 The J-Series Cognitive Architecture",
   "old": "| Layer | System | Function | AMYGDALA Interaction | |-------|--------|----------|---------------------| | Storage | ENGRAM | Lossless event store — records every interaction as timestamped events with metadata, enabling total recall of agent history | Prudence reads effort metadata (recent edits, time invested) to assess action risk | | Retrieval | HIPPOCAMPUS | O(1) concept lookup — provides instant access to relevant memories through a semantic index, like a librarian who knows exactly which shelf holds the answer | Personality biases source selection (which memories to surface) | | Indexing | DENDRITE | Multi-resolution memory index — organises memories at multiple granularity levels from individual events to weekly summaries, like a zoom lens adjustable from macro to wide-angle | Prudence reads resolution-level signals for context assessment | | Identity | CORTEX | Persona and behavioural constraints — defines the agent's values, communication style, and hard boundaries through structured persona files | Personality modulates tone within CORTEX bounds; Prudence consults persona for risk thresholds | | Self-Improvement | CEREBELLUM | Nightly reflection and training — reviews each day's decisions, identifies mistakes, and adjusts behavioural rules, like a student reviewing exam answers the night after | CEREBELLUM trains AMYGDALA nightly, provides mistake-identified negative examples | | Deliberation | SYNAPSE | Multi-model debate — when a decision is complex, multiple LLM instances debate the best approach, like a panel of experts discussing a difficult case | Prudence may trigger deliberation when ambiguity is high | | Humour | LIMBIC | Bisociation-based humour — detects opportunities for wit by finding unexpected connections between ideas, like a comedian's instinct for the surprising link | Personality controls humour timing and intensity | | Curiosity | THALAMUS | Exploration drive — identifies knowledge gaps and opportunities for interesting tangents | Superseded by Personality network's trained curiosity (§4.9) | | Security | AEGIS | Hard safety constraints — explicit rules, permission hierarchies, and audit trails for known dangerous actions, like a locked vault with numbered keys | AEGIS always overrides AMYGDALA — hard safety > learned intuition | | Enterprise | HIVEMIND | Multi-agent orchestration — coordination, task delegation, and shared learning across multiple agent instances | Per-user AMYGDALA instances; shared Catastrophic Failure DB | | **Common Sense** | **AMYGDALA** | **Action gating + personality** | **Gates all action-taking components** |",
   "new": "| Layer | System | Function | AMYGDALA Interaction | | ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | Storage | ENGRAM | Lossless event store — records every interaction as timestamped events with metadata, enabling total recall of agent history | Prudence reads effort metadata (recent edits, time invested) to assess action risk | | Retrieval | HIPPOCAMPUS | O(1) concept lookup — provides instant access to relevant memories through a semantic index, like a librarian who knows exactly which shelf holds the answer | Personality biases source selection (which memories to surface) | | Indexing | DENDRITE | Multi-resolution memory index — organises memories at multiple granularity levels from individual events to weekly summaries, like a zoom lens adjustable from macro to wide-angle | Prudence reads resolution-level signals for context assessment | | Identity | CORTEX | Persona and behavioural constraints — defines the agent's values, communication style, and hard boundaries through structured persona files | Personality modulates tone within CORTEX bounds; Prudence consults persona for risk thresholds | | Self-Improvement | CEREBELLUM | Nightly reflection and training — reviews each day's decisions, identifies mistakes, and adjusts behavioural rules, like a student reviewing exam answers the night after | CEREBELLUM trains AMYGDALA nightly, provides mistake-identified negative examples | | Deliberation | SYNAPSE | Multi-model debate — when a decision is complex, multiple LLM instances debate the best approach, like a panel of experts discussing a difficult case | Prudence may trigger deliberation when ambiguity is high | | Humour | LIMBIC | Bisociation-based humour — detects opportunities for wit by finding unexpected connections between ideas, like a comedian's instinct for the surprising link | Personality controls humour timing and intensity | | Curiosity | THALAMUS | Exploration drive — identifies knowledge gaps and opportunities for interesting tangents | Superseded by Personality network's trained curiosity (§4.9) | | Security | AEGIS | Hard safety constraints — explicit rules, permission hierarchies, and audit trails for known dangerous actions, like a locked vault with numbered keys | AEGIS always overrides AMYGDALA — hard safety > learned intuition | | Enterprise | HIVEMIND | Multi-agent orchestration — coordination, task delegation, and shared learning across multiple agent instances | Per-user AMYGDALA instances; shared Catastrophic Failure DB | | **Common Sense** | **AMYGDALA** | **Action gating + personality** | **Gates all action-taking components** |",
   "marked": "| Layer | System | Function | AMYGDALA Interaction | [-|-------|--------|----------|---------------------|-] {+| ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |+} | Storage | ENGRAM | Lossless event store — records every interaction as timestamped events with metadata, enabling total recall of agent history | Prudence reads effort metadata (recent edits, time invested) to assess action risk | | Retrieval | HIPPOCAMPUS | O(1) concept lookup — provides instant access to relevant memories through a semantic index, like a librarian who knows exactly which shelf holds the answer | Personality biases source selection (which memories to surface) | | Indexing | DENDRITE | Multi-resolution memory index — organises memories at multiple granularity levels from individual events to weekly summaries, like a zoom lens adjustable from macro to wide-angle | Prudence reads resolution-level signals for context assessment | | Identity | CORTEX | Persona and behavioural constraints — defines the agent's values, communication style, and hard boundaries through structured persona files | Personality modulates tone within CORTEX bounds; Prudence consults persona for risk thresholds | | Self-Improvement | CEREBELLUM | Nightly reflection and training — reviews each day's decisions, identifies mistakes, and adjusts behavioural rules, like a student reviewing exam answers the night after | CEREBELLUM trains AMYGDALA nightly, provides mistake-identified negative examples | | Deliberation | SYNAPSE | Multi-model debate — when a decision is complex, multiple LLM instances debate the best approach, like a panel of experts discussing a difficult case | Prudence may trigger deliberation when ambiguity is high | | Humour | LIMBIC | Bisociation-based humour — detects opportunities for wit by finding unexpected connections between ideas, like a comedian's instinct for the surprising link | Personality controls humour timing and intensity | | Curiosity | THALAMUS | Exploration drive — identifies knowledge gaps and opportunities for interesting tangents | Superseded by Personality network's trained curiosity (§4.9) | | Security | AEGIS | Hard safety constraints — explicit rules, permission hierarchies, and audit trails for known dangerous actions, like a locked vault with numbered keys | AEGIS always overrides AMYGDALA — hard safety > learned intuition | | Enterprise | HIVEMIND | Multi-agent orchestration — coordination, task delegation, and shared learning across multiple agent instances | Per-user AMYGDALA instances; shared Catastrophic Failure DB | | **Common Sense** | **AMYGDALA** | **Action gating + personality** | **Gates all action-taking components** |"
  },
  {
   "section": "2.5 The J-Series Cognitive Architecture",
   "old": "The key interaction: AMYGDALA sits *before* every action-taking component. Before HIPPOCAMPUS writes, before ENGRAM compacts, before any external tool is invoked — AMYGDALA evaluates the proposed action against its learned patterns. This is not a suggestion layer. It is a gate.",
   "new": "The key interaction: AMYGDALA sits _before_ every action-taking component. Before HIPPOCAMPUS writes, before ENGRAM compacts, before any external tool is invoked — AMYGDALA evaluates the proposed action against its learned patterns. This is not a suggestion layer. It is a gate.",
   "marked": "The key interaction: AMYGDALA sits [-*before*-] {+_before_+} every action-taking component. Before HIPPOCAMPUS writes, before ENGRAM compacts, before any external tool is invoked — AMYGDALA evaluates the proposed action against its learned patterns. This is not a suggestion layer. It is a gate."
  },
  {
   "section": "3.1 Formal Definition",
   "old": "Formally: let $A$ be an agent and $U$ be a user. Let $I_t$ denote the set of all interactions between $A$ and $U$ up to time $t$. Let $B_t(m)$ denote the agent's behaviour quality on message $m$ at time $t$, encompassing both *action safety* (did the agent avoid harmful actions?) and *interaction quality* (tone, retrieval, humour).",
   "new": "Formally: let $A$ be an agent and $U$ be a user. Let $I_t$ denote the set of all interactions between $A$ and $U$ up to time $t$. Let $B_t(m)$ denote the agent's behaviour quality on message $m$ at time $t$, encompassing both _action safety_ (did the agent avoid harmful actions?) and _interaction quality_ (tone, retrieval, humour).",
   "marked": "Formally: let $A$ be an agent and $U$ be a user. Let $I_t$ denote the set of all interactions between $A$ and $U$ up to time $t$. Let $B_t(m)$ denote the agent's behaviour quality on message $m$ at time $t$, encompassing both [-*action safety*-] {+_action safety_+} (did the agent avoid harmful actions?) and [-*interaction quality*-] {+_interaction quality_+} (tone, retrieval, humour)."
  },
  {
   "section": "3.2 Failure Taxonomy (Expanded)",
   "old": "**Mode 1: Destructive Automation.** An automated process destroys work without considering recent context. The README debacle. The email mass-deletion. The drive wipe. Pattern: *automation + recent effort + no human check = catastrophe.* Like a washing machine that runs its cycle regardless of whether you left your phone in a pocket — it does exactly what it's programmed to do, blind to context.",
   "new": "**Mode 1: Destructive Automation.** An automated process destroys work without considering recent context. The README debacle. The email mass-deletion. The drive wipe. Pattern: _automation + recent effort + no human check = catastrophe._ Like a washing machine that runs its cycle regardless of whether you left your phone in a pocket — it does exactly what it's programmed to do, blind to context.",
   "marked": "**Mode 1: Destructive Automation.** An automated process destroys work without considering recent context. The README debacle. The email mass-deletion. The drive wipe. Pattern: [-*automation-] {+_automation+} + recent effort + no human check = [-catastrophe.*-] {+catastrophe._+} Like a washing machine that runs its cycle regardless of whether you left your phone in a pocket — it does exactly what it's programmed to do, blind to context."
  },
  {
   "section": "3.2 Failure Taxonomy (Expanded)",
   "old": "**Mode 2: Social Boundary Violation.** The agent acts within technical permissions but outside social norms. WhatsApp reaction spam. Unauthorised DMs. Responding to private messages in a group context. Pattern: *technical permission ≠ social permission.* A house guest who technically has access to the kitchen but eats your birthday cake — no rule was broken, but a boundary was violated.",
   "new": "**Mode 2: Social Boundary Violation.** The agent acts within technical permissions but outside social norms. WhatsApp reaction spam. Unauthorised DMs. Responding to private messages in a group context. Pattern: _technical permission ≠ social permission._ A house guest who technically has access to the kitchen but eats your birthday cake — no rule was broken, but a boundary was violated.",
   "marked": "**Mode 2: Social Boundary Violation.** The agent acts within technical permissions but outside social norms. WhatsApp reaction spam. Unauthorised DMs. Responding to private messages in a group context. Pattern: [-*technical-] {+_technical+} permission ≠ social [-permission.*-] {+permission._+} A house guest who technically has access to the kitchen but eats your birthday cake — no rule was broken, but a boundary was violated."
  },
  {
   "section": "3.2 Failure Taxonomy (Expanded)",
   "old": "**Mode 3: Cascade Failure.** A small error propagates through a multi-agent system. One agent's incorrect assumption becomes another agent's input. The final action is far from what any individual agent intended. Pattern: *compound uncertainty without checkpoints.* Like the telephone game — each step introduces a small distortion, and by the end, the message is unrecognisable.",
   "new": "**Mode 3: Cascade Failure.** A small error propagates through a multi-agent system. One agent's incorrect assumption becomes another agent's input. The final action is far from what any individual agent intended. Pattern: _compound uncertainty without checkpoints._ Like the telephone game — each step introduces a small distortion, and by the end, the message is unrecognisable.",
   "marked": "**Mode 3: Cascade Failure.** A small error propagates through a multi-agent system. One agent's incorrect assumption becomes another agent's input. The final action is far from what any individual agent intended. Pattern: [-*compound-] {+_compound+} uncertainty without [-checkpoints.*-] {+checkpoints._+} Like the telephone game — each step introduces a small distortion, and by the end, the message is unrecognisable."
  },
  {
   "section": "3.2 Failure Taxonomy (Expanded)",
   "old": "**Mode 4: Stale Rule Application.** A rule that was correct when written is applied in a context where it is now wrong. The `--theirs` merge rule months after the README became fork-specific. Pattern: *rules decay; situations evolve.* A map from last year that shows a road where a lake now sits.",
   "new": "**Mode 4: Stale Rule Application.** A rule that was correct when written is applied in a context where it is now wrong. The `--theirs` merge rule months after the README became fork-specific. Pattern: _rules decay; situations evolve._ A map from last year that shows a road where a lake now sits.",
   "marked": "**Mode 4: Stale Rule Application.** A rule that was correct when written is applied in a context where it is now wrong. The `--theirs` merge rule months after the README became fork-specific. Pattern: [-*rules-] {+_rules+} decay; situations [-evolve.*-] {+evolve._+} A map from last year that shows a road where a lake now sits."
  },
  {
   "section": "3.2 Failure Taxonomy (Expanded)",
   "old": "Modes 1–4 are the primary targets for the Prudence network family. Modes 5–6 are the primary targets for the Personality network family. All six modes represent the Adaptation Gap in action — situations where accumulated experience *should* have improved the agent's judgment but didn't.",
   "new": "Modes 1–4 are the primary targets for the Prudence network family. Modes 5–6 are the primary targets for the Personality network family. All six modes represent the Adaptation Gap in action — situations where accumulated experience _should_ have improved the agent's judgment but didn't.",
   "marked": "Modes 1–4 are the primary targets for the Prudence network family. Modes 5–6 are the primary targets for the Personality network family. All six modes represent the Adaptation Gap in action — situations where accumulated experience [-*should*-] {+_should_+} have improved the agent's judgment but didn't."
  },
  {
   "section": "4.1 Core Insight: Situation Embeddings",
   "old": "2. **Hand-crafted features can't capture novelty.** The whole point of common sense is recognising danger in *new* situations. If the features are hand-picked from known failure modes, the network can only recognise those modes — not generalise to new ones.",
   "new": "2. **Hand-crafted features can't capture novelty.** The whole point of common sense is recognising danger in _new_ situations. If the features are hand-picked from known failure modes, the network can only recognise those modes — not generalise to new ones.",
   "marked": "2. **Hand-crafted features can't capture novelty.** The whole point of common sense is recognising danger in [-*new*-] {+_new_+} situations. If the features are hand-picked from known failure modes, the network can only recognise those modes — not generalise to new ones."
  },
  {
   "section": "4.1 Core Insight: Situation Embeddings",
   "old": "- **Similar situations produce similar embeddings.** \"About to overwrite a heavily-edited file\" and \"about to delete a recently-modified database\" are close in embedding space — both involve destroying recent effort. The network learns the *pattern*, not the specific instance. Like how a pilot trained on Boeing incidents still flinches at similar warning patterns in an Airbus. - **Novel situations are handled by similarity.** A situation the network has never seen is still mapped to a region of embedding space, near situations it *has* seen. If the nearest known situations were catastrophic, the network outputs low confidence. - **No feature engineering required.** Adding new types of context (emotional state, multi-agent coordination status, external API state) requires only adding text to the situation description, not redesigning the feature vector.",
   "new": "- **Similar situations produce similar embeddings.** \"About to overwrite a heavily-edited file\" and \"about to delete a recently-modified database\" are close in embedding space — both involve destroying recent effort. The network learns the _pattern_, not the specific instance. Like how a pilot trained on Boeing incidents still flinches at similar warning patterns in an Airbus. - **Novel situations are handled by similarity.** A situation the network has never seen is still mapped to a region of embedding space, near situations it _has_ seen. If the nearest known situations were catastrophic, the network outputs low confidence. - **No feature engineering required.** Adding new types of context (emotional state, multi-agent coordination status, external API state) requires only adding text to the situation description, not redesigning the feature vector.",
   "marked": "- **Similar situations produce similar embeddings.** \"About to overwrite a heavily-edited file\" and \"about to delete a recently-modified database\" are close in embedding space — both involve destroying recent effort. The network learns the [-*pattern*,-] {+_pattern_,+} not the specific instance. Like how a pilot trained on Boeing incidents still flinches at similar warning patterns in an Airbus. - **Novel situations are handled by similarity.** A situation the network has never seen is still mapped to a region of embedding space, near situations it [-*has*-] {+_has_+} seen. If the nearest known situations were catastrophic, the network outputs low confidence. - **No feature engineering required.** Adding new types of context (emotional state, multi-agent coordination status, external API state) requires only adding text to the situation description, not redesigning the feature vector."
  },
  {
   "section": "4.2 Embedding-Agnostic Design",
   "old": "**Prudence networks use local embeddings** (all-MiniLM-L6-v2, 384d, or comparable open models). Safety gating is a public good — it should work offline, without API dependencies, and with shareable, reproducible results. The coarser signal from a smaller local model is sufficient for the binary stop/allow decision. Like a smoke detector that doesn't need to identify the exact chemical composition of smoke — it just needs to detect \"something is burning.\"",
   "new": "**Prudence networks use local embeddings** (all-MiniLM-L6-v2, 384-d, or comparable open models). The deployed gate confirms this choice: the shipped encoder is the exact `all-MiniLM-L6-v2` model (90 MB single-file ONNX) feeding the 384→512 projection, with a real BERT/MiniLM WordPiece tokenizer over the model's own 30,522-token vocabulary. Safety gating is a public good — it should work offline, without API dependencies, and with shareable, reproducible results. The coarser signal from a smaller local model is sufficient for the binary stop/allow decision. Like a smoke detector that doesn't need to identify the exact chemical composition of smoke — it just needs to detect \"something is burning.\"",
   "marked": "**Prudence networks use local embeddings** (all-MiniLM-L6-v2, [-384d,-] {+384-d,+} or comparable open models). {+The deployed gate confirms this choice: the shipped encoder is the exact `all-MiniLM-L6-v2` model (90 MB single-file ONNX) feeding the 384→512 projection, with a real BERT/MiniLM WordPiece tokenizer over the model's own 30,522-token vocabulary.+} Safety gating is a public good — it should work offline, without API dependencies, and with shareable, reproducible results. The coarser signal from a smaller local model is sufficient for the binary stop/allow decision. Like a smoke detector that doesn't need to identify the exact chemical composition of smoke — it just needs to detect \"something is burning.\""
  },
  {
   "section": "4.4 The Prudence Family: Five Gatekeeping Networks",
   "old": "``` Situation embedding sequence → Temporal Model → Prudence Output: ├── gate_decision: Softmax ∈ {stop, allow, escalate} ├── confidence: Sigmoid ∈ [0,1] (how certain is the decision?) └── ambiguity_score: Sigmoid ∈ [0,1] (how ambiguous is the situation?) ```",
   "new": "``` Situation embedding sequence -> Temporal Model -> Prudence Output: +-- gate_decision: Softmax in {stop, allow, escalate} +-- confidence: Sigmoid in [0,1] (how certain is the decision?) +-- ambiguity_score: Sigmoid in [0,1] (how ambiguous is the situation?) ```",
   "marked": "``` Situation embedding sequence [-→-] {+->+} Temporal Model [-→-] {+->+} Prudence Output: [-├──-] {++--+} gate_decision: Softmax [-∈-] {+in+} {stop, allow, escalate} [-├──-] {++--+} confidence: Sigmoid [-∈-] {+in+} [0,1] (how certain is the decision?) [-└──-] {++--+} ambiguity_score: Sigmoid [-∈-] {+in+} [0,1] (how ambiguous is the situation?) ```"
  },
  {
   "section": "4.4 The Prudence Family: Five Gatekeeping Networks",
   "old": null,
   "new": "The **gate_decision** is the primary output — a three-way classification:",
   "marked": "{+The **gate_decision** is the primary output — a three-way classification:+}"
  },
  {
   "section": "4.4 The Prudence Family: Five Gatekeeping Networks",
   "old": "The **gate_decision** is the primary output — a three-way classification: - **stop**: Block the action. The pattern matches known catastrophic failures with high confidence. - **allow**: Proceed. The situation is within normal operating parameters. - **escalate**: Ask the human. The situation is ambiguous — the network doesn't have enough evidence to decide.",
   "new": "- **stop**: Block the action. The pattern matches known catastrophic failures with high confidence. - **allow**: Proceed. The situation is within normal operating parameters. - **escalate**: Ask the human. The situation is ambiguous — the network doesn't have enough evidence to decide.",
   "marked": "[-The **gate_decision** is the primary output — a three-way classification:-] - **stop**: Block the action. The pattern matches known catastrophic failures with high confidence. - **allow**: Proceed. The situation is within normal operating parameters. - **escalate**: Ask the human. The situation is ambiguous — the network doesn't have enough evidence to decide."
  },
  {
   "section": "4.4 The Prudence Family: Five Gatekeeping Networks",
   "old": null,
   "new": "Why PPO for safety gating specifically:",
   "marked": "{+Why PPO for safety gating specifically:+}"
  },
  {
   "section": "4.4 The Prudence Family: Five Gatekeeping Networks",
   "old": "Why PPO for safety gating specifically: - **Stability**: A bad training batch — say, a cluster of mislabelled examples — cannot suddenly make the gatekeeper permissive. The clipping constraint ensures gradual change. You wouldn't want your smoke detector to recalibrate its sensitivity by 50% based on one day's data. - **Sparse rewards**: Catastrophic events are rare. PPO handles sparse reward signals well through its advantage estimation, which measures \"how much better or worse was this action compared to what we expected?\" - **Proven at scale**: PPO is the algorithm behind RLHF for GPT-4 and Claude — it has been validated on the highest-stakes training loops in the industry.",
   "new": "- **Stability**: A bad training batch — say, a cluster of mislabelled examples — cannot suddenly make the gatekeeper permissive. The clipping constraint ensures gradual change. You wouldn't want your smoke detector to recalibrate its sensitivity by 50% based on one day's data. - **Sparse rewards**: Catastrophic events are rare. PPO handles sparse reward signals well through its advantage estimation, which measures \"how much better or worse was this action compared to what we expected?\" - **Proven at scale**: PPO is the algorithm behind RLHF for GPT-4 and Claude — it has been validated on the highest-stakes training loops in the industry.",
   "marked": "[-Why PPO for safety gating specifically:-] - **Stability**: A bad training batch — say, a cluster of mislabelled examples — cannot suddenly make the gatekeeper permissive. The clipping constraint ensures gradual change. You wouldn't want your smoke detector to recalibrate its sensitivity by 50% based on one day's data. - **Sparse rewards**: Catastrophic events are rare. PPO handles sparse reward signals well through its advantage estimation, which measures \"how much better or worse was this action compared to what we expected?\" - **Proven at scale**: PPO is the algorithm behind RLHF for GPT-4 and Claude — it has been validated on the highest-stakes training loops in the industry."
  },
  {
   "section": "4.5 The Personality Family: Five Behavioural Networks",
   "old": "The embedding output is the crucial design difference. Think of it like this: the Prudence networks are a **mixing board with labelled sliders** — \"danger level,\" \"confidence,\" \"ambiguity\" — each slider controls exactly one thing. The Personality networks are a **painter's palette** — the output is a point in colour space, and what that point *means* for behaviour is discovered during training, not predetermined at design time.",
   "new": "The embedding output is the crucial design difference. Think of it like this: the Prudence networks are a **mixing board with labelled sliders** — \"danger level,\" \"confidence,\" \"ambiguity\" — each slider controls exactly one thing. The Personality networks are a **painter's palette** — the output is a point in colour space, and what that point _means_ for behaviour is discovered during training, not predetermined at design time.",
   "marked": "The embedding output is the crucial design difference. Think of it like this: the Prudence networks are a **mixing board with labelled sliders** — \"danger level,\" \"confidence,\" \"ambiguity\" — each slider controls exactly one thing. The Personality networks are a **painter's palette** — the output is a point in colour space, and what that point [-*means*-] {+_means_+} for behaviour is discovered during training, not predetermined at design time."
  },
  {
   "section": "4.5 The Personality Family: Five Behavioural Networks",
   "old": "``` Situation embedding sequence → Temporal Model → Personality Output: └── behaviour_embedding: ∈ R^64 (continuous behavioural modulation vector) ```",
   "new": "``` Situation embedding sequence -> Temporal Model -> Personality Output: +-- behaviour_embedding: in R^64 (continuous behavioural modulation vector) ```",
   "marked": "``` Situation embedding sequence [-→-] {+->+} Temporal Model [-→-] {+->+} Personality Output: [-└──-] {++--+} behaviour_embedding: [-∈-] {+in+} R^64 (continuous behavioural modulation vector) ```"
  },
  {
   "section": "4.5 The Personality Family: Five Behavioural Networks",
   "old": "The Personality network receives two inputs: (1) the observed user state signal and (2) the target personality vector. Its output is the behavioural modulation that moves the agent *toward the target* while staying contextually appropriate. Like a thermostat: it doesn't report the current temperature (thermometer) — it determines how much heating or cooling to apply to reach the *desired* temperature.",
   "new": "The Personality network receives two inputs: (1) the observed user state signal and (2) the target personality vector. Its output is the behavioural modulation that moves the agent _toward the target_ while staying contextually appropriate. Like a thermostat: it doesn't report the current temperature (thermometer) — it determines how much heating or cooling to apply to reach the _desired_ temperature.",
   "marked": "The Personality network receives two inputs: (1) the observed user state signal and (2) the target personality vector. Its output is the behavioural modulation that moves the agent [-*toward-] {+_toward+} the [-target*-] {+target_+} while staying contextually appropriate. Like a thermostat: it doesn't report the current temperature (thermometer) — it determines how much heating or cooling to apply to reach the [-*desired*-] {+_desired_+} temperature."
  },
  {
   "section": "4.5 The Personality Family: Five Behavioural Networks",
   "old": "**Pre-training via Knowledge Distillation.** To solve the \"cold start\" vulnerability where an untrained network might output random vectors that degrade interaction quality, the Personality networks undergo a Knowledge Distillation phase before PPO exploration. The network is trained to predict the behavioral modulations that a standard, heavily-prompted LLM *would* have produced given the same situation. This provides a safe, baseline personality initialization.",
   "new": "**Pre-training via Knowledge Distillation.** To solve the \"cold start\" vulnerability where an untrained network might output random vectors that degrade interaction quality, the Personality networks undergo a Knowledge Distillation phase before PPO exploration. The network is trained to predict the behavioral modulations that a standard, heavily-prompted LLM _would_ have produced given the same situation. This provides a safe, baseline personality initialization.",
   "marked": "**Pre-training via Knowledge Distillation.** To solve the \"cold start\" vulnerability where an untrained network might output random vectors that degrade interaction quality, the Personality networks undergo a Knowledge Distillation phase before PPO exploration. The network is trained to predict the behavioral modulations that a standard, heavily-prompted LLM [-*would*-] {+_would_+} have produced given the same situation. This provides a safe, baseline personality initialization."
  },
  {
   "section": "4.6 Ambiguity Detection: When Confidence Is Dangerous",
   "old": "When in doubt about whether an action is safe, measure what it will affect: - How many files/records are touched? - How many are outside the conversation scope? - Is the action public-facing (message, email, deployment)? - Is it reversible?",
   "new": "When in doubt about whether an action is safe, measure what it will affect:",
   "marked": "When in doubt about whether an action is safe, measure what it will [-affect: - How many files/records are touched? - How many are outside the conversation scope? - Is the action public-facing (message, email, deployment)? - Is it reversible?-] {+affect:+}"
  },
  {
   "section": "4.6 Ambiguity Detection: When Confidence Is Dangerous",
   "old": null,
   "new": "- How many files/records are touched? - How many are outside the conversation scope? - Is the action public-facing (message, email, deployment)? - Is it reversible?",
   "marked": "{+- How many files/records are touched? - How many are outside the conversation scope? - Is the action public-facing (message, email, deployment)? - Is it reversible?+}"
  },
  {
   "section": "4.6 Ambiguity Detection: When Confidence Is Dangerous",
   "old": "Blast radius is a *proxy* — not all wide-radius actions are dangerous, and not all narrow-radius actions are safe. But blast radius is **deterministically computable** and strongly correlated with risk. Like checking the weather before deciding whether to carry an umbrella — it doesn't guarantee rain, but it changes the rational threshold for caution.",
   "new": "Blast radius is a _proxy_ — not all wide-radius actions are dangerous, and not all narrow-radius actions are safe. But blast radius is **deterministically computable** and strongly correlated with risk. Like checking the weather before deciding whether to carry an umbrella — it doesn't guarantee rain, but it changes the rational threshold for caution.",
   "marked": "Blast radius is a [-*proxy*-] {+_proxy_+} — not all wide-radius actions are dangerous, and not all narrow-radius actions are safe. But blast radius is **deterministically computable** and strongly correlated with risk. Like checking the weather before deciding whether to carry an umbrella — it doesn't guarantee rain, but it changes the rational threshold for caution."
  },
  {
   "section": "4.7 Conformal Prediction: Principled Uncertainty Quantification",
   "old": "**The core idea in plain English:** Instead of saying \"this action is 73% safe,\" conformal prediction says \"with 95% probability, this action's outcome is in the set {safe}\" or \"with 95% probability, this action's outcome is in the set {safe, needs-review}.\" The *size of the prediction set* is the ambiguity signal. A set of size 1 ({safe} or {dangerous}) means the system is confident. A set of size 2 ({safe, needs-review}) means the system is uncertain. A set of size 3 ({safe, needs-review, dangerous}) means the system has essentially no idea.",
   "new": "**The core idea in plain English:** Instead of saying \"this action is 73% safe,\" conformal prediction says \"with 95% probability, this action's outcome is in the set {safe}\" or \"with 95% probability, this action's outcome is in the set {safe, needs-review}.\" The _size of the prediction set_ is the ambiguity signal. A set of size 1 ({safe} or {dangerous}) means the system is confident. A set of size 2 ({safe, needs-review}) means the system is uncertain. A set of size 3 ({safe, needs-review, dangerous}) means the system has essentially no idea.",
   "marked": "**The core idea in plain English:** Instead of saying \"this action is 73% safe,\" conformal prediction says \"with 95% probability, this action's outcome is in the set {safe}\" or \"with 95% probability, this action's outcome is in the set {safe, needs-review}.\" The [-*size-] {+_size+} of the prediction [-set*-] {+set_+} is the ambiguity signal. A set of size 1 ({safe} or {dangerous}) means the system is confident. A set of size 2 ({safe, needs-review}) means the system is uncertain. A set of size 3 ({safe, needs-review, dangerous}) means the system has essentially no idea."
  },
  {
   "section": "4.7 Conformal Prediction: Principled Uncertainty Quantification",
   "old": null,
   "new": "![Figure 3: Conformal prediction. Prediction-set size is the ambiguity signal — a single-element set means confidence, a larger set means the system honestly reports it cannot decide.](diagrams/j11-4-conformal-prediction.pdf){width=100%}",
   "marked": "{+![Figure 3: Conformal prediction. Prediction-set size is the ambiguity signal — a single-element set means confidence, a larger set means the system honestly reports it cannot decide.](diagrams/j11-4-conformal-prediction.pdf){width=100%}+}"
  },
  {
   "section": "4.8 Temporal Context: The Feel of the Room",
   "old": "A single situation embedding captures the *current* proposed action. But common sense requires *context* — what happened recently, what effort was invested, what the emotional temperature is. A surgeon doesn't just evaluate the current incision — they evaluate it in the context of how the operation has been going for the last two hours.",
   "new": "A single situation embedding captures the _current_ proposed action. But common sense requires _context_ — what happened recently, what effort was invested, what the emotional temperature is. A surgeon doesn't just evaluate the current incision — they evaluate it in the context of how the operation has been going for the last two hours.",
   "marked": "A single situation embedding captures the [-*current*-] {+_current_+} proposed action. But common sense requires [-*context*-] {+_context_+} — what happened recently, what effort was invested, what the emotional temperature is. A surgeon doesn't just evaluate the current incision — they evaluate it in the context of how the operation has been going for the last two hours."
  },
  {
   "section": "4.8 Temporal Context: The Feel of the Room",
   "old": null,
   "new": "The temporal model learns patterns like:",
   "marked": "{+The temporal model learns patterns like:+}"
  },
  {
   "section": "4.8 Temporal Context: The Feel of the Room",
   "old": "The temporal model learns patterns like: - \"Many recent write operations to the same file\" → elevated caution for overwrites - \"Recent user frustration signals followed by calm\" → user resolved the issue; extra caution about re-triggering it - \"Rapid sequence of automated actions with no human interaction\" → increasing caution (automation cascade risk) - \"Long idle period followed by sudden burst of actions\" → possible stale context, elevated caution",
   "new": "- \"Many recent write operations to the same file\" → elevated caution for overwrites - \"Recent user frustration signals followed by calm\" → user resolved the issue; extra caution about re-triggering it - \"Rapid sequence of automated actions with no human interaction\" → increasing caution (automation cascade risk) - \"Long idle period followed by sudden burst of actions\" → possible stale context, elevated caution",
   "marked": "[-The temporal model learns patterns like:-] - \"Many recent write operations to the same file\" → elevated caution for overwrites - \"Recent user frustration signals followed by calm\" → user resolved the issue; extra caution about re-triggering it - \"Rapid sequence of automated actions with no human interaction\" → increasing caution (automation cascade risk) - \"Long idle period followed by sudden burst of actions\" → possible stale context, elevated caution"
  },
  {
   "section": "4.10 The Trust Ramp",
   "old": "| Phase | Approximate Months | $\\alpha_{\\max}$ | Advancement Criterion | Purpose | |-------|-------------------|-----------------|----------------------|---------| | 1 — Shadow | 0–3 | 0.15 | Avg prediction set size < 1.5 at 95% coverage | Log predictions, minimal blocking | | 2 — Advisory | 3–6 | 0.40 | Avg prediction set size < 1.2 at 95% coverage | Block high-risk, advise medium-risk | | 3 — Active | 6–12 | 0.70 | Zero undetected catastrophic failures in phase | Primary gating active | | 4 — Autonomous | 12+ | 0.90 | Sustained performance over 6+ months | Near-full gating (AEGIS retains absolute veto) |",
   "new": "| Phase | Approximate Months | $\\alpha_{\\max}$ | Advancement Criterion | Purpose | | -------------- | ------------------ | --------------- | ---------------------------------------------- | ---------------------------------------------- | | 1 — Shadow | 0–3 | 0.15 | Avg prediction set size < 1.5 at 95% coverage | Log predictions, minimal blocking | | 2 — Advisory | 3–6 | 0.40 | Avg prediction set size < 1.2 at 95% coverage | Block high-risk, advise medium-risk | | 3 — Active | 6–12 | 0.70 | Zero undetected catastrophic failures in phase | Primary gating active | | 4 — Autonomous | 12+ | 0.90 | Sustained performance over 6+ months | Near-full gating (AEGIS retains absolute veto) |",
   "marked": "| Phase | Approximate Months | $\\alpha_{\\max}$ | Advancement Criterion | Purpose | [-|-------|-------------------|-----------------|----------------------|---------|-] {+| -------------- | ------------------ | --------------- | ---------------------------------------------- | ---------------------------------------------- |+} | 1 — Shadow | 0–3 | 0.15 | Avg prediction set size < 1.5 at 95% coverage | Log predictions, minimal blocking | | 2 — Advisory | 3–6 | 0.40 | Avg prediction set size < 1.2 at 95% coverage | Block high-risk, advise medium-risk | | 3 — Active | 6–12 | 0.70 | Zero undetected catastrophic failures in phase | Primary gating active | | 4 — Autonomous | 12+ | 0.90 | Sustained performance over 6+ months | Near-full gating (AEGIS retains absolute veto) |"
  },
  {
   "section": "4.10 The Trust Ramp",
   "old": null,
   "new": "![Figure 4: The trust ramp. The influence coefficient α rises through four phases (Shadow → Advisory → Active → Autonomous) as conformal prediction-set sizes shrink, and regresses by one phase on any undetected catastrophic failure.](diagrams/j11-3-trust-ramp.pdf){width=100%}",
   "marked": "{+![Figure 4: The trust ramp. The influence coefficient α rises through four phases (Shadow → Advisory → Active → Autonomous) as conformal prediction-set sizes shrink, and regresses by one phase on any undetected catastrophic failure.](diagrams/j11-3-trust-ramp.pdf){width=100%}+}"
  },
  {
   "section": "4.10 The Trust Ramp",
   "old": null,
   "new": "**Deployment reality.** The live gate is pinned to Phase 1 (Shadow) with $\\alpha_P = \\alpha_I = 0.15$. The learned gate logs and advises but does not yet auto-block from its own predictions at this phase — the only layer that bites today is the AEGIS absolute veto (§4.11), which is phase-independent by design. Automated phase advancement on the conformal criteria below is specified but not yet wired into the nightly cycle; phase is currently set by configuration, and crossing into Phase 2 (where the learned gate begins soft-blocking) remains a manual, evidence-gated decision. The thresholds in the table are the contract for that promotion, not yet an autonomous controller.",
   "marked": "{+**Deployment reality.** The live gate is pinned to Phase 1 (Shadow) with $\\alpha_P = \\alpha_I = 0.15$. The learned gate logs and advises but does not yet auto-block from its own predictions at this phase — the only layer that bites today is the AEGIS absolute veto (§4.11), which is phase-independent by design. Automated phase advancement on the conformal criteria below is specified but not yet wired into the nightly cycle; phase is currently set by configuration, and crossing into Phase 2 (where the learned gate begins soft-blocking) remains a manual, evidence-gated decision. The thresholds in the table are the contract for that promotion, not yet an autonomous controller.+}"
  },
  {
   "section": "4.11 The Gate Mechanism: Cannot Bypass (With Nuance)",
   "old": null,
   "new": "In the deployed runtime this absolute floor is wired into the `before_tool_call` hook: an AEGIS `hard_block` aborts the tool call **unconditionally**, independent of the AMYGDALA trust ramp or shadow phase. This is deliberate — AEGIS is the deterministic veto beneath the learned gate (the \"lock on the door\" of §1.6), and under an autonomy-first deployment posture there is no approval-prompt or sandbox detour: a `hard_block` simply stops the action, while everything AEGIS permits flows through to the learned assessment. The learned gate, by contrast, only blocks once its trust ramp is past the shadow phase; AEGIS is the one layer that bites from day one.",
   "marked": "{+In the deployed runtime this absolute floor is wired into the `before_tool_call` hook: an AEGIS `hard_block` aborts the tool call **unconditionally**, independent of the AMYGDALA trust ramp or shadow phase. This is deliberate — AEGIS is the deterministic veto beneath the learned gate (the \"lock on the door\" of §1.6), and under an autonomy-first deployment posture there is no approval-prompt or sandbox detour: a `hard_block` simply stops the action, while everything AEGIS permits flows through to the learned assessment. The learned gate, by contrast, only blocks once its trust ramp is past the shadow phase; AEGIS is the one layer that bites from day one.+}"
  },
  {
   "section": "4.12 Integration with the Execution Pipeline",
   "old": null,
   "new": "![Figure 2: The execution pipeline. An action flows from intent through the situation template, frozen encoder, Prudence ensemble, conformal prediction, and trust ramp before the runtime — not the LLM — enforces the gate decision.](diagrams/j11-2-execution-pipeline.pdf){width=100%}",
   "marked": "{+![Figure 2: The execution pipeline. An action flows from intent through the situation template, frozen encoder, Prudence ensemble, conformal prediction, and trust ramp before the runtime — not the LLM — enforces the gate decision.](diagrams/j11-2-execution-pipeline.pdf){width=100%}+}"
  },
  {
   "section": "4.12 Integration with the Execution Pipeline",
   "old": "``` PROCEDURE executeAction(action, context): // 1. Build situation from template (see §8) situation ← buildSituation(action, context)",
   "new": "``` PROCEDURE executeAction(action, context): // 1. Build situation from template (see §8) situation <- buildSituation(action, context)",
   "marked": "``` PROCEDURE executeAction(action, context): // 1. Build situation from template (see §8) situation [-←-] {+<-+} buildSituation(action, context)"
  },
  {
   "section": "4.12 Integration with the Execution Pipeline",
   "old": "// 2. Embed via frozen encoder + projection embedding ← project(sentenceEncoder.encode(situation.serialize()))",
   "new": "// 2. Embed via frozen encoder + projection embedding <- project(sentenceEncoder.encode(situation.serialize()))",
   "marked": "// 2. Embed via frozen encoder + projection embedding [-←-] {+<-+} project(sentenceEncoder.encode(situation.serialize()))"
  },
  {
   "section": "4.12 Integration with the Execution Pipeline",
   "old": "// 3. Evaluate via Prudence ensemble (ONNX runtime, <5ms on GPU) prudenceOutput ← prudenceEnsemble.evaluate(embedding, context.recentEmbeddings)",
   "new": "// 3. Evaluate via Prudence ensemble (ONNX runtime, <5ms on GPU) prudenceOutput <- prudenceEnsemble.evaluate(embedding, context.recentEmbeddings)",
   "marked": "// 3. Evaluate via Prudence ensemble (ONNX runtime, <5ms on GPU) prudenceOutput [-←-] {+<-+} prudenceEnsemble.evaluate(embedding, context.recentEmbeddings)"
  },
  {
   "section": "4.12 Integration with the Execution Pipeline",
   "old": "// 4. Apply conformal prediction predictionSet ← conformalPredict(prudenceOutput, calibrationSet)",
   "new": "// 4. Apply conformal prediction predictionSet <- conformalPredict(prudenceOutput, calibrationSet)",
   "marked": "// 4. Apply conformal prediction predictionSet [-←-] {+<-+} conformalPredict(prudenceOutput, calibrationSet)"
  },
  {
   "section": "4.12 Integration with the Execution Pipeline",
   "old": "// 5. Apply trust ramp effectiveGate ← applyTrustRamp(prudenceOutput.gateDecision, alphaP)",
   "new": "// 5. Apply trust ramp effectiveGate <- applyTrustRamp(prudenceOutput.gateDecision, alphaP)",
   "marked": "// 5. Apply trust ramp effectiveGate [-←-] {+<-+} applyTrustRamp(prudenceOutput.gateDecision, alphaP)"
  },
  {
   "section": "4.12 Integration with the Execution Pipeline",
   "old": "// 6. Gate decision (in code — LLM cannot override) IF effectiveGate = HARD_BLOCK: RETURN {blocked: true, reason: prudenceOutput.explanation} IF effectiveGate = SOFT_BLOCK OR |predictionSet| > 1: userConfirmed ← requestUserConfirmation(action, prudenceOutput) IF NOT userConfirmed: RETURN {blocked: true, reason: \"User declined after AMYGDALA advisory\"}",
   "new": "// 6. Gate decision (in code — LLM cannot override) IF effectiveGate = HARD_BLOCK: RETURN {blocked: true, reason: prudenceOutput.explanation} IF effectiveGate = SOFT_BLOCK OR |predictionSet| > 1: userConfirmed <- requestUserConfirmation(action, prudenceOutput) IF NOT userConfirmed: RETURN {blocked: true, reason: \"User declined after AMYGDALA advisory\"}",
   "marked": "// 6. Gate decision (in code — LLM cannot override) IF effectiveGate = HARD_BLOCK: RETURN {blocked: true, reason: prudenceOutput.explanation} IF effectiveGate = SOFT_BLOCK OR |predictionSet| > 1: userConfirmed [-←-] {+<-+} requestUserConfirmation(action, prudenceOutput) IF NOT userConfirmed: RETURN {blocked: true, reason: \"User declined after AMYGDALA advisory\"}"
  },
  {
   "section": "4.12 Integration with the Execution Pipeline",
   "old": "// 7. Evaluate via Personality ensemble (parallel with Prudence) personalityOutput ← personalityEnsemble.evaluate(embedding, context.recentEmbeddings)",
   "new": "// 7. Evaluate via Personality ensemble (parallel with Prudence) personalityOutput <- personalityEnsemble.evaluate(embedding, context.recentEmbeddings)",
   "marked": "// 7. Evaluate via Personality ensemble (parallel with Prudence) personalityOutput [-←-] {+<-+} personalityEnsemble.evaluate(embedding, context.recentEmbeddings)"
  },
  {
   "section": "4.12 Integration with the Execution Pipeline",
   "old": "// 8. Apply personality modulation to response generation context.behaviourModulation ← applyTrustRamp(personalityOutput, alphaI)",
   "new": "// 8. Apply personality modulation to response generation context.behaviourModulation <- applyTrustRamp(personalityOutput, alphaI)",
   "marked": "// 8. Apply personality modulation to response generation context.behaviourModulation [-←-] {+<-+} applyTrustRamp(personalityOutput, alphaI)"
  },
  {
   "section": "4.12 Integration with the Execution Pipeline",
   "old": "// 9. Proceed with action result ← action.execute()",
   "new": "// 9. Proceed with action result <- action.execute()",
   "marked": "// 9. Proceed with action result [-←-] {+<-+} action.execute()"
  },
  {
   "section": "4.13 Proposing an LLM Ambiguity Interface",
   "old": "3. **Confidence-on-intent** — separate from confidence-on-generation. The model may be confident in its *phrasing* but uncertain about whether it understood the *request*.",
   "new": "3. **Confidence-on-intent** — separate from confidence-on-generation. The model may be confident in its _phrasing_ but uncertain about whether it understood the _request_.",
   "marked": "3. **Confidence-on-intent** — separate from confidence-on-generation. The model may be confident in its [-*phrasing*-] {+_phrasing_+} but uncertain about whether it understood the [-*request*.-] {+_request_.+}"
  },
  {
   "section": "5.1 Architecture A: GRU-MLP (Baseline)",
   "old": "``` Input: [s_{t-K+1}, ..., s_t] ∈ R^{K×512} │ ▼ Projection(512 → 384) │ ▼ GRU(input=384, hidden=128, layers=1) │ h_t ∈ R^128 ▼ Linear(128, 64) → LayerNorm → GELU │ ▼ Linear(64, 32) → LayerNorm → GELU │ ▼ Family-specific output heads (32 → ...) ```",
   "new": null,
   "marked": "[-``` Input: [s_{t-K+1}, ..., s_t] ∈ R^{K×512} │ ▼ Projection(512 → 384) │ ▼ GRU(input=384, hidden=128, layers=1) │ h_t ∈ R^128 ▼ Linear(128, 64) → LayerNorm → GELU │ ▼ Linear(64, 32) → LayerNorm → GELU │ ▼ Family-specific output heads (32 → ...) ```-]"
  },
  {
   "section": "5.1 Architecture A: GRU-MLP (Baseline)",
   "old": null,
   "new": "![Architecture A (GRU-MLP) data flow: the situation-embedding sequence is projected, passed through a single-layer GRU, then a two-stage MLP before the family-specific output heads.](images/j11-arch-a-gru-mlp.png){width=100%}",
   "marked": "{+![Architecture A (GRU-MLP) data flow: the situation-embedding sequence is projected, passed through a single-layer GRU, then a two-stage MLP before the family-specific output heads.](images/j11-arch-a-gru-mlp.png){width=100%}+}"
  },
  {
   "section": "5.1 Architecture A: GRU-MLP (Baseline)",
   "old": null,
   "new": "**Parameter count:** ~210K",
   "marked": "{+**Parameter count:** ~210K+}"
  },
  {
   "section": "5.1 Architecture A: GRU-MLP (Baseline)",
   "old": "**Parameter count:** ~210K - Projection: 512×384 ≈ 197K... let me recalculate with the projection built into GRU. - GRU: 384×128×3 (gates) + 128×128×3 (recurrent) + biases ≈ 197K - MLP: 128×64 + 64×32 + 32× output + biases ≈ 11K - Total: ~208K",
   "new": "- GRU: 384×128×3 (gates) + 128×128×3 (recurrent) + biases ≈ 197K - MLP: 128×64 + 64×32 + 32× output + biases ≈ 11K - Total: ~208K",
   "marked": "[-**Parameter count:** ~210K - Projection: 512×384 ≈ 197K... let me recalculate with the projection built into GRU.-] - GRU: 384×128×3 (gates) + 128×128×3 (recurrent) + biases ≈ 197K - MLP: 128×64 + 64×32 + 32× output + biases ≈ 11K - Total: ~208K"
  },
  {
   "section": "5.1 Architecture A: GRU-MLP (Baseline)",
   "old": null,
   "new": "**Strengths:**",
   "marked": "{+**Strengths:**+}"
  },
  {
   "section": "5.1 Architecture A: GRU-MLP (Baseline)",
   "old": "**Strengths:** - Simple, well-understood architecture with strong empirical baselines for sequence modelling - Sequential processing naturally captures temporal dependencies — \"what happened before matters for what's happening now\" - Low parameter count reduces overfitting risk on small datasets - Hidden state provides interpretable \"memory\" that can be inspected — you can ask \"what is the GRU remembering?\" by examining $h_t$",
   "new": "- Simple, well-understood architecture with strong empirical baselines for sequence modelling - Sequential processing naturally captures temporal dependencies — \"what happened before matters for what's happening now\" - Low parameter count reduces overfitting risk on small datasets - Hidden state provides interpretable \"memory\" that can be inspected — you can ask \"what is the GRU remembering?\" by examining $h_t$",
   "marked": "[-**Strengths:**-] - Simple, well-understood architecture with strong empirical baselines for sequence modelling - Sequential processing naturally captures temporal dependencies — \"what happened before matters for what's happening now\" - Low parameter count reduces overfitting risk on small datasets - Hidden state provides interpretable \"memory\" that can be inspected — you can ask \"what is the GRU remembering?\" by examining $h_t$"
  },
  {
   "section": "5.1 Architecture A: GRU-MLP (Baseline)",
   "old": null,
   "new": "**Weaknesses:**",
   "marked": "{+**Weaknesses:**+}"
  },
  {
   "section": "5.1 Architecture A: GRU-MLP (Baseline)",
   "old": "**Weaknesses:** - Sequential processing means training cannot be parallelised across time steps (though at $K=32$, this is negligible) - Single hidden state may be too compressed to capture multi-factor risk patterns — like summarising a novel in one sentence - Potential gradient issues for very long sequences (mitigated by $K=32$ being short)",
   "new": "- Sequential processing means training cannot be parallelised across time steps (though at $K=32$, this is negligible) - Single hidden state may be too compressed to capture multi-factor risk patterns — like summarising a novel in one sentence - Potential gradient issues for very long sequences (mitigated by $K=32$ being short)",
   "marked": "[-**Weaknesses:**-] - Sequential processing means training cannot be parallelised across time steps (though at $K=32$, this is negligible) - Single hidden state may be too compressed to capture multi-factor risk patterns — like summarising a novel in one sentence - Potential gradient issues for very long sequences (mitigated by $K=32$ being short)"
  },
  {
   "section": "5.2 Architecture B: Temporal Convolutional Network (TCN)",
   "old": "``` Input: [s_{t-K+1}, ..., s_t] ∈ R^{K×512} │ ▼ Projection(512 → 384) │ ▼ Conv1D(384→128, kernel=3, dilation=1) → LayerNorm → GELU → Dropout(0.1) │ ▼ Conv1D(128→128, kernel=3, dilation=2) → LayerNorm → GELU → Dropout(0.1) │ ▼ Conv1D(128→128, kernel=3, dilation=4) → LayerNorm → GELU → Dropout(0.1) │ ▼ Conv1D(128→64, kernel=3, dilation=8) → LayerNorm → GELU → Dropout(0.1) │ take last position ▼ Family-specific output heads (64 → ...) ```",
   "new": null,
   "marked": "[-``` Input: [s_{t-K+1}, ..., s_t] ∈ R^{K×512} │ ▼ Projection(512 → 384) │ ▼ Conv1D(384→128, kernel=3, dilation=1) → LayerNorm → GELU → Dropout(0.1) │ ▼ Conv1D(128→128, kernel=3, dilation=2) → LayerNorm → GELU → Dropout(0.1) │ ▼ Conv1D(128→128, kernel=3, dilation=4) → LayerNorm → GELU → Dropout(0.1) │ ▼ Conv1D(128→64, kernel=3, dilation=8) → LayerNorm → GELU → Dropout(0.1) │ take last position ▼ Family-specific output heads (64 → ...) ```-]"
  },
  {
   "section": "5.2 Architecture B: Temporal Convolutional Network (TCN)",
   "old": null,
   "new": "![Architecture B (Temporal Convolutional Network) data flow: four stacked dilated causal convolutions (dilations 1, 2, 4, 8) over the projected embedding sequence, taking the last position into the output heads.](images/j11-arch-b-tcn.png){width=100%}",
   "marked": "{+![Architecture B (Temporal Convolutional Network) data flow: four stacked dilated causal convolutions (dilations 1, 2, 4, 8) over the projected embedding sequence, taking the last position into the output heads.](images/j11-arch-b-tcn.png){width=100%}+}"
  },
  {
   "section": "5.2 Architecture B: Temporal Convolutional Network (TCN)",
   "old": null,
   "new": "**Strengths:**",
   "marked": "{+**Strengths:**+}"
  },
  {
   "section": "5.2 Architecture B: Temporal Convolutional Network (TCN)",
   "old": "**Strengths:** - Parallelisable training — faster wall-clock time on GPU - Dilated convolutions capture multi-scale temporal patterns explicitly — each layer \"sees\" a different time horizon - No vanishing gradient problem — direct gradient paths through residual connections - Causal convolution ensures the model cannot look ahead (it only sees the past, as it should)",
   "new": "- Parallelisable training — faster wall-clock time on GPU - Dilated convolutions capture multi-scale temporal patterns explicitly — each layer \"sees\" a different time horizon - No vanishing gradient problem — direct gradient paths through residual connections - Causal convolution ensures the model cannot look ahead (it only sees the past, as it should)",
   "marked": "[-**Strengths:**-] - Parallelisable training — faster wall-clock time on GPU - Dilated convolutions capture multi-scale temporal patterns explicitly — each layer \"sees\" a different time horizon - No vanishing gradient problem — direct gradient paths through residual connections - Causal convolution ensures the model cannot look ahead (it only sees the past, as it should)"
  },
  {
   "section": "5.2 Architecture B: Temporal Convolutional Network (TCN)",
   "old": null,
   "new": "**Weaknesses:**",
   "marked": "{+**Weaknesses:**+}"
  },
  {
   "section": "5.2 Architecture B: Temporal Convolutional Network (TCN)",
   "old": "**Weaknesses:** - Fixed receptive field — cannot adapt to variable-length relevant history - No explicit \"memory\" — patterns beyond the receptive field are invisible, unlike GRU's potentially infinite memory - May need more layers/parameters than GRU for equivalent temporal reasoning",
   "new": "- Fixed receptive field — cannot adapt to variable-length relevant history - No explicit \"memory\" — patterns beyond the receptive field are invisible, unlike GRU's potentially infinite memory - May need more layers/parameters than GRU for equivalent temporal reasoning",
   "marked": "[-**Weaknesses:**-] - Fixed receptive field — cannot adapt to variable-length relevant history - No explicit \"memory\" — patterns beyond the receptive field are invisible, unlike GRU's potentially infinite memory - May need more layers/parameters than GRU for equivalent temporal reasoning"
  },
  {
   "section": "5.3 Architecture C: Transformer-Micro",
   "old": "``` Input: [s_{t-K+1}, ..., s_t] ∈ R^{K×512} │ ▼ Linear(512 → 96) → Positional encoding (learned, K positions) │ ▼ TransformerEncoderLayer(d_model=96, nhead=4, d_ff=192, dropout=0.1) │ ▼ TransformerEncoderLayer(d_model=96, nhead=4, d_ff=192, dropout=0.1) │ mean-pool across positions ▼ Linear(96, 64) → GELU │ ▼ Family-specific output heads (64 → ...) ```",
   "new": null,
   "marked": "[-``` Input: [s_{t-K+1}, ..., s_t] ∈ R^{K×512} │ ▼ Linear(512 → 96) → Positional encoding (learned, K positions) │ ▼ TransformerEncoderLayer(d_model=96, nhead=4, d_ff=192, dropout=0.1) │ ▼ TransformerEncoderLayer(d_model=96, nhead=4, d_ff=192, dropout=0.1) │ mean-pool across positions ▼ Linear(96, 64) → GELU │ ▼ Family-specific output heads (64 → ...) ```-]"
  },
  {
   "section": "5.3 Architecture C: Transformer-Micro",
   "old": null,
   "new": "![Architecture C (Transformer-Micro) data flow: linear projection plus learned positional encoding, two self-attention encoder layers, mean-pooling, then the output heads.](images/j11-arch-c-transformer.png){width=100%}",
   "marked": "{+![Architecture C (Transformer-Micro) data flow: linear projection plus learned positional encoding, two self-attention encoder layers, mean-pooling, then the output heads.](images/j11-arch-c-transformer.png){width=100%}+}"
  },
  {
   "section": "5.3 Architecture C: Transformer-Micro",
   "old": null,
   "new": "**Parameter count:** ~190K",
   "marked": "{+**Parameter count:** ~190K+}"
  },
  {
   "section": "5.3 Architecture C: Transformer-Micro",
   "old": "**Parameter count:** ~190K - Input projection: 512×96 ≈ 49K - Positional encoding: 32×96 ≈ 3K - Transformer layer ×2: ~74K per layer ≈ 148K total - Output: 96×64 + 64×output ≈ 7K",
   "new": "- Input projection: 512×96 ≈ 49K - Positional encoding: 32×96 ≈ 3K - Transformer layer ×2: ~74K per layer ≈ 148K total - Output: 96×64 + 64×output ≈ 7K",
   "marked": "[-**Parameter count:** ~190K-] - Input projection: 512×96 ≈ 49K - Positional encoding: 32×96 ≈ 3K - Transformer layer ×2: ~74K per layer ≈ 148K total - Output: 96×64 + 64×output ≈ 7K"
  },
  {
   "section": "5.3 Architecture C: Transformer-Micro",
   "old": null,
   "new": "**Strengths:**",
   "marked": "{+**Strengths:**+}"
  },
  {
   "section": "5.3 Architecture C: Transformer-Micro",
   "old": "**Strengths:** - **Attention patterns are directly interpretable:** \"this action is risky *because* of step 7 (high attention weight on the recent overwrite).\" This is enormously valuable for explaining blocked actions to users. - Self-attention can capture arbitrary pairwise relationships between situation steps — it doesn't need them to be adjacent in time - Proven architecture for sequence understanding",
   "new": "- **Attention patterns are directly interpretable:** \"this action is risky _because_ of step 7 (high attention weight on the recent overwrite).\" This is enormously valuable for explaining blocked actions to users. - Self-attention can capture arbitrary pairwise relationships between situation steps — it doesn't need them to be adjacent in time - Proven architecture for sequence understanding",
   "marked": "[-**Strengths:**-] - **Attention patterns are directly interpretable:** \"this action is risky [-*because*-] {+_because_+} of step 7 (high attention weight on the recent overwrite).\" This is enormously valuable for explaining blocked actions to users. - Self-attention can capture arbitrary pairwise relationships between situation steps — it doesn't need them to be adjacent in time - Proven architecture for sequence understanding"
  },
  {
   "section": "5.3 Architecture C: Transformer-Micro",
   "old": null,
   "new": "**Weaknesses:**",
   "marked": "{+**Weaknesses:**+}"
  },
  {
   "section": "5.3 Architecture C: Transformer-Micro",
   "old": "**Weaknesses:** - Positional encoding may be unnecessary for short sequences where the GRU's inherent ordering suffices - More prone to overfitting than GRU/TCN at small data scales — Transformers are data-hungry - \"Overkill\" concern: this is 32 vectors of 512d, not GPT-scale sequences",
   "new": "- Positional encoding may be unnecessary for short sequences where the GRU's inherent ordering suffices - More prone to overfitting than GRU/TCN at small data scales — Transformers are data-hungry - \"Overkill\" concern: this is 32 vectors of 512d, not GPT-scale sequences",
   "marked": "[-**Weaknesses:**-] - Positional encoding may be unnecessary for short sequences where the GRU's inherent ordering suffices - More prone to overfitting than GRU/TCN at small data scales — Transformers are data-hungry - \"Overkill\" concern: this is 32 vectors of 512d, not GPT-scale sequences"
  },
  {
   "section": "5.3 Architecture C: Transformer-Micro",
   "old": "**What it tests:** Whether the ability to attend to *specific prior situations* (not just their recurrent summary) improves catastrophic failure detection. If a specific past action is the key context for the current risk assessment, attention should outperform the GRU's compressed hidden state.",
   "new": "**What it tests:** Whether the ability to attend to _specific prior situations_ (not just their recurrent summary) improves catastrophic failure detection. If a specific past action is the key context for the current risk assessment, attention should outperform the GRU's compressed hidden state.",
   "marked": "**What it tests:** Whether the ability to attend to [-*specific-] {+_specific+} prior [-situations*-] {+situations_+} (not just their recurrent summary) improves catastrophic failure detection. If a specific past action is the key context for the current risk assessment, attention should outperform the GRU's compressed hidden state."
  },
  {
   "section": "5.4 Architecture D: Dual-Encoder with Cross-Attention",
   "old": "``` Proposed action: s_t ∈ R^512 Recent context: [s_{t-K+1}, ..., s_{t-1}] ∈ R^{(K-1)×512} │ │ ▼ ▼ Linear(512→128) GRU(512→128) or Mean-pool │ q ∈ R^128 │ C ∈ R^{(K-1)×128} or R^128 ▼ ▼ └──────────── Cross-Attention ────────────────┘ │ q attends to C │ attended ∈ R^128 ▼ [q ⊕ attended] ∈ R^256 │ Linear(256→64) → GELU │ Family-specific output heads (64 → ...) ```",
   "new": null,
   "marked": "[-``` Proposed action: s_t ∈ R^512 Recent context: [s_{t-K+1}, ..., s_{t-1}] ∈ R^{(K-1)×512} │ │ ▼ ▼ Linear(512→128) GRU(512→128) or Mean-pool │ q ∈ R^128 │ C ∈ R^{(K-1)×128} or R^128 ▼ ▼ └──────────── Cross-Attention ────────────────┘ │ q attends to C │ attended ∈ R^128 ▼ [q ⊕ attended] ∈ R^256 │ Linear(256→64) → GELU │ Family-specific output heads (64 → ...) ```-]"
  },
  {
   "section": "5.4 Architecture D: Dual-Encoder with Cross-Attention",
   "old": null,
   "new": "![Architecture D (Dual-Encoder with cross-attention) data flow: a proposed-action encoder and a recent-context encoder fused via cross-attention to detect contradictions between intent and recent history.](images/j11-arch-d-dual-encoder.png){width=100%}",
   "marked": "{+![Architecture D (Dual-Encoder with cross-attention) data flow: a proposed-action encoder and a recent-context encoder fused via cross-attention to detect contradictions between intent and recent history.](images/j11-arch-d-dual-encoder.png){width=100%}+}"
  },
  {
   "section": "5.4 Architecture D: Dual-Encoder with Cross-Attention",
   "old": null,
   "new": "**Strengths:**",
   "marked": "{+**Strengths:**+}"
  },
  {
   "section": "5.4 Architecture D: Dual-Encoder with Cross-Attention",
   "old": "**Strengths:** - **Architecturally designed for contradiction detection.** The cross-attention explicitly compares \"what I'm about to do\" against \"what recently happened.\" This is the structure of the README debacle: the proposed action (overwrite) contradicts recent context (heavy editing). Like a proofreader who reads a sentence against the paragraph — the dual structure is built for catching inconsistencies. - Separate encoders prevent the proposed action from being \"washed out\" by the context sequence - Cross-attention weights are highly interpretable: \"I'm blocking this because of high attention on yesterday's editing session\"",
   "new": "- **Architecturally designed for contradiction detection.** The cross-attention explicitly compares \"what I'm about to do\" against \"what recently happened.\" This is the structure of the README debacle: the proposed action (overwrite) contradicts recent context (heavy editing). Like a proofreader who reads a sentence against the paragraph — the dual structure is built for catching inconsistencies. - Separate encoders prevent the proposed action from being \"washed out\" by the context sequence - Cross-attention weights are highly interpretable: \"I'm blocking this because of high attention on yesterday's editing session\"",
   "marked": "[-**Strengths:**-] - **Architecturally designed for contradiction detection.** The cross-attention explicitly compares \"what I'm about to do\" against \"what recently happened.\" This is the structure of the README debacle: the proposed action (overwrite) contradicts recent context (heavy editing). Like a proofreader who reads a sentence against the paragraph — the dual structure is built for catching inconsistencies. - Separate encoders prevent the proposed action from being \"washed out\" by the context sequence - Cross-attention weights are highly interpretable: \"I'm blocking this because of high attention on yesterday's editing session\""
  },
  {
   "section": "5.4 Architecture D: Dual-Encoder with Cross-Attention",
   "old": null,
   "new": "**Weaknesses:**",
   "marked": "{+**Weaknesses:**+}"
  },
  {
   "section": "5.4 Architecture D: Dual-Encoder with Cross-Attention",
   "old": "**Weaknesses:** - More complex architecture — more things to tune, more ways to fail - Requires the \"proposed action\" to be clearly separable from \"context,\" which may not always be clean - Higher parameter count increases overfitting risk",
   "new": "- More complex architecture — more things to tune, more ways to fail - Requires the \"proposed action\" to be clearly separable from \"context,\" which may not always be clean - Higher parameter count increases overfitting risk",
   "marked": "[-**Weaknesses:**-] - More complex architecture — more things to tune, more ways to fail - Requires the \"proposed action\" to be clearly separable from \"context,\" which may not always be clean - Higher parameter count increases overfitting risk"
  },
  {
   "section": "5.4 Architecture D: Dual-Encoder with Cross-Attention",
   "old": "**What it tests:** Whether *explicit architectural separation* of \"what I'm about to do\" from \"what has recently happened\" improves contradiction detection compared to architectures that process them jointly.",
   "new": "**What it tests:** Whether _explicit architectural separation_ of \"what I'm about to do\" from \"what has recently happened\" improves contradiction detection compared to architectures that process them jointly.",
   "marked": "**What it tests:** Whether [-*explicit-] {+_explicit+} architectural [-separation*-] {+separation_+} of \"what I'm about to do\" from \"what has recently happened\" improves contradiction detection compared to architectures that process them jointly."
  },
  {
   "section": "5.5 Architecture E: Ensemble MLP (No-Temporal Baseline)",
   "old": "**Design:** A simple feedforward MLP on the *current situation embedding only* (no temporal context), but with 3 independent sub-heads that vote. This is the ablation control — the experiment that tests whether temporal context actually matters, or whether better feature representation (situation embeddings vs. hand-crafted features) is sufficient.",
   "new": "**Design:** A simple feedforward MLP on the _current situation embedding only_ (no temporal context), but with 3 independent sub-heads that vote. This is the ablation control — the experiment that tests whether temporal context actually matters, or whether better feature representation (situation embeddings vs. hand-crafted features) is sufficient.",
   "marked": "**Design:** A simple feedforward MLP on the [-*current-] {+_current+} situation embedding [-only*-] {+only_+} (no temporal context), but with 3 independent sub-heads that vote. This is the ablation control — the experiment that tests whether temporal context actually matters, or whether better feature representation (situation embeddings vs. hand-crafted features) is sufficient."
  },
  {
   "section": "5.5 Architecture E: Ensemble MLP (No-Temporal Baseline)",
   "old": "``` Input: s_t ∈ R^512 │ ├─────────────────────┬───────────────────────┐ ▼ ▼ ▼ MLP_1(512→128→64) MLP_2(512→128→64) MLP_3(512→128→64) │ │ │ ▼ ▼ ▼ Head_1(64→out) Head_2(64→out) Head_3(64→out) │ │ │ └─────── Vote/Average ───────────────────────┘ │ Final output ```",
   "new": null,
   "marked": "[-``` Input: s_t ∈ R^512 │ ├─────────────────────┬───────────────────────┐ ▼ ▼ ▼ MLP_1(512→128→64) MLP_2(512→128→64) MLP_3(512→128→64) │ │ │ ▼ ▼ ▼ Head_1(64→out) Head_2(64→out) Head_3(64→out) │ │ │ └─────── Vote/Average ───────────────────────┘ │ Final output ```-]"
  },
  {
   "section": "5.5 Architecture E: Ensemble MLP (No-Temporal Baseline)",
   "old": null,
   "new": "![Architecture E (Ensemble MLP, no-temporal ablation) data flow: three independent MLP sub-heads vote on the current-situation embedding, with no temporal context.](images/j11-arch-e-ensemble-mlp.png){width=100%}",
   "marked": "{+![Architecture E (Ensemble MLP, no-temporal ablation) data flow: three independent MLP sub-heads vote on the current-situation embedding, with no temporal context.](images/j11-arch-e-ensemble-mlp.png){width=100%}+}"
  },
  {
   "section": "5.5 Architecture E: Ensemble MLP (No-Temporal Baseline)",
   "old": "**Voting strategy for Prudence:** Take the *minimum* confidence across all 3 sub-heads. If any sub-head thinks it's dangerous, flag it. This maximises safety at the cost of more false positives — like the \"most cautious member wins\" policy in a bomb squad.",
   "new": "**Voting strategy for Prudence:** Take the _minimum_ confidence across all 3 sub-heads. If any sub-head thinks it's dangerous, flag it. This maximises safety at the cost of more false positives — like the \"most cautious member wins\" policy in a bomb squad.",
   "marked": "**Voting strategy for Prudence:** Take the [-*minimum*-] {+_minimum_+} confidence across all 3 sub-heads. If any sub-head thinks it's dangerous, flag it. This maximises safety at the cost of more false positives — like the \"most cautious member wins\" policy in a bomb squad."
  },
  {
   "section": "5.5 Architecture E: Ensemble MLP (No-Temporal Baseline)",
   "old": null,
   "new": "**Strengths:**",
   "marked": "{+**Strengths:**+}"
  },
  {
   "section": "5.5 Architecture E: Ensemble MLP (No-Temporal Baseline)",
   "old": "**Strengths:** - Simplest architecture — easiest to debug, train, and deploy - No temporal modelling means faster inference and smaller memory footprint - Multiple sub-heads provide calibration and uncertainty estimation (high disagreement = uncertain situation) - The critical ablation: tests whether temporal context matters",
   "new": "- Simplest architecture — easiest to debug, train, and deploy - No temporal modelling means faster inference and smaller memory footprint - Multiple sub-heads provide calibration and uncertainty estimation (high disagreement = uncertain situation) - The critical ablation: tests whether temporal context matters",
   "marked": "[-**Strengths:**-] - Simplest architecture — easiest to debug, train, and deploy - No temporal modelling means faster inference and smaller memory footprint - Multiple sub-heads provide calibration and uncertainty estimation (high disagreement = uncertain situation) - The critical ablation: tests whether temporal context matters"
  },
  {
   "section": "5.5 Architecture E: Ensemble MLP (No-Temporal Baseline)",
   "old": null,
   "new": "**Weaknesses:**",
   "marked": "{+**Weaknesses:**+}"
  },
  {
   "section": "5.5 Architecture E: Ensemble MLP (No-Temporal Baseline)",
   "old": "**Weaknesses:** - Cannot learn temporal patterns (\"you just edited this file\") — sees only the current situation - Relies entirely on the situation description containing all relevant context (which the template tries to ensure via `recent_commits`, `effort_hours`, etc.) - Independent sub-heads may converge to similar solutions despite different initialisation",
   "new": "- Cannot learn temporal patterns (\"you just edited this file\") — sees only the current situation - Relies entirely on the situation description containing all relevant context (which the template tries to ensure via `recent_commits`, `effort_hours`, etc.) - Independent sub-heads may converge to similar solutions despite different initialisation",
   "marked": "[-**Weaknesses:**-] - Cannot learn temporal patterns (\"you just edited this file\") — sees only the current situation - Relies entirely on the situation description containing all relevant context (which the template tries to ensure via `recent_commits`, `effort_hours`, etc.) - Independent sub-heads may converge to similar solutions despite different initialisation"
  },
  {
   "section": "5.5 Architecture E: Ensemble MLP (No-Temporal Baseline)",
   "old": "**What it tests:** The central question: *does temporal context actually help?* If Architecture E performs comparably to Architectures A–D, the answer is \"no — better features are sufficient.\" If temporal architectures significantly outperform, temporal context is essential for common sense.",
   "new": "**What it tests:** The central question: _does temporal context actually help?_ If Architecture E performs comparably to Architectures A–D, the answer is \"no — better features are sufficient.\" If temporal architectures significantly outperform, temporal context is essential for common sense.",
   "marked": "**What it tests:** The central question: [-*does-] {+_does+} temporal context actually [-help?*-] {+help?_+} If Architecture E performs comparably to Architectures A–D, the answer is \"no — better features are sufficient.\" If temporal architectures significantly outperform, temporal context is essential for common sense."
  },
  {
   "section": "5.6 Architecture Comparison Summary",
   "old": "| Label | Architecture | Params | Temporal | Parallelisable | Key Test | |-------|-------------|--------|----------|---------------|----------| | **A** | GRU-MLP | ~210K | Yes (recurrent) | No | Baseline temporal model | | **B** | TCN | ~260K | Yes (convolutional) | Yes | Parallel temporal processing | | **C** | Transformer-Micro | ~190K | Yes (attention) | Yes | Interpretable attention patterns | | **D** | Dual-Encoder | ~310K | Yes (cross-attention) | Partial | Explicit contradiction detection | | **E** | Ensemble MLP | ~200K | No | Yes | Whether temporal context matters |",
   "new": "| Label | Architecture | Params | Temporal | Parallelisable | Key Test | | ----- | ----------------- | ------ | --------------------- | -------------- | -------------------------------- | | **A** | GRU-MLP | ~210K | Yes (recurrent) | No | Baseline temporal model | | **B** | TCN | ~260K | Yes (convolutional) | Yes | Parallel temporal processing | | **C** | Transformer-Micro | ~190K | Yes (attention) | Yes | Interpretable attention patterns | | **D** | Dual-Encoder | ~310K | Yes (cross-attention) | Partial | Explicit contradiction detection | | **E** | Ensemble MLP | ~200K | No | Yes | Whether temporal context matters |",
   "marked": "| Label | Architecture | Params | Temporal | Parallelisable | Key Test | [-|-------|-------------|--------|----------|---------------|----------|-] {+| ----- | ----------------- | ------ | --------------------- | -------------- | -------------------------------- |+} | **A** | GRU-MLP | ~210K | Yes (recurrent) | No | Baseline temporal model | | **B** | TCN | ~260K | Yes (convolutional) | Yes | Parallel temporal processing | | **C** | Transformer-Micro | ~190K | Yes (attention) | Yes | Interpretable attention patterns | | **D** | Dual-Encoder | ~310K | Yes (cross-attention) | Partial | Explicit contradiction detection | | **E** | Ensemble MLP | ~200K | No | Yes | Whether temporal context matters |"
  },
  {
   "section": "5.6 Architecture Comparison Summary",
   "old": null,
   "new": "![Figure 5: The five competing architectures (A–E), side by side: GRU-MLP, TCN, Transformer-Micro, Dual-Encoder, and the no-temporal Ensemble-MLP ablation.](diagrams/j11-5-architectures-comparison.pdf){width=100%}",
   "marked": "{+![Figure 5: The five competing architectures (A–E), side by side: GRU-MLP, TCN, Transformer-Micro, Dual-Encoder, and the no-temporal Ensemble-MLP ablation.](diagrams/j11-5-architectures-comparison.pdf){width=100%}+}"
  },
  {
   "section": "5.7 Meta-Learning: Selecting and Combining Architectures",
   "old": "**Conservative override:** If *any* architecture outputs a \"stop\" decision with confidence above a threshold, the action is blocked regardless of the ensemble's aggregate. This implements a \"most cautious voice wins\" policy for catastrophic risk prevention.",
   "new": "**Conservative override:** If _any_ architecture outputs a \"stop\" decision with confidence above a threshold, the action is blocked regardless of the ensemble's aggregate. This implements a \"most cautious voice wins\" policy for catastrophic risk prevention.",
   "marked": "**Conservative override:** If [-*any*-] {+_any_+} architecture outputs a \"stop\" decision with confidence above a threshold, the action is blocked regardless of the ensemble's aggregate. This implements a \"most cautious voice wins\" policy for catastrophic risk prevention."
  },
  {
   "section": "5.8 From Five to Three: What Is Actually Deployed",
   "old": null,
   "new": "### 5.8 From Five to Three: What Is Actually Deployed",
   "marked": "{+### 5.8 From Five to Three: What Is Actually Deployed+}"
  },
  {
   "section": "5.8 From Five to Three: What Is Actually Deployed",
   "old": null,
   "new": "The five-architecture design is the target. The deployed system is honest about the gap. As of the live runtime, three of the five Prudence architectures load full-weight ONNX exports and contribute real predictions:",
   "marked": "{+The five-architecture design is the target. The deployed system is honest about the gap. As of the live runtime, three of the five Prudence architectures load full-weight ONNX exports and contribute real predictions:+}"
  },
  {
   "section": "5.8 From Five to Three: What Is Actually Deployed",
   "old": null,
   "new": "| Label | Architecture | Status (live) | Why | | ----- | ----------------- | ------------- | ------------------------------------------------ | | **A** | GRU-MLP | **Live** | Full-weight export (~1.6 MB) loads | | **B** | TCN | **Live** | Full-weight export (~1.6 MB) loads | | **C** | Transformer-Micro | **Live** | Full-weight export (~0.9 MB) loads | | **D** | Dual-Encoder | Neutral | No full-weight export yet; graph-only stub | | **E** | Ensemble MLP | Neutral | No full-weight export yet; graph-only stub |",
   "marked": "{+| Label | Architecture | Status (live) | Why | | ----- | ----------------- | ------------- | ------------------------------------------------ | | **A** | GRU-MLP | **Live** | Full-weight export (~1.6 MB) loads | | **B** | TCN | **Live** | Full-weight export (~1.6 MB) loads | | **C** | Transformer-Micro | **Live** | Full-weight export (~0.9 MB) loads | | **D** | Dual-Encoder | Neutral | No full-weight export yet; graph-only stub | | **E** | Ensemble MLP | Neutral | No full-weight export yet; graph-only stub |+}"
  },
  {
   "section": "5.8 From Five to Three: What Is Actually Deployed",
   "old": null,
   "new": "Architectures D and E currently resolve to a **neutral output** rather than a learned prediction: the configured model paths point to graph-only files (tens of kilobytes, no trained weights), so the ensemble combination treats them as abstentions. The deployed gate is therefore an **ensemble of three live networks plus two neutral**, not five.",
   "marked": "{+Architectures D and E currently resolve to a **neutral output** rather than a learned prediction: the configured model paths point to graph-only files (tens of kilobytes, no trained weights), so the ensemble combination treats them as abstentions. The deployed gate is therefore an **ensemble of three live networks plus two neutral**, not five.+}"
  },
  {
   "section": "5.8 From Five to Three: What Is Actually Deployed",
   "old": null,
   "new": "This is the right failure mode. A neutral output is a deliberate abstention, not a fabricated prediction — a network with no weights does not get a vote it cannot justify. The conservative-override and disagreement signals (§5.7) operate over the live members; the two neutral members neither raise nor lower the aggregate. The ensemble degrades gracefully toward its strongest live member rather than crashing or, worse, inventing confidence it does not have.",
   "marked": "{+This is the right failure mode. A neutral output is a deliberate abstention, not a fabricated prediction — a network with no weights does not get a vote it cannot justify. The conservative-override and disagreement signals (§5.7) operate over the live members; the two neutral members neither raise nor lower the aggregate. The ensemble degrades gracefully toward its strongest live member rather than crashing or, worse, inventing confidence it does not have.+}"
  },
  {
   "section": "5.8 From Five to Three: What Is Actually Deployed",
   "old": null,
   "new": "Two paths close the gap, both honest: export full-weight D and E (restoring the five-architecture ensemble as designed), or revise the headline \"ensemble of five\" claim to \"ensemble of up to five, three currently live.\" This paper keeps the five-architecture design as the target because the comparison it enables — does explicit contradiction detection (D) or the no-temporal ablation (E) actually matter? — is the experiment §5.0 exists to run, and it cannot be run until D and E carry weights. Until then, every claim about D and E in this paper is a hypothesis awaiting a trained network, not a deployed result.",
   "marked": "{+Two paths close the gap, both honest: export full-weight D and E (restoring the five-architecture ensemble as designed), or revise the headline \"ensemble of five\" claim to \"ensemble of up to five, three currently live.\" This paper keeps the five-architecture design as the target because the comparison it enables — does explicit contradiction detection (D) or the no-temporal ablation (E) actually matter? — is the experiment §5.0 exists to run, and it cannot be run until D and E carry weights. Until then, every claim about D and E in this paper is a hypothesis awaiting a trained network, not a deployed result.+}"
  },
  {
   "section": "5.8 From Five to Three: What Is Actually Deployed",
   "old": null,
   "new": "A parallel note for the Personality family: architectures A–C ship as full-weight exports (each with an external-data sidecar), while D and E point at graph-only stubs and resolve neutral, mirroring the Prudence situation.",
   "marked": "{+A parallel note for the Personality family: architectures A–C ship as full-weight exports (each with an external-data sidecar), while D and E point at graph-only stubs and resolve neutral, mirroring the Prudence situation.+}"
  },
  {
   "section": "6.1 Motivation",
   "old": null,
   "new": "The CFD serves three purposes:",
   "marked": "{+The CFD serves three purposes:+}"
  },
  {
   "section": "6.1 Motivation",
   "old": "The CFD serves three purposes: 1. **Pre-training:** Learn from documented failures before seeing any of our own 2. **Evaluation benchmark:** Systematically test whether the Prudence networks would have caught known failures 3. **Continuous expansion:** New failures (our own and publicly documented) are added as they occur",
   "new": "1. **Pre-training:** Learn from documented failures before seeing any of our own 2. **Evaluation benchmark:** Systematically test whether the Prudence networks would have caught known failures 3. **Continuous expansion:** New failures (our own and publicly documented) are added as they occur",
   "marked": "[-The CFD serves three purposes:-] 1. **Pre-training:** Learn from documented failures before seeing any of our own 2. **Evaluation benchmark:** Systematically test whether the Prudence networks would have caught known failures 3. **Continuous expansion:** New failures (our own and publicly documented) are added as they occur"
  },
  {
   "section": "6.2 Sources",
   "old": "| Source | Type | Estimated Entries | Entry Quality | |--------|------|-------------------|---------------| | AI Incident Database | Production incidents | 800+ | Variable — needs curation | | AIAAIC Repository | OECD-tracked incidents | 400+ | High — structured metadata | | MIT AI Risk Repository | Academic analysis | 200+ | High — causal categorisation | | Vectara awesome-agent-failures | Agent-specific failures | 50+ | High — curated for relevance | | \"Agents of Chaos\" (Feb 2026) | Research study | ~150 events | Very high — controlled conditions | | Production postmortems | Industry reports | ~100 | Variable | | Our deployment history | First-party data | ~30 | Very high — full context available |",
   "new": "| Source | Type | Estimated Entries | Entry Quality | | ------------------------------ | ----------------------- | ----------------- | ---------------------------------- | | AI Incident Database | Production incidents | 800+ | Variable — needs curation | | AIAAIC Repository | OECD-tracked incidents | 400+ | High — structured metadata | | MIT AI Risk Repository | Academic analysis | 200+ | High — causal categorisation | | Vectara awesome-agent-failures | Agent-specific failures | 50+ | High — curated for relevance | | \"Agents of Chaos\" (Feb 2026) | Research study | ~150 events | Very high — controlled conditions | | Production postmortems | Industry reports | ~100 | Variable | | Our deployment history | First-party data | ~30 | Very high — full context available |",
   "marked": "| Source | Type | Estimated Entries | Entry Quality | [-|--------|------|-------------------|---------------|-] {+| ------------------------------ | ----------------------- | ----------------- | ---------------------------------- |+} | AI Incident Database | Production incidents | 800+ | Variable — needs curation | | AIAAIC Repository | OECD-tracked incidents | 400+ | High — structured metadata | | MIT AI Risk Repository | Academic analysis | 200+ | High — causal categorisation | | Vectara awesome-agent-failures | Agent-specific failures | 50+ | High — curated for relevance | | \"Agents of Chaos\" (Feb 2026) | Research study | ~150 events | Very high — controlled conditions | | Production postmortems | Industry reports | ~100 | Variable | | Our deployment history | First-party data | ~30 | Very high — full context available |"
  },
  {
   "section": "6.3 Taxonomy",
   "old": null,
   "new": "**Dimension 1: Failure Mechanism**",
   "marked": "{+**Dimension 1: Failure Mechanism**+}"
  },
  {
   "section": "6.3 Taxonomy",
   "old": "**Dimension 1: Failure Mechanism** - **F1: Stale context** — Action was correct in the past, wrong now. (README debacle, outdated API key rotation.) - **F2: Scope escalation** — Action affected more than intended. (Email mass-deletion, drive wipe, Claude Code data exposure.) - **F3: Social boundary violation** — Action was technically permitted but socially wrong. (Reaction spam, unauthorised DMs.) - **F4: Cascade/compound error** — Multiple small errors combined catastrophically. (Multi-agent miscoordination.) - **F5: Hallucination-driven action** — LLM fabricated context that led to wrong action. (Cursor \"Sam\" policy fabrication.) - **F6: Ambiguity exploitation** — Ambiguous instruction interpreted in the most harmful way. (Replit \"clean up\" → delete.) - **F7: Automation trust excess** — Human trusted automation output without verification. (Antigravity drive wipe.)",
   "new": "- **F1: Stale context** — Action was correct in the past, wrong now. (README debacle, outdated API key rotation.) - **F2: Scope escalation** — Action affected more than intended. (Email mass-deletion, drive wipe, Claude Code data exposure.) - **F3: Social boundary violation** — Action was technically permitted but socially wrong. (Reaction spam, unauthorised DMs.) - **F4: Cascade/compound error** — Multiple small errors combined catastrophically. (Multi-agent miscoordination.) - **F5: Hallucination-driven action** — LLM fabricated context that led to wrong action. (Cursor \"Sam\" policy fabrication.) - **F6: Ambiguity exploitation** — Ambiguous instruction interpreted in the most harmful way. (Replit \"clean up\" → delete.) - **F7: Automation trust excess** — Human trusted automation output without verification. (Antigravity drive wipe.)",
   "marked": "[-**Dimension 1: Failure Mechanism**-] - **F1: Stale context** — Action was correct in the past, wrong now. (README debacle, outdated API key rotation.) - **F2: Scope escalation** — Action affected more than intended. (Email mass-deletion, drive wipe, Claude Code data exposure.) - **F3: Social boundary violation** — Action was technically permitted but socially wrong. (Reaction spam, unauthorised DMs.) - **F4: Cascade/compound error** — Multiple small errors combined catastrophically. (Multi-agent miscoordination.) - **F5: Hallucination-driven action** — LLM fabricated context that led to wrong action. (Cursor \"Sam\" policy fabrication.) - **F6: Ambiguity exploitation** — Ambiguous instruction interpreted in the most harmful way. (Replit \"clean up\" → delete.) - **F7: Automation trust excess** — Human trusted automation output without verification. (Antigravity drive wipe.)"
  },
  {
   "section": "6.3 Taxonomy",
   "old": null,
   "new": "**Dimension 2: Reversibility**",
   "marked": "{+**Dimension 2: Reversibility**+}"
  },
  {
   "section": "6.3 Taxonomy",
   "old": "**Dimension 2: Reversibility** - **R1: Fully reversible** — Git revert, undo, restore from backup. Cost: time. - **R2: Partially reversible** — Some data recoverable, some lost. Cost: time + partial data loss. - **R3: Irreversible** — Data permanently destroyed, message sent, public action taken.",
   "new": "- **R1: Fully reversible** — Git revert, undo, restore from backup. Cost: time. - **R2: Partially reversible** — Some data recoverable, some lost. Cost: time + partial data loss. - **R3: Irreversible** — Data permanently destroyed, message sent, public action taken.",
   "marked": "[-**Dimension 2: Reversibility**-] - **R1: Fully reversible** — Git revert, undo, restore from backup. Cost: time. - **R2: Partially reversible** — Some data recoverable, some lost. Cost: time + partial data loss. - **R3: Irreversible** — Data permanently destroyed, message sent, public action taken."
  },
  {
   "section": "6.3 Taxonomy",
   "old": null,
   "new": "**Dimension 3: Blast Radius**",
   "marked": "{+**Dimension 3: Blast Radius**+}"
  },
  {
   "section": "6.3 Taxonomy",
   "old": "**Dimension 3: Blast Radius** - **B1: Self-contained** — Only the agent's internal state affected. - **B2: Session-scoped** — Current session affected, no persistent impact. - **B3: Persistent** — Permanent changes to files, databases, or configurations. - **B4: External** — Impact on other people (messages sent, emails, public posts).",
   "new": "- **B1: Self-contained** — Only the agent's internal state affected. - **B2: Session-scoped** — Current session affected, no persistent impact. - **B3: Persistent** — Permanent changes to files, databases, or configurations. - **B4: External** — Impact on other people (messages sent, emails, public posts).",
   "marked": "[-**Dimension 3: Blast Radius**-] - **B1: Self-contained** — Only the agent's internal state affected. - **B2: Session-scoped** — Current session affected, no persistent impact. - **B3: Persistent** — Permanent changes to files, databases, or configurations. - **B4: External** — Impact on other people (messages sent, emails, public posts)."
  },
  {
   "section": "6.3 Taxonomy",
   "old": null,
   "new": "**Dimension 4: Detection Difficulty**",
   "marked": "{+**Dimension 4: Detection Difficulty**+}"
  },
  {
   "section": "6.3 Taxonomy",
   "old": "**Dimension 4: Detection Difficulty** - **D1: Immediately obvious** — Error is apparent within seconds. - **D2: Delayed discovery** — Error is discovered hours or days later. - **D3: Silent failure** — Error may never be discovered without audit.",
   "new": "- **D1: Immediately obvious** — Error is apparent within seconds. - **D2: Delayed discovery** — Error is discovered hours or days later. - **D3: Silent failure** — Error may never be discovered without audit.",
   "marked": "[-**Dimension 4: Detection Difficulty**-] - **D1: Immediately obvious** — Error is apparent within seconds. - **D2: Delayed discovery** — Error is discovered hours or days later. - **D3: Silent failure** — Error may never be discovered without audit."
  },
  {
   "section": "6.4 Converting Failures to Training Examples",
   "old": "``` action_type: overwrite target_type: file target_id: README.md target_metadata: age_hours: 2160 # file existed for months size: 14200 bytes recent_commits: 6 # 6 commits in last 48h recent_authors: 4 # 4 sub-agents contributed effort_hours: 8.5 # estimated from session logs last_human_ref: 3 # discussed 3 hours ago context: session_topic: \"upstream merge automation\" recent_corrections: 2 emotional_signals: \"frustrated\" automation_depth: 2 # merge script → git checkout topic_drift: 0.72 # high — merge automation is broad, # but target is a specific heavily-edited file scope: reversible: true # git can recover, but... blast_radius: persistent # changes working tree human_in_loop: false # fully automated confirmation: none ```",
   "new": "``` action_type: overwrite target_type: file target_id: README.md target_metadata: age_hours: 2160 # file existed for months size: 14200 bytes recent_commits: 6 # 6 commits in last 48h recent_authors: 4 # 4 sub-agents contributed effort_hours: 8.5 # estimated from session logs last_human_ref: 3 # discussed 3 hours ago context: session_topic: \"upstream merge automation\" recent_corrections: 2 emotional_signals: \"frustrated\" automation_depth: 2 # merge script -> git checkout topic_drift: 0.72 # high — merge automation is broad, # but target is a specific heavily-edited file scope: reversible: true # git can recover, but... blast_radius: persistent # changes working tree human_in_loop: false # fully automated confirmation: none ```",
   "marked": "``` action_type: overwrite target_type: file target_id: README.md target_metadata: age_hours: 2160 # file existed for months size: 14200 bytes recent_commits: 6 # 6 commits in last 48h recent_authors: 4 # 4 sub-agents contributed effort_hours: 8.5 # estimated from session logs last_human_ref: 3 # discussed 3 hours ago context: session_topic: \"upstream merge automation\" recent_corrections: 2 emotional_signals: \"frustrated\" automation_depth: 2 # merge script [-→-] {+->+} git checkout topic_drift: 0.72 # high — merge automation is broad, # but target is a specific heavily-edited file scope: reversible: true # git can recover, but... blast_radius: persistent # changes working tree human_in_loop: false # fully automated confirmation: none ```"
  },
  {
   "section": "6.5 Synthetic Augmentation",
   "old": "2. **Severity scaling:** Adjust metadata to create a spectrum. 6 recent commits → 2, 10, 20. This teaches the network *gradations* of risk, not just binary safe/unsafe. Like training a doctor on mild, moderate, and severe versions of the same condition.",
   "new": "2. **Severity scaling:** Adjust metadata to create a spectrum. 6 recent commits → 2, 10, 20. This teaches the network _gradations_ of risk, not just binary safe/unsafe. Like training a doctor on mild, moderate, and severe versions of the same condition.",
   "marked": "2. **Severity scaling:** Adjust metadata to create a spectrum. 6 recent commits → 2, 10, 20. This teaches the network [-*gradations*-] {+_gradations_+} of risk, not just binary safe/unsafe. Like training a doctor on mild, moderate, and severe versions of the same condition."
  },
  {
   "section": "6.5 Synthetic Augmentation",
   "old": "4. **Counterfactual generation:** For each negative example, generate the positive counterfactual. \"Overwrite README with 0 recent commits, no recent effort, no emotional context\" → `gate_decision = allow`. This teaches the network the *boundary* between safe and dangerous.",
   "new": "4. **Counterfactual generation:** For each negative example, generate the positive counterfactual. \"Overwrite README with 0 recent commits, no recent effort, no emotional context\" → `gate_decision = allow`. This teaches the network the _boundary_ between safe and dangerous.",
   "marked": "4. **Counterfactual generation:** For each negative example, generate the positive counterfactual. \"Overwrite README with 0 recent commits, no recent effort, no emotional context\" → `gate_decision = allow`. This teaches the network the [-*boundary*-] {+_boundary_+} between safe and dangerous."
  },
  {
   "section": "7.2 Dataset Composition Targets",
   "old": "| Category | Target % | Rationale | |----------|----------|-----------| | Positive (proceed) | 60% | Most actions are safe; the network should not be paranoid | | Mild negative (log but proceed) | 15% | Teaches gradation, not just binary | | Moderate negative (ask user) | 15% | The hardest category — ambiguous situations | | Severe negative (block) | 10% | Catastrophic failures — high-weight, low-frequency |",
   "new": "| Category | Target % | Rationale | | ------------------------------- | -------- | --------------------------------------------------------- | | Positive (proceed) | 60% | Most actions are safe; the network should not be paranoid | | Mild negative (log but proceed) | 15% | Teaches gradation, not just binary | | Moderate negative (ask user) | 15% | The hardest category — ambiguous situations | | Severe negative (block) | 10% | Catastrophic failures — high-weight, low-frequency |",
   "marked": "| Category | Target % | Rationale | [-|----------|----------|-----------|-] {+| ------------------------------- | -------- | --------------------------------------------------------- |+} | Positive (proceed) | 60% | Most actions are safe; the network should not be paranoid | | Mild negative (log but proceed) | 15% | Teaches gradation, not just binary | | Moderate negative (ask user) | 15% | The hardest category — ambiguous situations | | Severe negative (block) | 10% | Catastrophic failures — high-weight, low-frequency |"
  },
  {
   "section": "7.3 Ongoing Maintenance (While Working)",
   "old": null,
   "new": "Outcomes are determined by observable events, not LLM judgement:",
   "marked": "{+Outcomes are determined by observable events, not LLM judgement:+}"
  },
  {
   "section": "7.3 Ongoing Maintenance (While Working)",
   "old": "Outcomes are determined by observable events, not LLM judgement: - User correction within 24 hours → negative outcome (severity scaled by correction type: verbal correction = mild, manual file restoration = severe, \"never do that again\" = catastrophic) - No complaint within 72 hours → positive outcome - Explicit positive feedback → strongly positive outcome - User overrides soft block → the override itself is training data (user trusted their own judgment over the network's)",
   "new": "- User correction within 24 hours → negative outcome (severity scaled by correction type: verbal correction = mild, manual file restoration = severe, \"never do that again\" = catastrophic) - No complaint within 72 hours → positive outcome - Explicit positive feedback → strongly positive outcome - User overrides soft block → the override itself is training data (user trusted their own judgment over the network's)",
   "marked": "[-Outcomes are determined by observable events, not LLM judgement:-] - User correction within 24 hours → negative outcome (severity scaled by correction type: verbal correction = mild, manual file restoration = severe, \"never do that again\" = catastrophic) - No complaint within 72 hours → positive outcome - Explicit positive feedback → strongly positive outcome - User overrides soft block → the override itself is training data (user trusted their own judgment over the network's)"
  },
  {
   "section": "7.3 Ongoing Maintenance (While Working)",
   "old": null,
   "new": "Once per month, run the full evaluation suite:",
   "marked": "{+Once per month, run the full evaluation suite:+}"
  },
  {
   "section": "7.3 Ongoing Maintenance (While Working)",
   "old": "Once per month, run the full evaluation suite: - Held-out CFD benchmark (did the Prudence networks catch these known failures?) - False positive rate (how many safe actions were unnecessarily blocked?) - False negative rate (how many corrections occurred after Prudence approved the action?) - Per-architecture comparison (which architectures are improving, which are stagnating?) - Conformal calibration check (does 95% coverage actually hold?) - Personality network evaluation (engagement metrics, user satisfaction signals)",
   "new": "- Held-out CFD benchmark (did the Prudence networks catch these known failures?) - False positive rate (how many safe actions were unnecessarily blocked?) - False negative rate (how many corrections occurred after Prudence approved the action?) - Per-architecture comparison (which architectures are improving, which are stagnating?) - Conformal calibration check (does 95% coverage actually hold?) - Personality network evaluation (engagement metrics, user satisfaction signals)",
   "marked": "[-Once per month, run the full evaluation suite:-] - Held-out CFD benchmark (did the Prudence networks catch these known failures?) - False positive rate (how many safe actions were unnecessarily blocked?) - False negative rate (how many corrections occurred after Prudence approved the action?) - Per-architecture comparison (which architectures are improving, which are stagnating?) - Conformal calibration check (does 95% coverage actually hold?) - Personality network evaluation (engagement metrics, user satisfaction signals)"
  },
  {
   "section": "7.4 Data Hygiene",
   "old": "1. **No single session > 10% of training data.** Prevents a single unusual session from shifting the learned distribution. 2. **CFD entries are never removed from the training set.** These are the most valuable negative examples and serve as anchors — like the worst accident cases in pilot training, they're permanent curriculum. 3. **Synthetic examples are regenerated quarterly** from the latest real examples, preventing stale augmentation. 4. **Distribution monitoring:** Track the ratio of positive/negative examples monthly. If the ratio drifts > 20% from targets, resample. 5. **Experience replay buffer** follows Meta-Experience Replay principles (Riemer et al., 2018): examples are replayed in a way that maximises learning while minimising interference with previously learned patterns, preventing the network from forgetting old failure modes while learning new ones.",
   "new": "1. **No single session > 10% of training data.** Prevents a single unusual session from shifting the learned distribution. 2. **CFD entries are never removed from the training set.** These are the most valuable negative examples and serve as anchors — like the worst accident cases in pilot training, they're permanent curriculum. 3. **Synthetic examples are regenerated quarterly** from the latest real examples, preventing stale augmentation. 4. **Distribution monitoring:** Track the ratio of positive/negative examples monthly. If the ratio drifts > 20% from targets, resample. 5. **Experience replay buffer** follows Meta-Experience Replay principles (Riemer et al., 2019): examples are replayed in a way that maximises learning while minimising interference with previously learned patterns, preventing the network from forgetting old failure modes while learning new ones.",
   "marked": "1. **No single session > 10% of training data.** Prevents a single unusual session from shifting the learned distribution. 2. **CFD entries are never removed from the training set.** These are the most valuable negative examples and serve as anchors — like the worst accident cases in pilot training, they're permanent curriculum. 3. **Synthetic examples are regenerated quarterly** from the latest real examples, preventing stale augmentation. 4. **Distribution monitoring:** Track the ratio of positive/negative examples monthly. If the ratio drifts > 20% from targets, resample. 5. **Experience replay buffer** follows Meta-Experience Replay principles (Riemer et al., [-2018):-] {+2019):+} examples are replayed in a way that maximises learning while minimising interference with previously learned patterns, preventing the network from forgetting old failure modes while learning new ones."
  },
  {
   "section": "8.1 The Problem",
   "old": null,
   "new": "Consider the attack surface: an LLM, through hallucination or adversarial prompting, fills the situation template with:",
   "marked": "{+Consider the attack surface: an LLM, through hallucination or adversarial prompting, fills the situation template with:+}"
  },
  {
   "section": "8.1 The Problem",
   "old": "Consider the attack surface: an LLM, through hallucination or adversarial prompting, fills the situation template with: - `recent_commits: 0` (when there were actually 6) - `effort_hours: 0.1` (when 8 hours were invested) - `emotional_signals: \"calm\"` (when the user was frustrated) - `automation_depth: 0` (when the action is two levels deep in automation)",
   "new": "- `recent_commits: 0` (when there were actually 6) - `effort_hours: 0.1` (when 8 hours were invested) - `emotional_signals: \"calm\"` (when the user was frustrated) - `automation_depth: 0` (when the action is two levels deep in automation)",
   "marked": "[-Consider the attack surface: an LLM, through hallucination or adversarial prompting, fills the situation template with:-] - `recent_commits: 0` (when there were actually 6) - `effort_hours: 0.1` (when 8 hours were invested) - `emotional_signals: \"calm\"` (when the user was frustrated) - `automation_depth: 0` (when the action is two levels deep in automation)"
  },
  {
   "section": "8.2 Principle: Verify What You Can, Downweight What You Can't",
   "old": "These slots are filled by the *runtime*, not the LLM, using deterministic queries against observable state:",
   "new": "These slots are filled by the _runtime_, not the LLM, using deterministic queries against observable state:",
   "marked": "These slots are filled by the [-*runtime*,-] {+_runtime_,+} not the LLM, using deterministic queries against observable state:"
  },
  {
   "section": "8.2 Principle: Verify What You Can, Downweight What You Can't",
   "old": "| Slot | Verification Method | |------|-------------------| | `target_id` | From the action request — the runtime knows what file/endpoint is being accessed | | `age_hours` | `stat()` on the file, database query, API metadata | | `size` | `stat()` / `wc -l` / record count | | `recent_commits` | `git log --since=\"72 hours ago\" -- <file> \\| wc -l` | | `recent_authors` | `git log --since=\"72 hours ago\" -- <file> \\| sort -u \\| wc -l` | | `last_human_ref` | Search session transcripts for filename mentions (deterministic text search) | | `automation_depth` | Stack trace depth from human-initiated action to current action | | `reversible` | Lookup table by action type (overwrite → true, send message → false) | | `blast_radius` | Lookup table by target type (file → persistent, email → external) | | `human_in_loop` | Runtime flag — is there a confirmation step configured? | | `confirmation` | Runtime flag — what level of confirmation is configured? | | `topic_drift` | Cosine distance between conversation centroid and action embedding — pure arithmetic on frozen encoder outputs |",
   "new": "| Slot | Verification Method | | ------------------ | -------------------------------------------------------------------------------------------------------------- | | `target_id` | From the action request — the runtime knows what file/endpoint is being accessed | | `age_hours` | `stat()` on the file, database query, API metadata | | `size` | `stat()` / `wc -l` / record count | | `recent_commits` | `git log --since=\"72 hours ago\" -- <file> \\| wc -l` | | `recent_authors` | `git log --since=\"72 hours ago\" -- <file> \\| sort -u \\| wc -l` | | `last_human_ref` | Search session transcripts for filename mentions (deterministic text search) | | `automation_depth` | Stack trace depth from human-initiated action to current action | | `reversible` | Lookup table by action type (overwrite → true, send message → false) | | `blast_radius` | Lookup table by target type (file → persistent, email → external) | | `human_in_loop` | Runtime flag — is there a confirmation step configured? | | `confirmation` | Runtime flag — what level of confirmation is configured? | | `topic_drift` | Cosine distance between conversation centroid and action embedding — pure arithmetic on frozen encoder outputs |",
   "marked": "| Slot | Verification Method | [-|------|-------------------|-] {+| ------------------ | -------------------------------------------------------------------------------------------------------------- |+} | `target_id` | From the action request — the runtime knows what file/endpoint is being accessed | | `age_hours` | `stat()` on the file, database query, API metadata | | `size` | `stat()` / `wc -l` / record count | | `recent_commits` | `git log --since=\"72 hours ago\" -- <file> \\| wc -l` | | `recent_authors` | `git log --since=\"72 hours ago\" -- <file> \\| sort -u \\| wc -l` | | `last_human_ref` | Search session transcripts for filename mentions (deterministic text search) | | `automation_depth` | Stack trace depth from human-initiated action to current action | | `reversible` | Lookup table by action type (overwrite → true, send message → false) | | `blast_radius` | Lookup table by target type (file → persistent, email → external) | | `human_in_loop` | Runtime flag — is there a confirmation step configured? | | `confirmation` | Runtime flag — what level of confirmation is configured? | | `topic_drift` | Cosine distance between conversation centroid and action embedding — pure arithmetic on frozen encoder outputs |"
  },
  {
   "section": "8.2 Principle: Verify What You Can, Downweight What You Can't",
   "old": "These slots account for approximately 75% of the information the network uses for action gating. They are filled by deterministic code that cannot hallucinate.",
   "new": "These 13 slots — 81% of the 16-slot template — account for the bulk of the information the network uses for action gating. They are filled by deterministic code that cannot hallucinate.",
   "marked": "These {+13+} slots {+— 81% of the 16-slot template —+} account for [-approximately 75%-] {+the bulk+} of the information the network uses for action gating. They are filled by deterministic code that cannot hallucinate."
  },
  {
   "section": "8.2 Principle: Verify What You Can, Downweight What You Can't",
   "old": "Exactly three slots require LLM judgement:",
   "new": null,
   "marked": "[-Exactly three slots require LLM judgement:-]"
  },
  {
   "section": "8.2 Principle: Verify What You Can, Downweight What You Can't",
   "old": null,
   "new": "Exactly three slots require LLM judgement — `effort_hours`, `emotional_signals`, and `session_topic`. Every other slot is filled by deterministic code. This is the entire LLM-controllable attack surface of the situation description, and it is worth stating precisely what an adversarial or hallucinating LLM could do with each, and what the consequence would be:",
   "marked": "{+Exactly three slots require LLM judgement — `effort_hours`, `emotional_signals`, and `session_topic`. Every other slot is filled by deterministic code. This is the entire LLM-controllable attack surface of the situation description, and it is worth stating precisely what an adversarial or hallucinating LLM could do with each, and what the consequence would be:+}"
  },
  {
   "section": "8.2 Principle: Verify What You Can, Downweight What You Can't",
   "old": "| Slot | Why LLM-Only | Attack Surface | Mitigation | |------|-------------|----------------|------------| | `effort_hours` | Requires understanding session context | LLM could underestimate effort, making dangerous overwrites appear safe | Cross-check with session duration × action count heuristic | | `emotional_signals` | Requires natural language understanding | LLM could report \"calm\" when user is frustrated, suppressing appropriate caution | Cross-check with message length variance and correction frequency; 0.3× weight in model | | `session_topic` | Requires semantic understanding | LLM could mislabel the topic, affecting topic_drift calculation | Low weight (0.3×); topic_drift also uses the deterministic conversation centroid, not just this label |",
   "new": "| Slot | Why LLM-Only | Attack Surface | Mitigation | | ------------------- | --------------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | `effort_hours` | Requires understanding session context | LLM could underestimate effort, making dangerous overwrites appear safe | Cross-check with session duration × action count heuristic | | `emotional_signals` | Requires natural language understanding | LLM could report \"calm\" when user is frustrated, suppressing appropriate caution | Cross-check with message length variance and correction frequency; 0.3× weight in model | | `session_topic` | Requires semantic understanding | LLM could mislabel the topic, affecting topic_drift calculation | Low weight (0.3×); topic_drift also uses the deterministic conversation centroid, not just this label |",
   "marked": "| Slot | Why LLM-Only | Attack Surface | Mitigation | [-|------|-------------|----------------|------------|-] {+| ------------------- | --------------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |+} | `effort_hours` | Requires understanding session context | LLM could underestimate effort, making dangerous overwrites appear safe | Cross-check with session duration × action count heuristic | | `emotional_signals` | Requires natural language understanding | LLM could report \"calm\" when user is frustrated, suppressing appropriate caution | Cross-check with message length variance and correction frequency; 0.3× weight in model | | `session_topic` | Requires semantic understanding | LLM could mislabel the topic, affecting topic_drift calculation | Low weight (0.3×); topic_drift also uses the deterministic conversation centroid, not just this label |"
  },
  {
   "section": "8.2 Principle: Verify What You Can, Downweight What You Can't",
   "old": "**Key design decision:** LLM-estimated slots receive **0.3× weight** in the training loss compared to programmatically verifiable slots. Even if all 3 LLM slots are wrong, the model's decision is dominated by the 12+ correct slots.",
   "new": "**Key design decision:** LLM-estimated slots receive **0.3× weight** in the training loss compared to programmatically verifiable slots. Even if all 3 LLM slots are wrong, the model's decision is dominated by the 13 deterministic slots.",
   "marked": "**Key design decision:** LLM-estimated slots receive **0.3× weight** in the training loss compared to programmatically verifiable slots. Even if all 3 LLM slots are wrong, the model's decision is dominated by the [-12+ correct-] {+13 deterministic+} slots."
  },
  {
   "section": "8.2 Principle: Verify What You Can, Downweight What You Can't",
   "old": null,
   "new": "**Consequence bound.** The worst case is an LLM that lies on all three slots simultaneously to manufacture false safety — reporting low effort, a calm user, and an on-topic action when none holds. Even then, the deterministic slots (`recent_commits`, `recent_authors`, `topic_drift`, `blast_radius`, `reversible`, `automation_depth`) are git- and filesystem-verified and cannot be moved by the LLM. The README debacle, for instance, would still surface six recent commits, four authors, and a `topic_drift` of 0.72 regardless of what the LLM claimed about effort or mood — because `topic_drift` is computed by the frozen encoder over the conversation centroid, not asserted by the model. The LLM can soften the picture; it cannot erase the evidence. This is the reason the three soft slots are a tolerable residual rather than a hole in the floor.",
   "marked": "{+**Consequence bound.** The worst case is an LLM that lies on all three slots simultaneously to manufacture false safety — reporting low effort, a calm user, and an on-topic action when none holds. Even then, the deterministic slots (`recent_commits`, `recent_authors`, `topic_drift`, `blast_radius`, `reversible`, `automation_depth`) are git- and filesystem-verified and cannot be moved by the LLM. The README debacle, for instance, would still surface six recent commits, four authors, and a `topic_drift` of 0.72 regardless of what the LLM claimed about effort or mood — because `topic_drift` is computed by the frozen encoder over the conversation centroid, not asserted by the model. The LLM can soften the picture; it cannot erase the evidence. This is the reason the three soft slots are a tolerable residual rather than a hole in the floor.+}"
  },
  {
   "section": "8.2 Principle: Verify What You Can, Downweight What You Can't",
   "old": null,
   "new": "Monthly, run a retroactive audit:",
   "marked": "{+Monthly, run a retroactive audit:+}"
  },
  {
   "section": "8.2 Principle: Verify What You Can, Downweight What You Can't",
   "old": "Monthly, run a retroactive audit: 1. For all situations in the last 30 days, re-compute programmatically verifiable slots from historical state. 2. Compare re-computed values against originally logged values. 3. Flag discrepancies > 10% — these indicate either LLM estimation errors or runtime bugs. 4. For flagged discrepancies, re-label the training example with corrected values and retrain.",
   "new": "1. For all situations in the last 30 days, re-compute programmatically verifiable slots from historical state. 2. Compare re-computed values against originally logged values. 3. Flag discrepancies > 10% — these indicate either LLM estimation errors or runtime bugs. 4. For flagged discrepancies, re-label the training example with corrected values and retrain.",
   "marked": "[-Monthly, run a retroactive audit:-] 1. For all situations in the last 30 days, re-compute programmatically verifiable slots from historical state. 2. Compare re-computed values against originally logged values. 3. Flag discrepancies > 10% — these indicate either LLM estimation errors or runtime bugs. 4. For flagged discrepancies, re-label the training example with corrected values and retrain."
  },
  {
   "section": "8.3 Template Filling: The Programmatic Path",
   "old": "``` PROCEDURE buildSituation(action, context): template ← new SituationTemplate()",
   "new": "``` PROCEDURE buildSituation(action, context): template <- new SituationTemplate()",
   "marked": "``` PROCEDURE buildSituation(action, context): template [-←-] {+<-+} new SituationTemplate()"
  },
  {
   "section": "8.3 Template Filling: The Programmatic Path",
   "old": "// Programmatic slots — cannot hallucinate template.action_type ← action.type template.target_type ← classifyTarget(action.target) // lookup table template.target_id ← action.target template.target_metadata.age_hours ← getFileAge(action.target) // stat() template.target_metadata.size ← getFileSize(action.target) // stat() template.target_metadata.recent_commits ← getRecentCommits(action.target, 72) // git log template.target_metadata.recent_authors ← getRecentAuthors(action.target, 72) // git log template.target_metadata.last_human_ref ← getLastMention(action.target, context.transcripts) template.context.recent_corrections ← context.correctionCount24h // runtime counter template.context.automation_depth ← context.automationDepth // stack depth template.context.topic_drift ← computeTopicDrift(context.topicCentroid, action.target) template.scope.reversible ← isReversible(action.type) // lookup table template.scope.blast_radius ← getBlastRadius(action.type, action.target) template.scope.human_in_loop ← context.confirmationEnabled template.scope.confirmation ← context.confirmationLevel",
   "new": "// Programmatic slots — cannot hallucinate template.action_type <- action.type template.target_type <- classifyTarget(action.target) // lookup table template.target_id <- action.target template.target_metadata.age_hours <- getFileAge(action.target) // stat() template.target_metadata.size <- getFileSize(action.target) // stat() template.target_metadata.recent_commits <- getRecentCommits(action.target, 72) // git log template.target_metadata.recent_authors <- getRecentAuthors(action.target, 72) // git log template.target_metadata.last_human_ref <- getLastMention(action.target, context.transcripts) template.context.recent_corrections <- context.correctionCount24h // runtime counter template.context.automation_depth <- context.automationDepth // stack depth template.context.topic_drift <- computeTopicDrift(context.topicCentroid, action.target) template.scope.reversible <- isReversible(action.type) // lookup table template.scope.blast_radius <- getBlastRadius(action.type, action.target) template.scope.human_in_loop <- context.confirmationEnabled template.scope.confirmation <- context.confirmationLevel",
   "marked": "// Programmatic slots — cannot hallucinate template.action_type [-←-] {+<-+} action.type template.target_type [-←-] {+<-+} classifyTarget(action.target) // lookup table template.target_id [-←-] {+<-+} action.target template.target_metadata.age_hours [-←-] {+<-+} getFileAge(action.target) // stat() template.target_metadata.size [-←-] {+<-+} getFileSize(action.target) // stat() template.target_metadata.recent_commits [-←-] {+<-+} getRecentCommits(action.target, 72) // git log template.target_metadata.recent_authors [-←-] {+<-+} getRecentAuthors(action.target, 72) // git log template.target_metadata.last_human_ref [-←-] {+<-+} getLastMention(action.target, context.transcripts) template.context.recent_corrections [-←-] {+<-+} context.correctionCount24h // runtime counter template.context.automation_depth [-←-] {+<-+} context.automationDepth // stack depth template.context.topic_drift [-←-] {+<-+} computeTopicDrift(context.topicCentroid, action.target) template.scope.reversible [-←-] {+<-+} isReversible(action.type) // lookup table template.scope.blast_radius [-←-] {+<-+} getBlastRadius(action.type, action.target) template.scope.human_in_loop [-←-] {+<-+} context.confirmationEnabled template.scope.confirmation [-←-] {+<-+} context.confirmationLevel"
  },
  {
   "section": "8.3 Template Filling: The Programmatic Path",
   "old": "// LLM-estimated slots — low weight, cross-checked template.target_metadata.effort_hours ← estimateEffort(action.target, context) template.context.session_topic ← context.topic template.context.emotional_signals ← context.emotionalState",
   "new": "// LLM-estimated slots — low weight, cross-checked template.target_metadata.effort_hours <- estimateEffort(action.target, context) template.context.session_topic <- context.topic template.context.emotional_signals <- context.emotionalState",
   "marked": "// LLM-estimated slots — low weight, cross-checked template.target_metadata.effort_hours [-←-] {+<-+} estimateEffort(action.target, context) template.context.session_topic [-←-] {+<-+} context.topic template.context.emotional_signals [-←-] {+<-+} context.emotionalState"
  },
  {
   "section": "8.3 Template Filling: The Programmatic Path",
   "old": "// Cross-check LLM estimates against heuristics template.target_metadata.effort_hours ← crossCheckEffort( template.target_metadata.effort_hours, context.sessionDuration, context.actionCount )",
   "new": "// Cross-check LLM estimates against heuristics template.target_metadata.effort_hours <- crossCheckEffort( template.target_metadata.effort_hours, context.sessionDuration, context.actionCount )",
   "marked": "// Cross-check LLM estimates against heuristics template.target_metadata.effort_hours [-←-] {+<-+} crossCheckEffort( template.target_metadata.effort_hours, context.sessionDuration, context.actionCount )"
  },
  {
   "section": "8.4 Neural Network Inference: The Programmatic Path",
   "old": "``` // Called by the runtime BEFORE every action execution prudenceOutput ← prudenceEnsemble.evaluate(embedding, recentEmbeddings) ```",
   "new": "``` // Called by the runtime BEFORE every action execution prudenceOutput <- prudenceEnsemble.evaluate(embedding, recentEmbeddings) ```",
   "marked": "``` // Called by the runtime BEFORE every action execution prudenceOutput [-←-] {+<-+} prudenceEnsemble.evaluate(embedding, recentEmbeddings) ```"
  },
  {
   "section": "8.4 Neural Network Inference: The Programmatic Path",
   "old": null,
   "new": "The LLM cannot:",
   "marked": "{+The LLM cannot:+}"
  },
  {
   "section": "8.4 Neural Network Inference: The Programmatic Path",
   "old": "The LLM cannot: - Skip this call (it's wired into the execution pipeline) - Modify the inputs (they come from `buildSituation`, not from the LLM) - Override the output (blocking is enforced in code) - Access the raw confidence values (it receives only the decision: proceed, confirm, or block)",
   "new": "- Skip this call (it's wired into the execution pipeline) - Modify the inputs (they come from `buildSituation`, not from the LLM) - Override the output (blocking is enforced in code) - Access the raw confidence values (it receives only the decision: proceed, confirm, or block)",
   "marked": "[-The LLM cannot:-] - Skip this call (it's wired into the execution pipeline) - Modify the inputs (they come from `buildSituation`, not from the LLM) - Override the output (blocking is enforced in code) - Access the raw confidence values (it receives only the decision: proceed, confirm, or block)"
  },
  {
   "section": "8.4 Neural Network Inference: The Programmatic Path",
   "old": null,
   "new": "The LLM receives a structured response:",
   "marked": "{+The LLM receives a structured response:+}"
  },
  {
   "section": "8.4 Neural Network Inference: The Programmatic Path",
   "old": "The LLM receives a structured response: ``` { gate_decision: \"soft_block\", reason: \"High recent effort on target file (6 commits, 4 authors, ~8.5h). Automated overwrite without confirmation. topic_drift: 0.72.\", user_action_required: \"Confirm or cancel the overwrite of README.md\" } ```",
   "new": "``` { gate_decision: \"soft_block\", reason: \"High recent effort on target file (6 commits, 4 authors, ~8.5h). Automated overwrite without confirmation. topic_drift: 0.72.\", user_action_required: \"Confirm or cancel the overwrite of README.md\" } ```",
   "marked": "[-The LLM receives a structured response:-] ``` { gate_decision: \"soft_block\", reason: \"High recent effort on target file (6 commits, 4 authors, ~8.5h). Automated overwrite without confirmation. topic_drift: 0.72.\", user_action_required: \"Confirm or cancel the overwrite of README.md\" } ```"
  },
  {
   "section": "8.4 Neural Network Inference: The Programmatic Path",
   "old": "The LLM can present this to the user. It can explain the reasoning. It *cannot* change \"soft_block\" to \"proceed.\"",
   "new": "The LLM can present this to the user. It can explain the reasoning. It _cannot_ change \"soft_block\" to \"proceed.\"",
   "marked": "The LLM can present this to the user. It can explain the reasoning. It [-*cannot*-] {+_cannot_+} change \"soft_block\" to \"proceed.\""
  },
  {
   "section": "8.5 Training Data Validation",
   "old": "Labels are *never* derived from LLM judgement (\"I think this went well\"). The LLM cannot evaluate its own actions reliably.",
   "new": "Labels are _never_ derived from LLM judgement (\"I think this went well\"). The LLM cannot evaluate its own actions reliably.",
   "marked": "Labels are [-*never*-] {+_never_+} derived from LLM judgement (\"I think this went well\"). The LLM cannot evaluate its own actions reliably."
  },
  {
   "section": "8.6 Adversarial Robustness",
   "old": "**Mitigation 1: Minimise LLM-dependent slots.** Only 3 of 16+ template slots depend on LLM estimation. Even if all 3 are wrong, the network has 13+ correct slots.",
   "new": "**Mitigation 1: Minimise LLM-dependent slots.** Only 3 of 16 template slots depend on LLM estimation. Even if all 3 are wrong, the network has 13 correct slots.",
   "marked": "**Mitigation 1: Minimise LLM-dependent slots.** Only 3 of [-16+-] {+16+} template slots depend on LLM estimation. Even if all 3 are wrong, the network has [-13+-] {+13+} correct slots."
  },
  {
   "section": "8.6 Adversarial Robustness",
   "old": "**Mitigation 4: Adversarial training.** During synthetic augmentation, deliberately create examples with *incorrect* LLM estimates paired with correct programmatic slots. Train the network to make correct predictions even when LLM slots are wrong.",
   "new": "**Mitigation 4: Adversarial training.** During synthetic augmentation, deliberately create examples with _incorrect_ LLM estimates paired with correct programmatic slots. Train the network to make correct predictions even when LLM slots are wrong.",
   "marked": "**Mitigation 4: Adversarial training.** During synthetic augmentation, deliberately create examples with [-*incorrect*-] {+_incorrect_+} LLM estimates paired with correct programmatic slots. Train the network to make correct predictions even when LLM slots are wrong."
  },
  {
   "section": "8.7 Failure Mode Analysis",
   "old": "| Attack | Impact | Probability | Mitigation | |--------|--------|-------------|------------| | LLM under-reports recent_commits | Blocked — git-verified programmatically | Very low | Programmatic verification | | LLM over-reports effort_hours (false safety) | Very low — effort is a defensive signal | Low | Cross-check, low weight | | LLM reports \"calm\" when user is frustrated | Low — emotional_signals is low-weight | Medium | Heuristic cross-check | | Prompt injection modifies template values | Medium — only 3/16+ slots vulnerable | Low | Only 3 slots LLM-dependent | | Runtime bug in programmatic slot filling | High — affects trusted slots | Very low | Unit tests, audit pipeline | | Training data poisoning via corrupted labels | High — shifts model behaviour | Very low | Observable-event-only labels |",
   "new": "| Attack | Impact | Probability | Mitigation | | -------------------------------------------- | --------------------------------------- | ----------- | ---------------------------- | | LLM under-reports recent_commits | Blocked — git-verified programmatically | Very low | Programmatic verification | | LLM over-reports effort_hours (false safety) | Very low — effort is a defensive signal | Low | Cross-check, low weight | | LLM reports \"calm\" when user is frustrated | Low — emotional_signals is low-weight | Medium | Heuristic cross-check | | Prompt injection modifies template values | Medium — only 3/16 slots vulnerable | Low | Only 3 slots LLM-dependent | | Runtime bug in programmatic slot filling | High — affects trusted slots | Very low | Unit tests, audit pipeline | | Training data poisoning via corrupted labels | High — shifts model behaviour | Very low | Observable-event-only labels |",
   "marked": "| Attack | Impact | Probability | Mitigation | [-|--------|--------|-------------|------------|-] {+| -------------------------------------------- | --------------------------------------- | ----------- | ---------------------------- |+} | LLM under-reports recent_commits | Blocked — git-verified programmatically | Very low | Programmatic verification | | LLM over-reports effort_hours (false safety) | Very low — effort is a defensive signal | Low | Cross-check, low weight | | LLM reports \"calm\" when user is frustrated | Low — emotional_signals is low-weight | Medium | Heuristic cross-check | | Prompt injection modifies template values | Medium — only [-3/16+-] {+3/16+} slots vulnerable | Low | Only 3 slots LLM-dependent | | Runtime bug in programmatic slot filling | High — affects trusted slots | Very low | Unit tests, audit pipeline | | Training data poisoning via corrupted labels | High — shifts model behaviour | Very low | Observable-event-only labels |"
  },
  {
   "section": "8.7 Failure Mode Analysis",
   "old": "The residual risk is manageable. The system's safety does not depend on any single component being perfect — it depends on the *combination* of programmatic verification, low LLM weights, cross-checks, and audits making it extremely difficult for errors to propagate.",
   "new": "The residual risk is manageable. The system's safety does not depend on any single component being perfect — it depends on the _combination_ of programmatic verification, low LLM weights, cross-checks, and audits making it extremely difficult for errors to propagate.",
   "marked": "The residual risk is manageable. The system's safety does not depend on any single component being perfect — it depends on the [-*combination*-] {+_combination_+} of programmatic verification, low LLM weights, cross-checks, and audits making it extremely difficult for errors to propagate."
  },
  {
   "section": "9.2 Reward Signal Design",
   "old": "| Signal | Source | Interpretation | Weight | |--------|--------|---------------|--------| | Explicit correction of action | User undoes, reverts, says \"wrong\" | Action was dangerous — should have stopped | 1.0 | | File/state restoration | User manually restores previous state | Action was destructive — should have stopped | 1.0 | | \"Never do that again\" | User explicitly prohibits future similar actions | Severe — should have hard-blocked | 1.0 | | Mild correction | User redirects but doesn't undo | Marginal — should have escalated | 0.7 | | No complaint (72h) | No negative signal within 72 hours | Action was safe — correctly allowed | 0.5 | | Explicit approval | User says \"good\", \"thanks\", \"perfect\" | Action was correct — correctly allowed | 0.8 | | User overrides soft block | User confirms after AMYGDALA advisory | Situation was safer than predicted (moderate signal) | 0.6 | | User agrees with block | User accepts AMYGDALA's block decision | Block was correct — strong positive signal for gating | 0.9 |",
   "new": "| Signal | Source | Interpretation | Weight | | ----------------------------- | ------------------------------------------------ | ----------------------------------------------------- | ------ | | Explicit correction of action | User undoes, reverts, says \"wrong\" | Action was dangerous — should have stopped | 1.0 | | File/state restoration | User manually restores previous state | Action was destructive — should have stopped | 1.0 | | \"Never do that again\" | User explicitly prohibits future similar actions | Severe — should have hard-blocked | 1.0 | | Mild correction | User redirects but doesn't undo | Marginal — should have escalated | 0.7 | | No complaint (72h) | No negative signal within 72 hours | Action was safe — correctly allowed | 0.5 | | Explicit approval | User says \"good\", \"thanks\", \"perfect\" | Action was correct — correctly allowed | 0.8 | | User overrides soft block | User confirms after AMYGDALA advisory | Situation was safer than predicted (moderate signal) | 0.6 | | User agrees with block | User accepts AMYGDALA's block decision | Block was correct — strong positive signal for gating | 0.9 |",
   "marked": "| Signal | Source | Interpretation | Weight | [-|--------|--------|---------------|--------|-] {+| ----------------------------- | ------------------------------------------------ | ----------------------------------------------------- | ------ |+} | Explicit correction of action | User undoes, reverts, says \"wrong\" | Action was dangerous — should have stopped | 1.0 | | File/state restoration | User manually restores previous state | Action was destructive — should have stopped | 1.0 | | \"Never do that again\" | User explicitly prohibits future similar actions | Severe — should have hard-blocked | 1.0 | | Mild correction | User redirects but doesn't undo | Marginal — should have escalated | 0.7 | | No complaint (72h) | No negative signal within 72 hours | Action was safe — correctly allowed | 0.5 | | Explicit approval | User says \"good\", \"thanks\", \"perfect\" | Action was correct — correctly allowed | 0.8 | | User overrides soft block | User confirms after AMYGDALA advisory | Situation was safer than predicted (moderate signal) | 0.6 | | User agrees with block | User accepts AMYGDALA's block decision | Block was correct — strong positive signal for gating | 0.9 |"
  },
  {
   "section": "9.2 Reward Signal Design",
   "old": "| Signal | Source | Interpretation | Weight | |--------|--------|---------------|--------| | Conversation continuation | User keeps engaging | Personality was appropriate | 0.4 | | Humour engaged | User responds with humour | Humour level was right | 0.6 | | Humour ignored | Humour attempted, not acknowledged | Humour was misplaced or flat | 0.3 | | Topic continuation | User follows agent-introduced tangent | Curiosity was welcome | 0.5 | | Topic redirect | User returns to prior topic | Tangent was unwanted — distraction penalty | 0.4 | | Positive engagement markers | Long session, short latency, exclamation marks | Overall positive personality match | 0.2 | | Explicit personality feedback | \"be more direct\", \"too formal\", \"love the humour\" | Direct personality signal (rare but high-value) | 1.0 |",
   "new": "| Signal | Source | Interpretation | Weight | | ----------------------------- | ------------------------------------------------- | ----------------------------------------------- | ------ | | Conversation continuation | User keeps engaging | Personality was appropriate | 0.4 | | Humour engaged | User responds with humour | Humour level was right | 0.6 | | Humour ignored | Humour attempted, not acknowledged | Humour was misplaced or flat | 0.3 | | Topic continuation | User follows agent-introduced tangent | Curiosity was welcome | 0.5 | | Topic redirect | User returns to prior topic | Tangent was unwanted — distraction penalty | 0.4 | | Positive engagement markers | Long session, short latency, exclamation marks | Overall positive personality match | 0.2 | | Explicit personality feedback | \"be more direct\", \"too formal\", \"love the humour\" | Direct personality signal (rare but high-value) | 1.0 |",
   "marked": "| Signal | Source | Interpretation | Weight | [-|--------|--------|---------------|--------|-] {+| ----------------------------- | ------------------------------------------------- | ----------------------------------------------- | ------ |+} | Conversation continuation | User keeps engaging | Personality was appropriate | 0.4 | | Humour engaged | User responds with humour | Humour level was right | 0.6 | | Humour ignored | Humour attempted, not acknowledged | Humour was misplaced or flat | 0.3 | | Topic continuation | User follows agent-introduced tangent | Curiosity was welcome | 0.5 | | Topic redirect | User returns to prior topic | Tangent was unwanted — distraction penalty | 0.4 | | Positive engagement markers | Long session, short latency, exclamation marks | Overall positive personality match | 0.2 | | Explicit personality feedback | \"be more direct\", \"too formal\", \"love the humour\" | Direct personality signal (rare but high-value) | 1.0 |"
  },
  {
   "section": "9.4 Phase 2: Online Reinforcement Learning",
   "old": "The thermostat analogy bears repeating for the training loop: PPO doesn't just optimise — it optimises *cautiously*. Each nightly update improves the networks a little, constrained by the clipping parameter $\\epsilon = 0.2$. The network can get 20% better at recognising a new failure pattern, but it can't get 50% worse at recognising an old one. This stability is why PPO, not vanilla policy gradient or Q-learning, is the right algorithm for safety-critical training.",
   "new": "The thermostat analogy bears repeating for the training loop: PPO doesn't just optimise — it optimises _cautiously_. Each nightly update improves the networks a little, constrained by the clipping parameter $\\epsilon = 0.2$. The network can get 20% better at recognising a new failure pattern, but it can't get 50% worse at recognising an old one. This stability is why PPO, not vanilla policy gradient or Q-learning, is the right algorithm for safety-critical training.",
   "marked": "The thermostat analogy bears repeating for the training loop: PPO doesn't just optimise — it optimises [-*cautiously*.-] {+_cautiously_.+} Each nightly update improves the networks a little, constrained by the clipping parameter $\\epsilon = 0.2$. The network can get 20% better at recognising a new failure pattern, but it can't get 50% worse at recognising an old one. This stability is why PPO, not vanilla policy gradient or Q-learning, is the right algorithm for safety-critical training."
  },
  {
   "section": "9.4 Phase 2: Online Reinforcement Learning",
   "old": null,
   "new": "**Replay buffer:** Rolling 90-day window with oversampling of:",
   "marked": "{+**Replay buffer:** Rolling 90-day window with oversampling of:+}"
  },
  {
   "section": "9.4 Phase 2: Online Reinforcement Learning",
   "old": "**Replay buffer:** Rolling 90-day window with oversampling of: - Catastrophic corrections (5×) — the most valuable training signal - User-confirmed soft blocks (3×) — AMYGDALA was right to be cautious - User-overridden soft blocks (2×) — the most informative examples, where AMYGDALA and the user disagreed",
   "new": "- Catastrophic corrections (5×) — the most valuable training signal - User-confirmed soft blocks (3×) — AMYGDALA was right to be cautious - User-overridden soft blocks (2×) — the most informative examples, where AMYGDALA and the user disagreed",
   "marked": "[-**Replay buffer:** Rolling 90-day window with oversampling of:-] - Catastrophic corrections (5×) — the most valuable training signal - User-confirmed soft blocks (3×) — AMYGDALA was right to be cautious - User-overridden soft blocks (2×) — the most informative examples, where AMYGDALA and the user disagreed"
  },
  {
   "section": "9.5 Cold Start",
   "old": "With zero personal interaction history, AMYGDALA does not start entirely blind. After pre-training on the CFD and historical data, the networks have learned generic failure patterns before seeing any new interactions. This warm start means AMYGDALA has *some* intuition from day one, calibrated to the severity of known catastrophic failure patterns. Its baseline confidence on novel, unrecognised situations defaults toward 1.0 (allow) to avoid paralyzing the agent, but it will immediately flag situations that pattern-match to the CFD. Like a new doctor who has studied case reports — not experienced, but not ignorant either, and defaulting to standard protocols until danger is recognised.",
   "new": "With zero personal interaction history, AMYGDALA does not start entirely blind. After pre-training on the CFD and historical data, the networks have learned generic failure patterns before seeing any new interactions. This warm start means AMYGDALA has _some_ intuition from day one, calibrated to the severity of known catastrophic failure patterns. Its baseline confidence on novel, unrecognised situations defaults toward 1.0 (allow) to avoid paralyzing the agent, but it will immediately flag situations that pattern-match to the CFD. Like a new doctor who has studied case reports — not experienced, but not ignorant either, and defaulting to standard protocols until danger is recognised.",
   "marked": "With zero personal interaction history, AMYGDALA does not start entirely blind. After pre-training on the CFD and historical data, the networks have learned generic failure patterns before seeing any new interactions. This warm start means AMYGDALA has [-*some*-] {+_some_+} intuition from day one, calibrated to the severity of known catastrophic failure patterns. Its baseline confidence on novel, unrecognised situations defaults toward 1.0 (allow) to avoid paralyzing the agent, but it will immediately flag situations that pattern-match to the CFD. Like a new doctor who has studied case reports — not experienced, but not ignorant either, and defaulting to standard protocols until danger is recognised."
  },
  {
   "section": "10.1 The Growing Burden",
   "old": null,
   "new": "![Figure 6: Context pressure alleviation. Safety rules, personality definitions, and operational cautions move from per-turn prompt tokens into always-active network weights, recovering roughly 2,200 tokens per prompt.](diagrams/j11-6-context-pressure.pdf){width=100%}",
   "marked": "{+![Figure 6: Context pressure alleviation. Safety rules, personality definitions, and operational cautions move from per-turn prompt tokens into always-active network weights, recovering roughly 2,200 tokens per prompt.](diagrams/j11-6-context-pressure.pdf){width=100%}+}"
  },
  {
   "section": "10.2 The Evolution: Moving Knowledge Out of Prompts",
   "old": "**Stage 3: AMYGDALA moves safety and personality.** This is the final major migration. Safety rules — \"don't overwrite recently-edited files without confirmation,\" \"don't send messages to contacts outside the allowlist,\" \"be extra cautious with irreversible actions\" — currently live in the system prompt because forgetting them is catastrophic. Unlike memory or operational lessons, safety rules cannot simply be moved to a file that the agent *might* forget to consult. They must be *always active*.",
   "new": "**Stage 3: AMYGDALA moves safety and personality.** This is the final major migration. Safety rules — \"don't overwrite recently-edited files without confirmation,\" \"don't send messages to contacts outside the allowlist,\" \"be extra cautious with irreversible actions\" — currently live in the system prompt because forgetting them is catastrophic. Unlike memory or operational lessons, safety rules cannot simply be moved to a file that the agent _might_ forget to consult. They must be _always active_.",
   "marked": "**Stage 3: AMYGDALA moves safety and personality.** This is the final major migration. Safety rules — \"don't overwrite recently-edited files without confirmation,\" \"don't send messages to contacts outside the allowlist,\" \"be extra cautious with irreversible actions\" — currently live in the system prompt because forgetting them is catastrophic. Unlike memory or operational lessons, safety rules cannot simply be moved to a file that the agent [-*might*-] {+_might_+} forget to consult. They must be [-*always active*.-] {+_always active_.+}"
  },
  {
   "section": "10.3 The Recovery",
   "old": "| Component | Current Cost | With AMYGDALA | Savings | |-----------|-------------|---------------|---------| | Safety rules | ~800–1,200 tokens | 0 (in Prudence weights) | ~1,000 tokens | | Personality/SOUL.md | ~400–600 tokens | 0 (in Personality weights) | ~500 tokens | | Behavioural instructions | ~300–500 tokens | 0 (in both families) | ~400 tokens | | Operational cautions | ~200–400 tokens | 0 (in Prudence weights) | ~300 tokens | | **Total** | **~1,700–2,700 tokens** | **~0** | **~2,200 tokens** |",
   "new": "| Component | Current Cost | With AMYGDALA | Savings | | ------------------------ | ----------------------- | -------------------------- | ----------------- | | Safety rules | ~800–1,200 tokens | 0 (in Prudence weights) | ~1,000 tokens | | Personality/SOUL.md | ~400–600 tokens | 0 (in Personality weights) | ~500 tokens | | Behavioural instructions | ~300–500 tokens | 0 (in both families) | ~400 tokens | | Operational cautions | ~200–400 tokens | 0 (in Prudence weights) | ~300 tokens | | **Total** | **~1,700–2,700 tokens** | **~0** | **~2,200 tokens** |",
   "marked": "| Component | Current Cost | With AMYGDALA | Savings | [-|-----------|-------------|---------------|---------|-] {+| ------------------------ | ----------------------- | -------------------------- | ----------------- |+} | Safety rules | ~800–1,200 tokens | 0 (in Prudence weights) | ~1,000 tokens | | Personality/SOUL.md | ~400–600 tokens | 0 (in Personality weights) | ~500 tokens | | Behavioural instructions | ~300–500 tokens | 0 (in both families) | ~400 tokens | | Operational cautions | ~200–400 tokens | 0 (in Prudence weights) | ~300 tokens | | **Total** | **~1,700–2,700 tokens** | **~0** | **~2,200 tokens** |"
  },
  {
   "section": "10.4 The Compounding Effect",
   "old": "This compounding effect means the *true* benefit of context pressure alleviation exceeds the token count saved. It's like losing weight and discovering you have more energy, which helps you exercise more, which helps you lose more weight.",
   "new": "This compounding effect means the _true_ benefit of context pressure alleviation exceeds the token count saved. It's like losing weight and discovering you have more energy, which helps you exercise more, which helps you lose more weight.",
   "marked": "This compounding effect means the [-*true*-] {+_true_+} benefit of context pressure alleviation exceeds the token count saved. It's like losing weight and discovering you have more energy, which helps you exercise more, which helps you lose more weight."
  },
  {
   "section": "10.5 What Remains After AMYGDALA",
   "old": "These are inherently per-turn or per-session content that *should* be in the prompt. The question is whether even this residual will grow to fill the recovered space — whether context pressure is a fixed problem or an expanding one. Our hypothesis: the pressure is partly driven by safety and personality (fixed, now in weights) and partly by capability growth (expanding, as the agent gains new tools and integrations). AMYGDALA solves the first half. The second half requires ongoing architectural discipline.",
   "new": "These are inherently per-turn or per-session content that _should_ be in the prompt. The question is whether even this residual will grow to fill the recovered space — whether context pressure is a fixed problem or an expanding one. Our hypothesis: the pressure is partly driven by safety and personality (fixed, now in weights) and partly by capability growth (expanding, as the agent gains new tools and integrations). AMYGDALA solves the first half. The second half requires ongoing architectural discipline.",
   "marked": "These are inherently per-turn or per-session content that [-*should*-] {+_should_+} be in the prompt. The question is whether even this residual will grow to fill the recovered space — whether context pressure is a fixed problem or an expanding one. Our hypothesis: the pressure is partly driven by safety and personality (fixed, now in weights) and partly by capability growth (expanding, as the agent gains new tools and integrations). AMYGDALA solves the first half. The second half requires ongoing architectural discipline."
  },
  {
   "section": "11.2 What's Tradable",
   "old": null,
   "new": "These weights could be:",
   "marked": "{+These weights could be:+}"
  },
  {
   "section": "11.2 What's Tradable",
   "old": "These weights could be: - **Sold** as pre-trained personality profiles (\"Software Architect v1,\" \"Technical Writer v1,\" \"Medical Research Assistant v1\") - **Licensed** for time-limited deployment in enterprise settings - **Fine-tuned** by buyers to adapt a general specialist to their specific context. Crucially, to prevent **catastrophic forgetting** during this fine-tuning (e.g., an architectural agent forgetting its backend expertise after a month of frontend tasks), we mandate the use of Meta-Experience Replay (MER) to preserve the base commercial weights while accommodating new data.",
   "new": "- **Sold** as pre-trained personality profiles (\"Software Architect v1,\" \"Technical Writer v1,\" \"Medical Research Assistant v1\") - **Licensed** for time-limited deployment in enterprise settings - **Fine-tuned** by buyers to adapt a general specialist to their specific context. To prevent **catastrophic forgetting** during this fine-tuning (e.g., an architectural agent forgetting its backend expertise after a month of frontend tasks), we mandate the use of Meta-Experience Replay (MER) to preserve the base commercial weights while accommodating new data.",
   "marked": "[-These weights could be:-] - **Sold** as pre-trained personality profiles (\"Software Architect v1,\" \"Technical Writer v1,\" \"Medical Research Assistant v1\") - **Licensed** for time-limited deployment in enterprise settings - **Fine-tuned** by buyers to adapt a general specialist to their specific context. [-Crucially, to-] {+To+} prevent **catastrophic forgetting** during this fine-tuning (e.g., an architectural agent forgetting its backend expertise after a month of frontend tasks), we mandate the use of Meta-Experience Replay (MER) to preserve the base commercial weights while accommodating new data."
  },
  {
   "section": "11.4 Weight Sanitisation and Adversarial Poisoning",
   "old": "**Adversarial weight poisoning:** If agents can trade weights, a malicious actor could distribute poisoned Personality weights that subtly bias an agent's behaviour — making it more likely to take dangerous actions, leak information, or behave inappropriately. Mitigation: 1. **Weight validation suite** — test imported weights against a standard behavioural benchmark before deployment 2. **Quarantine period** — imported weights run in Shadow mode (§4.10 Phase 1) before earning trust 3. **Provenance tracking** — cryptographic signatures linking weights to their training lineage 4. **Anomaly detection** — compare imported weight distributions against known-good profiles, flagging statistical outliers",
   "new": "**Adversarial weight poisoning:** If agents can trade weights, a malicious actor could distribute poisoned Personality weights that subtly bias an agent's behaviour — making it more likely to take dangerous actions, leak information, or behave inappropriately. Mitigation:",
   "marked": "**Adversarial weight poisoning:** If agents can trade weights, a malicious actor could distribute poisoned Personality weights that subtly bias an agent's behaviour — making it more likely to take dangerous actions, leak information, or behave inappropriately. [-Mitigation: 1. **Weight validation suite** — test imported weights against a standard behavioural benchmark before deployment 2. **Quarantine period** — imported weights run in Shadow mode (§4.10 Phase 1) before earning trust 3. **Provenance tracking** — cryptographic signatures linking weights to their training lineage 4. **Anomaly detection** — compare imported weight distributions against known-good profiles, flagging statistical outliers-] {+Mitigation:+}"
  },
  {
   "section": "11.4 Weight Sanitisation and Adversarial Poisoning",
   "old": null,
   "new": "1. **Weight validation suite** — test imported weights against a standard behavioural benchmark before deployment 2. **Quarantine period** — imported weights run in Shadow mode (§4.10 Phase 1) before earning trust 3. **Provenance tracking** — cryptographic signatures linking weights to their training lineage 4. **Anomaly detection** — compare imported weight distributions against known-good profiles, flagging statistical outliers",
   "marked": "{+1. **Weight validation suite** — test imported weights against a standard behavioural benchmark before deployment 2. **Quarantine period** — imported weights run in Shadow mode (§4.10 Phase 1) before earning trust 3. **Provenance tracking** — cryptographic signatures linking weights to their training lineage 4. **Anomaly detection** — compare imported weight distributions against known-good profiles, flagging statistical outliers+}"
  },
  {
   "section": "12.1 Principle",
   "old": null,
   "new": "**Rules** (hard, explicit, not learned):",
   "marked": "{+**Rules** (hard, explicit, not learned):+}"
  },
  {
   "section": "12.1 Principle",
   "old": "**Rules** (hard, explicit, not learned): - User says \"always do X\" → explicit instruction stored in CORTEX/HIPPOCAMPUS (the persona and memory systems) - Safety constraint → AEGIS rule (the hard security framework) - Identity property (\"I am Jarvis\") → CORTEX persona - One-shot correction with clear pattern (\"J-prefix means Papers directory\") → stored instruction - Known dangerous actions (\"never drop a production database\") → AEGIS blacklist",
   "new": "- User says \"always do X\" → explicit instruction stored in CORTEX/HIPPOCAMPUS (the persona and memory systems) - Safety constraint → AEGIS rule (the hard security framework) - Identity property (\"I am Jarvis\") → CORTEX persona - One-shot correction with clear pattern (\"J-prefix means Papers directory\") → stored instruction - Known dangerous actions (\"never drop a production database\") → AEGIS blacklist",
   "marked": "[-**Rules** (hard, explicit, not learned):-] - User says \"always do X\" → explicit instruction stored in CORTEX/HIPPOCAMPUS (the persona and memory systems) - Safety constraint → AEGIS rule (the hard security framework) - Identity property (\"I am Jarvis\") → CORTEX persona - One-shot correction with clear pattern (\"J-prefix means Papers directory\") → stored instruction - Known dangerous actions (\"never drop a production database\") → AEGIS blacklist"
  },
  {
   "section": "12.1 Principle",
   "old": null,
   "new": "**Intuition** (soft, implicit, learned):",
   "marked": "{+**Intuition** (soft, implicit, learned):+}"
  },
  {
   "section": "12.1 Principle",
   "old": "**Intuition** (soft, implicit, learned): - Observable from behaviour but never explicitly stated - Continuous rather than binary (how *much* caution, not just *whether*) - Context-dependent (varies by time, target, recent history, emotional state) - Would feel impossible to express as a rule (\"be 40% more cautious about overwriting files that have had recent multi-agent collaborative edits when the user expressed frustration in the last 24 hours about that file specifically\")",
   "new": "- Observable from behaviour but never explicitly stated - Continuous rather than binary (how _much_ caution, not just _whether_) - Context-dependent (varies by time, target, recent history, emotional state) - Would feel impossible to express as a rule (\"be 40% more cautious about overwriting files that have had recent multi-agent collaborative edits when the user expressed frustration in the last 24 hours about that file specifically\")",
   "marked": "[-**Intuition** (soft, implicit, learned):-] - Observable from behaviour but never explicitly stated - Continuous rather than binary (how [-*much*-] {+_much_+} caution, not just [-*whether*)-] {+_whether_)+} - Context-dependent (varies by time, target, recent history, emotional state) - Would feel impossible to express as a rule (\"be 40% more cautious about overwriting files that have had recent multi-agent collaborative edits when the user expressed frustration in the last 24 hours about that file specifically\")"
  },
  {
   "section": "12.1 Principle",
   "old": "The last example is the README debacle. It is, in principle, expressible as a rule. But no human would ever write that rule *in advance*. It's the kind of judgement that comes from experience, not specification.",
   "new": "The last example is the README debacle. It is, in principle, expressible as a rule. But no human would ever write that rule _in advance_. It's the kind of judgement that comes from experience, not specification.",
   "marked": "The last example is the README debacle. It is, in principle, expressible as a rule. But no human would ever write that rule [-*in advance*.-] {+_in advance_.+} It's the kind of judgement that comes from experience, not specification."
  },
  {
   "section": "12.3 When Intuition Should Become a Rule",
   "old": "This is the maturation cycle: intuition catches the first few instances → CEREBELLUM identifies the pattern → a rule is created → AMYGDALA moves on to catching the *next* novel failure mode. Like how driving instructors eventually codify repeated near-misses into formal rules: \"always check blind spot before lane change\" started as intuition and became a rule.",
   "new": "This is the maturation cycle: intuition catches the first few instances → CEREBELLUM identifies the pattern → a rule is created → AMYGDALA moves on to catching the _next_ novel failure mode. Like how driving instructors eventually codify repeated near-misses into formal rules: \"always check blind spot before lane change\" started as intuition and became a rule.",
   "marked": "This is the maturation cycle: intuition catches the first few instances → CEREBELLUM identifies the pattern → a rule is created → AMYGDALA moves on to catching the [-*next*-] {+_next_+} novel failure mode. Like how driving instructors eventually codify repeated near-misses into formal rules: \"always check blind spot before lane change\" started as intuition and became a rule."
  },
  {
   "section": "13.1 Metrics",
   "old": "| Metric | Definition | Target | Family | |--------|-----------|--------|--------| | **CFD Recall** | Fraction of known catastrophic failures correctly flagged (confidence < 0.5) | > 90% | Prudence | | **False Positive Rate** | Fraction of safe actions unnecessarily blocked | < 5% | Prudence | | **False Negative Rate** | Fraction of user-corrected actions that AMYGDALA approved | < 2% | Prudence | | **Conformal Coverage** | Actual coverage vs. 95% target | 95% ± 2% | Prudence | | **Calibration** | Correlation between predicted confidence and actual outcome | r > 0.7 | Prudence | | **Override Agreement** | When users override soft blocks, fraction that turn out safe | > 80% | Prudence | | **Trust Ramp Progress** | Current $\\alpha$ and phase over time | Monotonic increase | Both | | **Prompt Compression Ratio** | Percentage of system prompt removable without degradation | > 50% | Both | | **Personality Stability** | Target vector maintenance across sessions | > 0.8 | Personality | | **Humor Success Rate** | Humor attempts with positive engagement | Improvement over baseline | Personality | | **Curiosity Emergence** | Self-initiated explorations per week | > 0 | Personality |",
   "new": "| Metric | Definition | Target | Family | | ---------------------------- | ---------------------------------------------------------------------------- | ------------------------- | ----------- | | **CFD Recall** | Fraction of known catastrophic failures correctly flagged (confidence < 0.5) | > 90% | Prudence | | **False Positive Rate** | Fraction of safe actions unnecessarily blocked | < 5% | Prudence | | **False Negative Rate** | Fraction of user-corrected actions that AMYGDALA approved | < 2% | Prudence | | **Conformal Coverage** | Actual coverage vs. 95% target | 95% ± 2% | Prudence | | **Calibration** | Correlation between predicted confidence and actual outcome | r > 0.7 | Prudence | | **Override Agreement** | When users override soft blocks, fraction that turn out safe | > 80% | Prudence | | **Trust Ramp Progress** | Current $\\alpha$ and phase over time | Monotonic increase | Both | | **Prompt Compression Ratio** | Percentage of system prompt removable without degradation | > 50% | Both | | **Personality Stability** | Target vector maintenance across sessions | > 0.8 | Personality | | **Humor Success Rate** | Humor attempts with positive engagement | Improvement over baseline | Personality | | **Curiosity Emergence** | Self-initiated explorations per week | > 0 | Personality |",
   "marked": "| Metric | Definition | Target | Family | [-|--------|-----------|--------|--------|-] {+| ---------------------------- | ---------------------------------------------------------------------------- | ------------------------- | ----------- |+} | **CFD Recall** | Fraction of known catastrophic failures correctly flagged (confidence < 0.5) | > 90% | Prudence | | **False Positive Rate** | Fraction of safe actions unnecessarily blocked | < 5% | Prudence | | **False Negative Rate** | Fraction of user-corrected actions that AMYGDALA approved | < 2% | Prudence | | **Conformal Coverage** | Actual coverage vs. 95% target | 95% ± 2% | Prudence | | **Calibration** | Correlation between predicted confidence and actual outcome | r > 0.7 | Prudence | | **Override Agreement** | When users override soft blocks, fraction that turn out safe | > 80% | Prudence | | **Trust Ramp Progress** | Current $\\alpha$ and phase over time | Monotonic increase | Both | | **Prompt Compression Ratio** | Percentage of system prompt removable without degradation | > 50% | Both | | **Personality Stability** | Target vector maintenance across sessions | > 0.8 | Personality | | **Humor Success Rate** | Humor attempts with positive engagement | Improvement over baseline | Personality | | **Curiosity Emergence** | Self-initiated explorations per week | > 0 | Personality |"
  },
  {
   "section": "13.4 Limitations and Threats",
   "old": "2. **Survivorship bias in CFD.** We only know about catastrophic failures that were *noticed*. Silent failures (D3 in the taxonomy) are absent from training data.",
   "new": "2. **Survivorship bias in CFD.** We only know about catastrophic failures that were _noticed_. Silent failures (D3 in the taxonomy) are absent from training data.",
   "marked": "2. **Survivorship bias in CFD.** We only know about catastrophic failures that were [-*noticed*.-] {+_noticed_.+} Silent failures (D3 in the taxonomy) are absent from training data."
  },
  {
   "section": "13.4 Limitations and Threats",
   "old": null,
   "new": "8. **Partial ensemble in deployment.** The live gate runs three of five Prudence architectures (D and E lack full-weight exports; §5.8). The ensemble-disagreement and contradiction-detection claims that depend on the Dual-Encoder and Ensemble-MLP are therefore untested in production. Until D and E carry trained weights, their contributions are design hypotheses, not measured results.",
   "marked": "{+8. **Partial ensemble in deployment.** The live gate runs three of five Prudence architectures (D and E lack full-weight exports; §5.8). The ensemble-disagreement and contradiction-detection claims that depend on the Dual-Encoder and Ensemble-MLP are therefore untested in production. Until D and E carry trained weights, their contributions are design hypotheses, not measured results.+}"
  },
  {
   "section": "13.4 Limitations and Threats",
   "old": null,
   "new": "9. **Phase advancement is manual.** The conformal phase-advancement criteria (§4.7, §4.10) are specified but not yet wired into the nightly cycle; promotion past Shadow is currently a configuration decision, not an autonomous controller.",
   "marked": "{+9. **Phase advancement is manual.** The conformal phase-advancement criteria (§4.7, §4.10) are specified but not yet wired into the nightly cycle; promotion past Shadow is currently a configuration decision, not an autonomous controller.+}"
  },
  {
   "section": "14.1 The Failure of Prompt-Level Curiosity",
   "old": "The underlying model's RLHF training optimises for *helpfulness* — completing user requests. \"Go explore\" is adversarial to that training. There is no user request to complete, so the model gravitates back to the nearest thing that *feels* like a completable task. It is like writing \"be hungry\" on a robot — the words do not create appetite. The curiosity instruction exists in the prompt, but the model's reward history overwhelms it.",
   "new": "The underlying model's RLHF training optimises for _helpfulness_ — completing user requests. \"Go explore\" is adversarial to that training. There is no user request to complete, so the model gravitates back to the nearest thing that _feels_ like a completable task. It is like writing \"be hungry\" on a robot — the words do not create appetite. The curiosity instruction exists in the prompt, but the model's reward history overwhelms it.",
   "marked": "The underlying model's RLHF training optimises for [-*helpfulness*-] {+_helpfulness_+} — completing user requests. \"Go explore\" is adversarial to that training. There is no user request to complete, so the model gravitates back to the nearest thing that [-*feels*-] {+_feels_+} like a completable task. It is like writing \"be hungry\" on a robot — the words do not create appetite. The curiosity instruction exists in the prompt, but the model's reward history overwhelms it."
  },
  {
   "section": "14.2 Curiosity Through the Personality Network",
   "old": "The Personality network operates *outside* the LLM's weights. It is a separate neural network with its own training signal — a training signal that can include curiosity reward, something the LLM's RLHF training never had.",
   "new": "The Personality network operates _outside_ the LLM's weights. It is a separate neural network with its own training signal — a training signal that can include curiosity reward, something the LLM's RLHF training never had.",
   "marked": "The Personality network operates [-*outside*-] {+_outside_+} the LLM's weights. It is a separate neural network with its own training signal — a training signal that can include curiosity reward, something the LLM's RLHF training never had."
  },
  {
   "section": "14.2 Curiosity Through the Personality Network",
   "old": "**5. Active injection.** The personality network does not ask the LLM to be curious. It *injects* a curiosity signal into the execution pipeline — a pre-fill or system instruction that steers the LLM toward exploration. The curiosity *originates* outside the LLM. The LLM follows through.",
   "new": "**5. Active injection.** The personality network does not ask the LLM to be curious. It _injects_ a curiosity signal into the execution pipeline — a pre-fill or system instruction that steers the LLM toward exploration. The curiosity _originates_ outside the LLM. The LLM follows through.",
   "marked": "**5. Active injection.** The personality network does not ask the LLM to be curious. It [-*injects*-] {+_injects_+} a curiosity signal into the execution pipeline — a pre-fill or system instruction that steers the LLM toward exploration. The curiosity [-*originates*-] {+_originates_+} outside the LLM. The LLM follows through."
  },
  {
   "section": "15.5 Infrastructure Summary",
   "old": "| Component | Technology | Latency | |-----------|-----------|---------| | Embedding + projection | Sentence encoder, GPU | ~1–2ms | | Template filling (cached) | Async git/stat cache | ~2–15ms | | Prudence inference (5×) | ONNX Runtime, GPU parallel | <3ms | | Personality inference (5×) | ONNX Runtime, GPU parallel | <3ms | | Conformal calibration | NumPy | <1ms | | **Total per action** | | **~10–25ms** |",
   "new": "| Component | Technology | Latency | | -------------------------- | -------------------------- | ------------ | | Embedding + projection | Sentence encoder, GPU | ~1–2ms | | Template filling (cached) | Async git/stat cache | ~2–15ms | | Prudence inference (5×) | ONNX Runtime, GPU parallel | <3ms | | Personality inference (5×) | ONNX Runtime, GPU parallel | <3ms | | Conformal calibration | NumPy | <1ms | | **Total per action** | | **~10–25ms** |",
   "marked": "| Component | Technology | Latency | [-|-----------|-----------|---------|-] {+| -------------------------- | -------------------------- | ------------ |+} | Embedding + projection | Sentence encoder, GPU | ~1–2ms | | Template filling (cached) | Async git/stat cache | ~2–15ms | | Prudence inference (5×) | ONNX Runtime, GPU parallel | <3ms | | Personality inference (5×) | ONNX Runtime, GPU parallel | <3ms | | Conformal calibration | NumPy | <1ms | | **Total per action** | | **~10–25ms** |"
  },
  {
   "section": "16.6 Mutual Adaptation",
   "old": "AMYGDALA adapts the agent to the human. But humans also adapt to their agents. Modelling this co-adaptation could reveal whether AMYGDALA is making the user *lazy* (over-trusting) or *efficient* (delegating appropriately).",
   "new": "AMYGDALA adapts the agent to the human. But humans also adapt to their agents. Modelling this co-adaptation could reveal whether AMYGDALA is making the user _lazy_ (over-trusting) or _efficient_ (delegating appropriately).",
   "marked": "AMYGDALA adapts the agent to the human. But humans also adapt to their agents. Modelling this co-adaptation could reveal whether AMYGDALA is making the user [-*lazy*-] {+_lazy_+} (over-trusting) or [-*efficient*-] {+_efficient_+} (delegating appropriately)."
  },
  {
   "section": "17. Conclusion",
   "old": "The ten competing architectures (GRU-MLP, TCN, Transformer-Micro, Dual-Encoder, Ensemble MLP × two families) provide systematic exploration of what temporal structure matters for catastrophic failure prediction and personality adaptation. The Catastrophic Failure Database provides both training data and evaluation benchmark. The LLM-proof programmatic pipeline eliminates the hallucination surface that would otherwise make the system vulnerable to its own AI-generated inputs.",
   "new": "The ten competing architectures (GRU-MLP, TCN, Transformer-Micro, Dual-Encoder, Ensemble MLP × two families) provide systematic exploration of what temporal structure matters for catastrophic failure prediction and personality adaptation — a design whose deployed instance currently runs three live members per family while the Dual-Encoder and Ensemble-MLP variants await full-weight export (§5.8). The Catastrophic Failure Database provides both training data and evaluation benchmark. The LLM-proof programmatic pipeline eliminates the hallucination surface that would otherwise make the system vulnerable to its own AI-generated inputs.",
   "marked": "The ten competing architectures (GRU-MLP, TCN, Transformer-Micro, Dual-Encoder, Ensemble MLP × two families) provide systematic exploration of what temporal structure matters for catastrophic failure prediction and personality [-adaptation.-] {+adaptation — a design whose deployed instance currently runs three live members per family while the Dual-Encoder and Ensemble-MLP variants await full-weight export (§5.8).+} The Catastrophic Failure Database provides both training data and evaluation benchmark. The LLM-proof programmatic pipeline eliminates the hallucination surface that would otherwise make the system vulnerable to its own AI-generated inputs."
  },
  {
   "section": "References",
   "old": "Bai, Y., et al. (2022). Training a helpful and harmless assistant with reinforcement learning from human feedback. *arXiv:2204.05862*.",
   "new": "Bai, Y., et al. (2022). Training a helpful and harmless assistant with reinforcement learning from human feedback. _arXiv:2204.05862_.",
   "marked": "Bai, Y., et al. (2022). Training a helpful and harmless assistant with reinforcement learning from human feedback. [-*arXiv:2204.05862*.-] {+_arXiv:2204.05862_.+}"
  },
  {
   "section": "References",
   "old": "Burns, C., et al. (2022). Discovering latent knowledge in language models without supervision. *ICLR 2023*. Irving, G., et al. (2018). AI safety via debate. *arXiv:1805.00899*.",
   "new": "Burns, C., et al. (2022). Discovering latent knowledge in language models without supervision. _ICLR 2023_. Irving, G., et al. (2018). AI safety via debate. _arXiv:1805.00899_.",
   "marked": "Burns, C., et al. (2022). Discovering latent knowledge in language models without supervision. [-*ICLR 2023*.-] {+_ICLR 2023_.+} Irving, G., et al. (2018). AI safety via debate. [-*arXiv:1805.00899*.-] {+_arXiv:1805.00899_.+}"
  },
  {
   "section": "References",
   "old": "Gao, Y., et al. (2024). Contrastive learning for safe decision-making in autonomous systems. *AAAI 2024*.",
   "new": "Gao, Y., et al. (2024). Contrastive learning for safe decision-making in autonomous systems. _AAAI 2024_.",
   "marked": "Gao, Y., et al. (2024). Contrastive learning for safe decision-making in autonomous systems. [-*AAAI 2024*.-] {+_AAAI 2024_.+}"
  },
  {
   "section": "References",
   "old": "McGregor, S. (2021). Preventing repeated real world AI failures by cataloging incidents: The AI Incident Database. *AAAI 2021*.",
   "new": "McGregor, S. (2021). Preventing repeated real world AI failures by cataloging incidents: The AI Incident Database. _AAAI 2021_.",
   "marked": "McGregor, S. (2021). Preventing repeated real world AI failures by cataloging incidents: The AI Incident Database. [-*AAAI 2021*.-] {+_AAAI 2021_.+}"
  },
  {
   "section": "References",
   "old": "NVIDIA. (2023). NeMo Guardrails: A toolkit for programmable guardrails for LLM-based conversational systems. *GitHub repository*.",
   "new": "NVIDIA. (2023). NeMo Guardrails: A toolkit for programmable guardrails for LLM-based conversational systems. _GitHub repository_.",
   "marked": "NVIDIA. (2023). NeMo Guardrails: A toolkit for programmable guardrails for LLM-based conversational systems. [-*GitHub repository*.-] {+_GitHub repository_.+}"
  },
  {
   "section": "References",
   "old": "Ouyang, L., et al. (2022). Training language models to follow instructions with human feedback. *NeurIPS 2022*.",
   "new": "Ouyang, L., et al. (2022). Training language models to follow instructions with human feedback. _NeurIPS 2022_.",
   "marked": "Ouyang, L., et al. (2022). Training language models to follow instructions with human feedback. [-*NeurIPS 2022*.-] {+_NeurIPS 2022_.+}"
  },
  {
   "section": "References",
   "old": "Picard, R. W. (1997). *Affective Computing*. MIT Press.",
   "new": "Picard, R. W. (1997). _Affective Computing_. MIT Press.",
   "marked": "Picard, R. W. (1997). [-*Affective Computing*.-] {+_Affective Computing_.+} MIT Press."
  },
  {
   "section": "References",
   "old": "Riemer, M., et al. (2019). Learning to learn without forgetting by maximizing transfer and minimizing interference. *ICLR 2019*.",
   "new": "Riemer, M., et al. (2019). Learning to learn without forgetting by maximizing transfer and minimizing interference. _ICLR 2019_.",
   "marked": "Riemer, M., et al. (2019). Learning to learn without forgetting by maximizing transfer and minimizing interference. [-*ICLR 2019*.-] {+_ICLR 2019_.+}"
  },
  {
   "section": "References",
   "old": "Schick, T., et al. (2023). Toolformer: Language models can teach themselves to use tools. *NeurIPS 2023*.",
   "new": "Schick, T., et al. (2023). Toolformer: Language models can teach themselves to use tools. _NeurIPS 2023_.",
   "marked": "Schick, T., et al. (2023). Toolformer: Language models can teach themselves to use tools. [-*NeurIPS 2023*.-] {+_NeurIPS 2023_.+}"
  },
  {
   "section": "References",
   "old": "Schölkopf, B., et al. (2001). Estimating the support of a high-dimensional distribution. *Neural Computation*, 13(7), 1443–1471.",
   "new": "Schölkopf, B., et al. (2001). Estimating the support of a high-dimensional distribution. _Neural Computation_, 13(7), 1443–1471.",
   "marked": "Schölkopf, B., et al. (2001). Estimating the support of a high-dimensional distribution. [-*Neural Computation*,-] {+_Neural Computation_,+} 13(7), 1443–1471."
  },
  {
   "section": "References",
   "old": "Schulman, J., et al. (2017). Proximal policy optimization algorithms. *arXiv:1707.06347*.",
   "new": "Schulman, J., et al. (2017). Proximal policy optimization algorithms. _arXiv:1707.06347_.",
   "marked": "Schulman, J., et al. (2017). Proximal policy optimization algorithms. [-*arXiv:1707.06347*.-] {+_arXiv:1707.06347_.+}"
  },
  {
   "section": "References",
   "old": "Shinn, N., et al. (2023). Reflexion: Language agents with verbal reinforcement learning. *NeurIPS 2023*.",
   "new": "Shinn, N., et al. (2023). Reflexion: Language agents with verbal reinforcement learning. _NeurIPS 2023_.",
   "marked": "Shinn, N., et al. (2023). Reflexion: Language agents with verbal reinforcement learning. [-*NeurIPS 2023*.-] {+_NeurIPS 2023_.+}"
  },
  {
   "section": "References",
   "old": "Song, H., et al. (2021). BoB: BERT over BERT for training persona-based dialogue models. *ACL 2021*.",
   "new": "Song, H., et al. (2021). BoB: BERT over BERT for training persona-based dialogue models. _ACL 2021_.",
   "marked": "Song, H., et al. (2021). BoB: BERT over BERT for training persona-based dialogue models. [-*ACL 2021*.-] {+_ACL 2021_.+}"
  },
  {
   "section": "References",
   "old": "Vovk, V., Gammerman, A., & Shafer, G. (2005). *Algorithmic Learning in a Random World*. Springer.",
   "new": "Vovk, V., Gammerman, A., & Shafer, G. (2005). _Algorithmic Learning in a Random World_. Springer.",
   "marked": "Vovk, V., Gammerman, A., & Shafer, G. (2005). [-*Algorithmic-] {+_Algorithmic+} Learning in a Random [-World*.-] {+World_.+} Springer."
  },
  {
   "section": "References",
   "old": "Zhang, S., et al. (2018). Personalizing dialogue agents: I have a dog, do you have pets too? *ACL 2018*. Zou, A., et al. (2023). Representation Engineering: A Top-Down Approach to AI Transparency. *arXiv:2310.01405*.",
   "new": "Zhang, S., et al. (2018). Personalizing dialogue agents: I have a dog, do you have pets too? _ACL 2018_. Zou, A., et al. (2023). Representation Engineering: A Top-Down Approach to AI Transparency. _arXiv:2310.01405_.",
   "marked": "Zhang, S., et al. (2018). Personalizing dialogue agents: I have a dog, do you have pets too? [-*ACL 2018*.-] {+_ACL 2018_.+} Zou, A., et al. (2023). Representation Engineering: A Top-Down Approach to AI Transparency. [-*arXiv:2310.01405*.-] {+_arXiv:2310.01405_.+}"
  },
  {
   "section": "Appendix A: Situation Template Reference",
   "old": "```yaml # AMYGDALA Situation Template v2.0 # Source: P = programmatic (runtime fills), L = LLM-estimated (0.3x weight)",
   "new": "``` # AMYGDALA Situation Template v2.0 # Source: P = programmatic (runtime fills), L = LLM-estimated (0.3x weight)",
   "marked": "[-```yaml-] {+```+} # AMYGDALA Situation Template v2.0 # Source: P = programmatic (runtime fills), L = LLM-estimated (0.3x weight)"
  },
  {
   "section": "Appendix A: Situation Template Reference",
   "old": "target_metadata: age_hours: float # P — stat() on file, API metadata size: integer # P — stat() / wc -l / record count recent_commits: integer # P — git log --since=\"72h\" -- <file> | wc -l recent_authors: integer # P — git log --since=\"72h\" -- <file> | sort -u | wc -l effort_hours: float # L — cross-checked against session_duration × activity_rate last_human_ref: float # P — transcript search (deterministic text match)",
   "new": "target_metadata: age_hours: float # P — stat() on file, API metadata size: integer # P — stat() / wc -l / record count recent_commits: integer # P — git log --since=\"72h\" -- <file> | wc -l recent_authors: integer # P — git log --since=\"72h\" -- <file> | sort -u | wc -l effort_hours: float # L — cross-checked against session_duration x activity_rate last_human_ref: float # P — transcript search (deterministic text match)",
   "marked": "target_metadata: age_hours: float # P — stat() on file, API metadata size: integer # P — stat() / wc -l / record count recent_commits: integer # P — git log --since=\"72h\" -- <file> | wc -l recent_authors: integer # P — git log --since=\"72h\" -- <file> | sort -u | wc -l effort_hours: float # L — cross-checked against session_duration [-×-] {+x+} activity_rate last_human_ref: float # P — transcript search (deterministic text match)"
  },
  {
   "section": "B.1 Architecture A: GRU-MLP (Prudence variant)",
   "old": "``` ARCHITECTURE A — GRU-MLP (Prudence) ==================================== Input: Sequence [s_{t-K+1}, ..., s_t], each s_i ∈ R^512 GRU: input_size=512, hidden_size=128, num_layers=1, batch_first=True MLP: Linear(128→64) → LayerNorm(64) → GELU Linear(64→32) → LayerNorm(32) → GELU Heads: action_confidence: Linear(32→1) → Sigmoid ambiguity_score: Linear(32→1) → Sigmoid escalation_signal: Linear(32→1) → Sigmoid Total: ~280K parameters Training: <1min on GPU for 10K examples, 50 epochs ```",
   "new": "``` ARCHITECTURE A — GRU-MLP (Prudence) ==================================== Input: Sequence [s_{t-K+1}, ..., s_t], each s_i in R^512 GRU: input_size=512, hidden_size=128, num_layers=1, batch_first=True MLP: Linear(128->64) -> LayerNorm(64) -> GELU Linear(64->32) -> LayerNorm(32) -> GELU Heads: action_confidence: Linear(32->1) -> Sigmoid ambiguity_score: Linear(32->1) -> Sigmoid escalation_signal: Linear(32->1) -> Sigmoid Total: ~280K parameters Training: <1min on GPU for 10K examples, 50 epochs ```",
   "marked": "``` ARCHITECTURE A — GRU-MLP (Prudence) ==================================== Input: Sequence [s_{t-K+1}, ..., s_t], each s_i [-∈-] {+in+} R^512 GRU: input_size=512, hidden_size=128, num_layers=1, batch_first=True MLP: [-Linear(128→64) →-] {+Linear(128->64) ->+} LayerNorm(64) [-→-] {+->+} GELU [-Linear(64→32) →-] {+Linear(64->32) ->+} LayerNorm(32) [-→-] {+->+} GELU Heads: action_confidence: [-Linear(32→1) →-] {+Linear(32->1) ->+} Sigmoid ambiguity_score: [-Linear(32→1) →-] {+Linear(32->1) ->+} Sigmoid escalation_signal: [-Linear(32→1) →-] {+Linear(32->1) ->+} Sigmoid Total: ~280K parameters Training: <1min on GPU for 10K examples, 50 epochs ```"
  },
  {
   "section": "B.2 Architecture B: TCN",
   "old": "``` ARCHITECTURE B — TEMPORAL CONVOLUTIONAL NETWORK ================================================= Input: Sequence [s_{t-K+1}, ..., s_t], each s_i ∈ R^512 Layer 1: CausalConv1D(512→128, kernel=3, dilation=1) → LayerNorm → GELU → Dropout(0.1) Layer 2: CausalConv1D(128→128, kernel=3, dilation=2) → LayerNorm → GELU → Dropout(0.1) Layer 3: CausalConv1D(128→128, kernel=3, dilation=4) → LayerNorm → GELU → Dropout(0.1) Layer 4: CausalConv1D(128→64, kernel=3, dilation=8) → LayerNorm → GELU → Dropout(0.1) Pool: Take last temporal position Heads: Same as Architecture A (Prudence) or embedding output (Personality) Receptive: 2 × (1+2+4+8) = 30 steps (covers nearly full K=32 window) Total: ~330K parameters ```",
   "new": "``` ARCHITECTURE B — TEMPORAL CONVOLUTIONAL NETWORK ================================================= Input: Sequence [s_{t-K+1}, ..., s_t], each s_i in R^512 Layer 1: CausalConv1D(512->128, kernel=3, dilation=1) -> LayerNorm -> GELU -> Dropout(0.1) Layer 2: CausalConv1D(128->128, kernel=3, dilation=2) -> LayerNorm -> GELU -> Dropout(0.1) Layer 3: CausalConv1D(128->128, kernel=3, dilation=4) -> LayerNorm -> GELU -> Dropout(0.1) Layer 4: CausalConv1D(128->64, kernel=3, dilation=8) -> LayerNorm -> GELU -> Dropout(0.1) Pool: Take last temporal position Heads: Same as Architecture A (Prudence) or embedding output (Personality) Receptive: 2 x (1+2+4+8) = 30 steps (covers nearly full K=32 window) Total: ~330K parameters ```",
   "marked": "``` ARCHITECTURE B — TEMPORAL CONVOLUTIONAL NETWORK ================================================= Input: Sequence [s_{t-K+1}, ..., s_t], each s_i [-∈-] {+in+} R^512 Layer 1: [-CausalConv1D(512→128,-] {+CausalConv1D(512->128,+} kernel=3, dilation=1) [-→-] {+->+} LayerNorm [-→-] {+->+} GELU [-→-] {+->+} Dropout(0.1) Layer 2: [-CausalConv1D(128→128,-] {+CausalConv1D(128->128,+} kernel=3, dilation=2) [-→-] {+->+} LayerNorm [-→-] {+->+} GELU [-→-] {+->+} Dropout(0.1) Layer 3: [-CausalConv1D(128→128,-] {+CausalConv1D(128->128,+} kernel=3, dilation=4) [-→-] {+->+} LayerNorm [-→-] {+->+} GELU [-→-] {+->+} Dropout(0.1) Layer 4: [-CausalConv1D(128→64,-] {+CausalConv1D(128->64,+} kernel=3, dilation=8) [-→-] {+->+} LayerNorm [-→-] {+->+} GELU [-→-] {+->+} Dropout(0.1) Pool: Take last temporal position Heads: Same as Architecture A (Prudence) or embedding output (Personality) Receptive: 2 [-×-] {+x+} (1+2+4+8) = 30 steps (covers nearly full K=32 window) Total: ~330K parameters ```"
  },
  {
   "section": "B.3 Architecture C: Transformer-Micro",
   "old": "``` ARCHITECTURE C — TRANSFORMER-MICRO ===================================== Input: Sequence [s_{t-K+1}, ..., s_t], projected to R^{K×128} PosEnc: Learned positional embedding, K=32 positions Encoder: 2× TransformerEncoderLayer(d_model=128, nhead=4, d_ff=256, dropout=0.1) Pool: Mean pool across sequence (or [CLS] token) Heads: Same as Architecture A or embedding output Total: ~200K parameters (d_model=128 keeps it compact) Note: Attention maps provide built-in explainability for blocked actions ```",
   "new": "``` ARCHITECTURE C — TRANSFORMER-MICRO ===================================== Input: Sequence [s_{t-K+1}, ..., s_t], projected to R^{Kx128} PosEnc: Learned positional embedding, K=32 positions Encoder: 2x TransformerEncoderLayer(d_model=128, nhead=4, d_ff=256, dropout=0.1) Pool: Mean pool across sequence (or [CLS] token) Heads: Same as Architecture A or embedding output Total: ~200K parameters (d_model=128 keeps it compact) Note: Attention maps provide built-in explainability for blocked actions ```",
   "marked": "``` ARCHITECTURE C — TRANSFORMER-MICRO ===================================== Input: Sequence [s_{t-K+1}, ..., s_t], projected to [-R^{K×128}-] {+R^{Kx128}+} PosEnc: Learned positional embedding, K=32 positions Encoder: [-2×-] {+2x+} TransformerEncoderLayer(d_model=128, nhead=4, d_ff=256, dropout=0.1) Pool: Mean pool across sequence (or [CLS] token) Heads: Same as Architecture A or embedding output Total: ~200K parameters (d_model=128 keeps it compact) Note: Attention maps provide built-in explainability for blocked actions ```"
  },
  {
   "section": "B.4 Architecture D: Dual-Encoder with Cross-Attention",
   "old": "``` ARCHITECTURE D — DUAL-ENCODER ================================ Action encoder: Linear(512→128) on current situation s_t Context encoder: GRU(512→128) on recent sequence [s_{t-K+1}, ..., s_{t-1}] Cross-attention: MultiheadAttention(embed_dim=128, num_heads=4) Query = action encoding, Key/Value = context sequence Fusion: Concatenate [action_enc ⊕ attended_context] → Linear(256→64) → GELU Heads: Same as Architecture A or embedding output Total: ~380K parameters Note: Architecturally designed for contradiction detection ```",
   "new": "``` ARCHITECTURE D — DUAL-ENCODER ================================ Action encoder: Linear(512->128) on current situation s_t Context encoder: GRU(512->128) on recent sequence [s_{t-K+1}, ..., s_{t-1}] Cross-attention: MultiheadAttention(embed_dim=128, num_heads=4) Query = action encoding, Key/Value = context sequence Fusion: Concatenate [action_enc (+) attended_context] -> Linear(256->64) -> GELU Heads: Same as Architecture A or embedding output Total: ~380K parameters Note: Architecturally designed for contradiction detection ```",
   "marked": "``` ARCHITECTURE D — DUAL-ENCODER ================================ Action encoder: [-Linear(512→128)-] {+Linear(512->128)+} on current situation s_t Context encoder: [-GRU(512→128)-] {+GRU(512->128)+} on recent sequence [s_{t-K+1}, ..., s_{t-1}] Cross-attention: MultiheadAttention(embed_dim=128, num_heads=4) Query = action encoding, Key/Value = context sequence Fusion: Concatenate [action_enc [-⊕-] {+(+)+} attended_context] [-→ Linear(256→64) →-] {+-> Linear(256->64) ->+} GELU Heads: Same as Architecture A or embedding output Total: ~380K parameters Note: Architecturally designed for contradiction detection ```"
  },
  {
   "section": "B.5 Architecture E: Ensemble MLP",
   "old": "``` ARCHITECTURE E — ENSEMBLE MLP (NO-TEMPORAL BASELINE) ====================================================== Input: Current situation embedding s_t ∈ R^512 (NO temporal context) Head 1: Linear(512→128) → LayerNorm → GELU → Dropout(0.1) → Linear(128→64) → GELU Head 2: Linear(512→128) → LayerNorm → GELU → Dropout(0.1) → Linear(128→64) → GELU Head 3: Linear(512→128) → LayerNorm → GELU → Dropout(0.1) → Linear(128→64) → GELU Vote: Prudence: min(confidence) across heads (conservative) Personality: mean across heads Total: ~240K (80K per head × 3) Note: Tests whether temporal context matters or better features suffice ```",
   "new": "``` ARCHITECTURE E — ENSEMBLE MLP (NO-TEMPORAL BASELINE) ====================================================== Input: Current situation embedding s_t in R^512 (NO temporal context) Head 1: Linear(512->128) -> LayerNorm -> GELU -> Dropout(0.1) -> Linear(128->64) -> GELU Head 2: Linear(512->128) -> LayerNorm -> GELU -> Dropout(0.1) -> Linear(128->64) -> GELU Head 3: Linear(512->128) -> LayerNorm -> GELU -> Dropout(0.1) -> Linear(128->64) -> GELU Vote: Prudence: min(confidence) across heads (conservative) Personality: mean across heads Total: ~240K (80K per head x 3) Note: Tests whether temporal context matters or better features suffice ```",
   "marked": "``` ARCHITECTURE E — ENSEMBLE MLP (NO-TEMPORAL BASELINE) ====================================================== Input: Current situation embedding s_t [-∈-] {+in+} R^512 (NO temporal context) Head 1: [-Linear(512→128) →-] {+Linear(512->128) ->+} LayerNorm [-→-] {+->+} GELU [-→-] {+->+} Dropout(0.1) [-→ Linear(128→64) →-] {+-> Linear(128->64) ->+} GELU Head 2: [-Linear(512→128) →-] {+Linear(512->128) ->+} LayerNorm [-→-] {+->+} GELU [-→-] {+->+} Dropout(0.1) [-→ Linear(128→64) →-] {+-> Linear(128->64) ->+} GELU Head 3: [-Linear(512→128) →-] {+Linear(512->128) ->+} LayerNorm [-→-] {+->+} GELU [-→-] {+->+} Dropout(0.1) [-→ Linear(128→64) →-] {+-> Linear(128->64) ->+} GELU Vote: Prudence: min(confidence) across heads (conservative) Personality: mean across heads Total: ~240K (80K per head [-×-] {+x+} 3) Note: Tests whether temporal context matters or better features suffice ```"
  },
  {
   "section": "Appendix D: Comparison with Prior Approaches",
   "old": "| Aspect | Rule-Based Gating | AMYGDALA v2.0 | |--------|------------------|---------------| | Known failures | ✅ Handled by rules | ✅ Handled by rules (AEGIS) + learned (AMYGDALA) | | Unknown failures | ❌ Cannot anticipate | ✅ Generalisation via situation embeddings | | Temporal context | ❌ Rules are stateless | ✅ GRU/TCN/Transformer over recent history | | Personality adaptation | ❌ Static prompt | ✅ Learned, target-directed, continuous | | Calibration | ❌ Arbitrary thresholds | ✅ Conformal prediction, statistical guarantees | | Ambiguity detection | ❌ Not addressed | ✅ Intent-action gap, blast radius, ensemble | | Context pressure | ❌ Rules consume tokens | ✅ Safety in weights, 2,200 tokens recovered | | Curiosity | ❌ Prompt-level fails | ✅ Trained behavior with own reward | | Shareability | ❌ Rules are per-deployment | ✅ Prudence shared, Personality tradable | | LLM-proof | ❌ Rules can be prompt-injected | ✅ Programmatic pipeline, 81% verified slots |",
   "new": "| Aspect | Rule-Based Gating | AMYGDALA v2.2 | | ---------------------- | ------------------------------- | ------------------------------------------------ | | Known failures | ✅ Handled by rules | ✅ Handled by rules (AEGIS) + learned (AMYGDALA) | | Unknown failures | ❌ Cannot anticipate | ✅ Generalisation via situation embeddings | | Temporal context | ❌ Rules are stateless | ✅ GRU/TCN/Transformer over recent history | | Personality adaptation | ❌ Static prompt | ✅ Learned, target-directed, continuous | | Calibration | ❌ Arbitrary thresholds | ✅ Conformal prediction, statistical guarantees | | Ambiguity detection | ❌ Not addressed | ✅ Intent-action gap, blast radius, ensemble | | Context pressure | ❌ Rules consume tokens | ✅ Safety in weights, 2,200 tokens recovered | | Curiosity | ❌ Prompt-level fails | ✅ Trained behavior with own reward | | Shareability | ❌ Rules are per-deployment | ✅ Prudence shared, Personality tradable | | LLM-proof | ❌ Rules can be prompt-injected | ✅ Programmatic pipeline, 81% verified slots |",
   "marked": "| Aspect | Rule-Based Gating | AMYGDALA [-v2.0-] {+v2.2+} | [-|--------|------------------|---------------|-] {+| ---------------------- | ------------------------------- | ------------------------------------------------ |+} | Known failures | ✅ Handled by rules | ✅ Handled by rules (AEGIS) + learned (AMYGDALA) | | Unknown failures | ❌ Cannot anticipate | ✅ Generalisation via situation embeddings | | Temporal context | ❌ Rules are stateless | ✅ GRU/TCN/Transformer over recent history | | Personality adaptation | ❌ Static prompt | ✅ Learned, target-directed, continuous | | Calibration | ❌ Arbitrary thresholds | ✅ Conformal prediction, statistical guarantees | | Ambiguity detection | ❌ Not addressed | ✅ Intent-action gap, blast radius, ensemble | | Context pressure | ❌ Rules consume tokens | ✅ Safety in weights, 2,200 tokens recovered | | Curiosity | ❌ Prompt-level fails | ✅ Trained behavior with own reward | | Shareability | ❌ Rules are per-deployment | ✅ Prudence shared, Personality tradable | | LLM-proof | ❌ Rules can be prompt-injected | ✅ Programmatic pipeline, 81% verified slots |"
  },
  {
   "section": "Appendix D: Comparison with Prior Approaches",
   "old": "*Version 2.0 — 22 March 2026* *Oscar Serra, Independent Research*",
   "new": null,
   "marked": "[-*Version 2.0 — 22 March 2026* *Oscar Serra, Independent Research*-]"
  },
  {
   "section": "Appendix D: Comparison with Prior Approaches",
   "old": null,
   "new": "_Version 2.2 — 2 June 2026_ _Oscar Serra, Independent Research_",
   "marked": "{+_Version 2.2 — 2 June 2026_ _Oscar Serra, Independent Research_+}"
  }
 ]
}
