Add memory files, reflection state, and update docs

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>
This commit is contained in:
Paul O'Reilly
2026-03-17 11:14:44 +13:00
parent 87f7bfb7cd
commit 22db5514f8
10 changed files with 167 additions and 1 deletions

13
memory/process-lessons.md Normal file
View File

@@ -0,0 +1,13 @@
# Process Lessons
## Start reporting/read-only scripts without `set -e`
Debugging `set -e` failures in scripts that aggregate data from multiple sources (git repos, file stats, etc.) consumed significant time — the script worked in isolated tests but failed silently on real data. Begin without `-e` and add it only for scripts that perform destructive actions where fail-fast is critical.
## Spec-driven testing catches real bugs early
The spec → implement → test workflow caught real bugs during development (grep flag parsing, `local` keyword misuse, binary detection false positives). Writing tests that exercise dryrun against spec expectations is an effective pattern for this project.
## Use `git diff --numstat` for binary detection instead of `file`
The `file` command is unreliable for distinguishing binary from text files (marks shell scripts as "executable"). `git diff --numstat` shows `-` for binary files and is more reliable since git already has its own binary detection heuristics.