prune

An interactive review tool for finding old entries in a MindLink `MEMORY.md` file. Entries can be kept, moved to an archive section, or deleted manually.

In plain words
What is it for?
Use it to review stale focus, decision, convention, and architecture notes, with optional dry-run or all-entry modes.
Why use it?
Old decisions and completed work can make an AI assistant's context confusing or less relevant. The tool helps reduce that clutter without deleting anything automatically.

Command

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 commands/404-not-found/mindlink/prune
Clone the repo
git clone --depth 1 https://github.com/404-not-found/mindlink
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 695 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.00000 $0.00695
Opus 5 $0.00000 $0.00347
Sonnet 5 $0.00000 $0.00139
Haiku 4.5 $0.00000 $0.00069

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

Security

Grade A, and why

prune 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.

commands/prune.md · 118 lines

How it starts

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

Review and retire stale MEMORY.md entries interactively.


Synopsis

mindlink prune [--dry-run] [--all]

Description

MEMORY.md entries accumulate over time. A decision made six months ago that was later reversed, a "current focus" entry that describes work completed three months ago — these entries linger and degrade the quality of your AI's context.

mindlink prune surfaces entries by age and lets you decide what to do with each one. Entries can be kept, moved to an ## Archive section, or permanently deleted.

MindLink never auto-deletes content. Archived entries are moved to ## Archive at the bottom of MEMORY.md — they are always kept for reference unless you explicitly delete them.

Entries are identified by <!-- added: YYYY-MM-DD --> timestamps, which your AI appends to every new entry it writes.


Staleness Thresholds

Section Warn after
## Current Focus 14 days
## Decisions 180 days
## Conventions 180 days
## Architecture 365 days
## User Profile Never
## Important Context Never

Entries without a timestamp are not flagged (no reference date to compare against).


Interactive Flow

  ◉ MindLink Prune
  /Users/you/my-project/.brain/MEMORY.md

  Scanning MEMORY.md for stale entries...
  Found 2 entries to review.

  ───────────────────────────────────────────────────────
  Section: Current Focus
  Entry:
    Building billing integration in src/api/billing.ts
  Added: 2026-01-15 (87 days ago) — threshold: 14 days

  ❯ Keep     (leave as-is)
    Archive  (move to ## Archive section)
    Delete   (remove permanently)
    Skip remaining

  ───────────────────────────────────────────────────────

  ✓  1 entry archived
  ·  1 entry kept
  ✓  MEMORY.md updated.

Options

Flag Description
--dry-run Show what would be flagged without making any changes
--all Show all timestamped entries regardless of age

Read the full file on GitHub · 118 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 · 118 lines · 0 tokens per session scan A a597c4bfb779

Subscribe to this mod's changes

prune is a command published in the GitHub repository 404-not-found/mindlink (11 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 695 tokens. 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.