feat: implement archeflow-review.sh for Guardian-only diff review
Standalone bash script that extracts git diffs for af-review without PDCA orchestration. Supports --branch, --commit, and uncommitted modes. Reports stats (files/lines changed) to stderr, diff to stdout.
This commit is contained in:
@@ -37,23 +37,28 @@ af-review --evidence # Enable evidence-gating (stricter)
|
||||
|
||||
### Step 1: Get the Diff
|
||||
|
||||
```bash
|
||||
# Uncommitted changes
|
||||
DIFF=$(git diff HEAD)
|
||||
Use `lib/archeflow-review.sh` to extract the diff and stats:
|
||||
|
||||
# Branch diff
|
||||
DIFF=$(git diff main...HEAD)
|
||||
```bash
|
||||
# Uncommitted changes (default)
|
||||
DIFF=$(bash lib/archeflow-review.sh)
|
||||
|
||||
# Branch diff against main
|
||||
DIFF=$(bash lib/archeflow-review.sh --branch feat/batch-api)
|
||||
|
||||
# Commit range
|
||||
DIFF=$(git diff HEAD~3..HEAD)
|
||||
DIFF=$(bash lib/archeflow-review.sh --commit HEAD~3..HEAD)
|
||||
|
||||
# If diff is too large (>500 lines), split by file
|
||||
if [[ $(echo "$DIFF" | wc -l) -gt 500 ]]; then
|
||||
# Review per-file to keep context focused
|
||||
FILES=$(git diff --name-only HEAD)
|
||||
fi
|
||||
# Override base branch
|
||||
DIFF=$(bash lib/archeflow-review.sh --branch feat/x --base develop)
|
||||
|
||||
# Stats only (no diff output)
|
||||
bash lib/archeflow-review.sh --stat-only
|
||||
```
|
||||
|
||||
The script prints the diff to stdout and stats to stderr. It exits 1 if the diff
|
||||
is empty (nothing to review). For large diffs (>500 lines), it warns on stderr.
|
||||
|
||||
### Step 2: Spawn Reviewers
|
||||
|
||||
Default: Guardian only (fastest, highest ROI).
|
||||
|
||||
Reference in New Issue
Block a user