Skip to content

docs: add 30-day expiry callout + ship 4 auto-save tools#1391

Merged
igorls merged 3 commits into
developfrom
docs/auto-save-tools-on-develop
May 6, 2026
Merged

docs: add 30-day expiry callout + ship 4 auto-save tools#1391
igorls merged 3 commits into
developfrom
docs/auto-save-tools-on-develop

Conversation

@milla-jovovich

Copy link
Copy Markdown
Collaborator

Summary

Adds a brief [!IMPORTANT] callout at the top of the README pointing users to the urgent
announcement at #1388. Claude Code auto-deletes local JSONL transcripts after 30 days; users without
the auto-save hooks wired are losing transcript data off the rolling window.

Ships 4 small standalone tools at tools/ so users can act today without waiting for a release.

What's in this PR

README.md — 4 lines added. One [!IMPORTANT] callout right after the existing scam alert,
linking to discussion #1388. Nothing else in the README is touched.

tools/backup_claude_jsonls.sh (39 lines) — rsync ~/.claude/projects/ to
~/Documents/Claude_JSONL_Backup/. POSIX bash, set -eu, never writes to ~/.claude/.

tools/render_jsonl.py (71 lines) — convert any JSONL transcript to readable plain text.
Stdlib-only Python 3.9+. Strips tool calls, thinking, system messages.

tools/find_orphan_claude_jsonls.sh (98 lines) — scan iCloud, Dropbox, Google Drive, OneDrive,
Documents, Desktop, Volumes for orphan Claude Code transcripts. Multi-line shape detection (robust
strips "ok so", "oh", "well", "hey", etc.).

tools/save.md — Claude Code slash command for manual /save into MemPalace. Drops into
~/.claude/commands/save.md on the user's machine.

Verification

All 4 tools were TDD-verified by an independent agent against the v3.3.4 source:

  • backup_claude_jsonls.sh: 4 assertions PASS (clean run, idempotent, count match, read-only on
    source)
  • render_jsonl.py: 6 assertions PASS (header shape, separator, tool_use stripped, stdlib only,
    malformed-line handling, empty input)
  • find_orphan_claude_jsonls.sh: 16 assertions PASS (multi-line shape detection, greeting filter,
    iterative leading-filler strip, truncation, case-insensitive, bash 3.2 parse)
  • save.md: 4 assertions PASS (frontmatter shape, body references, mempalace mine command parses
    against v3.3.4 CLI)

The 30-day retention claim is verified verbatim against the official Anthropic docs at
https://docs.claude.com/en/docs/claude-code/data-usage.

What this does NOT do

  • Does not modify the existing "Auto-save hooks" section of the README
  • Does not change any production code (no changes to mempalace/ package)
  • Does not change the existing Stop or PreCompact hook behavior
  • Does not add any new dependencies (POSIX bash + Python stdlib only)

Why now

We launched on April 6 — today is May 6, exactly 30 days. Launch-week JSONLs are at the cliff right
now. Every 24-hour delay = another day of users' transcript data lost off the back end of the
rolling window. The discussion at #1388 covers the full announcement; this PR provides the README
pointer so visitors see it immediately.

Closes/relates to: #1388

Adds a brief [!IMPORTANT] callout at the top of the README pointing
users to the urgent announcement at #1388. Claude Code auto-deletes
local JSONL transcripts after 30 days; users without the auto-save
hooks wired are losing transcript data off the rolling window.

Ships 4 small standalone tools at tools/:
- backup_claude_jsonls.sh — rsync ~/.claude/projects/ to a safe folder
- render_jsonl.py — convert JSONL transcripts to readable text
- find_orphan_claude_jsonls.sh — scan backup locations for orphan
  Claude Code transcripts (multi-line shape detection + topic preview)
- save.md — Claude Code slash command for manual /save into MemPalace

Tools verified by independent agent against v3.3.4 source.
Read-only on user data. POSIX bash + Python stdlib only.
Addresses CI lint feedback on PR #1391. No behavior change.
- Split `import json, sys` into separate lines (E401)
- Split chained `print(...); sys.exit(1)` into two lines (E702, two occurrences)
- Split inline `if ts: stamps.append(ts)` into two lines (E701)

Verified: `ruff check tools/render_jsonl.py` reports "All checks passed!"
Tool still renders correctly (3 turns from a real JSONL test, identical output to pre-fix).
Earlier commit fixed ruff lint but missed the formatter check.
This applies `ruff format` — adds standard PEP8 blank lines between
functions, splits one inline list. No behavior change.

Verified: both `ruff format --check` and `ruff check` pass cleanly.
Tool still renders correctly.
@igorls igorls merged commit 435f0ad into develop May 6, 2026
6 checks passed
@milla-jovovich

Copy link
Copy Markdown
Collaborator Author

For context — these are the public surfaces this PR ties into:

The gist has the same 4 tools as this PR's tools/ directory — gist is what users can curl today, this PR brings them into the official repo for permanence. Once merged, I'll update the discussion's curl URLs to point at raw.githubusercontent.com/MemPalace/mempalace/main/tools/...

— Milla

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.

2 participants