Audit
/flow-next:audit is the agent-native staleness review for the .flow/memory/ store.
Memory entries decay. A bug note logged six months ago might reference a renamed file, a deleted function, or a codepath that no longer exists. Without periodic review, memory-scout ends up surfacing outdated advice.
The host agent walks .flow/memory/, reads each entry, verifies references against the current codebase via Read / Grep / Glob / git, and decides per entry.
The five outcomes
Section titled “The five outcomes”| Outcome | When |
|---|---|
| Keep | Entry is still accurate and useful. |
| Update | Core point holds; references or wording need a refresh. |
| Consolidate | Multiple entries cover the same ground; merge them. |
| Replace | Conclusion has changed; write a successor, mark the old one superseded. |
| Delete | Code is gone AND the problem domain is gone. Rare. |
Delete is reserved for unambiguous cases. When in doubt, the audit prefers Replace or Consolidate so the prior context is preserved.
What gets walked
Section titled “What gets walked”- All categorized entries under
.flow/memory/bug/and.flow/memory/knowledge/. decisions/entries get a calibrated judging question: does the constraint that motivated this choice still hold?GLOSSARY.mdterms are scanned for code usage; zero-hit terms get a<!-- stale: ... -->marker.
Legacy flat files (pitfalls.md, conventions.md, decisions.md at the memory root) are skipped with a pointer to /flow-next:memory-migrate.
| Mode | Behavior |
|---|---|
| Interactive (default) | Ask one question at a time on ambiguous classifications. Batch obvious Keeps and Updates. Confirm Consolidate / Replace / Delete one at a time. |
Autofix (mode:autofix) | No user questions. Apply safe actions directly. Ambiguous cases are marked stale, not deleted. |
A scope hint after the mode token narrows the audit to a concept, category, module, or path.
Decision entries are never deleted
Section titled “Decision entries are never deleted”knowledge/decisions/ entries persist on disk even when superseded. Replace means writing a new entry and marking the old one decision_status: superseded with a superseded_by: pointer — never git rm. Decision history is the audit trail.
What this is not
Section titled “What this is not”- Not a way to mass-rename code from a glossary finding. The audit reports file:line locations and stops there.
- Not a substitute for thoughtful curation when adding memory. Bad entries are still bad after an audit.
Next step
Section titled “Next step”After running, review the report and re-run memory-scout-using skills with the updated store:
/flow-next:plan <spec-id> # plans now ground on fresh memory