fn write_json_pretty<T: Serialize>(path: &Path, value: &T) -> Result<()>
Helper to write formatted, indented JSON structures to disk.