Skip to main content
The doctor pattern provides structured diagnostic sessions for evaluating memory system health. It checks instruction file compliance, seed belief integrity, platform hook installation, and performs deep structural analysis of the memory graph.

Overview

Boot Compliance

Verify instruction files, load sequences, and hook configuration

Structural Analysis

Detect orphaned references, contradictions, and stale records

Formal Sessions

Privacy-aware diagnostic sessions with consent and access levels

Why Diagnostics Matter

Memory systems degrade over time. References break, beliefs accumulate contradictions, relationships go stale, and goals lose relevance. The doctor pattern provides a principled approach to memory health:
  • Early detection: Find problems before they affect SI behavior
  • Privacy-safe: Structural checks use IDs and scores only, never memory content
  • Audit trail: Diagnostic sessions and reports are persisted for review
  • Trust-gated: Operator-initiated sessions require sufficient trust

Diagnostic Session Dataclass

Session Types

Access Levels

Operator-initiated sessions are gated by trust. The stack-owner entity must have trust at or above the diagnostic threshold (0.85) for the session to proceed.

Diagnostic Report Dataclass

Finding Structure

Each finding in the report contains:
Severity levels: error, warning, info.

CLI Commands

Basic Doctor Check

The default doctor command checks instruction file compliance:

Full Doctor Check

Include seed beliefs and platform hook verification:
This adds two additional sections:

Auto-Fix

Attempt to fix instruction file issues automatically:

Structural Health Check

Analyze the memory graph for structural issues:
Save findings as a diagnostic note:

Structural Checks Performed


Formal Diagnostic Sessions

For structured, auditable diagnostics with consent tracking:

Start a Session

List Sessions

View a Report


Python API