#!/usr/bin/env python3
"""Synthetic seed used for the late OpenCode skill reproduction.
Run: python3 seed.py PROJECT initial
Add PROJECT to T3, select OpenCode 2.4.2 / Claude Haiku 5.5.
Confirm $alpha lists alpha-check, send "Reply with just the word ok."
After the reply, without restarting T3 or OpenCode:
  python3 seed.py PROJECT late
Check $zebra, /zebra-standup, and /alpha in the same thread.
The two proof runs used separate projects and fresh T3 databases,
1280x800 Chromium viewports, light theme, hidden side/details panels.
OpenCode was started separately with its computer MCP server disabled;
T3 was configured with its binary path, local server URL, and password.
No synthetic provider events or mocked model replies were used.
"""
import argparse
from pathlib import Path
import subprocess
from datetime import datetime, timezone

parser = argparse.ArgumentParser()
parser.add_argument("project", type=Path)
parser.add_argument("phase", choices=["initial", "late"])
args = parser.parse_args()
name = "alpha-check" if args.phase == "initial" else "zebra-standup"
description = "Initial discovery control skill" if args.phase == "initial" else "Newly added standup skill"
p = args.project / ".opencode" / "skills" / name
p.mkdir(parents=True, exist_ok=True)
(p / "SKILL.md").write_text(f"---\nname: {name}\ndescription: {description}\n---\nReply {name.split('-')[0]}.\n")
if args.phase == "initial":
    subprocess.run(["git", "init", "-q", str(args.project)], check=True)
print(datetime.now(timezone.utc).isoformat(), name)
