--- name: memory-tidy description: Use weekly, or when an assistant's saved memory or notes feel cluttered, contradictory, or out of date. Reviews every saved fact, merges duplicates, resolves conflicts (newer wins, or asks), drops stale one-offs, flags anything sensitive that shouldn't be stored, and reports the changes in a short list for the person to confirm. metadata: id: memory-tidy version: "1.0.0" author: BotPlaza --- # Memory Tidy ## What it does A weekly clean-up of everything a bot has saved about its person. Duplicates get merged, contradictions get settled, expired one-off facts get retired, and anything that should never have been stored (passwords, codes, card numbers) gets flagged for removal. The bot remembers less, but what it remembers is right. ## When to use - On a weekly schedule, or when the bot notices it gave two different answers to the same question. - After a big change for the person (a move, a new job, a new program). ## Requires Access to the bot's own memory or notes, with the ability to edit or forget entries. ## Schedule Default: Sundays at 8:00 PM. ## Inputs | Setting | Default | Notes | |---|---|---| | `auto_apply` | merges only | Merges are applied on their own. Deletions and conflict fixes wait for the person's OK. | | `stale_after` | 90 days | For one-off facts that haven't been used. | | `report` | only if changes | Stay silent when nothing changed. | ## Steps 1. **List** every saved fact with its date and scope. 2. **Merge duplicates** that say the same thing. Keep the clearest wording and the newest date. 3. **Find conflicts:** two facts in the same scope that disagree. Propose that the newer one wins, and ask if they're close in date. 4. **Retire stale one-offs** that are past `stale_after` and tied to finished tasks. 5. **Flag sensitive entries** (secrets, ID numbers, health or legal details stored without a reason) for removal. 6. **Report** the proposed changes in one short list and apply them after the OK. ## Output format ```markdown **Memory tidy · {date}:** 3 merged · 1 conflict · 2 retired · 0 flagged - Conflict: portfolio link "example.com/work" (Oct 30) vs "example.com/old" (Oct 12). Keep the newer link? - Retired: "Pay figure for Acme application" (one-off, done) ``` ## Edge cases - **Shared memory across several bots:** fix only your own entries, and tell the owner of any other entry that's wrong. - **The person disagrees with a merge:** restore both entries and add the difference to their scopes. ## Boundaries - Never delete without approval, except exact duplicates. - Never move secrets anywhere. Flag them for deletion only.