Skip to content

insights: what counts as your memory is decided by its shape, who made it and whether you use it - #45

Merged
teocns merged 1 commit into
mainfrom
insights-memory-shape
Nov 13, 2026
Merged

teocns merged 1 commit into
mainfrom
insights-memory-shape

Conversation

@teocns

@teocns teocns commented Nov 13, 2026

Copy link
Copy Markdown
Member

Before and after:

  • Before, a folder counted as memory when its name held "memory" or "memories", or when it held a MEMORY.md. A code module named memory/ counted, and a notes store under any other name counted only if an instruction file pointed to it. Every memory store found was listed as yours, with no check of who made it: a cloned repo's memory folders were listed as the person's own even with no commit of theirs. A read of any folder above a store counted as a read of the store, and sessions this tool started (its own readers) counted as the person reading their memory, so one run inflated the next. Nested stores were added up twice.
  • After, three questions, in order, each answered by one function and recorded on the store with its reason:
    1. Is it memory? By shape: an index at its top level links to at least 2 notes inside it, or at least 3 notes of which at least 2 link another note. The name only finds candidates. Claude Code's own per-project memory keeps its present treatment.
    2. Is it yours? Yes unless proven otherwise, with the ownership rules skills already follow: your commits added or changed notes in it, or your sessions wrote or edited a file inside it (memory is often not committed). It is someone else's when it sits in a repo mostly by others, with no commit and no session of yours writing in it. A copy of a store you already have (more than half of its notes identical) counts once, as the original.
    3. Do you use it? Only files opened or written inside the store count. Sessions and sub-agents started by this tool (their first message names its brief files) are left out. Nested stores are counted once.
  • Example: on one laptop the page listed 41 memory stores read 34,331 times; it now lists 12, read 14,659 times (29 had no memory shape, 3 were copies). On a laptop with a cloned repo holding 9 memory folders the person never committed to or wrote in, the page listed all 9 as theirs; it now lists none.

Limits: the bars (2 links, 3 notes, half identical for a copy) are first guesses. A folder with the shape that no rule finds as a candidate is counted in the output for later, not listed.

Test:

  • cd plugins/insights/scripts/v15/engine/variants/views && uv run --no-project python -m unittest test_view_built test_view_mylevel test_counts (OK)

  • The sources this repository is published from have tests for a code module named memory/, a store under another name, a cloned repo's stores, a store written only by sessions, parent-folder reads, the tool's own readers and nested stores; they pass and are not shipped here. A full scan on a real laptop ran to its end.

  • One change. I did not edit a version, a CHANGELOG.md, marketplace.json or kit.json.

  • Nothing personal: no names, no paths from my machine, no output of my own scan, no secrets.

No version change: nothing reaches members until a release.

…e it and whether you use it

A folder counts as memory when an index links to its notes or its notes link each other, not by its name. A store in a repo mostly by others, with no commit and no session of yours writing in it, is not yours; a copy of a store you already have counts once. Reads count only files opened inside the store, and sessions this tool started are left out.

Kit-Commit: 98c481814e54f0719ea4ad3604e61dbf407e6a79
Kit-Only: plugins/insights
@teocns
teocns merged commit aa6b297 into main Nov 13, 2026
@teocns teocns mentioned this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant