audit-memory
Audit memory files and fix evidence-backed problems.
Scope
- Default scope is ISSUES.md, BACKLOG.md, DECISIONS.md,
COMMANDS.md, and CONTEXT.md.
- Accept a subset, audit-only mode, documentation cross-checks, and a report
limit that does not reduce coverage.
- Do not create a missing memory file. Report it and follow repository policy.
- Do not modify source code, tests, or repository documentation.
Write .agent-layer/tmp/audit-memory.<run-id>.report.md, using
YYYYMMDD-HHMMSS-<short-rand> for run-id.
Contract
- Read each file's purpose, format, and insertion-marker rules before editing.
- Validate staleness against current evidence; do not remove or complete entries
by inference.
- Fix clear format, duplication, placement, staleness, and supersession issues.
- Preserve uncertain entries and name missing evidence or decisions without
blocking independent work.
- Preserve future-guiding constraints and tradeoffs. Historical completeness is
not a reason to retain an entry.
Workflow
Inspect scope as one coherent set, optionally with a read-only investigator. The
owning agent validates evidence and edits. Check:
- required sections, markers, and entry formats
- stale, completed, duplicate, or misplaced ISSUES.md and BACKLOG.md entries
- COMMANDS.md commands against current evidence
- CONTEXT.md facts and cross-file contradictions or duplication
- DECISIONS.md entries that are superseded, duplicated, now self-evident, or no
longer constrain future work
Consolidate superseded decision chains while retaining future-guiding rationale.
Remove proven stale/completed entries and move entries only when both files are
in scope. Audit-only mode
records the same outcomes without edits.
The report contains:
# Memory Audit Summary — files and verdict
## Fixes Applied — grouped by file
## Material Findings — evidence and affected file
## Decisions Needed — the smallest unresolved questions
## Residual Risk
Use None for empty sections. Do not inventory unaffected entries or log the
audit in memory. Finish after structural, content, and cross-file coverage, with
every finding fixed, preserved with a reason, or recorded in audit-only mode.
1---2name: audit-memory3description: Audit agent memory files (ISSUES, BACKLOG, DECISIONS, COMMANDS, CONTEXT) for structure, staleness, placement, consistency, and DECISIONS.md bloat; fix accepted findings.4---56# audit-memory78Audit memory files and fix evidence-backed problems.910## Scope1112- Default scope is ISSUES.md, BACKLOG.md, DECISIONS.md,13 COMMANDS.md, and CONTEXT.md.14- Accept a subset, audit-only mode, documentation cross-checks, and a report15 limit that does not reduce coverage.16- Do not create a missing memory file. Report it and follow repository policy.17- Do not modify source code, tests, or repository documentation.1819Write `.agent-layer/tmp/audit-memory.<run-id>.report.md`, using20`YYYYMMDD-HHMMSS-<short-rand>` for `run-id`.2122## Contract2324- Read each file's purpose, format, and insertion-marker rules before editing.25- Validate staleness against current evidence; do not remove or complete entries26 by inference.27- Fix clear format, duplication, placement, staleness, and supersession issues.28- Preserve uncertain entries and name missing evidence or decisions without29 blocking independent work.30- Preserve future-guiding constraints and tradeoffs. Historical completeness is31 not a reason to retain an entry.3233## Workflow3435Inspect scope as one coherent set, optionally with a read-only investigator. The36owning agent validates evidence and edits. Check:3738- required sections, markers, and entry formats39- stale, completed, duplicate, or misplaced ISSUES.md and BACKLOG.md entries40- COMMANDS.md commands against current evidence41- CONTEXT.md facts and cross-file contradictions or duplication42- DECISIONS.md entries that are superseded, duplicated, now self-evident, or no43 longer constrain future work4445Consolidate superseded decision chains while retaining future-guiding rationale.46Remove proven stale/completed entries and move entries only when both files are47in scope. Audit-only mode48records the same outcomes without edits.4950The report contains:51521. `# Memory Audit Summary` — files and verdict532. `## Fixes Applied` — grouped by file543. `## Material Findings` — evidence and affected file554. `## Decisions Needed` — the smallest unresolved questions565. `## Residual Risk`5758Use `None` for empty sections. Do not inventory unaffected entries or log the59audit in memory. Finish after structural, content, and cross-file coverage, with60every finding fixed, preserved with a reason, or recorded in audit-only mode.