--- 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 1. Start from `.codex/notes/INDEX.md` and scan recently touched branches. 2. Find low-value candidates: - duplicate topic files - contradicted statements - unresolved temporary notes that are now obsolete - notes without evidence or with broken references 3. 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 4. Update `INDEX.md` links after every move or merge. 5. 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: superseded` - `Superseded-By: ` ## Output Format ```markdown ## Pruned - -> merged/archived/deleted ## Reconciled Conflicts - -> ## Still Uncertain - ``` ## Guardrails - Preserve active constraints from user instructions. - Archive before deleting when unsure. - Keep branch indexes aligned with the final file layout.