-
Notifications
You must be signed in to change notification settings - Fork 0
ReflectionOps
Every decision gets an episode. Every episode gets a seal. Every seal proves what happened.
ReflectionOps is the gate enforcement domain. It wraps RuntimeGate, CoherenceGate, ReflectionSession, IRISEngine, degrade ladder, episode state machine, audit log, and kill-switch into 19 function handlers keyed by RE-F01 through RE-F19. Handlers RE-F13–F19 extend the domain with institutional memory: precedent extraction, pattern fingerprinting, precedent matching, knowledge consolidation, temporal recall, knowledge decay, and IRIS precedent resolution.
Module: src/core/modes/reflectionops.py
| ID | Name | Purpose |
|---|---|---|
| RE-F01 | episode_begin |
Begin a new decision episode, transition to ACTIVE |
| RE-F02 | episode_seal |
Seal an active episode with hash chain |
| RE-F03 | episode_archive |
Archive a sealed episode to cold storage |
| RE-F04 | gate_evaluate |
Evaluate RuntimeGate constraints |
| RE-F05 | gate_degrade |
Apply a degrade step from the degrade ladder |
| RE-F06 | gate_killswitch |
Activate kill-switch: freeze all episodes |
| RE-F07 | audit_non_coercion |
Log non-coercion attestation (hash-chained) |
| RE-F08 | severity_score |
Compute centralized severity score |
| RE-F09 | coherence_check |
Run coherence gate evaluation with domain context |
| RE-F10 | reflection_ingest |
Ingest a sealed episode into the reflection session |
| RE-F11 | iris_resolve |
Resolve an IRIS query (WHY, WHAT_CHANGED, STATUS) |
| RE-F12 | episode_replay |
Deterministically replay a sealed episode and verify hash match |
| RE-F13 | precedent_ingest |
Persist reflection takeaways as Precedent nodes in MG |
| RE-F14 | pattern_fingerprint |
Compute structural fingerprint from episodes (outcome/drift/degrade patterns) |
| RE-F15 | precedent_match |
Search MG for similar precedents given a new episode context |
| RE-F16 | knowledge_consolidate |
Merge related precedents into consolidated KnowledgeEntry nodes |
| RE-F17 | temporal_recall |
Time-windowed recall ("what did we learn last month?") |
| RE-F18 | knowledge_decay |
Apply half-life decay, demote low-relevance entries |
| RE-F19 | iris_precedent_resolve |
Extend IRIS with PRECEDENT query type |
PENDING -> ACTIVE -> SEALED -> ARCHIVED
|
+--[freeze]--> FROZEN
Implementation: src/core/episode_state.py
RE-F01 (begin) -> RE-F04 (gate evaluate) -> RE-F07 (non-coercion)
|
v
RE-F03 (archive) <- RE-F02 (seal) <- RE-F09 (coherence)
Emergency mechanism that:
- Freezes all in-flight episodes (ACTIVE -> FROZEN)
- Emits halt proof bundle (who authorized, why, timestamp)
-
Publishes
drift_signalwith subtypekillswitch_activated, severityred - Resume requires explicit authority check
Implementation: src/core/killswitch.py
Append-only, hash-chained NDJSON log. Each entry links to the previous via SHA-256, creating a tamper-evident chain. The log records gate evaluations, degrade steps, episode seals, and non-coercion attestations.
Implementation: src/core/audit_log.py
Centralized severity scorer called by all domains. Takes drift type, current severity, and context (recurrence count). Returns a numeric score and classification (green/yellow/red).
Implementation: src/core/severity.py
Heuristic based on drift signal count:
- 0 drift signals: 95.0 (green)
- 1-3 drift signals: 70.0 (yellow)
- 4+ drift signals: 40.0 (red)
Emits coherence_{signal} event. Non-green results generate drift signals.
Replays a sealed episode by recomputing from episode data. Compares SHA-256 hash against expected value. Hash mismatch emits a red-severity process_gap drift signal.
ReflectionOps is a target for:
- CASCADE-R03: FranOps retcon executed -> RE-F01 episode flag
- CASCADE-R07: Any red-severity drift -> RE-F08 severity scoring
ReflectionOps is a source for:
- CASCADE-R05: Episode freeze -> IntelOps half-life check (INTEL-F11)
- CASCADE-R06: Kill-switch -> self-propagation (RE-F06)
| Key | Type | Used By |
|---|---|---|
episode_tracker |
EpisodeTracker | F01, F02, F03, F06 |
memory_graph |
MemoryGraph | F01, F09 |
drift_collector |
DriftSignalCollector | F09 |
audit_log |
AuditLog | F02, F04, F05, F07, F12 |
gates |
list | F04 |
coherence_score |
float | F09 (optional override) |
reflection_session |
ReflectionSession | F10 |
iris_engine |
IRISEngine | F11 |
- Sealing and Episodes — immutability model
- IntelOps — claim lifecycle domain
- FranOps — canon enforcement domain
- Cascade Engine — cross-domain propagation
- Event Contracts — routing table and event declarations
- IRIS — operator query engine
Σ OVERWATCH — Coherence Ops Platform • Current release: v2.1.0 • DeepSigma
- Start
- Core
- Schemas
- FEEDS + Exhaust
- Integrations
- Reference Layer
- Ops
- Excel-First
- EDGE + ABP
- Domain Modes
- Governance
- Meta