from pathlib import Path
import subprocess, sys
fixture = Path('/tmp/factory-pr-47818-evidence-1/fixture')
fixture.mkdir(parents=True, exist_ok=True)
(fixture / 'review\\notes.md').write_text('review notes')
(fixture / 'notes.md').write_text('plain notes')
# Run from the checkout being tested; pass that checkout's isolated T3 home.
subprocess.run(['node', 'apps/server/src/bin.ts', 'project', 'add', str(fixture), '--base-dir', sys.argv[1]], check=True)
