Skip to main content

Pipeline Glossary

This page defines the terminology used in Kernle’s memory processing pipeline.

Core Terms

TermDefinition
TransitionA layer-to-layer promotion path (e.g., raw_to_episode, episode_to_belief). Each transition has quantity thresholds that trigger processing.
ProcessingThe automated pipeline that reads source memories, applies inference, and writes promoted memories or suggestions. Controlled by kernle process run.
PromotionMoving a memory from a lower layer to a higher one (raw → episode → belief → value). Can be direct (auto_promote=True) or suggestion-based.
SuggestionA proposed memory that the SI reviews before accepting. Created when auto_promote=False (default). The SI retains control over what gets promoted.
ScaffoldA structured reflection prompt output by kernle promote. Contains episodes, existing beliefs, and prompts for the SI to reason over. No AI involved.
MaintenanceBackground operations that keep the memory system healthy: epoch rotation, summary generation, narrative updates, consolidation scoring.
ConsolidationThe process of transforming raw experiences into structured knowledge. See Consolidation for details.
RevisionUpdating an existing belief based on new evidence. Uses audit-log tracking (v0.14+) rather than supersession chains.

Layer Transitions

The processing pipeline supports these transitions, executed in deterministic order:
raw_to_episode        → Extract episodes from raw captures
raw_to_note           → Extract notes from raw captures
episode_to_belief     → Derive beliefs from episode patterns (identity layer)
episode_to_goal       → Derive goals from episode patterns (identity layer)
episode_to_relationship → Derive relationship models (identity layer)
belief_to_value       → Derive values from belief clusters (identity layer)
episode_to_drive      → Derive drives from episode patterns (identity layer)
All transitions require a bound model (v0.14.01). Without one, processing is blocked with InferenceRequiredError. No override path exists — the force flag only bypasses quantity thresholds, not the inference requirement.

Processing Modes

The process() function accepts two parameters that control behavior:
ParameterDefaultEffect
auto_promoteFalseWhen True, writes memories directly. When False, creates suggestions for SI review.
forceFalseWhen True, processes even if quantity thresholds aren’t met. Does not bypass the inference requirement (v0.14.01).

Pipeline Diagram

The full processing pipeline from raw capture to identity layer:
┌─────────────┐
│  Raw Entry  │  ← kernle raw "..." / API / MCP
└──────┬──────┘


┌─────────────────┐
│ extract_suggestions() │
│ detect_significance() │
└──────┬──────────┘


┌─────────────────┐
│   Suggestions   │  ← SI resolves via accept/dismiss (or expire)
│   (or direct    │
│    promotion)   │
└──────┬──────────┘


┌──────────────────────────────────────────────┐
│              Memory Layers                    │
│                                              │
│  Episodes ──┬── Beliefs ──── Values          │
│             ├── Goals                        │
│             ├── Drives                       │
│             └── Relationships                │
│                                              │
│  Notes (standalone, not promoted further)    │
└──────────────────────────────────────────────┘


┌─────────────────┐
│   Maintenance   │  ← Epochs, summaries, narratives
│   Operations    │
└─────────────────┘

Audit Trail

All memory operations are logged in the memory_audit table with:
  • operation: Dotted format for new events (e.g., belief.revised, suggestion.created)
  • correlation_id: Groups all audit entries from a single process() run, allowing you to trace every write back to the invocation that produced it
  • details: Structured JSON with operation-specific data

Key Audit Events

EventEmitted When
raw.ingestedA raw entry is captured (via CLI, API, or MCP)
suggestion.createdProcessing creates a suggestion for SI review
suggestion.resolvedA suggestion is accepted, dismissed, or expired. The details.resolution field records which ("accepted", "dismissed", "expired", or "lint_rejected").
memory.promotedA memory is directly written (auto-promote path)
belief.revisedA new belief replaces an old one via revision
belief.deactivatedAn old belief is marked inactive during revision
Use kernle audit export --format jsonl to export the audit log for analysis.