optimize_scan
Dump the memory corpus compactly to plan a curation pass: lists curation fields, relations, usage counts, dedup hints, and anchors for checking against live facts.
Instructions
Dump the memory corpus compactly so you can plan a curation pass.
Step 1 of the "optimize my memories" workflow: every memory's
curation-relevant fields, the relation edges among them, usage counts,
dedup and domain hints, and per-memory anchors (URLs, paths,
identifiers) to check against live facts. Read it, then stage what you
decided with optimize_stage.
Start with what the store already says is suspect: due: true on a
memory means its own writer dated it for a recheck and the date has
passed, and source_ref says what to check it against.
recalls and stats.never_recalled are NOT that. A low count means
unproven, not useless -- a memory about a rare subject looks exactly
like a memory nobody wants, and the rare subject is frequently the
reason the store is there. Use the aggregate to judge the STORE and
never a single row: do not propose archiving something because it is
unread.
The listing is slim so a big store fits one response, and a page ends
early at an internal size budget -- truncated means page onward with
offset + count. relations_truncated means the page's first memory has
more edges than fit: get_relations(uid) lists them all. stats.by_domain
names the largest domains; stats.domains counts every one.
BEFORE PROPOSING ANY CHANGE, CHECK IT AGAINST LIVE FACTS, and record what
you checked in each suggestion's verified. Destructive kinds are
rejected without it: cross-check newer memories in the corpus, verify
code anchors against the live repo, web-check world facts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | true keeps whole bodies instead of the slim listing. | |
| type | No | one memory type, as search() takes it; empty is every type. | |
| limit | No | the most memories per page. | |
| since | No | limits the scan to what changed after this date, for recurring passes. | |
| domain | No | scans a path and everything nested under it; empty is the whole project. | |
| offset | No | where the page starts; after a `truncated` page, offset + count. | |
| include_archived | No | true lists archived memories as well. |