summaryrefslogtreecommitdiff
path: root/skills/subagent-driven-development/scripts
diff options
context:
space:
mode:
authorJesse Vincent <jesse@primeradiant.com>2026-06-10 08:51:16 -0700
committerDrew Ritter <drew@primeradiant.com>2026-06-16 10:09:47 -0700
commitc30d822efed5c4c4a83affd44d0f8dd81992b28c (patch)
treefe964a8342f5d6b2a89e4efa92069cbafd629514 /skills/subagent-driven-development/scripts
parent68c9ddb870c36595f81fd4d920e043817f3736a6 (diff)
Add review-package script; close fix-dispatch test gap
scripts/review-package generates the reviewer's input deterministically: commit list, stat summary, and net diff with -U10 context, written to a file from an explicit BASE. Live runs showed controllers improvising 'git diff HEAD~1..HEAD', which silently truncates multi-commit tasks, and svelte's five fix dispatches shipped without re-running any tests — fix dispatches now explicitly carry the implementer's re-run-and-report contract.
Diffstat (limited to 'skills/subagent-driven-development/scripts')
-rwxr-xr-xskills/subagent-driven-development/scripts/review-package37
1 files changed, 37 insertions, 0 deletions
diff --git a/skills/subagent-driven-development/scripts/review-package b/skills/subagent-driven-development/scripts/review-package
new file mode 100755
index 0000000..90970f1
--- /dev/null
+++ b/skills/subagent-driven-development/scripts/review-package
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+# Generate a task review package: commit list, stat summary, and the net
+# diff with extended context, written to a file the reviewer reads in one
+# call. Using the recorded per-task BASE (not HEAD~1) keeps multi-commit
+# tasks intact.
+#
+# Usage: review-package BASE HEAD OUTFILE
+# Example: review-package a1b2c3d HEAD /tmp/sdd-task-3.diff
+set -euo pipefail
+
+if [ $# -ne 3 ]; then
+ echo "usage: review-package BASE HEAD OUTFILE" >&2
+ exit 2
+fi
+
+base=$1
+head=$2
+out=$3
+
+git rev-parse --verify --quiet "$base" >/dev/null || { echo "bad BASE: $base" >&2; exit 2; }
+git rev-parse --verify --quiet "$head" >/dev/null || { echo "bad HEAD: $head" >&2; exit 2; }
+
+{
+ echo "# Review package: ${base}..${head}"
+ echo
+ echo "## Commits"
+ git log --oneline "${base}..${head}"
+ echo
+ echo "## Files changed"
+ git diff --stat "${base}..${head}"
+ echo
+ echo "## Diff"
+ git diff -U10 "${base}..${head}"
+} > "$out"
+
+commits=$(git rev-list --count "${base}..${head}")
+echo "wrote ${out}: ${commits} commit(s), $(wc -c < "$out" | tr -d ' ') bytes"