From 1053310d32320c8dc3ccf322f1f924db7e3c993e Mon Sep 17 00:00:00 2001 From: Connor Johnstone Date: Wed, 9 Sep 2026 18:34:20 -0400 Subject: [PATCH] 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) Claude-Session: https://claude.ai/code/session_01PU5ZFfQFtDTFqqhvMTWdGH --- rollover/review.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 rollover/review.sh diff --git a/rollover/review.sh b/rollover/review.sh new file mode 100755 index 0000000..e459832 --- /dev/null +++ b/rollover/review.sh @@ -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"