39 """Write *data* as JSON to the project log directory.
41 Returns the path of the written file.
43 log_dir = resolve_logs_dir(project_root)
44 log_dir.mkdir(parents=
True, exist_ok=
True)
45 stamp = datetime.now().strftime(
"%Y%m%d-%H%M%S")
46 log_path = log_dir / f
"oct-{command}-{stamp}.json"
47 log_path.write_text(json.dumps(data, indent=2), encoding=
"utf-8")