import argparse, subprocess
from pathlib import Path
p = argparse.ArgumentParser()
p.add_argument("checkout", type=Path)
p.add_argument("project", type=Path)
a = p.parse_args()
a.project.mkdir(parents=True, exist_ok=True)
def run(*args, cwd=a.checkout):
    subprocess.run(args, cwd=cwd, check=True)
run("git", "init", "-q", "--initial-branch=main", str(a.project))
run("git", "-c", "user.name=Evidence", "-c", "user.email=evidence@example.invalid", "commit", "--allow-empty", "-qm", "Initial", cwd=a.project)
cli = ["node", "apps/server/src/bin.ts"]
run(*cli, "project", "add", str(a.project), "--title", "Session title proof", "--base-dir", ".t3")
run(*cli, "thread", "start", str(a.project), "Please reply with just the single word ALPHA and nothing else, do not use any tools at all.", "--provider", "claudeAgent", "--model", "claude-haiku-5-5", "--wait", "--json", "--base-dir", ".t3")
