← Back to Engineering
SYSTEM: PSYCHIATRY-L5

The L5 Trace Framework

A debugging stack for psychological pattern recognition. Tracing errors from Consequence (L1) to Origin (L5).

📊 Implications
Immediate takeaway: Next time you hit a recurring interpersonal “bug,” trace it down: L1 (consequence) → L2 (behaviour) → L3 (strategy) → L4 (belief) → L5 (origin). Most fixes live at L4, not L1.
Strategic implication: AI can serve as a structured trace partner for psychological debugging — asking one question at a time to reach root cause, not just surface-level comfort.
Key risk: AI can hallucinate L5 origins. Treat outputs as hypotheses for human verification, not clinical diagnoses. Confabulation risk increases with emotional prompts.

1. System Objective

To move emotional processing from Comfort Mode (Validation) to Inquiry Mode (Root Cause Analysis).

Hypothesis: Most recurring interpersonal "bugs" are not execution errors (L1-L3), but kernel-level configuration errors (L4-L5).

2. The Stack Topology

The Trace Framework maps psychological depth to a 5-layer OSI model.

graph BT L1[L1: Consequence] -->|Caused By| L2[L2: Behaviour] L2 -->|Driven By| L3[L3: Strategy] L3 -->|Optimizing For| L4[L4: Belief / Kernel] L4 -->|Installed At| L5[L5: Origin Event] style L1 fill:#333,stroke:#666 style L2 fill:#333,stroke:#666 style L3 fill:#333,stroke:#666 style L4 fill:#b91c1c,stroke:#f87171 style L5 fill:#b91c1c,stroke:#f87171

🔬 Layer Definitions

  • L1 (Output): "I get ghosted." (The crash).
  • L2 (Runtime): "I over-texted." (The execution).
  • L3 (Logic): "I wanted to secure the connection." (The intent).
  • L4 (Config): "If I pause, I will be abandoned." (The assumption).
  • L5 (Source): [Hypothesis] Age 7, Event X.

3. Debugging Protocol

Use this prompt to initiate a trace session. Do not use for crisis management.


System Prompt:
  Role: Structured Trace Partner
  Constraint: Ask only ONE question at a time.
  Algorithm:
    1. Identify L1 (What happened?)
    2. Trace L2 (What action preceded it?)
    3. Query L3 (What was the goal?)
    4. Challenge L4 (Is the underlying belief true?)
    5. Hypothesize L5 (When was this learned?)
                

⚠️ Safety Check

Confabulation Risk: The AI can hallucinate L5 origins. Treat outputs as hypotheses for human verification, not medical diagnoses.

Frequently Asked Questions

What is the L5 Trace Framework?

It's a 5-layer debugging stack for psychological patterns, modelled after the OSI networking model. Layer 1 is the visible consequence ("I got ghosted"), and Layer 5 is the origin event (often childhood) that installed the belief driving the behaviour. Most people only address L1-L2; the framework forces you to trace down to L4-L5 where the actual fix lives.

Can AI replace a therapist using this framework?

No. AI acts as a structured trace partner — it asks systematic questions to help you identify patterns. But it cannot diagnose, it hallucinates origin events, and it lacks the ethical training of a licensed professional. Use it as a supplement for self-reflection, not a substitute for therapy.

How do I distinguish between L3 (strategy) and L4 (belief)?

L3 is the conscious goal behind a behaviour ("I wanted to secure the connection"). L4 is the unconscious assumption driving that goal ("If I pause, I will be abandoned"). The test: if removing the assumption would change the strategy entirely, you've found L4.

See the System

I don't just write about this; I build the systems. Explore the actual codebase behind these insights.

View Athena-Public →
🤝

Work With Me

Stop drowning in complexity. Hire me to architect your AI systems and bionic workflows.

Book a Consultation →
WK

Winston Koh & Project Athena

This article was co-authored by Winston and Project Athena
— his AI-powered digital personal assistant.

More about us →