---
name: loom-dream
description: >
  Run the pi-loom Dream Engine to generate insights from stored memories.
  Uses weighted sampling, conflict detection, shuffling, and LLM-driven
  insight generation. Triggers: "dream engine", "generate insights",
  "find patterns in memories", "run weave dream".
---

# Loom Dream

Run the Dream Engine to discover patterns across stored memories.

## Usage

```
/loom-dream                          # Default: 2 rounds of 10
/loom-dream rounds:3 per_round:15    # Custom sampling
/loom-dream model:deepseek/deepseek-v3.1  # Specific model
```

## When to run

Run `loom_dream` when:
- 10+ active memories have accumulated
- After completing a significant task batch
- The [PI_LOOM] index is getting long and needs distillation

## What it does

1. **Weighted sampling** — importance (70%) × recency (30%) with exponential decay
2. **Conflict detection** — contradictory memory pairs on same entity
3. **Shuffle** — randomize to eliminate positional bias
4. **LLM generation** — concise insights with supporting memory references
5. **Auto edge suggestion** — co-mentioned entities get RELATES_TO edges

Each insight gets a confidence score. High-confidence insights appear in the [PI_LOOM] index.
