#!/usr/bin/env bash
set -euo pipefail
# Run from the checkout under test; all arguments must point to fresh synthetic state.
# Usage: bash seed-thread.sh <T3 home> <synthetic project directory>
t3_proof_home="$1"
t3_proof_project="$2"
mkdir -p "$t3_proof_project"
git -C "$t3_proof_project" init -q --initial-branch=main
git -C "$t3_proof_project" -c user.name=Evidence -c user.email=evidence@example.invalid commit --allow-empty -qm 'Initial fixture'
node apps/server/src/bin.ts project add "$t3_proof_project" --title 'Pi block restart' --base-dir "$t3_proof_home"
node apps/server/src/bin.ts thread start "$t3_proof_project" 'Check whether 2147483647 is prime. Work through a rigorous mathematical verification in detail, without using tools.' --title 'Pi reasoning restart proof' --provider pi --model xai/grok-4.7 --option thinkingLevel=high --base-dir "$t3_proof_home" --json
