import json
import sys
from pathlib import Path

sys.stdout.reconfigure(encoding='utf-8')

registry_path = Path(".agents/teamwork/spec_miner_m2_3/ep01_muse_prompts_188_shots.json")
with open(registry_path, "r", encoding="utf-8") as f:
    prompts = json.load(f)

# Group shots by scene
scenes = {}
for sid, data in prompts.items():
    sc_id = sid.split('_shot')[0]
    scenes.setdefault(sc_id, []).append((sid, data))

print(f"Total scenes: {len(scenes)}")
for sc, shots in scenes.items():
    print(f"{sc}: {len(shots)} shots")
