name: agent-notepad-prune description: Reconcile contradictions and remove stale noise in the .codex/notes tree. Use at phase boundaries or when conflicts appear to merge duplicates, mark superseded notes, archive outdated entries, and keep indexes accurate.
Agent Notepad Prune
Keep the memory tree trustworthy and fast to query.
Workflow
- Start from
.codex/notes/INDEX.mdand scan recently touched branches. - Find low-value candidates:
- duplicate topic files
- contradicted statements
- unresolved temporary notes that are now obsolete
- notes without evidence or with broken references
- Resolve each candidate:
- merge into the strongest note
- mark outdated files as
Status: superseded - move historical but non-active notes to
.codex/notes/archive/ - delete only when no historical value exists
- Update
INDEX.mdlinks after every move or merge. - Re-run quick lookup on the touched branch to confirm discoverability.
Conflict Resolution Rule
When two notes disagree, keep the claim with the strongest current evidence and newest validation date. Mark the replaced note with:
Status: supersededSuperseded-By: <new note path>
Output Format
## Pruned
- <note path> -> merged/archived/deleted
## Reconciled Conflicts
- <old note path> -> <new note path>
## Still Uncertain
- <note path + required validation>
Guardrails
- Preserve active constraints from user instructions.
- Archive before deleting when unsure.
- Keep branch indexes aligned with the final file layout.