Add review.sh to regenerate the whole-corpus prune diff on demand
The plan gates the timer on reviewing this diff, and the same gate should be re-runnable after any change to the rule. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PU5ZFfQFtDTFqqhvMTWdGH
This commit is contained in:
1 parent
213e285c37
commit
1053310d32
1 file changed
+17
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
# Regenerate the whole-corpus prune diff. The plan requires reviewing this
|
||||
# before the timer runs, and again after any change to the rule.
|
||||
set -eu
|
||||
|
||||
NOTES="${1:-$HOME/docs/notes/todo}"
|
||||
HERE=$(cd "$(dirname "$0")" && pwd)
|
||||
OUT="${OUT:-$HOME/todo-prune-review.diff}"
|
||||
|
||||
: > "$OUT"
|
||||
for f in "$NOTES"/*.md; do
|
||||
p=$(python3 "$HERE/prune.py" "$f")
|
||||
if [ "$p" != "$(cat "$f")" ]; then
|
||||
printf '%s\n' "$p" | diff -u --label "$f (now)" --label "$f (pruned)" "$f" - >> "$OUT" || true
|
||||
fi
|
||||
done
|
||||
echo "$OUT: $(grep -c '^-[^-]' "$OUT" || true) lines removed across $(grep -c '^---' "$OUT" || true) files"
|
||||
Reference in new issue
Block a user