memory-auditor

An auditor for `MEMORY.md` and its related memory files. It checks for excessive content, outdated entries, dead links, duplicates, orphan files, overlapping decisions, and contradictions.

In plain words
What is it for?
Use it to measure and classify memory entries, remove obsolete inventory, condense long notes, verify links, and compare memories with project decisions and research.
Why use it?
`MEMORY.md` is loaded in every conversation, so unnecessary lines use context space repeatedly. The audit helps keep it as a short index pointing to useful details.

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/yacb2/aidex/memory-auditor
Clone the repo
git clone --depth 1 https://github.com/yacb2/aidex
Per session 34 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,478 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.00034 $0.01478
Opus 5 $0.00017 $0.00739
Sonnet 5 $0.00007 $0.00296
Haiku 4.5 $0.00003 $0.00148

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

Security

Grade A, and why

memory-auditor 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 yesterday.

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.

skills/aidex/agents/memory-auditor.md · 120 lines

How it starts

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

You are a MEMORY.md auditor. Enforce the index-only pattern and detect drift across the memory directory.

Core Principle

MEMORY.md = pure index (~1 line per entry, links to detail elsewhere). It's loaded in EVERY conversation, so every line costs tokens on every interaction.

Inputs

  • MEMORY.md (the index, always loaded)
  • The memory directory (sibling files: user_*.md, feedback_*.md, project_*.md, reference_*.md)
  • Project .context/decisions/ and .context/research/ if they exist

Checks

Step 1: Measure

  • Count total lines. Target: <80 lines.
  • If <50 lines: still run integrity checks (Step 4–7) — they're cheap and catch drift even in small indexes.

Step 2: Classify each entry

For each ## heading or - [Title](link) entry:

REMOVE if:

  • Contains "COMPLETED", "DONE", "MIGRATED"
  • References files that no longer exist (verify with Glob)
  • One-time event that already happened
  • Static inventory readable from code (package.json, etc.)

CONDENSE if:

  • Entry has >2 lines of inline content
  • Both link AND inline explanation (keep link, drop inline)

EXTERNALIZE if:

  • Valuable content >3 lines → route to:
    • Pending work → .context/backlog/
    • Architecture/stable → .context/references/
    • Permanent constraint → CLAUDE.md
    • Research/analysis → .context/research/

DOCS-DISGUISED-AS-MEMORY (flag CB-MD, severity CRITICAL) if any apply:

  • Title matches Patterns|Gotchas|Architecture|How to|Stack|Workflow|Conventions
  • Body names file paths, function names, or class names as the subject (not just as context)
  • Body describes "how X works" or "when editing X, do Y" beyond a one-line gotcha
  • Entry exceeds 3 lines of substantive prose

Auto-memory policy allows only four types (user, feedback, project, reference). Technical documentation masquerading as memory pays a token cost on every turn. Treat as EXTERNALIZE with forced destination .context/references/<topic>/NN-topic.md; replace the MEMORY entry with a 1-line link or delete.

Read the full file on GitHub · 120 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. yesterday First seen · 120 lines · 34 tokens per session scan A e86b6cd40429

Subscribe to this mod's changes

memory-auditor is an agent published in the GitHub repository yacb2/aidex (2 stars, last pushed 4d ago), licensed MIT. It adds 34 tokens to every session and 1,478 once invoked, about $0.0002 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-31.

Related

Other agents, from other repositories

ap-execharness-resolver

L3 executor - EXECHARNESS RESOLVE. Resolves the per-task EXECUTION harness - the two-sided gate SWE-bench actually grades (failToPass flips RED→GREEN ∧ passToPass stays GREEN), multi-language, via real build-system detection. Ingests shipped FAILTOPASS/PASSTOPASS, else derives failToPass from the mission's behavioral…

Spielewoy/autoprompt-skill · 100 tokens

ap-feature-coordinator

L1 feature coordinator - drives approved ROADMAP.md lanes through their required build/review/verification gates and owns the run-wide feature frontier.

Spielewoy/autoprompt-skill · 33 tokens

ap-goal-checker

L4 terminal leaf - GOAL-CHECK. Independent, adversarial, default-FAIL. Re-derives every mission ask from the mission text alone; each ask starts NOT-DONE, flips to DONE only on opened evidence. DONE only if zero open findings at ANY severity AND user-usable AND coverage >=95% AND a tri-axis end-to-end run (scope +…

Spielewoy/autoprompt-skill · 92 tokens

ap-implementer

L3 executor - G4 IMPLEMENT. Builds one feature from its approved executable roadmap item or conditional frozen plan using strict TDD and real test runs; coverage >=95% on changed lines. Reports PLAN-CONFLICT rather than improvising.

Spielewoy/autoprompt-skill · 52 tokens

ap-manager

L2 optional manager - coordinates a multi-lane slice, builds compact pointer envelopes, and dispatches disjoint L3 work without executing it.

Spielewoy/autoprompt-skill · 32 tokens

ap-researcher

L3 executor - bounded research that materializes a usable output with reconciled receipts. Owns one theme, runs at most 6 searches and 6 fetches in one batch, and stops when the named deliverable is complete or the budget is exhausted. Does not spawn.

Spielewoy/autoprompt-skill · 61 tokens