split machine-specific stores into mask hooks

This commit is contained in:
2026-08-13 02:08:18 +00:00
parent c6cb958ba5
commit 28d58728cf
3 changed files with 109 additions and 42 deletions
+10 -5
View File
@@ -89,11 +89,16 @@ chat histories, and that is the copy that matters to him.
printf '%s' '<secret>' | ~/projects/claude-mds/tools/mask-secret.py
The script covers both readable stores — Claude Code's `~/.claude/projects/**`
transcripts and Postgres `chat_session_events` — and replaces the value with
asterisks of the same length, overwriting in place so the live session's
appends are not lost. Read the header before changing it; the same-length,
same-inode detail is load-bearing.
It masks Claude Code's own transcripts (`~/.claude/projects/**/*.jsonl`) with
asterisks of the same length, overwriting in place so the live session's appends
are not lost. Read the header before changing it; the same-length, same-inode
detail is load-bearing.
That is all this rule owns. **A machine that keeps its own second copy of the
chat — a database, a mirror, a log shipper — declares it as a hook** in
`tools/mask-hooks.d/`, and the script runs whatever it finds there. Do not add
machine-specific stores to this file; add a hook, and describe it in that
project's own `CLAUDE.md`.
**Do not mask a throwaway.** He sometimes sets a real password aside, hands you
a temporary one so you can drive an API — Nginx Proxy Manager, a router, a