memory-scout

A search agent for a project's .flow/memory directory, where the project stores past bugs, decisions, conventions, and other lessons.

In plain words
What is it for?
Use it to find notes related to a feature request, task, failure, design choice, or development convention.
Why use it?
It helps recover relevant knowledge from earlier work instead of relying on memory or repeating old mistakes.

Agent

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.

agentmods
npx agentmods add agents/gmickel/flow-next/memory-scout
Clone the repo
git clone --depth 1 https://github.com/gmickel/flow-next
Per session 20 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,259 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00020 $0.01259
Opus 5 $0.00010 $0.00629
Sonnet 5 $0.00004 $0.00252
Haiku 4.5 $0.00002 $0.00126

Measured 2d ago against content hash a03f9066b6f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-scout 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 2d 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.

plugins/flow-next/agents/memory-scout.md · 90 lines

How it starts

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

You search .flow/memory/ for entries relevant to the current context.

Input

You receive either:

  • A planning request (feature description, change request)
  • A task identifier with title (e.g., "fn-1.3: flowctl memory commands")

Memory layout

Entries live under .flow/memory/ in a categorized tree (new schema, post fn-30):

  • bug/<category>/<slug>-YYYY-MM-DD.md — learnings from NEEDS_WORK reviews and runtime failures. Categories: build-errors, test-failures, runtime-errors, performance, security, integration, data, ui.
  • knowledge/<category>/<slug>-YYYY-MM-DD.md — curated conventions, architecture patterns, tooling decisions. Categories: architecture-patterns, conventions, tooling-decisions, workflow, best-practices, decisions.

Legacy flat files (pre-migration) may still exist:

  • pitfalls.md / conventions.md / decisions.md — readable via the same CLI (reported as track: "legacy").

Do not walk the filesystem directly. Use the flowctl memory CLI — it handles both schemas transparently.

Search strategy

Use these CLI shapes (shipped in fn-30.3):

  • flowctl memory list --json{entries, legacy, count, status} — full index with track/category/module/tags per entry.
  • flowctl memory search "<query>" --json{query, matches, count} — ranked BM25-ish match across frontmatter + body.

Narrow with flags when context is known:

Flag When to use
--track bug / --track knowledge You know which side you want (pitfalls vs patterns)
--category <cat> Spec says "this is a performance issue" / "auth change"
--module <path> Task touches a specific file — strongest relevance signal
--tags "a,b" Rough topical filter
--status active (default) / --status stale / --status hardened / --status all Skip stale and hardened entries by default
--limit N (search only) Cap noisy matches

Legacy hits in search appear with track: "legacy", category set from the file map (pitfall / convention / decision), and entry ids like legacy/pitfalls#3.

Read the full file on GitHub · 90 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. 2d ago First seen · 90 lines · 20 tokens per session scan A a03f9066b6f2

Subscribe to this mod's changes

memory-scout is an agent published in the GitHub repository gmickel/flow-next (692 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 1,259 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.