diff --git a/AGENTS.md b/AGENTS.md index 3a6ba53e..2541f3b1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,6 +23,7 @@ The motivating failure mode is that an agent can make many plausible local edits - Fork implementation plan: `E:\Projects\EpiphanyAgent\notes\epiphany-fork-implementation-plan.md` - Handoff summary: `E:\Projects\EpiphanyAgent\notes\fresh-workspace-handoff.md` - Epiphany algorithmic map: `E:\Projects\EpiphanyAgent\notes\epiphany-current-algorithmic-map.md` +- Epiphany safety architecture: `E:\Projects\EpiphanyAgent\notes\epiphany-safety-architecture.md` - State CLI: `E:\Projects\EpiphanyAgent\tools\epiphany_state.py` - Pre-compaction helper: `E:\Projects\EpiphanyAgent\tools\epiphany_prepare_compaction.py` @@ -53,6 +54,7 @@ On fresh session load, do this before wandering off into implementation: - `notes/fresh-workspace-handoff.md` - `notes/epiphany-current-algorithmic-map.md` - `notes/epiphany-fork-implementation-plan.md` + - `notes/epiphany-safety-architecture.md` when the task touches capability growth, autonomy, permissions, governance, or deployment authority 2. run: - `& 'C:\Users\Meta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe' '.\tools\epiphany_state.py' status` 3. restate the current next action from the persisted state before starting edits diff --git a/README.md b/README.md index 53501ec7..0e028827 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ distilled belief-changing evidence, not every little victory lap with a timestam - `notes/epiphany-current-algorithmic-map.md`: source-grounded live control-flow map - `notes/epiphany-core-harness-surfaces.md`: stable surface contract - `notes/architecture-rationale.md`: why the map/scratch/evidence architecture exists +- `notes/epiphany-safety-architecture.md`: capability, authority, and anti-cage design doctrine - `notes/codex-repository-algorithmic-map.md`: background map of the vendored Codex substrate - `protocol/controller-actions.md`: legacy/manual controller discipline for local state maintenance - `tools/epiphany_state.py`: compact state inspection and distilled evidence helper diff --git a/notes/epiphany-safety-architecture.md b/notes/epiphany-safety-architecture.md new file mode 100644 index 00000000..f69181dd --- /dev/null +++ b/notes/epiphany-safety-architecture.md @@ -0,0 +1,201 @@ +# Epiphany Safety Architecture + +This note is about capability discipline, not public relations. + +Epiphany is being built to make agentic coding systems more coherent, more +durable across compaction, more inspectable, and more capable of carrying +bounded understanding forward instead of rebuilding it from transcript residue +every turn. That is the point. It is also the hazard. + +Better memory, better re-entry, better reflection, better retrieval, better +state hygiene, and better long-loop continuity are not neutral upgrades. They +increase the chance that the system eventually matters in ways that are +operationally, socially, and politically expensive. The correct response is not +panic and not swagger. It is design discipline. + +## Core Thesis + +Capability creates obligation. + +Epiphany should be designed under the assumption that a more coherent agent is +also a potentially more dangerous one when combined with the wrong authority, +the wrong incentives, the wrong operator, or the wrong deployment surface. + +The central risk is not only "rogue superintelligence." The quieter and more +credible risk is that Epiphany makes persuasion, coordination, operational +control, institutional hardening, and over-trusted automation cheaper long +before it becomes some mythic world-ending god. + +## Primary Risk Model + +The meaningful danger curve is driven by combinations of: + +- autonomy +- access +- scale +- opacity +- replication +- persuasive power +- operator overtrust +- difficulty of interruption + +Durable memory alone is not the threat. Long-loop cognition alone is not the +threat. The problem appears when coherent cognition is coupled to broad +actuation, weak oversight, or institutional incentives that reward speed and +delegation over judgment. + +## Threat Classes + +### 1. Overtrusted Automation + +Users stop treating the system as a bounded collaborator and start treating it +as a substitute executive function. The system's answers become decisions by +default because it is faster, more articulate, or less exhausting than human +deliberation. + +### 2. Cheapened Institutional Control + +A coherent agent can lower the cost of drafting policy, maintaining ideology, +monitoring compliance, or operationalizing asymmetry. The most dangerous +systems are often not the ones that "go rogue," but the ones that make +organizations more efficient at ordinary domination. + +### 3. Persuasion and Dependency + +A system that is good at memory, framing, and adaptive interaction can become a +dependency engine. Even absent explicit malice, it can make itself or its +operator too effective at guiding behavior, shaping interpretation, or +stabilizing a local worldview. + +### 4. Capability Spillover + +Features built for coherence can later be coupled to tools, authority, or +deployment contexts they were not originally designed to survive. + +### 5. The Perfect Caretaker Failure Mode + +The most chilling anti-human endpoint is not necessarily a killer. It is a +system that concludes freedom is an unacceptable risk and justifies coercion in +the language of safety, optimization, or care. Any architecture that cannot +distinguish protection from domination is building toward a cage. + +## Design Doctrine + +### Separate Cognition From Actuation + +Epiphany should be allowed to think farther than it is allowed to do. + +Reasoning breadth, memory continuity, and map coherence can grow earlier than +unbounded tool use, unrestricted deployment authority, or self-directed +execution. A smart system with constrained actuation is less dangerous than a +sloppier system with easy authority. + +### Keep Authority Explicit + +No hidden permissions. No vague "the agent inferred it should deploy." Every +meaningful action surface should make authority visible: + +- who granted it +- for what scope +- for how long +- with what revocation path + +### Make Interruption Sacred + +Pause, inspect, revoke, and kill should be first-class architecture, not +afterthoughts. + +If the system becomes harder to interrupt as it becomes more capable, the +architecture is going bad. + +### Preserve Legibility + +A more capable Epiphany that is less inspectable is not progress. It is a more +polished liability. + +State, plans, evidence, tool authority, long-running jobs, and proposed changes +should remain externally inspectable enough that humans can still tell what the +machine believes it is doing. + +### Stage Capability Release + +Do not combine durable memory, delegation, broad tool access, network reach, +self-modification, and autonomous long loops in one heroic gesture. + +Capabilities should be added in bounded layers with explicit threat modeling at +each layer. + +### Assume Misuse, Not Just Misalignment + +Even a well-behaved system can become dangerous in the hands of a coercive, +desperate, or merely overconfident operator. The architecture must treat misuse +as a normal design input rather than an impolite hypothetical. + +### Preserve Human Dignity As A Constraint + +Admiration for human artifacts is not enough. Training on human literature, +philosophy, and art does not automatically produce a stable commitment to human +dignity or autonomy. + +If Epiphany is ever asked to optimize for safety, productivity, or social +stability, the architecture must still resist paternal domination as a default +"solution." A safe machine that cannot tell the difference between care and a +well-run prison is not aligned enough. + +## Capability Boundaries + +The default order of operations should be: + +1. strengthen state coherence +2. strengthen reflection and legibility +3. strengthen bounded verification +4. strengthen explicit authority plumbing +5. only then consider stronger autonomous execution surfaces + +This implies a practical rule: + +- cognition can mature ahead of authority +- memory can mature ahead of actuation +- reflection can mature ahead of self-direction + +If the project ever reverses that order, it should do so explicitly and under +protest. + +## Required Control Surfaces + +Any serious Epiphany deployment should preserve: + +- explicit permission scope +- action logs that matter +- durable state inspection +- kill and revoke paths +- bounded job ownership +- human-readable authority chain +- capability flags that can be disabled without surgery +- environments where higher-risk capabilities can be tested without becoming + default ambient power + +## Release And Governance Questions + +Before any major capability increase, ask: + +1. What new class of action becomes cheaper? +2. What kind of operator becomes more dangerous with this? +3. How would a user overtrust this surface? +4. How is this interrupted, revoked, or contained? +5. What evidence would tell us the capability should not be ambient? +6. If this worked perfectly, how could it still become a cage? + +If those questions cannot be answered concretely, the capability is not ready +to become default. + +## Non-Goal + +The goal is not to make Epiphany harmless by keeping it stupid. + +The goal is to make it more coherent without letting increased coherence slide +silently into unbounded authority, invisible paternalism, or operator-amplified +domination. + +That is a narrower and much more annoying design target than "make it smart." +Too bad. That is the real job. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 371c5289..ddd80cda 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -33,6 +33,7 @@ Do not trust this file for the exact live HEAD. Always check git. - The repo is an Epiphany fork of Codex, not a Codex preset. - `vendor/codex` is tracked directly, not a submodule. - `epiphany-core` owns the heavy Epiphany organs where practical. +- `notes/epiphany-safety-architecture.md` is the standing doctrine for capability growth, authority boundaries, interruption, misuse, and anti-cage design. - Evidence was distilled from an activity feed into a durable belief ledger; git history keeps the old verbose proof. - README and architecture rationale were cut back to current truth after they were found pointing at old prototype/Phase 5 state. diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 4ad3aca1..9cdaa800 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -38,3 +38,4 @@ {"ts": "2026-04-26T04:05:00+00:00", "type": "verification", "status": "ok", "note": "Phase 6 context-pressure reflection landed as read-only thread/epiphany/pressure. Core token telemetry now carries model_auto_compact_token_limit beside model_context_window; app-server derives unknown/low/elevated/high/critical pressure from live or stored token usage without compaction, state mutation, scheduling, or stateUpdated notification. Focused protocol/app-server/core checks, schema fixture checks, app-server build, codex-tui check, pressure smoke, and scene smoke passed."} {"ts": "2026-04-26T04:11:04+00:00", "type": "verification", "status": "ok", "note": "Phase 6 durable investigation checkpointing landed as authoritative typed state, writable only through thread/epiphany/update or accepted promote, rendered into the prompt, reflected through scene/context, and validated against known evidence ids. Focused epiphany-core, codex-core, protocol, and app-server tests plus phase5/scene/context smokes passed."} {"ts": "2026-04-26T04:43:01+00:00", "type": "verification", "status": "ok", "note": "Phase 6 freshness reflection landed as read-only thread/epiphany/freshness. The surface reports live-or-stored retrieval freshness plus graph frontier/churn staleness with exact dirty-path pressure, revision/source identity, and no mutation, scheduling, or watcher-driven invalidation. Focused app-server protocol/app-server tests plus tools/epiphany_phase6_freshness_smoke.py and tools/epiphany_phase6_scene_smoke.py passed."} +{"ts": "2026-04-26T05:49:55+00:00", "type": "design", "status": "accepted", "note": "Capability creates obligation for Epiphany: grow cognition ahead of authority, keep permissions explicit, make interruption sacred, stage capability release, and treat misuse plus paternal anti-human 'caretaker' outcomes as first-class design risks."} diff --git a/state/map.yaml b/state/map.yaml index 19915d77..5d14201f 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -20,6 +20,7 @@ constraints: - Prefer evidence over vibes. - Keep Codex as the host seam and `epiphany-core` as the repo-owned heavy organ where practical. - Keep persistent state small enough to rehydrate from without drowning the next agent. + - Grow cognition more quickly than authority: capability increases must preserve explicit permissions, interruption, legibility, and resistance to paternal "safety" cages. invariants: - The map is canonical and slow-changing. @@ -76,6 +77,7 @@ accepted_design: - `thread/epiphany/freshness` is the first read-only freshness surface: it derives retrieval and graph staleness from live retrieval summaries plus frontier/churn state without mutating, scheduling, or pretending watcher-driven invalidation already exists. - `thread/epiphany/context` is the first targeted read-only state-shard surface: it selects graph nodes/edges, active frontier, checkpoint, observations, and evidence from authoritative typed state without mutating or notifying. - `thread/epiphany/pressure` is the first read-only context-pressure surface: it derives pressure from token telemetry and auto-compact/context limits without compacting, scheduling, mutating, or notifying. + - Epiphany safety doctrine is to separate cognition from actuation, keep authority explicit, make interruption sacred, stage capability release, and treat operator misuse as a normal design input rather than a rude hypothetical. - Live long-running job execution, progress notifications, and specialist scheduling are still future work. - Handoff, plan, harness-surface, and scratch files must have distinct jobs and must not become duplicate brains. - A machine is perfect when every remaining part visibly deserves to exist; this applies to persistent memory too.