When a purlis workspace's or persona's memory has duplicates and stale entries, prune them only with the person's yes. Use when asked to tidy, compact, dedupe or prune memory. Not for a session record (purlis-smart-close), removal (purlis-safe-remove) or a new fact (purlis-remember).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Purlis Tidy Memory?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/diazoxide-purlis-tidy-memory)
---
name: purlis-tidy-memory
description: When a purlis workspace's or persona's memory has duplicates and stale entries, prune them only with the person's yes. Use when asked to tidy, compact, dedupe or prune memory. Not for a session record (purlis-smart-close), removal (purlis-safe-remove) or a new fact (purlis-remember).
---
# Compact & improve
Memory grows by one file per lesson, and nothing merges it. Compacting makes it smaller and
truer; improving moves what has become a rule out of the journal and into the charter every
chat reads first (`workspace.md` for a workspace, `persona.md` for a persona).
## 1. Read the reports
A workspace:
```bash
purlis workspace optimize <name> # exact duplicates, near duplicates, stale, index drift
```
A persona:
```bash
purlis persona optimize <name>
purlis persona dedupe <name> # near-duplicate pairs
```
These only read. Done when you can say, for each finding, what you propose.
## 2. Compact, with the person's yes
- **Exact duplicates and index drift** are safe and reversible: `--apply` moves a duplicate to
`archive/` and repairs the index. Apply once the person agrees: ask them with `ask_operator`.
- **Near duplicates** merge by hand: edit one of them to say both, then archive the rest.
- **Stale** memories are still true or they are not. A memory that is half true is edited in
place; one that is no longer so is archived, and only when the person agrees.
```bash
purlis workspace edit -w <name> <slug> [--title "<title>"] ["<body>" | -]
purlis persona edit-memory <name> <slug> [--title "<title>"] ["<body>" | -] [--shared]
purlis workspace archive -w <name> <slug> # undo: workspace unarchive
purlis persona archive-memory <name> <slug> [--shared] # undo: persona unarchive-memory
purlis workspace move-memory -w <name> <slug> --to-shared # or --to-persona <p>
purlis persona move-memory <name> <slug> [--shared] --to-workspace <ws>
```
Each move takes exactly one of `--to-workspace <ws>`, `--to-persona <p>` and `--to-shared`.
An edit keeps the memory's slug and date. An archive moves it to `memory/archive/`, out of every
list, and `unarchive` / `unarchive-memory` puts it back. `workspace forget` and `persona forget`
delete for good; keep them for a memory that must not survive, such as one holding a secret.
A memory in the wrong scope, such as a workspace lesson every persona should know, is moved, not
copied: the move keeps its title and date and prints the command that moves it back. Which scope
is right is the rule the `purlis-remember` skill holds.
Done when every finding is applied, merged, kept on purpose, or declined by the person.
## 3. Improve the charter
A lesson that has held across several memories, or that every chat in this workspace or persona
should act on from its first turn, belongs in the charter. Say it in a sentence that says what
to do and why, then archive the memories it replaces.
- **A workspace's charter:** purlis writes `workspace.md` for this chat, so a sandboxed chat is
not refused. Add a rule with the `workspace_section` tool and section `decisions`
(`## Context & decisions`), a term with section `glossary` (`## Glossary`), and a changed goal
with the `workspace_vision` tool. Both write the workspace this chat works in; for another
workspace, give the person the entries to add. Never open the charter file to change it by
hand.
- **A persona's charter:** the rule goes into its `persona.md`.
Show the person what changed in the charter. Done when they have read it. Both files are
committed, so the change travels with the plane's next save.