← back to Ventura Claw Leads

scripts/last-debate.sh

22 lines

#!/usr/bin/env bash
# last-debate.sh — print the latest auto-generated codex-3way summary.
# Used by yolo-loop ticks: 'cat scripts/last-debate.sh' to read what the
# robot found in the most recent commit.

set -u
REPO_DIR="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
LATEST="$REPO_DIR/.git/codex-3way-hook/latest.summary.md"

if [ ! -e "$LATEST" ]; then
  echo "(no codex-3way summary yet — make a commit and wait ~3 min)"
  exit 0
fi

if [ -L "$LATEST" ]; then
  TARGET="$(readlink "$LATEST")"
  echo "## Latest codex-3way debate"
  echo "Source: $TARGET"
  echo
fi
cat "$LATEST"