speckit.memory-md.plan-with-memory

speckit.memory-md.plan-with-memory is a command for Claude Code from DyanGalih/spec-kit-memory-hub. It costs 14 tokens per session (1,306 once invoked), scanned A, original, MIT.

A planning command that retrieves project memory before creating a feature plan. It uses an index and SQLite cache to find relevant past decisions and constraints, then writes a memory synthesis for the feature.

In plain words
What is it for?
Use it before planning a feature in a project that uses the memory-md system. It helps prepare context, review stored decisions, and search more deeply when the initial synthesis is incomplete.
Why use it?
It reduces the chance that a plan ignores earlier decisions or conflicts with existing project knowledge. The synthesis step gives planning a focused record of the information that matters.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it before planning a feature in a project that uses the memory-md system. It helps prepare context, review stored decisions, and search more deeply when the initial synthesis is incomplete.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.plan-with-memory
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/DyanGalih/spec-kit-memory-hub

Made for: Claude Code.

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 speckit.memory-md.plan-with-memory

README.md
[![agentmods](https://agentmods.dev/badge/commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.plan-with-memory/github.svg)](https://agentmods.dev/commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.plan-with-memory)
Your own site
<a href="https://agentmods.dev/commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.plan-with-memory"><img src="https://agentmods.dev/badge/commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.plan-with-memory/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 speckit.memory-md.plan-with-memory

Your own site · 80×15
<a href="https://agentmods.dev/commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.plan-with-memory"><img src="https://agentmods.dev/badge/commands/dyangalih/spec-kit-memory-hub/speckit.memory-md.plan-with-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,306 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.00014 $0.01306
Opus 5 $0.00007 $0.00653
Sonnet 5 $0.00003 $0.00261
Haiku 4.5 $0.00001 $0.00131

Measured 9d ago against content hash b103ddd57297, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

speckit.memory-md.plan-with-memory 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 9d ago.

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.

commands/speckit.memory-md.plan-with-memory.md · 106 lines

How it starts

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

Plan With Memory

Before planning the feature, resolve configuration. If .specify/extensions/memory-md/config.yml exists, read it for memory_root, specs_root, feature_memory_filename, memory_synthesis_filename, require_memory_synthesis_before_plan, optimizer, and retrieval. Otherwise use defaults: memory_root: docs/memory, specs_root: specs, feature_memory_filename: memory.md, memory_synthesis_filename: memory-synthesis.md, require_memory_synthesis_before_plan: true, and the retrieval defaults below. If require_memory_synthesis_before_plan is false, skip the synthesis gate but still produce a synthesis when possible.

  1. Prepare Context: Run /speckit.memory-md.prepare-context --feature specs/<feature> or call speckit_memory_refresh_cache(scope="all") (to sync backup .md files to SQLite if empty) and then speckit_memory_synthesize(feature="specs/<feature>").
  2. Read Synthesis: Read specs/<feature>/memory-synthesis.md to identify constraints and decisions.
  3. Targeted Search: If the synthesis is insufficient or the user requests a deeper audit, call speckit_memory_search to query the SQLite cache. Do NOT read .md memory files directly. The SQLite cache is the single source of truth.
  4. Print the baseline / cached / saved token comparison so the savings are visible during the normal planning flow.

Retrieval Order

  1. Read config.
  2. Read constitution or project principles only if present and small.
  3. Read the active feature spec.
  4. Read {specs_root}/<feature>/{feature_memory_filename} if present.
  5. Call speckit_memory_search or use MCP tools for any durable memory queries. Do NOT read {memory_root}/INDEX.md or other memory .md files directly.
  6. Create or refresh {specs_root}/<feature>/{memory_synthesis_filename}.

Do not read or paste entire durable memory files. Rely on the MCP tools which respect configured retrieval budgets.

Semantic Modeling

Before planning, build internal representations:

  1. Constraint Map: Identify MUST/SHOULD rules from small principles files and selected architecture entries.
  2. Pattern Inventory: Identify preferred implementation patterns from selected active decisions.
  3. Anti-Pattern Guard: Identify selected recurring bug patterns that apply to this scope.
  4. Deviation Log: Identify any accepted-deviations that relax standard rules.

Read the full file on GitHub · 106 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. 9d ago First seen · 106 lines · 14 tokens per session scan A b103ddd57297

Subscribe to this mod's changes

speckit.memory-md.plan-with-memory is a command published in the GitHub repository DyanGalih/spec-kit-memory-hub (15 stars, last pushed 3mo ago), licensed MIT. It adds 14 tokens to every session and 1,306 once invoked, about $0.0001 per session on Opus 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-08-30.