feat: add evidence-gated verification to check phase and reviewers
This commit is contained in:
@@ -477,6 +477,32 @@ Spawn all applicable reviewers in parallel (multiple Agent calls in one message)
|
||||
|
||||
After each returns, emit `review.verdict` and save artifact.
|
||||
|
||||
#### 3c-ii. Evidence Validation
|
||||
|
||||
After all reviewers complete, scan their outputs for banned phrases in CRITICAL/WARNING findings. Downgrade unsupported findings before proceeding to Act.
|
||||
|
||||
```bash
|
||||
BANNED_PHRASES=("might be" "could potentially" "appears to" "seems like" "may not")
|
||||
|
||||
for artifact in .archeflow/artifacts/${RUN_ID}/check-*.md; do
|
||||
REVIEWER=$(basename "$artifact" .md | sed 's/check-//')
|
||||
while IFS= read -r line; do
|
||||
SEVERITY=$(echo "$line" | grep -oE '(CRITICAL|WARNING)' | head -1)
|
||||
[[ -z "$SEVERITY" ]] && continue
|
||||
for phrase in "${BANNED_PHRASES[@]}"; do
|
||||
if echo "$line" | grep -qi "$phrase"; then
|
||||
echo "EVIDENCE DOWNGRADE: $REVIEWER finding uses '$phrase' — downgrading to INFO"
|
||||
./lib/archeflow-event.sh "$RUN_ID" decision check "" \
|
||||
'{"what":"evidence_downgrade","from":"'"$SEVERITY"'","to":"INFO","reviewer":"'"$REVIEWER"'","reason":"banned phrase: '"$phrase"'"}'
|
||||
# Replace severity in artifact
|
||||
sed -i "s/$line/$(echo "$line" | sed "s/$SEVERITY/INFO/")/" "$artifact"
|
||||
break
|
||||
fi
|
||||
done
|
||||
done < "$artifact"
|
||||
done
|
||||
```
|
||||
|
||||
#### 3d. Phase Transition: Check to Act
|
||||
|
||||
Collect all verdict seq numbers for the parent array.
|
||||
|
||||
Reference in New Issue
Block a user