#!/bin/bash # dre-approval-reminder.sh — Check for pending claim approvals # Runs hourly. Silent if no pending approvals. # Reports to Germaine + Tony via Hermes if approvals are waiting. PENDING_FILE="$HOME/.hermes/scripts/dre/pending-approvals.json" if [ ! -f "$PENDING_FILE" ]; then exit 0 fi python3 -c " import json, sys, os with open('$PENDING_FILE') as f: pending = json.load(f) if not pending: sys.exit(0) count = len(pending) print(f'⚠️ DRE — {count} claim(s) pending approval') for p in pending: print(f' • {p[\"claim\"]} — {p[\"client\"]} · \${p[\"amount\"]} · Score: {p[\"score\"]}') print() print(f'Hourly reminder — Germaine + Tony need to acknowledge.') print(f'Anita can view in dashboard.') " # Only exit non-zero if there are actually pending approvals [ -s "$PENDING_FILE" ] && exit 1 || exit 0