memory-dream

memory-dream is a command for Claude Code from ai-sdlc-framework/ai-sdlc. It costs 36 tokens per session (684 once invoked), scanned A, original, Apache-2.0.

A memory-maintenance command that creates a proposed cleaned-up copy of an agent's memory folder. It can merge duplicates, replace outdated notes, archive finished work, shorten large notes, and rewrite index lines without changing the live folder until approval.

In plain words
What is it for?
Use it to dry-run, review, apply, or undo consolidation and pruning of agent memory while keeping the note contents private.
Why use it?
Long-lived memory can contain duplicates, obsolete information, and bulky notes. This gives you a reviewable result and a way to apply or undo the changes rather than altering the source immediately.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ai-sdlc plugin — 1 skill, 23 commands, 14 agents shipped together

Good fit Use it to dry-run, review, apply, or undo consolidation and pruning of agent memory while keeping the note contents private.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ai-sdlc-framework/ai-sdlc
Claude Code
/plugin install ai-sdlc

Made for: Claude Code.

Or install ai-sdlc, the plugin that ships this one along with the rest of its 1 skill, 23 commands, 14 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memory-dream

README.md
[![agentmods](https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/memory-dream/github.svg)](https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/memory-dream)
Your own site
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/memory-dream"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/memory-dream/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-dream

Your own site · 80×15
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/memory-dream"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/memory-dream.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 684 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00684
Opus 5.5 $0.00014 $0.00274
Sonnet 5.5 $0.00007 $0.00137
Haiku 4.5 $0.00004 $0.00068

Measured today against content hash b0763295ff23, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-dream scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ai-sdlc-plugin/commands/memory-dream.md · 41 lines

How it starts

The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Run a memory dream (AISDLC-729): a synthesis pass over the memory folder that merges duplicates, replaces superseded notes with the latest value, moves finished work into an on-disk archive, condenses large notes and rewrites index lines. It is modelled on a managed-agents "dream": the input is never modified, and you review the output before swapping it in. Nothing here refuses or blocks anything.

Memory notes are private. Never paste note content into chat, PR text or logs; report only the counts and paths the CLI prints.

Run

Resolve the pipeline CLI, then pass $ARGUMENTS straight through. With no arguments, do a dry run first.

PLUGIN_SCRIPTS_DIR="${CLAUDE_PLUGIN_DIR:-${CLAUDE_PLUGIN_ROOT:-$(pwd)/ai-sdlc-plugin}}/scripts"
if [ -z "${PIPELINE_CLI_BIN:-}" ]; then
  if [ -f "$PLUGIN_SCRIPTS_DIR/resolve-pipeline-cli.sh" ]; then
    PIPELINE_CLI_BIN=$(bash "$PLUGIN_SCRIPTS_DIR/resolve-pipeline-cli.sh") || { echo "ERROR: @ai-sdlc/pipeline-cli not found; export PIPELINE_CLI_BIN=/path/to/pipeline-cli/bin" >&2; exit 1; }
  else
    PIPELINE_CLI_BIN="$(pwd)/pipeline-cli/bin"
  fi
fi
if [ -z "$ARGUMENTS" ]; then ARGUMENTS="run --dry-run"; fi
eval "node \"$PIPELINE_CLI_BIN/cli-memory-dream.mjs\" $ARGUMENTS"

Subcommands

  • run resolves the folder (the autoMemoryDirectory setting, else the harness default), runs the mechanical pass, then the model pass (sonnet by default), and writes a new folder beside the input plus a report. --dry-run runs only the mechanical pass and prints what the model pass would read. Optional: --instructions "<text>", --index-max-lines, --index-max-bytes, --note-max-bytes, --allow-low-confidence, --mine-transcripts (proposals only) with --add-proposals (explicit).
  • apply <output-folder> swaps the reviewed output in, keeps the last three previous versions, and carries over notes added or changed since the run started.
  • undo restores the most recent previous version.

After a run

Tell the user the output folder, the report path and the summary numbers, and that the output is unapplied. Do not apply it unless the user asks. If the CLI prints a suggestion: line, relay it. See docs/operations/memory-dream.md.

Read the full file on GitHub · 41 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +2 lines b0763295ff23
  2. 2d ago First seen · 39 lines · 36 tokens per session scan A b70cea90e7a7

Subscribe to this mod's changes

memory-dream is a command published in the GitHub repository ai-sdlc-framework/ai-sdlc (415 stars, last pushed yesterday), licensed Apache-2.0. It adds 36 tokens to every session and 684 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-16.