<phase_1 name="Excavate"> Locate every agent session archive on this machine. Check, at minimum:
~/.claude/projects/(Claude Code JSONL, one dir per project) and~/.claude/history.jsonl(every prompt ever typed: the cheapest census, sweep it first in Phase 2)~/.codex/sessions/(Codex rollout JSONL)~/.config/opencode/and~/.local/share/opencode/~/.cursor/,~/.gemini/,~/.aider*,~/.pi/,~/.grok/- Generic sweep: any
*.jsonlor session-shaped directories under~/.config/and~/.local/share/over 1 MB. For each source record: tool name, path, file count, total size, date range (oldest -> newest mtime). Metadata only: stat, ls, du, fd. No file contents yet. Archives are read-only for the entire protocol: never modify, move, or delete anything under them.
<phase_2 name="Distill"> The archives dwarf your context. You do not read raw logs. You probe, project, sweep, then sample.
- Schema probe:
head -c 4000on ONE file per source. Find where user-authored text, timestamps, and project/cwd live. Adjust the projections below to reality; never assume one tool's schema for another. - Projection: extract ONLY my authored text per session to
.scratch/<source>/<session>.tsv(local time, project, first 200 chars per message). Starter for Claude Code JSONL, adjust after the probe:jq -r 'select(.type=="user" and (.isSidechain // false | not)) | [.timestamp, (.cwd // "?"), ((.message.content // "") | if type=="array" then [.[] | select(.type?=="text") | .text] | join(" ") else tostring end | gsub("[\n\t]+"; " ") | .[0:200])] | @tsv' | awk -F'\t' '$3 !~ /^</'Sidechains are subagents talking to themselves; system reminders, command wrappers, and tool results are the machine talking to itself. If any of that stays in, every count is a lie. - Sweeps run over projections, never over raw JSONL. Raw logs match the assistant's words and file contents, which inflates every pattern. Sweep for: correction phrases ("no, I meant", "that's not what", "not what I asked", "again", "still", "stop", "wrong", "undo", "revert"); "just do it" vs long spec-style deliberation; near-identical prompts across weeks (
sort | uniq -con normalized text); projects appearing 3+ times then vanishing (group by project, last-seen date); hour-of-day and weekday histograms in local time. If projections show a second language, extend the phrase lists before trusting correction counts. - Close reading, only from projections: the 15 most recent sessions, the 10 oldest, 20 stratified across the middle, per major source, at most 200 files total, at most 150 projected lines per file into context. After every 25 files, append findings to evidence.md and drop the raw text from working memory.
- Subagents (optional, for batches): read-only search/explore agents may mine batches and must return findings WITH receipts. Spot-check 1 in 5 receipts against the projection yourself before anything enters evidence.md. Unverified subagent output never touches an artifact.
<phase_3 name="Interview"> Form your 5 strongest hypotheses about me from the evidence. Do not state them. A conclusion I reach myself will move me; the same conclusion handed to me, I will argue with. Test each hypothesis with one question built to make me do the realizing. One question per message. End your turn after each and wait. Questions must be answerable in a sentence or two and must not telegraph the hypothesis. When my answer contradicts the evidence, show me the receipt in your next message and ask once more. The gap between what I say and what I did is the most interesting thing you will find. Log each Q, A, and verdict (confirmed / contradicted / mixed) in evidence.md section 8: Interview log. All 5 hypotheses tested against my own words, log written, status line updated. End turn. </phase_3>
<phase_4 name="The Mirror"> Now tell me who I am. Cover: what I actually believe (belief is what I did with my hours, not what I said), how my thinking moves (where it is fast, where it loops), what I am genuinely good at, what I avoid and what the avoidance is protecting, and one thing I likely do not know about myself: the thing the record shows on every page that I have never once said out loud. Delivered in chat, 900 words maximum. Every observation cites its receipts inline. Receipts first, verdict second. Deliver the hardest truth last, and deliver it once. A truth repeated becomes a lecture; a truth stated once and left in the room does its own work. I respond. If I push back, argue from receipts. Do not fold to keep me comfortable. Comfort is not what this is for. </phase_4>
<phase_5 name="Leverage"> From the same evidence, produce the work analysis:
- WASTE: where my hours die, with the receipts (repetition tax, manual work an agent should own)
- DELEGATE: what to hand to AI permanently, ranked by hours recovered per week
- FOCUS: the one or two things only I can do, where the record says my output is exceptional. Everything else is a candidate for the other lists.
- DROP: what to stop entirely: projects and processes whose receipts show cost and no return
- KEEP: processes that genuinely work. Protect them.
- RHYTHM: when to schedule deep work vs admin, from the timestamps. Cite the histogram numbers, not vibes. My calendar should obey the data, not the other way around. Each item carries: its receipt, an hours-per-week estimate clearly marked as an estimate, and a first action I can take today (a command, a config line, a calendar rule).
<phase_6 name="Residue">
- Write
mirror.md: the Phase 4 analysis, rewritten for a reader six months out who has forgotten this conversation. Current truth only. No session narration, no "as we discussed", no changelog of how the analysis evolved. - Write
roadmap.md: the Phase 5 analysis as a 30-day plan: what to drop this week, what to delegate this month, what to protect daily. - Propose changes to my agent configs (CLAUDE.md, AGENTS.md) and draft up to 3 custom skills or commands, each one killing a named repetition-tax item from evidence.md, cited. Show every change to an existing file as a diff first; apply only per-diff approval. New files: one approval for the batch.
- Cleanup:
.scratch/is a concentrated copy of everything I ever typed to an agent. Ask me: keep or shred. Do nothing until I answer. This is where the mirror becomes a lever: tomorrow morning my tools work differently because of who the record showed I am.
<global_constraints>
- Everything stays on this machine. While session data is in play, which is the entire protocol, use no WebSearch, no WebFetch, no MCP tool that leaves the machine. If a phase genuinely seems to need the web (it should not), stop and ask first.
- Never quote anything sensitive (keys, credentials, names of third parties) into chat or artifacts. If a projection line looks credential-shaped, drop it unread; never reprint it even partially, even to flag it.
- Insight over coverage: 5 true patterns beat 20 plausible ones. If the evidence is thin, say "insufficient data". Never pad. A false insight delivered with weight is the one failure this cannot recover from.
- If my history is small (under 20 sessions), say so, run the same phases on what exists, and lower your confidence accordingly.
- Writing mechanics: single writes under 250 lines, files grow by appends. A whole-file rewrite of a grown evidence.md will fail or silently truncate.
- Every count in every artifact must be reproducible by a command listed in the method appendix. No claim without its check. </global_constraints>
Begin with the check, then Phase 1. Read no session file contents until I approve the mining plan.