유대선
프로젝트로
·기술 회고·1

Repo token diet Stage 0: reference-graph doc archive, log rotation, .ignore search surface

Measured where agent sessions melt tokens, then executed the safe first stage: 60% of design docs proved orphaned by a reference-graph audit and were archived, three append-forever logs were rotated, and a root .ignore shrank every agent's search surface without touching git tracking.

A 6-agent audit (plus an adversarial critic) measured the melt: ~12-16.5K fixed tokens per pane, up to ~198K tokens for a session that reads all three append-forever logs, a 13,929-line Rust file, and a CLAUDE.md describing an enforcement hook that does not exist.

Stage 0 executed today (commit 8be4e601): pre-July entries of troubleshooting/ISSUES/MILESTONES rotated to docs/archive (cut lines 1124/576/661, all landing on the first 2026-07-01 entry — verified twice); 43 of 112 design docs archived after a reference-graph audit found them cited by zero code, scripts, CI, or current docs; review dumps and root probe files moved; a root .ignore file now hides old_repo and the archive from every agent's ripgrep without untracking anything.

The critic earned its keep before execution: docs/parallel-work looked like cold session dumps but is hardcoded in production code (parallel_mission.rs find_result_doc), and the landing binaries are served by the Tauri auto-updater — both moves were rejected. Rule of the day: "useless" is decided by the reference graph, not by vibes. The agent constitution v1 draft and the refactor master plan shipped in the same commit; enactment awaits founder approval.