{
  "source_file": "src/rendering/artifacts.py",
  "generated_at": "2026-01-10T22:55:11.153699",
  "summary": {
    "purpose": "This file defines classes and functions for managing and saving artifacts related to repository summarization, including saving and loading various structured outputs.",
    "exports": [
      "ArtifactPaths",
      "ArtifactManager",
      "_ensure_directories",
      "_serialize_datetime",
      "_save_json",
      "_load_json",
      "save_summary_md",
      "_compute_file_stats",
      "load_individual_file_summary",
      "load_all_individual_file_summaries",
      "copy_diagram",
      "load_summary_md",
      "load_repo_metadata",
      "load_file_selection",
      "load_file_summaries",
      "load_repo_reduce",
      "get_all_artifacts",
      "diagram_exists",
      "get_diagram_path",
      "summary_exists",
      "get_output_manifest"
    ],
    "imports": [
      "json",
      "os",
      "shutil",
      "datetime",
      "dataclasses",
      "Path",
      "RepoInfo",
      "CommitStats",
      "DEFAULT_OUTPUT_DIR",
      "DEFAULT_HTML_REPORT",
      "get_diagram_path",
      "DEFAULT_OUTPUT_DIR",
      "DEFAULT_HTML_REPORT",
      "get_diagram_path"
    ],
    "key_components": [
      {
        "name": "ArtifactPaths",
        "type": "class",
        "description": "Centralizes paths for all output artifacts, including directory structure and file names."
      },
      {
        "name": "ArtifactManager",
        "type": "class",
        "description": "Manages saving and loading of various structured outputs, ensuring proper directory structure and file naming conventions."
      }
    ],
    "data_structures": "ArtifactPaths, RepoInfo, CommitStats",
    "algorithms": "None explicitly defined in this file",
    "configuration": "Configuration is handled through static paths defined in the module and class attributes. No external configuration files are used.",
    "notes": "The file focuses on the implementation of methods for saving and loading structured outputs, ensuring they are saved in the correct directories and files. It also includes methods for checking the existence of specific artifacts and retrieving them."
  }
}