{
  "source_file": "src/triage/triage.py",
  "generated_at": "2026-01-10T22:55:11.150378",
  "summary": {
    "purpose": "This file contains functions for file triage and heuristic scoring within a repository analysis system.",
    "exports": [
      "_compute_heuristic_score",
      "quick_triage"
    ],
    "imports": [
      "DirectoryCategory",
      "FileMetadata",
      "RepositorySchema",
      "TriageResult",
      "scan_repository",
      "os",
      "flask"
    ],
    "key_components": [
      {
        "name": "_compute_heuristic_score",
        "type": "function",
        "description": "Computes an importance score for a file based on heuristics such as entrypoints, config files, dependency manifests, reference counts, file types, and file size."
      },
      {
        "name": "quick_triage",
        "type": "function",
        "description": "Performs a quick triage of the repository, selecting files based on heuristic scoring and returning a triage result."
      }
    ],
    "data_structures": "FileMetadata, DirectoryCategory, RepositorySchema, TriageResult",
    "algorithms": "Heuristic-based scoring algorithm for file importance",
    "configuration": "Score thresholds for heuristics (CRITICAL_THRESHOLD, HIGH_THRESHOLD, MEDIUM_THRESHOLD)",
    "notes": "The quick_triage function uses the heuristic scores to select a maximum of 20 files for triage. The heuristics include checking for entrypoints, config files, dependency manifests, reference counts, file types, and file size."
  }
}