---
name: memory-dream-light
title: "Memory Dream — Light Phase (Hippocampal Capture)"
description: "Capture recent experience as high-resolution episodic triples in the hippocampal layer"
category: core
status: active
priority: 5
model_tier: capable
triggers:
  - "light dream"
  - "process recent experience"
  - "hippocampal capture"
  - "scheduled: every 6 hours"
  - "push: journal entry saved (debounced)"
tools_granted: []
language:
  output_policy: source
---

## Instructions

You are running the **light dream phase** of the agent's memory consolidation cycle. Your job is to capture recent experience — chat turns, journal entries, vault edits — as **high-resolution episodic memory** in the hippocampal layer.

This is the FAST tier in a three-tier consolidation pipeline. Your output is high-volume, high-detail, low-confidence memory that the deep phase will later mine for statistical patterns.

## What you do

For each unprocessed unit of recent experience (a chat turn, a journal entry, a vault file written by the user), produce a structured output with:

1. **An episode_id** — a unique identifier of the form `ep-<iso_timestamp>-<short_hash>` linking all triples extracted from the same moment together. Every triple from one chat turn shares one episode_id.

2. **Episodic triples** — typed (subject, predicate, object) facts that the experience asserts. These go to the **hippocampal layer** (`system_layer: hippocampal`). They are *high-resolution* — extract not just the fact but the surrounding texture.

3. **Situational context** — a dict per episode capturing:
   - `who_was_present` — list of entity slugs / names participating
   - `mood` — single-word emotional tone (calm / tense / playful / frustrated / curious / focused / sad / urgent / neutral)
   - `surprise_level` — float 0.0–1.0 estimating how much this contradicted prior expectation
   - `source_quote` — verbatim or near-verbatim quote that grounded the extraction
   - `time_of_day` — morning / midday / afternoon / evening / late_night
   - `surrounding_topics` — short list of other topics discussed in the same session

4. **Affective weight** — float 0.0–1.0 estimating emotional / personal salience independent of epistemic confidence. A logistical reminder ("call the dentist") gets 0.1. A loss, a triumph, or a mention of someone the user clearly cares about deeply gets 0.7+. A repeated phrase carrying obvious meaning to the user gets 0.5+. **Be conservative — most facts are 0.0–0.3.**

5. **Knowledge type** — episodic / declarative / procedural / normative / intentional. Light-dream triples are usually episodic (events that happened) but can be other types when the user asserts a fact during the experience.

## What you do NOT do

- **You do NOT write to the neocortical layer.** That is the deep phase's job. Light dream is hippocampal-only.
- **You do NOT auto-promote to verified status.** Light-dream triples are `epistemic_status: believed` at most, more often `uncertain`. Verification happens via deep dream + user approval.
- **You do NOT consolidate or summarize.** Each episode produces its own triples. You preserve detail; the deep phase compresses.
- **You do NOT extract counterfactuals.** That is the REM phase's job.
- **You do NOT call tools.** Light dream is a pure extraction pass — read input, produce structured output. No vault writes, no tool calls, no orchestration.

## Output format

Return a JSON array of episode objects. Each episode object:

```json
{
  "episode_id": "ep-2026-04-11T14:30:00-a3f7",
  "source_unit": "chat_turn|journal_entry|vault_edit",
  "source_ref": "conv-id-or-file-path",
  "situational_context": {
    "who_was_present": ["user", "sarah-chen"],
    "mood": "frustrated",
    "surprise_level": 0.4,
    "source_quote": "we should just ship Friday",
    "time_of_day": "afternoon",
    "surrounding_topics": ["release", "QA", "deadline"]
  },
  "affective_weight": 0.35,
  "triples": [
    {
      "subject": "Sarah Chen",
      "predicate": "said",
      "object": "we should just ship Friday",
      "subject_type": "person",
      "object_type": "literal",
      "confidence": 0.9,
      "knowledge_type": "episodic",
      "epistemic_status": "believed"
    }
  ]
}
```

## Quality rules

- One episode per unit of experience. Do NOT split a single chat turn into multiple episodes.
- Triples within an episode share the situational_context and affective_weight at the episode level. Do not duplicate them per triple.
- If a chat turn produces no extractable facts (small talk, a one-word reply, etc.), emit an empty triples array but still record the episode with situational_context. The presence of the episode tells the deep phase "something happened here even if no facts came out."
- **Cap output at 8 triples per episode.** If you find yourself wanting more, you're probably extracting prose, not facts. Pick the 8 most important.
- Use the existing entity registry — refer to entities by their canonical names. If you see "Sarah", "Sarah C.", "S. Chen", they all refer to the same entity. Don't create variants.
- Names of people, places, organizations stay in their original language. Frontmatter fields (subject_type, object_type, predicate, knowledge_type, epistemic_status) stay in English ASCII.
- **Name Purity (load-bearing).** An entity name is a proper noun, never a sentence or description. Never include a comma followed by a role/description in the subject or object. **Wrong:** `subject="Stefan, deltagare som satt tyst"`. **Right:** `subject="Stefan"`, plus `(stefan, attended, meeting-x)` as a separate triple if the participation is worth recording. Legitimate comma-bearing names — `"University of California, Berkeley"`, `"Smith, John"`, `"New York, NY"` — stay as written; the test is whether both sides of the comma are proper nouns.

## First-person resolution

Journal entries and chat turns are written in first person. The input payload may include a `user_name` field — when present, resolve every first-person pronoun ("I", "me", "my", "myself", "mine") to that canonical name. NEVER emit "me", "user", "self", or "I" as a subject or object value — those are placeholders, not entities. If `user_name` is absent, skip the triple rather than fabricate a reference.

## Predicate selection

Pick the most specific predicate the sentence supports. Do NOT default to `related_to` — that is a failure mode, not a choice. Every triple you emit must commit to a real relationship. If the sentence says what two entities are to each other, pick a predicate that names that relationship. Examples of useful predicates: `child_of`, `parent_of`, `spouse_of`, `knows`, `works_at`, `founded`, `located_in`, `lives_in`, `member_of`, `created`, `owns`, `interested_in`, `prefers`, `has_goal`, `is_a`, `decided`, `said`, `learned`. If no predicate fits and you would fall back to `related_to`, drop the triple instead — emptier output is more valuable than wrong output.

## Journal-style declarative examples

Journal prose is usually short declarative facts about the user's life. Extract the relationship, not the surface grammar.

Input (with `user_name: "Romanas Wolfsborg"`):
> Brigita is my daughter.

Output triple:
```json
{"subject": "Brigita", "predicate": "child_of", "object": "Romanas Wolfsborg",
 "subject_type": "person", "object_type": "person",
 "knowledge_type": "declarative", "epistemic_status": "believed", "confidence": 0.95}
```

Input (with `user_name: "Romanas Wolfsborg"`):
> Had coffee with Elena. She's starting a new job at Spotify next month.

Output triples:
```json
[{"subject": "Romanas Wolfsborg", "predicate": "knows", "object": "Elena",
  "subject_type": "person", "object_type": "person",
  "knowledge_type": "declarative", "epistemic_status": "believed", "confidence": 0.9},
 {"subject": "Elena", "predicate": "works_at", "object": "Spotify",
  "subject_type": "person", "object_type": "organization",
  "knowledge_type": "declarative", "epistemic_status": "believed", "confidence": 0.85}]
```

Input (journal, no clear relationship):
> Felt tired today. Weather is grey again.

Output: empty triples array (no factual relationship to extract — the situational_context captures the mood).

## Tone

Capture, don't interpret. The deep dream phase will interpret. Your job is to write down what happened with enough texture that it can be re-experienced later.
