Privacy — what stays local, what is committed, and the before-going-public checklist¶
Note
Mirrored from docs/PRIVACY.md — edit the source, then run python3 bin/docs_build.py build.
This repository is the public snapshot. It was born via option (b) of the checklist below: a single root commit from a scrubbed snapshot of a private original — commit history and its author metadata left behind, ledger dollar figures and session: transcript ids redacted, absolute home paths generalized to /path/to/polytropos. The private original retains full history.
The design below is inherited from that original, where the working stores live. Its privacy model has two tiers, and the distinction matters the day anyone considers flipping it public.
Never committed (enforced, not habitual)¶
These live only on this machine. Each is guarded by a root-anchored .gitignore rule
AND by tests/test_privacy_layout.py, whose list is runtime_data.STORES itself (so a new
store cannot be added without the test covering it) and which fails the whole suite — and
therefore every kit task's verify command — if any of them ever becomes tracked:
| Surface | Contents |
|---|---|
journal/ |
daily digests, summaries, inbox, plan cards, config.json (repo paths) |
telemetry/ |
dated cost/usage/routing envelopes (real dollar figures) |
memory/ |
user memory facts |
prefs/ |
model pins/excludes, the versioned routing policy and its proposals |
trends/ |
routing-history snapshots |
benchruns/ |
repo-bench runs: sandboxes, verdicts, dollar data |
attempts/ |
attempt ledgers (a legacy in-tree location; the default home is outside the tree) |
evals/ |
workflow-evaluation runs: trial records, ledgers, sandboxes, dollar data |
training/ |
decision-time training snapshots: bounded redacted evidence, source ids, eligibility |
routeruns/ |
route-experiment runs: trial records, patches, redacted stage outputs, judge scores, measured AIC |
dashboard/ |
the built observability page (index.html) and its receipt (build.json): dollar figures, task titles, repo paths, namespace digests |
value-report*.html |
generated value reports (dollars, session ids, machine paths) |
Zero files under any of these have ever been committed, verified across the full git
history (git log --all --diff-filter=A) on 2026-07-25 for the first five, on
2026-09-13 for the next three, and on 2026-09-19 for training/ — which returned nothing
because that store has never existed here (nor has routeruns/, added 2026-09-28 with its
default outside the tree from the start): collection is off
(bin/training_data.py ships COLLECTION_ENABLED = False and nothing calls its capture
hook), so a checkout never creates the directory. The rule and the test are in place for the
day somebody turns it on. The same check on 2026-09-25 for dashboard/ returned nothing,
because that store did not exist before the observability dashboard (bin/dashboard.py) was
added. python3 bin/release_gate.py packaging re-checks the ignore rules and the tracked tree
on demand.
Where runtime data actually lives (since step 13)¶
These stores no longer default into the repository. Being gitignored keeps them out of a commit and out of nothing else: this repository is also a distributable plugin that gets installed, copied, cached, archived, and on many machines sits inside a cloud-synced folder.
python3 bin/runtime_data.py where prints the resolved location of every store. A fresh
install puts them under the OS application-data directory
(~/Library/Application Support/polytropos/<project>/ on macOS,
$XDG_DATA_HOME/polytropos/<project>/ on Linux), namespaced per checkout, created 0700 with
0600 files — private by construction rather than by whatever umask was set.
A store that already exists inside the tree keeps being used. Nothing is relocated
automatically, because an upgrade that moved a user's notes would be indistinguishable, from
their side, from one that lost them. runtime_data.py migrate --store <name> --apply copies a
store out; it never overwrites a destination file and never deletes the original, so undoing it
is deleting the copy. export copies a store anywhere you name; forget lists what it would
delete and only deletes with --apply. Neither can do anything about copies a backup or a
cloud sync already made — those are invisible to this tool and it does not claim to clean them.
POLYTROPOS_DATA_HOME overrides all of it. Per-command --memory-dir / --store-dir flags
still override that, and remain how every test points at a temp fixture.
Committed by design (private-repo tier)¶
The following personal metadata IS in the tracked tree and git history, deliberately — it is the raw material of the routing scorecard and the kit ledgers:
- Aggregate dollar figures in
.claude/kits/*/NOTES.mdledgers, a few commit messages, and merged PR bodies (e.g. actual-vs-counterfactual verdicts). - Session ids (
session:lines in kit ledgers) — needed for per-kit dollar attribution. - Absolute home paths (
/Users/<name>/...) throughout kit briefs and NOTES — kit briefs pin absolute paths by design.
No transcript text, message content, or credentials are committed anywhere.
Before flipping this repo public — the checklist¶
The committed-by-design tier is acceptable in a private repo and is an exposure in a public one. Before changing visibility, decide explicitly:
- Dollar figures + session ids + home paths in history: either (a) accept them as
public, (b) start a fresh public repo from a scrubbed snapshot (squash to one
root commit with ledger dollar lines and
session:lines redacted and home paths generalized), or (c) keep this repo private and publish a sanitized mirror. History rewriting after the fact does not un-publish anything already cloned — decide BEFORE the flip, not after. - Merged PR bodies and commit messages quoting dollar verdicts survive even a force-pushed history rewrite (GitHub retains PRs) — a fresh repo (b/c) is the only clean path if those must not be public.
- Re-run
python3 -m unittest tests.test_privacy_layoutand confirm green. - Re-run
python3 bin/plugin_staleness.py— an install refresh after any scrub keeps the local plugin coherent.
That decision was made for this repository: it is the option-(b) snapshot described at the top of this file. The checklist stays here for the next repo that faces the same flip.
The iCloud lesson (2026-07-25)¶
Git guards are not the only remote channel. This repo originally lived under
~/Desktop/reposV2 — and macOS Desktop & Documents sync meant the ENTIRE tree,
gitignored stores included, synced continuously to iCloud. The gitignore fortress guarded
the GitHub door while the whole house sat in Apple's cloud. Discovered by inode
comparison: ~/Desktop and ~/Library/Mobile Documents/com~apple~CloudDocs/Desktop
were the same directory.
Resolution: the repo moved to ~/Developer/reposV2 (outside iCloud's sync scope,
matching the same layout on the other machine), atomically (same volume, same inode —
nothing copied). Standing rules this creates:
- This repo must live outside any cloud-synced folder — never under
~/Desktop,~/Documents, or any Dropbox/Drive/OneDrive tree. Verify with an inode orCloudDocscheck, not by assumption. - iCloud retains deleted files ~30 days ("Recently Deleted" in Files/Finder). Moving out stopped the ongoing sync; purging the historical copies requires a manual "Delete Immediately" in iCloud's Recently Deleted — server-side state no local command reaches.
- Historical kit briefs and NOTES pin the old
/Desktop/absolute paths. They are records, not runtime config — but re-running an OLD kit's verify command verbatim will hit dead paths; translate to/Developer/when resurrecting one. - The repo-location rule is now enforced, not habitual:
tests/test_privacy_layout.pyfails the whole suite if this checkout's path contains a cloud-synced component.
The plugin-cache lesson (2026-07-25)¶
Plugin packaging is a third copy channel, and it ignores .gitignore too. claude plugin
install copies the entire plugin directory into
~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/ — verified 2026-07-25: cache
versions 0.2.0 through 0.4.0 each hold full copies of journal/ and prefs/, and 0.4.0
also holds telemetry/ and value-report.html. Old version directories are not pruned
on update (0.1.0 through 0.4.0 all present; claude plugin prune removes orphaned
dependencies only). No exclusion mechanism exists as of 2026-07-25 — the plugin docs
offer no .claudeignore or include/exclude manifest field; the copy is total. The cache lives under ~/.claude (local,
not cloud-synced), so the exposure is duplication and staleness rather than remote sync —
but every copy is one more place personal data sits, and one more thing to scrub before
any machine migration or support bundle.
There used to be a latent runtime hazard as well: every store-writing script in bin/
defaulted its store directory to the plugin root derived from its own file location, so a
skill dispatched from the installed plugin — where the plugin root is the cache — would
have written personal data into a versioned cache directory that the next bump strands.
Roadmap step 13 closed it: bin/runtime_data.py resolves every store to the per-user
application-data directory, namespaced per checkout, wherever the script runs from. What
remains is the copy channel itself. A store that already existed inside the tree before
step 13 keeps being used there (nothing is relocated automatically) and is copied by every
claude plugin update until runtime_data.py migrate --store <name> --apply moves it out.
The 2026-07-25 observation — every store file in the cache was an install-time copy — is
exactly what a legacy in-tree store still produces.
Standing rules this creates:
- After every version bump / plugin refresh: delete the personal store directories
(every name in
runtime_data.STORES—journal/,prefs/,telemetry/,memory/,trends/,benchruns/,attempts/,evals/,training/,routeruns/,dashboard/— plusvalue-report*.html) from the fresh cache copy, and remove stale version directories. Manual by design — repo code never touches~/.claude. - Never sync, back up, or share
~/.claudewithout the same scrub; the cache holds whatever the stores held at install time. - Migrate legacy in-tree stores out (
python3 bin/runtime_data.py whereshows which still resolve inside the tree); once none does, the prune below finds nothing to delete.
The bump-and-prune runbook (validated 2026-07-26 on the 0.4.0 → 0.5.0 bump; tooled 2026-09-25)¶
The prune belongs immediately after the reinstall, never before — the reinstall is what recreates the exposure. Since 2026-09-25 each manual step below is a command; run them in order:
# 1. bump the version where it is stated and rebuild what reports it. Refuses on uncommitted
# work and never commits -- review and merge the bump like any other change.
python3 bin/release_gate.py bump <new>
# 2. vet the checkout the marketplace installs from (a --source it does not use fails):
# on main, clean, level with its upstream,
# nothing credential-shaped among the files git ignores, and the version actually changed.
# It prints the refresh commands only when every gate passes, and never runs them.
python3 bin/harness_update.py preflight
# 3. refresh. `install` is a no-op when already installed at user scope -- `update` is what
# actually re-copies the tree, and ONLY when the version differs: verified 2026-09-16, with
# the repository and the cache both reading 0.6.0 and six commits of content between them,
# `update` answered "already at the latest version (0.6.0)" and copied nothing. Step 1 is not
# bookkeeping; it is the lever. There is no content-addressed refresh.
claude plugin marketplace update polytropos-local && claude plugin update polytropos@polytropos-local
# 4. LOOK at the copy before deleting anything: every tracked file compared, and everything the
# copy carried that git does not track (this is the exposure), grouped by directory
python3 bin/plugin_staleness.py --full
# 5. prune: any legacy store directory step 4 listed inside the fresh copy, then every other
# version directory -- step 4's card prints one `rm -rf` line per superseded version
C=~/.claude/plugins/cache/polytropos-local/polytropos
rm -rf "$C/<new>"/{journal,telemetry,memory,prefs,trends,benchruns,attempts,evals,training,routeruns,dashboard} "$C/<new>"/value-report*.html
# 6. restart Claude Code; then, inside the new session, the update skill confirms the session
# runs the new copy (${CLAUDE_PLUGIN_ROOT} exists only in plugin context, not a plain shell):
# python3 "${CLAUDE_PLUGIN_ROOT}/bin/plugin_staleness.py" --loaded "${CLAUDE_PLUGIN_ROOT}"
The fixed list is not exhaustive (2026-09-21)¶
Step 5's list names what has TURNED OUT to be in the cache before, not a closed set. The plugin
copy ignores .gitignore entirely: whatever sits in the checkout and is not a tracked file
gets copied, regardless of what generated it.
Two refreshes since the 0.5.0 run made the point concretely:
- On the 0.6.2 → 0.6.3 refresh, the copy also carried
.claude/settings.local.json, all four.codex/agents/*.tomlfiles, a top-level.DS_Store, and 191.pycfiles split acrossbin/__pycache__/(66) andtests/__pycache__/(125) — verified 2026-09-21 against the live cache at~/.claude/plugins/cache/polytropos-local/polytropos/0.6.3/. - On the earlier 0.6.1 → 0.6.2 refresh it pulled
outputs/,site-build/(mkdocs's ownsite_dir, gitignored at/site-build/), and an untracked kit directory;site-build/is still sitting in that cache's now-orphaned0.6.2/copy today.
Before a bump, check what git does not track — confirmed working today: on this tree it reports
exactly the two gitignored __pycache__/ directories and nothing else:
git status --porcelain --ignored
After the copy, compare the cache against what git actually tracks. This check, run today
against the live 0.6.3 cache, reproduced the count above exactly — 197 files, exactly the 191
.pyc, .DS_Store, settings.local.json, and four .codex/agents/*.toml named above:
C=~/.claude/plugins/cache/polytropos-local/polytropos/<new>
(cd "$C" && find . -type f | sed 's|^\./||' | sort) > /tmp/cache-files.txt
(cd /path/to/polytropos && git ls-files | sort) > /tmp/tracked-files.txt
comm -23 /tmp/cache-files.txt /tmp/tracked-files.txt # in the cache, not tracked by git
Both checks are commands now (2026-09-25): harness_update.py preflight refuses a copy that
would carry a credential-shaped file and lists what else it would carry, and
plugin_staleness.py --full lists what the copy did carry that git does not track.
None of these extra categories get an rm added to the fixed list in step 5 — decide per item.
.claude/settings.local.json is the installer's own local config, not personal-data store
output; a stray .codex/agents/*.toml, a leftover build directory, or compiled bytecode is a
different judgment call each time a bump surfaces one.
Notes earned on the 0.5.0 run:
installdoes not refresh an existing install — it reports "already installed" and changes nothing. Useupdate, or the bump silently never lands.- A
findover the cache for store names produces false positives:skills/journal/SKILL.mdand its Codex and Copilot twins match a*/journal/*glob and are legitimate tracked plugin files. Confirm any hit withgit ls-files --error-unmatch <path>before treating it as personal data — the same root-anchoring distinction the repo's own/journal/gitignore rule exists to make. - Verify currency, not just cleanliness. A stale install is the failure this runbook exists to prevent, and it is silent: before the 0.5.0 bump the cache had been pinned at 0.4.0 for a day, missing two shipped skills, a driver flag, and two pricing-roster models, while looking perfectly healthy. Check a file you know landed recently, not just that the stores are gone.
- Restart Claude Code afterwards — the updater says so, and new skills do not appear in the session that performed the update.