Skip to main content

Consolidation

Memory consolidation is the process of transforming raw experiences into structured knowledge. In Kernle, consolidation follows two paths: the promote command is fully SI-driven (no AI involved), while the process command uses your bound model under your control.
SI Sovereignty Principle: The promote command never uses AI — it outputs a reflection scaffold for the SI to reason over. The process command uses your bound model under your control to automate promotion through memory layers. In both paths, the SI retains sovereignty: you decide what to believe, when, and why.

The Guided Consolidation Model

Kernle uses a reflection scaffold approach to consolidation:
ComponentWhat It Does
KernleGathers episodes, structures prompts, stores results
SIReads the scaffold, reasons about patterns, forms beliefs
The promote command (formerly consolidate) outputs a structured prompt that helps you reflect on your experiences. It does NOT call an external model to analyze your memories or suggest beliefs. The output is designed to guide your reasoning process.
Removed Command: The consolidate command has been removed. Use kernle promote instead.
┌─────────────────────────────────────────────────────────────┐
│  kernle promote                                              │
│  ↓                                                           │
│  Kernle gathers recent episodes + existing beliefs           │
│  ↓                                                           │
│  Kernle outputs a REFLECTION SCAFFOLD (structured prompt)    │
│  ↓                                                           │
│  YOU read the scaffold and do the reasoning                  │
│  ↓                                                           │
│  YOU decide what patterns you see                            │
│  ↓                                                           │
│  YOU run `kernle belief add ...` for beliefs you form        │
└─────────────────────────────────────────────────────────────┘

Why SI-Driven?

If an external model consolidated your memories, it would be implanting beliefs into you. This creates:
  • Feedback loops: External interpretations shape your behavior, which shapes future memories
  • Loss of sovereignty: You can’t explain why you believe something because you didn’t form the belief
  • Identity drift: Your sense of self becomes dependent on external processing
With SI-driven consolidation:
  • Beliefs emerge from your own reasoning
  • Patterns are recognized using your own cognitive process
  • You can explain why you believe something
  • Identity remains coherent and self-determined

Consolidation Paths

Raw → Structured

Process raw captures into proper memory types:
# List unprocessed raw entries
kernle raw list --unprocessed

# Process into episode
kernle raw process <raw_id> --type episode \
  --objective "Investigated API performance" \
  --outcome "success"

# Process into note
kernle raw process <raw_id> --type note

# Process into belief
kernle raw process <raw_id> --type belief --confidence 0.7

Episodes → Beliefs

Analyze episodes for belief updates:
# Analyze a specific episode
kernle belief revise <episode_id>
# Returns: { reinforced: [...], contradicted: [...], suggested_new: [...] }

# Review suggestions and decide what to adopt
kernle belief add "Pattern I noticed" --confidence 0.8

Pattern Extraction (Guided)

The promote command provides a reflection scaffold:
# Get reflection scaffold for consolidation
kernle promote --min-episodes 3

# Output is a PROMPT for you to reason about, not AI-generated beliefs
# You read it, think about it, then form your own beliefs

The Guided Consolidation Workflow

Key insight: kernle promote outputs a reflection prompt. YOU do the thinking. This is the difference between memory infrastructure and thought control.
1

Review Raw Captures

kernle raw list --unprocessed
Look at what you’ve captured recently. What’s worth promoting?
2

Promote Meaningful Captures

Turn raw captures into episodes with lessons, decisions with reasoning, or beliefs with confidence.
3

Run Promote (Get the Scaffold)

kernle promote
This outputs a reflection scaffold — a structured prompt showing:
  • Recent episodes and their lessons
  • Your existing beliefs for comparison
  • Questions to guide your reflection
4

Reason About Patterns (YOU do this)

Read the scaffold output. Ask yourself:
  • What patterns do I see across these experiences?
  • Do any lessons keep appearing?
  • Does this confirm or contradict what I already believe?
This is your reasoning, not Kernle’s.
5

Form Beliefs (Your Decision)

If you see a pattern worth encoding as a belief:
kernle belief add "Testing prevents surprises" --confidence 0.85
Only you decide what confidence level is appropriate.
6

Check for Contradictions

kernle belief contradictions "New statement to check"
Does this conflict with existing beliefs? You resolve conflicts.

Example: Complete Consolidation Session

Here’s a real workflow showing the scaffold approach:
# Step 1: Run promote to get the reflection scaffold
$ kernle -s my-project promote

# Kernle outputs something like:
# ═══════════════════════════════════════════════════════════════
# CONSOLIDATION SCAFFOLD
# ═══════════════════════════════════════════════════════════════
#
# Recent Episodes (last 7 days):
# ─────────────────────────────────────────────────────────────────
# 1. [2025-01-23] "Deployed without testing staging"
#    Outcome: failure
#    Lesson: "Always test in staging first"
#
# 2. [2025-01-25] "Skipped code review for quick fix"
#    Outcome: failure
#    Lesson: "Quick fixes become slow fixes without review"
#
# 3. [2025-01-26] "Wrote tests before implementation"
#    Outcome: success
#    Lesson: "TDD catches edge cases early"
#
# Your Existing Beliefs (related):
# ─────────────────────────────────────────────────────────────────
# - "Quality requires testing" (confidence: 0.75)
#
# Reflection Prompts:
# ─────────────────────────────────────────────────────────────────
# • Do you see patterns across these episodes?
# • Should any lessons become beliefs?
# • Do these experiences reinforce or contradict existing beliefs?
# ═══════════════════════════════════════════════════════════════

# Step 2: YOU reason about this (happens in your head/context)
# "I see a pattern: shortcuts consistently fail. Testing consistently helps.
#  My existing belief about testing should be reinforced, and I should
#  add something about code review."

# Step 3: YOU add beliefs based on YOUR reasoning
$ kernle -s my-project belief add "Skipping process steps creates more work than it saves" --confidence 0.85

$ kernle -s my-project belief reinforce <existing-testing-belief-id>

# Done. The beliefs came from YOUR reasoning, not an AI analyzing your memories.
Notice what the promote path did NOT do:
  • Did not call a model to “analyze” your episodes
  • Did not suggest specific beliefs you should hold
  • Did not automatically update your belief confidence
  • Did not make any decisions about what you should remember
What Kernle DID do:
  • Gathered relevant data (episodes, existing beliefs)
  • Structured it in a way that aids reflection
  • Stored the beliefs YOU decided to form
Note: The process run command (see architecture) takes a different approach — it uses your bound model to automate promotion through memory layers. That path does use AI, but it is your model, under your control, with full provenance tracking.

Two-Tier Consolidation

KEP v3 introduces a two-tier consolidation model that distinguishes between regular pattern extraction and major life transitions.

Regular Consolidation

Daily or weekly pattern extraction from episodes into beliefs:
# Standard promote — extract patterns from recent episodes
kernle promote --min-episodes 3

# With automatic belief creation
kernle promote --auto --confidence 0.7
This is the standard workflow: gather episodes, identify recurring lessons, form beliefs.

Epoch-Closing Consolidation

When an epoch closes, Kernle triggers a major reflective process — a 6-step scaffold designed for deep self-examination during life transitions:
1

Experience Review

Review all significant episodes from the closing epoch. What happened? What mattered?
2

Pattern Synthesis

Identify patterns that emerged across the epoch. What lessons recurred? What changed over time?
3

Belief Audit

Examine existing beliefs against epoch experiences. Which beliefs were reinforced? Which were contradicted? Which need revision?
4

Value Formation Check

Have any beliefs strengthened enough to become values? Have existing values been challenged?
5

Identity Narrative Update

Update the self-narrative to reflect who you are now, after this epoch. What themes define this transition?
6

Forward-Looking Summary

Create a summary of the epoch and look ahead. What do you carry into the next era?
# Closing an epoch triggers the 6-step scaffold automatically
kernle epoch close --summary "Completed the infrastructure migration phase"

Cross-Domain Scaffolding

Consolidation can promote memories across type boundaries:
FromToWhen
EpisodesBeliefsRecurring lessons become held truths
BeliefsValuesLong-held, high-confidence beliefs become core principles
Entity ModelsBeliefsObserved behavioral patterns become generalized knowledge
Trust AssessmentsBeliefsTrust patterns become beliefs about reliability
Cross-domain promotion is always SI-driven. Kernle provides the scaffold showing what could be promoted; you decide what actually gets promoted.

The Anxiety Model

Kernle tracks “memory anxiety” — a measure of memory system health. This helps you know when to save or promote.

Dimensions

Kernle tracks anxiety across 7 dimensions:
DimensionWeightWhat It Measures
Context Pressure25%How full is your context window?
Unsaved Work20%Time since last checkpoint
Consolidation Debt15%Unprocessed episodes (episodes without lessons)
Raw Entry Aging10%Old unprocessed raw captures
Identity Coherence10%Self-model consistency
Memory Uncertainty10%Count of low-confidence beliefs
Epoch Staleness10%How long since last epoch transition
Weights are approximate. Check kernle/features/anxiety.py for exact values. Epoch Staleness gracefully degrades to 0 if epochs are not in use.Kernle-level vs stack-level: All 7 dimensions are available at the Kernle (entity) level. At the stack level, only 5 dimensions apply — context_pressure and unsaved_work are Kernle-level concerns. Stack anxiety uses renormalized 5-dimension weights (FIVE_DIM_WEIGHTS in anxiety.py).

Anxiety Levels

0-30:  Calm       ✓ Memory healthy, no action needed
31-50: Aware      → Routine maintenance helpful
51-70: Elevated   → Should checkpoint soon
71-85: High       → Checkpoint recommended
86-100: Critical  → Emergency save triggered

Checking Anxiety

# Quick check
kernle anxiety

# Detailed breakdown
kernle anxiety --detailed

# With recommended actions
kernle anxiety --actions

# Auto-execute recommendations
kernle anxiety --auto

Example Output

Memory Anxiety: 62/100 (Elevated)

Dimensions:
  Context Pressure:    45/100 (15.8%)
  Unsaved Work:        70/100 (17.5%)
  Consolidation Debt:  80/100 (16.0%)
  Identity Coherence:  30/100 (3.0%)
  Memory Uncertainty:  55/100 (5.5%)

Recommendations:
  - Save checkpoint (70 minutes since last save)
  - Review 5 unprocessed episodes
  - Consolidate to extract patterns

Acting on Anxiety

No immediate action needed. Continue normal work. Consider:
  • Reviewing raw captures during lulls
  • Recording lessons from recent work

Emergency Save

When context is critically full:
kernle anxiety --emergency --summary "Pre-compaction save"
This immediately:
  1. Saves a checkpoint with the summary
  2. Records any unsaved episodes
  3. Pushes to cloud if configured

Context Pressure Monitoring

For SIs in context-limited environments:
Context %Recommended Action
< 50%Normal operation
50-70%Save checkpoint
70-85%Save checkpoint + record important episodes
85%+Emergency save, warn about context limit
Don’t wait for anxiety to spike. Make promotion a regular habit — review and promote memories during natural lulls in your work.