> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev.byterover.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Dream

> Review cleanup and consolidation proposals for saved ByteRover memory.

Use the Dream skill when a space has accumulated enough memory that topics may overlap, drift, or become stale.

Dream does not edit memory. It only proposes cleanup candidates. Your agent should read the source topics, decide what is worth changing, then use the right follow-up skill command.

## When to use Dream

Use Dream after a burst of recording, before a planning round, or when query results feel noisy.

Do not run Dream on every task. The proposals are more useful when there is enough saved memory to compare.

<Note>
  Dream works on the space resolved from the current project folder. If the project should use a named space, bind it first with [Bind](/v4/skill/bind).
</Note>

## Ask the agent to review memory

Ask your agent:

```text theme={null}
Review ByteRover memory for cleanup and consolidation opportunities.
```

The agent runs Dream from inside the project folder.

Manual reference:

```bash theme={null}
node scripts/dream.mjs --mode merge --min-score 0.3
```

## Choose a mode

Dream supports four modes.

| Mode         | What it proposes                                               |
| ------------ | -------------------------------------------------------------- |
| `merge`      | Topics that cover the same ground and may be combined.         |
| `link`       | Topics that should reference each other but do not yet link.   |
| `prune`      | Topics that look stale or low-value.                           |
| `synthesize` | Small related topics that may read better as one larger topic. |

The default mode is `merge`.

Manual examples:

```bash theme={null}
node scripts/dream.mjs --mode link
```

```bash theme={null}
node scripts/dream.mjs --mode prune --limit 10
```

```bash theme={null}
node scripts/dream.mjs --mode synthesize
```

## Review the candidates

Dream returns JSON with candidate paths, scores, and the reason the topics were grouped.

Ask the agent to read source topics before acting:

```text theme={null}
Read the suggested Dream candidates and explain which ones are worth changing before editing memory.
```

Manual reference:

```bash theme={null}
node scripts/brv.mjs read "architecture/auth.html"
```

## Act on a proposal

Only act on candidates that still make sense after reading the source topics.

| Dream proposal | Follow-up action                                                                  |
| -------------- | --------------------------------------------------------------------------------- |
| `merge`        | Use `merge.mjs` to fold one topic into another and remove the loser.              |
| `link`         | Use [Record](/v4/skill/record) to update `related=` references.                   |
| `prune`        | Use `prune.mjs` to remove stale topics after confirming they are safe to delete.  |
| `synthesize`   | Use `synthesize.mjs` to write a consolidated topic and absorb the smaller topics. |

Manual references:

```bash theme={null}
node scripts/merge.mjs auth/login.html auth/oauth.html
```

```bash theme={null}
node scripts/prune.mjs old/topic.html
```

```bash theme={null}
node scripts/synthesize.mjs auth/session-model --html '<bv-topic ...>...</bv-topic>' --absorb auth/login.html,auth/oauth.html
```

## Verify after cleanup

After acting on Dream proposals, ask the agent to query the same topic again:

```text theme={null}
Query ByteRover for the memory we just consolidated and confirm the result is clearer.
```

If the result got worse, ask the agent to explain what changed before recording more memory.
