# skill: /reflect-logs **Location:** `custom-claude-skills/skills/reflect-logs/SKILL.md` ## Purpose Processes unprocessed session logs from `memory/log/` into structured, topic-based memory files. Routes gotchas, decisions, and process lessons to the appropriate `memory/*.md` files. Run periodically or after several sessions. ## Usage ``` /reflect-logs ``` No arguments. Automatically identifies unprocessed logs via `.reflection-state.json`. ## How it works 1. Compares `memory/log/` against `.reflection-state.json` to find new/changed logs (by md5 hash) 2. Reads each unprocessed log and categorises entries by destination: - `[topic]` gotchas → `memory/gotchas-.md` - Decisions → `memory/decisions.md` - Process Notes → `memory/process-lessons.md` 3. Deduplicates by substance (semantic, not string match) against existing entries 4. Runs staleness detection: flags version-specific bugs that have been fixed, manual processes that have been automated 5. Updates `MEMORY.md` index if new topic files were created 6. Updates `.reflection-state.json` with processed hashes ## Part of the knowledge pipeline `/log` → `/reflect-logs` → `/distill-best-practices` ## Gotchas - Respects `max_logs_per_run` from settings (default 10), processes oldest first - Creates new `gotchas-.md` files automatically if a `[topic]` tag doesn't match existing files