Skip to content

ValentinNikolaev/agent-skills / agent-plugins/skills/audit-memory

audit-memory

Verified

Audit an agent memory store read-only for schema or index drift, broken relationships, review-due content or sources, duplicate or conflicting facts, and capacity. Not editing memory or auditing ordinary docs.

FileKindSize
SKILL.mdskill md3.9 KB
agents/openai.yamlconfig223 B
references/memory-contract.mdmarkdown12.4 KB
---
name: audit-memory
description: Audit an agent memory store read-only for schema or index drift, broken relationships, review-due content or sources, duplicate or conflicting facts, and capacity. Not editing memory or auditing ordinary docs.
---

# Audit Memory

Audit memory without changing files, sources, indexes, or external state.

## Load the Contract and Resolve Scope

1. Read [references/memory-contract.md](references/memory-contract.md) completely before auditing. Apply its schema, index grammar, relationship, provenance, date, authorization, and limit rules.
2. Use the user-supplied memory root, project root, or file list first. If none is supplied, inspect only plausible roots inside the current project.
3. Ask for explicit consent before reading a global store, sibling project, unrelated repository, or any root outside the user's selected project. Never silently combine stores.
4. When several roots remain plausible, report the candidates and ask the user to select one.
5. Record inaccessible paths, unsupported host schemas, missing repositories, and unavailable source checks as limitations.

## Normalize Audit Settings

Apply user-supplied thresholds instead of hardcoded values. Forward supported values to the validator:

- `--stale-days <N>` for content review age
- `--source-stale-days <N>` for source retrieval review age
- `--file-limit <N>` for advisory file capacity
- `--index-line-limit <N>` for advisory index line count
- `--index-byte-limit <N>` for advisory index size in UTF-8 bytes
- `--warning-ratio <R>` and `--critical-ratio <R>` for capacity thresholds
- `--enforce-limits` only when local policy makes capacity limits hard

Use the contract defaults only when neither the user nor local policy supplies a value. State every assumed value. Treat capacity thresholds as advisory unless the host documents a hard limit.

## Run Deterministic Validation

Resolve `<skill-dir>` to the directory containing this `SKILL.md`, then run the bundled validator against each authorized root:

```text
python "<skill-dir>/scripts/validate_memory.py" <memory-root> [threshold options]
```

Use `--format json` when structured output helps. Verify validator findings against the files before reporting them. Do not repair failures during an audit.

## Review Meaning and Freshness

1. Treat age alone as `review due`, not proof that content is stale. Do not infer staleness from unrelated repository activity.
2. Call a memory stale only when current repository or source evidence contradicts it, supersedes it, or proves that a load-bearing claim is obsolete. Cite both the memory and contradicting evidence.
3. Treat an old matching `provenance[].retrieved_at` value as source review due. Do not claim source drift unless the current authorized source was compared successfully.
4. Compare filenames, names, descriptions, source identities, and distinctive claims for duplicates. Report conflicting durable claims separately; do not silently choose a winner.
5. Treat one-way local `related` links as contract drift because family relationships are symmetric. Treat external references through `provenance` or body links as evidence, not local relationships.

## Report

Group verified findings as:

- `critical`: broken required index targets, missing local related files, invalid required schema that prevents reliable retrieval, or proven dangerous stale guidance.
- `warning`: contract drift, duplicate or conflicting canonical facts, proven stale content, or documented hard-limit pressure.
- `info`: review-due content or sources, advisory capacity pressure, and other human-review signals.

Include scanned roots and files, effective settings, findings with `file:line` evidence, skipped checks, parse failures, inaccessible sources, and other limitations. If no finding remains, say only that no issues were detected in the checks completed.

Do not edit memory, refresh sources, rewrite indexes, or stage repository changes.
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall