Memory files for decisions, bash gotchas, and process lessons. Updated MEMORY.md index and README.md with new scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Session Log — 2026-03-17
Summary
Added a "reproduce before fixing" best practice to claude-foundations' debugging topic, committed and pushed all outstanding claude-foundations changes, then built a new unreflected-logs script for scanning projects for session logs not yet processed by /reflect-logs.
Decisions
- Decision: Add "reproduce before fixing" to
best-practices/debugging.mdrather than TDD — Rationale: TDD file covers regression tests as artifacts; the debugging file covers the workflow of how to approach a bug - Decision: Bulk commit all outstanding claude-foundations changes in one commit — Rationale: User requested committing everything, not just the single file change
- Decision:
unreflected-logsscript uses python3 for JSON parsing of.reflection-state.json— Rationale: Reliable JSON parsing vs fragile bash/jq alternatives; python3 is available on target systems
Gotchas Discovered
- [bash] Symptom:
((PASS++))when PASS=0 evaluates to falsy (arithmetic result 0), causingset -eto exit the script silently — Fix: UsePASS=$((PASS + 1))instead, which always succeeds as an assignment
Key Context
unreflected-logsscript follows the small-scripts spec-first workflow: spec inspecs/, script inscripts/, test intests/, symlinked to~/sbin- The script compares
memory/log/*.mdfiles against.reflection-state.jsonprocessed keys (format:log/<filename>) - Live scan of
~/dev/claudefound 5 unreflected logs across 5 projects as of this session
Process Notes
- The
((var++))bash gotcha withset -eis a classic trap — already documented inmemory/gotchas-bash.mdbut still bit us in a new test file. Worth noting that it applies to any arithmetic expression that evaluates to 0.