{
  "project_root": ".",
  "generated_at": "2026-03-26T13:58:51.000971",
  "modules": [
    {
      "name": "MergeSpec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 66,
      "tags": {
        "PURPOSE": "Utility to merge specs",
        "TIER": "TRIVIAL",
        "COMPLEXITY": "1",
        "RELATION": "[DEPENDS_ON] builtin"
      },
      "relations": [],
      "children": [
        {
          "name": "merge_spec",
          "type": "Module",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Utility script for merge_spec",
            "TIER": "TRIVIAL",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "merge_specs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "generate_semantic_map",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "PURPOSE": "Scans the codebase to generate a Semantic Map, Module Map, and Compliance Report based on the System Standard.",
        "PRE": "Valid directory containing code to scan.",
        "POST": "Files map.json, .ai/PROJECT_MAP.md, .ai/MODULE_MAP.md, and compliance reports generated.",
        "TIER": "STANDARD",
        "SEMANTICS": "semantic_analysis, parser, map_generator, compliance_checker, tier_validation, svelte_props, data_flow, module_map",
        "LAYER": "DevOps/Tooling",
        "INVARIANT": "All DEF anchors must have matching closing anchors; TIER determines validation strictness."
      },
      "relations": [
        {
          "type": "READS",
          "target": "FileSystem"
        },
        {
          "type": "PRODUCES",
          "target": "semantics/semantic_map.json"
        },
        {
          "type": "PRODUCES",
          "target": ".ai/PROJECT_MAP.md"
        },
        {
          "type": "PRODUCES",
          "target": ".ai/MODULE_MAP.md"
        },
        {
          "type": "PRODUCES",
          "target": "semantics/reports/semantic_report_*.md"
        }
      ],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 35,
          "tags": {
            "TIER": "TRIVIAL",
            "PURPOSE": "Mock init for self-containment.",
            "PRE": "name is a string.",
            "POST": "Instance initialized."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__enter__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 45,
          "tags": {
            "TIER": "TRIVIAL",
            "RELATION": "[DEPENDS_ON] builtin",
            "PURPOSE": "Mock enter.",
            "PRE": "Instance initialized.",
            "POST": "Returns self."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__exit__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 55,
          "tags": {
            "TIER": "TRIVIAL",
            "RELATION": "[DEPENDS_ON] builtin",
            "PURPOSE": "Mock exit.",
            "PRE": "Context entered.",
            "POST": "Context exited."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "Tier",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 69,
          "tags": {
            "TIER": "TRIVIAL",
            "RELATION": "[DEPENDS_ON] builtin",
            "PURPOSE": "Legacy tier buckets retained for backward-compatible reporting."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "Complexity",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 81,
          "tags": {
            "RELATION": "[DEPENDS_ON] builtin",
            "PURPOSE": "Adaptive semantic complexity scale used for validation strictness."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "Severity",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 92,
          "tags": {
            "TIER": "TRIVIAL",
            "RELATION": "[DEPENDS_ON] builtin",
            "PURPOSE": "Severity levels for compliance issues."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ComplianceIssue",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 195,
          "tags": {
            "TIER": "TRIVIAL",
            "RELATION": "[DEPENDS_ON] builtin",
            "PURPOSE": "Represents a single compliance issue with severity."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SemanticEntity",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 198,
          "end_line": null,
          "tags": {
            "TIER": "CRITICAL",
            "RELATION": "[DEPENDS_ON] builtin",
            "PURPOSE": "Represents a code entity (Module, Function, Component) found during parsing.",
            "INVARIANT": "start_line is always set; end_line is set upon closure; complexity defaults to 1 unless explicitly raised."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 204,
              "end_line": 231,
              "tags": {
                "TIER": "STANDARD",
                "RELATION": "[DEPENDS_ON] builtin",
                "PURPOSE": "Initializes a new SemanticEntity instance.",
                "PRE": "name, type_, start_line, file_path are provided.",
                "POST": "Instance is initialized with default values."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "has_explicit_complexity",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 233,
              "end_line": null,
              "tags": {
                "RELATION": "[DEPENDS_ON] builtin",
                "PURPOSE": "Returns whether the entity explicitly declares complexity metadata."
              },
              "relations": [],
              "children": [
                {
                  "name": "get_complexity",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 239,
                  "end_line": null,
                  "tags": {
                    "RELATION": "[DEPENDS_ON] builtin",
                    "PURPOSE": "Returns effective complexity with backward compatibility for legacy tiers.",
                    "PRE": "tags dictionary is accessible.",
                    "POST": "Returns Complexity enum value."
                  },
                  "relations": [],
                  "children": [
                    {
                      "name": "get_tier",
                      "type": "Function",
                      "complexity": 3,
                      "tier": "STANDARD",
                      "start_line": 288,
                      "end_line": 302,
                      "tags": {
                        "TIER": "STANDARD",
                        "RELATION": "[DEPENDS_ON] builtin",
                        "PURPOSE": "Returns legacy tier bucket derived from effective complexity.",
                        "PRE": "tags dictionary is accessible.",
                        "POST": "Returns Tier enum value."
                      },
                      "relations": [],
                      "children": [],
                      "compliance": {
                        "valid": true,
                        "issues": [],
                        "score": 1.0
                      }
                    },
                    {
                      "name": "to_dict",
                      "type": "Function",
                      "complexity": 3,
                      "tier": "STANDARD",
                      "start_line": 304,
                      "end_line": 335,
                      "tags": {
                        "TIER": "STANDARD",
                        "RELATION": "[DEPENDS_ON] builtin",
                        "PURPOSE": "Serializes the entity to a dictionary for JSON output.",
                        "PRE": "Entity is fully populated.",
                        "POST": "Returns a dictionary representation."
                      },
                      "relations": [],
                      "children": [],
                      "compliance": {
                        "valid": true,
                        "issues": [],
                        "score": 1.0
                      }
                    },
                    {
                      "name": "validate",
                      "type": "Function",
                      "complexity": 5,
                      "tier": "CRITICAL",
                      "start_line": 337,
                      "end_line": 442,
                      "tags": {
                        "TIER": "CRITICAL",
                        "PURPOSE": "Checks for semantic compliance based on complexity requirements.",
                        "PRE": "Entity structure is complete; complexity is determined.",
                        "POST": "Populates self.compliance_issues with severity levels.",
                        "SIDE_EFFECT": "Modifies self.compliance_issues list."
                      },
                      "relations": [],
                      "children": [],
                      "compliance": {
                        "valid": false,
                        "issues": [
                          {
                            "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 337
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 337
                          },
                          {
                            "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 337
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 337
                          },
                          {
                            "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 337
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 337
                          },
                          {
                            "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 337
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 337
                          },
                          {
                            "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 337
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 337
                          }
                        ],
                        "score": 0.0
                      }
                    },
                    {
                      "name": "get_score",
                      "type": "Function",
                      "complexity": 3,
                      "tier": "STANDARD",
                      "start_line": 444,
                      "end_line": 489,
                      "tags": {
                        "TIER": "STANDARD",
                        "RELATION": "[DEPENDS_ON] builtin",
                        "PURPOSE": "Calculates a compliance score (0.0 to 1.0) based on complexity requirements.",
                        "PRE": "validate() has been called.",
                        "POST": "Returns a float score."
                      },
                      "relations": [],
                      "children": [],
                      "compliance": {
                        "valid": true,
                        "issues": [],
                        "score": 1.0
                      }
                    },
                    {
                      "name": "get_patterns",
                      "type": "Function",
                      "complexity": 3,
                      "tier": "STANDARD",
                      "start_line": 493,
                      "end_line": 531,
                      "tags": {
                        "TIER": "STANDARD",
                        "PURPOSE": "Returns regex patterns for a specific language.",
                        "PRE": "lang is either 'python' or 'svelte_js'.",
                        "POST": "Returns a dictionary of compiled regex patterns.",
                        "PARAM": "lang (str) - 'python' or 'svelte_js'"
                      },
                      "relations": [],
                      "children": [],
                      "compliance": {
                        "valid": true,
                        "issues": [
                          {
                            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                            "severity": "WARNING",
                            "line_number": 493
                          },
                          {
                            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                            "severity": "WARNING",
                            "line_number": 493
                          },
                          {
                            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                            "severity": "WARNING",
                            "line_number": 493
                          },
                          {
                            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                            "severity": "WARNING",
                            "line_number": 493
                          },
                          {
                            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                            "severity": "WARNING",
                            "line_number": 493
                          }
                        ],
                        "score": 0.1
                      }
                    },
                    {
                      "name": "extract_svelte_props",
                      "type": "Function",
                      "complexity": 3,
                      "tier": "STANDARD",
                      "start_line": 534,
                      "end_line": 561,
                      "tags": {
                        "TIER": "STANDARD",
                        "RELATION": "[DEPENDS_ON] builtin",
                        "PURPOSE": "Extracts props from Svelte component script section.",
                        "PRE": "lines is a list of file lines, start_idx is the starting line index.",
                        "POST": "Returns list of prop definitions."
                      },
                      "relations": [],
                      "children": [],
                      "compliance": {
                        "valid": true,
                        "issues": [],
                        "score": 1.0
                      }
                    },
                    {
                      "name": "extract_svelte_events",
                      "type": "Function",
                      "complexity": 3,
                      "tier": "STANDARD",
                      "start_line": 564,
                      "end_line": 599,
                      "tags": {
                        "TIER": "STANDARD",
                        "RELATION": "[DEPENDS_ON] builtin",
                        "PURPOSE": "Extracts dispatched events from Svelte component.",
                        "PRE": "lines is a list of file lines.",
                        "POST": "Returns list of event names."
                      },
                      "relations": [],
                      "children": [],
                      "compliance": {
                        "valid": true,
                        "issues": [],
                        "score": 1.0
                      }
                    },
                    {
                      "name": "extract_data_flow",
                      "type": "Function",
                      "complexity": 3,
                      "tier": "STANDARD",
                      "start_line": 602,
                      "end_line": 653,
                      "tags": {
                        "TIER": "STANDARD",
                        "RELATION": "[DEPENDS_ON] builtin",
                        "PURPOSE": "Extracts store subscriptions and data flow from Svelte component.",
                        "PRE": "lines is a list of file lines.",
                        "POST": "Returns list of data flow descriptors."
                      },
                      "relations": [],
                      "children": [],
                      "compliance": {
                        "valid": true,
                        "issues": [],
                        "score": 1.0
                      }
                    },
                    {
                      "name": "parse_file",
                      "type": "Function",
                      "complexity": 5,
                      "tier": "CRITICAL",
                      "start_line": 656,
                      "end_line": 853,
                      "tags": {
                        "TIER": "CRITICAL",
                        "RELATION": "[DEPENDS_ON] builtin",
                        "PURPOSE": "Parses a single file to extract semantic entities with tier awareness and enhanced Svelte analysis.",
                        "PRE": "full_path, rel_path, lang are valid strings.",
                        "POST": "Returns extracted entities and list of issues.",
                        "INVARIANT": "Every opened anchor must have a matching closing anchor for valid compliance.",
                        "PARAM": "lang - Language identifier."
                      },
                      "relations": [],
                      "children": [],
                      "compliance": {
                        "valid": false,
                        "issues": [
                          {
                            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 656
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 656
                          },
                          {
                            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 656
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 656
                          },
                          {
                            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 656
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 656
                          },
                          {
                            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 656
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 656
                          },
                          {
                            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 656
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 656
                          }
                        ],
                        "score": 0.0
                      }
                    },
                    {
                      "name": "SemanticMapGenerator",
                      "type": "Class",
                      "complexity": 5,
                      "tier": "CRITICAL",
                      "start_line": 856,
                      "end_line": 1501,
                      "tags": {
                        "TIER": "CRITICAL",
                        "RELATION": "[DEPENDS_ON] builtin",
                        "PURPOSE": "Orchestrates the mapping process with tier-based validation.",
                        "INVARIANT": "All entities are validated according to their TIER requirements."
                      },
                      "relations": [],
                      "children": [
                        {
                          "name": "__init__",
                          "type": "Function",
                          "complexity": 3,
                          "tier": "STANDARD",
                          "start_line": 862,
                          "end_line": 875,
                          "tags": {
                            "TIER": "STANDARD",
                            "RELATION": "[DEPENDS_ON] builtin",
                            "PURPOSE": "Initializes the generator with a root directory.",
                            "PRE": "root_dir is a valid path string.",
                            "POST": "Generator instance is ready."
                          },
                          "relations": [],
                          "children": [],
                          "compliance": {
                            "valid": true,
                            "issues": [],
                            "score": 1.0
                          }
                        },
                        {
                          "name": "_load_gitignore",
                          "type": "Function",
                          "complexity": 3,
                          "tier": "STANDARD",
                          "start_line": 877,
                          "end_line": 894,
                          "tags": {
                            "TIER": "STANDARD",
                            "RELATION": "[DEPENDS_ON] builtin",
                            "PURPOSE": "Loads patterns from .gitignore file.",
                            "PRE": ".gitignore exists in root_dir.",
                            "POST": "Returns set of ignore patterns."
                          },
                          "relations": [],
                          "children": [],
                          "compliance": {
                            "valid": true,
                            "issues": [],
                            "score": 1.0
                          }
                        },
                        {
                          "name": "_is_ignored",
                          "type": "Function",
                          "complexity": 3,
                          "tier": "STANDARD",
                          "start_line": 896,
                          "end_line": 938,
                          "tags": {
                            "TIER": "STANDARD",
                            "RELATION": "[DEPENDS_ON] builtin",
                            "PURPOSE": "Checks if a path should be ignored based on .gitignore or hardcoded defaults.",
                            "PRE": "rel_path is a valid relative path string.",
                            "POST": "Returns True if the path should be ignored."
                          },
                          "relations": [],
                          "children": [],
                          "compliance": {
                            "valid": true,
                            "issues": [],
                            "score": 1.0
                          }
                        },
                        {
                          "name": "run",
                          "type": "Function",
                          "complexity": 5,
                          "tier": "CRITICAL",
                          "start_line": 940,
                          "end_line": 953,
                          "tags": {
                            "TIER": "CRITICAL",
                            "PURPOSE": "Main execution flow.",
                            "PRE": "Generator is initialized.",
                            "POST": "Semantic map and reports are generated."
                          },
                          "relations": [
                            {
                              "type": "CALLS",
                              "target": "_walk_and_parse"
                            },
                            {
                              "type": "CALLS",
                              "target": "_generate_artifacts"
                            }
                          ],
                          "children": [],
                          "compliance": {
                            "valid": false,
                            "issues": [
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 940
                              }
                            ],
                            "score": 0.0
                          }
                        },
                        {
                          "name": "_walk_and_parse",
                          "type": "Function",
                          "complexity": 5,
                          "tier": "CRITICAL",
                          "start_line": 955,
                          "end_line": 985,
                          "tags": {
                            "TIER": "CRITICAL",
                            "RELATION": "[DEPENDS_ON] builtin",
                            "PURPOSE": "Recursively walks directories and triggers parsing.",
                            "PRE": "root_dir exists.",
                            "POST": "All files are scanned and entities extracted."
                          },
                          "relations": [],
                          "children": [],
                          "compliance": {
                            "valid": false,
                            "issues": [
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 955
                              }
                            ],
                            "score": 0.0
                          }
                        },
                        {
                          "name": "_process_file_results",
                          "type": "Function",
                          "complexity": 3,
                          "tier": "STANDARD",
                          "start_line": 987,
                          "end_line": 1031,
                          "tags": {
                            "TIER": "STANDARD",
                            "RELATION": "[DEPENDS_ON] builtin",
                            "PURPOSE": "Validates entities and calculates file scores with tier awareness.",
                            "PRE": "Entities have been parsed from the file.",
                            "POST": "File score is calculated and issues collected."
                          },
                          "relations": [],
                          "children": [
                            {
                              "name": "validate_recursive",
                              "type": "Function",
                              "complexity": 3,
                              "tier": "STANDARD",
                              "start_line": 999,
                              "end_line": 1021,
                              "tags": {
                                "TIER": "STANDARD",
                                "RELATION": "[DEPENDS_ON] builtin",
                                "PURPOSE": "Calculate score and determine module's max tier for weighted global score",
                                "PRE": "Entities exist",
                                "POST": "Entities are validated"
                              },
                              "relations": [],
                              "children": [],
                              "compliance": {
                                "valid": true,
                                "issues": [],
                                "score": 1.0
                              }
                            }
                          ],
                          "compliance": {
                            "valid": true,
                            "issues": [],
                            "score": 1.0
                          }
                        },
                        {
                          "name": "_generate_artifacts",
                          "type": "Function",
                          "complexity": 5,
                          "tier": "CRITICAL",
                          "start_line": 1033,
                          "end_line": 1055,
                          "tags": {
                            "TIER": "CRITICAL",
                            "RELATION": "[DEPENDS_ON] builtin",
                            "PURPOSE": "Writes output files with tier-based compliance data.",
                            "PRE": "Parsing and validation are complete.",
                            "POST": "JSON and Markdown artifacts are written to disk."
                          },
                          "relations": [],
                          "children": [],
                          "compliance": {
                            "valid": false,
                            "issues": [
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1033
                              }
                            ],
                            "score": 0.0
                          }
                        },
                        {
                          "name": "_print_agent_report",
                          "type": "Function",
                          "complexity": 3,
                          "tier": "STANDARD",
                          "start_line": 1057,
                          "end_line": 1155,
                          "tags": {
                            "TIER": "STANDARD",
                            "PURPOSE": "Prints a JSON report optimized for AI agent orchestration and control.",
                            "PRE": "Validation and artifact generation are complete.",
                            "POST": "JSON report printed to stdout."
                          },
                          "relations": [],
                          "children": [],
                          "compliance": {
                            "valid": true,
                            "issues": [
                              {
                                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                                "severity": "WARNING",
                                "line_number": 1057
                              },
                              {
                                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                                "severity": "WARNING",
                                "line_number": 1057
                              },
                              {
                                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                                "severity": "WARNING",
                                "line_number": 1057
                              },
                              {
                                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                                "severity": "WARNING",
                                "line_number": 1057
                              },
                              {
                                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                                "severity": "WARNING",
                                "line_number": 1057
                              },
                              {
                                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                                "severity": "WARNING",
                                "line_number": 1057
                              }
                            ],
                            "score": 0.0
                          }
                        },
                        {
                          "name": "_generate_report",
                          "type": "Function",
                          "complexity": 5,
                          "tier": "CRITICAL",
                          "start_line": 1157,
                          "end_line": 1230,
                          "tags": {
                            "TIER": "CRITICAL",
                            "RELATION": "[DEPENDS_ON] builtin",
                            "PURPOSE": "Generates the Markdown compliance report with severity levels.",
                            "PRE": "File scores and issues are available.",
                            "POST": "Markdown report is created in reports directory."
                          },
                          "relations": [],
                          "children": [],
                          "compliance": {
                            "valid": false,
                            "issues": [
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1157
                              }
                            ],
                            "score": 0.0
                          }
                        },
                        {
                          "name": "_collect_issues",
                          "type": "Function",
                          "complexity": 3,
                          "tier": "STANDARD",
                          "start_line": 1232,
                          "end_line": 1245,
                          "tags": {
                            "TIER": "STANDARD",
                            "RELATION": "[DEPENDS_ON] builtin",
                            "PURPOSE": "Helper to collect issues for a specific file from the entity tree.",
                            "PRE": "entities list and file_path are valid.",
                            "POST": "issues list is populated with compliance issues."
                          },
                          "relations": [],
                          "children": [],
                          "compliance": {
                            "valid": true,
                            "issues": [],
                            "score": 1.0
                          }
                        },
                        {
                          "name": "_generate_compressed_map",
                          "type": "Function",
                          "complexity": 5,
                          "tier": "CRITICAL",
                          "start_line": 1247,
                          "end_line": 1265,
                          "tags": {
                            "TIER": "CRITICAL",
                            "RELATION": "[DEPENDS_ON] builtin",
                            "PURPOSE": "Generates the token-optimized project map with enhanced Svelte details.",
                            "PRE": "Entities have been processed.",
                            "POST": "Markdown project map is written."
                          },
                          "relations": [],
                          "children": [],
                          "compliance": {
                            "valid": false,
                            "issues": [
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1247
                              }
                            ],
                            "score": 0.0
                          }
                        },
                        {
                          "name": "_write_entity_md",
                          "type": "Function",
                          "complexity": 5,
                          "tier": "CRITICAL",
                          "start_line": 1267,
                          "end_line": 1337,
                          "tags": {
                            "TIER": "CRITICAL",
                            "RELATION": "[DEPENDS_ON] builtin",
                            "PURPOSE": "Recursive helper to write entity tree to Markdown with tier badges and enhanced details.",
                            "PRE": "f is an open file handle, entity is valid.",
                            "POST": "Entity details are written to the file."
                          },
                          "relations": [],
                          "children": [],
                          "compliance": {
                            "valid": false,
                            "issues": [
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1267
                              }
                            ],
                            "score": 0.0
                          }
                        },
                        {
                          "name": "_generate_module_map",
                          "type": "Function",
                          "complexity": 5,
                          "tier": "CRITICAL",
                          "start_line": 1339,
                          "end_line": 1499,
                          "tags": {
                            "TIER": "CRITICAL",
                            "RELATION": "[DEPENDS_ON] builtin",
                            "PURPOSE": "Generates a module-centric map grouping entities by directory structure.",
                            "PRE": "Entities have been processed.",
                            "POST": "Markdown module map is written to .ai/MODULE_MAP.md."
                          },
                          "relations": [],
                          "children": [
                            {
                              "name": "_get_module_path",
                              "type": "Function",
                              "complexity": 3,
                              "tier": "STANDARD",
                              "start_line": 1352,
                              "end_line": 1366,
                              "tags": {
                                "TIER": "STANDARD",
                                "RELATION": "[DEPENDS_ON] builtin",
                                "PURPOSE": "Extracts the module path from a file path.",
                                "PRE": "file_path is a valid relative path.",
                                "POST": "Returns a module path string."
                              },
                              "relations": [],
                              "children": [],
                              "compliance": {
                                "valid": true,
                                "issues": [],
                                "score": 1.0
                              }
                            },
                            {
                              "name": "_collect_all_entities",
                              "type": "Function",
                              "complexity": 3,
                              "tier": "STANDARD",
                              "start_line": 1368,
                              "end_line": 1379,
                              "tags": {
                                "TIER": "STANDARD",
                                "RELATION": "[DEPENDS_ON] builtin",
                                "PURPOSE": "Flattens entity tree for easier grouping.",
                                "PRE": "entity list is valid.",
                                "POST": "Returns flat list of all entities with their hierarchy."
                              },
                              "relations": [],
                              "children": [],
                              "compliance": {
                                "valid": true,
                                "issues": [],
                                "score": 1.0
                              }
                            }
                          ],
                          "compliance": {
                            "valid": false,
                            "issues": [
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              },
                              {
                                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              },
                              {
                                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                                "severity": "ERROR",
                                "line_number": 1339
                              }
                            ],
                            "score": 0.0
                          }
                        }
                      ],
                      "compliance": {
                        "valid": false,
                        "issues": [
                          {
                            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          },
                          {
                            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                            "severity": "ERROR",
                            "line_number": 856
                          }
                        ],
                        "score": 0.0
                      }
                    }
                  ],
                  "compliance": {
                    "valid": false,
                    "issues": [
                      {
                        "message": "Unclosed Anchor: [DEF:get_complexity:Function] started at line 239",
                        "severity": "ERROR",
                        "line_number": 239
                      },
                      {
                        "message": "Unclosed Anchor: [DEF:get_complexity:Function] started at line 239",
                        "severity": "ERROR",
                        "line_number": 239
                      },
                      {
                        "message": "Unclosed Anchor: [DEF:get_complexity:Function] started at line 239",
                        "severity": "ERROR",
                        "line_number": 239
                      },
                      {
                        "message": "Unclosed Anchor: [DEF:get_complexity:Function] started at line 239",
                        "severity": "ERROR",
                        "line_number": 239
                      }
                    ],
                    "score": 0.0
                  }
                }
              ],
              "compliance": {
                "valid": false,
                "issues": [
                  {
                    "message": "Unclosed Anchor: [DEF:has_explicit_complexity:Function] started at line 233",
                    "severity": "ERROR",
                    "line_number": 233
                  },
                  {
                    "message": "Unclosed Anchor: [DEF:has_explicit_complexity:Function] started at line 233",
                    "severity": "ERROR",
                    "line_number": 233
                  },
                  {
                    "message": "Unclosed Anchor: [DEF:has_explicit_complexity:Function] started at line 233",
                    "severity": "ERROR",
                    "line_number": 233
                  }
                ],
                "score": 0.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Unclosed Anchor: [DEF:SemanticEntity:Class] started at line 198",
                "severity": "ERROR",
                "line_number": 198
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 198
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 198
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 198
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 198
              },
              {
                "message": "Unclosed Anchor: [DEF:SemanticEntity:Class] started at line 198",
                "severity": "ERROR",
                "line_number": 198
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 198
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 198
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 198
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 198
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "to_dict",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 189,
          "end_line": 189,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "collect_recursive",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1077,
          "end_line": 1077,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:generate_semantic_map:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: READS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: PRODUCES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: PRODUCES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: PRODUCES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: PRODUCES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "normalize-bun-binaries",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 130,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/nix/scripts/normalize-bun-binaries.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "collectPackages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readManifest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "linkBinary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "exists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeBinName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "canonicalize-node-modules",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 101,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/nix/scripts/canonicalize-node-modules.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseEntry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "sync-zed",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 130,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/sync-zed.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "duplicate-pr",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 79,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/duplicate-pr.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "changelog",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 306,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/changelog.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getLatestRelease",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCommits",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filterRevertedCommits",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "summarizeCommit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 139,
          "end_line": 139,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateChangelog",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 167,
          "end_line": 167,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getContributors",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 200,
          "end_line": 200,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildNotes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 221,
          "end_line": 221,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 306 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "stats",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 225,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/stats.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "sendToPostHog",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchNpmDownloads",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchReleases",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "calculate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 125,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "beta",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 201,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/beta.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "commentOnPR",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "conflicts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "list-versions",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 61,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/list-versions.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "analyze",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 197,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/analyze.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseArgs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "merge",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 724,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/merge.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseArgs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAuthor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createBackupBranch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 117,
          "end_line": 117,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 724 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "config",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 234,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/utils/config.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "loadConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 232,
          "end_line": 232,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "logger",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 91,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/utils/logger.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setVerbose",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "log",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "debug",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "info",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "warn",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "header",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "step",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "divider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "git",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 340,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/utils/git.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getCurrentBranch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "branchExists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remoteBranchExists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getRemotes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasUpstreamRemote",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchUpstream",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createBranch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deleteBranch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "backupAndDeleteBranch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "push",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pull",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "commit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "merge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getConflictedFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 136,
          "end_line": 136,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasUncommittedChanges",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stageAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 149,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stageFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 153,
          "end_line": 153,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCommitMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCommitHash",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 164,
          "end_line": 164,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTagsForCommit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAllTags",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 177,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getUpstreamTags",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 185,
          "end_line": 185,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "abortMerge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 202,
          "end_line": 202,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkoutOurs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 206,
          "end_line": 206,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkoutTheirs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 212,
          "end_line": 212,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanDirectories",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 223,
          "end_line": 223,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "oursHasKilocodeChanges",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 234,
          "end_line": 234,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ensureRerere",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 244,
          "end_line": 244,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trainRerere",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 258,
          "end_line": 258,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getRerereResolved",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 332,
          "end_line": 332,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 340 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "version",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 132,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/utils/version.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseVersion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "compareVersions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getLatestUpstreamVersion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getVersionForCommit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAvailableUpstreamVersions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCurrentKiloVersion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 127,
          "end_line": 127,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "report",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 405,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/utils/report.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isI18nFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isTauriFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isScriptFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isExtensionFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isWebFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldTakeTheirsTransform",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "classifyFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldSkipFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getRecommendation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "analyzeConflicts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 271,
          "end_line": 271,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateMarkdownReport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 315,
          "end_line": 315,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "saveReport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 402,
          "end_line": 402,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 405 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "transform-imports",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 190,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/codemods/transform-imports.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getTransformedModule",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformImports",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformAllImports",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 134,
          "end_line": 134,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "transform-strings",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 186,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/codemods/transform-strings.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "transformStrings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformAllStrings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 131,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "transform-package-json",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 688,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/transform-package-json.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "extractVersion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseSemver",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "compareVersions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mergeWithNewestVersions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isPackageJson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 213,
          "end_line": 213,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformDependencies",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 220,
          "end_line": 220,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformPackageJson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 245,
          "end_line": 245,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformConflictedPackageJson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 443,
          "end_line": 443,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getKiloPackageJson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 466,
          "end_line": 466,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformAllPackageJson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 481,
          "end_line": 481,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 688 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "transform-i18n",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 374,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/transform-i18n.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "shouldPreserveLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 149,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformI18nContent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 156,
          "end_line": 156,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformI18nFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 225,
          "end_line": 225,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isI18nFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 249,
          "end_line": 249,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformAllI18n",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 262,
          "end_line": 262,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformConflictedI18n",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 296,
          "end_line": 296,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 374 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "skip-files",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 208,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/skip-files.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "shouldSkip",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getUpstreamFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getUnmergedFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fileExistsInRef",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 87,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removeFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "skipFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "skipSpecificFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "keep-ours",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 135,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/keep-ours.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "shouldKeepOurs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "keepOursFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetToOurs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "lock-files",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 184,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/lock-files.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isLockFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveLockFileConflicts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "regenerateLockFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "transform-scripts",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 253,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/transform-scripts.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isScriptFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 88,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyScriptTransforms",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformScriptFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 125,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformConflictedScripts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 168,
          "end_line": 168,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformAllScripts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 191,
          "end_line": 191,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "transform-take-theirs",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 347,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/transform-take-theirs.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "matchesPattern",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 149,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyBrandingTransforms",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 160,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformTakeTheirs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 211,
          "end_line": 211,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformConflictedTakeTheirs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 251,
          "end_line": 251,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldTakeTheirs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 275,
          "end_line": 275,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformAllTakeTheirs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 284,
          "end_line": 284,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 347 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "transform-extensions",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 294,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/transform-extensions.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isExtensionFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getExtension",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 116,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyExtensionTransforms",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformExtensionFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformConflictedExtensions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 202,
          "end_line": 202,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformAllExtensions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 225,
          "end_line": 225,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "package-names",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 161,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/package-names.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "transformFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "preserve-versions",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 122,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/preserve-versions.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getCurrentVersion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "preserveVersion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "preserveAllVersions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "transform-tauri",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 363,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/transform-tauri.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isTauriFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 180,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getExtension",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 192,
          "end_line": 192,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyTauriTransforms",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 200,
          "end_line": 200,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformTauriFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 235,
          "end_line": 235,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformConflictedTauri",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 278,
          "end_line": 278,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformAllTauri",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 301,
          "end_line": 301,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 363 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "transform-web",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 301,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/script/upstream/transforms/transform-web.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isWebFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyWebTransforms",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 126,
          "end_line": 126,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformWebFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 176,
          "end_line": 176,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformConflictedWeb",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 216,
          "end_line": 216,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformAllWeb",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 239,
          "end_line": 239,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 301 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "esbuild",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 54,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/sdks/vscode/esbuild.js",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "extension",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 137,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/sdks/vscode/src/extension.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "deactivate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2,
          "end_line": 2,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "activate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openTerminal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "appendPrompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getActiveFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "provider-debug",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 109,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/provider-debug.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createKiloDebug",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "provider",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 76,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/provider.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createKilo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "loader",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 66,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/loader.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "kiloCustomLoader",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkAuthentication",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "headers",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 97,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/headers.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getFeatureHeader",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getEditorNameHeader",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildKiloHeaders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "cloud-sessions",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 158,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/cloud-sessions.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "exportUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchCloudSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchCloudSessionForImport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "importSessionToDb",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "device-auth",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 193,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/auth/device-auth.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "initiateDeviceAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pollDeviceAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "authenticateWithDeviceAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "token",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 38,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/auth/token.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getKiloUrlFromToken",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isValidKilocodeToken",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getApiKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "polling",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 47,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/auth/polling.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "poll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatTimeRemaining",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "device-auth-tui",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 144,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/auth/device-auth-tui.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "initiateDeviceAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pollDeviceAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "authenticateWithDeviceAuthTUI",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "legacy-migration",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 100,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/auth/legacy-migration.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "extractKiloAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrateLegacyKiloAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "tui.d",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 54,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/types/tui.d.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useCommandDialog",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useSync",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useDialog",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useToast",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useKeyboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "context",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 29,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/tui/context.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "initializeTUIDependencies",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTUIDependencies",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "areTUIDependenciesInitialized",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "helpers",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 86,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/tui/helpers.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "formatProfileInfo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getOrganizationOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getDefaultOrganizationSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "routes",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 533,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/server/routes.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createKiloRoutes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 533 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "models",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 232,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/api/models.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseApiPrice",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchKiloModels",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformToModelDevFormat",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 133,
          "end_line": 133,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractFamily",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 196,
          "end_line": 196,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mapModalities",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 215,
          "end_line": 215,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "notifications",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 63,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/api/notifications.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fetchKilocodeNotifications",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "profile",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 156,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-gateway/src/api/profile.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fetchProfile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchBalance",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchDefaultModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchProfileWithBalance",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 119,
          "end_line": 119,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "promptOrganizationSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 132,
          "end_line": 132,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "e2e-local",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 180,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/script/e2e-local.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "freePort",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitForHealth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "actions",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 718,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/actions.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "defocus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openPalette",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "closeDialog",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isSidebarClosed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toggleSidebar",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openSidebar",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "closeSidebar",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seedProjects",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 125,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createTestProject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 179,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanupTestProject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 195,
          "end_line": 195,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "slugFromUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 202,
          "end_line": 202,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitSlug",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 206,
          "end_line": 206,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sessionIDFromUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 229,
          "end_line": 229,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hoverSessionItem",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 234,
          "end_line": 234,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openSessionMoreMenu",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 241,
          "end_line": 241,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clickMenuItem",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 271,
          "end_line": 271,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "confirmDialog",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 279,
          "end_line": 279,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openSharePopover",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 288,
          "end_line": 288,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clickPopoverButton",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 310,
          "end_line": 310,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clickListItem",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 316,
          "end_line": 316,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 339,
          "end_line": 339,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 347,
          "end_line": 347,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitSessionIdle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 369,
          "end_line": 369,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanupSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 373,
          "end_line": 373,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "withSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 390,
          "end_line": 390,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seedSessionQuestion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 442,
          "end_line": 442,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seedSessionPermission",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 480,
          "end_line": 480,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seedSessionTask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 514,
          "end_line": 514,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seedSessionTodos",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 565,
          "end_line": 565,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearSessionDockSeed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 595,
          "end_line": 595,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openStatusPopover",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 613,
          "end_line": 613,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openProjectMenu",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 635,
          "end_line": 635,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setWorkspacesEnabled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 677,
          "end_line": 677,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openWorkspaceMenu",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 704,
          "end_line": 704,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 718 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "fixtures",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 105,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/fixtures.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "seedStorage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 63,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createSdk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getWorktree",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dirSlug",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dirPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sessionPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "workspacePersistKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-undo-redo.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 236,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/session/session-undo-redo.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "seedConversation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 176,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/session/session.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "seedMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-composer-dock.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 430,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/session/session-composer-dock.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withDockSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "withDockSeed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearPermissionDock",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setAutoAccept",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "withMockPermission",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 430 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "terminal-tabs.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 139,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/terminal/terminal-tabs.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "open",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "store",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "prompt-history.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 181,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/prompt/prompt-history.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "edge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "wait",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "reply",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shell",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "context.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 95,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/prompt/context.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "contextButton",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seedContextSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "prompt-slash-share.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 64,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/prompt/prompt-slash-share.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "seed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "workspaces.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 386,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/projects/workspaces.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setupWorkspaceTest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 386 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "projects-switch.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 144,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/projects/projects-switch.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "workspaces",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "workspace-new-session.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 110,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/e2e/projects/workspace-new-session.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "waitWorkspaceReady",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createWorkspace",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openWorkspaceNewSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createSessionFromWorkspace",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sessionDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "agent",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 11,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/agent.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "agentColor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "server-health",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 83,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/server-health.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "timeoutSignal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "wait",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "retryable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkServerHealth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "same",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 6,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/same.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "same",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "comment-note",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 88,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/comment-note.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "selection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createCommentMetadata",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readCommentMetadata",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatCommentNote",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseCommentNote",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "worktree",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 73,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/worktree.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "deferred",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "prompt",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 203,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/prompt.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "selectionFromFileUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "textPartValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractPromptFromParts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "time",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 22,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/time.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getRelativeTime",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "server-health.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 123,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/server-health.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "abortFromInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "base64",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 10,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/base64.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "decode64",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "id",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 99,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/id.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "schema",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ascending",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "descending",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateID",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "bytesToHex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "randomBase62",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getRandomBytes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "sound",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 117,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/sound.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "soundSrc",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "playSound",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "server-errors",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 80,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/server-errors.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "tr",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatServerError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isConfigInvalidErrorLike",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isProviderModelNotFoundErrorLike",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseReadableConfigInvalidError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseReadableProviderModelNotFoundError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "terminal-writer",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 65,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/terminal-writer.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "terminalWriter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "server",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 22,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/server.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createSdkForServer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "scoped-cache",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 104,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/scoped-cache.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createScopedCache",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "speech",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 326,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/speech.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createSpeechRecognition",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 326 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "server-errors.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 131,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/server-errors.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fill",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useLanguageMock",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "dom",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 51,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/dom.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getCharacterOffsetInLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getNodeOffsetInLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSelectionInContainer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "uuid",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 12,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/uuid.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "uuid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "persist",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 464,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/persist.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "cacheDelete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cachePrune",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cacheSet",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cacheGet",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fallbackDisabled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fallbackSet",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "quota",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "evict",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "write",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 133,
          "end_line": 133,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "snapshot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 156,
          "end_line": 156,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isRecord",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 160,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "merge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 164,
          "end_line": 164,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 190,
          "end_line": 190,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 198,
          "end_line": 198,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "workspaceStorage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 206,
          "end_line": 206,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "localStorageWithPrefix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 212,
          "end_line": 212,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "localStorageDirect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 258,
          "end_line": 258,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removePersisted",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 322,
          "end_line": 322,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "persisted",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 337,
          "end_line": 337,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 464 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "aim",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 138,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/utils/aim.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createAim",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "serialize.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 319,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/addons/serialize.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createTerminal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "writeAndWait",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 319 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "serialize",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 634,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/addons/serialize.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "constrain",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 161,
          "end_line": 161,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "equalFg",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "equalBg",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "equalFlags",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 173,
          "end_line": 173,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 634 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "session-composer-state",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 179,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/pages/session/composer/session-composer-state.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createSessionComposerBlocked",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createSessionComposerState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-request-tree",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 52,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/pages/session/composer/session-request-tree.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "sessionTreeRequest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sessionPermissionRequest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sessionQuestionRequest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "helpers",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 102,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/pages/layout/helpers.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "sortSessions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasProjectPermissions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getDraggableId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "use-providers",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 35,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/hooks/use-providers.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useProviders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "titlebar-history.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 63,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/components/titlebar-history.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "history",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "titlebar-history",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 57,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/components/titlebar-history.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "applyPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pushPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trimHistory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "backPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "forwardPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-context-format",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 20,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/components/session/session-context-format.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createSessionContextFormatter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-context-breakdown",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 132,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/components/session/session-context-breakdown.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "estimateSessionContextBreakdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-context-metrics",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 82,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/components/session/session-context-metrics.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getSessionContextMetrics",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "build-request-parts",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 175,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/components/prompt-input/build-request-parts.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "buildRequestParts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "editor-dom",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 148,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/components/prompt-input/editor-dom.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createTextFragment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getNodeLength",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTextLength",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCursorPosition",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setCursorPosition",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setRangeEdge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "attachments",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 180,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/components/prompt-input/attachments.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "largePaste",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createPromptAttachments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "submit",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 428,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/components/prompt-input/submit.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createPromptSubmit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 428 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "placeholder",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 15,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/components/prompt-input/placeholder.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "promptPlaceholder",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "history",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 256,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/components/prompt-input/history.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "canNavigateHistoryAtCursor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clonePromptParts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cloneSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clonePromptHistoryComments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizePromptHistoryEntry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "promptLength",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "prependHistoryEntry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isCommentEqual",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isPromptEqual",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "navigatePromptHistory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 173,
          "end_line": 173,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "permission-auto-respond",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 51,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/permission-auto-respond.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "acceptKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "directoryAcceptKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "accepted",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isDirectoryAutoAccepting",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sessionLineage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "autoRespondsPermission",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "layout-scroll",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 126,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/layout-scroll.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createScrollPersistence",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clone",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "scroll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "schedule",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setScroll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "flush",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "flushAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "drop",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dispose",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "notification-index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 66,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/notification-index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "buildNotificationIndex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "comments.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 186,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/comments.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "line",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "model-variant",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 50,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/model-variant.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getConfiguredAgentVariant",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveModelVariant",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cycleModelVariant",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "queue",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 83,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/global-sync/queue.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createRefreshQueue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "drain",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "eviction",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 28,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/global-sync/eviction.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "pickDirectoriesToEvict",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "canDisposeDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "bootstrap",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 206,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/global-sync/bootstrap.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "bootstrapGlobal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "groupBySession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "bootstrapDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "child-store",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 270,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/global-sync/child-store.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createChildStoreManager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "disposeDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runEviction",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ensureChild",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 123,
          "end_line": 123,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "child",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 218,
          "end_line": 218,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "projectMeta",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 228,
          "end_line": 228,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "projectIcon",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 245,
          "end_line": 245,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-trim",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 56,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/global-sync/session-trim.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "sessionUpdatedAt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "compareSessionRecent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "takeRecentSessions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trimSessions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "event-reducer",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 356,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/global-sync/event-reducer.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "applyGlobalEvent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanupSessionCaches",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanupDroppedSessionCaches",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyDirectoryEvent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 356 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "session-cache",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 62,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/global-sync/session-cache.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "dropSessionCaches",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pickSessionCacheEvictions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 25,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/global-sync/utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "normalizeProviderList",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sanitizeProject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-load",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 25,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/global-sync/session-load.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "loadRootSessionsWithFallback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "estimateRootSessionTotal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "path",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 151,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/file/path.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "stripFileProtocol",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stripQueryAndHash",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "unquoteGitPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "decodeFilePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "encodeFilePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createPathHelpers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "view-cache",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 146,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/file/view-cache.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "normalizeSelectedLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "equalSelectedLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createViewSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createFileViewCache",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 122,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "types",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 41,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/file/types.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "selectionFromLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "watcher",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 53,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/file/watcher.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "invalidateFromWatcher",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "tree-store",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 170,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/file/tree-store.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createFileTreeStore",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "content-cache",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 88,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/app/src/context/file/content-cache.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "approxBytes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setBytes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "touch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "reset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "evictContentLru",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetFileContentLru",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setFileContentBytes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removeFileContentBytes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "touchFileContent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFileContentBytesTotal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFileContentEntryCount",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasFileContent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "previous-docs-redirects.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 135,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-docs/__tests__/previous-docs-redirects.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "detectCycle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "llms.txt",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 164,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-docs/pages/api/llms.txt.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "findMarkdownFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filePathToUrlPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractFrontmatterTitle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildTitleMap",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "addNavLink",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "addNavSection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "heading.markdoc",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 32,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-docs/markdoc/nodes/heading.markdoc.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "generateID",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "tool",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 38,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/plugin/src/tool.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "tool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "file-path",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 68,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-ui/src/file-path.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseFilePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractFilePathFromHref",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "tool-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 336,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-ui/src/components/tool-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createThrottledValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "busy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hold",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateScrollMask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useCollapsible",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useContextToolPending",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 179,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useRowWipe",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 188,
          "end_line": 188,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useToolFade",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 269,
          "end_line": 269,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 336 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "visual-regression.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 168,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-ui/tests/visual-regression.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fetchStories",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "disableAnimations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitForSettled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitForImages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitForFonts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitForStable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 53,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop/scripts/utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getCurrentSidecar",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "copyBinaryToSidecarFolder",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "windowsify",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "cli",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 43,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop/src/cli.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "installError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "installCli",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "menu",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 191,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop/src/menu.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createMenu",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "updater",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 51,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop/src/updater.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "runUpdater",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "bindings",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 68,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop/src/bindings.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "makeEvent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 192,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop/src/i18n/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "detectLocale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseLocale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseRecord",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseStored",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pickLocale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 141,
          "end_line": 141,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "t",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "initI18n",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 173,
          "end_line": 173,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "schema",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 63,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/script/schema.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "generate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "project-id",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 108,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/project-id.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "normalizeProjectId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getProjectIdFromConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getProjectIdFromGit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveProjectId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getKiloProjectId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "rules-migrator",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 153,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/rules-migrator.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "exists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findMarkdownFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "discoverRules",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 116,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "plan-followup",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 310,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/plan-followup.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "toText",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatTodos",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateHandover",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolvePlan",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "inject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 140,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "prompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 168,
          "end_line": 168,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "startNew",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 207,
          "end_line": 207,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 249,
          "end_line": 249,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 310 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "ts-client",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 95,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/ts-client.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "check",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "bash-hierarchy",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 29,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/bash-hierarchy.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "addAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ignore-migrator",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 222,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/ignore-migrator.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fileExists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseIgnoreContent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertToGlob",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadIgnoreFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildPermissionRules",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 151,
          "end_line": 151,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadIgnoreConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 202,
          "end_line": 202,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "bell",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 6,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/bell.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "bell",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2,
          "end_line": 2,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "paste-summary",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 13,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/paste-summary.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldSummarize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ts-check",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 170,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/ts-check.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolve",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "local_tsc",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "native_tsgo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "scan_bun",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 156,
          "end_line": 156,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "exists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 167,
          "end_line": 167,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "modes-migrator",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 172,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/modes-migrator.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isDefaultMode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertPermissions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertMode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readModesFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "editor-context",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 57,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/editor-context.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "staticEnvLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "timestamp",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "environmentDetails",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "workflows-migrator",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 134,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/workflows-migrator.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "findWorkflowFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractNameFromFilename",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractDescription",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadWorkflowsFromDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "discoverWorkflows",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertToCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "enhance-prompt",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 46,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/enhance-prompt.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "clean",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "enhancePrompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "mcp-migrator",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 183,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/mcp-migrator.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isRemote",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readMcpSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertServer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 88,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadMcpConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "paths",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 93,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/paths.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "vscodeGlobalStorage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "globalDirs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "skillDirectories",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "config-injector",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 112,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/config-injector.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "buildConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mergePermissions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getEnvVars",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "cloud-session",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 36,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/cloud-session.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "validateCloudFork",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "importCloudSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "kilo-errors",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 84,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/kilo-errors.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isKiloError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "kiloErrorTitle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "kiloErrorDescription",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "showKiloErrorToast",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseKiloErrorCode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "worktree-diff",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 303,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/review/worktree-diff.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "generatedLike",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ancestor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stats",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "detailMeta",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 139,
          "end_line": 139,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "lines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 195,
          "end_line": 195,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "lineCount",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 200,
          "end_line": 200,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "statStamp",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 221,
          "end_line": 221,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readBefore",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 227,
          "end_line": 227,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readAfter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 233,
          "end_line": 233,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "load",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 239,
          "end_line": 239,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "summarize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 257,
          "end_line": 257,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 272,
          "end_line": 272,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "detail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 283,
          "end_line": 283,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "full",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 292,
          "end_line": 292,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 303 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "command",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 30,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/review/command.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "localReviewUncommittedCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "localReviewCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "review",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 411,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/review/review.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "countChanges",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatFileList",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 136,
          "end_line": 136,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildToolsSection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 148,
          "end_line": 148,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseDiff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseFileDiff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 187,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildReviewPromptUncommitted",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 253,
          "end_line": 253,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildReviewPromptBranch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 275,
          "end_line": 275,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCurrentBranch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 297,
          "end_line": 297,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getBaseBranch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 307,
          "end_line": 307,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getUncommittedChanges",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 346,
          "end_line": 346,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getBranchChanges",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 381,
          "end_line": 381,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 411 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "drain",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 51,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilocode/permission/drain.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "drainCovered",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "todo",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 56,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/todo.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "update",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "prompt",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 2065,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/prompt.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "shouldAskPlanFollowup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "assertNotBusy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolvePromptParts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 213,
          "end_line": 213,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "start",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 264,
          "end_line": 264,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resume",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 275,
          "end_line": 275,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cancel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 282,
          "end_line": 282,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "lastModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 819,
          "end_line": 819,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveTools",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 827,
          "end_line": 827,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createStructuredOutputTool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1018,
          "end_line": 1018,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createUserMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1047,
          "end_line": 1047,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "insertReminders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1415,
          "end_line": 1415,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shell",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1569,
          "end_line": 1569,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "command",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1850,
          "end_line": 1850,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ensureTitle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1994,
          "end_line": 1994,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 2065 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 976,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createDefaultTitle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isDefaultTitle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fromRow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toRow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getForkedTitle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getPlatformOverride",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 262,
          "end_line": 262,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createNext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 324,
          "end_line": 324,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "plan",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 366,
          "end_line": 366,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 976 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "status",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 76,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/status.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "set",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "llm",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 302,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/llm.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "stream",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveTools",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 281,
          "end_line": 281,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasToolCalls",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 293,
          "end_line": 293,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 302 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "system",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 85,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/system.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "instructions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "soul",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "provider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "environment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "instruction",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 190,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/instruction.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "globalFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveRelative",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isClaimed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "claim",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clear",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "systemPaths",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "system",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loaded",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 142,
          "end_line": 142,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "find",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolve",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 166,
          "end_line": 166,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "summary",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 164,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/summary.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "unquoteGitPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "summarizeSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "summarizeMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "computeDiff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 138,
          "end_line": 138,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "compaction",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 328,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/compaction.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isOverflow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "prune",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "process",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 328 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "processor",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 452,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/processor.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 452 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "retry",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 105,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/retry.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "sleep",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delay",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "retryable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "revert",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 138,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/revert.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "revert",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "unrevert",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "message-v2",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 925,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/session/message-v2.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isMedia",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toModelMessages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 506,
          "end_line": 506,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filterCompacted",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 819,
          "end_line": 819,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fromError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 837,
          "end_line": 837,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 925 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 81,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/auth/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "set",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "provider",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1391,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/provider.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isGpt5OrLater",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldUseCopilotResponsesApi",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "googleVertexVars",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadBaseURL",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fromModelsDevModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 716,
          "end_line": 716,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fromModelsDevProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 789,
          "end_line": 789,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isProviderAllowed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 809,
          "end_line": 809,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mergeProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 840,
          "end_line": 840,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1086,
          "end_line": 1086,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSDK",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1090,
          "end_line": 1090,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1195,
          "end_line": 1195,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1199,
          "end_line": 1199,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getLanguage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1219,
          "end_line": 1219,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "closest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1246,
          "end_line": 1246,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSmallModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1261,
          "end_line": 1261,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sort",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1332,
          "end_line": 1332,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "defaultModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1341,
          "end_line": 1341,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1368,
          "end_line": 1368,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1391 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "error",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 202,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/error.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isOpenAiErrorRetryable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isOverflow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "message",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "json",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseStreamError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 125,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseAPICallError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 179,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "model-cache",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 228,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/model-cache.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refresh",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clear",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 147,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchModels",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 162,
          "end_line": 162,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAuthOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 178,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "models",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 201,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/models.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "url",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refresh",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 175,
          "end_line": 175,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "transform",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1047,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/transform.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "mimeToModality",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sdkKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeMessages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyCaching",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 176,
          "end_line": 176,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "unsupportedParts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 216,
          "end_line": 216,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fixDuplicateReasoning",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 255,
          "end_line": 255,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "message",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 293,
          "end_line": 293,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "temperature",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 340,
          "end_line": 340,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "topP",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 358,
          "end_line": 358,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "topK",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 367,
          "end_line": 367,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "variants",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 380,
          "end_line": 380,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "options",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 746,
          "end_line": 746,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "smallOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 865,
          "end_line": 865,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "providerOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 908,
          "end_line": 908,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "maxOutputTokens",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 943,
          "end_line": 943,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "schema",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 947,
          "end_line": 947,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1047 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "auth",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 166,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/auth.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "methods",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "copilot-provider",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 100,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/sdk/copilot/copilot-provider.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createOpenaiCompatible",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "openai-responses-language-model",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1732,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/sdk/copilot/responses/openai-responses-language-model.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "addInclude",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 216,
          "end_line": 216,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasOpenAITool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 220,
          "end_line": 220,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isTextDeltaChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1536,
          "end_line": 1536,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseOutputItemDoneChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1542,
          "end_line": 1542,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseOutputItemDoneReasoningChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1548,
          "end_line": 1548,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseFinishedChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1556,
          "end_line": 1556,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseCreatedChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1562,
          "end_line": 1562,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseFunctionCallArgumentsDeltaChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1568,
          "end_line": 1568,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseImageGenerationCallPartialImageChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1573,
          "end_line": 1573,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseCodeInterpreterCallCodeDeltaChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1579,
          "end_line": 1579,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseCodeInterpreterCallCodeDoneChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1585,
          "end_line": 1585,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseOutputItemAddedChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1591,
          "end_line": 1591,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseOutputItemAddedReasoningChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1597,
          "end_line": 1597,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseAnnotationAddedChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1605,
          "end_line": 1605,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseReasoningSummaryPartAddedChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1611,
          "end_line": 1611,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isResponseReasoningSummaryTextDeltaChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1617,
          "end_line": 1617,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isErrorChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1623,
          "end_line": 1623,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getResponsesModelConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1635,
          "end_line": 1635,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1732 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "map-openai-responses-finish-reason",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 22,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/sdk/copilot/responses/map-openai-responses-finish-reason.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "mapOpenAIResponseFinishReason",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "openai-responses-prepare-tools",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 177,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/sdk/copilot/responses/openai-responses-prepare-tools.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "prepareResponsesTools",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "convert-to-openai-responses-input",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 303,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/sdk/copilot/responses/convert-to-openai-responses-input.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isFileId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertToOpenAIResponsesInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 303 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "openai-compatible-prepare-tools",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 87,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/sdk/copilot/chat/openai-compatible-prepare-tools.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "prepareTools",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "convert-to-openai-compatible-chat-messages",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 164,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/sdk/copilot/chat/convert-to-openai-compatible-chat-messages.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getOpenAIMetadata",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertToOpenAICompatibleChatMessages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "map-openai-compatible-finish-reason",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 17,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/sdk/copilot/chat/map-openai-compatible-finish-reason.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "mapOpenAICompatibleFinishReason",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "get-response-metadata",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 15,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/provider/sdk/copilot/chat/get-response-metadata.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getResponseMetadata",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "shell",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 70,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/shell/shell.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "killTree",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fallback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "agent",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1748,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/acp/agent.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getContextLimit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sendUsageUpdate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 126,
          "end_line": 126,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toToolKind",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1485,
          "end_line": 1485,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toLocations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1513,
          "end_line": 1513,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "defaultModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1532,
          "end_line": 1532,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseUri",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1600,
          "end_line": 1600,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getNewContent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1639,
          "end_line": 1639,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sortProvidersByName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1648,
          "end_line": 1648,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "modelVariantsFromProviders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1658,
          "end_line": 1658,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildAvailableModels",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1669,
          "end_line": 1669,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatModelIdWithVariant",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1692,
          "end_line": 1692,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildVariantMeta",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1703,
          "end_line": 1703,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseModelSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1717,
          "end_line": 1717,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1748 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 317,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/pty/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 116,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 208,
          "end_line": 208,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 221,
          "end_line": 221,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 240,
          "end_line": 240,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "write",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 247,
          "end_line": 247,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "connect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 254,
          "end_line": 254,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 317 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 151,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/plugin/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "trigger",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 131,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 135,
          "end_line": 135,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "codex",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 632,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/plugin/codex.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "generatePKCE",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateRandomString",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "base64UrlEncode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseJwtClaims",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractAccountIdFromClaims",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractAccountId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildAuthorizeUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "exchangeCodeForTokens",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refreshAccessToken",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "startOAuthServer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 252,
          "end_line": 252,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stopOAuthServer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 323,
          "end_line": 323,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitForOAuthCallback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 331,
          "end_line": 331,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CodexAuthPlugin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 358,
          "end_line": 358,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 632 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "copilot",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 328,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/plugin/copilot.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "normalizeDomain",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getUrls",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CopilotAuthPlugin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 328 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "inflight-cache",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 72,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilo-sessions/inflight-cache.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withInFlightCache",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearInFlightCache",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ingest-queue",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 314,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilo-sessions/ingest-queue.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "retryable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "backoff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "schedule",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "enqueue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 160,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "flush",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 182,
          "end_line": 182,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sync",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 289,
          "end_line": 289,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 314 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "kilo-sessions",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 470,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/kilo-sessions/kilo-sessions.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "clearCache",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "authValid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "kilocodeToken",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getClient",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 200,
          "end_line": 200,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "bootstrap",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 209,
          "end_line": 209,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "share",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 241,
          "end_line": 241,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "unshare",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 286,
          "end_line": 286,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 322,
          "end_line": 322,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 330,
          "end_line": 330,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fullSync",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 362,
          "end_line": 362,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeGitUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 402,
          "end_line": 402,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getGitUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 418,
          "end_line": 418,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "meta",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 440,
          "end_line": 440,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getOrgId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 455,
          "end_line": 455,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isUuid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 466,
          "end_line": 466,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 470 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "git-context",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 230,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/commit-message/git-context.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isLockFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 126,
          "end_line": 126,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "git",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 131,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseNameStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 140,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parsePorcelain",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 155,
          "end_line": 155,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mapStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 167,
          "end_line": 167,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isUntracked",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 175,
          "end_line": 175,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getGitContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 179,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "generate",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 178,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/commit-message/generate.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "buildUserMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clean",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateCommitMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 113,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "git-context.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 484,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/commit-message/__tests__/git-context.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setGitOutput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearGitOutputs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "git",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isLockFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseNameStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parsePorcelain",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mapStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isUntracked",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getGitContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 133,
          "end_line": 133,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 484 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 76,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/ide/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "ide",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "alreadyInstalled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "install",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 140,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/format/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isEnabled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFormatter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "mdns",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 60,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/server/mdns.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "publish",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "unpublish",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "error",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 36,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/server/error.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "errors",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "server",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 692,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/server/server.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "url",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openapi",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 630,
          "end_line": 630,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "listen",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 645,
          "end_line": 645,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 692 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "tui",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 379,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/server/routes/tui.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "callTui",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 379 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "global",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 186,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/server/routes/global.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handler",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "tui",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 118,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/config/tui.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "mergeInfo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "customPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "load",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "migrate-tui-config",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 157,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/config/migrate-tui-config.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "migrateTuiConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeTui",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "backupAndStripLegacy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "opencodeFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 138,
          "end_line": 138,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "config",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1638,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/config/config.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "systemManagedConfigDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "managedConfigDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mergeConfigConcatArrays",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitForDependencies",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 349,
          "end_line": 349,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "installDependencies",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 354,
          "end_line": 354,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isWritable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 386,
          "end_line": 386,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "needsInstall",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 395,
          "end_line": 395,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "rel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 431,
          "end_line": 431,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trim",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 440,
          "end_line": 440,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 445,
          "end_line": 445,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadAgent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 492,
          "end_line": 492,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadMode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 542,
          "end_line": 542,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadPlugin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 578,
          "end_line": 578,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getPluginName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 602,
          "end_line": 602,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deduplicatePlugins",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 624,
          "end_line": 624,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1352,
          "end_line": 1352,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "load",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1359,
          "end_line": 1359,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1424,
          "end_line": 1424,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getGlobal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1428,
          "end_line": 1428,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1432,
          "end_line": 1432,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "globalConfigFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1439,
          "end_line": 1439,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isRecord",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1451,
          "end_line": 1451,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stripNulls",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1457,
          "end_line": 1457,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mergeConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1480,
          "end_line": 1480,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "patchJsonc",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1500,
          "end_line": 1500,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1538,
          "end_line": 1538,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateGlobal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1573,
          "end_line": 1573,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "directories",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1633,
          "end_line": 1633,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1638 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "markdown",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 99,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/config/markdown.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "files",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shell",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fallbackSanitization",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "paths",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 174,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/config/paths.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "projectFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "directories",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fileInDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "source",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "substitute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseText",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "share-next",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 228,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/share/share-next.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "url",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sync",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 140,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 176,
          "end_line": 176,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fullSync",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 193,
          "end_line": 193,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "webfetch",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 206,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/webfetch.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "extractTextFromHTML",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 164,
          "end_line": 164,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertHTMLToMarkdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 196,
          "end_line": 196,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "diagnostics",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 21,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/diagnostics.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "filterDiagnostics",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "plan",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 92,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/plan.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getLastModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "edit",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 669,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/edit.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "normalizeLineEndings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "detectLineEnding",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertToLineEnding",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "levenshtein",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 180,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trimDiff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 596,
          "end_line": 596,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "replace",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 632,
          "end_line": 632,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 669 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "question",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 33,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/question.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "format",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "external-directory",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 32,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/external-directory.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "assertExternalDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "task",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 165,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/task.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "cancel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "registry",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 177,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/registry.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fromPlugin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "register",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 99,
          "end_line": 99,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ids",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tools",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 133,
          "end_line": 133,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "read",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 293,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/read.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isBinaryFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 235,
          "end_line": 235,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ls",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 121,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/ls.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "renderDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "tool",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 89,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/tool.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "define",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "truncation",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 107,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/tool/truncation.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasTaskTool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "output",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "json-migration",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 425,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/storage/json-migration.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "read",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "insert",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 425 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "db",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 173,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/storage/db.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "time",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "close",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "use",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 136,
          "end_line": 136,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "effect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 150,
          "end_line": 150,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transaction",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "storage",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 220,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/storage/storage.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "remove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 157,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "read",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 175,
          "end_line": 175,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "write",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 187,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "withErrorHandling",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 196,
          "end_line": 196,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 207,
          "end_line": 207,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "sse",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 66,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/control-plane/sse.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseSSE",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "workspace",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 152,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/control-plane/workspace.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fromRow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "workspaceEventLoop",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "startSyncing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 133,
          "end_line": 133,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "workspace-router-middleware",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 50,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/control-plane/workspace-router-middleware.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "routeRequest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "routes",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 33,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/control-plane/workspace-server/routes.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "WorkspaceServerRoutes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "server",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 64,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/control-plane/workspace-server/server.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "App",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "Listen",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 20,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/control-plane/adaptors/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getAdaptor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "installAdaptor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "registry",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 50,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/bun/registry.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "which",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "info",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isOutdated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 131,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/bun/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "which",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "install",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 175,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/question/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "ask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "reply",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 127,
          "end_line": 127,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "reject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 147,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 172,
          "end_line": 172,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 507,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/lsp/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 148,
          "end_line": 148,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 164,
          "end_line": 164,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getClients",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 179,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "schedule",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 184,
          "end_line": 184,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasClients",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 286,
          "end_line": 286,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "touchFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 299,
          "end_line": 299,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "diagnostics",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 313,
          "end_line": 313,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hover",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 325,
          "end_line": 325,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "workspaceSymbol",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 381,
          "end_line": 381,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "documentSymbol",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 393,
          "end_line": 393,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "definition",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 408,
          "end_line": 408,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "references",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 419,
          "end_line": 419,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "implementation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 431,
          "end_line": 431,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "prepareCallHierarchy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 442,
          "end_line": 442,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "incomingCalls",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 453,
          "end_line": 453,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "outgoingCalls",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 466,
          "end_line": 466,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 479,
          "end_line": 479,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 485,
          "end_line": 485,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pretty",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 492,
          "end_line": 492,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 507 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "server",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 2067,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/lsp/server.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "spawn",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "spawn",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "spawn",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 2067 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "client",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 251,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/lsp/client.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "discovery",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 98,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/skill/discovery.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "dir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pull",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "skill",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 240,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/skill/skill.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 206,
          "end_line": 206,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 210,
          "end_line": 210,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dirs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 214,
          "end_line": 214,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 227,
          "end_line": 227,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "queue",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 32,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/queue.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "work",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "hash",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 7,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/hash.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fast",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "process",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 127,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/process.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "spawn",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "wildcard",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 59,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/wildcard.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "match",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "allStructured",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "matchSequence",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "filesystem",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 195,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/filesystem.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "exists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stat",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "size",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readText",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readJson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readBytes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readArrayBuffer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isEnoent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "write",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "writeJson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "writeStream",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mimeType",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolve",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 117,
          "end_line": 117,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "windowsPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "overlaps",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 134,
          "end_line": 134,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "contains",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 140,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findUp",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "globUp",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 173,
          "end_line": 173,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "timeout",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 14,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/timeout.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withTimeout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "log",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 182,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/log.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "shouldLog",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "file",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stop",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 160,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "fn",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 18,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/fn.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fn",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "proxied",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/proxied.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "proxied",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "lock",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 98,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/lock.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "process",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "read",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "write",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "iife",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/iife.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "iife",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "archive",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 16,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/archive.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "extractZip",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "which",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 10,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/which.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "which",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "abort",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 35,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/abort.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "abortAfter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "abortAfterAny",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "scrap",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 10,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/scrap.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "dummyFunction",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "randomHelper",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "token",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 7,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/token.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "estimate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "lazy",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 23,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/lazy.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "lazy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "glob",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 34,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/glob.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "toGlobOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "scan",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "scanSync",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "match",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "git",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 35,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/git.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "git",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "keybind",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 103,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/keybind.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "match",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fromParsedKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toString",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "locale",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 81,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/locale.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "titlecase",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2,
          "end_line": 2,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "time",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "datetime",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "todayTimeOrDateTime",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "number",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "duration",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "truncate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "truncateMiddle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pluralize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "format",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 20,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/format.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "formatDuration",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "eventloop",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 20,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/eventloop.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "wait",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "signal",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 12,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/signal.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "signal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "rpc",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 66,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/rpc.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "listen",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "emit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "client",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "defer",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 12,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/defer.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "defer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "color",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 19,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/color.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isValidHex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2,
          "end_line": 2,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hexToRgb",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hexToAnsiBold",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "context",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 25,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/util/context.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 28,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/env/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "set",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "upgrade",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 27,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/upgrade.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "upgrade",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "bootstrap",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 17,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/bootstrap.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "bootstrap",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "network",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 60,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/network.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withNetworkOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveNetworkOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "error",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 57,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/error.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "FormatError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "FormatUnknownError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ui",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 118,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/ui.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "println",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "print",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "empty",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "logo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "input",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "markdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "import",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 223,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/import.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseShareUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformShareData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ingestBootstrapWarning",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ingestBootstrap",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "bootstrapImportedSessionIngest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "stats",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 410,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/stats.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getCurrentProject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAllSessions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "aggregateSessionStats",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "displayStats",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 309,
          "end_line": 309,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "renderRow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 312,
          "end_line": 312,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatNumber",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 403,
          "end_line": 403,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 410 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "models",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 79,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/models.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "printModels",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "web",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 95,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/web.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getNetworkIPs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "mcp",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 768,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/mcp.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getAuthStatusIcon",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAuthStatusText",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isMcpConfigured",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isMcpRemote",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveConfigPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 383,
          "end_line": 383,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "addMcpToConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 415,
          "end_line": 415,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 768 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "auth",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 506,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/auth.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handlePluginAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolvePluginProviders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 179,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 506 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "cmd",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 7,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/cmd.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "cmd",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "run",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 725,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/run.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "props",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "inline",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "block",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fallback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "glob",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "grep",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "read",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "write",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "webfetch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 139,
          "end_line": 139,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "edit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 146,
          "end_line": 146,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "codesearch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "websearch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 172,
          "end_line": 172,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "skill",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 189,
          "end_line": 189,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "bash",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 196,
          "end_line": 196,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "todo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 207,
          "end_line": 207,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 217,
          "end_line": 217,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "title",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 399,
          "end_line": 399,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 405,
          "end_line": 405,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "share",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 431,
          "end_line": 431,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 446,
          "end_line": 446,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 447,
          "end_line": 447,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "emit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 468,
          "end_line": 468,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loop",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 479,
          "end_line": 479,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 725 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "session",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 157,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/session.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "pagerCmd",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatSessionTable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatSessionJSON",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 147,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "uninstall",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 366,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/uninstall.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "collectRemovalTargets",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "showRemovalSummary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "executeUninstall",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getShellConfigFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 239,
          "end_line": 239,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanShellConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 288,
          "end_line": 288,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getDirectorySize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 330,
          "end_line": 330,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatSize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 353,
          "end_line": 353,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shortenPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 360,
          "end_line": 360,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 366 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "win32",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 129,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/win32.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "load",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "win32DisableProcessedInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "win32FlushInputBuffer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "win32InstallCtrlCGuard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "thread",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 328,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/thread.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createWorkerFetch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createEventSource",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "target",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "input",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 328 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "worker",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 161,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/worker.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getAuthorizationHeader",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 156,
          "end_line": 156,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "transcript",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 98,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/util/transcript.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "formatTranscript",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatAssistantHeader",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatPart",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "clipboard",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 165,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/util/clipboard.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "writeOsc52",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "read",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "copy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 161,
          "end_line": 161,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "selection",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 25,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/util/selection.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "copy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "terminal",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 114,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/util/terminal.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "colors",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTerminalBackgroundColor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "markdown",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 212,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/util/markdown.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseRow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isSeparatorRow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAlignment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getDisplayWidth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "padToWidth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findTables",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatTable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 153,
          "end_line": 153,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatMarkdownTables",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 198,
          "end_line": 198,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "editor",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 33,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/util/editor.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "open",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "signal",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 7,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/util/signal.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createDebouncedSignal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "spinner",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 368,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/ui/spinner.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getScannerState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "calculateColorIndex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createKnightRiderTrail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 141,
          "end_line": 141,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deriveTrailColors",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 199,
          "end_line": 199,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deriveInactiveColor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 239,
          "end_line": 239,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createFrames",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 272,
          "end_line": 272,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createColors",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 336,
          "end_line": 336,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 368 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "textarea-keybindings",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 73,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/component/textarea-keybindings.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "mapTextareaKeybindings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useTextareaKeybindings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "directory",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 13,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/tui/context/directory.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "agent",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 167,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/cli/cmd/debug/agent.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getAvailableTools",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveTools",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseToolParams",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createToolContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ripgrep",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 378,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/file/ripgrep.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "filepath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 211,
          "end_line": 211,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tree",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 281,
          "end_line": 281,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 289,
          "end_line": 289,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 308,
          "end_line": 308,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "search",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 339,
          "end_line": 339,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 378 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "time",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 71,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/file/time.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "read",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "withLock",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "assert",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 654,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/file/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isImageByExtension",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 261,
          "end_line": 261,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isTextByExtension",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 266,
          "end_line": 266,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isTextByName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 271,
          "end_line": 271,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getImageMimeType",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 276,
          "end_line": 276,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isBinaryByExtension",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 299,
          "end_line": 299,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isImage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 304,
          "end_line": 304,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldEncode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 308,
          "end_line": 308,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 413,
          "end_line": 413,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 417,
          "end_line": 417,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "read",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 496,
          "end_line": 496,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 565,
          "end_line": 565,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "search",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 615,
          "end_line": 615,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 654 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "ignore",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 82,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/file/ignore.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "match",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "watcher",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 128,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/file/watcher.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 122,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 974,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/mcp/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "registerNotificationHandlers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertMcpTool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isMcpConfigured",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "descendants",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchPromptsForClient",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 250,
          "end_line": 250,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchResourcesForClient",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 272,
          "end_line": 272,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "add",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 294,
          "end_line": 294,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 328,
          "end_line": 328,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 533,
          "end_line": 533,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clients",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 548,
          "end_line": 548,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "connect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 552,
          "end_line": 552,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "disconnect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 591,
          "end_line": 591,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tools",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 603,
          "end_line": 603,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "prompts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 645,
          "end_line": 645,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resources",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 666,
          "end_line": 666,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getPrompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 687,
          "end_line": 687,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readResource",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 715,
          "end_line": 715,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "startAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 746,
          "end_line": 746,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "authenticate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 823,
          "end_line": 823,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "finishAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 892,
          "end_line": 892,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removeAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 936,
          "end_line": 936,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "supportsOAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 947,
          "end_line": 947,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasStoredTokens",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 958,
          "end_line": 958,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAuthStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 968,
          "end_line": 968,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 974 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "auth",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 130,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/mcp/auth.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getForUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "set",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateTokens",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateClientInfo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateCodeVerifier",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 87,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearCodeVerifier",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateOAuthState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getOAuthState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearOAuthState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isTokenExpired",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "oauth-callback",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 198,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/mcp/oauth-callback.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "ensureRunning",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitForCallback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 146,
          "end_line": 146,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cancelPending",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isPortInUse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 168,
          "end_line": 168,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stop",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 181,
          "end_line": 181,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isRunning",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 195,
          "end_line": 195,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 268,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/installation/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "info",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isPreview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isLocal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "method",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getBrewFormula",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "upgrade",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 136,
          "end_line": 136,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "latest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 201,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 158,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/command/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "hints",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 151,
          "end_line": 151,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 155,
          "end_line": 155,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "flag",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 113,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/flag/flag.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "truthy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2,
          "end_line": 2,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "falsy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "number",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 662,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/worktree/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "pick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 190,
          "end_line": 190,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "slug",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 194,
          "end_line": 194,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "randomName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 203,
          "end_line": 203,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "exists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 207,
          "end_line": 207,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "outputText",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 214,
          "end_line": 214,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "errorText",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 219,
          "end_line": 219,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "failed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 223,
          "end_line": 223,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "prune",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 238,
          "end_line": 238,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sweep",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 250,
          "end_line": 250,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "canonical",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 261,
          "end_line": 261,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 268,
          "end_line": 268,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runStartCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 286,
          "end_line": 286,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runStartScript",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 295,
          "end_line": 295,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runStartScripts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 310,
          "end_line": 310,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "queueStartScripts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 322,
          "end_line": 322,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "makeWorktreeInfo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 334,
          "end_line": 334,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createFromInfo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 346,
          "end_line": 346,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 662 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "agent",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 524,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/agent/agent.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 353,
          "end_line": 353,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 360,
          "end_line": 360,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "defaultAgent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 369,
          "end_line": 369,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 389,
          "end_line": 389,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 466,
          "end_line": 466,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 524 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 61,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/scheduler/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "register",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "bootstrap",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 33,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/project/bootstrap.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "InstanceBootstrap",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "project",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 457,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/project/project.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "gitpath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fromRow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fromDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "discover",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 276,
          "end_line": 276,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrateFromGlobal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 300,
          "end_line": 300,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setInitialized",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 322,
          "end_line": 322,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 334,
          "end_line": 334,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 344,
          "end_line": 344,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "initGit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 350,
          "end_line": 350,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sandboxes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 399,
          "end_line": 399,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "addSandbox",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 411,
          "end_line": 411,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removeSandbox",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 435,
          "end_line": 435,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 457 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "instance",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 162,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/project/instance.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "emit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "boot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "track",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "vcs",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 76,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/project/vcs.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "currentBranch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "branch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "state",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 80,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/project/state.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetEntry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dispose",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "id",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 84,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/id/id.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "schema",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ascending",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "descending",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateID",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "randomBase62",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "timestamp",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 67,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/control/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fromRow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "account",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "token",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 105,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/bus/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "publish",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "subscribe",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "once",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "subscribeAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "raw",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "bus-event",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 43,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/bus/bus-event.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "define",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "payloads",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 210,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/permission/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "toKeys",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "covered",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pending",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "respond",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "arity",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 163,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/permission/arity.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "prefix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2,
          "end_line": 2,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "next",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 387,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/permission/next.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "expand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fromConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "merge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "evaluate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 337,
          "end_line": 337,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "disabled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 348,
          "end_line": 348,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 383,
          "end_line": 383,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 387 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 680,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/patch/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parsePatchHeader",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseUpdateFileChunks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseAddFileContent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 162,
          "end_line": 162,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stripHeredoc",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 181,
          "end_line": 181,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parsePatch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 190,
          "end_line": 190,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "maybeParseApplyPatch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 249,
          "end_line": 249,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deriveNewContentsFromChunks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 311,
          "end_line": 311,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "computeReplacements",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 346,
          "end_line": 346,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyReplacements",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 402,
          "end_line": 402,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeUnicode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 422,
          "end_line": 422,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tryMatch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 433,
          "end_line": 433,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seekSequence",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 464,
          "end_line": 464,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateUnifiedDiff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 490,
          "end_line": 490,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyHunksToFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 518,
          "end_line": 518,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyPatch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 575,
          "end_line": 575,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "maybeParseApplyPatchVerified",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 581,
          "end_line": 581,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 680 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 297,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/src/snapshot/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "track",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "patch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "restore",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 116,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "revert",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 135,
          "end_line": 135,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "diff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 168,
          "end_line": 168,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "diffFull",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 203,
          "end_line": 203,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "gitdir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 257,
          "end_line": 257,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "add",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 262,
          "end_line": 262,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "syncExclude",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 270,
          "end_line": 270,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "excludes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 283,
          "end_line": 283,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "workflows-migrator.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 238,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilocode/workflows-migrator.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withHome",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "kilo-errors.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 144,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilocode/kilo-errors.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "makeAPIError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "worktree-diff-summary.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 64,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilocode/worktree-diff-summary.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "rules-migrator.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 253,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilocode/rules-migrator.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withHome",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "patch-jsonc.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 74,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilocode/patch-jsonc.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isRecord",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "patchJsonc",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "plan-followup.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 547,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilocode/plan-followup.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withInstance",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "latestUser",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 117,
          "end_line": 117,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sessions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 125,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mockHandoverDeps",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 547 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "paths.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 265,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilocode/paths.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withHome",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "bash-hierarchy.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 64,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilocode/bash-hierarchy.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "collect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "worktree-diff.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 223,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilocode/worktree-diff.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setupRepo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "plan-exit-detection.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 492,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilocode/plan-exit-detection.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withInstance",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitQuestion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 492 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "local-model.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 462,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilocode/local-model.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "resetMockState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 139,
          "end_line": 139,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runInRoot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 149,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "initLocal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readModelJson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 178,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removeModelJson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 183,
          "end_line": 183,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 462 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "structured-output-integration.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 233,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/session/structured-output-integration.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withInstance",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "retry.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 189,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/session/retry.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "apiError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "wrap",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "prompt.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 332,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/session/prompt.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "deferred",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 215,
          "end_line": 215,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 332 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "compaction.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 647,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/session/compaction.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 647 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "llm.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 668,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/session/llm.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "deferred",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 113,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitRequest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createChatStream",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 157,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadFixture",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 187,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createEventStream",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 201,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createEventResponse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 216,
          "end_line": 216,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 668 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "message-v2.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 924,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/session/message-v2.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "userInfo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "assistantInfo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "basePart",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 924 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "copilot-chat-model.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 592,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/provider/copilot/copilot-chat-model.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "convertReadableStreamToArray",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createMockFetch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 592 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "event-subscription.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 685,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/acp/event-subscription.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "inProgressText",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isToolCallUpdate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toolEvent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createEventStream",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createFakeAgent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 685 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "codex.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 123,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/plugin/codex.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createTestJwt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "inflight-cache.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 157,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilo-sessions/inflight-cache.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "deferred",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ingest-queue.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 364,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/kilo-sessions/ingest-queue.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "scheduler",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 364 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "config.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 2058,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/config/config.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "writeManagedSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "writeConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "check",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 2058 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "webfetch.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 100,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/tool/webfetch.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withFetch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "json-migration.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 847,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/storage/json-migration.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setupStorageDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "writeProject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "writeSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createTestDb",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 847 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "session-proxy-middleware.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 149,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/control-plane/session-proxy-middleware.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "sse.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 56,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/control-plane/sse.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "stream",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "db",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 11,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/fixture/db.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "resetDatabase",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "fixture",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 71,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/fixture/fixture.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "sanitizePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "exists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clean",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stop",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tmpdir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "fake-lsp-server",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 77,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/fixture/lsp/fake-lsp-server.js",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "encode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "decodeFrames",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "send",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sendRequest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "client.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 95,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/lsp/client.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "spawnFakeServer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "skill.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 392,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/skill/skill.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createGlobalSkill",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 392 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "which.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 100,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/util/which.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "cmd",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "env",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "envPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "same",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "lock.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 72,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/util/lock.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "tick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "flush",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "process.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 77,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/util/process.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "node",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "plugin-auth-picker.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 120,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/cli/plugin-auth-picker.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "hookWithAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hookWithoutAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "thread.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 159,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/cli/tui/thread.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "call",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 87,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "check",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "agent.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 882,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/agent/agent.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "evalPerm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 882 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "project.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 348,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/project/project.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withMode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadProject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 348 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "snapshot.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1180,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/opencode/test/snapshot/snapshot.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "bootstrap",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1180 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "identity",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 70,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-telemetry/src/identity.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setDataPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getMachineId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getDistinctId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getUserId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getOrganizationId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setOrganizationId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateFromKiloAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "reset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "tracer",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 71,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-telemetry/src/tracer.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTracer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setEnabled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shutdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "client",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 79,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-telemetry/src/client.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getClient",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setEnabled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isEnabled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "capture",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "identify",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "alias",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shutdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "telemetry",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 205,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-telemetry/src/telemetry.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "init",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setEnabled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTracer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isEnabled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateIdentity",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "track",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 99,
          "end_line": 99,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackCliStart",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackCliExit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackSessionStart",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 116,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackSessionEnd",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackSessionMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 132,
          "end_line": 132,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackLlmCompletion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 137,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackCommandUsed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 153,
          "end_line": 153,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackToolUsed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 157,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackAgentUsed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 161,
          "end_line": 161,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackPlanFollowup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackShareCreated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 170,
          "end_line": 170,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackShareDeleted",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 174,
          "end_line": 174,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackMcpServerConnected",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 179,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackMcpServerError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 183,
          "end_line": 183,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackAuthSuccess",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 188,
          "end_line": 188,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackAuthLogout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 192,
          "end_line": 192,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trackError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 197,
          "end_line": 197,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shutdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 201,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "telemetry.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 199,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-telemetry/src/__tests__/telemetry.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createMockPostHogClient",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createMockSpan",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "binary",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 41,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/util/src/binary.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "search",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2,
          "end_line": 2,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "insert",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "path",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 37,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/util/src/path.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getFilename",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFileExtension",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFilenameTruncated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "truncateMiddle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "slug",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 74,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/util/src/slug.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "fn",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 11,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/util/src/fn.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fn",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "array",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 10,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/util/src/array.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "findLast",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "iife",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/util/src/iife.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "iife",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "encode",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 52,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/util/src/encode.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "base64Encode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "base64Decode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hash",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checksum",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sampledChecksum",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "identifier",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 48,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/util/src/identifier.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "ascending",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "descending",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "randomBase62",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "lazy",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 11,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/util/src/lazy.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "lazy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "retry",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 41,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/util/src/retry.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isTransientError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "retry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "vite.config",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 59,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/vite.config.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "providerIconsPlugin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchProviderIcons",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "file-path",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 70,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/file-path.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseFilePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractFilePathFromHref",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "commented-lines",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 91,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/pierre/commented-lines.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "annotationIndex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clear",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "markCommentedDiffLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "markCommentedFileLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "selection-bridge",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 129,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/pierre/selection-bridge.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "formatSelectedLineLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "previewSelectedLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cloneSelectedLineRange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "lineInSelectedRange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isSingleLineSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toRange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "restoreShadowTextSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createLineNumberSelectionBridge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "file-runtime",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 114,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/pierre/file-runtime.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createReadyWatcher",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearReadyWatcher",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getViewerHost",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getViewerRoot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyViewerScheme",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "observeViewerScheme",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "notifyShadowReady",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 191,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/pierre/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createDefaultOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 162,
          "end_line": 162,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "comment-hover",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 74,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/pierre/comment-hover.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createHoverCommentUtility",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "media",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 110,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/pierre/media.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "mediaRecord",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeMimeType",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fileExtension",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mediaKindFromPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isBinaryContent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validDataUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dataUrlFromMediaValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "decodeBase64Utf8",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "svgTextFromValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasMediaValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "worker",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 52,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/pierre/worker.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "workerFactory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createPool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getWorkerPool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getWorkerPools",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "diff-selection",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 71,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/pierre/diff-selection.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "findDiffSide",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "diffLineIndex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "diffRowIndex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fixDiffSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "virtualizer",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 100,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/pierre/virtualizer.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "scrollable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "scrollRoot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "target",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "acquireVirtualizer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "file-selection",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 85,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/pierre/file-selection.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "findElement",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findFileLineNumber",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findDiffLineNumber",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findCodeSelectionSide",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readShadowLineSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "file-find",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 576,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/pierre/file-find.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isEditable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hostForNode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "installShortcuts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearHighlightFind",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "supportsHighlights",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "scrollParent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createFileFind",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "scheduleOverlay",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 186,
          "end_line": 186,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 576 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "loader",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 103,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/theme/loader.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "ensureLoaderStyleElement",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyTheme",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildThemeCss",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadThemeFromUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getActiveTheme",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removeTheme",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 88,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setColorScheme",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "resolve",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 709,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/theme/resolve.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "resolveThemeVariant",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getColors",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 627,
          "end_line": 627,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateNeutralOverlayScale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 670,
          "end_line": 670,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateNeutralAlphaScale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 678,
          "end_line": 678,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getHex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 693,
          "end_line": 693,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveTheme",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 698,
          "end_line": 698,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "themeToCss",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 705,
          "end_line": 705,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 709 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "color",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 248,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/theme/color.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "clamp",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hexToRgb",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "rgbToHex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "linearToSrgb",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "srgbToLinear",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "rgbToOklch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "oklchToRgb",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hexToOklch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fitOklch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "oklchToHex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateScale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 133,
          "end_line": 133,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateNeutralScale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateAlphaScale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 180,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mixColors",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 198,
          "end_line": 198,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shift",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 210,
          "end_line": 210,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "blend",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 219,
          "end_line": 219,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "lighten",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 229,
          "end_line": 229,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "darken",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 237,
          "end_line": 237,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "withAlpha",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 245,
          "end_line": 245,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "line-comment-styles",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 223,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/components/line-comment-styles.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "installLineCommentStyles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 208,
          "end_line": 208,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-review-search",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 59,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/components/session-review-search.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "hitsForSide",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildSessionSearchHits",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stepSessionSearchIndex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "fixtures",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 51,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/ui/src/storybook/fixtures.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "average",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "publish",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 31,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/sdk/js/script/publish.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "transformExports",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 21,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/sdk/js/src/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createKilo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "server",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 162,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/sdk/js/src/server.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "mergeConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseExistingConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildConfigEnv",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createKiloServer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createKiloTui",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "client",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 30,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/sdk/js/src/client.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createKiloClient",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 21,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/sdk/js/src/v2/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createKilo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "server",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 162,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/sdk/js/src/v2/server.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "mergeConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseExistingConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildConfigEnv",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createKiloServer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createKiloTui",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "client",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 39,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/sdk/js/src/v2/client.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createKiloClient",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "utils.gen",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 137,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/sdk/js/src/v2/gen/core/utils.gen.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getValidRequestBody",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "esbuild",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 218,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/esbuild.js",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getWorkerPool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getWorkerPools",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "workerFactory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createBrowserWebviewContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 142,
          "end_line": 142,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "launch",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 338,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/script/launch.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "which",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "detect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "codeCli",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 176,
          "end_line": 176,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "newest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 196,
          "end_line": 196,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "compile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 204,
          "end_line": 204,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "packageVsix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 219,
          "end_line": 219,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "installVsix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 234,
          "end_line": 234,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "settings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 243,
          "end_line": 243,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "launch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 272,
          "end_line": 272,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 338 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "local-bin",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 155,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/script/local-bin.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "log",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "platformTag",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findKiloBinaryInOpencodeDist",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ensureBuiltBinary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "watch-cli",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 94,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/script/watch-cli.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "log",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sourceBinaryPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "rebuild",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "qrcode",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 9,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/utils/qrcode.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "generateQRCode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "id",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 60,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/utils/id.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "randomBase62",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getRandomBytes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "errorUtils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 98,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/utils/errorUtils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "unwrapError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseAssistantError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isUnauthorizedPaidModelError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isUnauthorizedPromotionLimitError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "provider-action",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 91,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/utils/provider-action.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createProviderAction",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "send",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clear",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dispose",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "date",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 23,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/utils/date.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "formatRelativeDate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "review-comment-markdown",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 33,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/utils/review-comment-markdown.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "escapeInline",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fenceFor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatCode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatReviewCommentMarkdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatReviewCommentsMarkdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "messages",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 2001,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/types/messages.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "acquireVsCodeApi",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2000,
          "end_line": 2000,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 2001 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "useFileMention",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 175,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/hooks/useFileMention.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useFileMention",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "file-mention-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 61,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/hooks/file-mention-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "escape",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "syncMentionedPaths",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildTextAfterMentionSelect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildFileAttachments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "useImageAttachments",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 82,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/hooks/useImageAttachments.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useImageAttachments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "usePromptHistory",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 151,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/hooks/usePromptHistory.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "load",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "canNavigate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "appendEntry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seedEntries",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "usePromptHistory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "navigate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "append",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 137,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 141,
          "end_line": 141,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "reset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 145,
          "end_line": 145,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "useSlashCommand",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 226,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/hooks/useSlashCommand.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useSlashCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "image-attachments-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 15,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/hooks/image-attachments-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isAcceptedImageType",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isDragLeavingComponent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 20,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/components/marketplace/utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isInstalled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "installedScopes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "model-selector-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 62,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/components/shared/model-selector-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isSmall",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "providerSortKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isFree",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sanitizeName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stripSubProviderPrefix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildTriggerLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "question-dock-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 7,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/components/chat/question-dock-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "toggleAnswer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "prompt-input-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 51,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/components/chat/prompt-input-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fileName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dirName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildHighlightSegments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "atEnd",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "permission-dock-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 74,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/components/chat/permission-dock-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "savedRuleStates",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "describePatterns",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "provider-catalog",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 51,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/components/settings/provider-catalog.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isPopularProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "popularProviderIndex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "providerIcon",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "kiloFallbackProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "providerNoteKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sortProviders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "provider-visibility",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 6,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/components/settings/provider-visibility.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "visibleConnectedIds",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "language-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 70,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/context/language-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "normalizeLocale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveTemplate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-queue",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 25,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/context/session-queue.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "activeUserMessageID",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "permission-queue",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 13,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/context/permission-queue.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "upsertPermission",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removeSessionPermissions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "model-selection",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 43,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/context/model-selection.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "validate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "recent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveModelSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 64,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/context/session-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "computeStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "calcTotalCost",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "calcContextUsage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "provider-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 46,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/src/context/provider-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "flattenModels",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isModelValid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "apply-conflicts",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 31,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/agent-manager/apply-conflicts.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "groupApplyConflicts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mapApplyConflictReason",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "multi-model-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 75,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/agent-manager/multi-model-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "allocationKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "totalAllocations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "allocationsToArray",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remaining",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toggleModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setAllocationCount",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "maxAllocationCount",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "tab-order",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 62,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/agent-manager/tab-order.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "reorderTabs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyTabOrder",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "firstOrderedTitle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "file-tree-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 53,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/agent-manager/file-tree-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "buildFileTree",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "flatten",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "flattenChain",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "navigate",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 88,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/agent-manager/navigate.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "resolveNavigation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validateLocalSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "adjacentHint",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "nextSelectionAfterDelete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "review-annotations",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 250,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/agent-manager/review-annotations.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "focusWhenConnected",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "makeIcon",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "makeActionButton",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildReviewAnnotation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "diff-open-policy",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 21,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/agent-manager/diff-open-policy.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isLargeDiffFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "initialOpenFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "review-comments",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 54,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/agent-manager/review-comments.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "lineCount",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFilename",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sanitizeReviewComments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "diff-state",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 26,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/webview-ui/agent-manager/diff-state.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "sameDiffMeta",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mergeWorktreeDiffs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "session-status",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 41,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/session-status.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getBusySessionCount",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seedSessionStatuses",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "kilo-provider-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 346,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/kilo-provider-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getErrorMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sessionToWebview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "indexProvidersById",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filterVisibleAgents",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadSessions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "flushPendingSessionRefresh",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 151,
          "end_line": 151,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildSettingPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mapSSEEventToWebviewMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 207,
          "end_line": 207,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mapCloudSessionMessageToWebviewMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 320,
          "end_line": 320,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isEventFromForeignProject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 340,
          "end_line": 340,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 346 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "webview-html-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 34,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/webview-html-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "buildConnectSrc",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "joinCspDirectives",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildCspString",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "extension",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 360,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/extension.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "activate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deactivate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 303,
          "end_line": 303,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openKiloInNewTab",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 307,
          "end_line": 307,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitForWebviewPanelToBeActive",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 346,
          "end_line": 346,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 360 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "project-directory",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 69,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/project-directory.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "resolvePanelProjectDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveProjectDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "path-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 27,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/path-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isAbsolutePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "image-preview",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 83,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/image-preview.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseImage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildPreviewPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getPreviewCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getPreviewDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trimEntries",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseBase64",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getExt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sanitize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "review-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 98,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/review-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "appendOutput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getWorkspaceRoot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveLocalDiffTarget",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hashFileDiffs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openFileInEditor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openWorkspaceRelativeFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 62,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getNonce",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildWebviewHtml",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "provider-actions",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 301,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/provider-actions.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fetchProviderData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildActionContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isModelSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validateRecents",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "computeDefaultSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "postError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validateID",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "connectProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "authorizeProviderOAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 131,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "completeProviderOAuth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 160,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "disconnectProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 188,
          "end_line": 188,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "saveCustomProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 243,
          "end_line": 243,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 301 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "toggle-auto-approve",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 87,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/commands/toggle-auto-approve.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "registerToggleAutoApprove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tryGetClient",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "fork-session",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 65,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/fork-session.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "forkSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "WorktreeManager",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1014,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/WorktreeManager.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "stripRemotePrefix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1014 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "format-keybinding",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 73,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/format-keybinding.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "formatKeybinding",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildKeybindingMap",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "constants",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 165,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/constants.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "migrateAgentManagerData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "exists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveGitDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fixGitWorktreeRefs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 132,
          "end_line": 132,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "git-import",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 162,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/git-import.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parsePRUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "localBranchName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseForEachRefOutput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildBranchList",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseWorktreeList",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkedOutBranchesFromWorktreeList",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 122,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validateGitRef",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 132,
          "end_line": 132,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 143,
          "end_line": 143,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "classifyPRError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 149,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "classifyWorktreeError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 157,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "task-runner",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 64,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/task-runner.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "executeVscodeTask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "multi-version",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 103,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/multi-version.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "resolveVersionModels",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildInitialMessages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "shell-env",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 173,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/shell-env.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseEnvOutput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getShellEnvironment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolvePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "execWithShellEnv",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearShellEnvCache",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 167,
          "end_line": 167,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "delete-worktree",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 20,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/delete-worktree.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "shouldStopDiffPolling",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "WorktreeStateManager",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 405,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/WorktreeStateManager.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "remoteRef",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 405 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "SetupScriptRunner",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 98,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/SetupScriptRunner.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "quoteCmdArg",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildSetupTaskCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "branch-name",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 69,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/branch-name.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "sanitizeBranchName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generateBranchName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "versionedName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "base-branch",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 34,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/base-branch.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "normalizeBaseBranch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "chooseBaseBranch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "terminal-host",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 47,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/terminal-host.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createTerminalHost",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "SetupScriptService.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 110,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/__tests__/SetupScriptService.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setupRoot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "scriptPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "writeScript",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AgentManagerProvider.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 172,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/agent-manager/__tests__/AgentManagerProvider.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createMockHost",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deferred",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createHarness",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "provider-model",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 36,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/shared/provider-model.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseModelString",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "providerOrderIndex",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createKiloFallbackProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "custom-provider",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 114,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/shared/custom-provider.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validateProviderID",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseCustomProviderSecret",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeCustomProviderConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sanitizeCustomProviderConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "migration-service",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1067,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/legacy-migration/migration-service.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getMigrationStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setMigrationStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "detectLegacyData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearLegacyData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 252,
          "end_line": 252,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrateProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 317,
          "end_line": 317,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrateConfigFields",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 404,
          "end_line": 404,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrateDefaultModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 422,
          "end_line": 422,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrateAutoApproval",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 452,
          "end_line": 452,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrateAutocomplete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 598,
          "end_line": 598,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrateLanguage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 649,
          "end_line": 649,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertMcpServer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 677,
          "end_line": 677,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertCustomModePermissions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 707,
          "end_line": 707,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertCustomMode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 745,
          "end_line": 745,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readOAuthCredentials",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 763,
          "end_line": 763,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readLegacyProviderProfiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 788,
          "end_line": 788,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readLegacyMcpSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 800,
          "end_line": 800,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readLegacyCustomModes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 816,
          "end_line": 816,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readLegacySettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 827,
          "end_line": 827,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasAutocompleteData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 855,
          "end_line": 855,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stripYamlQuotes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 870,
          "end_line": 870,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseCustomModesYaml",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 874,
          "end_line": 874,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildProviderList",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1006,
          "end_line": 1006,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildMcpServerList",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1039,
          "end_line": 1039,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildCustomModeList",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1046,
          "end_line": 1046,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveDefaultModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1051,
          "end_line": 1051,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1067 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "api",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 146,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/marketplace/api.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "kebabToTitleCase",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseResponse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transformSkill",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchWithRetry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "installer",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 411,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/marketplace/installer.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "normalizeMcpEntry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 288,
          "end_line": 288,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isSafeId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 319,
          "end_line": 319,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "convertModeToAgent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 334,
          "end_line": 334,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "escapeJsonValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 365,
          "end_line": 365,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "substituteParams",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 374,
          "end_line": 374,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findEscapedPaths",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 384,
          "end_line": 384,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "walk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 388,
          "end_line": 388,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 411 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "paths",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 25,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/marketplace/paths.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "globalConfigDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "server-manager",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 245,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/cli-backend/server-manager.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "stripAnsi",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 213,
          "end_line": 213,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toErrorMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 217,
          "end_line": 217,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "server-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 10,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/cli-backend/server-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseServerPort",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "connection-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 47,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/cli-backend/connection-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "resolveEventSessionId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 66,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/cli-backend/i18n/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "resolveLocale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadTranslations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "t",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "errors",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 69,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/telemetry/errors.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isApiProviderError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getApiProviderErrorProperties",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isConsecutiveMistakeError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getConsecutiveMistakeErrorProperties",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "telemetry-proxy-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 21,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/telemetry/telemetry-proxy-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "buildTelemetryPayload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildTelemetryAuthHeader",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 84,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/commit-message/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "registerCommitMessageService",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "register-code-actions",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 71,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/code-actions/register-code-actions.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "registerCodeActions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "register-terminal-actions",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 109,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/code-actions/register-terminal-actions.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getTerminalContents",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "registerTerminalActions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "editor-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 24,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/code-actions/editor-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getEditorContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "support-prompt",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 107,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/code-actions/support-prompt.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "diagnosticText",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fill",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createPrompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AutocompleteServiceManager",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 380,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/AutocompleteServiceManager.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "readSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "writeSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 380 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "statusbar-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 24,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/statusbar-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "humanFormatSessionCost",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatTime",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "types",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 291,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/types.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "extractPrefixSuffix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 253,
          "end_line": 253,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "contextToAutocompleteInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 266,
          "end_line": 266,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AutocompleteServiceManager.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 344,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/__tests__/AutocompleteServiceManager.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createManager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 151,
          "end_line": 151,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 344 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "AutocompleteModel.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 169,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/__tests__/AutocompleteModel.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createMockConnectionService",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "MockWorkspaceEdit",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 46,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/__tests__/MockWorkspaceEdit.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createMockWorkspaceEdit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "HoleFiller",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 200,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/HoleFiller.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseAutocompleteResponse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sum_evens",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sum",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hypothenuse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 126,
          "end_line": 126,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "getProcessedSnippets",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 119,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/getProcessedSnippets.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "uriToFsPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasFilepath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filterSnippetsByAccess",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getProcessedSnippets",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "uselessSuggestionFilter",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 179,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/uselessSuggestionFilter.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "suggestionConsideredDuplication",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DuplicatesFromPrefixOrSuffix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DuplicatesFromEdgeLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "containsRepetitivePhraseFromPrefix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeToCompleteLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "postprocessAutocompleteSuggestion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 140,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "hole-filler-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 19,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/hole-filler-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseAutocompleteResponse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "contextualSkip",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 136,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/contextualSkip.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getTerminatorsForLanguage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isAtEndOfStatement",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isMidWordTyping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldSkipAutocomplete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 134,
          "end_line": 134,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AutocompleteInlineCompletionProvider",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 581,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteInlineCompletionProvider.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "findMatchingSuggestion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyFirstLineOnly",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "countLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldShowOnlyFirstLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFirstLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stringToInlineCompletions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 581 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "AutocompleteTelemetry",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 276,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteTelemetry.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getSuggestionKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "telemetry-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 24,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/telemetry-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getSuggestionKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "insertWithLRUEviction",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "inline-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 96,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/inline-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "findMatchingSuggestion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "countLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldShowOnlyFirstLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFirstLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyFirstLineOnly",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "calcDebounceDelay",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AutocompleteTelemetry.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 70,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/__tests__/AutocompleteTelemetry.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createSuggestion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AutocompleteContextProvider.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 424,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/__tests__/AutocompleteContextProvider.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createAutocompleteInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 424 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "HoleFiller.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 301,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/__tests__/HoleFiller.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createAutocompleteInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 301 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "AutocompleteInlineCompletionProvider.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 2478,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/__tests__/AutocompleteInlineCompletionProvider.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "provideWithDebounce",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 774,
          "end_line": 774,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 2478 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 16,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/language-filters/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "applyLanguageFilter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "markdown",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 75,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/language-filters/markdown.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isInsideCodeBlock",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removeSpuriousNewlinesBeforeCodeBlockClosingFences",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "markdownFilter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "handleChatCompletionAccepted",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 29,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/chat-autocomplete/handleChatCompletionAccepted.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getChatAutocompleteTelemetry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleChatCompletionAccepted",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "handleChatCompletionRequest",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 43,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/chat-autocomplete/handleChatCompletionRequest.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handleChatCompletionRequest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "chat-autocomplete-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 45,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/chat-autocomplete/chat-autocomplete-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "finalizeChatSuggestion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildChatPrefix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "FileIgnoreController",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 142,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/shims/FileIgnoreController.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "toPosix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "i18n",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 17,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/shims/i18n.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "t",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "util",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 135,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/diff/util.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "linesMatchPerfectly",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "linesMatch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "matchLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "myers",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 204,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/diff/myers.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "convertMyersChangeToDiffLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "myersDiff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "myersCharDiff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "streamDiff.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 317,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/diff/streamDiff.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "collectDiffs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getMyersDiffType",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "displayDiff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "expectDiff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 317 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "stream",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 138,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/fetch/stream.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseSseLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "lcs",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 30,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/util/lcs.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "longestCommonSubsequence",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 51,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/util/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "dedent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "uri",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 158,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/util/uri.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "pathToUriPathSegment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCleanUriPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findUriInDirs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getUriPathBasename",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFileExtensionFromBasename",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 88,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getUriFileExtension",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 99,
          "end_line": 99,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getLastNUriRelativePathParts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "joinPathsToUri",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getShortestUniqueRelativeUriPaths",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getLastNPathParts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 153,
          "end_line": 153,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ranges",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 46,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/util/ranges.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getRangeInString",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "intersection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "messageContent",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 23,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/util/messageContent.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "stripImages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "renderChatMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "merge",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 58,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/util/merge.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "mergeJson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "logger",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 35,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/util/logger.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getIconFromLevel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "paths",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 34,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/util/paths.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getContinueGlobalPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getIndexFolderPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getConfigJsonPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "treeSitter",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 345,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/util/treeSitter.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getParserForFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 125,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findExistingPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 151,
          "end_line": 151,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getExtensionFromPathOrUri",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getLanguageForFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 175,
          "end_line": 175,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getQueryForFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 201,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadLanguageForFileExt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 232,
          "end_line": 232,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSymbolsForFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 277,
          "end_line": 277,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findNamedNodesRecursive",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 300,
          "end_line": 300,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 345 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "pathToUri",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 24,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/util/pathToUri.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "localPathToUri",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "localPathOrUriToPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "testDir",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 61,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/test/testDir.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setUpTestDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tearDownTestDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "addToTestDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ignore",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 122,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/indexing/ignore.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isSecurityConcern",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 57,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/prefiltering/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isDisabledForFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldPrefilter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AutocompleteLanguageInfo",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 364,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/constants/AutocompleteLanguageInfo.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "matchBrackets",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 288,
          "end_line": 288,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "languageForFilepath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 361,
          "end_line": 361,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 364 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "getAllSnippets",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 231,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/snippets/getAllSnippets.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "racePromise",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getIdeSnippets",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSnippetsFromRecentlyEditedRanges",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "removePrefixOverlap",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 17,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/postprocessing/removePrefixOverlap.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "removePrefixOverlap",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1,
          "end_line": 1,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 176,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/postprocessing/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "rewritesLineAbove",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isExtremeRepetition",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isOnlyWhitespace",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isBlank",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removeBackticks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "postprocessCompletion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "shouldCompleteMultiline",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 37,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/classification/shouldCompleteMultiline.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "shouldCompleteMultilineBasedOnLanguage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldCompleteMultiline",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AutocompleteLruCacheInMem",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 77,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/util/AutocompleteLruCacheInMem.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "truncatePrefix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ast",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 42,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/util/ast.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getAst",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTreePathAtCursor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "completionTestUtils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 94,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/util/completionTestUtils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "processTestCase",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "processSingleLineCompletion",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 80,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/util/processSingleLineCompletion.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "diffPatternMatches",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "processSingleLineCompletion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "textSimilarity",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 14,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/util/textSimilarity.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "lineIsRepeated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "GeneratorReuseManager.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 208,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/generation/GeneratorReuseManager.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createMockGenerator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "utils.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 126,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/generation/utils.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "streamToString",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "BracketMatchingService.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 307,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/filtering/BracketMatchingService.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "collectAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 307 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "testCases",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 2175,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/filtering/test/testCases.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "sayHello",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "calculateArea",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 608,
          "end_line": 608,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "set",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1498,
          "end_line": 1498,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1502,
          "end_line": 1502,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "storeData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1520,
          "end_line": 1520,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "addPerson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1544,
          "end_line": 1544,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFirstPerson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1548,
          "end_line": 1548,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_grade",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1776,
          "end_line": 1776,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "add",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1792,
          "end_line": 1792,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "subtract",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1796,
          "end_line": 1796,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2063,
          "end_line": 2063,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 2175 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "util",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 81,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/filtering/test/util.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseFimExample",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "testAutocompleteFiltering",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "lineStream",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 270,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/filtering/streamTransforms/lineStream.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isBracketEnding",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validatePatternInLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "charStream.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 192,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/filtering/streamTransforms/charStream.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "streamToString",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "lineStream.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 179,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/filtering/streamTransforms/lineStream.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getLineGenerator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFilteredLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "constructPrefixSuffix",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 40,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/templating/constructPrefixSuffix.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "constructInitialPrefixSuffix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "filtering",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 185,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/templating/filtering.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "filterSnippetsAlreadyInCaretWindow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "getStopTokens",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 28,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/templating/getStopTokens.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getStopTokens",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 205,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/templating/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getTemplate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "preparePromptContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "renderPrompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildPrompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pruneLength",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 125,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "renderPromptWithTokenLimit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 134,
          "end_line": 134,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AutocompleteTemplate",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 374,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/templating/AutocompleteTemplate.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getFileName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFileName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 119,
          "end_line": 119,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sum_evens",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 223,
          "end_line": 223,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sum",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 275,
          "end_line": 275,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hypothenuse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 294,
          "end_line": 294,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTemplateForModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 312,
          "end_line": 312,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 374 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "formatOpenedFilesContext",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 147,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/templating/formatOpenedFilesContext.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "formatOpenedFilesContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "trimSnippetForContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "renderPrompt.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 262,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/templating/__tests__/renderPrompt.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "makeHelper",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 133,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/context/ranking/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getSymbolsForSnippet",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "jaccardSimilarity",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "rankAndOrderSnippets",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deduplicateSnippets",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mergeSnippetsByRange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mergeOverlappingRangeContents",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fillPromptWithSnippets",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 116,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "tree-sitter-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 109,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/context/static-context/tree-sitter-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "findEnclosingTypeDeclaration",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractTopLevelDecls",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractFunctionTypeFromDecl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "unwrapToBaseType",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "StaticContextService",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 792,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/context/static-context/StaticContextService.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "convertToArrowType",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 402,
          "end_line": 402,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "scanRecursively",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 763,
          "end_line": 763,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 792 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "testUtils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 83,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/context/root-path-context/testUtils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "splitTextAtPosition",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "testRootPathContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "base_module",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 26,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/context/root-path-context/__fixtures__/files/base_module.py",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__str__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__str__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "functions",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 33,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/context/root-path-context/__fixtures__/files/typescript/functions.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getAddress",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFirstAddress",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "logPerson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getHardcodedAddress",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAddresses",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "logPersonWithAddress",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "logPersonOrAddress",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "logPersonAndAddress",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "functions",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 42,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/autocomplete/context/root-path-context/__fixtures__/files/python/functions.py",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "get_address",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_group_address",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "log_person",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_hardcoded_address",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "log_person_or_address",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "log_person_and_address",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_address_generator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "log_person_and_address",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_person",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "llamaTokenizer",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 487,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/llm/llamaTokenizer.js",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isEqual",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 386,
          "end_line": 386,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "testCase",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 395,
          "end_line": 395,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 487 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "openaiTypeConverters",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 108,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/llm/openaiTypeConverters.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "toChatMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toChatBody",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toCompleteBody",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toFimBody",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fromChatResponse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fromChatCompletionChunk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "countTokens",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 320,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/llm/countTokens.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "modelUsesGptTokenizer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "encodingForModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "countTokens",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "countChatMessageTokens",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractToolSequence",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pruneLinesFromTop",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pruneLinesFromBottom",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pruneStringFromBottom",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pruneStringFromTop",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 155,
          "end_line": 155,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTokenCountingBufferSafety",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 168,
          "end_line": 168,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pruneRawPromptFromTop",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 174,
          "end_line": 174,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "compileChatMessages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 212,
          "end_line": 212,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 320 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "messages",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 31,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/llm/messages.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "messageIsEmpty",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "addSpaceToAnyEmptyMessages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "chatMessageIsEmpty",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 22,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/llm/model-info/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "findLlmInfo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "VSCodeIde",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 247,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/vscode-test-harness/src/VSCodeIde.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "stat",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "areEqualURIs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "documentIsCode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "lsp",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 478,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/continuedev/core/vscode-test-harness/src/autocomplete/lsp.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "gotoInputKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "signatureHelpKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "executeSignatureHelpProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "executeGotoProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isRifWithContents",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 123,
          "end_line": 123,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findChildren",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 127,
          "end_line": 127,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findTypeIdentifiers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 150,
          "end_line": 150,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "crawlTypes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 161,
          "end_line": 161,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getDefinitionsForNode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 235,
          "end_line": 235,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "symbolInputKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 407,
          "end_line": 407,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "executeSymbolProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 414,
          "end_line": 414,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "collectSymbols",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 442,
          "end_line": 442,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 478 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "visible-code-utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 19,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/context/visible-code-utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "extractDiffInfo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "VisibleCodeTracker",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 126,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/services/autocomplete/context/VisibleCodeTracker.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "toRelativePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "slim-metadata",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 57,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/kilo-provider/slim-metadata.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "slimMeta",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 9,
          "end_line": 9,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "slimPart",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "slimParts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "question",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 51,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/kilo-provider/handlers/question.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handleQuestionReply",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleQuestionReject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "permission-handler",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 99,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/kilo-provider/handlers/permission-handler.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handlePermissionResponse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchAndSendPendingPermissions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "auth",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 143,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/kilo-provider/handlers/auth.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handleLogin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleLogout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSetOrganization",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleRefreshProfile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 137,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "cloud-session",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 222,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/kilo-provider/handlers/cloud-session.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handleRequestCloudSessions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleRequestCloudSessionData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleImportAndSend",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "migration",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 155,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/src/kilo-provider/handlers/migration.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "checkAndShowMigrationWizard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleRequestLegacyMigrationData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleStartLegacyMigration",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSkipLegacyMigration",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 143,
          "end_line": 143,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleClearLegacyData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 152,
          "end_line": 152,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "visual-regression.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 78,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/visual-regression.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "fetchStories",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "disableAnimations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "permission-dock-dropdown.spec",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 297,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/permission-dock-dropdown.spec.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "storyUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "disableAnimations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openDropdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "git-ops.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 561,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/git-ops.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "sleep",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ops",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runGit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "withRepo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 561 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "kilo-provider-utils.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 515,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/kilo-provider-utils.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "makeSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "makeProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "makeAgent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "makeTextPart",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "makeAssistantMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "makeCloudMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 466,
          "end_line": 466,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 515 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "provider-utils.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 103,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/provider-utils.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "makeProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "i18n-keys.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 407,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/i18n-keys.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "offsetToLine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 205,
          "end_line": 205,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractKeys",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 213,
          "end_line": 213,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "collectFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 224,
          "end_line": 224,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findWebviewMissing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 234,
          "end_line": 234,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findCliBackendMissing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 260,
          "end_line": 260,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findAutocompleteMissing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 280,
          "end_line": 280,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findMissingLocaleKeys",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 300,
          "end_line": 300,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatLocaleReport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 318,
          "end_line": 318,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatReport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 324,
          "end_line": 324,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 407 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "agent-manager-diff-state.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 55,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/agent-manager-diff-state.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "diff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "provider-action.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 143,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/provider-action.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createTransport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "autocomplete-inline-utils.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 182,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/autocomplete-inline-utils.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "makeSuggestion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "git-stats-poller.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 447,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/git-stats-poller.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "sleep",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "waitFor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "worktree",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "diff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "gitOps",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 447 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "session-terminal-manager.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 90,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/session-terminal-manager.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "body",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "date.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 83,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/date.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "ago",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 4,
          "end_line": 4,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "worktree-manager.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1108,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/worktree-manager.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createTempRepo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createManager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createTempRepoWithOrigin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1108 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "kilo-provider-session-refresh.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 150,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/kilo-provider-session-refresh.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createListSessions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createClient",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createConnection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "connection-utils.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 161,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/connection-utils.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "event",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "file-tree.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 312,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/file-tree.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "diff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 312 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "code-action-provider.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 100,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/code-action-provider.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "makeRange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "makeContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "agent-manager-i18n-split.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 144,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/agent-manager-i18n-split.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "placeholders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "extension-arch.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 86,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/extension-arch.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "readSrcFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "agent-manager-arch.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 607,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/agent-manager-arch.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "readAllCss",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readAllTsx",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getMethodBody",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 155,
          "end_line": 155,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "body",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 162,
          "end_line": 162,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "importsVscode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 540,
          "end_line": 540,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "agentManagerSourceFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 544,
          "end_line": 544,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 607 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "permission-queue.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 90,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/permission-queue.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "perm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "review-comments.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 213,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/review-comments.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "diff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "comment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "kilo-ui-contract.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 140,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/kilo-ui-contract.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "check",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "agent-manager-i18n.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 346,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/agent-manager-i18n.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isProgrammatic",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findViolations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "findTranslationShadowViolations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 241,
          "end_line": 241,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 346 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "model-selection.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 106,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/model-selection.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "makeProvider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 6,
          "end_line": 6,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "tab-order.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 200,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/tab-order.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "reconcile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 150,
          "end_line": 150,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "message-contract.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 105,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/message-contract.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "readFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "multi-model-utils.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 111,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/multi-model-utils.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "make",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "file-ignore-controller.test",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 121,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/kilo-vscode/tests/unit/file-ignore-controller.test.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createTempWorkspace",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "electron-builder.config",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 97,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/electron-builder.config.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "finalize-latest-yml",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 116,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/scripts/finalize-latest-yml.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "serialize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "read",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 69,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/scripts/utils.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "resolveChannel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "nativeTarget",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCurrentSidecar",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "copyBinaryToSidecarFolder",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "windowsify",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "store",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 15,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/main/store.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getStore",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "cli",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 279,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/main/cli.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getSidecarPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "installCli",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "syncCli",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "serve",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 122,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "spawnCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 132,
          "end_line": 132,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSqliteProgress",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 197,
          "end_line": 197,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 212,
          "end_line": 212,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "envPrefix",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 241,
          "end_line": 241,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shellEscape",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 246,
          "end_line": 246,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCliInstallPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 251,
          "end_line": 251,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isWslEnabled",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 257,
          "end_line": 257,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseVersion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 261,
          "end_line": 261,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "compareVersions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 270,
          "end_line": 270,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "menu",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 116,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/main/menu.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createMenu",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 463,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/main/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setupApp",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "emitDeepLinks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 116,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "focusMainWindow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 122,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setInitStep",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setupServerConnection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 134,
          "end_line": 134,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "initialize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 164,
          "end_line": 164,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "wireMenu",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 242,
          "end_line": 242,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "killSidecar",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 293,
          "end_line": 293,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ensureLoopbackNoProxy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 299,
          "end_line": 299,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSidecarPort",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 319,
          "end_line": 319,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sqliteFileExists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 342,
          "end_line": 342,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setupAutoUpdater",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 348,
          "end_line": 348,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkUpdate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 366,
          "end_line": 366,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "installUpdate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 402,
          "end_line": 402,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkForUpdates",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 408,
          "end_line": 408,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delay",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 451,
          "end_line": 451,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "defer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 455,
          "end_line": 455,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 463 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "apps",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 148,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/main/apps.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "checkAppExists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveAppPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "wslPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkMacosApp",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveWindowsAppPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "windows",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 135,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/main/windows.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "iconsDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "iconPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setDockIcon",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createMainWindow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createLoadingWindow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadWindow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "injectGlobals",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 116,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "wireZoom",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "server",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 129,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/main/server.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getDefaultServerUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setDefaultServerUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getWslConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setWslConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSavedServerUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "spawnLocalServer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkHealth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkHealthOrAskRetry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeHostnameForUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getServerUrlFromConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 122,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "migrate",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 91,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/main/migrate.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "tauriDir",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tauriAppId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrateFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ipc",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 176,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/main/ipc.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "registerIpcHandlers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sendSqliteMigrationProgress",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 166,
          "end_line": 166,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sendMenuCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 170,
          "end_line": 170,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sendDeepLinks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 174,
          "end_line": 174,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "logging",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 40,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/main/logging.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "initLogging",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "markdown",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 16,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/main/markdown.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "parseMarkdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "cli",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 12,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/renderer/cli.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "installCli",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "updater",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 14,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/renderer/updater.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "runUpdater",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "index",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 188,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/desktop-electron/src/renderer/i18n/index.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "detectLocale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseLocale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseRecord",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 113,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseStored",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 119,
          "end_line": 119,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pickLocale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 140,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "t",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 168,
          "end_line": 168,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "initI18n",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 172,
          "end_line": 172,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "theme-tool",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 21,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/theme-tool.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "ThemeTool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 5,
          "end_line": 5,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "use-providers",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 23,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/hooks/use-providers.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useProviders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "sync",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 32,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/sync.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useSync",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "sdk",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 25,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/sdk.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useSDK",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "layout",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 41,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/layout.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useLayout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "platform",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 16,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/platform.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "usePlatform",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "prompt",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 117,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/prompt.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "clonePart",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clonePrompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isPromptEqual",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "usePrompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "permission",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 24,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/permission.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3,
          "end_line": 3,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "usePermission",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 7,
          "end_line": 7,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "comments",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 34,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/comments.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useComments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "local",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 41,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/local.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useLocal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "global-sync",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 42,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/global-sync.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useGlobalSync",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "file",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 47,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/file.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "selectionFromLines",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "command",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 22,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/command.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "useCommand",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "language",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 74,
      "tags": {
        "PURPOSE": "Auto-generated module for research/kilocode/packages/storybook/.storybook/mocks/app/context/language.ts",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "render",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "useLanguage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "DashboardTypes",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 67,
      "tags": {
        "COMPLEXITY": "1",
        "PURPOSE": "TypeScript interfaces for Dashboard entities",
        "LAYER": "Domain"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "Counter",
      "type": "Component",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 20,
      "tags": {
        "COMPLEXITY": "2",
        "PURPOSE": "Simple counter demo component",
        "LAYER": "UI",
        "UX_STATE": "Incremented -> Count increases immediately after button activation."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 11
        }
      ]
    },
    {
      "name": "stores_module",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 72,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "state, stores, svelte, plugins, tasks",
        "PURPOSE": "Global state management using Svelte stores.",
        "LAYER": "UI-State"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        }
      ],
      "children": [
        {
          "name": "plugins",
          "type": "Data",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Store for the list of available plugins."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tasks",
          "type": "Data",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Store for the list of tasks."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "selectedPlugin",
          "type": "Data",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Store for the currently selected plugin."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "selectedTask",
          "type": "Data",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Store for the currently selected task."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "currentPage",
          "type": "Data",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Store for the current page."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "taskLogs",
          "type": "Data",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Store for the logs of the currently selected task."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchPlugins",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Fetches plugins from the API and updates the plugins store.",
            "PRE": "None.",
            "POST": "plugins store is updated with data from the API."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchTasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Fetches tasks from the API and updates the tasks store.",
            "PRE": "None.",
            "POST": "tasks store is updated with data from the API."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "toasts_module",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 60,
      "tags": {
        "SEMANTICS": "notification, toast, feedback, state",
        "PURPOSE": "Manages toast notifications using a Svelte writable store.",
        "LAYER": "UI-State"
      },
      "relations": [],
      "children": [
        {
          "name": "toasts",
          "type": "Data",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Writable store containing the list of active toasts."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "addToast",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Adds a new toast message.",
            "PRE": "message string is provided.",
            "POST": "New toast is added to the store and scheduled for removal.",
            "PARAM": "duration (number) - Duration in ms before the toast is removed."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removeToast",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Removes a toast message by ID.",
            "PRE": "id is provided.",
            "POST": "Toast is removed from the store.",
            "PARAM": "id (string) - The ID of the toast to remove."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildToastKey",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldSkipDuplicateToast",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "api_module",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 422,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "api, client, fetch, rest",
        "PURPOSE": "Handles all communication with the backend API.",
        "LAYER": "Infra-API"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "toasts_module"
        }
      ],
      "children": [
        {
          "name": "buildApiError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Creates a normalized Error object for failed API responses.",
            "PRE": "response is a failed fetch Response object.",
            "POST": "Returned error contains message and status fields.",
            "TYPE": "{any} */ (error).error_code = String(detail.error_code);"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "notifyApiError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Shows toast for API errors with explicit handling of critical statuses.",
            "PRE": "error is an Error instance.",
            "POST": "User gets visible toast feedback for request failure."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "shouldSuppressApiErrorToast",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Avoid noisy toasts for expected non-critical API failures.",
            "PRE": "endpoint can be empty; error can be null.",
            "POST": "Returns true only for explicitly allowed suppressed scenarios."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getWsUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Returns the WebSocket URL for a specific task, with fallback logic.",
            "PRE": "taskId is provided.",
            "POST": "Returns valid WebSocket URL string.",
            "PARAM": "taskId (string) - The ID of the task.",
            "RETURN": "string - The WebSocket URL."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAuthHeaders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 123,
          "tags": {
            "PURPOSE": "Returns headers with Authorization if token exists."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchApi",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Generic GET request wrapper.",
            "PRE": "endpoint string is provided.",
            "POST": "Returns Promise resolving to JSON data or throws on error.",
            "PARAM": "endpoint (string) - API endpoint.",
            "RETURN": "Promise<any> - JSON response."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchApiBlob",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 151,
          "end_line": 179,
          "tags": {
            "PURPOSE": "Generic GET wrapper for binary payloads.",
            "PRE": "endpoint string is provided.",
            "POST": "Returns Blob or throws on error.",
            "TYPE": "{any} */ (error).status = 202;"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "postApi",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 181,
          "end_line": 208,
          "tags": {
            "PURPOSE": "Generic POST request wrapper.",
            "PRE": "endpoint and body are provided.",
            "POST": "Returns Promise resolving to JSON data or throws on error.",
            "PARAM": "body (object) - Request payload.",
            "RETURN": "Promise<any> - JSON response."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deleteApi",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 210,
          "end_line": 235,
          "tags": {
            "PURPOSE": "Generic DELETE request wrapper.",
            "PRE": "endpoint is provided.",
            "POST": "Returns Promise resolving to JSON data or throws on error.",
            "PARAM": "endpoint (string) - API endpoint.",
            "RETURN": "Promise<any> - JSON response."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "requestApi",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 237,
          "end_line": 271,
          "tags": {
            "PURPOSE": "Generic request wrapper.",
            "PRE": "endpoint and method are provided.",
            "POST": "Returns Promise resolving to JSON data or throws on error."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "api",
          "type": "Data",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 273,
          "end_line": 420,
          "tags": {
            "PURPOSE": "API client object with specific methods."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 422 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "Utils",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 14,
      "tags": {
        "COMPLEXITY": "1",
        "PURPOSE": "General utility functions (class merging)",
        "LAYER": "Infra",
        "PARAM": "{...(string | undefined | null | false)} inputs",
        "RETURNS": "{string}"
      },
      "relations": [],
      "children": [
        {
          "name": "cn",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 11,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "authStore",
      "type": "Store",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 102,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "auth, store, svelte, jwt, session",
        "PURPOSE": "Manages the global authentication state on the frontend.",
        "LAYER": "Feature"
      },
      "relations": [
        {
          "type": "MODIFIED_BY",
          "target": "AuthService"
        },
        {
          "type": "BINDS_TO",
          "target": "Navbar"
        }
      ],
      "children": [
        {
          "name": "AuthState",
          "type": "Interface",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Defines the structure of the authentication state."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createAuthStore",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Creates and configures the auth store with helper methods.",
            "PRE": "No preconditions - initialization function.",
            "POST": "Returns configured auth store with subscribe, setToken, setUser, logout, setLoading methods.",
            "RETURNS": "{Writable<AuthState>}"
          },
          "relations": [],
          "children": [
            {
              "name": "setToken",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 43,
              "end_line": 57,
              "tags": {
                "PURPOSE": "Updates the store with a new JWT token.",
                "PRE": "token must be a valid JWT string.",
                "POST": "Store updated with new token, isAuthenticated set to true.",
                "PARAM": "{string} token - The JWT access token."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "setUser",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 58,
              "end_line": 69,
              "tags": {
                "PURPOSE": "Sets the current user profile data.",
                "PRE": "User object must contain valid profile data.",
                "POST": "Store updated with user, isAuthenticated true, loading false.",
                "PARAM": "{any} user - The user profile object."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "logout",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 70,
              "end_line": 83,
              "tags": {
                "PURPOSE": "Clears authentication state and storage.",
                "PRE": "User is currently authenticated.",
                "POST": "Auth token removed from localStorage, store reset to initial state."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "setLoading",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 84,
              "end_line": 95,
              "tags": {
                "PURPOSE": "Updates the loading state.",
                "PRE": "None.",
                "POST": "Store loading state updated.",
                "PARAM": "{boolean} loading - Loading status."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: MODIFIED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "Permissions",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "auth, permissions, rbac, roles",
        "PURPOSE": "Shared frontend RBAC utilities for route guards and menu visibility.",
        "LAYER": "Domain",
        "INVARIANT": "Admin role always bypasses explicit permission checks."
      },
      "relations": [
        {
          "type": "USED_BY",
          "target": "frontend.src.components.auth.ProtectedRoute"
        },
        {
          "type": "USED_BY",
          "target": "Sidebar"
        }
      ],
      "children": [
        {
          "name": "normalizePermissionRequirement",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Convert permission requirement string to canonical resource/action tuple.",
            "PRE": "Permission can be \"resource\" or \"resource:ACTION\" where resource itself may contain \":\".",
            "POST": "Returns normalized object with action in uppercase."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isAdminUser",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Determine whether user has Admin role.",
            "PRE": "user can be null or partially populated.",
            "POST": "Returns true when at least one role name equals \"Admin\" (case-insensitive)."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasPermission",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Check if user has a required resource/action permission.",
            "PRE": "user contains roles with permissions from /api/auth/me payload.",
            "POST": "Returns true when requirement is empty, user is admin, or matching permission exists."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeAction",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:Permissions:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "PermissionsTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, auth, permissions, rbac",
        "PURPOSE": "Verifies frontend RBAC permission parsing and access checks.",
        "LAYER": "UI (Tests)"
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "Permissions"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:PermissionsTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "Debounce",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 25,
      "tags": {
        "COMPLEXITY": "1",
        "PURPOSE": "Debounce utility for limiting function execution rate",
        "LAYER": "Infra",
        "PARAM": "{number} wait - The delay in milliseconds",
        "RETURNS": "{Function} - The debounced function"
      },
      "relations": [],
      "children": [
        {
          "name": "debounce",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "health_store",
      "type": "Store",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 83,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "PURPOSE": "Manage dashboard health summary state and failing counts for UI badges.",
        "LAYER": "UI",
        "TYPEDEF": "{Object} HealthState",
        "PROPERTY": "{Date|null} lastUpdated - Last successful fetch timestamp",
        "PARAM": "{string|null} environmentId - Optional environment filter"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "api_module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.85
      }
    },
    {
      "name": "health",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 83,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/stores/health.js",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createHealthStore",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refresh",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "assistantChat",
      "type": "Store",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 121,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "assistant, store, ui-state, conversation",
        "PURPOSE": "Control assistant chat panel visibility and active conversation binding.",
        "LAYER": "UI",
        "INVARIANT": "conversationId persists while panel toggles unless explicitly reset.",
        "UX_STATE": "Open -> Panel visible and interactive."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "AssistantChatPanel"
        }
      ],
      "children": [
        {
          "name": "toggleAssistantChat",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Toggle assistant panel visibility.",
            "PRE": "Store is initialized.",
            "POST": "isOpen value inverted."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openAssistantChat",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Open assistant panel.",
            "PRE": "Store is initialized.",
            "POST": "isOpen = true."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openAssistantChatWithContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Open assistant panel with dataset review session context and optional seeded prompt/focus target.",
            "PRE": "Context payload may be partial.",
            "POST": "Assistant drawer opens with session binding and visible focus metadata."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "closeAssistantChat",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Close assistant panel.",
            "PRE": "Store is initialized.",
            "POST": "isOpen = false."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setAssistantConversationId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Bind current conversation id in UI state.",
            "PRE": "conversationId is string-like identifier.",
            "POST": "store.conversationId updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setAssistantDatasetReviewSessionId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Bind active dataset review session to assistant state.",
            "PRE": "session identifier may be null when workspace context is cleared.",
            "POST": "store.datasetReviewSessionId updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setAssistantSeedMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Stage a seeded assistant prompt for contextual send UX.",
            "PRE": "seedMessage can be empty to clear staged draft.",
            "POST": "store.seedMessage updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setAssistantFocusTarget",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 113,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Track the workspace entity currently referenced by assistant context.",
            "PRE": "focusTarget may be null to clear prior focus.",
            "POST": "store.focusTarget updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.85
      }
    },
    {
      "name": "taskDrawer",
      "type": "Store",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 165,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Manage Task Drawer visibility and resource-to-task mapping",
        "LAYER": "UI",
        "INVARIANT": "resourceTaskMap always reflects current task associations",
        "UX_STATE": "Closed -> Drawer hidden, no active task",
        "TEST_CONTRACT": "TaskDrawerStore ->",
        "TEST_FIXTURE": "valid_store_state -> {\"isOpen\": true, \"activeTaskId\": \"test_1\", \"resourceTaskMap\": {\"res1\": {\"taskId\": \"test_1\", \"status\": \"RUNNING\"}}}",
        "TEST_INVARIANT": "state_management -> verifies: [valid_store_state]",
        "PARAM": "{string} resourceId - Resource ID",
        "RETURNS": "{Object|null} Task info or null if no active task"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "taskDrawer",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 165,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/stores/taskDrawer.js",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "readAutoOpenTaskDrawerPreference",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openDrawerForTask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setTaskDrawerAutoOpenPreference",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTaskDrawerAutoOpenPreference",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openDrawerForTaskIfPreferred",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openDrawer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "closeDrawer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 122,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateResourceTask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 137,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTaskForResource",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 157,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "sidebar",
      "type": "Store",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 95,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Manage sidebar visibility and navigation state",
        "LAYER": "UI",
        "INVARIANT": "isExpanded state is always synced with localStorage",
        "UX_STATE": "Toggling -> Animation plays for 200ms",
        "PARAM": "{boolean} isOpen - Whether the mobile overlay should be open"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "sidebar",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 95,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/stores/sidebar.js",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "toggleSidebar",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setActiveItem",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setMobileOpen",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "closeMobile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toggleMobileSidebar",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "environmentContext",
      "type": "Store",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 144,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Global selected environment context for navigation and safety cues.",
        "LAYER": "UI-State"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "environmentContext",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 144,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/stores/environmentContext.js",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getStoredSelectedEnvId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "persistSelectedEnvId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasAuthToken",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveSelectedEnvId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applySelectedEnvId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refreshEnvironmentContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "initializeEnvironmentContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setSelectedEnvironment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 125,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "activity",
      "type": "Store",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 33,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Track active task count for navbar indicator",
        "LAYER": "UI",
        "UX_STATE": "Active -> Badge shows count of running tasks"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "taskDrawer"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.85
      }
    },
    {
      "name": "datasetReviewSession",
      "type": "Store",
      "complexity": 4,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 114,
      "tags": {
        "COMPLEXITY": "4",
        "PURPOSE": "Manage active dataset review session state, including loading, local edits, error capture, and reset semantics for the active review workspace.",
        "LAYER": "UI",
        "PRE": "Consumers provide session-shaped payloads when setting or patching state and initialize the store before reading derived session fields.",
        "POST": "Store transitions keep session, loading, error, and dirty flags internally consistent after each helper call.",
        "SIDE_EFFECT": "Mutates the writable dataset review session store in frontend memory.",
        "DATA_CONTRACT": "Input[SessionDetail | Partial<SessionDetail> | boolean | string | null] -> Output[DatasetReviewSessionStoreState]",
        "UX_STATE": "LaunchBlocked -> Session remains reviewable while explicit launch blockers are unresolved.",
        "UX_REACTIVITY": "Uses Svelte writable store for session aggregate.",
        "PARAM": "{Object|null} session",
        "RETURNS": "{\"empty\"|\"importing\"|\"review\"|\"partial_preview\"|\"launch_blocked\"|\"run_ready\"|\"run_in_progress\"}"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "api_module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9400000000000001
      }
    },
    {
      "name": "datasetReviewSession",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 114,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/stores/datasetReviewSession.js",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setLoading",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setDirty",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "patchSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSessionUiPhase",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "SidebarIntegrationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for sidebar store",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "frontend.src.lib.stores.sidebar"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:SidebarIntegrationTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "SidebarTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 2,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "sidebar, store, tests, mobile, navigation",
        "PURPOSE": "Unit tests for sidebar store",
        "LAYER": "Domain (Tests)",
        "INVARIANT": "Sidebar store transitions must be deterministic across desktop/mobile toggles."
      },
      "relations": [],
      "children": [
        {
          "name": "test_sidebar_initial_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Verify initial sidebar store values when no persisted state is available.",
            "TEST": "Store initializes with default values",
            "PRE": "No localStorage state",
            "POST": "Default state is { isExpanded: true, activeCategory: 'dashboards', activeItem: '/dashboards', isMobileOpen: false }"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_toggleSidebar",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Verify desktop sidebar expansion toggles deterministically.",
            "TEST": "toggleSidebar toggles isExpanded state",
            "PRE": "Store is initialized",
            "POST": "isExpanded is toggled from previous value"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_setActiveItem",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Default purpose",
            "TEST": "setActiveItem updates activeCategory and activeItem",
            "PRE": "Store is initialized",
            "POST": "activeCategory and activeItem are updated"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_mobile_functions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 131,
          "tags": {
            "PURPOSE": "Default purpose",
            "TEST": "Mobile functions correctly update isMobileOpen",
            "PRE": "Store is initialized",
            "POST": "isMobileOpen is correctly updated"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:SidebarTest:Module] started at line 2",
            "severity": "ERROR",
            "line_number": 2
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 2
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ActivityTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for activity store",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "frontend.src.lib.stores.activity"
        },
        {
          "type": "DEPENDS_ON",
          "target": "frontend.src.lib.stores.taskDrawer"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ActivityTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "setupTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 65,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "PURPOSE": "Global test setup with mocks for SvelteKit modules",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "TaskDrawerTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "task-drawer, store, mapping, tests",
        "PURPOSE": "Unit tests for task drawer store",
        "LAYER": "UI",
        "INVARIANT": "Store state transitions remain deterministic for open/close and task-status mapping."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "frontend.src.lib.stores.taskDrawer"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:TaskDrawerTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "DatasetReviewSessionStoreTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 113,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset-review, store, session, tests",
        "PURPOSE": "Unit tests for dataset review session store.",
        "LAYER": "UI",
        "UX_STATE": "Idle -> Store helpers are exercised without asynchronous UI transitions."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "datasetReviewSession:Store"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "AssistantChatTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 87,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "test, store, assistant, toggle, conversation",
        "PURPOSE": "Validate assistant chat store visibility and conversation binding transitions.",
        "LAYER": "UI Tests",
        "INVARIANT": "Each test starts from default closed state."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "assistantChatStore"
        }
      ],
      "children": [
        {
          "name": "assistantChatStore_tests",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 22,
          "end_line": 86,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Group store unit scenarios for assistant panel behavior.",
            "PRE": "Store can be reset to baseline state in beforeEach hook.",
            "POST": "Open/close/toggle/conversation transitions are validated."
          },
          "relations": [
            {
              "type": "USES",
              "target": "App"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 22
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 22
              }
            ],
            "score": 0.5499999999999999
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "navigation",
      "type": "Mock",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 15,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "mock, navigation, sveltekit-v1-legacy-surface",
        "PURPOSE": "Mock for $app/navigation in tests",
        "INVARIANT": "Includes SvelteKit v1-only APIs (push, prefetchRoutes) as compatibility surface for legacy test consumers; keep until all imports migrate to SvelteKit v2-compatible mocks."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "$app/navigation"
        },
        {
          "type": "BINDS_TO",
          "target": "FrontendStoreLegacyNavigationTests"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "stores",
      "type": "Mock",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 28,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "mock, stores, sveltekit-v1-legacy-surface",
        "PURPOSE": "Mock for $app/stores in tests",
        "INVARIANT": "Mocks $app/stores which is a SvelteKit v1 module; SvelteKit v2 uses $app/state. Verify no active test files import this mock before removal."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "$app/stores"
        },
        {
          "type": "BINDS_TO",
          "target": "FrontendStoreLegacyStateTests"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "state_mock",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 16,
      "tags": {
        "COMPLEXITY": "2",
        "PURPOSE": "Mock for AppState in vitest route/component tests.",
        "LAYER": "UI Tests"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "environment",
      "type": "Mock",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 8,
      "tags": {
        "PURPOSE": "Mock for $app/environment in tests"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "mock_env_public",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 7,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Mock for $env/static/public SvelteKit module in vitest",
        "LAYER": "UI (Tests)"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "ReportsApi",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "frontend, api_client, reports, wrapper",
        "PURPOSE": "Wrapper-based reports API client for list/detail retrieval without direct native fetch usage.",
        "LAYER": "Infra",
        "INVARIANT": "Uses existing api wrapper methods and returns structured errors for UI-state mapping."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "DEF:api_module"
        }
      ],
      "children": [
        {
          "name": "buildReportQueryString",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Build query string for reports list endpoint from filter options.",
            "PRE": "options is an object with optional report query fields.",
            "POST": "Returns URL query string without leading '?'."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeApiError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Convert unknown API exceptions into deterministic UI-consumable error objects.",
            "PRE": "error may be Error/string/object.",
            "POST": "Returns structured error object."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getReports",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Fetch unified report list using existing request wrapper.",
            "PRE": "valid auth context for protected endpoint.",
            "POST": "Returns parsed payload or structured error for UI-state mapping.",
            "TEST_CONTRACT": "GetReportsApi ->",
            "TEST_FIXTURE": "valid_get_reports -> {\"options\": {\"page\": 1}}",
            "TEST_EDGE": "api_fetch_failure -> api.fetchApi throws error",
            "TEST_INVARIANT": "error_normalization -> verifies: [api_fetch_failure]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getReportDetail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Fetch one report detail by report_id.",
            "PRE": "reportId is non-empty string; valid auth context.",
            "POST": "Returns parsed detail payload or structured error object."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ReportsApi:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "AssistantApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 102,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "assistant, api, client, chat, confirmation",
        "PURPOSE": "API client wrapper for assistant chat, session-scoped prompts, confirmation actions, and history retrieval.",
        "LAYER": "Infra-API",
        "INVARIANT": "All assistant requests must use requestApi wrapper (no native fetch)."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "api_module"
        }
      ],
      "children": [
        {
          "name": "sendAssistantMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Send a user message to assistant orchestrator endpoint.",
            "PRE": "payload.message is a non-empty string.",
            "POST": "Returns assistant response object with deterministic state."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildAssistantSeedMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Compose visible assistant seed text from context label and prompt body.",
            "PRE": "prompt contains the user-visible request.",
            "POST": "Returns trimmed seed message string for prefilled input."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "confirmAssistantOperation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Confirm a pending risky assistant operation.",
            "PRE": "confirmationId references an existing pending token.",
            "POST": "Returns execution response (started/success/failed)."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cancelAssistantOperation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Cancel a pending risky assistant operation.",
            "PRE": "confirmationId references an existing pending token.",
            "POST": "Operation is cancelled and cannot be executed by this token."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAssistantHistory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Retrieve paginated assistant conversation history.",
            "PRE": "page/pageSize are positive integers.",
            "POST": "Returns a paginated payload with history items."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAssistantConversations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Retrieve paginated conversation list for assistant sidebar/history switcher.",
            "PRE": "page/pageSize are positive integers.",
            "POST": "Returns paginated conversation summaries."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deleteAssistantConversation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Soft-delete or hard-delete a conversation.",
            "PRE": "conversationId string is provided.",
            "POST": "Returns success status."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "DatasetReviewApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 132,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset-review, api, session-version, headers, conflict-handling",
        "PURPOSE": "Provide shared frontend helpers for dataset review session-scoped API requests, optimistic-lock propagation, and refreshed session DTO normalization.",
        "LAYER": "Infra-API"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "api_module"
        }
      ],
      "children": [
        {
          "name": "buildDatasetReviewRequestOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Attach optimistic-lock session version header when the current version is known.",
            "PRE": "sessionVersion may be null when no loaded session version exists yet.",
            "POST": "Returns requestApi-compatible options object."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "requestDatasetReviewApi",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Proxy dataset review mutations through requestApi with optional optimistic-lock headers.",
            "PRE": "endpoint and method are valid requestApi inputs.",
            "POST": "Executes requestApi with X-Session-Version only when a session version is known."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isDatasetReviewConflictError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Detect optimistic-lock conflicts from dataset review mutations.",
            "PRE": "error may be null or a normalized API error.",
            "POST": "Returns true when the mutation failed with 409 conflict semantics."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getDatasetReviewConflictMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Return explicit 409-style guidance for stale dataset review mutations.",
            "PRE": "error may be null or a normalized API error.",
            "POST": "Returns a user-facing conflict message string."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractDatasetReviewVersion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Resolve the latest session version from refreshed DTO fragments.",
            "PRE": "payload may be a session summary, a detail payload, or a mutation fragment.",
            "POST": "Returns the newest known session version or null."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeDatasetReviewDetail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Normalize refreshed session-detail DTOs into the legacy route-friendly workspace shape.",
            "PRE": "detail may already be legacy-flat or refreshed with nested session/session_version fields.",
            "POST": "Returns a shape with flattened summary fields plus refreshed collections and version metadata."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "ReportsApiTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, reports, api-client, query-string, error-normalization",
        "PURPOSE": "Unit tests for reports API client functions: query string building, error normalization, and fetch wrappers.",
        "LAYER": "Infra (Tests)",
        "INVARIANT": "Pure functions produce deterministic output. Async wrappers propagate structured errors."
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "frontend.src.lib.api.reports"
        }
      ],
      "children": [
        {
          "name": "TestBuildReportQueryString",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Validate query string construction from filter options.",
            "PRE": "Options object with various filter fields.",
            "POST": "Correct URLSearchParams string produced."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TestNormalizeApiError",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Validate error normalization for UI-state mapping.",
            "PRE": "Various error types (Error, string, object).",
            "POST": "Always returns {message, code, retryable} object."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TestGetReportsAsync",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 132,
          "end_line": 211,
          "tags": {
            "PURPOSE": "Validate getReports and getReportDetail with mocked api.fetchApi.",
            "PRE": "api.fetchApi is mocked via vi.mock.",
            "POST": "Functions call correct endpoints and propagate results/errors."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ReportsApiTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "Select",
      "type": "Component",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 57,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "select, dropdown, form-field, ui-atom",
        "PURPOSE": "Standardized dropdown selection component.",
        "LAYER": "Atom",
        "UX_STATE": "Disabled -> Native disabled state prevents selection changes."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "Utils"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 15
        },
        {
          "store": "bindable",
          "type": "WRITES_TO",
          "line": 21
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 26
        }
      ]
    },
    {
      "name": "Icon",
      "type": "Component",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 101,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "icon, ui-atom, svg",
        "PURPOSE": "Render the shared inline SVG icon set with consistent sizing and stroke props.",
        "LAYER": "Atom",
        "UX_STATE": "Fallback -> Unknown icon names resolve to the dashboard glyph.",
        "INVARIANT": "Icon output remains aria-hidden because labels belong to the interactive parent."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 19
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 81
        }
      ]
    },
    {
      "name": "ui",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 19,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "ui, components, library, atomic-design",
        "PURPOSE": "Central export point for standardized UI components.",
        "LAYER": "Atom",
        "INVARIANT": "All components exported here must follow Semantic Protocol."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "PageHeader",
      "type": "Component",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 44,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "page-header, layout-atom",
        "PURPOSE": "Standardized page header with title and action area.",
        "LAYER": "Atom",
        "UX_STATE": "WithContext -> Subtitle and action slots expand the header composition."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "Utils"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 15
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 25
        }
      ]
    },
    {
      "name": "Card",
      "type": "Component",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 55,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "card, container, ui-atom",
        "PURPOSE": "Standardized container with padding and elevation.",
        "LAYER": "Atom",
        "UX_STATE": "Titled -> Header row appears above the padded content area."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "Utils"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 15
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 25
        }
      ]
    },
    {
      "name": "Button",
      "type": "Component",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 72,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "button, ui-atom, interactive",
        "PURPOSE": "Define component interface and default values (Svelte 5 Runes).",
        "LAYER": "Atom",
        "UX_STATE": "Loading -> Spinner replaces the leading area and interaction is disabled.",
        "INVARIANT": "Supports accessible labels and keyboard navigation.",
        "TYPE": "{'button' | 'submit' | 'reset'} */ ('button'),"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "Utils"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 35
        }
      ]
    },
    {
      "name": "Input",
      "type": "Component",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 65,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "input, form-field, ui-atom",
        "PURPOSE": "Standardized text input component with label and error handling.",
        "LAYER": "Atom",
        "UX_STATE": "Disabled -> Native disabled state prevents editing while preserving value visibility.",
        "INVARIANT": "Consistent spacing and focus states."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "Utils"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "bindable",
          "type": "WRITES_TO",
          "line": 24
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 31
        }
      ]
    },
    {
      "name": "LanguageSwitcher",
      "type": "Component",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 32,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "language-switcher, i18n-ui, ui-atom",
        "PURPOSE": "Dropdown component to switch between supported languages.",
        "LAYER": "Atom",
        "UX_STATE": "Switching -> Bound locale updates immediately after selection."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "i18n.locale"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Select"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 16
        },
        {
          "store": "locale",
          "type": "WRITES_TO",
          "line": 28
        }
      ]
    },
    {
      "name": "i18n",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 83,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "i18n, localization, svelte-store, translation",
        "PURPOSE": "Determines the starting locale.",
        "LAYER": "Infra",
        "INVARIANT": "Persistence is handled via LocalStorage.",
        "RETURNS": "{Locale}"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "i18n_ru_locale"
        },
        {
          "type": "DEPENDS_ON",
          "target": "i18n_en_locale"
        }
      ],
      "children": [
        {
          "name": "locale",
          "type": "Store",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Holds the current active locale string.",
            "SIDE_EFFECT": "Writes to LocalStorage on change."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "t",
          "type": "Store",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Derived store providing the translation dictionary.",
            "RELATION": "BINDS_TO -> locale"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Get translation by key path.",
            "PARAM": "key - Translation key path (e.g., 'nav.dashboard')",
            "RETURNS": "Translation string or key if not found"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "AssistantClarificationCard",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 408,
      "tags": {
        "COMPLEXITY": "4 -->",
        "SEMANTICS": "assistant, clarification, dataset-review, mixed-initiative, resumable -->",
        "PURPOSE": "Render the active dataset-review clarification queue inside AssistantChatPanel so users can answer, skip, defer, and resume questions without leaving the assistant workspace. -->",
        "LAYER": "UI -->",
        "PRE": "sessionId belongs to the current dataset review workspace and the assistant drawer is open for session-scoped work. -->",
        "POST": "Clarification queue state is readable in-chat and answer mutations refresh the active question state without requiring a dedicated dialog. -->",
        "SIDE_EFFECT": "Reads and mutates clarification state through dataset orchestration APIs. -->",
        "DATA_CONTRACT": "Input[{sessionId, disabled}] -> Output[{clarification_state|clarification_session|current_question|session}] via onupdated callback. -->",
        "UX_STATE": "Completed -> No active question remains and resume plus feedback actions stay available. -->",
        "UX_FEEDBACK": "Save, skip, resume, and feedback results surface inline without hiding the queue context. -->",
        "UX_RECOVERY": "Users can resume the queue, provide a custom answer, or mark the item for expert review from the same assistant surface. -->",
        "UX_REACTIVITY": "Uses $props, $state, $derived, and $effect only; no legacy reactive syntax. -->"
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "api_module"
        },
        {
          "type": "BINDS_TO",
          "target": "AssistantChatPanel"
        },
        {
          "type": "BINDS_TO",
          "target": "DatasetReviewWorkspace"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "state",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "derived",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 20
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 21
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 29
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 31
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 32
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 37
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 38
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 39
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 40
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 41
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 42
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 43
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 45
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 46
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 47
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 48
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 51
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 56
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 86
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 86
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 126
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 131
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 157
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 159
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 160
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 164
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 164
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 185
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 189
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 189
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 213
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 214
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 217
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 217
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 223
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 239
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 264
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 269
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 278
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 286
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 292
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 300
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 303
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 308
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 334
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 346
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 357
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 360
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 363
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 366
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 372
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 375
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 384
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 387
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 391
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 394
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 402
        }
      ]
    },
    {
      "name": "AssistantClarificationCard",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 408,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/assistant/AssistantClarificationCard.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "loadClarificationState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeAnswerValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateClarificationState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "submitAnswer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resumeClarification",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 170,
          "end_line": 170,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "recordClarificationFeedback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 195,
          "end_line": 195,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 408 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "AssistantChatPanel",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 956,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Assistant chat workspace for mixed-initiative dataset review clarification, contextual actions, and task tracking.",
        "LAYER": "UI",
        "SEMANTICS": "assistant-chat, confirmation, long-running-task, progress-tracking",
        "INVARIANT": "Risky operations are executed only through explicit confirm action.",
        "UX_STATE": "Error -> Failed action rendered as assistant failed message.",
        "UX_FEEDBACK": "Started operation surfaces task_id and quick action to open task drawer.",
        "UX_RECOVERY": "User can retry command or action from input and action buttons."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "assistantChat"
        },
        {
          "type": "CALLS",
          "target": "AssistantApi"
        },
        {
          "type": "BINDS_TO",
          "target": "DatasetReviewWorkspace"
        },
        {
          "type": "DISPATCHES",
          "target": "taskDrawer"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 25
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 27
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 28
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 29
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 30
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 31
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 32
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 39
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 47
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 48
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 50
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 52
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 57
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 58
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 59
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 60
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 61
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 62
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 63
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 64
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 65
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 66
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 67
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 68
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 69
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 70
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 71
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 72
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 73
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 75
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 76
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 77
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 80
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 81
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 82
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 85
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 86
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 87
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 88
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 220
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 228
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 237
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 282
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 283
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 332
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 435
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 497
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 500
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 505
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 506
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 509
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 548
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 600
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 624
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 630
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 636
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 645
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 651
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 653
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 668
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 677
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 689
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 694
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 704
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 711
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 729
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 735
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 745
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 753
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 786
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 799
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 805
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 810
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 813
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 814
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 815
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 832
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 832
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 836
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 849
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 856
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 860
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 861
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 865
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 882
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 888
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 918
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 922
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 937
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 948
        }
      ]
    },
    {
      "name": "AssistantChatPanel",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 994,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/assistant/AssistantChatPanel.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "loadHistory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadConversations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "removeConversation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 160,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadOlderMessages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 182,
          "end_line": 182,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "appendLocalUserMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 248,
          "end_line": 248,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "appendAssistantResponse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 262,
          "end_line": 262,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildConversationTitle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 280,
          "end_line": 280,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setConversationFilter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 286,
          "end_line": 286,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatConversationTime",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 296,
          "end_line": 296,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSend",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 303,
          "end_line": 303,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "selectConversation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 345,
          "end_line": 345,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "startNewConversation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 357,
          "end_line": 357,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleAction",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 371,
          "end_line": 371,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleKeydown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 443,
          "end_line": 443,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stateClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 451,
          "end_line": 451,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleHistoryScroll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 461,
          "end_line": 461,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadLlmStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 474,
          "end_line": 474,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearFocusTarget",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 487,
          "end_line": 487,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildContextSummary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 491,
          "end_line": 491,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isConfirmationCard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 513,
          "end_line": 513,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getMessageFocusTarget",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 517,
          "end_line": 517,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "syncMessageFocus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 537,
          "end_line": 537,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "renderConfirmationScope",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 545,
          "end_line": 545,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasConfirmationScope",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 559,
          "end_line": 559,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dismissClarificationBanner",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 563,
          "end_line": 563,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resumeClarificationFromBanner",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 567,
          "end_line": 567,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refreshDatasetReviewSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 575,
          "end_line": 575,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleClarificationUpdated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 588,
          "end_line": 588,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 994 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "AssistantFirstMessageIntegrationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 241,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "assistant, integration-test, optimistic-message, conversation-race",
        "PURPOSE": "Verify first optimistic user message stays visible while a new conversation request is pending.",
        "LAYER": "UI Tests",
        "INVARIANT": "Starting a new conversation must not trigger history reload that overwrites the first local user message."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "AssistantChatPanel"
        }
      ],
      "children": [
        {
          "name": "assistant_first_message_tests",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 149,
          "end_line": 240,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Guard optimistic first-message UX against history reload race in new conversation flow.",
            "PRE": "Assistant panel renders with open state and mocked network dependencies.",
            "POST": "First user message remains visible before pending send request resolves."
          },
          "relations": [
            {
              "type": "USES",
              "target": "App"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 149
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 149
              }
            ],
            "score": 0.5499999999999999
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "AssistantChatIntegrationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 103,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "assistant, integration-test, ux-contract, i18n",
        "PURPOSE": "Contract-level integration checks for assistant chat panel implementation and localization wiring.",
        "LAYER": "UI Tests",
        "INVARIANT": "Critical assistant UX states and action hooks remain present in component source.",
        "TEST_CONTRACT": "AssistantChatSourceArtifacts -> ContractAssertions",
        "TEST_SCENARIO": "assistant_contract_and_i18n_intact -> Component semantic/UX anchors and locale keys stay consistent.",
        "TEST_FIXTURE": "assistant_locales_en_ru -> file:src/lib/i18n/locales/en.json + file:src/lib/i18n/locales/ru.json",
        "TEST_EDGE": "missing_locale_key -> Missing assistant locale key in en/ru fails dictionary assertion.",
        "TEST_INVARIANT": "assistant_ux_contract_visible -> VERIFIED_BY: [assistant_contract_and_i18n_intact]"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "AssistantChatPanel"
        }
      ],
      "children": [
        {
          "name": "readJson",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Read and parse JSON fixture file from disk.",
            "PRE": "filePath points to existing UTF-8 JSON file.",
            "POST": "Returns parsed object representation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "assistant_chat_contract_tests",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Validate assistant chat component contract and locale integration without DOM runtime dependency.",
            "PRE": "Component and locale files exist in expected paths.",
            "POST": "Contract checks guarantee assistant UI anchors and i18n wiring remain intact.",
            "COMPLEXITY": "5');",
            "UX_STATE": "Error');",
            "UX_FEEDBACK": "Started operation surfaces task_id');",
            "UX_RECOVERY": "User can retry command');"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "AssistantClarificationIntegrationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 208,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "assistant, clarification, integration-test, dataset-review, mixed-initiative",
        "PURPOSE": "Verify AssistantChatPanel hosts the resumable dataset-review clarification flow inside the assistant drawer and refreshes workspace session state after answering.",
        "LAYER": "UI Tests"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "AssistantChatPanel"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "HealthMatrix",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 83,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Visual grid summary representing dashboard health status counts.",
        "LAYER": "UI",
        "UX_STATE": "Error -> Displays an error message with a retry option.",
        "UX_REACTIVITY": "Uses $derived to keep aggregate totals consistent with the count props.",
        "TYPE": "{{"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "i18n"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "derived",
          "type": "READS_FROM",
          "line": 11
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 14
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 31
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 46
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 53
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 58
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 63
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 68
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 74
        }
      ]
    },
    {
      "name": "PolicyForm",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 198,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Form for creating and editing validation policies.",
        "LAYER": "UI",
        "UX_STATE": "Submitting -> Disables inputs and shows a loading state.",
        "UX_FEEDBACK": "Error -> Invalid field or submit failures keep the draft visible for correction.",
        "UX_REACTIVITY": "Uses $state for mutable form data and $derived values for window health checks.",
        "TYPE": "{{ policy: any, environments: any[], onSave: (p: any) => void, onCancel: () => void }} */"
      },
      "relations": [
        {
          "type": "DISPATCHES",
          "target": "onSave"
        },
        {
          "type": "DISPATCHES",
          "target": "onCancel"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "state",
          "type": "READS_FROM",
          "line": 13
        },
        {
          "store": "derived",
          "type": "READS_FROM",
          "line": 13
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 17
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 40
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 41
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 43
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 63
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 72
        }
      ]
    },
    {
      "name": "PolicyForm",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 198,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/health/PolicyForm.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getSafePolicy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSafeEnvironments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildFormData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSubmit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toggleDay",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ReportCard",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 101,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "reports, card, type-profile, accessibility, fallback",
        "PURPOSE": "Render one report with explicit textual type label and profile-driven visual variant.",
        "LAYER": "UI",
        "INVARIANT": "Unknown task type always uses fallback profile.",
        "UX_STATE": "Ready -> Card displays summary/status/type.",
        "UX_RECOVERY": "Missing fields are rendered with explicit placeholder text.",
        "TEST_CONTRACT": "Component_ReportCard ->",
        "TEST_FIXTURE": "valid_report_card -> {\"report\": {\"task_type\": \"migration\", \"status\": \"success\", \"summary\": \"Test\", \"updated_at\": \"2024-01-01\"}}",
        "TEST_EDGE": "random_status -> {\"report\": {\"status\": \"unknown_status_code\"}}",
        "TEST_INVARIANT": "render_resilience -> verifies: [valid_report_card, empty_report_object, random_status]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "reportTypeProfiles"
        },
        {
          "type": "DEPENDS_ON",
          "target": "i18n"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 31
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 37
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 54
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 55
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 56
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 57
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 58
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 62
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 64
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 78
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 78
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 78
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 85
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 96
        }
      ]
    },
    {
      "name": "ReportCard",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 101,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/reports/ReportCard.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getStatusClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getStatusLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatDate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "onSelect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ReportsList",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 50,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "reports, list, card, unified, mixed-types",
        "PURPOSE": "Render unified list of normalized reports with canonical minimum fields.",
        "LAYER": "UI",
        "INVARIANT": "Every rendered row shows task_type label, status, summary, and updated_at.",
        "UX_STATE": "Ready -> Mixed-type list visible and scannable.",
        "UX_FEEDBACK": "Click on report emits select event.",
        "UX_RECOVERY": "Unknown/missing values rendered with explicit placeholders.",
        "TEST_CONTRACT": "Component_ReportsList ->",
        "TEST_FIXTURE": "renders_list -> {\"reports\": [{\"report_id\": \"1\", \"task_type\": \"migration\", \"status\": \"success\"}, {\"report_id\": \"2\", \"task_type\": \"backup\", \"status\": \"failed\"}], \"selectedReportId\": \"2\"}",
        "TEST_EDGE": "empty_list -> {\"reports\": []}",
        "TEST_INVARIANT": "correct_iteration -> verifies: [renders_list, empty_list]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "i18n"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 32
        }
      ]
    },
    {
      "name": "ReportsList",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 50,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/reports/ReportsList.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handleSelect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ReportTypeProfiles",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "reports, ui, profiles, fallback, mapping",
        "PURPOSE": "Deterministic mapping from report task_type to visual profile with one fallback.",
        "LAYER": "UI",
        "INVARIANT": "Unknown type always resolves to fallback profile."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "i18n"
        }
      ],
      "children": [
        {
          "name": "getReportTypeProfile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Resolve visual profile by task type with guaranteed fallback.",
            "PRE": "taskType may be known/unknown/empty.",
            "POST": "Returns one profile object.",
            "TEST_CONTRACT": "GetReportTypeProfileModel ->",
            "TEST_FIXTURE": "valid_type -> {\"taskType\": \"migration\"}",
            "TEST_EDGE": "invalid_type -> {\"taskType\": \"invalid\"}",
            "TEST_INVARIANT": "fallbacks_to_unknown -> verifies: [invalid_type]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ReportTypeProfiles:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ReportDetailPanel",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 107,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "reports, detail, diagnostics, next-actions, placeholders",
        "PURPOSE": "Display detailed report context with diagnostics and actionable recovery guidance.",
        "LAYER": "UI",
        "INVARIANT": "Failed/partial reports surface actionable hints when available.",
        "UX_STATE": "Ready -> Report detail content visible.",
        "UX_RECOVERY": "Failed/partial report shows next actions and placeholder-safe diagnostics.",
        "TEST_CONTRACT": "Component_ReportDetailPanel ->",
        "TEST_FIXTURE": "valid_detail -> {\"detail\": {\"report\": {\"report_id\": \"1\", \"task_type\": \"migration\", \"status\": \"success\", \"summary\": \"Done\"}, \"diagnostics\": {\"time\": 123}, \"next_actions\": []}}",
        "TEST_EDGE": "detail_with_error_context -> {\"detail\": {\"report\": {\"error_context\": {\"next_actions\": [\"Retry\"]}}}}",
        "TEST_INVARIANT": "render_resilience -> verifies: [valid_detail, no_detail_prop, detail_with_error_context]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "i18n"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 30
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 32
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 36
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 42
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 44
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 51
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 55
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 59
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 63
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 67
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 71
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 75
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 82
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 86
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 95
        }
      ]
    },
    {
      "name": "ReportDetailPanel",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 107,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/reports/ReportDetailPanel.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "notProvided",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatDate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ReportsFilterPerformanceTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, reports, performance, filtering",
        "PURPOSE": "Guard test for report filter responsiveness on moderate in-memory dataset.",
        "LAYER": "UI (Tests)"
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "frontend/src/routes/reports/+page.svelte"
        }
      ],
      "children": [
        {
          "name": "applyFilters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 10,
          "end_line": 10,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "makeDataset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ReportsFilterPerformanceTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ReportsPageTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, reports, integration, mixed-types, rendering",
        "PURPOSE": "Integration-style checks for unified mixed-type reports rendering expectations.",
        "LAYER": "UI (Tests)",
        "INVARIANT": "Mixed fixture includes all supported report types in one list."
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "frontend/src/routes/reports/+page.svelte"
        },
        {
          "type": "TESTS",
          "target": "frontend/src/lib/components/reports/ReportsList.svelte"
        }
      ],
      "children": [
        {
          "name": "collectVisibleTypeLabels",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ReportsPageTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ReportTypeProfilesTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, reports, type-profiles, fallback",
        "PURPOSE": "Validate report type profile mapping and unknown fallback behavior.",
        "LAYER": "UI (Tests)",
        "INVARIANT": "Unknown task_type always resolves to the fallback profile."
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "ReportTypeProfiles"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ReportTypeProfilesTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ReportsListTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 4,
      "end_line": 80,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "reports, list, ux-tests, events, iteration",
        "PURPOSE": "Test ReportsList component iteration and event forwarding.",
        "LAYER": "UI",
        "TEST_CONTRACT": "Component_ReportsList -> Forwards select events from children.",
        "TEST_SCENARIO": "forwards_select_event -> Child click forwards select payload to parent listener.",
        "TEST_FIXTURE": "renders_list -> INLINE_JSON",
        "TEST_INVARIANT": "correct_iteration -> VERIFIED_BY: [renders_report_cards_for_each_item, renders_empty_list_container]",
        "TEST_EDGE": "empty_list -> Empty reports array keeps container stable.",
        "UX_FEEDBACK": "Click on report emits select event."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "ReportsList"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "ReportCardTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 4,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "reports, ux-tests, card, states, recovery",
        "PURPOSE": "Test UX states and transitions for ReportCard component",
        "LAYER": "UI",
        "INVARIANT": "Each test asserts at least one observable UX contract outcome.",
        "TEST_CONTRACT": "ReportCardInputProps -> ObservableUXOutput",
        "TEST_SCENARIO": "ready_state_shows_summary_status_type -> Ready state renders summary/status/type labels.",
        "TEST_FIXTURE": "valid_report_card -> INLINE_JSON",
        "TEST_EDGE": "missing_optional_fields -> Partial report keeps component interactive and emits select.",
        "TEST_INVARIANT": "report_card_state_is_observable -> VERIFIED_BY: [ready_state_shows_summary_status_type, empty_report_object, random_status]",
        "UX_STATE": "Ready -> Card displays summary/status/type.",
        "UX_FEEDBACK": "Click on report emits select event.",
        "UX_RECOVERY": "Missing fields are rendered with explicit placeholder text."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "../ReportCard.svelte"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ReportCardTest:Module] started at line 4",
            "severity": "ERROR",
            "line_number": 4
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 4
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ReportDetailUxTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 4,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "reports, ux-tests, detail, diagnostics, recovery",
        "PURPOSE": "Test UX states and recovery for ReportDetailPanel component",
        "LAYER": "UI",
        "INVARIANT": "Detail UX tests keep placeholder-safe rendering and recovery visibility verifiable.",
        "UX_STATE": "Ready -> Report detail content visible.",
        "UX_RECOVERY": "Failed/partial report shows next actions and placeholder-safe diagnostics."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "../ReportDetailPanel.svelte"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ReportDetailUxTest:Module] started at line 4",
            "severity": "ERROR",
            "line_number": 4
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 4
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ReportDetailIntegrationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, reports, detail, recovery-guidance, integration",
        "PURPOSE": "Validate detail-panel behavior for failed reports and recovery guidance visibility.",
        "LAYER": "UI (Tests)",
        "INVARIANT": "Failed report detail exposes actionable next actions when available."
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "frontend/src/lib/components/reports/ReportDetailPanel.svelte"
        },
        {
          "type": "TESTS",
          "target": "frontend/src/routes/reports/+page.svelte"
        }
      ],
      "children": [
        {
          "name": "buildFailedDetailFixture",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ReportDetailIntegrationTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ReportsFixtures",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "reports, fixtures, test-data",
        "PURPOSE": "Shared frontend fixtures for unified reports states.",
        "LAYER": "UI"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ReportsFixtures:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "SemanticLayerReview",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 676,
      "tags": {
        "COMPLEXITY": "4 -->",
        "SEMANTICS": "dataset-review, semantic-layer, candidate-review, manual-override, field-lock -->",
        "PURPOSE": "Surface field-level semantic decisions with provenance, confidence, candidate acceptance, and manual override safeguards for US2 review flow. -->",
        "LAYER": "UI -->",
        "PRE": "Session id is available and semantic field entries come from the current ownership-scoped session detail payload. -->",
        "POST": "Users can review the current semantic value, accept a candidate, apply manual override, and lock or unlock field state without violating backend provenance rules. -->",
        "SIDE_EFFECT": "Persists semantic field decisions, lock state, and optional thumbs feedback through dataset orchestration endpoints. -->",
        "DATA_CONTRACT": "Input -> Dataset review session detail { sessionId, fields[], semanticSources[] }; Output -> onupdated(updatedField | { fields: updatedFields }) refresh payload. -->",
        "UX_STATE": "Manual -> One field enters local draft mode and persists as locked manual override on save. -->",
        "UX_FEEDBACK": "Save, lock, unlock, and feedback actions expose inline success or error state on the affected field. -->",
        "UX_RECOVERY": "Users can cancel local edits, unlock a manual override for re-review, or retry failed mutations in place. -->",
        "UX_REACTIVITY": "Uses $props, $state, and $derived only; no legacy reactive syntax. -->"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "api_module"
        },
        {
          "type": "BINDS_TO",
          "target": "DatasetReviewWorkspace"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "READS_FROM",
          "line": 16
        },
        {
          "store": "state",
          "type": "READS_FROM",
          "line": 16
        },
        {
          "store": "derived",
          "type": "READS_FROM",
          "line": 16
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 30
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 32
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 37
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 38
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 40
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 52
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 53
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 99
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 106
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 111
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 116
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 118
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 123
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 147
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 161
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 162
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 193
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 220
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 221
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 232
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 233
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 268
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 269
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 297
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 298
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 305
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 306
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 347
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 350
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 353
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 360
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 374
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 381
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 423
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 424
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 428
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 433
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 440
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 447
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 451
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 456
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 460
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 469
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 480
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 491
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 507
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 515
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 524
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 533
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 544
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 550
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 560
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 565
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 578
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 586
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 607
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 620
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 628
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 636
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 646
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 647
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 657
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 665
        }
      ]
    },
    {
      "name": "SemanticLayerReview",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 676,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/dataset-review/SemanticLayerReview.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "updateFieldMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetFieldMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "startManualEdit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cancelManualEdit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSourceLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCandidateStatusLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getProvenanceLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getConfidenceLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCurrentValueSummary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "persistFieldSemantic",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "acceptCandidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "saveManualOverride",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 180,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mutateLock",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 201,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "approveAllCandidates",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 240,
          "end_line": 240,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "recordFeedback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 278,
          "end_line": 278,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isFieldFocused",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 313,
          "end_line": 313,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "askAiAboutField",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 318,
          "end_line": 318,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "improveFieldDraft",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 331,
          "end_line": 331,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 676 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "SourceIntakePanel",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 348,
      "tags": {
        "COMPLEXITY": "3 -->",
        "SEMANTICS": "dataset-review, intake, superset-link, dataset-selection, validation -->",
        "PURPOSE": "Collect initial dataset source input through Superset link paste or dataset selection entry paths. -->",
        "LAYER": "UI -->",
        "UX_STATE": "Rejected -> Input error shown with corrective hint. -->",
        "UX_FEEDBACK": "Recognized links are acknowledged before deeper recovery finishes. -->",
        "UX_RECOVERY": "Users can correct invalid input in place without resetting the page. -->",
        "UX_REACTIVITY": "Uses $props, $state, and $derived only; no legacy reactive syntax. -->"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "api_module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "READS_FROM",
          "line": 12
        },
        {
          "store": "state",
          "type": "READS_FROM",
          "line": 12
        },
        {
          "store": "derived",
          "type": "READS_FROM",
          "line": 12
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 14
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 24
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 26
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 27
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 28
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 29
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 30
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 31
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 41
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 48
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 51
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 61
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 84
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 89
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 90
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 100
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 101
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 106
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 107
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 112
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 117
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 118
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 122
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 147
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 148
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 185
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 188
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 191
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 205
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 207
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 209
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 225
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 228
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 242
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 245
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 258
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 265
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 275
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 276
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 287
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 299
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 322
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 324
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 337
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 339
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 341
        }
      ]
    },
    {
      "name": "SourceIntakePanel",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 348,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/dataset-review/SourceIntakePanel.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setMode",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getInlineHint",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validatePayload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 110,
          "end_line": 110,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "submitPayload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 152,
          "end_line": 152,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "submitSupersetLink",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "submitDatasetSelection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSubmit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 171,
          "end_line": 171,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 348 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "CompiledSQLPreview",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 328,
      "tags": {
        "COMPLEXITY": "4 -->",
        "SEMANTICS": "dataset-review, compiled-sql-preview, superset-preview, stale-state, diagnostics -->",
        "PURPOSE": "Present the exact Superset-generated compiled SQL preview, expose readiness or staleness clearly, and preserve readable recovery paths when preview generation fails. -->",
        "LAYER": "UI -->",
        "PRE": "Session id is available and preview state comes from the current ownership-scoped session detail payload. -->",
        "POST": "Users can distinguish missing, pending, ready, stale, and error preview states and can trigger only Superset-backed preview generation. -->",
        "SIDE_EFFECT": "Requests preview generation through dataset orchestration APIs and updates route shell preview state when Superset responds. -->",
        "DATA_CONTRACT": "Input -> Dataset review preview payload { sessionId, preview, previewState }; Output -> onupdated({ preview, preview_state }) route-shell refresh payload and onjump({ target }) recovery navigation signal. -->",
        "UX_STATE": "Error -> Show readable Superset compilation diagnostics and preserve remediation action. -->",
        "UX_FEEDBACK": "Preview refresh updates status pill, timestamps, and inline generation feedback. -->",
        "UX_RECOVERY": "Users can retry preview generation and jump back to mapping review when diagnostics point to execution-input issues. -->",
        "UX_REACTIVITY": "Uses $props, $state, and $derived only; no legacy reactive syntax. -->"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "api_module"
        },
        {
          "type": "BINDS_TO",
          "target": "DatasetReviewWorkspace"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "state",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "derived",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 21
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 22
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 37
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 38
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 42
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 43
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 44
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 45
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 46
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 69
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 90
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 92
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 97
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 100
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 103
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 106
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 108
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 115
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 116
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 129
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 152
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 160
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 161
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 187
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 190
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 193
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 199
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 208
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 209
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 217
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 257
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 260
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 264
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 274
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 277
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 286
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 297
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 310
        }
      ]
    },
    {
      "name": "CompiledSQLPreview",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 328,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/dataset-review/CompiledSQLPreview.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "resolvePreviewState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getStateLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getStateTone",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCompilerLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 88,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getPreviewBodyText",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildPreviewTechnicalDetails",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "requestPreview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "jumpToMapping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "askAiAboutPreview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 328 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "ValidationFindingsPanel",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 461,
      "tags": {
        "COMPLEXITY": "3 -->",
        "SEMANTICS": "dataset-review, findings, severity, readiness, actionability -->",
        "PURPOSE": "Present validation findings grouped by severity with explicit resolution and actionability signals. -->",
        "LAYER": "UI -->",
        "UX_STATE": "Informational -> Low-priority findings are collapsed or secondary. -->",
        "UX_FEEDBACK": "Resolving or approving an item updates readiness state immediately. -->",
        "UX_RECOVERY": "Users can jump from a finding directly to the relevant remediation area. -->",
        "UX_REACTIVITY": "Uses $props and $derived only; no legacy reactive syntax. -->"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "DatasetReviewWorkspace"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "READS_FROM",
          "line": 12
        },
        {
          "store": "derived",
          "type": "READS_FROM",
          "line": 12
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 15
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 23
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 25
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 26
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 27
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 28
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 29
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 32
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 81
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 86
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 91
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 140
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 142
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 150
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 153
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 156
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 162
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 178
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 185
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 194
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 227
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 233
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 250
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 257
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 264
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 277
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 286
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 319
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 325
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 342
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 349
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 356
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 369
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 378
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 411
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 417
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 434
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 441
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 448
        }
      ]
    },
    {
      "name": "ValidationFindingsPanel",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 461,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/dataset-review/ValidationFindingsPanel.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "groupFindingsBySeverity",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildTargetFromFinding",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "jumpToFindingTarget",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getResolutionLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getAreaLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getRecommendedActionLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFindingMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFindingTechnicalReference",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFindingResolutionNote",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isFindingFocused",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFindingFocusTarget",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "askAiAboutFinding",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "improveFindingGuidance",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 126,
          "end_line": 126,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getContextActionLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 137,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 461 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "LaunchConfirmationPanel",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 391,
      "tags": {
        "COMPLEXITY": "4 -->",
        "SEMANTICS": "dataset-review, launch-confirmation, run-gates, sql-lab, audited-execution -->",
        "PURPOSE": "Summarize final execution context, surface launch blockers explicitly, and confirm only a gate-complete SQL Lab launch request. -->",
        "LAYER": "UI -->",
        "PRE": "Session detail, mappings, findings, preview state, and latest run context belong to the current ownership-scoped session payload. -->",
        "POST": "Users can see why launch is blocked or confirm a run-ready launch with explicit SQL Lab handoff evidence. -->",
        "SIDE_EFFECT": "Submits the launch request through dataset orchestration APIs and updates the workspace with returned run context state. -->",
        "DATA_CONTRACT": "Input -> Dataset review launch payload { sessionId, session, findings[], mappings[], preview, previewState, latestRunContext }; Output -> onupdated({ launch_result, preview_state }) workspace refresh payload and onjump({ target }) remediation navigation signal. -->",
        "UX_STATE": "Submitted -> SQL Lab handoff and audited run context reference are shown after launch request succeeds. -->",
        "UX_FEEDBACK": "Launch button, blocker list, and success state all reflect current gate truth instead of generic confirmation copy. -->",
        "UX_RECOVERY": "Blocked launch state provides jump paths back to mapping review, preview generation, or validation remediation. -->",
        "UX_REACTIVITY": "Uses $props, $state, and $derived only; no legacy reactive syntax. -->"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "api_module"
        },
        {
          "type": "BINDS_TO",
          "target": "DatasetReviewWorkspace"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "READS_FROM",
          "line": 17
        },
        {
          "store": "state",
          "type": "READS_FROM",
          "line": 17
        },
        {
          "store": "derived",
          "type": "READS_FROM",
          "line": 17
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 20
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 37
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 38
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 40
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 41
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 44
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 47
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 48
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 51
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 53
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 54
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 68
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 80
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 91
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 99
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 107
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 115
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 125
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 135
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 146
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 180
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 192
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 193
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 202
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 205
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 208
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 213
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 220
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 223
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 247
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 261
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 264
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 270
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 273
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 279
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 288
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 291
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 299
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 302
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 306
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 309
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 329
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 332
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 339
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 348
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 357
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 366
        }
      ]
    },
    {
      "name": "LaunchConfirmationPanel",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 391,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/dataset-review/LaunchConfirmationPanel.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "buildLaunchBlockers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getStateLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 145,
          "end_line": 145,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getStateClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 149,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "jumpTo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "confirmLaunch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 391 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "ExecutionMappingReview",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 647,
      "tags": {
        "COMPLEXITY": "4 -->",
        "SEMANTICS": "dataset-review, execution-mapping, warning-approval, manual-override, required-values -->",
        "PURPOSE": "Review imported-filter to template-variable mappings, surface effective values and blockers, and require explicit approval for warning-sensitive execution inputs before preview or launch. -->",
        "LAYER": "UI -->",
        "PRE": "Session id, execution mappings, imported filters, and template variables belong to the current ownership-scoped session payload. -->",
        "POST": "Users can review effective mapping values, approve warning-sensitive transformations, or manually override them while unresolved required-value blockers remain visible. -->",
        "SIDE_EFFECT": "Persists mapping approvals or manual overrides through dataset orchestration APIs and may invalidate the current preview truth for the route shell. -->",
        "DATA_CONTRACT": "Input -> Dataset review execution payload { sessionId, mappings[], importedFilters[], templateVariables[] }; Output -> onupdated({ mapping | mappings, preview_state }) route-shell refresh payload. -->",
        "UX_STATE": "Approved -> All launch-sensitive mappings are approved or no explicit approval is required. -->",
        "UX_FEEDBACK": "Mapping approvals and manual overrides expose inline success, saving, and error feedback per row. -->",
        "UX_RECOVERY": "Users can replace transformed values manually instead of approving them as-is and can retry failed mutations in place. -->",
        "UX_REACTIVITY": "Uses $props, $state, and $derived only; no legacy reactive syntax. -->"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "api_module"
        },
        {
          "type": "BINDS_TO",
          "target": "DatasetReviewWorkspace"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "READS_FROM",
          "line": 17
        },
        {
          "store": "state",
          "type": "READS_FROM",
          "line": 17
        },
        {
          "store": "derived",
          "type": "READS_FROM",
          "line": 17
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 20
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 32
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 37
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 38
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 39
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 41
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 44
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 48
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 77
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 80
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 107
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 112
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 117
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 122
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 218
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 232
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 233
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 266
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 267
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 286
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 307
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 324
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 325
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 367
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 370
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 373
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 387
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 387
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 390
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 393
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 401
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 408
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 413
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 422
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 461
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 466
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 471
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 476
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 484
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 491
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 495
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 496
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 499
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 500
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 507
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 514
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 517
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 521
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 531
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 539
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 547
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 558
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 574
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 582
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 599
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 612
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 620
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 628
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 637
        }
      ]
    },
    {
      "name": "ExecutionMappingReview",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 647,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/dataset-review/ExecutionMappingReview.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "setRowMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 88,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetRowMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getApprovalLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getWarningLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 110,
          "end_line": 110,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getMethodLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stringifyValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getEffectiveValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 134,
          "end_line": 134,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getRowState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 153,
          "end_line": 153,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "startManualOverride",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cancelManualOverride",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 178,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeOverrideValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 188,
          "end_line": 188,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "approveMapping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 201,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "approveAllMappings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 240,
          "end_line": 240,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "saveManualOverride",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 276,
          "end_line": 276,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isMappingFocused",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 332,
          "end_line": 332,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "askAiAboutMapping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 337,
          "end_line": 337,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "improveMappingDraft",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 350,
          "end_line": 350,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 647 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "SourceIntakePanelUxTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 4,
      "end_line": 161,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset-review, source-intake, ux-tests, validation, recovery",
        "PURPOSE": "Verify source intake entry paths, validation feedback, and submit payload behavior for US1.",
        "LAYER": "UI",
        "UX_STATE": "Rejected -> Invalid source input remains local and exposes recovery guidance.",
        "TEST_CONTRACT": "SourceIntakePanelProps -> ObservableIntakeUX",
        "TEST_SCENARIO": "dataset_selection_mode_changes_cta -> Dataset selection path switches CTA and payload source kind.",
        "TEST_EDGE": "external_fail -> Submit callback failure is rendered inline.",
        "TEST_INVARIANT": "intake_contract_remains_observable -> VERIFIED_BY: [invalid_superset_link_shows_rejected_state, recognized_superset_link_submits_payload, dataset_selection_mode_changes_cta]"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "SourceIntakePanel"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 4
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "DatasetReviewUs3UxTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 5,
      "end_line": 499,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset-review, execution, mapping, preview, launch, ux-tests",
        "PURPOSE": "Verify US3 mapping review, Superset preview, and launch confirmation UX contracts.",
        "LAYER": "UI",
        "UX_STATE": "Blocked -> Launch panel lists blockers instead of allowing hidden bypass.",
        "TEST_CONTRACT": "Us3ExecutionProps -> ObservableExecutionUx",
        "TEST_SCENARIO": "launch_panel_blocks_then_submits_sql_lab_launch -> Launch lists gates first and shows audited handoff after success.",
        "TEST_EDGE": "invalid_type -> Mixed values stringify without crashing.",
        "TEST_INVARIANT": "execution_gates_remain_visible -> VERIFIED_BY: [mapping_review_approves_warning_sensitive_row, preview_panel_requests_superset_compilation_and_renders_sql, launch_panel_blocks_then_submits_sql_lab_launch]"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "ExecutionMappingReview"
        },
        {
          "type": "VERIFIES",
          "target": "CompiledSQLPreview"
        },
        {
          "type": "VERIFIES",
          "target": "LaunchConfirmationPanel"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 5
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 5
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 5
          },
          {
            "message": "Fractal limit warning: Module length is 495 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 5
          }
        ],
        "score": 0.325
      }
    },
    {
      "name": "DatasetReviewUs2WorkspaceUxTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 5,
      "end_line": 311,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset-review, semantics, assistant, workspace, ux-tests, mapping-review",
        "PURPOSE": "Verify US2 dataset review surfaces keep semantic review actionable, route clarification through AssistantChatPanel, and preserve explicit preview/mapping gates.",
        "LAYER": "UI",
        "TEST_SCENARIO": "mapping_review_marks_row_focused_and_requires_explicit_approval -> Mapping review keeps warning approvals explicit and highlightable.",
        "TEST_EDGE": "external_fail -> Failed request surfaces inline recovery message."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "SemanticLayerReview"
        },
        {
          "type": "VERIFIES",
          "target": "ExecutionMappingReview"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 5
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 5
          },
          {
            "message": "Fractal limit warning: Module length is 307 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 5
          }
        ],
        "score": 0.47500000000000003
      }
    },
    {
      "name": "ValidationFindingsPanelUxTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 4,
      "end_line": 141,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset-review, findings, severity, jump, ux-tests",
        "PURPOSE": "Verify grouped findings visibility, empty state, and remediation jump behavior for US1.",
        "LAYER": "UI",
        "UX_STATE": "Informational -> Informational notes stay readable without competing with blockers.",
        "TEST_CONTRACT": "FindingsPanelProps -> ObservableFindingsUX",
        "TEST_SCENARIO": "empty_findings_show_success_state -> Empty list shows ready feedback.",
        "TEST_EDGE": "external_fail -> Jump callback remains optional.",
        "TEST_INVARIANT": "findings_groups_remain_actionable -> VERIFIED_BY: [blocking_warning_info_groups_render, jump_action_maps_area_to_workspace_target, empty_findings_show_success_state]"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "ValidationFindingsPanel"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 4
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "Sidebar",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 339,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Persistent left sidebar with resource categories navigation",
        "LAYER": "UI",
        "SEMANTICS": "Navigation",
        "PRE": "Sidebar store and translated category definitions are available before navigation is rendered.",
        "POST": "Active category and item remain aligned with the current route and mobile state is dismissible.",
        "SIDE_EFFECT": "Persists sidebar state via store actions, refreshes health indicators, and updates window location on navigation.",
        "DATA_CONTRACT": "SidebarCategory[] -> RenderedNavigationTree",
        "INVARIANT": "Always shows active category and item",
        "UX_REACTIVITY": "Uses $derived for store-backed navigation state and $effect guards for route/category coherence.",
        "UX_STATE": "MobileOpen -> Overlay and sidebar stay visible on small screens until dismissed.",
        "UX_FEEDBACK": "Active item highlighted with different background",
        "UX_RECOVERY": "Click outside on mobile closes overlay",
        "TEST_CONTRACT": "Component_Sidebar ->",
        "TEST_FIXTURE": "idle_state -> {}",
        "TEST_EDGE": "mobile_open -> shows mobile overlay mask",
        "TEST_INVARIANT": "navigation -> verifies: [idle_state]"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "sidebar"
        },
        {
          "type": "BINDS_TO",
          "target": "auth"
        },
        {
          "type": "BINDS_TO",
          "target": "health_store"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SidebarNavigation"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Icon"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 41
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 48
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 49
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 51
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 52
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 53
        },
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 54
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 55
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 62
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 69
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 70
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 73
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 75
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 76
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 95
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 108
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 115
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 175
        }
      ]
    },
    {
      "name": "Sidebar",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 339,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/layout/Sidebar.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "withExpandedCategory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toggleExpandedCategory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleItemClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCategoryToggle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 138,
          "end_line": 138,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSubItemClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 154,
          "end_line": 154,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleToggleClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleOverlayClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 339 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "TopNavbar",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 581,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Unified top navigation bar with Logo, Search, Activity, and User menu",
        "LAYER": "UI",
        "SEMANTICS": "Navigation, UserSession",
        "PRE": "Auth, environment, and task stores are initialized before interactive navbar actions are used.",
        "POST": "Search, environment selection, and global action controls remain synchronized with current app state.",
        "SIDE_EFFECT": "Reads profile preferences, performs search API requests, and triggers drawer, auth, and assistant actions.",
        "DATA_CONTRACT": "SearchQuery -> SearchSection[] | ProfilePreferences -> TaskDrawerPreference",
        "INVARIANT": "Always visible on non-login pages",
        "UX_REACTIVITY": "Uses $state for menu/search state and $derived projections from app stores.",
        "UX_STATE": "Searching -> Search dropdown stays open while async results are loading.",
        "UX_FEEDBACK": "Activity badge shows count of running tasks",
        "UX_RECOVERY": "Click outside closes dropdowns",
        "UX_TEST": "ActivityClick -> {click: activity button, expected: task drawer opens}",
        "TEST_CONTRACT": "Component_TopNavbar ->",
        "TEST_FIXTURE": "logged_in -> {\"user\": {\"username\": \"admin\"}}",
        "TEST_EDGE": "network_down -> search fetch fails, handles error state",
        "TEST_INVARIANT": "ui_consistency -> verifies: [logged_in]"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "activity"
        },
        {
          "type": "BINDS_TO",
          "target": "auth"
        },
        {
          "type": "BINDS_TO",
          "target": "environmentContext"
        },
        {
          "type": "DISPATCHES",
          "target": "taskDrawer"
        },
        {
          "type": "DISPATCHES",
          "target": "assistantChat"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Icon"
        },
        {
          "type": "DEPENDS_ON",
          "target": "LanguageSwitcher"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 46
        },
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 47
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 48
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 49
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 50
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 56
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 57
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 58
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 59
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 60
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 61
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 62
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 63
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 69
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 72
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 73
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 75
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 76
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 77
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 90
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 91
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 92
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 93
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 94
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 97
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 100
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 103
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 104
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 241
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 248
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 255
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 262
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 385
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 400
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 412
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 424
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 428
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 471
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 472
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 496
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 497
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 510
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 530
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 548
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 563
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 574
        }
      ]
    },
    {
      "name": "TopNavbar",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 581,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/layout/TopNavbar.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "toggleUserMenu",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "closeUserMenu",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleLogout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleActivityClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleAssistantClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 135,
          "end_line": 135,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hydrateTaskDrawerPreference",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 139,
          "end_line": 139,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSearchFocus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 152,
          "end_line": 152,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearSearchState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 157,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDocumentClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleHamburgerClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 173,
          "end_line": 173,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleGlobalEnvironmentChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 178,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildSearchResultSections",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 185,
          "end_line": 185,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "triggerSearch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 269,
          "end_line": 269,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSearchInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 321,
          "end_line": 321,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openSearchResult",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 331,
          "end_line": 331,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSearchKeydown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 344,
          "end_line": 344,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 581 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "Breadcrumbs",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 190,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Display page hierarchy navigation",
        "LAYER": "UI",
        "INVARIANT": "Always shows current page path",
        "UX_STATE": "Collapsed -> Intermediate segments collapse into an ellipsis when the path exceeds the visibility budget.",
        "UX_FEEDBACK": "Hover on breadcrumb shows clickable state",
        "UX_RECOVERY": "Click breadcrumb to navigate",
        "PARAM": "{string} segment - URL segment",
        "RETURNS": "{string} Formatted label"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "PageStore"
        },
        {
          "type": "BINDS_TO",
          "target": "i18n"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Icon"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 20
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 21
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 23
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 27
        }
      ]
    },
    {
      "name": "Breadcrumbs",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 190,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/layout/Breadcrumbs.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getBreadcrumbs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatBreadcrumbLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCrumbMeta",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TaskDrawer",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 853,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Global task drawer for monitoring background operations",
        "LAYER": "UI",
        "SEMANTICS": "TaskLogViewer",
        "PRE": "Task drawer store and optional websocket task context are available before detail mode is requested.",
        "POST": "Drawer stays closed, shows the recent-task list, or renders a selected task detail without losing task context.",
        "SIDE_EFFECT": "Opens websocket streams, loads recent tasks, and mutates drawer selection state.",
        "DATA_CONTRACT": "TaskDrawerState -> RecentTaskList | ActiveTaskDetail",
        "INVARIANT": "Drawer shows logs for active task or remains closed",
        "UX_REACTIVITY": "Uses $state for local drawer UI and $derived or store subscriptions for active task synchronization.",
        "UX_STATE": "InputRequired -> Interactive form rendered in drawer",
        "UX_FEEDBACK": "Back button returns to task list",
        "UX_RECOVERY": "Back button shows task list when viewing task details",
        "TEST_DATA": "llm_task_success_with_pass_result -> {\"activeTaskDetails\":{\"plugin_id\":\"llm_dashboard_validation\",\"status\":\"SUCCESS\",\"result\":{\"status\":\"PASS\"}}}",
        "TEST_CONTRACT": "Component_TaskDrawer ->",
        "TEST_FIXTURE": "init_state -> {}",
        "TEST_EDGE": "empty_task_list -> displays \\\"No recent tasks\\\"",
        "TEST_INVARIANT": "default_rendering -> verifies: [init_state]"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "taskDrawer"
        }
      ],
      "children": [
        {
          "name": "disconnectWebSocket",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 435,
          "end_line": 451,
          "tags": {
            "UX_STATE": "Loading -> Default",
            "PURPOSE": "Disconnects the active WebSocket connection",
            "PRE": "ws may or may not be initialized",
            "POST": "ws is closed and set to null",
            "COMPLEXITY": "3"
          },
          "relations": [
            {
              "type": "USES",
              "target": "App"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 435
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 435
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "loadRecentTasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 453,
          "end_line": 476,
          "tags": {
            "PURPOSE": "Load recent tasks for list mode display",
            "PRE": "User is on task drawer or api is ready.",
            "POST": "recentTasks array populated with task list"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "selectTask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 478,
          "end_line": 491,
          "tags": {
            "PURPOSE": "Select a task from list to view details",
            "PRE": "task is a valid task object",
            "POST": "drawer state updated to show task details"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "goBackToList",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 493,
          "end_line": 512,
          "tags": {
            "UX_STATE": "Loading -> Default",
            "PURPOSE": "Return to task list view from task details",
            "PRE": "Drawer is open and activeTaskId is set",
            "POST": "Drawer switches to list view and reloads tasks",
            "COMPLEXITY": "3"
          },
          "relations": [
            {
              "type": "USES",
              "target": "App"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 493
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 493
              }
            ],
            "score": 0.5499999999999999
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 45
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 46
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 50
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 51
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 52
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 53
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 57
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 58
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 59
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 60
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 61
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 64
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 65
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 66
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 71
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 72
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 73
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 79
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 179
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 266
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 266
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 266
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 266
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 278
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 289
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 289
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 289
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 303
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 330
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 341
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 352
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 384
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 515
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 539
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 540
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 559
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 576
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 582
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 582
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 616
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 621
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 641
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 665
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 683
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 686
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 694
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 701
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 710
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 714
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 721
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 741
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 747
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 777
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 794
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 802
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 803
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 838
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 849
        }
      ]
    },
    {
      "name": "TaskDrawer",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 854,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/layout/TaskDrawer.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handleClose",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "goToReportsPage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleGlobalKeydown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeTaskId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isTaskFinished",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveLlmValidationStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 127,
          "end_line": 127,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "llmValidationBadgeClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 136,
          "end_line": 136,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getStatusClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 146,
          "end_line": 146,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stopTaskDetailsPolling",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadEnvironmentOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 166,
          "end_line": 166,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveEnvironmentName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 176,
          "end_line": 176,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveEnvironmentId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 182,
          "end_line": 182,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeSupersetBaseUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 192,
          "end_line": 192,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveSupersetDashboardUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 201,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadActiveTaskDetails",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 209,
          "end_line": 209,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractPrimaryDashboardId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 224,
          "end_line": 224,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildTaskSummary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 243,
          "end_line": 243,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleOpenDashboardDeepLink",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 327,
          "end_line": 327,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleShowDiff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 349,
          "end_line": 349,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleOpenLlmReport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 380,
          "end_line": 380,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "connectWebSocket",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 397,
          "end_line": 397,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 854 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "SidebarNavigation",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "navigation, sidebar, rbac, menu, filtering",
        "PURPOSE": "Build sidebar navigation categories filtered by current user permissions.",
        "LAYER": "UI",
        "INVARIANT": "Admin role can access all categories and subitems through permission utility."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "frontend.src.lib.auth.permissions.hasPermission"
        },
        {
          "type": "USED_BY",
          "target": "Sidebar"
        }
      ],
      "children": [
        {
          "name": "isItemAllowed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Check whether a single menu node can be shown for a given user.",
            "PRE": "item can contain optional requiredPermission/requiredAction.",
            "POST": "Returns true when no permission is required or permission check passes."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildSidebarCategories",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 176,
          "tags": {
            "PURPOSE": "Build translated sidebar categories and filter them by RBAC permissions.",
            "PRE": "i18nState provides nav labels; user can be null.",
            "POST": "Returns only categories/subitems available for provided user."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:SidebarNavigation:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "test_breadcrumbs.svelte",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 106,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/lib/components/layout/__tests__/test_breadcrumbs.svelte.js",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getBreadcrumbs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatBreadcrumbLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "SidebarNavigationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, sidebar, navigation, rbac, permissions",
        "PURPOSE": "Verifies RBAC-based sidebar category and subitem visibility.",
        "LAYER": "UI (Tests)"
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "frontend/src/lib/components/layout/sidebarNavigation.js"
        }
      ],
      "children": [
        {
          "name": "makeUser",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:SidebarNavigationTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ErrorPage",
      "type": "Page",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 31,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Global error page displaying HTTP status and messages",
        "LAYER": "UI",
        "UX_STATE": "Error -> Displays error code and message with home link"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        },
        {
          "type": "IMPLEMENTS",
          "target": "RoutePages"
        },
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "BINDS_TO",
          "target": "NavigationContracts"
        },
        {
          "type": "BINDS_TO",
          "target": "NavigationContracts"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "RootLayoutConfig",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 9,
      "tags": {
        "COMPLEXITY": "1",
        "PURPOSE": "Root layout configuration (SPA mode)",
        "LAYER": "Infra"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "HomePage",
      "type": "Page",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 101,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Redirect to preferred start page from profile settings with safe dashboards fallback.",
        "LAYER": "UI",
        "INVARIANT": "Redirect target resolves to one of /dashboards, /datasets, /reports.",
        "UX_STATE": "Loading -> Shows loading indicator",
        "UX_FEEDBACK": "Redirects to preferred start page",
        "TEST_CONTRACT": "Page_Home ->",
        "TEST_FIXTURE": "init_state -> {}",
        "TEST_INVARIANT": "correct_redirect -> verifies: [init_state]"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        },
        {
          "type": "IMPLEMENTS",
          "target": "RoutePages"
        },
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "BINDS_TO",
          "target": "NavigationContracts"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.5
      }
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 101,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "normalizeStartPage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveStartPagePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "redirectToStartPage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "load",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 3,
      "end_line": 23,
      "tags": {
        "PURPOSE": "Loads initial plugin data for the dashboard.",
        "PRE": "None.",
        "POST": "Returns an object with plugins or an error message.",
        "TYPE": "{import('./$types').PageLoad} */"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "RootLayout",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 104,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "layout, root, navigation, sidebar, toast",
        "PURPOSE": "Root layout component that provides global UI structure (Sidebar, Navbar, Footer, TaskDrawer, Toasts).",
        "LAYER": "UI (Layout)",
        "INVARIANT": "All pages except /login are wrapped in ProtectedRoute."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "NavigationContracts"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Sidebar"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TopNavbar"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Footer"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Toast"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ProtectedRoute"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskDrawer"
        }
      ],
      "children": [
        {
          "name": "layout",
          "type": "Module",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 17,
          "end_line": 103,
          "tags": {
            "UX_STATE": "Loading -> Default",
            "COMPLEXITY": "3",
            "SEMANTICS": "app-layout, auth-gating, navigation-shell",
            "PURPOSE": "Bind global layout shell and conditional login/full-app rendering.",
            "LAYER": "UI",
            "INVARIANT": "Login route bypasses shell; all other routes are wrapped by ProtectedRoute."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "Sidebar"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.925
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "DatasetHub",
      "type": "Page",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 959,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Dataset Hub - Dedicated hub for datasets with mapping progress",
        "LAYER": "UI",
        "INVARIANT": "Always shows datasets for the active environment from context store",
        "UX_STATE": "BulkAction-Modal -> Map Columns or Generate Docs modal open",
        "UX_FEEDBACK": "Floating panel slides up from bottom when items selected",
        "UX_RECOVERY": "Refresh button reloads dataset list",
        "TEST_CONTRACT": "Page_DatasetHub ->",
        "TEST_FIXTURE": "init_state -> {}",
        "TEST_EDGE": "multi_selection -> sets `isAllSelected`/`isAllVisibleSelected` properly and shows bottom panel",
        "TEST_INVARIANT": "dataset_grid_and_selection -> verifies: [init_state]"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "sidebarStore"
        },
        {
          "type": "BINDS_TO",
          "target": "taskDrawerStore"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 959,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/datasets/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "loadDatasets",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 110,
          "end_line": 110,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSearch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 166,
          "end_line": 166,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handlePageChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 171,
          "end_line": 171,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handlePageSizeChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 177,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateSelectionState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 184,
          "end_line": 184,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCheckboxChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 194,
          "end_line": 194,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSelectAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 205,
          "end_line": 205,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSelectVisible",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 229,
          "end_line": 229,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleAction",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 240,
          "end_line": 240,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleBulkMapColumns",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 260,
          "end_line": 260,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleBulkGenerateDocs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 325,
          "end_line": 325,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleTaskStatusClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 359,
          "end_line": 359,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTaskStatusIcon",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 369,
          "end_line": 369,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getMappingProgressClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 386,
          "end_line": 386,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 959 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "DatasetReviewWorkspaceEntry",
      "type": "Page",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 560,
      "tags": {
        "COMPLEXITY": "3 -->",
        "SEMANTICS": "dataset-review, workspace-entry, source-intake, session-bootstrap -->",
        "PURPOSE": "Entry route for Dataset Review Workspace that allows starting a new resumable review session before navigating to a specific session id route. -->",
        "LAYER": "UI -->",
        "UX_STATE": "Error -> Inline error shown while keeping intake values editable. -->",
        "UX_RECOVERY": "Users can correct invalid input in place and retry without losing environment selection. -->"
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "fetchApi"
        },
        {
          "type": "CALLS",
          "target": "postApi"
        },
        {
          "type": "BINDS_TO",
          "target": "SourceIntakePanel"
        },
        {
          "type": "BINDS_TO",
          "target": "environmentContext"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 560,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/datasets/review/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "buildSessionUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatDateTime",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSessionMetaValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadExistingSessions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deleteSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "goToPage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 137,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSearch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "truncateText",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 149,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getReadinessTone",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 154,
          "end_line": 154,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getReadinessHint",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 167,
          "end_line": 167,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "bootstrap",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 183,
          "end_line": 183,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSourceSubmit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 193,
          "end_line": 193,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 560 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "DatasetReviewEntryUxTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 5,
      "end_line": 290,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset-review, workspace-entry, resume, source-intake, ux-tests",
        "PURPOSE": "Verify dataset review entry route exposes resumable sessions alongside the new session intake flow.",
        "LAYER": "UI",
        "UX_STATE": "ResumeError -> inline error and retry action remain visible without removing new session flow.",
        "TEST_SCENARIO": "submits_new_session_without_regression"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "DatasetReviewWorkspaceEntry:Page"
        }
      ],
      "children": [
        {
          "name": "createSessionSummary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 5
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "DatasetReviewEntryUxTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 5,
      "end_line": 290,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset-review, workspace-entry, resume, source-intake, ux-tests",
        "PURPOSE": "Verify dataset review entry route exposes resumable sessions alongside the new session intake flow.",
        "LAYER": "UI",
        "UX_STATE": "ResumeError -> inline error and retry action remain visible without removing new session flow.",
        "TEST_SCENARIO": "submits_new_session_without_regression"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "DatasetReviewWorkspaceEntry:Page"
        }
      ],
      "children": [
        {
          "name": "createSessionSummary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 5
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "DatasetReviewWorkspace",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1200,
      "tags": {
        "COMPLEXITY": "5 -->",
        "SEMANTICS": "dataset-review, workspace, session-resume, chat-centric, preview, launch -->",
        "PURPOSE": "Main dataset review workspace coordinating session state through a three-column chat-centric layout where the assistant is the primary review surface. -->",
        "LAYER": "UI -->",
        "PRE": "Review route has either a resumable session id or receives new intake input from the workspace form. -->",
        "POST": "Session detail is loaded or created, assistant chat is centered, and preview plus launch blockers remain visible in the execution rail. -->",
        "SIDE_EFFECT": "Reads and mutates ownership-scoped review session state through dataset orchestration APIs and may navigate to a newly created session route. -->",
        "DATA_CONTRACT": "Input[route:id|StartSessionRequest] -> Output[SessionDetail|null] -->",
        "INVARIANT": "Navigation away from dirty session state must require explicit confirmation. -->",
        "UX_STATE": "Ready -> Preview, blockers, and launch action remain visible without displacing assistant guidance. -->",
        "UX_FEEDBACK": "Main CTA and assistant prompts reflect current highest-value next action. -->",
        "UX_RECOVERY": "Users can save, resume, or reopen an unfinished session without losing context. -->",
        "UX_REACTIVITY": "Uses Svelte runes for session, readiness, preview, and action derivation. -->"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "api_module"
        },
        {
          "type": "BINDS_TO",
          "target": "AssistantChatPanel"
        },
        {
          "type": "BINDS_TO",
          "target": "CompiledSQLPreview"
        },
        {
          "type": "BINDS_TO",
          "target": "LaunchConfirmationPanel"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 25
        },
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 26
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 27
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 28
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 29
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 30
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 31
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 32
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 33
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 34
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 35
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 42
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 49
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 53
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 59
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 66
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 67
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 68
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 69
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 70
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 71
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 72
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 73
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 75
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 76
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 77
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 79
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 80
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 81
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 84
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 87
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 88
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 89
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 90
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 93
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 94
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 97
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 98
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 99
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 100
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 101
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 104
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 107
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 108
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 109
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 110
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 111
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 114
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 117
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 120
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 128
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 134
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 135
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 137
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 139
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 140
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 144
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 145
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 149
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 150
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 151
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 152
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 155
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 160
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 165
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 168
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 171
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 174
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 176
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 189
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 194
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 199
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 204
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 209
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 223
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 228
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 233
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 238
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 238
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 246
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 264
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 264
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 264
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 267
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 267
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 267
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 353
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 354
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 390
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 391
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 400
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 401
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 427
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 428
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 450
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 451
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 471
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 472
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 637
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 659
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 667
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 682
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 685
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 688
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 695
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 702
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 706
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 714
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 737
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 740
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 743
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 780
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 786
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 792
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 800
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 814
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 819
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 830
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 859
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 869
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 872
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 875
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 883
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 898
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 918
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 940
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 960
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 974
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 980
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 988
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1068
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1074
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1080
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1093
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1098
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1104
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1110
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1119
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1122
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1132
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1140
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1148
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1156
        }
      ]
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1200,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/datasets/review/[id]/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getWorkspaceStateLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 154,
          "end_line": 154,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getRecommendedActionLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getPrimaryActionCtaLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildImportMilestones",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 179,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildWorkspaceLaunchBlockers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 215,
          "end_line": 215,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stringifyValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 244,
          "end_line": 244,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildAssistantContextPrompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 258,
          "end_line": 258,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mergeCollectionItem",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 270,
          "end_line": 270,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applySessionVersion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 283,
          "end_line": 283,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildAssistantSeedPrompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 294,
          "end_line": 294,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "promptAssistantAbout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 319,
          "end_line": 319,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildSessionUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 325,
          "end_line": 325,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadSessionDetail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 329,
          "end_line": 329,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadClarificationState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 361,
          "end_line": 361,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "bootstrapWorkspace",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 376,
          "end_line": 376,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSourceSubmit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 383,
          "end_line": 383,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleResumeSession",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 408,
          "end_line": 408,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateSessionLifecycle",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 432,
          "end_line": 432,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "exportArtifact",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 455,
          "end_line": 455,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handlePreviewUpdated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 478,
          "end_line": 478,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSemanticUpdated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 508,
          "end_line": 508,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleMappingUpdated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 532,
          "end_line": 532,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleLaunchUpdated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 562,
          "end_line": 562,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSectionJump",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 569,
          "end_line": 569,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleAskAiContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 593,
          "end_line": 593,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "primaryActionHandler",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 605,
          "end_line": 605,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1200 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "DatasetReviewWorkspaceUxTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 5,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset-review, workspace, route, ux-tests, review-state, chat-centric, execution-rail",
        "PURPOSE": "Verify the `027` dataset review workspace keeps assistant chat as the primary surface while preserving execution rail and resumable intake behavior.",
        "LAYER": "UI",
        "UX_STATE": "Review -> Workspace exposes left context rail, embedded assistant center, and right execution rail."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "DatasetReviewWorkspace"
        }
      ],
      "children": [
        {
          "name": "createSessionDetail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createClarificationState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:DatasetReviewWorkspaceUxTests:Module] started at line 5",
            "severity": "ERROR",
            "line_number": 5
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 5
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "DatasetDetail",
      "type": "Page",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 402,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Dataset Detail View - Shows detailed dataset information with columns, SQL, and linked dashboards",
        "LAYER": "UI",
        "INVARIANT": "Always shows dataset details when loaded",
        "UX_STATE": "Error -> Shows error banner with retry button",
        "UX_FEEDBACK": "Clicking linked dashboard navigates to dashboard detail",
        "UX_RECOVERY": "Refresh button reloads dataset details",
        "TEST_CONTRACT": "Page_DatasetDetail ->",
        "TEST_FIXTURE": "init_state -> {\"id\": \"1\"}",
        "TEST_EDGE": "server_error -> shows error block with the refresh button",
        "TEST_INVARIANT": "fetching_detail -> verifies: [init_state]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "api_module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 402,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/datasets/[id]/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "loadDatasetDetail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "navigateToDashboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "goBack",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getColumnTypeClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getMappingProgress",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 402 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "UnifiedReportsPage",
      "type": "Component",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 223,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "reports, unified, filters, loading, empty, error",
        "PURPOSE": "Unified reports page with filtering and resilient UX states for mixed task types.",
        "LAYER": "UI",
        "INVARIANT": "List state remains deterministic for active filter set.",
        "UX_STATE": "Error -> Inline error with retry preserving filters.",
        "UX_FEEDBACK": "Filter change reloads list immediately.",
        "UX_RECOVERY": "Retry and clear filters actions available.",
        "TEST_CONTRACT": "Page_Reports ->",
        "TEST_FIXTURE": "init_state -> {}",
        "TEST_EDGE": "empty_filtered_list -> displays \\\"No results matching filters\\\"",
        "TEST_INVARIANT": "pagination_and_filtering -> verifies: [init_state]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "ReportsApi"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ReportsList"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @UX_REACTIVITY (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 37
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 38
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 39
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 40
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 41
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 55
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 57
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 58
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 63
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 130
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 161
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 168
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 177
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 188
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 188
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 195
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 201
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 206
        }
      ]
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 223,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/reports/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "buildQuery",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadReports",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasActiveFilters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearFilters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "onFilterChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "onSelectReport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 411,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/reports/llm/[taskId]/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "formatDate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatMs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getDashboardCheckResult",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getCheckResultClasses",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadReport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "backToReports",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 99,
          "end_line": 99,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openTaskDetails",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cleanupScreenshotBlobUrls",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadScreenshotBlobUrls",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openScreenshot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 145,
          "end_line": 145,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 411 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "ReportPageContractTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 33,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "llm-report, svelte-effect, screenshot-loading, regression-test",
        "PURPOSE": "Protect the LLM report page from self-triggering screenshot load effects.",
        "LAYER": "UI Tests"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "frontend/src/routes/reports/llm/[taskId"
        }
      ],
      "children": [
        {
          "name": "llm_report_screenshot_effect_contract",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 17,
          "end_line": 32,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Ensure screenshot loading stays untracked from blob-url mutation state.",
            "PRE": "Report page source exists.",
            "POST": "Contract fails if screenshot loading effect can subscribe to screenshotBlobUrls updates."
          },
          "relations": [
            {
              "type": "USES",
              "target": "App"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 17
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 17
              }
            ],
            "score": 0.5499999999999999
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "LoginPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 162,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "SEMANTICS": "login, auth, ui, form",
        "PURPOSE": "Provides the user interface for local and ADFS authentication.",
        "LAYER": "UI",
        "INVARIANT": "Shows both local login form and ADFS SSO button."
      },
      "relations": [
        {
          "type": "USES",
          "target": "authStore"
        },
        {
          "type": "CALLS",
          "target": "AuthApi"
        }
      ],
      "children": [
        {
          "name": "handleLogin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Submits the local login form to the backend.",
            "PRE": "Username and password are not empty.",
            "POST": "User is authenticated and redirected on success."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleADFSLogin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Redirects the user to the ADFS login endpoint."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.75
      },
      "data_flow": [
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 20
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 65
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 70
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 73
        },
        {
          "store": "auth",
          "type": "READS_FROM",
          "line": 91
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 99
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 109
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 120
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 135
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 135
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 145
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 154
        }
      ]
    },
    {
      "name": "StorageIndexPage",
      "type": "Page",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 20,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Redirect to the backups page as the default storage view.",
        "LAYER": "Page",
        "UX_STATE": "Redirecting -> Immediately transfers the user to /storage/backups.",
        "INVARIANT": "Always redirects to /storage/backups."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "RoutePages"
        },
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "BINDS_TO",
          "target": "NavigationContracts"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "StorageReposPage",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "git, dashboard, management, ui",
        "PURPOSE": "Dashboard management page for Git integration (moved from /git).",
        "LAYER": "UI (Page)",
        "INVARIANT": "Dashboard grid is always shown when an environment is selected."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "RepositoryDashboardGrid"
        },
        {
          "type": "DEPENDS_ON",
          "target": "api"
        }
      ],
      "children": [
        {
          "name": "StorageReposPage",
          "type": "Page",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 183,
          "tags": {
            "UX_STATE": "Idle -> Showing dashboard grid with actions.",
            "UX_FEEDBACK": "Toast -> Error messages on fetch failure.",
            "UX_RECOVERY": "Environment Selection -> Switch environment to retry loading."
          },
          "relations": [],
          "children": [
            {
              "name": "fetchEnvironments",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 45,
              "end_line": 61,
              "tags": {
                "PURPOSE": "Fetches the list of available environments.",
                "PRE": "None.",
                "POST": "environments array is populated, selectedEnvId is set to first env if available."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "fetchDashboards",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 63,
              "end_line": 98,
              "tags": {
                "PURPOSE": "Fetches dashboards for a specific environment.",
                "PRE": "envId is a valid environment ID.",
                "POST": "dashboards array is populated with metadata for the selected environment."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "filterDashboardsWithRepositories",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 100,
              "end_line": 138,
              "tags": {
                "PURPOSE": "Keep only dashboards that already have initialized Git repositories.",
                "PRE": "dashboards list is loaded for selected environment.",
                "POST": "Returns dashboards with status != NO_REPO."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:StorageReposPage:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "DashboardHub",
      "type": "Page",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 2859,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Dashboard Hub - Central hub for managing dashboards with Git status and task actions",
        "LAYER": "UI",
        "INVARIANT": "Always shows dashboards for the active environment from context store",
        "UX_STATE": "BulkAction-Modal -> Migration or Backup modal open",
        "UX_FEEDBACK": "Floating panel slides up from bottom when items selected",
        "UX_RECOVERY": "Refresh button reloads dashboard list",
        "UX_REATIVITY": "State: $state, Derived: $derived. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 export let.",
        "TEST_CONTRACT": "Page_DashboardHub ->",
        "TEST_FIXTURE": "init_state -> {}",
        "TEST_EDGE": "bulk_git_actions -> verifies modal functionality when triggered",
        "TEST_INVARIANT": "rendering_and_selection -> verifies: [init_state]"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "sidebarStore"
        },
        {
          "type": "BINDS_TO",
          "target": "taskDrawerStore"
        }
      ],
      "children": [
        {
          "name": "DashboardHub.normalizeTaskStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 174,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Normalize raw task status to stable lowercase token for UI.",
            "PRE": "status can be enum-like string or null.",
            "POST": "returns null or normalized token without enum namespace."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.normalizeValidationStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 189,
          "end_line": 204,
          "tags": {
            "PURPOSE": "Normalize validation status to pass/fail/warn/unknown.",
            "PRE": "status can be any scalar.",
            "POST": "returns one of pass|fail|warn|unknown."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.getValidationBadgeClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 206,
          "end_line": 220,
          "tags": {
            "PURPOSE": "Map validation level to badge class tuple.",
            "PRE": "level in pass|fail|warn|unknown.",
            "POST": "returns deterministic tailwind class string."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.getValidationLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 222,
          "end_line": 235,
          "tags": {
            "PURPOSE": "Map normalized validation level to compact UI label.",
            "PRE": "level in pass|fail|warn|unknown.",
            "POST": "returns uppercase status label."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.normalizeOwners",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 237,
          "end_line": 273,
          "tags": {
            "PURPOSE": "Normalize owners payload to unique non-empty display labels.",
            "PRE": "owners can be null, list of strings, or list of user objects.",
            "POST": "Returns owner labels preserving source order."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.loadDashboards",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 275,
          "end_line": 477,
          "tags": {
            "PURPOSE": "Load full dashboard dataset for current environment and hydrate grid projection.",
            "PRE": "selectedEnv is not null.",
            "POST": "allDashboards, dashboards, pagination and selection state are synchronized.",
            "UX_STATE": "Error -> `error` populated when request fails."
          },
          "relations": [],
          "children": [
            {
              "name": "DashboardHub.handleTemporaryShowAll",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 397,
              "end_line": 409,
              "tags": {
                "PURPOSE": "Temporarily disable profile-default dashboard filter for current page context.",
                "PRE": "Dashboards list is loaded in dashboards_main context.",
                "POST": "Next request is sent with override_show_all=true."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "DashboardHub.handleRestoreProfileFilter",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 411,
              "end_line": 423,
              "tags": {
                "PURPOSE": "Re-enable persisted profile-default filtering after temporary override.",
                "PRE": "Current page is in override mode.",
                "POST": "Next request is sent with override_show_all=false."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.formatDate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 479,
          "end_line": 492,
          "tags": {
            "PURPOSE": "Convert ISO timestamp to locale date string.",
            "PRE": "value may be null or invalid date string.",
            "POST": "returns formatted date or \"-\"."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.getGitSummaryLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 494,
          "end_line": 512,
          "tags": {
            "PURPOSE": "Compute stable text label for git state column.",
            "PRE": "dashboard has git projection fields.",
            "POST": "returns localized summary string."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.getLlmSummaryLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 514,
          "end_line": 526,
          "tags": {
            "PURPOSE": "Compute normalized LLM validation summary label.",
            "PRE": "dashboard may have null lastTask.",
            "POST": "returns UNKNOWN fallback for missing status."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.getColumnCellValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 528,
          "end_line": 545,
          "tags": {
            "PURPOSE": "Resolve comparable/filterable display value for any grid column.",
            "PRE": "column belongs to filterable column set.",
            "POST": "returns non-empty scalar display value."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.getFilterOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 547,
          "end_line": 562,
          "tags": {
            "PURPOSE": "Build unique sorted value list for a column filter dropdown.",
            "PRE": "allDashboards is hydrated.",
            "POST": "returns de-duplicated sorted options."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.getVisibleFilterOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 564,
          "end_line": 577,
          "tags": {
            "PURPOSE": "Apply in-dropdown search over full filter options.",
            "PRE": "columnFilterSearch contains search token for column.",
            "POST": "returns subset for current filter popover list."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.toggleFilterDropdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 579,
          "end_line": 608,
          "tags": {
            "PURPOSE": "Toggle active column filter popover.",
            "PRE": "column is valid filter key.",
            "POST": "openFilterColumn updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.toggleFilterValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 610,
          "end_line": 628,
          "tags": {
            "PURPOSE": "Add/remove specific filter value and reapply projection.",
            "PRE": "value comes from option list of the same column.",
            "POST": "columnFilters updated and grid reprojected from page 1."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.clearColumnFilter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 630,
          "end_line": 642,
          "tags": {
            "PURPOSE": "Reset selected values for one column.",
            "PRE": "column is valid filter key.",
            "POST": "filter cleared and projection refreshed."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.selectAllColumnFilterValues",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 644,
          "end_line": 659,
          "tags": {
            "PURPOSE": "Select all currently visible values in filter popover.",
            "PRE": "visible options computed for current search token.",
            "POST": "column filter equals current visible option set."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.updateColumnFilterSearch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 661,
          "end_line": 671,
          "tags": {
            "PURPOSE": "Update local search token for one filter popover.",
            "PRE": "value is text from input.",
            "POST": "columnFilterSearch updated immutably."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.hasColumnFilter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 673,
          "end_line": 683,
          "tags": {
            "PURPOSE": "Determine if column has active selected values.",
            "PRE": "column is valid filter key.",
            "POST": "returns boolean activation marker."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.doesDashboardPassColumnFilters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 685,
          "end_line": 702,
          "tags": {
            "PURPOSE": "Evaluate dashboard row against all active column filters.",
            "PRE": "dashboard contains projected values for each filterable column.",
            "POST": "returns true only when row matches every active filter."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.getSortValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 704,
          "end_line": 722,
          "tags": {
            "PURPOSE": "Compute stable comparable sort key for chosen column.",
            "PRE": "column belongs to sortable set.",
            "POST": "returns string/number key suitable for deterministic comparison."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.handleSort",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 724,
          "end_line": 741,
          "tags": {
            "PURPOSE": "Toggle or switch sort order and reapply grid projection.",
            "PRE": "column belongs to sortable set.",
            "POST": "sortColumn/sortDirection updated and page reset to 1."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.getSortIndicator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 743,
          "end_line": 754,
          "tags": {
            "PURPOSE": "Return visual indicator for active/inactive sort header.",
            "PRE": "column belongs to sortable set.",
            "POST": "returns one of \u2195 | \u2191 | \u2193."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardHub.applyGridTransforms",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 756,
          "end_line": 783,
          "tags": {
            "PURPOSE": "Apply search + column filters + sort + pagination to grid data.",
            "PRE": "allDashboards is current source collection.",
            "POST": "filteredDashboards/dashboards/total/totalPages are synchronized.",
            "UX_STATE": "Loaded -> visible rows reflect all active controls deterministically."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 2859,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/dashboards/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handleDocumentClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeTaskStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 180,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeValidationStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 195,
          "end_line": 195,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getValidationBadgeClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 212,
          "end_line": 212,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getValidationLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 228,
          "end_line": 228,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeOwners",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 243,
          "end_line": 243,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadDashboards",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 283,
          "end_line": 283,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSearch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 379,
          "end_line": 379,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handlePageChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 384,
          "end_line": 384,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handlePageSizeChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 391,
          "end_line": 391,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleTemporaryShowAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 403,
          "end_line": 403,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleRestoreProfileFilter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 417,
          "end_line": 417,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateSelectionState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 426,
          "end_line": 426,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "replaceSelectedIds",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 435,
          "end_line": 435,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearSelectedIds",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 440,
          "end_line": 440,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCheckboxChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 445,
          "end_line": 445,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSelectAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 456,
          "end_line": 456,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSelectVisible",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 467,
          "end_line": 467,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatDate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 485,
          "end_line": 485,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getGitSummaryLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 500,
          "end_line": 500,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getLlmSummaryLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 520,
          "end_line": 520,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getColumnCellValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 534,
          "end_line": 534,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getFilterOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 553,
          "end_line": 553,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getVisibleFilterOptions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 570,
          "end_line": 570,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toggleFilterDropdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 585,
          "end_line": 585,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toggleFilterValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 616,
          "end_line": 616,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearColumnFilter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 636,
          "end_line": 636,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "selectAllColumnFilterValues",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 650,
          "end_line": 650,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateColumnFilterSearch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 667,
          "end_line": 667,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasColumnFilter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 679,
          "end_line": 679,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "doesDashboardPassColumnFilters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 691,
          "end_line": 691,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSortValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 710,
          "end_line": 710,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSort",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 730,
          "end_line": 730,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSortIndicator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 749,
          "end_line": 749,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyGridTransforms",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 763,
          "end_line": 763,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toggleActionDropdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 786,
          "end_line": 786,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "closeActionDropdown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 793,
          "end_line": 793,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleAction",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 798,
          "end_line": 798,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleValidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 838,
          "end_line": 838,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleTargetEnvChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 876,
          "end_line": 876,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadDatabases",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 889,
          "end_line": 889,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleMappingUpdate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 907,
          "end_line": 907,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadDbMappings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 914,
          "end_line": 914,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "calculateDryRun",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 945,
          "end_line": 945,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleBulkMigrate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 996,
          "end_line": 996,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleBulkBackup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1042,
          "end_line": 1042,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleTaskStatusClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1078,
          "end_line": 1078,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "navigateToDashboardDetail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1087,
          "end_line": 1087,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getStatusBadgeClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1096,
          "end_line": 1096,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isGitBusy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1108,
          "end_line": 1108,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setGitBusy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1112,
          "end_line": 1112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ensureGitConfigs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1121,
          "end_line": 1121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateDashboardGitState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1127,
          "end_line": 1127,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeRepositoryStatusPayload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1140,
          "end_line": 1140,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchDashboardGitStatusesBatch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1177,
          "end_line": 1177,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refreshDashboardGitState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1233,
          "end_line": 1233,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hydrateVisibleGitStatusesBatch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1237,
          "end_line": 1237,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleGitInit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1250,
          "end_line": 1250,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleGitSync",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1286,
          "end_line": 1286,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleGitCommit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1299,
          "end_line": 1299,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleGitPull",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1327,
          "end_line": 1327,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleGitPush",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1341,
          "end_line": 1341,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTaskStatusIcon",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1356,
          "end_line": 1356,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getPaginationRange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1377,
          "end_line": 1377,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleEnvironmentCreated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1460,
          "end_line": 1460,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 2859 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "DashboardProfileOverrideIntegrationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, dashboards, profile-filter, override, restore",
        "PURPOSE": "Verifies temporary show-all override and restore-on-return behavior for profile-default dashboard filtering.",
        "LAYER": "UI (Tests)",
        "TYPE": "{any} */ (initializeEnvironmentContext);"
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "frontend/src/routes/dashboards/+page.svelte"
        }
      ],
      "children": [
        {
          "name": "buildFilteredResponse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 116,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildUnfilteredResponse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 149,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:DashboardProfileOverrideIntegrationTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "HealthCenterPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 233,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Main page for the Dashboard Health Center.",
        "LAYER": "UI/Page",
        "UX_STATE": "Error -> Displays an error message.",
        "UX_REACTIVITY": "State: $state, Derived: $derived."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "HealthMatrix"
        },
        {
          "type": "CALLS",
          "target": "api_module"
        }
      ],
      "children": [
        {
          "name": "loadData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Load health summary rows and environment options for the current filter.",
            "PRE": "Page is mounted or environment selection changed.",
            "POST": "`healthData` and `environments` reflect latest backend response.",
            "SIDE_EFFECT": "Calls backend API endpoints for health summary and environments."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleEnvChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Apply environment filter and trigger health summary reload.",
            "PRE": "DOM change event carries target value.",
            "POST": "selectedEnvId is updated and new data load starts."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDeleteReport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Delete one health report row with confirmation and optimistic button lock.",
            "PRE": "item contains `record_id` from health summary payload.",
            "POST": "Row is removed from backend and page data is reloaded on success.",
            "SIDE_EFFECT": "Calls DELETE health API and emits toast notifications."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "state",
          "type": "READS_FROM",
          "line": 11
        },
        {
          "store": "derived",
          "type": "READS_FROM",
          "line": 11
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 15
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 16
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 17
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 22
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 29
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 30
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 31
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 32
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 85
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 92
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 96
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 96
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 110
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 111
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 115
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 122
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 133
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 149
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 155
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 156
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 157
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 158
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 159
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 161
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 180
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 214
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 222
        }
      ]
    },
    {
      "name": "HealthPageIntegrationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "health-page, integration-test, slug-link, delete-flow",
        "PURPOSE": "Lock dashboard health page contract for slug navigation and report deletion.",
        "LAYER": "UI Tests"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "frontend/src/routes/dashboards/health/+page.svelte"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:HealthPageIntegrationTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "DashboardDetail",
      "type": "Page",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 1063,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Dashboard Detail View - Overview of charts and datasets linked to a dashboard",
        "LAYER": "UI",
        "INVARIANT": "Shows dashboard metadata, charts, and datasets for selected environment",
        "UX_STATE": "Error -> Inline recovery keeps the user on the current dashboard route.",
        "TEST_DATA": "llm_unconfigured -> {\"llmStatus\":{\"configured\":false,\"reason\":\"invalid_api_key\"}}",
        "TEST_CONTRACT": "Page_DashboardDetail ->",
        "TEST_FIXTURE": "init_state -> {\"id\": \"1\", \"env_id\": \"env1\"}",
        "TEST_INVARIANT": "dashboard_fetching -> verifies: [init_state]"
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "RoutePages"
        },
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "BINDS_TO",
          "target": "NavigationContracts"
        },
        {
          "type": "DEPENDS_ON",
          "target": "api_module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1063,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/dashboards/[id]/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "loadDashboardPage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadDashboardDetail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadTaskHistory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "releaseThumbnailUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 145,
          "end_line": 145,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadThumbnail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 152,
          "end_line": 152,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runBackupTask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 177,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runLlmValidationTask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 206,
          "end_line": 206,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openLlmReport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 245,
          "end_line": 245,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toTaskTypeLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 254,
          "end_line": 254,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getTaskStatusClasses",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 261,
          "end_line": 261,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getValidationStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 273,
          "end_line": 273,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getValidationStatusClasses",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 290,
          "end_line": 290,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "goBack",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 300,
          "end_line": 300,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openDataset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 304,
          "end_line": 304,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatDate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 308,
          "end_line": 308,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadLlmStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 315,
          "end_line": 315,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "hasGitRepository",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 326,
          "end_line": 326,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveGitSyncState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 332,
          "end_line": 332,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "allChangedFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 357,
          "end_line": 357,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "countChangedByAnyPath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 365,
          "end_line": 365,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getGitStatusMeta",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 371,
          "end_line": 371,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadGitStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 415,
          "end_line": 415,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadGitDiffPreview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 443,
          "end_line": 443,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runGitSyncAndOpenCommit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 465,
          "end_line": 465,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runGitPull",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 484,
          "end_line": 484,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runGitPush",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 498,
          "end_line": 498,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleBranchChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 512,
          "end_line": 512,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1063 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "AdminRolesPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 240,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "SEMANTICS": "admin, role-management, rbac",
        "PURPOSE": "UI for managing system roles and their permissions.",
        "LAYER": "Domain",
        "INVARIANT": "Only accessible by users with Admin role."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "adminService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ProtectedRoute"
        }
      ],
      "children": [
        {
          "name": "loadData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Fetches roles and available permissions.",
            "PRE": "Component mounted.",
            "POST": "roles and permissions arrays populated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openCreateModal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Initializes state for creating a new role.",
            "PRE": "None.",
            "POST": "showModal is true, roleForm is reset."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openEditModal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Initializes state for editing an existing role.",
            "PRE": "role object is provided.",
            "POST": "showModal is true, roleForm is populated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSaveRole",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 117,
          "tags": {
            "PURPOSE": "Submits role data (create or update).",
            "PRE": "roleForm contains valid data.",
            "POST": "Role is saved, modal closed, data reloaded."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDeleteRole",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 119,
          "end_line": 138,
          "tags": {
            "PURPOSE": "Deletes a role after confirmation.",
            "PRE": "role object is provided.",
            "POST": "Role is deleted if confirmed, data reloaded."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 53
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 113
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 126
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 134
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 147
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 152
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 157
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 165
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 166
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 167
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 168
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 186
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 187
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 200
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 200
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 207
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 211
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 215
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 217
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 225
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 228
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 229
        }
      ]
    },
    {
      "name": "AdminUsersPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 292,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "admin, user-management, rbac",
        "PURPOSE": "UI for managing system users and their roles.",
        "LAYER": "Feature",
        "UX_STATE": "Error -> Inline admin error is shown without discarding current form state.",
        "INVARIANT": "Only accessible by users with \"admin:users\" permission."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "RoutePages"
        },
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "DEPENDS_ON",
          "target": "frontend.src.services.adminService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "frontend.src.components.auth.ProtectedRoute"
        }
      ],
      "children": [
        {
          "name": "loadData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Fetches users and roles from the backend.",
            "PRE": "Component mounted.",
            "POST": "users and roles arrays populated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openCreateModal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Prepares the form for creating a new user.",
            "POST": "showModal is true, isEditing is false, userForm is reset."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openEditModal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Prepares the form for editing an existing user.",
            "PRE": "user object must be valid.",
            "POST": "showModal is true, isEditing is true, userForm populated with user data.",
            "PARAM": "{Object} user - The user object to edit."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSaveUser",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Submits user data to the backend (create or update).",
            "PRE": "userForm must be valid.",
            "POST": "User created or updated, modal closed, data reloaded.",
            "SIDE_EFFECT": "Triggers API call to adminService.",
            "RELATION": "CALLS -> adminService.updateUser"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDeleteUser",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Deletes a user after confirmation.",
            "PRE": "user object must be valid.",
            "POST": "User deleted if confirmed, data reloaded.",
            "SIDE_EFFECT": "Triggers API call to adminService.",
            "RELATION": "CALLS -> adminService.deleteUser",
            "PARAM": "{Object} user - The user to delete."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 22
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 60
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 125
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 142
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 151
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 166
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 171
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 177
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 181
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 189
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 190
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 191
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 192
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 193
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 194
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 218
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 218
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 223
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 229
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 229
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 243
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 243
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 250
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 254
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 258
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 261
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 267
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 271
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 277
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 280
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 281
        }
      ]
    },
    {
      "name": "AdminSettingsPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 365,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "SEMANTICS": "admin, adfs, mappings, configuration, logging",
        "PURPOSE": "UI for configuring Active Directory Group to local Role mappings for ADFS SSO and logging settings.",
        "LAYER": "Feature",
        "INVARIANT": "Only accessible by users with \"admin:settings\" permission."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "adminService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ProtectedRoute"
        }
      ],
      "children": [
        {
          "name": "loadData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Fetches AD mappings and roles from the backend to populate the UI.",
            "PRE": "Component is mounted and user has active session.",
            "POST": "mappings and roles variables are updated with backend data.",
            "RETURNS": "{Promise<void>}",
            "SIDE_EFFECT": "Updates local 'mappings', 'roles', 'loading', and 'error' states.",
            "RELATION": "CALLS -> adminService.getADGroupMappings"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCreateMapping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Submits a new AD Group to Role mapping to the backend.",
            "PRE": "'newMapping' object contains valid 'ad_group' and 'role_id'.",
            "POST": "A new mapping is created in the database and the table is refreshed.",
            "RETURNS": "{Promise<void>}",
            "SIDE_EFFECT": "Closes the modal on success, shows alert on failure.",
            "RELATION": "CALLS -> adminService.createADGroupMapping"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadLoggingConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Fetches current logging configuration from the backend.",
            "PRE": "Component is mounted and user has active session.",
            "POST": "loggingConfig variable is updated with backend data.",
            "RETURNS": "{Promise<void>}",
            "RELATION": "CALLS -> adminService.getLoggingConfig"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "saveLoggingConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 142,
          "end_line": 170,
          "tags": {
            "PURPOSE": "Saves logging configuration to the backend.",
            "PRE": "loggingConfig contains valid values.",
            "POST": "Configuration is saved and feedback is shown.",
            "RETURNS": "{Promise<void>}",
            "RELATION": "CALLS -> adminService.updateLoggingConfig"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 72
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 94
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 107
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 108
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 162
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 163
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 182
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 187
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 193
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 197
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 205
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 206
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 227
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 239
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 243
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 249
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 259
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 263
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 273
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 285
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 288
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 296
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 296
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 299
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 310
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 316
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 322
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 325
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 328
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 335
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 347
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 353
        }
      ]
    },
    {
      "name": "LLMSettingsPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 317,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "SEMANTICS": "admin, llm, settings, provider, configuration",
        "PURPOSE": "Admin settings page for LLM provider configuration.",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "ProviderConfig"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 114
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 117
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 128
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 130
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 144
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 147
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 154
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 161
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 172
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 178
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 187
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 190
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 197
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 204
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 213
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 221
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 228
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 239
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 246
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 259
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 262
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 269
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 281
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 293
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 310
        }
      ]
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 317,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/admin/settings/llm/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isMultimodalModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getProviderById",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchProviders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "saveSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 317 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "MigrationDashboard",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 36,
      "end_line": 456,
      "tags": {
        "PURPOSE": "Orchestrate migration UI workflow and route user actions to backend APIs and task store.",
        "PRE": "API client and component dependencies are available; i18n store is initialized.",
        "POST": "User can progress through selection, dry-run, migration start, and task resume flows.",
        "SIDE_EFFECT": "Performs HTTP requests, mutates local UI state, updates selectedTask store.",
        "DATA_CONTRACT": "DashboardSelection -> MigrationDryRunResult | Task DTO (from /tasks endpoints)"
      },
      "relations": [],
      "children": [
        {
          "name": "fetchEnvironments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Fetches the list of environments from the API.",
            "PRE": "None.",
            "POST": "environments state is updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchDashboards",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 143,
          "tags": {
            "PURPOSE": "Fetches dashboards for the selected source environment.",
            "PRE": "envId is a valid environment ID.",
            "PARAM": "envId The environment ID.",
            "POST": "dashboards state is updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ReactiveDashboardFetch",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Automatically fetch dashboards when the source environment is changed.",
            "PRE": "sourceEnvId is not empty.",
            "POST": "fetchDashboards is called with the new sourceEnvId.",
            "UX_STATE": "[Loading] -> Triggered when sourceEnvId changes."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchDatabases",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 161,
          "end_line": 207,
          "tags": {
            "PURPOSE": "Fetches databases from both environments and gets suggestions.",
            "PRE": "sourceEnvId and targetEnvId must be set.",
            "POST": "sourceDatabases, targetDatabases, mappings, and suggestions are updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleMappingUpdate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 209,
          "end_line": 248,
          "tags": {
            "PURPOSE": "Saves a mapping to the backend.",
            "PRE": "event.detail contains sourceUuid and targetUuid.",
            "POST": "Mapping is saved and local mappings list is updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleViewLogs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 250,
          "end_line": 262,
          "tags": {
            "PURPOSE": "Opens the log viewer for a specific task.",
            "PRE": "event.detail contains task object.",
            "POST": "logViewer state updated and showLogViewer set to true."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handlePasswordPrompt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 264,
          "end_line": 298,
          "tags": {
            "PURPOSE": "Reactive logic to show password prompt when a task is awaiting input.",
            "PRE": "selectedTask status is AWAITING_INPUT.",
            "POST": "showPasswordPrompt set to true with request data."
          },
          "relations": [],
          "children": [
            {
              "name": "ReactivePasswordPrompt",
              "type": "Block",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 273,
              "end_line": 297,
              "tags": {
                "PURPOSE": "Monitor selected task for input requests and trigger password prompt.",
                "PRE": "$selectedTask is not null and status is AWAITING_INPUT.",
                "POST": "showPasswordPrompt is set to true if input_request is database_password.",
                "UX_STATE": "[AwaitingInput] -> Password prompt modal is displayed."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleResumeMigration",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 300,
          "end_line": 321,
          "tags": {
            "PURPOSE": "Resumes a migration task with provided passwords.",
            "PRE": "event.detail contains passwords.",
            "POST": "resumeTask is called and showPasswordPrompt is hidden on success."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "startMigration",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 323,
          "end_line": 398,
          "tags": {
            "PURPOSE": "Initiates the migration process by sending the selection to the backend.",
            "PRE": "sourceEnvId and targetEnvId are set and different; at least one dashboard is selected.",
            "POST": "A migration task is created and selectedTask store is updated.",
            "SIDE_EFFECT": "Resets dryRunResult; updates error state on failure.",
            "UX_STATE": "[Loading] -> [Success] or [Error]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "startDryRun",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 400,
          "end_line": 455,
          "tags": {
            "PURPOSE": "Performs a dry-run migration to identify potential risks and changes.",
            "PRE": "source/target environments and selected dashboards are valid.",
            "POST": "dryRunResult is populated with the pre-flight analysis.",
            "UX_STATE": "[Loading] -> [Success] or [Error]",
            "UX_FEEDBACK": "User sees summary cards + risk block + JSON details after success.",
            "UX_RECOVERY": "User can adjust selection and press Dry Run again."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 64
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 65
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 69
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 70
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 71
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 72
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 73
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 75
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 76
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 77
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 78
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 79
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 80
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 81
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 82
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 83
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 84
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 87
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 88
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 89
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 91
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 92
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 93
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 154
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 280
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 316
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 336
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 343
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 350
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 414
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 421
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 428
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 472
        },
        {
          "store": "selectedTask",
          "type": "READS_FROM",
          "line": 480
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 488
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 495
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 507
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 512
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 522
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 533
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 550
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 567
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 576
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 580
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 596
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 622
        }
      ]
    },
    {
      "name": "MigrationDashboardView",
      "type": "Block",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 459,
      "end_line": 700,
      "tags": {
        "PURPOSE": "Render migration configuration controls, action CTAs, dry-run results, and modal entry points.",
        "UX_STATE": "Success -> Dry-run details or TaskRunner content is presented.",
        "UX_FEEDBACK": "Buttons, banners, cards, and dialogs provide immediate operation feedback.",
        "UX_RECOVERY": "User can retry operations from the same page state."
      },
      "relations": [],
      "children": [
        {
          "name": "MigrationHeader",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 471,
          "end_line": 473,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TaskHistorySection",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 475,
          "end_line": 477,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ActiveTaskSection",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 479,
          "end_line": 493,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "EnvironmentSelectionSection",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 504,
          "end_line": 517,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardSelectionSection",
          "type": "Component",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 519,
          "end_line": 538,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MigrationOptionsSection",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 540,
          "end_line": 571,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DryRunResultsSection",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 626,
          "end_line": 667,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MigrationModals",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 671,
          "end_line": 697,
          "tags": {
            "PURPOSE": "Render overlay components for log viewing and password entry.",
            "UX_STATE": "[AwaitingInput] -> PasswordPrompt is visible."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "MappingsPageScript",
      "type": "Block",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 36,
      "end_line": 169,
      "tags": {
        "PURPOSE": "Define imports, state, and handlers that drive migration mappings page FSM."
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "fetchEnvironments"
        },
        {
          "type": "CALLS",
          "target": "fetchDatabases"
        },
        {
          "type": "CALLS",
          "target": "handleUpdate"
        }
      ],
      "children": [
        {
          "name": "Imports",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 49,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "UiState",
          "type": "Store",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 51,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Maintain local page state for environments, fetched databases, mappings, suggestions, and UX messages."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 51
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "belief_scope",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Frontend semantic scope wrapper for CRITICAL trace boundaries without changing business behavior.",
            "PRE": "scopeId is non-empty and run is callable.",
            "POST": "Executes run exactly once and returns/rejects with the same outcome.",
            "SIDE_EFFECT": "Emits trace logs for semantic scope entrance/exit.",
            "DATA_CONTRACT": "Input(scopeId:string, run:() => Promise<T>) -> Output(Promise<T>)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchEnvironments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 99,
          "tags": {
            "PURPOSE": "Load environment options for source/target selectors on initial mount.",
            "PRE": "API client is initialized and route has mounted.",
            "POST": "loading=false and environments populated on success or error message set on failure.",
            "SIDE_EFFECT": "Network I/O to environments endpoint; mutates environments/error/loading.",
            "DATA_CONTRACT": "Input(void) -> Output(EnvironmentSummary[])"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchDatabases",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 135,
          "tags": {
            "PURPOSE": "Fetch both environment database catalogs, existing mappings, and suggested matches.",
            "PRE": "sourceEnvId and targetEnvId are both selected and non-empty.",
            "POST": "fetchingDbs=false and sourceDatabases/targetDatabases/mappings/suggestions updated or error set.",
            "SIDE_EFFECT": "Concurrent network I/O to environments, mappings, and suggestion endpoints; clears transient messages.",
            "DATA_CONTRACT": "Input({sourceEnvId,targetEnvId}) -> Output({sourceDatabases,targetDatabases,mappings,suggestions})"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleUpdate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 168,
          "tags": {
            "PURPOSE": "Persist a selected mapping pair and reconcile local mapping list by source database UUID.",
            "PRE": "event.detail includes sourceUuid/targetUuid and matching source/target database records exist.",
            "POST": "mapping persisted; local mappings replaced for same source UUID; success or error feedback shown.",
            "SIDE_EFFECT": "POST /mappings network I/O; mutates mappings/success/error.",
            "DATA_CONTRACT": "Input(CustomEvent<{sourceUuid:string,targetUuid:string}>) -> Output(MappingRecord persisted + UI feedback)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "MappingsPageTemplate",
      "type": "Block",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 172,
      "end_line": 229,
      "tags": {},
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ProfilePage",
      "type": "Component",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 879,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Manage user profile sections for read-only security access, Git identity/token configuration, and UI preferences with resilient save/cancel UX.",
        "LAYER": "UI",
        "PRE": "Authenticated profile APIs and environment context endpoints are reachable when the page mounts.",
        "POST": "Persisted profile preferences are hydrated into editable UI state, and saves submit only the current user's preference payload.",
        "SIDE_EFFECT": "Reads and updates profile preferences via API, refreshes environment lookup candidates, writes UI cache values to localStorage, and emits toast feedback.",
        "DATA_CONTRACT": "Input[{preference, security}, {superset_username, show_only_my_dashboards, show_only_slug_dashboards, git_username, git_email, git_personal_access_token, start_page, auto_open_task_drawer, dashboards_table_density, telegram_id, email_address, notify_on_fail}, {items, status, warning}] -> UIState[{selectedEnvironmentId, supersetUsername, validationErrors, lookupItems, securitySummary}]",
        "INVARIANT": "Save operations mutate only current user's preference payload via profile API.",
        "UX_STATE": "SaveError -> Inline validation and/or toast error feedback is shown.",
        "UX_FEEDBACK": "Inline warning and validation messages guide user actions without navigation loss.",
        "UX_RECOVERY": "Cancel restores last saved values and rehydrates lookup context.",
        "UX_REACTIVITY": "State: $state, Derived: $derived, Effects: $effect."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "i18n"
        },
        {
          "type": "BINDS_TO",
          "target": "api_module"
        },
        {
          "type": "BINDS_TO",
          "target": "environmentContext"
        },
        {
          "type": "BINDS_TO",
          "target": "taskDrawer"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9666666666666667
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 29
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 30
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 31
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 35
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 36
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 68
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 69
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 71
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 72
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 73
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 76
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 77
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 78
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 79
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 80
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 81
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 83
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 84
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 85
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 87
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 88
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 89
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 91
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 93
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 94
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 95
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 96
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 98
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 99
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 115
        },
        {
          "store": "environmentContextStore",
          "type": "WRITES_TO",
          "line": 115
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 116
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 117
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 118
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 119
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 123
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 127
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 133
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 146
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 160
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 169
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 179
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 315
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 383
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 391
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 426
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 435
        },
        {
          "store": "environmentContextStore",
          "type": "WRITES_TO",
          "line": 436
        },
        {
          "store": "environmentContextStore",
          "type": "READS_FROM",
          "line": 450
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 459
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 472
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 475
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 490
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 493
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 498
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 505
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 509
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 516
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 521
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 529
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 546
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 554
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 560
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 565
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 573
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 578
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 588
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 596
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 603
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 610
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 616
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 623
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 631
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 637
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 644
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 647
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 650
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 657
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 664
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 667
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 680
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 687
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 690
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 696
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 701
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 708
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 713
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 726
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 734
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 742
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 753
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 761
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 768
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 775
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 802
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 809
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 814
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 827
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 839
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 862
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 864
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 873
        }
      ]
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 879,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/profile/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createSecuritySummaryDefault",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeStartPage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeDensity",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parseValidationErrorsFromError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 199,
          "end_line": 199,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "setSavedSnapshot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 213,
          "end_line": 213,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "syncLocalUiPreferenceCaches",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 231,
          "end_line": 231,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyPreferenceResponse",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 242,
          "end_line": 242,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadPreference",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 282,
          "end_line": 282,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadLookupCandidates",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 287,
          "end_line": 287,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSelectCandidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 322,
          "end_line": 322,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleGitTokenInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 327,
          "end_line": 327,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleClearGitToken",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 334,
          "end_line": 334,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleEnvironmentChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 342,
          "end_line": 342,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSave",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 349,
          "end_line": 349,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCancel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 401,
          "end_line": 401,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 879 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "ProfileSettingsStateIntegrationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, profile, integration, preload, cancel, reload",
        "PURPOSE": "Verifies profile settings preload, cancel without persistence, and saved-state reload behavior.",
        "LAYER": "UI (Tests)",
        "TYPE": "{HTMLInputElement} */ ("
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "frontend/src/routes/profile/+page.svelte"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ProfileSettingsStateIntegrationTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ProfilePreferencesIntegrationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, profile, integration, lookup, persistence, fallback",
        "PURPOSE": "Verifies profile binding happy path and degraded lookup manual fallback save flow.",
        "LAYER": "UI (Tests)",
        "TYPE": "{HTMLInputElement} */ ("
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "frontend/src/routes/profile/+page.svelte"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:ProfilePreferencesIntegrationTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ProfileFixtures",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 28,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "fixtures, profile, ui",
        "PURPOSE": "Shared deterministic fixture inputs for profile page integration tests.",
        "INVARIANT": "lookupFailedManualFallback.warning is a hardcoded English string; drift risk if i18n key profile.lookup_error changes without updating this fixture."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "ProfilePageBindAccountFlowTests"
        },
        {
          "type": "DEPENDS_ON",
          "target": "i18n.profile.lookup_error"
        },
        {
          "type": "DEPENDS_ON",
          "target": "frontend/src/lib/i18n/index.ts [key:profile.lookup_error"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "StoragePage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 227,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "SEMANTICS": "storage, files, management",
        "PURPOSE": "Main page for unified file storage management.",
        "LAYER": "UI",
        "INVARIANT": "Always displays a unified storage view without category tabs."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "storageService"
        },
        {
          "type": "CONTAINS",
          "target": "FileList"
        },
        {
          "type": "CONTAINS",
          "target": "FileUpload"
        }
      ],
      "children": [
        {
          "name": "loadFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Fetches the list of files from the server.",
            "PRE": "currentPath is a valid storage path or empty for root.",
            "POST": "Updates the `files` array with the latest data."
          },
          "relations": [],
          "children": [
            {
              "name": "resolveStorageQueryFromPath",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 37,
              "end_line": 56,
              "tags": {
                "PURPOSE": "Splits UI path into storage API category and category-local subpath.",
                "PRE": "uiPath may be empty or start with backups/repositorys.",
                "POST": "Returns {category, subpath} compatible with /api/storage/files."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDelete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Handles the file deletion process.",
            "PRE": "The event contains valid category and path.",
            "POST": "File is deleted and file list is refreshed.",
            "PARAM": "{CustomEvent} event - The delete event containing category and path."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleNavigate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Updates the current path and reloads files when navigating into a directory.",
            "PRE": "The event contains a valid path string.",
            "POST": "currentPath is updated and files are reloaded.",
            "PARAM": "{CustomEvent} event - The navigation event containing the new path."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "navigateUp",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 133,
          "tags": {
            "PURPOSE": "Navigates one level up in the directory structure.",
            "PRE": "currentPath is not root.",
            "POST": "currentPath is moved up one directory level."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateUploadCategory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 135,
          "end_line": 152,
          "tags": {
            "PURPOSE": "Keeps upload category aligned with the currently viewed top-level folder.",
            "PRE": "currentPath can be empty or a slash-delimited path.",
            "POST": "uploadCategory is either backups or repositorys."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.6
      },
      "data_flow": [
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 67
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 88
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 93
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 97
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 141
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 146
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 166
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 168
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 190
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 190
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 206
        }
      ]
    },
    {
      "name": "MapperPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 35,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "mapper, page, tool",
        "PURPOSE": "Page for the dataset column mapper tool.",
        "LAYER": "UI",
        "UX_STATE": "Error -> Mapping-specific validation or execution failures remain visible without route changes."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "RoutePages"
        },
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "BINDS_TO",
          "target": "NavigationContracts"
        },
        {
          "type": "DEPENDS_ON",
          "target": "MapperTool"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskRunner"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 20
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 24
        }
      ]
    },
    {
      "name": "DebugPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 35,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "debug, page, tool",
        "PURPOSE": "Page for system diagnostics and debugging.",
        "LAYER": "UI",
        "UX_STATE": "Error -> Nested diagnostic failures remain scoped to the debug workspace."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "RoutePages"
        },
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "BINDS_TO",
          "target": "NavigationContracts"
        },
        {
          "type": "DEPENDS_ON",
          "target": "DebugTool"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskRunner"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 20
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 24
        }
      ]
    },
    {
      "name": "SettingsPage",
      "type": "Page",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 1899,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Consolidated Settings Page - All settings in one place with tabbed navigation",
        "LAYER": "UI",
        "INVARIANT": "Always shows tabbed interface with all settings categories",
        "UX_STATE": "Error -> Shows error banner with retry button",
        "UX_FEEDBACK": "Toast notifications on save success/failure",
        "UX_RECOVERY": "Refresh button reloads settings data",
        "TEST_DATA": "load_settings_success -> {\"environments\":[{\"id\":\"env1\",\"name\":\"Dev\",\"url\":\"http://dev\"}],\"llm\":{\"default_provider\":\"openai\"}}",
        "TEST_EDGE": "load_failed -> shows error banner with retry button",
        "TEST_CONTRACT": "Page_Settings ->",
        "TEST_FIXTURE": "init_state -> {\"tab\": \"environments\"}",
        "TEST_INVARIANT": "rendering_and_tabs -> verifies: [init_state]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "sidebar"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1899,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/settings/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createEmptyConnectionDraft",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 87,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeTab",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "readTabFromUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "writeTabToUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 131,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeLlmSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 180,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isMultimodalModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 204,
          "end_line": 204,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getProviderById",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 218,
          "end_line": 218,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isDashboardValidationBindingValid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 225,
          "end_line": 225,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleTabChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 233,
          "end_line": 233,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadConnections",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 245,
          "end_line": 245,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetConnectionForm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 263,
          "end_line": 263,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openConnectionForm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 267,
          "end_line": 267,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "closeConnectionForm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 271,
          "end_line": 271,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCreateConnection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 276,
          "end_line": 276,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDeleteConnection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 305,
          "end_line": 305,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadMigrationSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 339,
          "end_line": 339,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadMappingsPage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 352,
          "end_line": 352,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "onMappingsSearchInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 370,
          "end_line": 370,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "onMappingsFilterChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 378,
          "end_line": 378,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "goToMappingsPage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 383,
          "end_line": 383,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "saveMigrationSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 389,
          "end_line": 389,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "triggerSyncNow",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 401,
          "end_line": 401,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleRefresh",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 418,
          "end_line": 418,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSave",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 429,
          "end_line": 429,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleTestEnv",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 445,
          "end_line": 445,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "editEnv",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 470,
          "end_line": 470,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetEnvForm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 490,
          "end_line": 490,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleAddOrUpdateEnv",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 507,
          "end_line": 507,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDeleteEnv",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 547,
          "end_line": 547,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveEnvStage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 564,
          "end_line": 564,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeSupersetBaseUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 568,
          "end_line": 568,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1899 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "load",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 3,
      "end_line": 34,
      "tags": {
        "PURPOSE": "Loads application settings and environment list.",
        "PRE": "API must be reachable.",
        "POST": "Returns settings object or default values on error.",
        "TYPE": "{import('./$types').PageLoad} */"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "NotificationSettingsPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 132,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "PURPOSE": "Manage global notification provider configurations (SMTP, Telegram, Slack).",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.75
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 13
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 14
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 15
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 17
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 18
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 19
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 44
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 46
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 58
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 61
        }
      ]
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 132,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/settings/notifications/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "loadConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSave",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ConnectionsSettingsPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 50,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "settings, connections, page",
        "PURPOSE": "Page for managing database connection configurations.",
        "LAYER": "UI",
        "UX_STATE": "Error -> Child components surface validation or request errors inline."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "RoutePages"
        },
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "BINDS_TO",
          "target": "NavigationContracts"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ConnectionForm"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ConnectionList"
        }
      ],
      "children": [
        {
          "name": "handleSuccess",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Refreshes the connection list after a successful creation.",
            "PRE": "listComponent must be bound.",
            "POST": "Triggers the fetchConnections method on the list component."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 38
        }
      ]
    },
    {
      "name": "GitSettingsPage",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 539,
      "tags": {
        "SEMANTICS": "git, settings, configuration, integration",
        "PURPOSE": "Manage Git server configurations for dashboard versioning.",
        "LAYER": "Page",
        "UX_STATE": "Error -> Toast feedback reports failures while preserving entered configuration values.",
        "INVARIANT": "All configurations must be validated via connection test."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "RoutePages"
        },
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "BINDS_TO",
          "target": "NavigationContracts"
        },
        {
          "type": "USES",
          "target": "gitService"
        },
        {
          "type": "USES",
          "target": "Button, Input, Card, PageHeader, Select"
        }
      ],
      "children": [
        {
          "name": "loadConfigs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Fetches existing git configurations.",
            "PRE": "Component is mounted.",
            "POST": "configs state is populated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleTest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Tests connection to a git server with current form data.",
            "PRE": "newConfig contains valid provider, url, and pat.",
            "POST": "testing state is managed; toast shown with result."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSave",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 136,
          "tags": {
            "PURPOSE": "Saves a new git configuration.",
            "PRE": "newConfig is valid and tested.",
            "POST": "New config is saved to DB and added to configs list."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleEdit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 138,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Populates the form with an existing config to edit.",
            "PARAM": "{Object} config - Configuration object to edit.",
            "POST": "Form is populated and isEditing state is set."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetForm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 176,
          "tags": {
            "PURPOSE": "Resets the configuration form."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDelete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 177,
          "end_line": 198,
          "tags": {
            "PURPOSE": "Deletes a git configuration by ID.",
            "PARAM": "{string} id - Configuration ID.",
            "PRE": "id is valid; user confirmed deletion.",
            "POST": "Configuration is removed from DB and local state."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadGiteaRepos",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 200,
          "end_line": 223,
          "tags": {
            "PURPOSE": "Loads repositories from selected Gitea config.",
            "PRE": "selectedGiteaConfigId is set.",
            "POST": "giteaRepos state updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCreateGiteaRepo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 225,
          "end_line": 254,
          "tags": {
            "PURPOSE": "Creates new repository on selected Gitea server.",
            "PRE": "selectedGiteaConfigId and newGiteaRepo.name are set.",
            "POST": "Repository created and repos list reloaded."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDeleteGiteaRepo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 256,
          "end_line": 289,
          "tags": {
            "PURPOSE": "Deletes repository from selected Gitea server.",
            "PRE": "selectedGiteaConfigId is set.",
            "POST": "Repository deleted and repos list reloaded."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 24
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 25
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 29
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 30
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 38
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 39
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 40
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 41
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 42
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 43
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 44
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 45
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 46
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 87
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 90
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 95
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 119
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 127
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 185
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 189
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 291
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 300
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 304
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 306
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 337
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 353
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 378
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 379
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 383
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 385
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 388
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 397
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 401
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 406
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 411
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 423
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 427
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 429
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 433
        }
      ]
    },
    {
      "name": "GitSettingsPageUxTest",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "PURPOSE": "Test UX states and transitions for the Git Settings page",
        "UX_STATE": "Editing form state",
        "UX_FEEDBACK": "Save configuration"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "../+page.svelte"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:GitSettingsPageUxTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "AutomationSettingsPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 284,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Settings page for managing validation policies.",
        "LAYER": "UI/Page",
        "UX_STATE": "Loading -> Shows a loading spinner while fetching policies.",
        "UX_REATIVITY": "State: $state, Derived: $derived."
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.75
      },
      "data_flow": [
        {
          "store": "state",
          "type": "READS_FROM",
          "line": 10
        },
        {
          "store": "derived",
          "type": "READS_FROM",
          "line": 10
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 14
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 21
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 22
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 24
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 25
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 26
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 27
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 28
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 156
        }
      ]
    },
    {
      "name": "+page",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 284,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/routes/settings/automation/+page.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "loadData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleAdd",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleEdit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSave",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDelete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 127,
          "end_line": 127,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getEnvName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 138,
          "end_line": 138,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "GitDashboardPage",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 136,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Dashboard management page for Git integration.",
        "LAYER": "Page",
        "SEMANTICS": "git, dashboard, management, ui",
        "UX_STATE": "Error -> Toast-driven failure feedback preserves the current filter selection."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "RoutePages"
        },
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "BINDS_TO",
          "target": "NavigationContracts"
        },
        {
          "type": "DEPENDS_ON",
          "target": "RepositoryDashboardGrid"
        },
        {
          "type": "BINDS_TO",
          "target": "environmentContextStore"
        }
      ],
      "children": [
        {
          "name": "fetchEnvironments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Fetches the list of deployment environments from the API.",
            "PRE": "Component is mounted.",
            "POST": "`environments` array is populated with data from /api/environments."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchDashboards",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Fetches dashboards for a specific environment.",
            "PRE": "`envId` is a valid environment ID.",
            "POST": "`dashboards` array is updated with results from the environment."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 24
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 25
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 30
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 37
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 38
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 95
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 102
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 110
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 113
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 125
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 127
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 131
        }
      ]
    },
    {
      "name": "Dashboard",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 69,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dashboard, plugins, tools, list",
        "PURPOSE": "Displays the list of available plugins and allows selecting one.",
        "LAYER": "UI",
        "UX_STATE": "Empty -> No plugin tiles are shown when the list is empty.",
        "PROPS": "None",
        "EVENTS": "None"
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "DEPENDS_ON",
          "target": "stores"
        }
      ],
      "children": [
        {
          "name": "onMount",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Fetch plugins when the component mounts.",
            "PRE": "Component is mounting.",
            "POST": "plugins store is populated with available tools."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "selectPlugin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Selects a plugin to display its form.",
            "PRE": "plugin object is provided.",
            "POST": "selectedPlugin store is updated.",
            "PARAM": "{Object} plugin - The plugin object to select."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "plugins",
          "type": "READS_FROM",
          "line": 52
        }
      ]
    },
    {
      "name": "Settings",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 346,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "settings, ui, configuration",
        "PURPOSE": "The main settings page for the application, allowing management of environments and global settings.",
        "LAYER": "UI",
        "UX_STATE": "Error -> Toast and inline feedback preserve the current settings context for retry.",
        "PROPS": "None",
        "EVENTS": "None",
        "INVARIANT": "Settings changes must be saved to the backend."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "PageContracts"
        },
        {
          "type": "CALLS",
          "target": "api.js"
        },
        {
          "type": "USES",
          "target": "stores.js"
        }
      ],
      "children": [
        {
          "name": "loadSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Loads settings from the backend.",
            "PRE": "Component mounted or refresh requested.",
            "POST": "settings object is populated with backend data."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSaveGlobal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Saves global settings to the backend.",
            "PRE": "settings.settings contains valid configuration.",
            "POST": "Backend global settings are updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleAddOrUpdateEnv",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 117,
          "tags": {
            "PURPOSE": "Adds or updates an environment.",
            "PRE": "newEnv contains valid environment details.",
            "POST": "Environment list is updated on backend and reloaded locally."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDeleteEnv",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 119,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Deletes an environment.",
            "PRE": "id of environment to delete is provided.",
            "POST": "Environment is removed from backend and list is reloaded.",
            "PARAM": "{string} id - The ID of the environment to delete."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleTestEnv",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 142,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Tests the connection to an environment.",
            "PRE": "Environment ID is valid.",
            "POST": "Connection test result is displayed via toast.",
            "PARAM": "{string} id - The ID of the environment to test."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "editEnv",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 167,
          "end_line": 178,
          "tags": {
            "PURPOSE": "Sets the form to edit an existing environment.",
            "PRE": "env object is provided.",
            "POST": "newEnv is populated with env data and editingEnvId is set.",
            "PARAM": "{Object} env - The environment object to edit."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetEnvForm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Resets the environment form.",
            "PRE": "None.",
            "POST": "newEnv is reset to initial state and editingEnvId is cleared."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.75
      },
      "data_flow": [
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 69
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 84
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 88
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 104
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 107
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 114
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 127
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 131
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 136
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 154
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 157
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 162
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 208
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 211
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 213
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 216
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 226
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 227
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 230
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 234
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 240
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 246
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 251
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 255
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 256
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 264
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 265
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 266
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 267
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 268
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 277
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 277
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 279
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 280
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 281
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 290
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 290
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 293
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 297
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 301
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 305
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 309
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 314
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 318
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 322
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 325
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 326
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 327
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 333
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 333
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 337
        }
      ]
    },
    {
      "name": "getConnections",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 9,
      "end_line": 21,
      "tags": {
        "PURPOSE": "Fetch a list of saved connections.",
        "PRE": "None.",
        "POST": "Returns a promise resolving to an array of connections.",
        "RETURNS": "{Promise<Array>} List of connections."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "createConnection",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 23,
      "end_line": 36,
      "tags": {
        "PURPOSE": "Create a new connection configuration.",
        "PRE": "connectionData must be a valid object.",
        "POST": "Returns a promise resolving to the created connection.",
        "PARAM": "{Object} connectionData - The connection data.",
        "RETURNS": "{Promise<Object>} The created connection instance."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "deleteConnection",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 38,
      "end_line": 50,
      "tags": {
        "PURPOSE": "Delete a connection configuration.",
        "PRE": "connectionId must be a valid string.",
        "POST": "Returns a promise that resolves when deletion is complete.",
        "PARAM": "{string} connectionId - The ID of the connection to delete."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "GitServiceClient",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 468,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "git, service, api, client",
        "PURPOSE": "API client for Git operations, managing the communication between frontend and backend.",
        "LAYER": "Service"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "specs/011-git-integration-dashboard/contracts/api.md"
        }
      ],
      "children": [
        {
          "name": "gitService",
          "type": "Action",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 466,
          "tags": {
            "PURPOSE": "Promotes changes between branches via MR or direct merge.",
            "PRE": "Dashboard repository must be initialized.",
            "POST": "Returns promotion metadata (MR URL or direct merge status).",
            "RETURNS": "{Promise<Object>} Promotion result.",
            "PARAM": "{string|null} envId - Environment id for slug resolution."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildDashboardRepoEndpoint",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 468 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "runTask",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 9,
      "end_line": 23,
      "tags": {
        "PURPOSE": "Start a new task for a given plugin.",
        "PRE": "pluginId and params must be provided.",
        "POST": "Returns a promise resolving to the task instance.",
        "PARAM": "{Object} params - Parameters for the plugin.",
        "RETURNS": "{Promise<Object>} The created task instance."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "getTaskStatus",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 25,
      "end_line": 38,
      "tags": {
        "PURPOSE": "Fetch details for a specific task (to poll status or get result).",
        "PRE": "taskId must be provided.",
        "POST": "Returns a promise resolving to task details.",
        "PARAM": "{string} taskId - The ID of the task.",
        "RETURNS": "{Promise<Object>} Task details."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "adminService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 294,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "admin, users, roles, ad-mappings, api",
        "PURPOSE": "Service for Admin-related API calls (User and Role management).",
        "LAYER": "Service",
        "INVARIANT": "All requests must include valid Admin JWT token (handled by api client)."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "api_module"
        }
      ],
      "children": [
        {
          "name": "getUsers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Fetches all registered users from the backend.",
            "PRE": "User must be authenticated with Admin privileges.",
            "POST": "Returns an array of user objects.",
            "RETURNS": "{Promise<Array>}",
            "RELATION": "CALLS -> backend.src.api.routes.admin.list_users"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createUser",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Creates a new local user.",
            "PRE": "User must be authenticated with Admin privileges.",
            "PARAM": "{Object} userData - User details (username, email, password, roles, is_active).",
            "POST": "New user record created in auth.db.",
            "RETURNS": "{Promise<Object>}",
            "RELATION": "CALLS -> backend.src.api.routes.admin.create_user"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getRoles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Fetches all available system roles.",
            "PRE": "User must be authenticated with Admin privileges.",
            "POST": "Returns an array of role objects.",
            "RETURNS": "{Promise<Array>}",
            "RELATION": "CALLS -> backend.src.api.routes.admin.list_roles"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getADGroupMappings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Fetches mappings between AD groups and local roles.",
            "PRE": "User must be authenticated with Admin privileges.",
            "POST": "Returns an array of AD group mapping objects.",
            "RETURNS": "{Promise<Array>}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createADGroupMapping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 99,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Creates or updates an AD group to Role mapping.",
            "PRE": "User must be authenticated with Admin privileges.",
            "POST": "New or updated mapping created in auth.db.",
            "PARAM": "{Object} mappingData - Mapping details (ad_group, role_id).",
            "RETURNS": "{Promise<Object>}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateUser",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Updates an existing user.",
            "PRE": "User must be authenticated with Admin privileges.",
            "POST": "User record updated in auth.db.",
            "PARAM": "{Object} userData - Updated user data.",
            "RETURNS": "{Promise<Object>}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deleteUser",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 142,
          "end_line": 160,
          "tags": {
            "PURPOSE": "Deletes a user.",
            "PRE": "User must be authenticated with Admin privileges.",
            "POST": "User record removed from auth.db.",
            "PARAM": "{string} userId - Target user ID.",
            "RETURNS": "{Promise<void>}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "createRole",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 162,
          "end_line": 181,
          "tags": {
            "PURPOSE": "Creates a new role.",
            "PRE": "User must be authenticated with Admin privileges.",
            "POST": "New role created in auth.db.",
            "PARAM": "{Object} roleData - Role details (name, description, permissions).",
            "RETURNS": "{Promise<Object>}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateRole",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 183,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Updates an existing role.",
            "PARAM": "{Object} roleData - Updated role data.",
            "RETURNS": "{Promise<Object>}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deleteRole",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 203,
          "end_line": 219,
          "tags": {
            "PURPOSE": "Deletes a role.",
            "PARAM": "{string} roleId - Target role ID.",
            "RETURNS": "{Promise<void>}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getPermissions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 221,
          "end_line": 237,
          "tags": {
            "PURPOSE": "Fetches all available permissions.",
            "RETURNS": "{Promise<Array>}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getLoggingConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 239,
          "end_line": 256,
          "tags": {
            "PURPOSE": "Fetches current logging configuration.",
            "RETURNS": "{Promise<Object>} - Logging config with level, task_log_level, enable_belief_state.",
            "RELATION": "CALLS -> backend.src.api.routes.settings.get_logging_config"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "updateLoggingConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 258,
          "end_line": 276,
          "tags": {
            "PURPOSE": "Updates logging configuration.",
            "PARAM": "{Object} configData - Logging config (level, task_log_level, enable_belief_state).",
            "RETURNS": "{Promise<Object>}",
            "RELATION": "CALLS -> backend.src.api.routes.settings.update_logging_config"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "getTasks",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 9,
      "end_line": 32,
      "tags": {
        "PURPOSE": "Fetch a list of tasks with pagination and optional status filter.",
        "PRE": "limit and offset are numbers.",
        "POST": "Returns a promise resolving to a list of tasks.",
        "PARAM": "{string|null} status - Filter by task status (optional).",
        "RETURNS": "{Promise<Array>} List of tasks."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "getTask",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 34,
      "end_line": 47,
      "tags": {
        "PURPOSE": "Fetch details for a specific task.",
        "PRE": "taskId must be provided.",
        "POST": "Returns a promise resolving to task details.",
        "PARAM": "{string} taskId - The ID of the task.",
        "RETURNS": "{Promise<Object>} Task details."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "getTaskLogs",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 49,
      "end_line": 69,
      "tags": {
        "PURPOSE": "Fetch logs for a specific task.",
        "PRE": "taskId must be provided.",
        "POST": "Returns a promise resolving to a list of log entries.",
        "PARAM": "{string} taskId - The ID of the task.",
        "RETURNS": "{Promise<Array>} List of log entries."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "resumeTask",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 71,
      "end_line": 85,
      "tags": {
        "PURPOSE": "Resume a task that is awaiting input (e.g., passwords).",
        "PRE": "taskId and passwords must be provided.",
        "POST": "Returns a promise resolving to the updated task object.",
        "PARAM": "{Object} passwords - Map of database names to passwords.",
        "RETURNS": "{Promise<Object>} Updated task object."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "resolveTask",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 87,
      "end_line": 101,
      "tags": {
        "PURPOSE": "Resolve a task that is awaiting mapping.",
        "PRE": "taskId and resolutionParams must be provided.",
        "POST": "Returns a promise resolving to the updated task object.",
        "PARAM": "{Object} resolutionParams - Resolution parameters.",
        "RETURNS": "{Promise<Object>} Updated task object."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "clearTasks",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 103,
      "end_line": 120,
      "tags": {
        "PURPOSE": "Clear tasks based on status.",
        "PRE": "status is a string or null.",
        "POST": "Returns a promise that resolves when tasks are cleared.",
        "PARAM": "{string|null} status - Filter by task status (optional)."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "storageService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 187,
      "tags": {
        "PURPOSE": "Frontend API client for file storage management.",
        "COMPLEXITY": "3",
        "LAYER": "Service",
        "RELATION": "DEPENDS_ON -> backend.api.storage",
        "SEMANTICS": "storage, api, client"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        }
      ],
      "children": [
        {
          "name": "getStorageAuthHeaders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Returns headers with Authorization for storage API calls.",
            "RETURNS": "{Object} Headers object with Authorization if token exists.",
            "NOTE": "Unlike api.js getAuthHeaders, this doesn't set Content-Type"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "encodeStoragePath",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Encodes a storage-relative path preserving slash separators.",
            "PARAM": "{string} path - Relative storage path.",
            "RETURNS": "{string} Encoded path safe for URL segments."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "listFiles",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Fetches the list of files for a given category and subpath.",
            "PARAM": "{string} [path] - Optional subpath filter.",
            "RETURNS": "{Promise<Array>}",
            "PRE": "category and path should be valid strings if provided.",
            "POST": "Returns a promise resolving to an array of StoredFile objects."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "uploadFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Uploads a file to the storage system.",
            "PARAM": "{string} [path] - Target subpath.",
            "RETURNS": "{Promise<Object>}",
            "PRE": "file must be a valid File object; category must be specified.",
            "POST": "Returns a promise resolving to the metadata of the uploaded file."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deleteFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 127,
          "tags": {
            "PURPOSE": "Deletes a file or directory from storage.",
            "PARAM": "{string} path - Relative path of the item.",
            "RETURNS": "{Promise<void>}",
            "PRE": "category and path must identify an existing file or directory.",
            "POST": "The specified file or directory is removed from storage."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "downloadFileUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 145,
          "tags": {
            "PURPOSE": "Returns the URL for downloading a file.",
            "PARAM": "{string} path - Relative path of the file.",
            "RETURNS": "{string}",
            "PRE": "category and path must identify an existing file.",
            "POST": "Returns a valid API URL for file download.",
            "NOTE": "Downloads use browser navigation, so auth is handled via cookies"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "downloadFile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Downloads a file using authenticated fetch and saves it in browser.",
            "PARAM": "{string} [filename] - Optional preferred filename.",
            "RETURNS": "{Promise<void>}",
            "PRE": "category/path identify an existing file and user has READ permission.",
            "POST": "Browser download is triggered or an Error is thrown."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "gitServiceContractTests",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 245,
      "tags": {
        "PURPOSE": "API client tests ensuring correct endpoints are called per contract"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "../gitService.js"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "DashboardGrid",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 697,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dashboard, grid, selection, pagination",
        "PURPOSE": "Displays a grid of dashboards with selection and pagination.",
        "LAYER": "Component",
        "INVARIANT": "Selected IDs must be a subset of available dashboards."
      },
      "relations": [
        {
          "type": "USED_BY",
          "target": "frontend/src/routes/migration/+page.svelte"
        }
      ],
      "children": [
        {
          "name": "handleSort",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 99,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Toggles sort direction or changes sort column.",
            "PRE": "column name is provided.",
            "POST": "sortColumn and sortDirection state updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSelectionChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 113,
          "end_line": 126,
          "tags": {
            "PURPOSE": "Handles individual checkbox changes.",
            "PRE": "dashboard ID and checked status provided.",
            "POST": "selectedIds array updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSelectAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 145,
          "tags": {
            "PURPOSE": "Handles select all checkbox.",
            "PRE": "checked status provided.",
            "POST": "selectedIds array updated for all paginated items."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "goToPage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 156,
          "tags": {
            "PURPOSE": "Changes current page.",
            "PRE": "page index is provided.",
            "POST": "currentPage state updated if within valid range."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getRepositoryStatusToken",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 167,
          "tags": {
            "PURPOSE": "Returns normalized repository status token for a dashboard.",
            "PRE": "Dashboard exists.",
            "POST": "Returns one of loading|no_repo|synced|changes|behind_remote|ahead_remote|diverged|error."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isRepositoryReady",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 175,
          "tags": {
            "PURPOSE": "Determines whether git actions can run for a dashboard."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "invalidateRepositoryStatuses",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 177,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Marks dashboard statuses as loading so they are refetched."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveRepositoryStatusToken",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 189,
          "end_line": 221,
          "tags": {
            "PURPOSE": "Converts git status payload into a stable UI status token."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadRepositoryStatuses",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 223,
          "end_line": 280,
          "tags": {
            "PURPOSE": "Hydrates repository status map for dashboards in repository mode."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "runBulkGitAction",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 282,
          "end_line": 334,
          "tags": {
            "PURPOSE": "Executes git action for selected dashboards with limited parallelism."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleBulkSync",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 336,
          "end_line": 340,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleBulkCommit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 342,
          "end_line": 350,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleBulkPull",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 352,
          "end_line": 356,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleBulkPush",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 358,
          "end_line": 362,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleBulkDelete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 364,
          "end_line": 375,
          "tags": {
            "PURPOSE": "Removes selected repositories from storage and binding table."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleManageSelected",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 377,
          "end_line": 391,
          "tags": {
            "PURPOSE": "Opens Git manager for exactly one selected dashboard."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveDashboardRef",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 393,
          "end_line": 412,
          "tags": {
            "PURPOSE": "Resolves dashboard slug from payload fields.",
            "PRE": "Dashboard metadata is provided.",
            "POST": "Returns slug string or null if unavailable."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openGitManagerForDashboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 414,
          "end_line": 427,
          "tags": {
            "PURPOSE": "Opens Git manager for provided dashboard metadata."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleInitializeRepositories",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 429,
          "end_line": 440,
          "tags": {
            "PURPOSE": "Opens Git manager from bulk actions to initialize selected repository."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSortStatusValue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 442,
          "end_line": 452,
          "tags": {
            "PURPOSE": "Returns sort value for status column based on mode."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getStatusLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 454,
          "end_line": 465,
          "tags": {
            "PURPOSE": "Returns localized label for status column."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getStatusBadgeClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 467,
          "end_line": 488,
          "tags": {
            "PURPOSE": "Returns badge style for status column."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @UX_STATE (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.49999999999999994
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 30
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 37
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 38
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 39
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 43
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 44
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 45
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 46
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 47
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 48
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 52
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 61
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 81
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 88
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 90
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 94
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 294
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 322
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 324
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 344
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 367
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 381
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 420
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 433
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 463
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 490
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 508
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 521
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 530
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 534
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 538
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 542
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 545
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 549
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 553
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 580
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 591
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 602
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 654
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 672
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 680
        }
      ]
    },
    {
      "name": "PasswordPrompt",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 182,
      "tags": {
        "SEMANTICS": "password, prompt, modal, input, security",
        "PURPOSE": "A modal component to prompt the user for database passwords when a migration task is paused.",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "USES",
          "target": "frontend/src/lib/api.js (inferred)"
        },
        {
          "type": "BINDS_TO",
          "target": "onresume"
        },
        {
          "type": "BINDS_TO",
          "target": "oncancel"
        }
      ],
      "children": [
        {
          "name": "handleSubmit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Validates and forwards passwords to resume the task.",
            "PRE": "All database passwords must be entered.",
            "POST": "Parent resume callback receives passwords payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCancel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Cancels the password prompt.",
            "PRE": "Modal is open.",
            "POST": "Parent cancel callback is invoked and show is set to false."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 17
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 19
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 20
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 53
        }
      ]
    },
    {
      "name": "MappingTable",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 106,
      "tags": {
        "SEMANTICS": "mapping, table, database, editor",
        "PURPOSE": "Displays and allows editing of database mappings.",
        "LAYER": "Feature",
        "INVARIANT": "Each source database can be mapped to one target database."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "mappings state"
        }
      ],
      "children": [
        {
          "name": "updateMapping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Updates a mapping for a specific source database.",
            "PRE": "sourceUuid and targetUuid are provided.",
            "POST": "Parent callback receives normalized mapping payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSuggestion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Finds a suggestion for a source database.",
            "PRE": "sourceUuid is provided.",
            "POST": "Returns matching suggestion object or undefined."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 13
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 23
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 64
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 65
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 66
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 83
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 91
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 93
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 95
        }
      ]
    },
    {
      "name": "TaskLogViewer",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 306,
      "tags": {
        "UX_STATE": "Error -> Shows error message with recovery option",
        "COMPLEXITY": "3",
        "SEMANTICS": "task, log, viewer, inline, realtime",
        "PURPOSE": "Displays detailed logs for a specific task inline or in a modal using TaskLogPanel.",
        "LAYER": "UI",
        "INVARIANT": "Real-time logs are always appended without duplicates.",
        "TIER": "CRITICAL",
        "PRE": "Needs a valid taskId to fetch logs for.",
        "POST": "task logs are displayed and updated in real time.",
        "UX_FEEDBACK": "Auto-scroll keeps newest logs visible",
        "UX_RECOVERY": "Refresh button re-fetches logs from API",
        "TEST_CONTRACT": "Component_TaskLogViewer ->",
        "TEST_FIXTURE": "valid_viewer -> {taskId: \"123\", show: true}",
        "TEST_EDGE": "api_error -> transitions to Error state and displays retry button",
        "TEST_INVARIANT": "displays_logs -> verifies: [valid_viewer]"
      },
      "relations": [
        {
          "type": "USES",
          "target": "taskService"
        },
        {
          "type": "USES",
          "target": "TaskLogPanel"
        }
      ],
      "children": [
        {
          "name": "handleRealTimeLogs",
          "type": "Action",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Sync real-time logs to the current log list",
            "PRE": "None",
            "POST": "logs are updated with new real-time log entries"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchLogs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Fetches logs for a given task ID",
            "PRE": "taskId is set",
            "POST": "logs are populated with API response"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleFilterChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Updates filter conditions for the log viewer",
            "PRE": "event contains source and level fields",
            "POST": "Log viewer filters updated"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleRefresh",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 122,
          "tags": {
            "PURPOSE": "Refreshes the logs by polling the API",
            "PRE": "None",
            "POST": "Logs refetched"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "showInline",
          "type": "Component",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 150,
          "end_line": 192,
          "tags": {
            "UX_STATE": "Loading -> Default",
            "PURPOSE": "Shows inline logs -->",
            "LAYER": "UI -->",
            "SEMANTICS": "logs, inline -->",
            "COMPLEXITY": "3 -->"
          },
          "relations": [
            {
              "type": "USES",
              "target": "App"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 150
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 150
              }
            ],
            "score": 0.7
          }
        },
        {
          "name": "showModal",
          "type": "Component",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 194,
          "end_line": 304,
          "tags": {
            "UX_STATE": "Loading -> Default",
            "PURPOSE": "Shows modal logs -->",
            "LAYER": "UI -->",
            "SEMANTICS": "logs, modal -->",
            "COMPLEXITY": "3 -->"
          },
          "relations": [
            {
              "type": "USES",
              "target": "App"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 194
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 194
              }
            ],
            "score": 0.7
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.6
      },
      "data_flow": [
        {
          "store": "bindable",
          "type": "WRITES_TO",
          "line": 47
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 53
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 55
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 56
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 57
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 59
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 61
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 67
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 124
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 168
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 180
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 245
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 253
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 267
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 286
        }
      ]
    },
    {
      "name": "Footer",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 11,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "footer, layout, copyright",
        "PURPOSE": "Displays the application footer with copyright information.",
        "LAYER": "UI"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "MissingMappingModal",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 116,
      "tags": {
        "SEMANTICS": "modal, mapping, prompt, migration",
        "PURPOSE": "Prompts the user to provide a database mapping when one is missing during migration.",
        "LAYER": "Feature",
        "INVARIANT": "Modal blocks migration progress until resolved or cancelled."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "onresolve"
        },
        {
          "type": "BINDS_TO",
          "target": "oncancel"
        }
      ],
      "children": [
        {
          "name": "resolve",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Resolves the missing mapping via callback prop.",
            "PRE": "selectedTargetUuid must be set.",
            "POST": "Parent callback receives mapping payload and modal closes."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cancel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Cancels the mapping resolution modal.",
            "PRE": "Modal is open.",
            "POST": "Parent cancel callback is invoked and modal is hidden."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 21
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 25
        }
      ]
    },
    {
      "name": "DashboardGrid",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 352,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "SEMANTICS": "dashboard, grid, selection, pagination",
        "PURPOSE": "Displays a grid of dashboards with selection and pagination.",
        "LAYER": "Component",
        "INVARIANT": "Selected IDs must be a subset of available dashboards."
      },
      "relations": [
        {
          "type": "USED_BY",
          "target": "frontend/src/routes/migration/+page.svelte"
        }
      ],
      "children": [
        {
          "name": "handleValidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Triggers dashboard validation task."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSort",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Toggles sort direction or changes sort column.",
            "PRE": "column name is provided.",
            "POST": "sortColumn and sortDirection state updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSelectionChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 126,
          "end_line": 139,
          "tags": {
            "PURPOSE": "Handles individual checkbox changes.",
            "PRE": "dashboard ID and checked status provided.",
            "POST": "selectedIds array updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSelectAll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 141,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Handles select all checkbox.",
            "PRE": "checked status provided.",
            "POST": "selectedIds array updated for all paginated items."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "goToPage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Changes current page.",
            "PRE": "page index is provided.",
            "POST": "currentPage state updated if within valid range."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openGit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 171,
          "end_line": 180,
          "tags": {
            "PURPOSE": "Opens the Git management modal for a dashboard."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.75
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 25
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 30
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 31
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 32
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 38
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 39
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 40
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 41
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 80
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 94
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 101
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 103
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 107
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 187
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 209
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 220
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 231
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 240
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 244
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 298
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 310
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 328
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 336
        }
      ]
    },
    {
      "name": "Navbar",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 89,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "navbar, navigation, header, layout",
        "PURPOSE": "Main navigation bar for the application.",
        "LAYER": "UI",
        "UX_STATE": "Authenticated -> User identity and logout action are rendered."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "auth"
        },
        {
          "type": "BINDS_TO",
          "target": "i18n"
        },
        {
          "type": "DEPENDS_ON",
          "target": "LanguageSwitcher"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 15
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 17
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 20
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 42
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 48
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 52
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 55
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 56
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 57
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 64
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 67
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 68
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 69
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 70
        }
      ]
    },
    {
      "name": "Navbar",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 89,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/components/Navbar.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handleLogout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TaskHistory",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 200,
      "tags": {
        "SEMANTICS": "task, history, list, status, monitoring",
        "PURPOSE": "Displays a list of recent tasks with their status and allows selecting them for viewing logs.",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "USES",
          "target": "stores"
        },
        {
          "type": "USES",
          "target": "frontend/src/lib/api.js (inferred)"
        }
      ],
      "children": [
        {
          "name": "fetchTasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Fetches the list of recent tasks from the API.",
            "PRE": "None.",
            "POST": "tasks array is updated and selectedTask status synchronized."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearTasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Clears tasks from the history, optionally filtered by status.",
            "PRE": "User confirms deletion via prompt.",
            "POST": "Tasks are deleted from backend and list is re-fetched."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "selectTask",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Selects a task and fetches its full details.",
            "PRE": "task object is provided.",
            "POST": "selectedTask store is updated with full task details."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getStatusColor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 98,
          "tags": {
            "PURPOSE": "Returns the CSS color class for a given task status.",
            "PRE": "status string is provided.",
            "POST": "Returns tailwind color class string."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "onMount",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Initializes the component by fetching tasks and starting polling.",
            "PRE": "Component is mounting.",
            "POST": "Tasks are fetched and 5s polling interval is started."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "onDestroy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 110,
          "end_line": 117,
          "tags": {
            "PURPOSE": "Cleans up the polling interval when the component is destroyed.",
            "PRE": "Component is being destroyed.",
            "POST": "Polling interval is cleared."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      },
      "data_flow": [
        {
          "store": "selectedTask",
          "type": "READS_FROM",
          "line": 36
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 37
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 38
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 55
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 78
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 123
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 128
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 135
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 136
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 137
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 145
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 151
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 155
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 162
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 162
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 183
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 183
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 189
        }
      ]
    },
    {
      "name": "Toast",
      "type": "Component",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 32,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "toast, notification, feedback, ui",
        "PURPOSE": "Displays transient notifications (toasts) in the bottom-right corner.",
        "LAYER": "UI",
        "UX_STATE": "Visible -> Active toast items render with type-specific emphasis."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "toasts"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "toasts",
          "type": "READS_FROM",
          "line": 20
        }
      ]
    },
    {
      "name": "TaskRunner",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 411,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "SEMANTICS": "task, runner, logs, websocket",
        "PURPOSE": "Connects to a WebSocket to display real-time logs for a running task with filtering support.",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TaskLogPanel"
        }
      ],
      "children": [
        {
          "name": "connect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 145,
          "tags": {
            "PURPOSE": "Establishes WebSocket connection with exponential backoff and filter parameters.",
            "PRE": "selectedTask must be set in the store.",
            "POST": "WebSocket instance created and listeners attached."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleFilterChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 171,
          "tags": {
            "PURPOSE": "Handles filter changes and reconnects WebSocket with new parameters.",
            "PRE": "event.detail contains source and level filter values.",
            "POST": "WebSocket reconnected with new filter parameters, logs cleared."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetchTargetDatabases",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 173,
          "end_line": 194,
          "tags": {
            "PURPOSE": "Fetches available databases from target environment for mapping.",
            "PRE": "selectedTask must have to_env parameter set.",
            "POST": "targetDatabases array populated with available databases."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleMappingResolve",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 196,
          "end_line": 230,
          "tags": {
            "PURPOSE": "Resolves missing database mapping and continues migration.",
            "PRE": "event.detail contains sourceDbUuid, targetDbUuid, targetDbName.",
            "POST": "Mapping created in backend, task resumed with resolution params."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handlePasswordResume",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 232,
          "end_line": 252,
          "tags": {
            "PURPOSE": "Submits passwords and resumes paused migration task.",
            "PRE": "event.detail contains passwords object.",
            "POST": "Task resumed with passwords, connection status restored to connected."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "startDataTimeout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 254,
          "end_line": 268,
          "tags": {
            "PURPOSE": "Starts timeout timer to detect idle connection.",
            "PRE": "connectionStatus is 'connected'.",
            "POST": "waitingForData set to true after 5 seconds if no data received."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetDataTimeout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 270,
          "end_line": 281,
          "tags": {
            "PURPOSE": "Resets data timeout timer when new data arrives.",
            "PRE": "dataTimeout must be set.",
            "POST": "waitingForData reset to false, new timeout started."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "onMount",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 283,
          "end_line": 310,
          "tags": {
            "PURPOSE": "Initializes WebSocket connection when component mounts.",
            "PRE": "Component must be mounted in DOM.",
            "POST": "WebSocket connection established, subscription to selectedTask active."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "onDestroy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 312,
          "end_line": 321,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 141
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 225
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 227
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 247
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 249
        },
        {
          "store": "selectedTask",
          "type": "READS_FROM",
          "line": 326
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 328
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 328
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 335
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 338
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 341
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 344
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 347
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 350
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 358
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 361
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 361
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 362
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 362
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 363
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 363
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 363
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 364
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 364
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 367
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 368
        },
        {
          "store": "selectedTask",
          "type": "WRITES_TO",
          "line": 376
        },
        {
          "store": "taskLogs",
          "type": "WRITES_TO",
          "line": 377
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 384
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 389
        }
      ]
    },
    {
      "name": "TaskList",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 111,
      "tags": {
        "SEMANTICS": "tasks, list, status, history",
        "PURPOSE": "Displays a list of tasks with their status and execution details.",
        "LAYER": "Component"
      },
      "relations": [
        {
          "type": "USES",
          "target": "api.js"
        }
      ],
      "children": [
        {
          "name": "getStatusColor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Returns the CSS color class for a given task status.",
            "PRE": "status string is provided.",
            "POST": "Returns tailwind color class string."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatTime",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Formats a date string using date-fns.",
            "PRE": "dateStr is a valid date string or null.",
            "POST": "Returns human-readable relative time string."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleTaskClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Forwards the selected task through a callback prop.",
            "PRE": "taskId is provided.",
            "POST": "Parent callback receives task id and task payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 18
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 63
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 65
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 99
        }
      ]
    },
    {
      "name": "DynamicForm",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 90,
      "tags": {
        "SEMANTICS": "form, schema, dynamic, json-schema",
        "PURPOSE": "Generates a form dynamically based on a JSON schema.",
        "LAYER": "UI",
        "PROPS": "",
        "EVENTS": ""
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "onsubmit callback"
        }
      ],
      "children": [
        {
          "name": "handleSubmit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Emits submitted form data via callback prop.",
            "PRE": "formData contains user input.",
            "POST": "Parent callback receives formData snapshot."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "initializeForm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Initialize form data with default values from the schema.",
            "PRE": "schema is provided and contains properties.",
            "POST": "formData is initialized with default values or empty strings."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 17
        }
      ]
    },
    {
      "name": "EnvSelector",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 59,
      "tags": {
        "SEMANTICS": "environment, selector, dropdown, migration",
        "PURPOSE": "Provides a UI component for selecting source and target environments.",
        "LAYER": "Feature",
        "INVARIANT": "Source and target environments must be selectable from the list of configured environments."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "environments store"
        }
      ],
      "children": [
        {
          "name": "handleSelect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Propagates the selection change through a callback prop.",
            "PRE": "event.target must be an HTMLSelectElement.",
            "POST": "selectedId is updated and parent callback receives the selected environment id.",
            "PARAM": "{Event} event - The change event from the select element."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 22
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 50
        }
      ]
    },
    {
      "name": "StartupEnvironmentWizard",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 210,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Blocking startup wizard for creating the first Superset environment from zero-state screens.",
        "LAYER": "UI",
        "INVARIANT": "When open, wizard keeps user on an actionable setup path until the first environment exists.",
        "UX_STATE": "Error -> Shows validation or backend error inline.",
        "UX_FEEDBACK": "Toast on success, inline banner on failure.",
        "UX_RECOVERY": "User can switch to advanced settings or retry save with corrected data."
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "api"
        },
        {
          "type": "CALLS",
          "target": "environmentContext"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "app",
          "type": "READS_FROM",
          "line": 18
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 19
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 20
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 21
        },
        {
          "store": "lib",
          "type": "READS_FROM",
          "line": 22
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 24
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 25
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 26
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 27
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 28
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 29
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 84
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 93
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 97
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 103
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 114
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 115
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 116
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 119
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 128
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 129
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 132
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 134
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 135
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 136
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 142
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 144
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 145
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 146
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 149
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 157
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 161
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 165
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 169
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 173
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 184
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 194
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 198
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 201
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 201
        }
      ]
    },
    {
      "name": "StartupEnvironmentWizard",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 210,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/components/StartupEnvironmentWizard.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "createInitialForm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "slugifyEnvironmentId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeSupersetBaseUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetWizard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleNameInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleIdInput",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openAdvancedSettings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCreateEnvironment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ProtectedRouteModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 144,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "auth, route-guard, permission, redirect, session-validation",
        "PURPOSE": "Enforces authenticated and authorized access before protected route content is rendered.",
        "LAYER": "UI",
        "INVARIANT": "Unauthenticated users are redirected to /login, unauthorized users are redirected to fallbackPath, and protected slot renders only when access is verified.",
        "UX_STATE": "Success -> Protected slot content is rendered for authenticated users with valid access.",
        "UX_FEEDBACK": "Spinner feedback during Loading and navigation redirect feedback on Error/Unauthorized outcomes.",
        "UX_RECOVERY": "Re-authenticate via /login after logout; retry occurs automatically on next protected navigation.",
        "UX_REACTIVITY": "Props are bound via $props; local mutable UI flags use $state; auth store is consumed through Svelte store subscription ($auth).",
        "TEST_CONTRACT": "[token:user:requiredPermission] -> [redirect:/login | redirect:fallbackPath | render:slot]",
        "TEST_SCENARIO": "AuthorizedRender -> Renders slot when authenticated and permission passes.",
        "TEST_FIXTURE": "AuthGuardStateMatrix -> INLINE_JSON",
        "TEST_EDGE": "external_fail -> /auth/me network/API failure triggers logout and /login redirect.",
        "TEST_INVARIANT": "ProtectedRenderGate -> VERIFIED_BY: [AuthorizedRender]"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "authStore"
        },
        {
          "type": "CALLS",
          "target": "goto"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Permissions"
        },
        {
          "type": "CALLS",
          "target": "fetchApi"
        }
      ],
      "children": [
        {
          "name": "ProtectedRoute",
          "type": "Component",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 143,
          "tags": {
            "PURPOSE": "Wraps protected slot content with session and permission verification guards.",
            "PRE": "auth store and navigation API are available in runtime; component is mounted in a browser context.",
            "POST": "Slot renders only when $auth.isAuthenticated and hasRouteAccess are both true.",
            "SIDE_EFFECT": "Performs /auth/me request, mutates auth store state, emits console instrumentation logs, and executes navigation redirects.",
            "DATA_CONTRACT": "Input[$props.requiredPermission?: string|null, $props.fallbackPath?: string] -> Output[UIState{isCheckingAccess:boolean, hasRouteAccess:boolean}]"
          },
          "relations": [],
          "children": [
            {
              "name": "verifySessionAndAccess",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 61,
              "end_line": 128,
              "tags": {
                "PURPOSE": "Validates session and optional permission gate before allowing protected content render.",
                "PRE": "auth store is initialized and can provide token/user state; navigation is available.",
                "POST": "hasRouteAccess=true only when user identity is valid and permission check (if provided) passes.",
                "SIDE_EFFECT": "Mutates auth loading/user state, performs API I/O to /auth/me, and may redirect.",
                "DATA_CONTRACT": "Input[AuthState, requiredPermission, fallbackPath] -> Output[RouteDecision{login_redirect|fallback_redirect|grant}]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "TaskLogPanel",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 151,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "task, log, panel, filter, list",
        "PURPOSE": "Combines log filtering and display into a single cohesive dark-themed panel.",
        "LAYER": "UI",
        "INVARIANT": "Must always display logs in chronological order and respect auto-scroll preference.",
        "UX_STATE": "AutoScroll -> Automatically scrolls to bottom on new logs"
      },
      "relations": [
        {
          "type": "USES",
          "target": "LogFilterBar"
        },
        {
          "type": "USES",
          "target": "LogEntryRow"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.6
      },
      "data_flow": [
        {
          "store": "bindable",
          "type": "WRITES_TO",
          "line": 21
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 23
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 25
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 26
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 27
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 29
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 53
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 77
        }
      ]
    },
    {
      "name": "TaskLogPanel",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 151,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/components/tasks/TaskLogPanel.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "filterLogs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleFilterChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "scrollToBottom",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toggleAutoScroll",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "LogFilterBar",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 142,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "log, filter, ui",
        "PURPOSE": "Compact filter toolbar for logs \u2014 level, source, and text search in a single dense row.",
        "LAYER": "UI",
        "UX_STATE": "Active -> Filters applied, clear button visible"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.75
      },
      "data_flow": [
        {
          "store": "bindable",
          "type": "WRITES_TO",
          "line": 15
        },
        {
          "store": "bindable",
          "type": "WRITES_TO",
          "line": 16
        },
        {
          "store": "bindable",
          "type": "WRITES_TO",
          "line": 17
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 19
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 63
        }
      ]
    },
    {
      "name": "LogFilterBar",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 142,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/components/tasks/LogFilterBar.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handleLevelChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSourceChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSearchChange",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clearFilters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "LogEntryRow",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 102,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "log, entry, row, ui",
        "PURPOSE": "Renders a single log entry with stacked layout optimized for narrow drawer panels.",
        "LAYER": "UI",
        "UX_STATE": "Idle -> Displays log entry with color-coded level and source badges.",
        "TYPE": "{Object} log - The log entry object */"
      },
      "relations": [
        {
          "type": "USES",
          "target": "App"
        }
      ],
      "children": [
        {
          "name": "formatTime",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Format ISO timestamp to HH:MM:SS */"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.75
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 13
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 29
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 46
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 49
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 54
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 55
        }
      ]
    },
    {
      "name": "TaskResultPanel",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 115,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/components/tasks/TaskResultPanel.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "statusColor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 8,
          "end_line": 8,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TaskLogViewerTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, task-log, viewer, mount, components",
        "PURPOSE": "Unit tests for TaskLogViewer component by mounting it and observing the DOM.",
        "LAYER": "UI (Tests)",
        "INVARIANT": "Duplicate logs are never appended. Polling only active for in-progress tasks.",
        "TEST_CONTRACT": "TaskLogViewerPropsAndLogStream -> RenderedLogTimeline",
        "TEST_SCENARIO": "historical_and_realtime_merge -> Historical logs render and realtime logs append without duplication.",
        "TEST_FIXTURE": "valid_viewer -> INLINE_JSON",
        "TEST_EDGE": "duplicate_realtime_entry -> Existing log is not duplicated when repeated in realtime stream.",
        "TEST_INVARIANT": "no_duplicate_log_rows -> VERIFIED_BY: [historical_and_realtime_merge, duplicate_realtime_entry]"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "TaskLogViewer"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:TaskLogViewerTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "FileList",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 161,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "SEMANTICS": "storage, files, list, table",
        "PURPOSE": "Displays a table of files with metadata and actions.",
        "LAYER": "UI",
        "PROPS": "files (Array) - List of StoredFile objects.",
        "EVENTS": "ondelete/onnavigate callback props - Raised when a file is deleted or navigation is requested."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "storageService"
        }
      ],
      "children": [
        {
          "name": "isDirectory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Checks if a file object represents a directory.",
            "PRE": "file object has mime_type property.",
            "POST": "Returns boolean.",
            "PARAM": "{Object} file - The file object to check.",
            "RETURN": "{boolean} True if it's a directory, false otherwise."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatSize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Formats file size in bytes into a human-readable string.",
            "PRE": "bytes is a number.",
            "POST": "Returns formatted string.",
            "PARAM": "{number} bytes - The size in bytes.",
            "RETURN": "{string} Formatted size (e.g., \"1.2 MB\")."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "formatDate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Formats an ISO date string into a localized readable format.",
            "PRE": "dateStr is a valid date string.",
            "POST": "Returns localized string.",
            "PARAM": "{string} dateStr - The date string to format.",
            "RETURN": "{string} Localized date and time."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDownload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 87,
          "tags": {
            "PURPOSE": "Downloads selected file through authenticated API request.",
            "PRE": "file is a non-directory storage entry with category/path.",
            "POST": "Browser download starts or user sees toast on failure."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 26
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 95
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 96
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 97
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 98
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 99
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 137
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 144
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 151
        }
      ]
    },
    {
      "name": "FileUpload",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 139,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "SEMANTICS": "storage, upload, files",
        "PURPOSE": "Provides a form for uploading files to a specific category.",
        "LAYER": "UI",
        "PROPS": "None",
        "EVENTS": "onuploaded callback prop - Invoked when a file is successfully uploaded."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "storageService"
        }
      ],
      "children": [
        {
          "name": "handleUpload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Handles the file upload process.",
            "PRE": "A file must be selected in the file input.",
            "POST": "The file is uploaded to the server and a success toast is shown."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDrop",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Handles the file drop event for drag-and-drop.",
            "PARAM": "{DragEvent} event - The drop event."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 51
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 55
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 81
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 85
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 91
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 92
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 100
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 111
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 122
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 124
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 131
        }
      ]
    },
    {
      "name": "ConnectionForm",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 93,
      "tags": {
        "SEMANTICS": "connection, form, settings",
        "PURPOSE": "UI component for creating a new database connection configuration.",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "USES",
          "target": "frontend/src/services/connectionService.js"
        }
      ],
      "children": [
        {
          "name": "handleSubmit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Submits the connection form to the backend.",
            "PRE": "All required fields (name, host, database, username, password) must be filled.",
            "POST": "A new connection is created via the connection service and the parent success callback is invoked."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetForm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Resets the connection form fields to their default values.",
            "PRE": "None.",
            "POST": "All form input variables are reset."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 15
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 17
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 18
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 19
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 20
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 21
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 22
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 23
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 24
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 32
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 41
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 69
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 71
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 71
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 75
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 78
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 81
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 82
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 87
        }
      ]
    },
    {
      "name": "ConnectionList",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 86,
      "tags": {
        "SEMANTICS": "connection, list, settings",
        "PURPOSE": "UI component for listing and deleting saved database connection configurations.",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "USES",
          "target": "frontend/src/services/connectionService.js"
        }
      ],
      "children": [
        {
          "name": "fetchConnections",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Fetches the list of connections from the backend.",
            "PRE": "None.",
            "POST": "connections array is populated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDelete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Deletes a connection configuration.",
            "PRE": "id is provided and user confirms deletion.",
            "POST": "Connection is deleted from backend and list is reloaded."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      },
      "data_flow": [
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 17
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 18
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 29
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 41
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 45
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 60
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 63
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 65
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 78
        }
      ]
    },
    {
      "name": "MapperTool",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 250,
      "tags": {
        "SEMANTICS": "mapper, tool, dataset, postgresql, excel",
        "PURPOSE": "UI component for mapping dataset column verbose names using the MapperPlugin.",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "USES",
          "target": "frontend/src/services/toolsService.js"
        },
        {
          "type": "USES",
          "target": "frontend/src/services/connectionService.js"
        }
      ],
      "children": [
        {
          "name": "fetchData",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Fetches environments and saved connections.",
            "PRE": "None.",
            "POST": "envs and connections arrays are populated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleRunMapper",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Triggers the MapperPlugin task.",
            "PRE": "selectedEnv and datasetId are set; source-specific fields are valid.",
            "POST": "Mapper task is started and selectedTask is updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleGenerateDocs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 127,
          "tags": {
            "PURPOSE": "Triggers the LLM Documentation task.",
            "PRE": "selectedEnv and datasetId are set.",
            "POST": "Documentation task is started."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      },
      "data_flow": [
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 44
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 55
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 60
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 65
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 83
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 98
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 109
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 120
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 122
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 133
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 135
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 144
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 149
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 152
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 159
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 167
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 171
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 175
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 184
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 187
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 195
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 202
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 212
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 215
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 227
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 229
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 237
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 237
        }
      ]
    },
    {
      "name": "MapperTool",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 250,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/components/tools/MapperTool.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handleApplyDoc",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "DebugTool",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 191,
      "tags": {
        "SEMANTICS": "debug, tool, api, structure",
        "PURPOSE": "UI component for system diagnostics and debugging API responses.",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "USES",
          "target": "frontend/src/services/toolsService.js"
        }
      ],
      "children": [
        {
          "name": "fetchEnvironments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Fetches available environments.",
            "PRE": "API is available.",
            "POST": "envs variable is populated.",
            "RETURNS": "{Promise<void>}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleRunDebug",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Triggers the debug task.",
            "PRE": "Required fields are selected.",
            "POST": "Task is started and polling begins.",
            "RETURNS": "{Promise<void>}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "startPolling",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 117,
          "tags": {
            "PURPOSE": "Polls for task completion.",
            "PRE": "Task ID is valid.",
            "POST": "Polls until success/failure.",
            "PARAM": "{string} taskId - ID of the task.",
            "RETURNS": "{void}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      },
      "data_flow": [
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 39
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 58
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 68
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 105
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 109
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 124
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 127
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 129
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 130
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 137
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 139
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 146
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 148
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 158
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 160
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 167
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 175
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 175
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 183
        }
      ]
    },
    {
      "name": "CommitHistory",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 99,
      "tags": {
        "SEMANTICS": "git, history, commits, audit",
        "PURPOSE": "Displays the commit history for a specific dashboard.",
        "LAYER": "Component"
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "gitService.getHistory"
        }
      ],
      "children": [
        {
          "name": "onMount",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Load history when component is mounted.",
            "PRE": "Component is initialized with dashboardId.",
            "POST": "loadHistory is called."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadHistory",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Fetch commit history from the backend.",
            "PRE": "dashboardId is valid.",
            "POST": "history state is updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 22
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 27
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 28
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 68
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 71
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 80
        }
      ]
    },
    {
      "name": "DeploymentModal",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 238,
      "tags": {
        "SEMANTICS": "deployment, git, environment, modal",
        "PURPOSE": "Modal for deploying a dashboard to a target environment.",
        "LAYER": "Component",
        "INVARIANT": "Cannot deploy without a selected environment."
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "GitService"
        },
        {
          "type": "DISPATCHES",
          "target": "deploy"
        }
      ],
      "children": [
        {
          "name": "loadStatus",
          "type": "Watcher",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 51,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalizeEnvStage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Normalize environment stage with legacy production fallback.",
            "POST": "Returns DEV/PREPROD/PROD."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveEnvUrl",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Resolve environment URL from consolidated or git-specific payload shape.",
            "POST": "Returns stable URL string."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadEnvironments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Fetch available environments from API.",
            "POST": "environments state is populated.",
            "SIDE_EFFECT": "Updates environments state."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDeploy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Trigger deployment to selected environment.",
            "PRE": "selectedEnv must be set.",
            "POST": "Deploy request finishes and modal closes on success.",
            "SIDE_EFFECT": "Triggers API call, closes modal, shows toast."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "bindable",
          "type": "WRITES_TO",
          "line": 21
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 21
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 26
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 27
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 28
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 29
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 32
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 39
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 42
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 45
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 48
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 99
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 128
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 149
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 152
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 155
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 162
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 173
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 198
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 226
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 228
        }
      ]
    },
    {
      "name": "ConflictResolver",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 179,
      "tags": {
        "SEMANTICS": "git, conflict, resolution, merge",
        "PURPOSE": "UI for resolving merge conflicts (Keep Mine / Keep Theirs).",
        "LAYER": "Component",
        "INVARIANT": "User must resolve all conflicts before saving.",
        "TYPE": "{Object.<string, 'mine' | 'theirs' | 'manual'>} */"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "onresolve"
        }
      ],
      "children": [
        {
          "name": "resolve",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Set resolution strategy for a file.",
            "PRE": "file path must exist in conflicts array.",
            "POST": "resolutions state is updated for the given file.",
            "PARAM": "{'mine'|'theirs'} strategy - Resolution strategy.",
            "SIDE_EFFECT": "Updates resolutions state."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSave",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Validate and submit resolutions.",
            "PRE": "All conflicts must have a resolution.",
            "POST": "Parent callback receives resolutions if valid.",
            "SIDE_EFFECT": "Dispatches event and closes modal."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "bindable",
          "type": "WRITES_TO",
          "line": 19
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 21
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 27
        }
      ]
    },
    {
      "name": "CommitModal",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 269,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "SEMANTICS": "git, commit, modal, version_control, diff",
        "PURPOSE": "\u041c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u0441 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (diff).",
        "LAYER": "Component"
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "GitService"
        },
        {
          "type": "CALLS",
          "target": "GitService"
        },
        {
          "type": "CALLS",
          "target": "GitService"
        },
        {
          "type": "CALLS",
          "target": "commit"
        }
      ],
      "children": [
        {
          "name": "handleGenerateMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Generates a commit message using LLM."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 103,
          "tags": {
            "PURPOSE": "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 diff.",
            "PRE": "dashboardId \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCommit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 130,
          "tags": {
            "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0438\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c.",
            "PRE": "message \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u043c.",
            "POST": "\u041a\u043e\u043c\u043c\u0438\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0438 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u043e."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 24
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 29
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 30
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 31
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 32
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 52
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 55
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 98
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 119
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 132
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 145
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 154
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 162
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 164
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 171
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 180
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 186
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 195
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 204
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 222
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 229
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 238
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 250
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 261
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 261
        }
      ]
    },
    {
      "name": "BranchSelector",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 180,
      "tags": {
        "SEMANTICS": "git, branch, selection, checkout",
        "PURPOSE": "UI \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u0442\u043e\u043a Git.",
        "LAYER": "Component"
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "gitService.getBranches"
        },
        {
          "type": "CALLS",
          "target": "GitServiceBranch"
        },
        {
          "type": "CALLS",
          "target": "gitService.createBranch"
        },
        {
          "type": "BINDS_TO",
          "target": "onchange"
        }
      ],
      "children": [
        {
          "name": "onMount",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Load branches when component is mounted.",
            "PRE": "Component is initialized.",
            "POST": "loadBranches is called."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadBranches",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 67,
          "tags": {
            "PURPOSE": "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0435\u0442\u043e\u043a \u0434\u043b\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430.",
            "PRE": "dashboardId is provided.",
            "POST": "branches \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSelect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Handles branch selection from dropdown.",
            "PRE": "event contains branch name.",
            "POST": "handleCheckout is called with selected branch."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCheckout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 99,
          "tags": {
            "PURPOSE": "\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0432\u0435\u0442\u043a\u0443.",
            "PARAM": "{string} branchName - \u0418\u043c\u044f \u0432\u0435\u0442\u043a\u0438.",
            "POST": "currentBranch \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d, \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 callback \u0432\u044b\u0437\u0432\u0430\u043d."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCreate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 122,
          "tags": {
            "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0442\u043a\u0443.",
            "PRE": "newBranchName is not empty.",
            "POST": "\u041d\u043e\u0432\u0430\u044f \u0432\u0435\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u0430; showCreate reset."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      },
      "data_flow": [
        {
          "store": "bindable",
          "type": "WRITES_TO",
          "line": 25
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 27
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 32
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 62
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 92
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 112
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 144
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 153
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 165
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 173
        }
      ]
    },
    {
      "name": "GitManager",
      "type": "Component",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1212,
      "tags": {
        "SEMANTICS": "git, manager, dashboard, version_control, tabs, workflow",
        "PURPOSE": "\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 UI \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Git \u0441 \u0444\u043e\u043a\u0443\u0441\u043e\u043c \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u043e\u0442\u043e\u043a \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 (commit -> promote -> deploy).",
        "LAYER": "Component"
      },
      "relations": [
        {
          "type": "USES",
          "target": "BranchSelector"
        },
        {
          "type": "USES",
          "target": "DeploymentModal"
        },
        {
          "type": "CALLS",
          "target": "gitService"
        }
      ],
      "children": [
        {
          "name": "normalizeEnvStage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Normalize environment stage with legacy fallback.",
            "POST": "Returns DEV/PREPROD/PROD."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stageBadgeClass",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 110,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Return visual class for environment stage badges.",
            "POST": "Stage badge is color-coded by risk level."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveCurrentEnvironmentId",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 132,
          "tags": {
            "PURPOSE": "Resolve active environment id for current dashboard session.",
            "POST": "Returns env id from prop or selected_env_id in localStorage."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "applyGitflowStageDefaults",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 134,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Apply GitFlow defaults by current environment stage.",
            "POST": "Promote branches and preferred deploy target stage are set."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadCurrentEnvironmentStage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Detect current environment stage and bind GitFlow defaults.",
            "POST": "currentEnvStage and promote/deploy defaults are refreshed."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "isNumericDashboardRef",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Checks whether current dashboard reference is numeric ID.",
            "POST": "Returns true when dashboardId is digits-only."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkStatus",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 189,
          "end_line": 215,
          "tags": {
            "PURPOSE": "Verify repository initialization for dashboard slug.",
            "POST": "initialized status and config list are updated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadWorkspace",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 217,
          "end_line": 237,
          "tags": {
            "PURPOSE": "Load current git status and combined diff for workspace tab.",
            "POST": "workspace status/diff are refreshed."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSync",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 239,
          "end_line": 261,
          "tags": {
            "PURPOSE": "Sync latest dashboard config from Superset to git workspace.",
            "POST": "Workspace status is refreshed."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleGenerateMessage",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 263,
          "end_line": 282,
          "tags": {
            "PURPOSE": "Generate commit message from diff using LLM.",
            "POST": "commitMessage gets generated content."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCommit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 284,
          "end_line": 308,
          "tags": {
            "PURPOSE": "Commit current workspace changes with provided message.",
            "POST": "Changes are committed and workspace is refreshed."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handlePull",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 310,
          "end_line": 507,
          "tags": {
            "PURPOSE": "Pull remote changes for current branch.",
            "POST": "Workspace status is refreshed."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handlePush",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 509,
          "end_line": 526,
          "tags": {
            "PURPOSE": "Push local commits to remote repository.",
            "POST": "Workspace status is refreshed."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handlePromote",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 528,
          "end_line": 576,
          "tags": {
            "PURPOSE": "Promote branch to the next stage via MR or unsafe direct mode.",
            "POST": "Promotion result is shown to user."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openDeployModal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 578,
          "end_line": 594,
          "tags": {
            "PURPOSE": "Open deploy modal with extra confirmation for PROD context.",
            "POST": "Deploy modal is shown when confirmation passes."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getSelectedConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 596,
          "end_line": 604,
          "tags": {
            "PURPOSE": "Return currently selected git server config.",
            "POST": "Config object or null."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolveDefaultConfig",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 606,
          "end_line": 620,
          "tags": {
            "PURPOSE": "Resolve default git config for current session.",
            "POST": "Returns config by selected -> is_default -> CONNECTED -> first."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolvePushProviderLabel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 622,
          "end_line": 634,
          "tags": {
            "PURPOSE": "Resolve lower-case provider label for auto-push checkbox.",
            "POST": "Returns provider label, fallback \"git\"."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractHttpHost",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 636,
          "end_line": 652,
          "tags": {
            "PURPOSE": "Extract comparable host[:port] from URL string.",
            "POST": "Returns lowercase host token or empty string."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "buildSuggestedRepoName",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 654,
          "end_line": 667,
          "tags": {
            "PURPOSE": "Build deterministic repository name from dashboard title/id.",
            "POST": "Returns kebab-case repository name."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCreateRemoteRepo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 669,
          "end_line": 707,
          "tags": {
            "PURPOSE": "Create remote repository on selected Git provider.",
            "POST": "remoteUrl is filled from provider response."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleInit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 709,
          "end_line": 733,
          "tags": {
            "PURPOSE": "Initialize git repository for dashboard.",
            "POST": "Repository is linked and workspace is loaded."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "closeModal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 735,
          "end_line": 743,
          "tags": {
            "PURPOSE": "Close git manager modal.",
            "POST": "show=false."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleBackdropClick",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 745,
          "end_line": 755,
          "tags": {
            "PURPOSE": "Close modal on backdrop click.",
            "POST": "show=false if clicked on overlay."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      },
      "data_flow": [
        {
          "store": "bindable",
          "type": "WRITES_TO",
          "line": 29
        },
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 30
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 37
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 38
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 40
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 41
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 42
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 43
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 45
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 46
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 47
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 48
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 49
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 50
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 51
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 52
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 53
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 55
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 56
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 57
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 58
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 59
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 60
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 61
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 62
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 63
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 64
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 65
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 66
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 67
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 68
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 69
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 70
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 71
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 72
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 73
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 74
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 75
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 78
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 88
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 253
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 275
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 277
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 296
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 298
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 371
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 382
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 400
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 405
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 418
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 425
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 430
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 440
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 444
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 454
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 458
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 473
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 482
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 484
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 494
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 518
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 677
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 716
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 722
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 757
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 758
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 759
        },
        {
          "store": "effect",
          "type": "READS_FROM",
          "line": 764
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 804
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 810
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 816
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 823
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 835
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 840
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 845
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 849
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 851
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 869
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 963
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 1098
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1102
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1105
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 1110
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 1114
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1128
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1141
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1154
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1162
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1170
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1179
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1186
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 1189
        }
      ]
    },
    {
      "name": "GitManager",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 1212,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/components/git/GitManager.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "tryParseJsonObject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 315,
          "end_line": 315,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extractUnfinishedMergeContext",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 326,
          "end_line": 326,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "openUnfinishedMergeDialogFromError",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 353,
          "end_line": 353,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loadMergeRecoveryState",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 361,
          "end_line": 361,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "closeUnfinishedMergeDialog",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 388,
          "end_line": 388,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleOpenConflictResolver",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 395,
          "end_line": 395,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleResolveConflicts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 411,
          "end_line": 411,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleAbortUnfinishedMerge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 436,
          "end_line": 436,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleContinueUnfinishedMerge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 450,
          "end_line": 450,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "getUnfinishedMergeCommandsText",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 465,
          "end_line": 465,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleCopyUnfinishedMergeCommands",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 470,
          "end_line": 470,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1212 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "GitManagerUnfinishedMergeIntegrationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "git-manager, unfinished-merge, dialog, integration-test",
        "PURPOSE": "Protect unresolved-merge dialog contract in GitManager pull flow.",
        "LAYER": "UI Tests"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "frontend/src/components/git/GitManager.svelte"
        }
      ],
      "children": [],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:GitManagerUnfinishedMergeIntegrationTest:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "DocPreview",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 88,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "PURPOSE": "UI component for previewing generated dataset documentation before saving.",
        "LAYER": "UI",
        "TYPE": "{Object} */"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend/src/plugins/llm_analysis/plugin.py"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 22
        },
        {
          "store": "derived",
          "type": "WRITES_TO",
          "line": 24
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 26
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 43
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 46
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 49
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 74
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 81
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 81
        }
      ]
    },
    {
      "name": "DocPreview",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 88,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/components/llm/DocPreview.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "handleSave",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ProviderConfig",
      "type": "Component",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 424,
      "tags": {
        "UX_STATE": "Loading -> Default",
        "COMPLEXITY": "3",
        "PURPOSE": "UI form for managing LLM provider configurations.",
        "LAYER": "UI"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "requestApi"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9
      },
      "data_flow": [
        {
          "store": "props",
          "type": "WRITES_TO",
          "line": 19
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 21
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 22
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 24
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 33
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 34
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 35
        },
        {
          "store": "state",
          "type": "WRITES_TO",
          "line": 36
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 84
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 93
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 97
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 106
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 171
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 183
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 187
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 189
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 202
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 211
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 223
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 223
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 231
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 246
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 263
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 277
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 292
        },
        {
          "store": "t",
          "type": "WRITES_TO",
          "line": 312
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 333
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 341
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 341
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 348
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 366
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 372
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 373
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 386
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 397
        },
        {
          "store": "t",
          "type": "READS_FROM",
          "line": 418
        }
      ]
    },
    {
      "name": "ProviderConfig",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 424,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/components/llm/ProviderConfig.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "isMultimodalModel",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resetForm",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleEdit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "testConnection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleSubmit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 113,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "toggleActive",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 137,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "handleDelete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 167,
          "end_line": 167,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 424 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "ValidationReport",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 79,
      "tags": {
        "PURPOSE": "Auto-generated module for frontend/src/components/llm/ValidationReport.svelte",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "getStatusColor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ProviderConfigIntegrationTest",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 61,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "llm, provider-config, integration-test, edit-flow, delete-flow",
        "PURPOSE": "Protect edit and delete interaction contracts in LLM provider settings UI.",
        "LAYER": "UI Tests",
        "INVARIANT": "Edit action keeps explicit click handler and opens normalized edit form."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "ProviderConfig"
        }
      ],
      "children": [
        {
          "name": "provider_config_edit_contract_tests",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 18,
          "end_line": 60,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Validate edit and delete handler wiring plus normalized edit form state mapping.",
            "PRE": "ProviderConfig component source exists in expected path.",
            "POST": "Contract checks ensure edit click cannot degrade into no-op flow."
          },
          "relations": [
            {
              "type": "USES",
              "target": "App"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 18
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 18
              }
            ],
            "score": 0.5499999999999999
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "DeleteRunningTasksUtil",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 2,
      "end_line": 46,
      "tags": {
        "PURPOSE": "Script to delete tasks with RUNNING status from the database.",
        "LAYER": "Utility",
        "SEMANTICS": "maintenance, database, cleanup"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TasksSessionLocal"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskRecord"
        }
      ],
      "children": [
        {
          "name": "delete_running_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Delete all tasks with RUNNING status from the database.",
            "PRE": "Database is accessible and TaskRecord model is defined.",
            "POST": "All tasks with status 'RUNNING' are removed from the database."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AppModule",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 499,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "app, main, entrypoint, fastapi",
        "PURPOSE": "The main entry point for the FastAPI application. It initializes the app, configures CORS, sets up dependencies, includes API routers, and defines the WebSocket endpoint for log streaming.",
        "LAYER": "UI (API)",
        "INVARIANT": "All WebSocket connections must be properly cleaned up on disconnect.",
        "PRE": "Python environment and dependencies installed; configuration database available.",
        "POST": "FastAPI app instance is created, middleware configured, and routes registered.",
        "SIDE_EFFECT": "Starts background scheduler and binds network ports for HTTP/WS traffic.",
        "DATA_CONTRACT": "[HTTP Request | WS Message] -> [HTTP Response | JSON Log Stream]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AppDependencies"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ApiRoutesModule"
        }
      ],
      "children": [
        {
          "name": "FastAPI_App",
          "type": "Global",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 59,
          "end_line": 70,
          "tags": {
            "COMPLEXITY": "3",
            "SEMANTICS": "app, fastapi, instance, route-registry",
            "PURPOSE": "Canonical FastAPI application instance for route, middleware, and websocket registration."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ApiRoutesModule"
            },
            {
              "type": "BINDS_TO",
              "target": "API_Routes"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ensure_initial_admin_user",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 73,
          "end_line": 125,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Ensures initial admin user exists when bootstrap env flags are enabled."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 73
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 73
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "startup_event",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 128,
          "end_line": 144,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Handles application startup tasks, such as starting the scheduler.",
            "PRE": "None.",
            "POST": "Scheduler is started."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "AppDependencies"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "shutdown_event",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 147,
          "end_line": 161,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Handles application shutdown tasks, such as stopping the scheduler.",
            "PRE": "None.",
            "POST": "Scheduler is stopped."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "AppDependencies"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "app_middleware",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 178,
          "tags": {
            "PURPOSE": "Configure application-wide middleware (Session, CORS)."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "network_error_handler",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 181,
          "end_line": 198,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Global exception handler for NetworkError.",
            "PRE": "request is a FastAPI Request object.",
            "POST": "Returns 503 HTTP Exception.",
            "PARAM": "exc (NetworkError) - The exception instance."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "log_requests",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 201,
          "end_line": 233,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Middleware to log incoming HTTP requests and their response status.",
            "PRE": "request is a FastAPI Request object.",
            "POST": "Logs request and response details.",
            "PARAM": "call_next (Callable) - The next middleware or route handler."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "LoggerModule"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "API_Routes",
          "type": "Block",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 235,
          "end_line": 273,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Register all FastAPI route groups exposed by the application entrypoint."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "FastAPI_App"
            },
            {
              "type": "DEPENDS_ON",
              "target": "Route_Group_Contracts"
            },
            {
              "type": "DEPENDS_ON",
              "target": "AuthApi"
            },
            {
              "type": "DEPENDS_ON",
              "target": "AdminApi"
            },
            {
              "type": "DEPENDS_ON",
              "target": "PluginsRouter"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TasksRouter"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SettingsRouter"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ConnectionsRouter"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ReportsRouter"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LlmRoutes"
            },
            {
              "type": "DEPENDS_ON",
              "target": "CleanReleaseV2Api"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "api.include_routers",
          "type": "Action",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 276,
          "end_line": 281,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Registers all API routers with the FastAPI application.",
            "LAYER": "API",
            "SEMANTICS": "routes, registration, api"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "websocket_endpoint",
          "type": "Function",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 284,
          "end_line": 445,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Provides a WebSocket endpoint for real-time log streaming of a task with server-side filtering.",
            "PRE": "task_id must be a valid task ID.",
            "POST": "WebSocket connection is managed and logs are streamed until disconnect.",
            "SIDE_EFFECT": "Subscribes to TaskManager log queue and broadcasts messages over network.",
            "DATA_CONTRACT": "[task_id: str, source: str, level: str] -> [JSON log entry objects]",
            "INVARIANT": "Every accepted WebSocket subscription is unsubscribed exactly once even when streaming fails or the client disconnects.",
            "UX_STATE": "Connecting -> Streaming -> (Disconnected)",
            "TEST_CONTRACT": "WebSocketLogStreamApi ->",
            "TEST_FIXTURE": "valid_ws_connection -> {\"task_id\": \"test_1\", \"source\": \"plugin\"}",
            "TEST_EDGE": "empty_task_logs -> waits for new logs",
            "TEST_INVARIANT": "consistent_streaming -> verifies: [valid_ws_connection]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "TaskManagerPackage"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LoggerModule"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.95
          }
        },
        {
          "name": "StaticFiles",
          "type": "Mount",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 447,
          "end_line": 498,
          "tags": {
            "COMPLEXITY": "1",
            "SEMANTICS": "static, frontend, spa",
            "PURPOSE": "Mounts the frontend build directory to serve static assets."
          },
          "relations": [],
          "children": [
            {
              "name": "serve_spa",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 457,
              "end_line": 483,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Serves the SPA frontend for any path not matched by API routes.",
                "PRE": "frontend_path exists.",
                "POST": "Returns the requested file or index.html."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "read_root",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 485,
              "end_line": 497,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "A simple root endpoint to confirm that the API is running when frontend is missing.",
                "PRE": "None.",
                "POST": "Returns a JSON message indicating API status."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "matches_filters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 346,
          "end_line": 346,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 499 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8166666666666667
      }
    },
    {
      "name": "AppDependencies",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 304,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dependency, injection, singleton, factory, auth, jwt",
        "PURPOSE": "Manages creation and provision of shared application dependencies, such as PluginLoader and TaskManager, to avoid circular imports.",
        "LAYER": "Core",
        "RELATION": "Used by main app and API routers to get access to shared instances."
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "CleanReleaseRepository"
        },
        {
          "type": "CALLS",
          "target": "ConfigManager"
        },
        {
          "type": "CALLS",
          "target": "PluginLoader"
        },
        {
          "type": "CALLS",
          "target": "SchedulerService"
        },
        {
          "type": "CALLS",
          "target": "TaskManager"
        },
        {
          "type": "CALLS",
          "target": "get_all_plugin_configs"
        },
        {
          "type": "CALLS",
          "target": "get_db"
        },
        {
          "type": "CALLS",
          "target": "info"
        },
        {
          "type": "CALLS",
          "target": "init_db"
        }
      ],
      "children": [
        {
          "name": "get_config_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 76,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Dependency injector for ConfigManager.",
            "PRE": "Global config_manager must be initialized.",
            "POST": "Returns shared ConfigManager instance.",
            "RETURN": "ConfigManager - The shared config manager instance."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_plugin_loader",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 104,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Dependency injector for PluginLoader.",
            "PRE": "Global plugin_loader must be initialized.",
            "POST": "Returns shared PluginLoader instance.",
            "RETURN": "PluginLoader - The shared plugin loader instance."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_task_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 122,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Dependency injector for TaskManager.",
            "PRE": "Global task_manager must be initialized.",
            "POST": "Returns shared TaskManager instance.",
            "RETURN": "TaskManager - The shared task manager instance."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_scheduler_service",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 140,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Dependency injector for SchedulerService.",
            "PRE": "Global scheduler_service must be initialized.",
            "POST": "Returns shared SchedulerService instance.",
            "RETURN": "SchedulerService - The shared scheduler service instance."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_resource_service",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 143,
          "end_line": 158,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Dependency injector for ResourceService.",
            "PRE": "Global resource_service must be initialized.",
            "POST": "Returns shared ResourceService instance.",
            "RETURN": "ResourceService - The shared resource service instance."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_mapping_service",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 161,
          "end_line": 172,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Dependency injector for MappingService.",
            "PRE": "Global config_manager must be initialized.",
            "POST": "Returns new MappingService instance.",
            "RETURN": "MappingService - A new mapping service instance."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_clean_release_repository",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 187,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Legacy compatibility shim for CleanReleaseRepository.",
            "POST": "Returns a shared CleanReleaseRepository instance."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_clean_release_facade",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 190,
          "end_line": 219,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Dependency injector for CleanReleaseFacade.",
            "POST": "Returns a facade instance with a fresh DB session."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "oauth2_scheme",
          "type": "Variable",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 221,
          "end_line": 226,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "OAuth2 password bearer scheme for token extraction."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "OAuth2PasswordBearer"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_current_user",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 229,
          "end_line": 261,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Dependency for retrieving currently authenticated user from a JWT.",
            "PRE": "JWT token provided in Authorization header.",
            "POST": "Returns User object if token is valid.",
            "THROW": "HTTPException 401 if token is invalid or user not found.",
            "PARAM": "db (Session) - Auth database session.",
            "RETURN": "User - The authenticated user."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "AuthRepository"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "has_permission",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 264,
          "end_line": 302,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Dependency for checking if the current user has a specific permission.",
            "PRE": "User is authenticated.",
            "POST": "Returns True if user has permission.",
            "THROW": "HTTPException 403 if permission is denied.",
            "PARAM": "action (str) - The action identifier (READ, EXECUTE, WRITE).",
            "RETURN": "User - The authenticated user if permission granted."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "AuthRepository"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "permission_checker",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 275,
          "end_line": 275,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 304 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "SrcRoot",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Canonical backend package root for application, scripts, and tests."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "SeedSupersetLoadTestScript",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 399,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "superset, load-test, charts, dashboards, seed, stress",
        "PURPOSE": "Creates randomized load-test data in Superset by cloning chart configurations and creating dashboards in target environments.",
        "LAYER": "Scripts",
        "INVARIANT": "Created chart and dashboard names are globally unique for one script run."
      },
      "relations": [
        {
          "type": "USES",
          "target": "ConfigManager"
        },
        {
          "type": "USES",
          "target": "SupersetClient"
        }
      ],
      "children": [
        {
          "name": "_parse_args",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Parses CLI arguments for load-test data generation.",
            "PRE": "Script is called from CLI.",
            "POST": "Returns validated argument namespace."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_result_payload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Normalizes Superset API payloads that may be wrapped in `result`.",
            "PRE": "payload is a JSON-decoded API response.",
            "POST": "Returns the unwrapped object when present."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_created_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Extracts object ID from create/update API response.",
            "PRE": "payload is a JSON-decoded API response.",
            "POST": "Returns integer object ID or None if missing."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_generate_unique_name",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 141,
          "tags": {
            "PURPOSE": "Generates globally unique random names for charts/dashboards.",
            "PRE": "used_names is mutable set for collision tracking.",
            "POST": "Returns a unique string and stores it in used_names."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_target_envs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Resolves requested environment IDs from configuration.",
            "PRE": "env_ids is non-empty.",
            "POST": "Returns mapping env_id -> configured environment object."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_build_chart_template_pool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 252,
          "tags": {
            "PURPOSE": "Builds a pool of source chart templates to clone in one environment.",
            "PRE": "Client is authenticated.",
            "POST": "Returns non-empty list of chart payload templates."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seed_superset_load_data",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 255,
          "end_line": 377,
          "tags": {
            "PURPOSE": "Creates dashboards and cloned charts for load testing across target environments.",
            "PRE": "Target environments must be reachable and authenticated.",
            "POST": "Returns execution statistics dictionary.",
            "SIDE_EFFECT": "Creates objects in Superset environments."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 380,
          "end_line": 393,
          "tags": {
            "PURPOSE": "CLI entrypoint for Superset load-test data seeding.",
            "PRE": "Command line arguments are valid.",
            "POST": "Prints summary and exits with non-zero status on failure."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 399 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.47500000000000003
      }
    },
    {
      "name": "test_dataset_dashboard_relations_script",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 2,
      "end_line": 172,
      "tags": {
        "SEMANTICS": "scripts, test, dataset, dashboard, superset, relations",
        "PURPOSE": "Tests and inspects dataset-to-dashboard relationship responses from Superset API.",
        "COMPLEXITY": "2"
      },
      "relations": [],
      "children": [
        {
          "name": "test_dashboard_dataset_relations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "CleanReleaseTuiScript",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 684,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, tui, ncurses, interactive-validator",
        "PURPOSE": "Interactive terminal interface for Enterprise Clean Release compliance validation.",
        "LAYER": "UI",
        "INVARIANT": "TUI refuses startup in non-TTY environments; headless flow is CLI/API only."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "compliance_orchestrator"
        },
        {
          "type": "DEPENDS_ON",
          "target": "repository"
        }
      ],
      "children": [
        {
          "name": "TuiFacadeAdapter",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 192,
          "tags": {
            "PURPOSE": "Thin TUI adapter that routes business mutations through application services.",
            "PRE": "repository contains candidate and trusted policy/registry snapshots for execution.",
            "POST": "Business actions return service results/errors without direct TUI-owned mutations."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CleanReleaseTUI",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 195,
          "end_line": 657,
          "tags": {
            "PURPOSE": "Curses-based application for compliance monitoring.",
            "UX_STATE": "BLOCKED -> Violations detected, release forbidden.",
            "UX_FEEDBACK": "Red alerts for BLOCKED status, Green for COMPLIANT."
          },
          "relations": [],
          "children": [
            {
              "name": "run_checks",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 511,
              "end_line": 555,
              "tags": {
                "PURPOSE": "Execute compliance run via facade adapter and update UI state.",
                "PRE": "Candidate and policy snapshots are present in repository.",
                "POST": "UI reflects final run/report/violation state from service result."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_build_config_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_compliance",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "approve_latest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "publish_latest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_manifest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_overview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 203,
          "end_line": 203,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_build_repository",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 225,
          "end_line": 225,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_bootstrap_demo_repository",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 233,
          "end_line": 233,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_bootstrap_real_repository",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 306,
          "end_line": 306,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_candidate_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 377,
          "end_line": 377,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "draw_header",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 387,
          "end_line": 387,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "draw_checks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 405,
          "end_line": 405,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "draw_sources",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 441,
          "end_line": 441,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "draw_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 452,
          "end_line": 452,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "draw_footer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 503,
          "end_line": 503,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_manifest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 557,
          "end_line": 557,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clear_history",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 572,
          "end_line": 572,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "approve_latest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 581,
          "end_line": 581,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "publish_latest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 594,
          "end_line": 594,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refresh_overview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 607,
          "end_line": 607,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refresh_overview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 620,
          "end_line": 620,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refresh_screen",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 626,
          "end_line": 626,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "loop",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 639,
          "end_line": 639,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tui_main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 660,
          "end_line": 660,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 666,
          "end_line": 666,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 684 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "MigrateSqliteToPostgresScript",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 402,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "migration, sqlite, postgresql, config, task_logs, task_records",
        "PURPOSE": "Migrates legacy config and task history from SQLite/file storage to PostgreSQL.",
        "LAYER": "Scripts",
        "INVARIANT": "Script is idempotent for task_records and app_configurations."
      },
      "relations": [
        {
          "type": "READS_FROM",
          "target": "backend/tasks.db"
        },
        {
          "type": "READS_FROM",
          "target": "backend/config.json"
        },
        {
          "type": "WRITES_TO",
          "target": "postgresql.task_records"
        },
        {
          "type": "WRITES_TO",
          "target": "postgresql.task_logs"
        },
        {
          "type": "WRITES_TO",
          "target": "postgresql.app_configurations"
        }
      ],
      "children": [
        {
          "name": "Constants",
          "type": "Section",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 38,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_json_load_if_needed",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 41,
          "end_line": 64,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Parses JSON-like values from SQLite TEXT/JSON columns to Python objects.",
            "PRE": "value is scalar JSON/text/list/dict or None.",
            "POST": "Returns normalized Python object or original scalar value."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 41
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 41
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "_find_legacy_config_path",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Resolves the existing legacy config.json path from candidates."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_connect_sqlite",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 88,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Opens a SQLite connection with row factory."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_ensure_target_schema",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 164,
          "tags": {
            "PURPOSE": "Ensures required PostgreSQL tables exist before migration."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_migrate_config",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 167,
          "end_line": 197,
          "tags": {
            "PURPOSE": "Migrates legacy config.json into app_configurations(global)."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_migrate_tasks_and_logs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 200,
          "end_line": 326,
          "tags": {
            "PURPOSE": "Migrates task_records and task_logs from SQLite into PostgreSQL."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_migration",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 329,
          "end_line": 353,
          "tags": {
            "PURPOSE": "Orchestrates migration from SQLite/file to PostgreSQL."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 356,
          "end_line": 400,
          "tags": {
            "PURPOSE": "CLI entrypoint."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: READS_FROM. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: READS_FROM. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: WRITES_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: WRITES_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: WRITES_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 402 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.02500000000000009
      }
    },
    {
      "name": "CleanReleaseCliScript",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 508,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "cli, clean-release, candidate, artifacts, manifest",
        "PURPOSE": "Provide headless CLI commands for candidate registration, artifact import and manifest build.",
        "LAYER": "Scripts"
      },
      "relations": [],
      "children": [
        {
          "name": "build_parser",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Build argparse parser for clean release CLI."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_candidate_register",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Register candidate in repository via CLI command.",
            "PRE": "Candidate ID must be unique.",
            "POST": "Candidate is persisted in DRAFT status."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_artifact_import",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 133,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Import single artifact for existing candidate.",
            "PRE": "Candidate must exist.",
            "POST": "Artifact is persisted for candidate."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_manifest_build",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 166,
          "end_line": 197,
          "tags": {
            "PURPOSE": "Build immutable manifest snapshot for candidate.",
            "PRE": "Candidate must exist.",
            "POST": "New manifest version is persisted."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_compliance_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 200,
          "end_line": 236,
          "tags": {
            "PURPOSE": "Execute compliance run for candidate with optional manifest fallback.",
            "PRE": "Candidate exists and trusted snapshots are configured.",
            "POST": "Returns run payload and exit code 0 on success."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_compliance_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 239,
          "end_line": 268,
          "tags": {
            "PURPOSE": "Read run status by run id.",
            "PRE": "Run exists.",
            "POST": "Returns run status payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_to_payload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 271,
          "end_line": 298,
          "tags": {
            "PURPOSE": "Serialize domain models for CLI JSON output across SQLAlchemy/Pydantic variants.",
            "PRE": "value is serializable model or primitive object.",
            "POST": "Returns dictionary payload without mutating value."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_compliance_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 301,
          "end_line": 325,
          "tags": {
            "PURPOSE": "Read immutable report by run id.",
            "PRE": "Run and report exist.",
            "POST": "Returns report payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_compliance_violations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 328,
          "end_line": 350,
          "tags": {
            "PURPOSE": "Read run violations by run id.",
            "PRE": "Run exists.",
            "POST": "Returns violations payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_approve",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 353,
          "end_line": 381,
          "tags": {
            "PURPOSE": "Approve candidate based on immutable PASSED report.",
            "PRE": "Candidate and report exist; report is PASSED.",
            "POST": "Persists APPROVED decision and returns success payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_reject",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 384,
          "end_line": 412,
          "tags": {
            "PURPOSE": "Reject candidate without mutating compliance evidence.",
            "PRE": "Candidate and report exist.",
            "POST": "Persists REJECTED decision and returns success payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_publish",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 415,
          "end_line": 440,
          "tags": {
            "PURPOSE": "Publish approved candidate to target channel.",
            "PRE": "Candidate is approved and report belongs to candidate.",
            "POST": "Appends ACTIVE publication record and returns payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_revoke",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 443,
          "end_line": 466,
          "tags": {
            "PURPOSE": "Revoke active publication record.",
            "PRE": "Publication id exists and is ACTIVE.",
            "POST": "Publication record status becomes REVOKED."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "main",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 469,
          "end_line": 502,
          "tags": {
            "PURPOSE": "CLI entrypoint for clean release commands."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_normalize",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 276,
          "end_line": 276,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 508 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.625
      }
    },
    {
      "name": "SeedPermissionsScript",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 148,
      "tags": {
        "SEMANTICS": "setup, database, auth, permissions, seeding",
        "PURPOSE": "Populates the auth database with initial system permissions.",
        "COMPLEXITY": "3",
        "LAYER": "Scripts",
        "INVARIANT": "Safe to run multiple times (idempotent)."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AuthSessionLocal"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Permission"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Role"
        },
        {
          "type": "DEPENDS_ON",
          "target": "AuthRepository"
        }
      ],
      "children": [
        {
          "name": "INITIAL_PERMISSIONS",
          "type": "Constant",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 27,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Canonical bootstrap permission tuples seeded into auth storage.",
            "COMPLEXITY": "3"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SeedPermissionsScript"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "seed_permissions",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 65,
          "end_line": 143,
          "tags": {
            "PURPOSE": "Inserts missing permissions into the database.",
            "COMPLEXITY": "3",
            "POST": "All INITIAL_PERMISSIONS exist in the DB."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "AuthSessionLocal"
            },
            {
              "type": "DEPENDS_ON",
              "target": "Permission"
            },
            {
              "type": "DEPENDS_ON",
              "target": "Role"
            },
            {
              "type": "DEPENDS_ON",
              "target": "AuthRepository"
            },
            {
              "type": "DEPENDS_ON",
              "target": "INITIAL_PERMISSIONS"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "InitAuthDbScript",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 55,
      "tags": {
        "SEMANTICS": "setup, database, auth, migration",
        "PURPOSE": "Initializes the auth database and creates the necessary tables.",
        "COMPLEXITY": "2",
        "LAYER": "Scripts",
        "INVARIANT": "Safe to run multiple times (idempotent)."
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "init_db"
        },
        {
          "type": "CALLS",
          "target": "ensure_encryption_key"
        },
        {
          "type": "CALLS",
          "target": "seed_permissions"
        }
      ],
      "children": [
        {
          "name": "run_init",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 27,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Main entry point for the initialization script.",
            "COMPLEXITY": "3",
            "POST": "auth.db is initialized with the correct schema and seeded permissions."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "ensure_encryption_key"
            },
            {
              "type": "CALLS",
              "target": "init_db"
            },
            {
              "type": "CALLS",
              "target": "seed_permissions"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "CreateAdminScript",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 99,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "admin, setup, user, auth, cli",
        "PURPOSE": "CLI tool for creating the initial admin user.",
        "LAYER": "Scripts",
        "INVARIANT": "Admin user must have the \"Admin\" role."
      },
      "relations": [
        {
          "type": "USES",
          "target": "AuthSecurityModule"
        },
        {
          "type": "USES",
          "target": "DatabaseModule"
        },
        {
          "type": "USES",
          "target": "AuthModels"
        }
      ],
      "children": [
        {
          "name": "create_admin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Creates an admin user and necessary roles/permissions.",
            "PRE": "username and password provided via CLI.",
            "POST": "Admin user exists in auth.db.",
            "PARAM": "email (str | None) - Optional admin email."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.47500000000000003
      }
    },
    {
      "name": "ScriptsPackage",
      "type": "Package",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Script entrypoint package root."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "HealthSchemas",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 41,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "health, schemas, pydantic",
        "PURPOSE": "Pydantic schemas for dashboard health summary.",
        "LAYER": "Domain"
      },
      "relations": [],
      "children": [
        {
          "name": "DashboardHealthItem",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Represents the latest health status of a single dashboard."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "HealthSummaryResponse",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Aggregated health summary for all dashboards."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "DatasetReviewSchemas",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 419,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset_review, schemas, pydantic, session, profile, findings",
        "PURPOSE": "Defines API schemas for the dataset review orchestration flow.",
        "LAYER": "API"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "DatasetReviewModels"
        }
      ],
      "children": [
        {
          "name": "SessionCollaboratorDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 60,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatasetProfileDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 87,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ValidationFindingDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 109,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SemanticSourceDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 129,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SemanticCandidateDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 132,
          "end_line": 150,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SemanticFieldEntryDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 153,
          "end_line": 180,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ImportedFilterDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 183,
          "end_line": 204,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TemplateVariableDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 207,
          "end_line": 224,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ExecutionMappingDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 227,
          "end_line": 250,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationOptionDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 253,
          "end_line": 266,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationAnswerDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 269,
          "end_line": 284,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationQuestionDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 287,
          "end_line": 306,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationSessionDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 309,
          "end_line": 327,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CompiledPreviewDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 330,
          "end_line": 348,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatasetRunContextDto",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 351,
          "end_line": 373,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SessionSummary",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 376,
          "end_line": 399,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SessionDetail",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 402,
          "end_line": 417,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 419 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "SettingsSchemas",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 96,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "settings, schemas, pydantic, validation",
        "PURPOSE": "Pydantic schemas for application settings and automation policies.",
        "LAYER": "Domain"
      },
      "relations": [],
      "children": [
        {
          "name": "NotificationChannel",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Structured notification channel definition for policy-level custom routing."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ValidationPolicyBase",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Base schema for validation policy data."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ValidationPolicyCreate",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Schema for creating a new validation policy."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ValidationPolicyUpdate",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Schema for updating an existing validation policy."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ValidationPolicyResponse",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Schema for validation policy response data."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "AuthSchemas",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 164,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "auth, schemas, pydantic, user, token",
        "PURPOSE": "Pydantic schemas for authentication requests and responses.",
        "LAYER": "API",
        "INVARIANT": "Sensitive fields like password must not be included in response schemas."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "pydantic"
        }
      ],
      "children": [
        {
          "name": "Token",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 26,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Represents a JWT access token response."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TokenData",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 37,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Represents the data encoded in a JWT token."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "PermissionSchema",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 52,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Represents a permission in API responses."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RoleSchema",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 55,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Represents a role in API responses."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 55
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "RoleCreate",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 70,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Schema for creating a new role."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 70
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "RoleUpdate",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 81,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Schema for updating an existing role."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 81
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "ADGroupMappingSchema",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 92,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Represents an AD Group to Role mapping in API responses."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 92
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "ADGroupMappingCreate",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 106,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Schema for creating an AD Group mapping."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 106
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "UserBase",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 116,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Base schema for user data."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 116
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "UserCreate",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 127,
          "end_line": 134,
          "tags": {
            "PURPOSE": "Schema for creating a new user."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 127
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "UserUpdate",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 137,
          "end_line": 146,
          "tags": {
            "PURPOSE": "Schema for updating an existing user."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 137
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "User",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 149,
          "end_line": 162,
          "tags": {
            "PURPOSE": "Schema for user data in API responses."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 149
              }
            ],
            "score": 0.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "ProfileSchemas",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 196,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "profile, schemas, pydantic, preferences, superset, lookup, security, git, ux",
        "PURPOSE": "Defines API schemas for profile preference persistence, security read-only snapshot, and Superset account lookup.",
        "LAYER": "API",
        "INVARIANT": "Schema shapes stay stable for profile UI states and backend preference contracts."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "pydantic"
        }
      ],
      "children": [
        {
          "name": "ProfilePermissionState",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 18,
          "end_line": 26,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Represents one permission badge state for profile read-only security view."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 18
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 18
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "ProfileSecuritySummary",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 29,
          "end_line": 41,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Read-only security and access snapshot for current user."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 29
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 29
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "ProfilePreference",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 44,
          "end_line": 74,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Represents persisted profile preference for a single authenticated user."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 44
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 44
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "ProfilePreferenceUpdateRequest",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 77,
          "end_line": 135,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Request payload for updating current user's profile settings."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 77
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 77
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "ProfilePreferenceResponse",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 138,
          "end_line": 149,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Response envelope for profile preference read/update endpoints."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 138
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 138
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "SupersetAccountLookupRequest",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 152,
          "end_line": 164,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Query contract for Superset account lookup by selected environment."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 152
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 152
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "SupersetAccountCandidate",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 167,
          "end_line": 178,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Canonical account candidate projected from Superset users payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 167
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 167
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "SupersetAccountLookupResponse",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 181,
          "end_line": 194,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Response envelope for Superset account lookup (success or degraded mode)."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 181
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 181
              }
            ],
            "score": 0.5499999999999999
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "SchemasPackage",
      "type": "Package",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "API schema package root."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TestSettingsAndHealthSchemas",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 88,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Regression tests for settings and health schema contracts updated in 026 fix batch."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_validation_policy_create_accepts_structured_custom_channels",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Ensure policy schema accepts structured custom channel objects with type/target fields."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestSettingsAndHealthSchemas"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_validation_policy_create_rejects_legacy_string_custom_channels",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Ensure legacy list[str] custom channel payload is rejected by typed channel contract."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestSettingsAndHealthSchemas"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_dashboard_health_item_status_accepts_only_whitelisted_values",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Verify strict grouped regex only accepts PASS/WARN/FAIL/UNKNOWN exact statuses."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestSettingsAndHealthSchemas"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.32500000000000007
      }
    },
    {
      "name": "backend.src.core.superset_profile_lookup",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 238,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "superset, users, lookup, profile, pagination, normalization",
        "PURPOSE": "Provides environment-scoped Superset account lookup adapter with stable normalized output.",
        "LAYER": "Core",
        "INVARIANT": "Adapter never leaks raw upstream payload shape to API consumers."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.utils.network.APIClient"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.logger"
        }
      ],
      "children": [
        {
          "name": "SupersetAccountLookupAdapter",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 21,
          "end_line": 236,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Lookup Superset users and normalize candidates for profile binding."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 25,
              "end_line": 32,
              "tags": {
                "PURPOSE": "Initializes lookup adapter with authenticated API client and environment context.",
                "PRE": "network_client supports request(method, endpoint, params=...).",
                "POST": "Adapter is ready to perform users lookup requests."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_users_page",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 34,
              "end_line": 136,
              "tags": {
                "PURPOSE": "Fetch one users page from Superset with passthrough search/sort parameters.",
                "PRE": "page_index >= 0 and page_size >= 1.",
                "POST": "Returns deterministic payload with normalized items and total count.",
                "RETURN": "Dict[str, Any]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_normalize_lookup_payload",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 138,
              "end_line": 197,
              "tags": {
                "PURPOSE": "Convert Superset users response variants into stable candidates payload.",
                "PRE": "response can be dict/list in any supported upstream shape.",
                "POST": "Output contains canonical keys: status, environment_id, page_index, page_size, total, items.",
                "RETURN": "Dict[str, Any]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "normalize_user_payload",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 199,
              "end_line": 235,
              "tags": {
                "PURPOSE": "Project raw Superset user object to canonical candidate shape.",
                "PRE": "raw_user may have heterogenous key names between Superset versions.",
                "POST": "Returns normalized candidate keys (environment_id, username, display_name, email, is_active).",
                "RETURN": "Dict[str, Any]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 21
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 21
              }
            ],
            "score": 0.5499999999999999
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "SupersetClientModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 2276,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "superset, api, client, rest, http, dashboard, dataset, import, export",
        "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Superset REST API, \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u044f \u043b\u043e\u0433\u0438\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e.",
        "LAYER": "Core",
        "INVARIANT": "All network operations must use the internal APIClient instance.",
        "PUBLIC_API": "SupersetClient"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "APIClient.__init__"
        }
      ],
      "children": [
        {
          "name": "SupersetClient",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 30,
          "end_line": 2274,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "\u041a\u043b\u0430\u0441\u0441-\u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 Superset REST API, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430\u043c\u0438 \u0438 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u043c\u0438."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "APIClient"
            }
          ],
          "children": [
            {
              "name": "SupersetClient.__init__",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 35,
              "end_line": 65,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442.",
                "PRE": "`env` \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c Environment.",
                "POST": "\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b `env` \u0438 `network` \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u0440\u0430\u0431\u043e\u0442\u0435.",
                "DATA_CONTRACT": "Input[Environment] -> self.network[APIClient]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "Environment"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "APIClient.__init__"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.authenticate",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 67,
              "end_line": 78,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Authenticates the client using the configured credentials.",
                "PRE": "self.network must be initialized with valid auth configuration.",
                "POST": "Client is authenticated and tokens are stored.",
                "DATA_CONTRACT": "None -> Output[Dict[str, str]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "APIClient.authenticate"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.headers",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 81,
              "end_line": 90,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c.",
                "PRE": "APIClient is initialized and authenticated.",
                "POST": "Returns a dictionary of HTTP headers."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetClient.get_dashboards",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 94,
              "end_line": 130,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e.",
                "PRE": "Client is authenticated.",
                "POST": "Returns a tuple with total count and list of dashboards.",
                "DATA_CONTRACT": "Input[query: Optional[Dict]] -> Output[Tuple[int, List[Dict]]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_fetch_all_pages"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.get_dashboards_page",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 132,
              "end_line": 170,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetches a single dashboards page from Superset without iterating all pages.",
                "PRE": "Client is authenticated.",
                "POST": "Returns total count and one page of dashboards.",
                "DATA_CONTRACT": "Input[query: Optional[Dict]] -> Output[Tuple[int, List[Dict]]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.get_dashboards_summary",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 172,
              "end_line": 260,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetches dashboard metadata optimized for the grid.",
                "PRE": "Client is authenticated.",
                "POST": "Returns a list of dashboard metadata summaries.",
                "DATA_CONTRACT": "None -> Output[List[Dict]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dashboards"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.get_dashboards_summary_page",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 262,
              "end_line": 336,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetches one page of dashboard metadata optimized for the grid.",
                "PRE": "page >= 1 and page_size > 0.",
                "POST": "Returns mapped summaries and total dashboard count.",
                "DATA_CONTRACT": "Input[page: int, page_size: int] -> Output[Tuple[int, List[Dict]]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dashboards_page"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient._extract_owner_labels",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 338,
              "end_line": 365,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Normalize dashboard owners payload to stable display labels.",
                "PRE": "owners payload can be scalar, object or list.",
                "POST": "Returns deduplicated non-empty owner labels preserving order.",
                "DATA_CONTRACT": "Input[Any] -> Output[List[str]]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetClient._extract_user_display",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 367,
              "end_line": 399,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Normalize user payload to a stable display name.",
                "PRE": "user payload can be string, dict or None.",
                "POST": "Returns compact non-empty display value or None.",
                "DATA_CONTRACT": "Input[Optional[str], Optional[Dict]] -> Output[Optional[str]]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetClient._sanitize_user_text",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 401,
              "end_line": 414,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Convert scalar value to non-empty user-facing text.",
                "PRE": "value can be any scalar type.",
                "POST": "Returns trimmed string or None."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetClient.get_dashboard",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 416,
              "end_line": 430,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetches a single dashboard by ID or slug.",
                "PRE": "Client is authenticated and dashboard_ref exists.",
                "POST": "Returns dashboard payload from Superset API.",
                "DATA_CONTRACT": "Input[dashboard_ref: Union[int, str]] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.get_dashboard_permalink_state",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 432,
              "end_line": 448,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Fetches stored dashboard permalink state by permalink key.",
                "PRE": "Client is authenticated and permalink key exists.",
                "POST": "Returns dashboard permalink state payload from Superset API.",
                "DATA_CONTRACT": "Input[permalink_key: str] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetClient.get_native_filter_state",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 450,
              "end_line": 470,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Fetches stored native filter state by filter state key.",
                "PRE": "Client is authenticated and filter_state_key exists.",
                "POST": "Returns native filter state payload from Superset API.",
                "DATA_CONTRACT": "Input[dashboard_id: Union[int, str], filter_state_key: str] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetClient.extract_native_filters_from_permalink",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 472,
              "end_line": 510,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Extract native filters dataMask from a permalink key.",
                "PRE": "Client is authenticated and permalink_key exists.",
                "POST": "Returns extracted dataMask with filter states.",
                "DATA_CONTRACT": "Input[permalink_key: str] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dashboard_permalink_state"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.extract_native_filters_from_key",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 512,
              "end_line": 579,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Extract native filters from a native_filters_key URL parameter.",
                "PRE": "Client is authenticated, dashboard_id and filter_state_key exist.",
                "POST": "Returns extracted filter state with extraFormData.",
                "DATA_CONTRACT": "Input[dashboard_id: Union[int, str], filter_state_key: str] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_native_filter_state"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.parse_dashboard_url_for_filters",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 581,
              "end_line": 689,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Parse a Superset dashboard URL and extract native filter state if present.",
                "PRE": "url must be a valid Superset dashboard URL with optional permalink or native_filters_key.",
                "POST": "Returns extracted filter state or empty dict if no filters found.",
                "DATA_CONTRACT": "Input[url: str] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.extract_native_filters_from_permalink"
                },
                {
                  "type": "CALLS",
                  "target": "SupersetClient.extract_native_filters_from_key"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.get_chart",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 691,
              "end_line": 703,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetches a single chart by ID.",
                "PRE": "Client is authenticated and chart_id exists.",
                "POST": "Returns chart payload from Superset API.",
                "DATA_CONTRACT": "Input[chart_id: int] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.get_dashboard_detail",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 705,
              "end_line": 991,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetches detailed dashboard information including related charts and datasets.",
                "PRE": "Client is authenticated and dashboard reference exists.",
                "POST": "Returns dashboard metadata with charts and datasets lists.",
                "DATA_CONTRACT": "Input[dashboard_ref: Union[int, str]] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dashboard"
                },
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_chart"
                }
              ],
              "children": [
                {
                  "name": "extract_dataset_id_from_form_data",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 723,
                  "end_line": 749,
                  "tags": {},
                  "relations": [],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                }
              ],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.get_charts",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 993,
              "end_line": 1015,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetches all charts with pagination support.",
                "PRE": "Client is authenticated.",
                "POST": "Returns total count and charts list.",
                "DATA_CONTRACT": "Input[query: Optional[Dict]] -> Output[Tuple[int, List[Dict]]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_fetch_all_pages"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient._extract_chart_ids_from_layout",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1017,
              "end_line": 1051,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Traverses dashboard layout metadata and extracts chart IDs from common keys.",
                "PRE": "payload can be dict/list/scalar.",
                "POST": "Returns a set of chart IDs found in nested structures."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "export_dashboard",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1053,
              "end_line": 1083,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0432 \u0432\u0438\u0434\u0435 ZIP-\u0430\u0440\u0445\u0438\u0432\u0430.",
                "PRE": "dashboard_id must exist in Superset.",
                "POST": "Returns ZIP content and filename.",
                "DATA_CONTRACT": "Input[dashboard_id: int] -> Output[Tuple[bytes, str]]",
                "SIDE_EFFECT": "Performs network I/O to download archive."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "import_dashboard",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1085,
              "end_line": 1130,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0438\u0437 ZIP-\u0444\u0430\u0439\u043b\u0430.",
                "PRE": "file_name must be a valid ZIP dashboard export.",
                "POST": "Dashboard is imported or re-imported after deletion.",
                "DATA_CONTRACT": "Input[file_name: Union[str, Path]] -> Output[Dict]",
                "SIDE_EFFECT": "Performs network I/O to upload archive."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient._do_import"
                },
                {
                  "type": "CALLS",
                  "target": "delete_dashboard"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "delete_dashboard",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1132,
              "end_line": 1159,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u043f\u043e \u0435\u0433\u043e ID \u0438\u043b\u0438 slug.",
                "PRE": "dashboard_id must exist.",
                "POST": "Dashboard is removed from Superset.",
                "SIDE_EFFECT": "Deletes resource from upstream Superset environment."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.get_datasets",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1161,
              "end_line": 1184,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u043e\u0432, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e.",
                "PRE": "Client is authenticated.",
                "POST": "Returns total count and list of datasets.",
                "DATA_CONTRACT": "Input[query: Optional[Dict]] -> Output[Tuple[int, List[Dict]]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_fetch_all_pages"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.get_datasets_summary",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1186,
              "end_line": 1213,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetches dataset metadata optimized for the Dataset Hub grid.",
                "PRE": "Client is authenticated.",
                "POST": "Returns a list of dataset metadata summaries.",
                "RETURN": "List[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_datasets"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_dataset_detail",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1215,
              "end_line": 1342,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetches detailed dataset information including columns and linked dashboards",
                "PRE": "Client is authenticated and dataset_id exists.",
                "POST": "Returns detailed dataset info with columns and linked dashboards.",
                "PARAM": "dataset_id (int) - The dataset ID to fetch details for.",
                "RETURN": "Dict - Dataset details with columns and linked_dashboards."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dataset"
                },
                {
                  "type": "CALLS",
                  "target": "request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.get_dataset",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1344,
              "end_line": 1361,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435 \u043f\u043e \u0435\u0433\u043e ID.",
                "PRE": "dataset_id must exist.",
                "POST": "Returns dataset details.",
                "DATA_CONTRACT": "Input[dataset_id: int] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.compile_dataset_preview",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 1363,
              "end_line": 1538,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Compile dataset preview SQL through the strongest supported Superset preview endpoint family and return normalized SQL output.",
                "PRE": "dataset_id must be valid and template_params/effective_filters must represent the current preview session inputs.",
                "POST": "Returns normalized compiled SQL plus raw upstream response, preferring legacy form_data transport with explicit fallback to chart-data.",
                "DATA_CONTRACT": "Input[dataset_id:int, template_params:Dict, effective_filters:List[Dict]] -> Output[Dict[str, Any]]",
                "SIDE_EFFECT": "Performs upstream dataset lookup and preview network I/O against Superset."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dataset"
                },
                {
                  "type": "CALLS",
                  "target": "SupersetClient.build_dataset_preview_query_context"
                },
                {
                  "type": "CALLS",
                  "target": "SupersetClient.build_dataset_preview_legacy_form_data"
                },
                {
                  "type": "CALLS",
                  "target": "request"
                },
                {
                  "type": "CALLS",
                  "target": "_extract_compiled_sql_from_preview_response"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "SupersetClient.build_dataset_preview_legacy_form_data",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 1540,
              "end_line": 1614,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Build browser-style legacy form_data payload for Superset preview endpoints inferred from observed deployment traffic.",
                "PRE": "dataset_record should come from Superset dataset detail when possible.",
                "POST": "Returns one serialized-ready form_data structure preserving native filter clauses in legacy transport fields.",
                "DATA_CONTRACT": "Input[dataset_id:int,dataset_record:Dict,template_params:Dict,effective_filters:List[Dict]] -> Output[Dict[str, Any]]",
                "SIDE_EFFECT": "Emits reasoning diagnostics describing the inferred legacy payload shape."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.build_dataset_preview_query_context"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "SupersetClient.build_dataset_preview_query_context",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 1616,
              "end_line": 1743,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Build a reduced-scope chart-data query context for deterministic dataset preview compilation.",
                "PRE": "dataset_record should come from Superset dataset detail when possible.",
                "POST": "Returns an explicit chart-data payload based on current session inputs and dataset metadata.",
                "DATA_CONTRACT": "Input[dataset_id:int,dataset_record:Dict,template_params:Dict,effective_filters:List[Dict]] -> Output[Dict[str, Any]]",
                "SIDE_EFFECT": "Emits reasoning and reflection logs for deterministic preview payload construction."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_normalize_effective_filters_for_query_context"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "_normalize_effective_filters_for_query_context",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1745,
              "end_line": 1853,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Convert execution mappings into Superset chart-data filter objects.",
                "PRE": "effective_filters may contain mapping metadata and arbitrary scalar/list values.",
                "POST": "Returns only valid filter dictionaries suitable for the chart-data query payload."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "FilterStateModels"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_extract_compiled_sql_from_preview_response",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1855,
              "end_line": 1933,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Normalize compiled SQL from either chart-data or legacy form_data preview responses.",
                "PRE": "response must be the decoded preview response body from a supported Superset endpoint.",
                "POST": "Returns compiled SQL and raw response or raises SupersetAPIError when the endpoint does not expose query text."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "SupersetAPIError"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.update_dataset",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1935,
              "end_line": 1956,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043f\u043e \u0435\u0433\u043e ID.",
                "PRE": "dataset_id must exist.",
                "POST": "Dataset is updated in Superset.",
                "DATA_CONTRACT": "Input[dataset_id: int, data: Dict] -> Output[Dict]",
                "SIDE_EFFECT": "Modifies resource in upstream Superset environment."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient.get_databases",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1958,
              "end_line": 1983,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445.",
                "PRE": "Client is authenticated.",
                "POST": "Returns total count and list of databases.",
                "DATA_CONTRACT": "Input[query: Optional[Dict]] -> Output[Tuple[int, List[Dict]]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_fetch_all_pages"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_database",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1985,
              "end_line": 2002,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0435\u0451 ID.",
                "PRE": "database_id must exist.",
                "POST": "Returns database details.",
                "DATA_CONTRACT": "Input[database_id: int] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_databases_summary",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 2004,
              "end_line": 2022,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetch a summary of databases including uuid, name, and engine.",
                "PRE": "Client is authenticated.",
                "POST": "Returns list of database summaries.",
                "DATA_CONTRACT": "None -> Output[List[Dict]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_databases"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_database_by_uuid",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 2024,
              "end_line": 2037,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Find a database by its UUID.",
                "PRE": "db_uuid must be a valid UUID string.",
                "POST": "Returns database info or None.",
                "DATA_CONTRACT": "Input[db_uuid: str] -> Output[Optional[Dict]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_databases"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetClient._resolve_target_id_for_delete",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 2039,
              "end_line": 2077,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Resolves a dashboard ID from either an ID or a slug.",
                "PRE": "Either dash_id or dash_slug should be provided.",
                "POST": "Returns the resolved ID or None."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dashboards"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetClient._do_import",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 2079,
              "end_line": 2106,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Performs the actual multipart upload for import.",
                "PRE": "file_name must be a path to an existing ZIP file.",
                "POST": "Returns the API response from the upload."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "APIClient.upload_file"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_validate_export_response",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 2108,
              "end_line": 2123,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Validates that the export response is a non-empty ZIP archive.",
                "PRE": "response must be a valid requests.Response object.",
                "POST": "Raises SupersetAPIError if validation fails."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_resolve_export_filename",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 2125,
              "end_line": 2144,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Determines the filename for an exported dashboard.",
                "PRE": "response must contain Content-Disposition header or dashboard_id must be provided.",
                "POST": "Returns a sanitized filename string."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_validate_query_params",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 2146,
              "end_line": 2158,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Ensures query parameters have default page and page_size.",
                "PRE": "query can be None or a dictionary.",
                "POST": "Returns a dictionary with at least page and page_size."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_fetch_total_object_count",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 2160,
              "end_line": 2174,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Fetches the total number of items for a given endpoint.",
                "PRE": "endpoint must be a valid Superset API path.",
                "POST": "Returns the total count as an integer."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "fetch_paginated_count"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_fetch_all_pages",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 2176,
              "end_line": 2188,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Iterates through all pages to collect all data items.",
                "PRE": "pagination_options must contain base_query, total_count, and results_field.",
                "POST": "Returns a combined list of all items."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "fetch_paginated_data"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_validate_import_file",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 2190,
              "end_line": 2208,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Validates that the file to be imported is a valid ZIP with metadata.yaml.",
                "PRE": "zip_path must be a path to a file.",
                "POST": "Raises error if file is missing, not a ZIP, or missing metadata."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_all_resources",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 2210,
              "end_line": 2271,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetches all resources of a given type with id, uuid, and name columns.",
                "PARAM": "resource_type (str) - One of \"chart\", \"dataset\", \"dashboard\".",
                "PRE": "Client is authenticated. resource_type is valid.",
                "POST": "Returns a list of resource dicts with at minimum id, uuid, and name fields.",
                "RETURN": "List[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_fetch_all_pages"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "authenticate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "headers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dashboards",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dashboards_page",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 139,
          "end_line": 139,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dashboards_summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 179,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dashboards_summary_page",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 269,
          "end_line": 269,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_owner_labels",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 344,
          "end_line": 344,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_user_display",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 373,
          "end_line": 373,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_sanitize_user_text",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 406,
          "end_line": 406,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dashboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 423,
          "end_line": 423,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dashboard_permalink_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 439,
          "end_line": 439,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_native_filter_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 457,
          "end_line": 457,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extract_native_filters_from_permalink",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 479,
          "end_line": 479,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extract_native_filters_from_key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 519,
          "end_line": 519,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parse_dashboard_url_for_filters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 589,
          "end_line": 589,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_chart",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 698,
          "end_line": 698,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dashboard_detail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 713,
          "end_line": 713,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_charts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1000,
          "end_line": 1000,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_chart_ids_from_layout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1022,
          "end_line": 1022,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "walk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1028,
          "end_line": 1028,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_datasets",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1168,
          "end_line": 1168,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_datasets_summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1193,
          "end_line": 1193,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "as_bool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1227,
          "end_line": 1227,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dataset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1351,
          "end_line": 1351,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "compile_dataset_preview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1375,
          "end_line": 1375,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_dataset_preview_legacy_form_data",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1548,
          "end_line": 1548,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_dataset_preview_query_context",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1624,
          "end_line": 1624,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update_dataset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1943,
          "end_line": 1943,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_databases",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1965,
          "end_line": 1965,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_target_id_for_delete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2045,
          "end_line": 2045,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_do_import",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2085,
          "end_line": 2085,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 2276 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "EncryptionKeyModule",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 62,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "encryption, key, bootstrap, environment, startup",
        "PURPOSE": "Resolve and persist the Fernet encryption key required by runtime services.",
        "LAYER": "Infra",
        "INVARIANT": "Runtime key resolution never falls back to an ephemeral secret.",
        "PRE": "Runtime environment can read process variables and target .env path is writable when key generation is required.",
        "POST": "A valid Fernet key is available to runtime services via ENCRYPTION_KEY.",
        "SIDE_EFFECT": "May append ENCRYPTION_KEY entry into backend .env file and set process environment variable.",
        "DATA_CONTRACT": "Input[env_file_path] -> Output[encryption_key]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "LoggerModule"
        }
      ],
      "children": [
        {
          "name": "ensure_encryption_key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Ensure backend runtime has a persistent valid Fernet key.",
            "PRE": "env_file_path points to a writable backend .env file or ENCRYPTION_KEY exists in process environment.",
            "POST": "Returns a valid Fernet key and guarantees it is present in process environment.",
            "SIDE_EFFECT": "May create or append backend/.env when key is missing."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9666666666666667
      }
    },
    {
      "name": "ConfigManager",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 568,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "config, manager, persistence, migration, postgresql",
        "PURPOSE": "Manages application configuration persistence in DB with one-time migration from legacy JSON.",
        "LAYER": "Domain",
        "PRE": "Database schema for AppConfigRecord must be initialized.",
        "POST": "Configuration is loaded into memory and logger is configured.",
        "SIDE_EFFECT": "Performs DB I/O and may update global logging level.",
        "DATA_CONTRACT": "Input[json, record] -> Model[AppConfig]",
        "INVARIANT": "Configuration must always be representable by AppConfig and persisted under global record id."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AppConfig"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SessionLocal"
        },
        {
          "type": "DEPENDS_ON",
          "target": "AppConfigRecord"
        },
        {
          "type": "CALLS",
          "target": "logger"
        },
        {
          "type": "CALLS",
          "target": "configure_logger"
        }
      ],
      "children": [
        {
          "name": "ConfigManager",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 32,
          "end_line": 567,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Handles application configuration load, validation, mutation, and persistence lifecycle.",
            "PRE": "Database is accessible and AppConfigRecord schema is loaded.",
            "POST": "Configuration state is synchronized between memory and database.",
            "SIDE_EFFECT": "Performs DB I/O, OS path validation, and logger reconfiguration."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 39,
              "end_line": 70,
              "tags": {
                "PURPOSE": "Initialize manager state from persisted or migrated configuration.",
                "PRE": "config_path is a non-empty string path.",
                "POST": "self.config is initialized as AppConfig and logger is configured.",
                "SIDE_EFFECT": "Reads config sources and updates logging configuration.",
                "DATA_CONTRACT": "Input(str config_path) -> Output(None; self.config: AppConfig)"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_default_config",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 72,
              "end_line": 79,
              "tags": {
                "PURPOSE": "Build default application configuration fallback."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_sync_raw_payload_from_config",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 81,
              "end_line": 106,
              "tags": {
                "PURPOSE": "Merge typed AppConfig state into raw payload while preserving unsupported legacy sections."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_load_from_legacy_file",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 108,
              "end_line": 141,
              "tags": {
                "PURPOSE": "Load legacy JSON configuration for migration fallback path."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_get_record",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 143,
              "end_line": 157,
              "tags": {
                "PURPOSE": "Resolve global configuration record from DB."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_load_config",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 159,
              "end_line": 237,
              "tags": {
                "PURPOSE": "Load configuration from DB or perform one-time migration from legacy JSON."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_sync_environment_records",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 239,
              "end_line": 285,
              "tags": {
                "PURPOSE": "Mirror configured environments into the relational environments table used by FK-backed domain models."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_save_config_to_db",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 287,
              "end_line": 330,
              "tags": {
                "PURPOSE": "Persist provided AppConfig into the global DB configuration record."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "save",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 332,
              "end_line": 339,
              "tags": {
                "PURPOSE": "Persist current in-memory configuration state."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_config",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 341,
              "end_line": 347,
              "tags": {
                "PURPOSE": "Return current in-memory configuration snapshot."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_payload",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 349,
              "end_line": 355,
              "tags": {
                "PURPOSE": "Return full persisted payload including sections outside typed AppConfig schema."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "save_config",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 357,
              "end_line": 390,
              "tags": {
                "PURPOSE": "Persist configuration provided either as typed AppConfig or raw payload dict."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "update_global_settings",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 392,
              "end_line": 401,
              "tags": {
                "PURPOSE": "Replace global settings and persist the resulting configuration."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "validate_path",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 403,
              "end_line": 430,
              "tags": {
                "PURPOSE": "Validate that path exists and is writable, creating it when absent."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_environments",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 432,
              "end_line": 438,
              "tags": {
                "PURPOSE": "Return all configured environments."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "has_environments",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 440,
              "end_line": 446,
              "tags": {
                "PURPOSE": "Check whether at least one environment exists in configuration."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_environment",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 448,
              "end_line": 461,
              "tags": {
                "PURPOSE": "Resolve a configured environment by identifier."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "add_environment",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 463,
              "end_line": 497,
              "tags": {
                "PURPOSE": "Upsert environment by id into configuration and persist."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "update_environment",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 499,
              "end_line": 529,
              "tags": {
                "PURPOSE": "Update existing environment by id and preserve masked password placeholder behavior."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "delete_environment",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 531,
              "end_line": 564,
              "tags": {
                "PURPOSE": "Delete environment by id and persist when deletion occurs."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 32
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 32
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 32
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 32
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 32
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 32
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 32
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 32
              }
            ],
            "score": 0.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 568 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8166666666666667
      }
    },
    {
      "name": "SchedulerModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 210,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "scheduler, apscheduler, cron, backup",
        "PURPOSE": "Manages scheduled tasks using APScheduler.",
        "LAYER": "Core"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TaskManager"
        }
      ],
      "children": [
        {
          "name": "SchedulerService",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 18,
          "end_line": 139,
          "tags": {
            "COMPLEXITY": "3",
            "SEMANTICS": "scheduler, service, apscheduler",
            "PURPOSE": "Provides a service to manage scheduled backup tasks."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 23,
              "end_line": 34,
              "tags": {
                "PURPOSE": "Initializes the scheduler service with task and config managers.",
                "PRE": "task_manager and config_manager must be provided.",
                "POST": "Scheduler instance is created but not started."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "start",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 36,
              "end_line": 47,
              "tags": {
                "PURPOSE": "Starts the background scheduler and loads initial schedules.",
                "PRE": "Scheduler should be initialized.",
                "POST": "Scheduler is running and schedules are loaded."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "stop",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 49,
              "end_line": 59,
              "tags": {
                "PURPOSE": "Stops the background scheduler.",
                "PRE": "Scheduler should be running.",
                "POST": "Scheduler is shut down."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "load_schedules",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 61,
              "end_line": 75,
              "tags": {
                "PURPOSE": "Loads backup schedules from configuration and registers them.",
                "PRE": "config_manager must have valid configuration.",
                "POST": "All enabled backup jobs are added to the scheduler."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "add_backup_job",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 77,
              "end_line": 103,
              "tags": {
                "PURPOSE": "Adds a scheduled backup job for an environment.",
                "PRE": "env_id and cron_expression must be valid strings.",
                "POST": "A new job is added to the scheduler or replaced if it already exists.",
                "PARAM": "cron_expression (str) - The cron expression for the schedule."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_trigger_backup",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 105,
              "end_line": 136,
              "tags": {
                "PURPOSE": "Triggered by the scheduler to start a backup task.",
                "PRE": "env_id must be a valid environment ID.",
                "POST": "A new backup task is created in the task manager if not already running.",
                "PARAM": "env_id (str) - The ID of the environment."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 18
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 18
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "ThrottledSchedulerConfigurator",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 142,
          "end_line": 208,
          "tags": {
            "COMPLEXITY": "5",
            "SEMANTICS": "scheduler, throttling, distribution",
            "PURPOSE": "Distributes validation tasks evenly within an execution window.",
            "PRE": "Validation policies provide a finite dashboard list and a valid execution window.",
            "POST": "Produces deterministic per-dashboard run timestamps within the configured window.",
            "INVARIANT": "Returned schedule size always matches number of dashboard IDs.",
            "SIDE_EFFECT": "Emits warning logs for degenerate or near-zero scheduling windows.",
            "DATA_CONTRACT": "Input[window_start, window_end, dashboard_ids, current_date] -> Output[List[datetime]]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SchedulerModule"
            }
          ],
          "children": [
            {
              "name": "calculate_schedule",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 153,
              "end_line": 205,
              "tags": {
                "PURPOSE": "Calculates execution times for N tasks within a window.",
                "PRE": "window_start, window_end (time), dashboard_ids (List), current_date (date).",
                "POST": "Returns List[datetime] of scheduled times.",
                "INVARIANT": "Tasks are distributed with near-even spacing."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9571428571428571
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "backend.src.core.config_models",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "config, models, pydantic",
        "PURPOSE": "Defines the data models for application configuration using Pydantic.",
        "LAYER": "Core"
      },
      "relations": [
        {
          "type": "READS_FROM",
          "target": "app_configurations (database)"
        },
        {
          "type": "USED_BY",
          "target": "ConfigManager"
        }
      ],
      "children": [
        {
          "name": "Schedule",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Represents a backup schedule configuration."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "backend.src.core.config_models.Environment",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Represents a Superset environment configuration."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LoggingConfig",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Defines the configuration for the application's logging system."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CleanReleaseConfig",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Configuration for clean release compliance subsystem."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "GlobalSettings",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Represents global application settings."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "AppConfig",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 96,
          "tags": {
            "PURPOSE": "The root configuration model containing all application settings."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:backend.src.core.config_models:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: READS_FROM. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "DatabaseModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 638,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "database, postgresql, sqlalchemy, session, persistence",
        "PURPOSE": "Configures database connection and session management (PostgreSQL-first).",
        "LAYER": "Core",
        "INVARIANT": "A single engine instance is used for the entire application."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "MappingModels"
        },
        {
          "type": "DEPENDS_ON",
          "target": "auth_config"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ConnectionConfig"
        }
      ],
      "children": [
        {
          "name": "BASE_DIR",
          "type": "Variable",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 39,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Base directory for the backend."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DATABASE_URL",
          "type": "Constant",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 49,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "URL for the main application database."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TASKS_DATABASE_URL",
          "type": "Constant",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 56,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "URL for the tasks execution database."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "AUTH_DATABASE_URL",
          "type": "Constant",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 62,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "URL for the authentication database."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "engine",
          "type": "Variable",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 77,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "SQLAlchemy engine for mappings database.",
            "SIDE_EFFECT": "Creates database engine and manages connection pool."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "tasks_engine",
          "type": "Variable",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 83,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "SQLAlchemy engine for tasks database."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "auth_engine",
          "type": "Variable",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 89,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "SQLAlchemy engine for authentication database."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SessionLocal",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 96,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "A session factory for the main mappings database.",
            "PRE": "engine is initialized."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TasksSessionLocal",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 103,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "A session factory for the tasks execution database.",
            "PRE": "tasks_engine is initialized."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "AuthSessionLocal",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 110,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "A session factory for the authentication database.",
            "PRE": "auth_engine is initialized."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_ensure_user_dashboard_preferences_columns",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 113,
          "end_line": 180,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Applies additive schema upgrades for user_dashboard_preferences table.",
            "PRE": "bind_engine points to application database where profile table is stored.",
            "POST": "Missing columns are added without data loss."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "engine"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "_ensure_user_dashboard_preferences_health_columns",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 183,
          "end_line": 227,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Applies additive schema upgrades for user_dashboard_preferences table (health fields)."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "engine"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "_ensure_llm_validation_results_columns",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 230,
          "end_line": 270,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Applies additive schema upgrades for llm_validation_results table."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "engine"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "_ensure_git_server_configs_columns",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 273,
          "end_line": 311,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Applies additive schema upgrades for git_server_configs table.",
            "PRE": "bind_engine points to application database.",
            "POST": "Missing columns are added without data loss."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "engine"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "_ensure_auth_users_columns",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 314,
          "end_line": 374,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Applies additive schema upgrades for auth users table.",
            "PRE": "bind_engine points to authentication database.",
            "POST": "Missing columns are added without data loss."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "auth_engine"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "ensure_connection_configs_table",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 377,
          "end_line": 395,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Ensures the external connection registry table exists in the main database.",
            "PRE": "bind_engine points to the application database.",
            "POST": "connection_configs table exists without dropping existing data."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ConnectionConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "_ensure_filter_source_enum_values",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 398,
          "end_line": 467,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Adds missing FilterSource enum values to the PostgreSQL native filtersource type.",
            "PRE": "bind_engine points to application database with imported_filters table.",
            "POST": "New enum values are available without data loss."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "engine"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "_ensure_dataset_review_session_columns",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 470,
          "end_line": 551,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Apply additive schema upgrades for dataset review persistence required by optimistic-lock and recovery metadata semantics.",
            "PRE": "bind_engine points to the application database where dataset review tables are stored.",
            "POST": "Missing additive columns across legacy dataset review tables are created without removing existing data.",
            "SIDE_EFFECT": "Executes ALTER TABLE statements against dataset review tables in the application database."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSession"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ImportedFilter"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "init_db",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 554,
          "end_line": 578,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Initializes the database by creating all tables.",
            "PRE": "engine, tasks_engine and auth_engine are initialized.",
            "POST": "Database tables created in all databases.",
            "SIDE_EFFECT": "Creates physical database files if they don't exist."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "ensure_connection_configs_table"
            },
            {
              "type": "CALLS",
              "target": "_ensure_filter_source_enum_values"
            },
            {
              "type": "CALLS",
              "target": "_ensure_dataset_review_session_columns"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "get_db",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 581,
          "end_line": 597,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Dependency for getting a database session.",
            "PRE": "SessionLocal is initialized.",
            "POST": "Session is closed after use.",
            "RETURN": "Generator[Session, None, None]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SessionLocal"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "get_tasks_db",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 600,
          "end_line": 616,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Dependency for getting a tasks database session.",
            "PRE": "TasksSessionLocal is initialized.",
            "POST": "Session is closed after use.",
            "RETURN": "Generator[Session, None, None]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TasksSessionLocal"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "get_auth_db",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 619,
          "end_line": 636,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Dependency for getting an authentication database session.",
            "PRE": "AuthSessionLocal is initialized.",
            "POST": "Session is closed after use.",
            "DATA_CONTRACT": "None -> Output[sqlalchemy.orm.Session]",
            "RETURN": "Generator[Session, None, None]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "AuthSessionLocal"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "_build_engine",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 638 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "LoggerModule",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 319,
      "tags": {
        "SEMANTICS": "logging, websocket, streaming, handler",
        "PURPOSE": "Configures the application's logging system, including a custom handler for buffering logs and streaming them over WebSockets.",
        "LAYER": "Core",
        "RELATION": "Used by the main application and other modules to log events. The WebSocketLogHandler is used by the WebSocket endpoint in app.py."
      },
      "relations": [],
      "children": [
        {
          "name": "BeliefFormatter",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Custom logging formatter that adds belief state prefixes to log messages."
          },
          "relations": [],
          "children": [
            {
              "name": "format",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 28,
              "end_line": 52,
              "tags": {
                "PURPOSE": "Formats the log record, adding belief state context if available.",
                "PRE": "record is a logging.LogRecord.",
                "POST": "Returns formatted string.",
                "PARAM": "record (logging.LogRecord) - The log record to format.",
                "RETURN": "str - The formatted log message.",
                "SEMANTICS": "logging, formatter, context"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LogEntry",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 65,
          "tags": {
            "SEMANTICS": "log, entry, record, pydantic",
            "PURPOSE": "A Pydantic model representing a single, structured log entry. This is a re-definition for consistency, as it's also defined in task_manager.py."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "belief_scope",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Context manager for structured Belief State logging.",
            "PARAM": "message (str) - Optional entry message.",
            "PRE": "anchor_id must be provided.",
            "POST": "Thread-local belief state is updated and entry/exit logs are generated.",
            "SEMANTICS": "logging, context, belief_state"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "configure_logger",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 146,
          "tags": {
            "PURPOSE": "Configures the logger with the provided logging settings.",
            "PRE": "config is a valid LoggingConfig instance.",
            "POST": "Logger level, handlers, belief state flag, and task log level are updated.",
            "PARAM": "config (LoggingConfig) - The logging configuration.",
            "SEMANTICS": "logging, configuration, initialization"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_task_log_level",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 148,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Returns the current task log level filter.",
            "PRE": "None.",
            "POST": "Returns the task log level string.",
            "RETURN": "str - The current task log level (DEBUG, INFO, WARNING, ERROR).",
            "SEMANTICS": "logging, configuration, getter"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "should_log_task_level",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 176,
          "tags": {
            "PURPOSE": "Checks if a log level should be recorded based on task_log_level setting.",
            "PRE": "level is a valid log level string.",
            "POST": "Returns True if level meets or exceeds task_log_level threshold.",
            "PARAM": "level (str) - The log level to check.",
            "RETURN": "bool - True if the level should be logged.",
            "SEMANTICS": "logging, filter, level"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "WebSocketLogHandler",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 240,
          "tags": {
            "SEMANTICS": "logging, handler, websocket, buffer",
            "PURPOSE": "A custom logging handler that captures log records into a buffer. It is designed to be extended for real-time log streaming over WebSockets."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 186,
              "end_line": 197,
              "tags": {
                "PURPOSE": "Initializes the handler with a fixed-capacity buffer.",
                "PRE": "capacity is an integer.",
                "POST": "Instance initialized with empty deque.",
                "PARAM": "capacity (int) - Maximum number of logs to keep in memory.",
                "SEMANTICS": "logging, initialization, buffer"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "emit",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 199,
              "end_line": 225,
              "tags": {
                "PURPOSE": "Captures a log record, formats it, and stores it in the buffer.",
                "PRE": "record is a logging.LogRecord.",
                "POST": "Log is added to the log_buffer.",
                "PARAM": "record (logging.LogRecord) - The log record to emit.",
                "SEMANTICS": "logging, handler, buffer"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_recent_logs",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 227,
              "end_line": 238,
              "tags": {
                "PURPOSE": "Returns a list of recent log entries from the buffer.",
                "PRE": "None.",
                "POST": "Returns list of LogEntry objects.",
                "RETURN": "List[LogEntry] - List of buffered log entries.",
                "SEMANTICS": "logging, buffer, retrieval"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "Logger",
          "type": "Global",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 242,
          "end_line": 318,
          "tags": {
            "SEMANTICS": "logger, global, instance",
            "PURPOSE": "The global logger instance for the application, configured with both a console handler and the custom WebSocket handler."
          },
          "relations": [],
          "children": [
            {
              "name": "believed",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 247,
              "end_line": 269,
              "tags": {
                "PURPOSE": "A decorator that wraps a function in a belief scope.",
                "PARAM": "anchor_id (str) - The identifier for the semantic block.",
                "PRE": "anchor_id must be a string.",
                "POST": "Returns a decorator function."
              },
              "relations": [],
              "children": [
                {
                  "name": "decorator",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 253,
                  "end_line": 267,
                  "tags": {
                    "PURPOSE": "Internal decorator for belief scope.",
                    "PRE": "func must be a callable.",
                    "POST": "Returns the wrapped function."
                  },
                  "relations": [],
                  "children": [
                    {
                      "name": "wrapper",
                      "type": "Function",
                      "complexity": 1,
                      "tier": "TRIVIAL",
                      "start_line": 258,
                      "end_line": 265,
                      "tags": {
                        "PURPOSE": "Internal wrapper that enters belief scope.",
                        "PRE": "None.",
                        "POST": "Executes the function within a belief scope."
                      },
                      "relations": [],
                      "children": [],
                      "compliance": {
                        "valid": true,
                        "issues": [],
                        "score": 1.0
                      }
                    }
                  ],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                }
              ],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "explore",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 293,
              "end_line": 298,
              "tags": {
                "PURPOSE": "Logs an EXPLORE message (Van der Waals force) for searching, alternatives, and hypotheses.",
                "SEMANTICS": "log, explore, molecule"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "reason",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 300,
              "end_line": 305,
              "tags": {
                "PURPOSE": "Logs a REASON message (Covalent bond) for strict deduction and core logic.",
                "SEMANTICS": "log, reason, molecule"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "reflect",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 307,
              "end_line": 312,
              "tags": {
                "PURPOSE": "Logs a REFLECT message (Hydrogen bond) for self-check and structural validation.",
                "SEMANTICS": "log, reflect, molecule"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 319 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "PluginLoader",
      "type": "Class",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 8,
      "end_line": 192,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "plugin, loader, dynamic, import",
        "PURPOSE": "Scans a specified directory for Python modules, dynamically loads them, and registers any classes that are valid implementations of the PluginBase interface.",
        "LAYER": "Core",
        "RELATION": "Depends on PluginBase. It is used by the main application to discover and manage available plugins."
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Initializes the PluginLoader with a directory to scan.",
            "PRE": "plugin_dir is a valid directory path.",
            "POST": "Plugins are loaded and registered.",
            "PARAM": "plugin_dir (str) - The directory containing plugin modules."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_load_plugins",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Scans the plugin directory and loads all valid plugins.",
            "PRE": "plugin_dir exists or can be created.",
            "POST": "_load_module is called for each .py file."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_load_module",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Loads a single Python module and discovers PluginBase implementations.",
            "PRE": "module_name and file_path are valid.",
            "POST": "Plugin classes are instantiated and registered.",
            "PARAM": "file_path (str) - The path to the module file."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_register_plugin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 148,
          "tags": {
            "PURPOSE": "Registers a PluginBase instance and its configuration.",
            "PRE": "plugin_instance is a valid implementation of PluginBase.",
            "POST": "Plugin is added to _plugins and _plugin_configs.",
            "PARAM": "plugin_instance (PluginBase) - The plugin instance to register."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_plugin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 151,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Retrieves a loaded plugin instance by its ID.",
            "PRE": "plugin_id is a string.",
            "POST": "Returns plugin instance or None.",
            "PARAM": "plugin_id (str) - The unique identifier of the plugin.",
            "RETURN": "Optional[PluginBase] - The plugin instance if found, otherwise None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_all_plugin_configs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 176,
          "tags": {
            "PURPOSE": "Returns a list of all registered plugin configurations.",
            "PRE": "None.",
            "POST": "Returns list of all PluginConfig objects.",
            "RETURN": "List[PluginConfig] - A list of plugin configurations."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "has_plugin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 190,
          "tags": {
            "PURPOSE": "Checks if a plugin with the given ID is registered.",
            "PRE": "plugin_id is a string.",
            "POST": "Returns True if plugin exists.",
            "PARAM": "plugin_id (str) - The unique identifier of the plugin.",
            "RETURN": "bool - True if the plugin is registered, False otherwise."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "backend.src.core.migration_engine",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 302,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "migration, engine, zip, yaml, transformation, cross-filter, id-mapping",
        "PURPOSE": "Transforms Superset export ZIP archives while preserving archive integrity and patching mapped identifiers.",
        "LAYER": "Domain",
        "INVARIANT": "ZIP structure and non-targeted metadata must remain valid after transformation."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "src.core.logger"
        },
        {
          "type": "DEPENDS_ON",
          "target": "src.core.mapping_service.IdMappingService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "src.models.mapping.ResourceType"
        },
        {
          "type": "DEPENDS_ON",
          "target": "yaml"
        }
      ],
      "children": [
        {
          "name": "MigrationEngine",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 29,
          "end_line": 300,
          "tags": {
            "PURPOSE": "Engine for transforming Superset export ZIPs."
          },
          "relations": [
            {
              "type": "CONTAINS",
              "target": "__init__, transform_zip, _transform_yaml, _extract_chart_uuids_from_archive, _patch_dashboard_metadata"
            }
          ],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 33,
              "end_line": 46,
              "tags": {
                "PURPOSE": "Initializes migration orchestration dependencies for ZIP/YAML metadata transformations.",
                "PRE": "mapping_service is None or implements batch remote ID lookup for ResourceType.CHART.",
                "POST": "self.mapping_service is assigned and available for optional cross-filter patching flows.",
                "SIDE_EFFECT": "Mutates in-memory engine state by storing dependency reference.",
                "DATA_CONTRACT": "Input[Optional[IdMappingService]] -> Output[MigrationEngine]",
                "PARAM": "mapping_service (Optional[IdMappingService]) - Used for resolving target environment integer IDs."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "transform_zip",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 48,
              "end_line": 146,
              "tags": {
                "PURPOSE": "Extracts ZIP, replaces database UUIDs in YAMLs, patches cross-filters, and re-packages.",
                "PARAM": "fix_cross_filters (bool) - Whether to patch dashboard json_metadata.",
                "PRE": "zip_path points to a readable ZIP; output_path parent is writable; db_mapping keys/values are UUID strings.",
                "POST": "Returns True only when extraction, transformation, and packaging complete without exception.",
                "SIDE_EFFECT": "Reads/writes filesystem archives, creates temporary directory, emits structured logs.",
                "DATA_CONTRACT": "Input[(str zip_path, str output_path, Dict[str,str] db_mapping, bool strip_databases, Optional[str] target_env_id, bool fix_cross_filters)] -> Output[bool]",
                "RETURN": "bool - True if successful."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "_transform_yaml, _extract_chart_uuids_from_archive, _patch_dashboard_metadata"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_transform_yaml",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 148,
              "end_line": 176,
              "tags": {
                "PURPOSE": "Replaces database_uuid in a single YAML file.",
                "PARAM": "db_mapping (Dict[str, str]) - UUID mapping dictionary.",
                "PRE": "file_path exists, is readable YAML, and db_mapping contains source->target UUID pairs.",
                "POST": "database_uuid is replaced in-place only when source UUID is present in db_mapping.",
                "SIDE_EFFECT": "Reads and conditionally rewrites YAML file on disk.",
                "DATA_CONTRACT": "Input[(Path file_path, Dict[str,str] db_mapping)] -> Output[None]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_extract_chart_uuids_from_archive",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 178,
              "end_line": 206,
              "tags": {
                "PURPOSE": "Scans extracted chart YAML files and builds a source chart ID to UUID lookup map.",
                "PRE": "temp_dir exists and points to extracted archive root with optional chart YAML resources.",
                "POST": "Returns a best-effort Dict[int, str] containing only parseable chart id/uuid pairs.",
                "SIDE_EFFECT": "Reads chart YAML files from filesystem; suppresses per-file parsing failures.",
                "DATA_CONTRACT": "Input[Path] -> Output[Dict[int,str]]",
                "PARAM": "temp_dir (Path) - Root dir of unpacked archive.",
                "RETURN": "Dict[int, str] - Mapping of source Integer ID to UUID."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_patch_dashboard_metadata",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 208,
              "end_line": 297,
              "tags": {
                "PURPOSE": "Rewrites dashboard json_metadata chart/dataset integer identifiers using target environment mappings.",
                "PRE": "file_path points to dashboard YAML with json_metadata; target_env_id is non-empty; source_map contains source id->uuid.",
                "POST": "json_metadata is re-serialized with mapped integer IDs when remote mappings are available; otherwise file remains unchanged.",
                "SIDE_EFFECT": "Reads/writes YAML file, performs mapping lookup via mapping_service, emits logs for recoverable/terminal failures.",
                "DATA_CONTRACT": "Input[(Path file_path, str target_env_id, Dict[int,str] source_map)] -> Output[None]",
                "PARAM": "source_map (Dict[int, str])"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 29
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 29
              }
            ],
            "score": 0.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 302 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "AsyncSupersetClientModule",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 691,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "superset, async, client, httpx, dashboards, datasets",
        "PURPOSE": "Async Superset client for dashboard hot-path requests without blocking FastAPI event loop.",
        "LAYER": "Core",
        "PRE": "Environment configuration is valid and Superset endpoint is reachable.",
        "POST": "Provides non-blocking API access to Superset resources.",
        "SIDE_EFFECT": "Performs network I/O via httpx.",
        "DATA_CONTRACT": "Input[Environment] -> Model[dashboard, chart, dataset]",
        "INVARIANT": "Async dashboard operations reuse shared auth cache and avoid sync requests in async routes."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "SupersetClientModule"
        },
        {
          "type": "DEPENDS_ON",
          "target": "AsyncAPIClient"
        }
      ],
      "children": [
        {
          "name": "AsyncSupersetClient",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 28,
          "end_line": 689,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Async sibling of SupersetClient for dashboard read paths."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "SupersetClient"
            },
            {
              "type": "DEPENDS_ON",
              "target": "AsyncAPIClient"
            },
            {
              "type": "CALLS",
              "target": "AsyncAPIClient.request"
            }
          ],
          "children": [
            {
              "name": "AsyncSupersetClientInit",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 35,
              "end_line": 57,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Initialize async Superset client with AsyncAPIClient transport.",
                "PRE": "env is valid Environment instance.",
                "POST": "Client uses async network transport and inherited projection helpers.",
                "DATA_CONTRACT": "Input[Environment] -> self.network[AsyncAPIClient]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "AsyncAPIClient"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "AsyncSupersetClientClose",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 59,
              "end_line": 68,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Close async transport resources.",
                "POST": "Underlying AsyncAPIClient is closed.",
                "SIDE_EFFECT": "Closes network sockets."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "AsyncAPIClient.aclose"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_dashboards_page_async",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 70,
              "end_line": 107,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetch one dashboards page asynchronously.",
                "POST": "Returns total count and page result list.",
                "DATA_CONTRACT": "Input[query: Optional[Dict]] -> Output[Tuple[int, List[Dict]]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "AsyncAPIClient.request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_dashboard_async",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 109,
              "end_line": 124,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetch one dashboard payload asynchronously.",
                "POST": "Returns raw dashboard payload from Superset API.",
                "DATA_CONTRACT": "Input[dashboard_id: int] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "AsyncAPIClient.request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_chart_async",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 126,
              "end_line": 139,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetch one chart payload asynchronously.",
                "POST": "Returns raw chart payload from Superset API.",
                "DATA_CONTRACT": "Input[chart_id: int] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "AsyncAPIClient.request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_dashboard_detail_async",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 141,
              "end_line": 437,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetch dashboard detail asynchronously with concurrent charts/datasets requests.",
                "POST": "Returns dashboard detail payload for overview page.",
                "DATA_CONTRACT": "Input[dashboard_id: int] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "get_dashboard_async"
                },
                {
                  "type": "CALLS",
                  "target": "get_chart_async"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_dashboard_permalink_state_async",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 439,
              "end_line": 454,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Fetch stored dashboard permalink state asynchronously.",
                "POST": "Returns dashboard permalink state payload from Superset API.",
                "DATA_CONTRACT": "Input[permalink_key: str] -> Output[Dict]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_native_filter_state_async",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 456,
              "end_line": 474,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Fetch stored native filter state asynchronously.",
                "POST": "Returns native filter state payload from Superset API.",
                "DATA_CONTRACT": "Input[dashboard_id: Union[int, str], filter_state_key: str] -> Output[Dict]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "extract_native_filters_from_permalink_async",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 476,
              "end_line": 515,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Extract native filters dataMask from a permalink key asynchronously.",
                "POST": "Returns extracted dataMask with filter states.",
                "DATA_CONTRACT": "Input[permalink_key: str] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "get_dashboard_permalink_state_async"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "extract_native_filters_from_key_async",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 517,
              "end_line": 576,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Extract native filters from a native_filters_key URL parameter asynchronously.",
                "POST": "Returns extracted filter state with extraFormData.",
                "DATA_CONTRACT": "Input[dashboard_id: Union[int, str], filter_state_key: str] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "get_native_filter_state_async"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "parse_dashboard_url_for_filters_async",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 578,
              "end_line": 686,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Parse a Superset dashboard URL and extract native filter state asynchronously.",
                "POST": "Returns extracted filter state or empty dict if no filters found.",
                "DATA_CONTRACT": "Input[url: str] -> Output[Dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "extract_native_filters_from_permalink_async"
                },
                {
                  "type": "CALLS",
                  "target": "extract_native_filters_from_key_async"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "aclose",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extract_dataset_id_from_form_data",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 691 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8166666666666667
      }
    },
    {
      "name": "PluginBase",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 7,
      "end_line": 128,
      "tags": {
        "SEMANTICS": "plugin, interface, base, abstract",
        "PURPOSE": "Defines the abstract base class that all plugins must implement to be recognized by the system. It enforces a common structure for plugin metadata and execution.",
        "LAYER": "Core",
        "RELATION": "Used by PluginLoader to identify valid plugins.",
        "INVARIANT": "All plugins MUST inherit from this class."
      },
      "relations": [],
      "children": [
        {
          "name": "id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Returns the unique identifier for the plugin.",
            "PRE": "Plugin instance exists.",
            "POST": "Returns string ID.",
            "RETURN": "str - Plugin ID."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "name",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Returns the human-readable name of the plugin.",
            "PRE": "Plugin instance exists.",
            "POST": "Returns string name.",
            "RETURN": "str - Plugin name."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "description",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Returns a brief description of the plugin.",
            "PRE": "Plugin instance exists.",
            "POST": "Returns string description.",
            "RETURN": "str - Plugin description."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "version",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Returns the version of the plugin.",
            "PRE": "Plugin instance exists.",
            "POST": "Returns string version.",
            "RETURN": "str - Plugin version."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "required_permission",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Returns the required permission string to execute this plugin.",
            "PRE": "Plugin instance exists.",
            "POST": "Returns string permission.",
            "RETURN": "str - Required permission (e.g., \"plugin:backup:execute\")."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ui_route",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Returns the frontend route for the plugin's UI, if applicable.",
            "PRE": "Plugin instance exists.",
            "POST": "Returns string route or None.",
            "RETURN": "Optional[str] - Frontend route."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_schema",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 99,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Returns the JSON schema for the plugin's input parameters.",
            "PRE": "Plugin instance exists.",
            "POST": "Returns dict schema.",
            "RETURN": "Dict[str, Any] - JSON schema."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 127,
          "tags": {
            "PURPOSE": "Executes the plugin's core logic.",
            "PARAM": "params (Dict[str, Any]) - Validated input parameters.",
            "PRE": "params must be a dictionary.",
            "POST": "Plugin execution is completed."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "PluginConfig",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 130,
      "end_line": 143,
      "tags": {
        "SEMANTICS": "plugin, config, schema, pydantic",
        "PURPOSE": "A Pydantic model used to represent the validated configuration and metadata of a loaded plugin. This object is what gets exposed to the API layer.",
        "LAYER": "Core",
        "RELATION": "Instantiated by PluginLoader after validating a PluginBase instance."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "src.core",
      "type": "Package",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Backend core services and infrastructure package root."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "IdMappingServiceModule",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 316,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "mapping, ids, synchronization, environments, cross-filters",
        "PURPOSE": "Service for tracking and synchronizing Superset Resource IDs (UUID <-> Integer ID)",
        "LAYER": "Core",
        "PRE": "Database session is valid and Superset client factory returns authenticated clients for requested environments.",
        "POST": "Mapping synchronization and lookup APIs are available for environment-scoped UUID-to-integer resolution.",
        "SIDE_EFFECT": "Reads/writes ResourceMapping rows, emits logs, and schedules periodic sync jobs.",
        "DATA_CONTRACT": "Input[environment_id, resource_type, uuid] -> Output[remote_integer_id|None]",
        "TEST_DATA": "mock_superset_resources -> {'chart': [{'id': 42, 'uuid': '1234', 'slice_name': 'test'}], 'dataset': [{'id': 99, 'uuid': '5678', 'table_name': 'data'}]}",
        "INVARIANT": "sync_environment must handle remote API failures gracefully."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "MappingModels"
        },
        {
          "type": "DEPENDS_ON",
          "target": "LoggerModule"
        }
      ],
      "children": [
        {
          "name": "IdMappingService",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 28,
          "end_line": 315,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Service handling the cataloging and retrieval of remote Superset Integer IDs.",
            "PRE": "db_session is an active SQLAlchemy Session bound to mapping tables.",
            "POST": "Service instance provides scheduler control and environment-scoped mapping synchronization APIs.",
            "INVARIANT": "self.db remains the authoritative session for all mapping operations.",
            "SIDE_EFFECT": "Instantiates an in-process scheduler and performs database writes during sync cycles.",
            "DATA_CONTRACT": "Input[db_session] -> Output[IdMappingService]",
            "TEST_CONTRACT": "IdMappingServiceModel ->",
            "TEST_FIXTURE": "valid_mapping_service -> {\"db_session\": \"MockSession()\"}",
            "TEST_EDGE": "get_batch_empty_list -> returns empty dict",
            "TEST_INVARIANT": "resilient_fetching -> verifies: [sync_api_failure]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "MappingModels"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LoggerModule"
            }
          ],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 54,
              "end_line": 61,
              "tags": {
                "PURPOSE": "Initializes the mapping service."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "start_scheduler",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 63,
              "end_line": 101,
              "tags": {
                "PURPOSE": "Starts the background scheduler with a given cron string.",
                "PARAM": "superset_client_factory - Function to get a client for an environment."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "sync_environment",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 103,
              "end_line": 253,
              "tags": {
                "PURPOSE": "Fully synchronizes mapping for a specific environment.",
                "PARAM": "superset_client - Instance capable of hitting the Superset API.",
                "PRE": "environment_id exists in the database.",
                "POST": "ResourceMapping records for the environment are created or updated."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_remote_id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 255,
              "end_line": 279,
              "tags": {
                "PURPOSE": "Retrieves the remote integer ID for a given universal UUID.",
                "PARAM": "uuid (str)",
                "RETURN": "Optional[int]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_remote_ids_batch",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 281,
              "end_line": 312,
              "tags": {
                "PURPOSE": "Retrieves remote integer IDs for a list of universal UUIDs efficiently.",
                "PARAM": "uuids (List[str])",
                "RETURN": "Dict[str, int] - Mapping of UUID -> Integer ID"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9571428571428571
          }
        },
        {
          "name": "sync_all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 316 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8166666666666667
      }
    },
    {
      "name": "AuthConfigModule",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 50,
      "tags": {
        "SEMANTICS": "auth, config, settings, jwt, adfs",
        "PURPOSE": "Centralized configuration for authentication and authorization.",
        "COMPLEXITY": "2",
        "LAYER": "Core",
        "INVARIANT": "All sensitive configuration must have defaults or be loaded from environment."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "pydantic"
        }
      ],
      "children": [
        {
          "name": "AuthConfig",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 16,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Holds authentication-related settings.",
            "PRE": "Environment variables may be provided via .env file.",
            "POST": "Returns a configuration object with validated settings."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "pydantic_settings.BaseSettings"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 16
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 16
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 16
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 16
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 16
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 16
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 16
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 16
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "auth_config",
          "type": "Variable",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Singleton instance of AuthConfig."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "AuthConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AuthJwtModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 69,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "jwt, token, session, auth",
        "PURPOSE": "JWT token generation and validation logic.",
        "LAYER": "Core",
        "INVARIANT": "Tokens must include expiration time and user identifier."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "auth_config"
        },
        {
          "type": "USES",
          "target": "auth_config"
        }
      ],
      "children": [
        {
          "name": "create_access_token",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Generates a new JWT access token.",
            "PRE": "data dict contains 'sub' (user_id) and optional 'scopes' (roles).",
            "POST": "Returns a signed JWT string.",
            "PARAM": "expires_delta (Optional[timedelta]) - Custom expiration time.",
            "RETURN": "str - The encoded JWT."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "auth_config"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "decode_token",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Decodes and validates a JWT token.",
            "PRE": "token is a signed JWT string.",
            "POST": "Returns the decoded payload if valid.",
            "PARAM": "token (str) - The JWT to decode.",
            "RETURN": "dict - The decoded payload.",
            "THROW": "jose.JWTError - If token is invalid or expired."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "auth_config"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "AuthOauthModule",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 56,
      "tags": {
        "SEMANTICS": "auth, oauth, oidc, adfs",
        "PURPOSE": "ADFS OIDC configuration and client using Authlib.",
        "COMPLEXITY": "2",
        "LAYER": "Core",
        "INVARIANT": "Must use secure OIDC flows."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "authlib"
        },
        {
          "type": "USES",
          "target": "auth_config"
        }
      ],
      "children": [
        {
          "name": "oauth",
          "type": "Variable",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Global Authlib OAuth registry."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "OAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "register_adfs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Registers the ADFS OIDC client.",
            "PRE": "ADFS configuration is provided in auth_config.",
            "POST": "ADFS client is registered in oauth registry."
          },
          "relations": [
            {
              "type": "USES",
              "target": "oauth"
            },
            {
              "type": "USES",
              "target": "auth_config"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 23
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 23
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 23
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 23
              }
            ],
            "score": 0.4
          }
        },
        {
          "name": "is_adfs_configured",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Checks if ADFS is properly configured.",
            "PRE": "None.",
            "POST": "Returns True if ADFS client is registered, False otherwise.",
            "RETURN": "bool - Configuration status."
          },
          "relations": [
            {
              "type": "USES",
              "target": "oauth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 42
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 42
              }
            ],
            "score": 0.7
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "AuthLoggerModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 33,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "auth, logger, audit, security",
        "PURPOSE": "Audit logging for security-related events.",
        "LAYER": "Core",
        "INVARIANT": "Must not log sensitive data like passwords or full tokens."
      },
      "relations": [
        {
          "type": "USES",
          "target": "belief_scope"
        }
      ],
      "children": [
        {
          "name": "log_security_event",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Logs a security-related event for audit trails.",
            "PRE": "event_type and username are strings.",
            "POST": "Security event is written to the application log.",
            "PARAM": "details (dict) - Additional non-sensitive metadata."
          },
          "relations": [
            {
              "type": "USES",
              "target": "logger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 16
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 16
              }
            ],
            "score": 0.7
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "AuthSecurityModule",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 48,
      "tags": {
        "SEMANTICS": "security, password, hashing, bcrypt",
        "PURPOSE": "Utility for password hashing and verification using Passlib.",
        "COMPLEXITY": "2",
        "LAYER": "Core",
        "INVARIANT": "Uses bcrypt for hashing with standard work factor."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "bcrypt"
        }
      ],
      "children": [
        {
          "name": "verify_password",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Verifies a plain password against a hashed password.",
            "PRE": "plain_password is a string, hashed_password is a bcrypt hash.",
            "POST": "Returns True if password matches, False otherwise.",
            "PARAM": "hashed_password (str) - The stored hash.",
            "RETURN": "bool - Verification result."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "bcrypt"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_password_hash",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Generates a bcrypt hash for a plain password.",
            "PRE": "password is a string.",
            "POST": "Returns a secure bcrypt hash string.",
            "PARAM": "password (str) - The password to hash.",
            "RETURN": "str - The generated hash."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "bcrypt"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AuthRepositoryModule",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 163,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "auth, repository, database, user, role, permission",
        "PURPOSE": "Data access layer for authentication and user preference entities.",
        "LAYER": "Domain",
        "INVARIANT": "All database read/write operations must execute via the injected SQLAlchemy session boundary.",
        "DATA_CONTRACT": "Session -> [User | Role | Permission | UserDashboardPreference]",
        "PRE": "Database connection is active.",
        "POST": "Provides valid access to identity data.",
        "SIDE_EFFECT": "None at module level."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "Session"
        },
        {
          "type": "DEPENDS_ON",
          "target": "User"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Role"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Permission"
        },
        {
          "type": "DEPENDS_ON",
          "target": "UserDashboardPreference"
        },
        {
          "type": "DEPENDS_ON",
          "target": "belief_scope"
        }
      ],
      "children": [
        {
          "name": "AuthRepository",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 27,
          "end_line": 161,
          "tags": {
            "PURPOSE": "Initialize repository with database session.",
            "PRE": "Database session is bound.",
            "POST": "Entity instances returned safely.",
            "SIDE_EFFECT": "Performs database reads."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "Session"
            }
          ],
          "children": [
            {
              "name": "get_user_by_id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 38,
              "end_line": 50,
              "tags": {
                "PURPOSE": "Retrieve user by UUID.",
                "PRE": "user_id is a valid UUID string.",
                "POST": "Returns User object if found, else None."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "User"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_user_by_username",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 52,
              "end_line": 64,
              "tags": {
                "PURPOSE": "Retrieve user by username.",
                "PRE": "username is a non-empty string.",
                "POST": "Returns User object if found, else None."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "User"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_role_by_id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 66,
              "end_line": 79,
              "tags": {
                "PURPOSE": "Retrieve role by UUID with permissions preloaded."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "Role"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "Permission"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_role_by_name",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 81,
              "end_line": 88,
              "tags": {
                "PURPOSE": "Retrieve role by unique name."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "Role"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_permission_by_id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 90,
              "end_line": 99,
              "tags": {
                "PURPOSE": "Retrieve permission by UUID."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "Permission"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_permission_by_resource_action",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 101,
              "end_line": 114,
              "tags": {
                "PURPOSE": "Retrieve permission by resource and action tuple."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "Permission"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "list_permissions",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 116,
              "end_line": 123,
              "tags": {
                "PURPOSE": "List all system permissions."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "Permission"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_user_dashboard_preference",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 125,
              "end_line": 138,
              "tags": {
                "PURPOSE": "Retrieve dashboard filters/preferences for a user."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "UserDashboardPreference"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_roles_by_ad_groups",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 140,
              "end_line": 158,
              "tags": {
                "PURPOSE": "Retrieve roles that match a list of AD group names.",
                "PRE": "groups is a list of strings representing AD group identifiers.",
                "POST": "Returns a list of Role objects mapped to the provided AD groups."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "Role"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "ADGroupMapping"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9666666666666667
      }
    },
    {
      "name": "AuthPackage",
      "type": "Package",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Authentication and authorization package root."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_auth",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for authentication module",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "AuthPackage"
        }
      ],
      "children": [
        {
          "name": "test_create_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Verifies that a persisted user can be retrieved with intact credential hash."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_auth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_authenticate_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Validates authentication outcomes for valid, wrong-password, and unknown-user cases."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_auth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Ensures session creation returns bearer token payload fields."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_auth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_role_permission_association",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 143,
          "end_line": 166,
          "tags": {
            "PURPOSE": "Confirms role-permission many-to-many assignments persist and reload correctly."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_auth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_user_role_association",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 194,
          "tags": {
            "PURPOSE": "Confirms user-role assignment persists and is queryable from repository reads."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_auth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_ad_group_mapping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 197,
          "end_line": 221,
          "tags": {
            "PURPOSE": "Verifies AD group mapping rows persist and reference the expected role."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_auth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_authenticate_user_updates_last_login",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 224,
          "end_line": 245,
          "tags": {
            "PURPOSE": "Verifies successful authentication updates last_login audit field."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_auth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_authenticate_inactive_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 248,
          "end_line": 267,
          "tags": {
            "PURPOSE": "Verifies inactive accounts are rejected during password authentication."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_auth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_verify_password_empty_hash",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 270,
          "end_line": 279,
          "tags": {
            "PURPOSE": "Verifies password verification safely rejects empty or null password hashes."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_auth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_provision_adfs_user_new",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 282,
          "end_line": 311,
          "tags": {
            "PURPOSE": "Verifies JIT provisioning creates a new ADFS user and maps group-derived roles."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_auth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_provision_adfs_user_existing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 314,
          "end_line": 342,
          "tags": {
            "PURPOSE": "Verifies JIT provisioning reuses existing ADFS user and refreshes role assignments."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_auth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "db_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "auth_service",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "auth_repo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:test_auth:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "SupersetContextExtractor",
      "type": "Module",
      "complexity": 4,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 1397,
      "tags": {
        "COMPLEXITY": "4",
        "SEMANTICS": "dataset_review, superset, link_parsing, context_recovery, partial_recovery",
        "PURPOSE": "Recover dataset and dashboard context from Superset links while preserving explicit partial-recovery markers.",
        "LAYER": "Infra",
        "PRE": "Superset link or dataset reference must be parseable enough to resolve an environment-scoped target resource.",
        "POST": "Returns the best available recovered context with explicit provenance and partial-recovery markers when necessary.",
        "SIDE_EFFECT": "Performs upstream Superset API reads.",
        "INVARIANT": "Partial recovery is surfaced explicitly and never misrepresented as fully confirmed context."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "ImportedFilter"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ImportedFilter"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TemplateVariable"
        }
      ],
      "children": [
        {
          "name": "SupersetContextExtractor.imports",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 27,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mask_pii_value",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 68,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Redact likely sensitive identifiers while preserving structural hints for assistant-facing dataset-review context."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sanitize_imported_filter_for_assistant",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 86,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Build assistant-safe imported-filter payload with raw-value redaction metadata when sensitive tokens are detected."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_mask_sensitive_text",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 129,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Redact likely PII substrings from one string while preserving non-sensitive delimiters and token shape."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SupersetParsedContext",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 132,
          "end_line": 150,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Normalized output of Superset link parsing for session intake and recovery."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SupersetContextExtractor",
          "type": "Class",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 153,
          "end_line": 1395,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Parse supported Superset URLs and recover canonical dataset/dashboard references for review-session intake.",
            "PRE": "constructor receives a configured environment with a usable Superset base URL.",
            "POST": "extractor instance is ready to parse links against one Superset environment.",
            "SIDE_EFFECT": "downstream parse operations may call Superset APIs through SupersetClient."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "Environment"
            }
          ],
          "children": [
            {
              "name": "SupersetContextExtractor.__init__",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 161,
              "end_line": 170,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Bind extractor to one Superset environment and client instance."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor.parse_superset_link",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 172,
              "end_line": 470,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Extract candidate identifiers and query state from supported Superset URLs.",
                "PRE": "link is a non-empty Superset URL compatible with the configured environment.",
                "POST": "returns resolved dataset/dashboard context, preserving explicit partial-recovery state if some identifiers cannot be confirmed.",
                "SIDE_EFFECT": "may issue Superset API reads to resolve dataset references from dashboard or chart URLs.",
                "DATA_CONTRACT": "Input[link:str] -> Output[SupersetParsedContext]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dashboard_detail"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "SupersetContextExtractor.recover_imported_filters",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 472,
              "end_line": 706,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Build imported filter entries from URL state and Superset-side saved context.",
                "PRE": "parsed_context comes from a successful Superset link parse for one environment.",
                "POST": "returns explicit recovered and partial filter entries with preserved provenance and confirmation requirements.",
                "SIDE_EFFECT": "may issue Superset reads for dashboard metadata enrichment.",
                "DATA_CONTRACT": "Input[SupersetParsedContext] -> Output[List[Dict[str,Any]]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dashboard"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "SupersetContextExtractor.discover_template_variables",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 708,
              "end_line": 799,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Detect runtime variables and Jinja references from dataset query-bearing fields.",
                "PRE": "dataset_payload is a Superset dataset-detail style payload with query-bearing fields when available.",
                "POST": "returns deduplicated explicit variable records without executing Jinja or fabricating runtime values.",
                "SIDE_EFFECT": "none.",
                "DATA_CONTRACT": "Input[dataset_payload:Dict[str,Any]] -> Output[List[Dict[str,Any]]]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TemplateVariable"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "SupersetContextExtractor.build_recovery_summary",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 801,
              "end_line": 817,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Summarize recovered, partial, and unresolved context for session state and UX."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor._extract_numeric_identifier",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 819,
              "end_line": 840,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Extract a numeric identifier from a REST-like Superset URL path."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor._extract_dashboard_reference",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 842,
              "end_line": 861,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Extract a dashboard id-or-slug reference from a Superset URL path."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor._extract_dashboard_permalink_key",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 863,
              "end_line": 883,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Extract a dashboard permalink key from a Superset URL path."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor._extract_dashboard_id_from_state",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 885,
              "end_line": 894,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Extract a dashboard identifier from returned permalink state when present."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor._extract_chart_id_from_state",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 896,
              "end_line": 905,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Extract a chart identifier from returned permalink state when dashboard id is absent."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor._search_nested_numeric_key",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 907,
              "end_line": 932,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Recursively search nested dict/list payloads for the first numeric value under a candidate key set."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "SupersetContextExtractor.parse_superset_link"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetContextExtractor._recover_dataset_binding_from_dashboard",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 934,
              "end_line": 974,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Recover a dataset binding from resolved dashboard context while preserving explicit unresolved markers."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dashboard_detail"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetContextExtractor._decode_query_state",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 976,
              "end_line": 998,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Decode query-string structures used by Superset URL state transport."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor._extract_imported_filters",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 1000,
              "end_line": 1232,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Normalize imported filters from decoded query state without fabricating missing values."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor._normalize_imported_filter_payload",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 1234,
              "end_line": 1275,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Normalize one imported-filter payload with explicit provenance and confirmation state."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor._collect_query_bearing_expressions",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 1277,
              "end_line": 1319,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Collect SQL and expression-bearing dataset fields for deterministic template-variable discovery."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "SupersetContextExtractor.discover_template_variables"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetContextExtractor._append_template_variable",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 1321,
              "end_line": 1352,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Append one deduplicated template-variable descriptor."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor._extract_primary_jinja_identifier",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 1354,
              "end_line": 1366,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Extract a deterministic primary identifier from a Jinja expression without executing it."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetContextExtractor._normalize_default_literal",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 1368,
              "end_line": 1392,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Normalize literal default fragments from template helper calls into JSON-safe values."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "_replace_email",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_replace_uuid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_replace_long_digits",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_replace_mixed_identifier",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 164,
          "end_line": 164,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "parse_superset_link",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 180,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "recover_imported_filters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 480,
          "end_line": 480,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "merge_recovered_filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 489,
          "end_line": 489,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "discover_template_variables",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 716,
          "end_line": 716,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_recovery_summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 804,
          "end_line": 804,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_numeric_identifier",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 822,
          "end_line": 822,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_dashboard_reference",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 845,
          "end_line": 845,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_dashboard_permalink_key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 866,
          "end_line": 866,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_dashboard_id_from_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 888,
          "end_line": 888,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_chart_id_from_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 899,
          "end_line": 899,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_search_nested_numeric_key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 911,
          "end_line": 911,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_recover_dataset_binding_from_dashboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 938,
          "end_line": 938,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_decode_query_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 979,
          "end_line": 979,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_imported_filters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1003,
          "end_line": 1003,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_normalize_imported_filter_payload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1237,
          "end_line": 1237,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_collect_query_bearing_expressions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1281,
          "end_line": 1281,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "append_expression",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1286,
          "end_line": 1286,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_append_template_variable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1324,
          "end_line": 1324,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_primary_jinja_identifier",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1357,
          "end_line": 1357,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_normalize_default_literal",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1371,
          "end_line": 1371,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1397 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8071428571428572
      }
    },
    {
      "name": "AsyncNetworkModule",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 304,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "network, httpx, async, superset, authentication, cache",
        "PURPOSE": "Provides async Superset API client with shared auth-token cache to avoid per-request re-login.",
        "LAYER": "Infra",
        "PRE": "Config payloads contain a Superset base URL and authentication fields needed for login.",
        "POST": "Async network clients reuse cached auth tokens and expose stable async request/error translation flow.",
        "SIDE_EFFECT": "Performs upstream HTTP I/O and mutates process-local auth cache entries.",
        "DATA_CONTRACT": "Input[config: Dict[str, Any]] -> Output[authenticated async Superset HTTP interactions]",
        "INVARIANT": "Async client reuses cached auth tokens per environment credentials and invalidates on 401."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "SupersetAuthCache"
        }
      ],
      "children": [
        {
          "name": "AsyncAPIClient",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 32,
          "end_line": 302,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Async Superset API client backed by httpx.AsyncClient with shared auth cache."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SupersetAuthCache"
            },
            {
              "type": "CALLS",
              "target": "SupersetAuthCache.get"
            },
            {
              "type": "CALLS",
              "target": "SupersetAuthCache.set"
            }
          ],
          "children": [
            {
              "name": "AsyncAPIClient.__init__",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 42,
              "end_line": 68,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Initialize async API client for one environment.",
                "PRE": "config contains base_url and auth payload.",
                "POST": "Client is ready for async request/authentication flow.",
                "DATA_CONTRACT": "Input[config: Dict[str, Any]] -> self._auth_cache_key[str]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "AsyncAPIClient._normalize_base_url"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "SupersetAuthCache"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "AsyncAPIClient._normalize_base_url",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 70,
              "end_line": 79,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Normalize base URL for Superset API root construction.",
                "POST": "Returns canonical base URL without trailing slash and duplicate /api/v1 suffix."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "AsyncAPIClient._build_api_url",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 81,
              "end_line": 94,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Build full API URL from relative Superset endpoint.",
                "POST": "Returns absolute URL for upstream request."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "AsyncAPIClient._get_auth_lock",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 96,
              "end_line": 108,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Return per-cache-key async lock to serialize fresh login attempts.",
                "POST": "Returns stable asyncio.Lock instance."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "AsyncAPIClient.authenticate",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 110,
              "end_line": 171,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Authenticate against Superset and cache access/csrf tokens.",
                "POST": "Client tokens are populated and reusable across requests.",
                "SIDE_EFFECT": "Performs network requests to Superset authentication endpoints.",
                "DATA_CONTRACT": "None -> Output[Dict[str, str]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetAuthCache.get"
                },
                {
                  "type": "CALLS",
                  "target": "SupersetAuthCache.set"
                },
                {
                  "type": "CALLS",
                  "target": "AsyncAPIClient._get_auth_lock"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "AsyncAPIClient.get_headers",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 173,
              "end_line": 187,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Return authenticated Superset headers for async requests.",
                "POST": "Headers include Authorization and CSRF tokens."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "AsyncAPIClient.authenticate"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "AsyncAPIClient.request",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 189,
              "end_line": 224,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Perform one authenticated async Superset API request.",
                "POST": "Returns JSON payload or raw httpx.Response when raw_response=true.",
                "SIDE_EFFECT": "Performs network I/O."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "AsyncAPIClient.get_headers"
                },
                {
                  "type": "CALLS",
                  "target": "AsyncAPIClient._handle_http_error"
                },
                {
                  "type": "CALLS",
                  "target": "AsyncAPIClient._handle_network_error"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "AsyncAPIClient._handle_http_error",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 226,
              "end_line": 256,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Translate upstream HTTP errors into stable domain exceptions.",
                "POST": "Raises domain-specific exception for caller flow control.",
                "DATA_CONTRACT": "Input[httpx.HTTPStatusError] -> Exception"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "AsyncAPIClient._is_dashboard_endpoint"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "DashboardNotFoundError"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "SupersetAPIError"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "PermissionDeniedError"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "AuthenticationError"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "NetworkError"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "AsyncAPIClient._is_dashboard_endpoint",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 258,
              "end_line": 274,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Determine whether an API endpoint represents a dashboard resource for 404 translation.",
                "POST": "Returns true only for dashboard-specific endpoints."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "AsyncAPIClient._handle_network_error",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 276,
              "end_line": 291,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Translate generic httpx errors into NetworkError.",
                "POST": "Raises NetworkError with URL context.",
                "DATA_CONTRACT": "Input[httpx.HTTPError] -> NetworkError"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "NetworkError"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "AsyncAPIClient.aclose",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 293,
              "end_line": 301,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Close underlying httpx client.",
                "POST": "Client resources are released.",
                "SIDE_EFFECT": "Closes network connections."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "AsyncAPIClient.__init__"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_normalize_base_url",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_build_api_url",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_auth_lock",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "authenticate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 119,
          "end_line": 119,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_headers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 178,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "request",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 197,
          "end_line": 197,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_handle_http_error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 237,
          "end_line": 237,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_is_dashboard_endpoint",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 262,
          "end_line": 262,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_handle_network_error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 282,
          "end_line": 282,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "aclose",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 299,
          "end_line": 299,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 304 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8166666666666667
      }
    },
    {
      "name": "SupersetCompilationAdapter",
      "type": "Module",
      "complexity": 4,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 508,
      "tags": {
        "COMPLEXITY": "4",
        "SEMANTICS": "dataset_review, superset, compilation_preview, sql_lab_launch, execution_truth",
        "PURPOSE": "Interact with Superset preview compilation and SQL Lab execution endpoints using the current approved execution context.",
        "LAYER": "Infra",
        "PRE": "effective template params and dataset execution reference are available.",
        "POST": "preview and launch calls return Superset-originated artifacts or explicit errors.",
        "SIDE_EFFECT": "performs upstream Superset preview and SQL Lab calls.",
        "INVARIANT": "The adapter never fabricates compiled SQL locally; preview truth is delegated to Superset only."
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "SupersetClient"
        },
        {
          "type": "DEPENDS_ON",
          "target": "CompiledPreview"
        }
      ],
      "children": [
        {
          "name": "SupersetCompilationAdapter.imports",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 24,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "PreviewCompilationPayload",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 39,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Typed preview payload for Superset-side compilation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SqlLabLaunchPayload",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 54,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Typed SQL Lab payload for audited launch handoff."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SupersetCompilationAdapter",
          "type": "Class",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 57,
          "end_line": 506,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Delegate preview compilation and SQL Lab launch to Superset without local SQL fabrication.",
            "PRE": "environment is configured and Superset is reachable for the target session.",
            "POST": "adapter can return explicit ready/failed preview artifacts and canonical SQL Lab references.",
            "SIDE_EFFECT": "issues network requests to Superset API surfaces."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "SupersetClient"
            }
          ],
          "children": [
            {
              "name": "SupersetCompilationAdapter.__init__",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 65,
              "end_line": 74,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Bind adapter to one Superset environment and client instance."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetCompilationAdapter._supports_client_method",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 76,
              "end_line": 85,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Detect explicitly implemented client capabilities without treating loose mocks as real methods."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetCompilationAdapter.compile_preview",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 87,
              "end_line": 180,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Request Superset-side compiled SQL preview for the current effective inputs.",
                "PRE": "dataset_id and effective inputs are available for the current session.",
                "POST": "returns a ready or failed preview artifact backed only by Superset-originated SQL or diagnostics.",
                "SIDE_EFFECT": "performs upstream preview requests.",
                "DATA_CONTRACT": "Input[PreviewCompilationPayload] -> Output[CompiledPreview]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetCompilationAdapter._request_superset_preview"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "SupersetCompilationAdapter.mark_preview_stale",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 182,
              "end_line": 191,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Invalidate previous preview after mapping or value changes.",
                "PRE": "preview is a persisted preview artifact or current in-memory snapshot.",
                "POST": "preview status becomes stale without fabricating a replacement artifact."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetCompilationAdapter.create_sql_lab_session",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 193,
              "end_line": 252,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Create the canonical audited execution session after all launch gates pass.",
                "PRE": "compiled_sql is Superset-originated and launch gates are already satisfied.",
                "POST": "returns one canonical SQL Lab session reference from Superset.",
                "SIDE_EFFECT": "performs upstream SQL Lab execution/session creation.",
                "DATA_CONTRACT": "Input[SqlLabLaunchPayload] -> Output[str]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetCompilationAdapter._request_sql_lab_session"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "SupersetCompilationAdapter._request_superset_preview",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 254,
              "end_line": 398,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Request preview compilation through explicit client support backed by real Superset endpoints only.",
                "PRE": "payload contains a valid dataset identifier and deterministic execution inputs for one preview attempt.",
                "POST": "returns one normalized upstream compilation response including the chosen strategy metadata.",
                "SIDE_EFFECT": "issues one or more Superset preview requests through the client fallback chain.",
                "DATA_CONTRACT": "Input[PreviewCompilationPayload] -> Output[Dict[str,Any]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.compile_dataset_preview"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "SupersetCompilationAdapter._request_sql_lab_session",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 400,
              "end_line": 459,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Probe supported SQL Lab execution surfaces and return the first successful response.",
                "PRE": "payload carries non-empty Superset-originated SQL and a preview identifier for the current launch.",
                "POST": "returns the first successful SQL Lab execution response from Superset.",
                "SIDE_EFFECT": "issues Superset dataset lookup and SQL Lab execution requests.",
                "DATA_CONTRACT": "Input[SqlLabLaunchPayload] -> Output[Dict[str,Any]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dataset"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "SupersetCompilationAdapter._normalize_preview_response",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 461,
              "end_line": 493,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Normalize candidate Superset preview responses into one compiled-sql structure."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "CompiledPreview"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "SupersetCompilationAdapter._dump_json",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 495,
              "end_line": 503,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Serialize Superset request payload deterministically for network transport."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_supports_client_method",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "compile_preview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mark_preview_stale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 187,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_sql_lab_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 201,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_request_superset_preview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 262,
          "end_line": 262,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_request_sql_lab_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 408,
          "end_line": 408,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_normalize_preview_response",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 465,
          "end_line": 465,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_dump_json",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 498,
          "end_line": 498,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 508 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8071428571428572
      }
    },
    {
      "name": "FileIO",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 488,
      "tags": {
        "TIER": "STANDARD",
        "SEMANTICS": "file, io, zip, yaml, temp, archive, utility",
        "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0430\u0440\u0445\u0438\u0432\u0430\u043c\u0438 ZIP, \u0444\u0430\u0439\u043b\u0430\u043c\u0438 YAML \u0438 \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439.",
        "LAYER": "Infra",
        "PUBLIC_API": "create_temp_file, remove_empty_directories, read_dashboard_from_disk, calculate_crc32, RetentionPolicy, archive_exports, save_and_unpack_dashboard, update_yamls, create_dashboard_export, sanitize_filename, get_filename_from_headers, consolidate_archive_folders"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.logger"
        },
        {
          "type": "DEPENDS_ON",
          "target": "pyyaml"
        }
      ],
      "children": [
        {
          "name": "InvalidZipFormatError",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Exception raised when a file is not a valid ZIP archive."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_temp_file",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 71,
          "tags": {
            "PURPOSE": "\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c.",
            "PRE": "suffix \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u0439 \u0442\u0438\u043f \u0440\u0435\u0441\u0443\u0440\u0441\u0430.",
            "POST": "\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0441\u043e\u0437\u0434\u0430\u043d \u0438 \u043f\u0443\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d; \u0440\u0435\u0441\u0443\u0440\u0441 \u0443\u0434\u0430\u043b\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.",
            "PARAM": "mode (str) - \u0420\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0444\u0430\u0439\u043b (e.g., 'wb').",
            "YIELDS": "Path - \u041f\u0443\u0442\u044c \u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0443.",
            "THROW": "IOError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remove_empty_directories",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 96,
          "tags": {
            "PURPOSE": "\u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438.",
            "PRE": "root_dir \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0443\u0442\u0435\u043c \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.",
            "POST": "\u0412\u0441\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u044b, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u043e \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e.",
            "PARAM": "root_dir (str) - \u041f\u0443\u0442\u044c \u043a \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438.",
            "RETURN": "int - \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "read_dashboard_from_disk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 114,
          "tags": {
            "PURPOSE": "\u0427\u0438\u0442\u0430\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0441 \u0434\u0438\u0441\u043a\u0430.",
            "PRE": "file_path \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b.",
            "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0431\u0430\u0439\u0442\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0438 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430.",
            "PARAM": "file_path (str) - \u041f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443.",
            "RETURN": "Tuple[bytes, str] - \u041a\u043e\u0440\u0442\u0435\u0436 (\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430).",
            "THROW": "FileNotFoundError - \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "calculate_crc32",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 128,
          "tags": {
            "PURPOSE": "\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443 CRC32 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430.",
            "PRE": "file_path \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c Path \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u0443.",
            "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 8-\u0437\u043d\u0430\u0447\u043d\u0443\u044e hex-\u0441\u0442\u0440\u043e\u043a\u0443 CRC32.",
            "PARAM": "file_path (Path) - \u041f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443.",
            "RETURN": "str - 8-\u0437\u043d\u0430\u0447\u043d\u043e\u0435 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 CRC32.",
            "THROW": "IOError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RetentionPolicy",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 138,
          "tags": {
            "PURPOSE": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u043e\u0432 (\u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0435, \u0435\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0435, \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0435)."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "archive_exports",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 141,
          "end_line": 222,
          "tags": {
            "PURPOSE": "\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0432\u043e\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044e.",
            "PRE": "output_dir \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0443\u0442\u0435\u043c \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.",
            "POST": "\u0421\u0442\u0430\u0440\u044b\u0435 \u0438\u043b\u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0435\u0441\u044f \u0430\u0440\u0445\u0438\u0432\u044b \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0435.",
            "PARAM": "deduplicate (bool) - \u0424\u043b\u0430\u0433 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432 \u043f\u043e CRC32."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "apply_retention_policy"
            },
            {
              "type": "CALLS",
              "target": "calculate_crc32"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "apply_retention_policy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 224,
          "end_line": 257,
          "tags": {
            "PURPOSE": "(Helper) \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f \u0442\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c.",
            "PRE": "files_with_dates is a list of (Path, date) tuples.",
            "POST": "Returns a set of files to keep.",
            "PARAM": "policy (RetentionPolicy) - \u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.",
            "RETURN": "set - \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0442\u0435\u0439 \u043a \u0444\u0430\u0439\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_and_unpack_dashboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 259,
          "end_line": 288,
          "tags": {
            "PURPOSE": "\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 ZIP-\u0430\u0440\u0445\u0438\u0432\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a \u0438 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e.",
            "PRE": "zip_content \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0433\u043e ZIP-\u0430\u0440\u0445\u0438\u0432\u0430.",
            "POST": "ZIP-\u0444\u0430\u0439\u043b \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d, \u0438 \u0435\u0441\u043b\u0438 unpack=True, \u043e\u043d \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d \u0432 output_dir.",
            "PARAM": "original_filename (Optional[str]) - \u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.",
            "RETURN": "Tuple[Path, Optional[Path]] - \u041f\u0443\u0442\u044c \u043a ZIP-\u0444\u0430\u0439\u043b\u0443 \u0438, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e, \u043f\u0443\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u043e\u0439.",
            "THROW": "InvalidZipFormatError - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 ZIP."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update_yamls",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 290,
          "end_line": 310,
          "tags": {
            "PURPOSE": "\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 YAML-\u0444\u0430\u0439\u043b\u0430\u0445, \u0437\u0430\u043c\u0435\u043d\u044f\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f regex.",
            "PRE": "path \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0435\u0439.",
            "POST": "\u0412\u0441\u0435 YAML \u0444\u0430\u0439\u043b\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c.",
            "THROW": "FileNotFoundError - \u0415\u0441\u043b\u0438 `path` \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.",
            "PARAM": "replace_string (Optional[LiteralString]) - \u0421\u0442\u0440\u043e\u043a\u0430 \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u043d\u044b."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "_update_yaml_file"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_update_yaml_file",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 312,
          "end_line": 377,
          "tags": {
            "PURPOSE": "(Helper) \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u0438\u043d YAML \u0444\u0430\u0439\u043b.",
            "PRE": "file_path \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c Path \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 YAML \u0444\u0430\u0439\u043b\u0443.",
            "POST": "\u0424\u0430\u0439\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c \u0438\u043b\u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e.",
            "PARAM": "replace_string (Optional[str]) - \u0417\u0430\u043c\u0435\u043d\u0430."
          },
          "relations": [],
          "children": [
            {
              "name": "replacer",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 359,
              "end_line": 368,
              "tags": {
                "PURPOSE": "\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043c\u0435\u043d\u044b, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0449\u0430\u044f \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438.",
                "PRE": "match \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.",
                "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043d\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0438 \u043a\u0430\u0432\u044b\u0447\u043a\u0438."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_dashboard_export",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 379,
          "end_line": 405,
          "tags": {
            "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 ZIP-\u0430\u0440\u0445\u0438\u0432 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0443\u0442\u0435\u0439.",
            "PRE": "source_paths \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0443\u0442\u0438.",
            "POST": "ZIP-\u0430\u0440\u0445\u0438\u0432 \u0441\u043e\u0437\u0434\u0430\u043d \u043f\u043e \u043f\u0443\u0442\u0438 zip_path.",
            "PARAM": "exclude_extensions (Optional[List[str]]) - \u0421\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.",
            "RETURN": "bool - `True` \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0445\u0435, `False` \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sanitize_filename",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 407,
          "end_line": 416,
          "tags": {
            "PURPOSE": "\u041e\u0447\u0438\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.",
            "PRE": "filename \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439.",
            "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0431\u0435\u0437 \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.",
            "PARAM": "filename (str) - \u0418\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430.",
            "RETURN": "str - \u041e\u0447\u0438\u0449\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_filename_from_headers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 418,
          "end_line": 430,
          "tags": {
            "PURPOSE": "\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 'Content-Disposition'.",
            "PRE": "headers \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.",
            "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 None, \u0435\u0441\u043b\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.",
            "PARAM": "headers (dict) - \u0421\u043b\u043e\u0432\u0430\u0440\u044c HTTP \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.",
            "RETURN": "Optional[str] - \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 or `None`."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "consolidate_archive_folders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 432,
          "end_line": 486,
          "tags": {
            "PURPOSE": "\u041a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043b\u0430\u0433\u0430 \u0432 \u0438\u043c\u0435\u043d\u0438.",
            "PRE": "root_directory \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c Path \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.",
            "POST": "\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0432 \u043e\u0434\u043d\u0443.",
            "THROW": "TypeError, ValueError - \u0415\u0441\u043b\u0438 `root_directory` \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u0435\u043d.",
            "PARAM": "root_directory (Path) - \u041a\u043e\u0440\u043d\u0435\u0432\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0430\u0446\u0438\u0438."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 488 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "NetworkModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 538,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "network, http, client, api, requests, session, authentication",
        "PURPOSE": "\u0418\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0443\u044e HTTP-\u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Superset API, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0435\u0439, retry-\u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a.",
        "LAYER": "Infra",
        "PUBLIC_API": "APIClient"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "LoggerModule"
        }
      ],
      "children": [
        {
          "name": "SupersetAPIError",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 38,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Base exception for all Superset API related errors."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 28,
              "end_line": 37,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Initializes the exception with a message and context.",
                "PRE": "message is a string, context is a dict.",
                "POST": "Exception is initialized with context."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "AuthenticationError",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 53,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Exception raised when authentication fails."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 44,
              "end_line": 52,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Initializes the authentication error.",
                "PRE": "message is a string, context is a dict.",
                "POST": "AuthenticationError is initialized."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "PermissionDeniedError",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Exception raised when access is denied."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 58,
              "end_line": 65,
              "tags": {
                "PURPOSE": "Initializes the permission denied error.",
                "PRE": "message is a string, context is a dict.",
                "POST": "PermissionDeniedError is initialized."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardNotFoundError",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Exception raised when a dashboard cannot be found."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 71,
              "end_line": 78,
              "tags": {
                "PURPOSE": "Initializes the not found error with resource ID.",
                "PRE": "resource_id is provided.",
                "POST": "DashboardNotFoundError is initialized."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "NetworkError",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Exception raised when a network level error occurs."
          },
          "relations": [],
          "children": [
            {
              "name": "NetworkError.__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 84,
              "end_line": 92,
              "tags": {
                "PURPOSE": "Initializes the network error.",
                "PRE": "message is a string.",
                "POST": "NetworkError is initialized."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SupersetAuthCache",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 153,
          "tags": {
            "PURPOSE": "Process-local cache for Superset access/csrf tokens keyed by environment credentials.",
            "PRE": "base_url and username are stable strings.",
            "POST": "Cached entries expire automatically by TTL and can be reused across requests."
          },
          "relations": [],
          "children": [
            {
              "name": "SupersetAuthCache.get",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 114,
              "end_line": 133,
              "tags": {},
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "SupersetAuthCache.set",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 136,
              "end_line": 147,
              "tags": {},
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "APIClient",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 155,
          "end_line": 536,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Synchronous Superset API client with process-local auth token caching."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SupersetAuthCache"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LoggerModule"
            }
          ],
          "children": [
            {
              "name": "APIClient.__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 163,
              "end_line": 186,
              "tags": {
                "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 API \u043a\u043b\u0438\u0435\u043d\u0442 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439, \u0441\u0435\u0441\u0441\u0438\u0435\u0439 \u0438 \u043b\u043e\u0433\u0433\u0435\u0440\u043e\u043c.",
                "PARAM": "timeout (int) - \u0422\u0430\u0439\u043c\u0430\u0443\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.",
                "PRE": "config must contain 'base_url' and 'auth'.",
                "POST": "APIClient instance is initialized with a session."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_init_session",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 188,
              "end_line": 232,
              "tags": {
                "PURPOSE": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 `requests.Session` \u0441 retry-\u043b\u043e\u0433\u0438\u043a\u043e\u0439.",
                "PRE": "self.request_settings must be initialized.",
                "POST": "Returns a configured requests.Session instance.",
                "RETURN": "requests.Session - \u041d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0435\u0441\u0441\u0438\u044f."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_normalize_base_url",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 234,
              "end_line": 244,
              "tags": {
                "PURPOSE": "Normalize Superset environment URL to base host/path without trailing slash and /api/v1 suffix.",
                "PRE": "raw_url can be empty.",
                "POST": "Returns canonical base URL suitable for building API endpoints.",
                "RETURN": "str"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_api_url",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 246,
              "end_line": 260,
              "tags": {
                "PURPOSE": "Build absolute Superset API URL for endpoint using canonical /api/v1 base.",
                "PRE": "endpoint is relative path or absolute URL.",
                "POST": "Returns full URL without accidental duplicate slashes.",
                "RETURN": "str"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "APIClient.authenticate",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 262,
              "end_line": 312,
              "tags": {
                "PURPOSE": "\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 Superset API \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 access \u0438 CSRF \u0442\u043e\u043a\u0435\u043d\u044b.",
                "PRE": "self.auth and self.base_url must be valid.",
                "POST": "`self._tokens` \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d, `self._authenticated` \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0432 `True`.",
                "RETURN": "Dict[str, str] - \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438.",
                "THROW": "AuthenticationError, NetworkError - \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetAuthCache.get"
                },
                {
                  "type": "CALLS",
                  "target": "SupersetAuthCache.set"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "headers",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 315,
              "end_line": 328,
              "tags": {
                "PURPOSE": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.",
                "PRE": "APIClient is initialized and authenticated or can be authenticated.",
                "POST": "Returns headers including auth tokens."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "request",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 330,
              "end_line": 358,
              "tags": {
                "PURPOSE": "\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441 \u043a API.",
                "PARAM": "raw_response (bool) - \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043b\u0438 \u0441\u044b\u0440\u043e\u0439 \u043e\u0442\u0432\u0435\u0442.",
                "PRE": "method and endpoint must be strings.",
                "POST": "Returns response content or raw Response object.",
                "RETURN": "`requests.Response` \u0435\u0441\u043b\u0438 `raw_response=True`, \u0438\u043d\u0430\u0447\u0435 `dict`.",
                "THROW": "SupersetAPIError, NetworkError \u0438 \u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_handle_http_error",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 360,
              "end_line": 385,
              "tags": {
                "PURPOSE": "(Helper) \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 HTTP \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.",
                "PARAM": "endpoint (str) - \u042d\u043d\u0434\u043f\u043e\u0438\u043d\u0442.",
                "PRE": "e must be a valid HTTPError with a response.",
                "POST": "Raises a specific SupersetAPIError or subclass."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_is_dashboard_endpoint",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 387,
              "end_line": 403,
              "tags": {
                "PURPOSE": "Determine whether an API endpoint represents a dashboard resource for 404 translation.",
                "PRE": "endpoint may be relative or absolute.",
                "POST": "Returns true only for dashboard-specific endpoints."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_handle_network_error",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 405,
              "end_line": 420,
              "tags": {
                "PURPOSE": "(Helper) \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 `NetworkError`.",
                "PARAM": "url (str) - URL.",
                "PRE": "e must be a RequestException.",
                "POST": "Raises a NetworkError."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "upload_file",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 422,
              "end_line": 451,
              "tags": {
                "PURPOSE": "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 multipart/form-data.",
                "PARAM": "timeout (Optional[int]) - \u0422\u0430\u0439\u043c\u0430\u0443\u0442.",
                "PRE": "file_info must contain 'file_obj' and 'file_name'.",
                "POST": "File is uploaded and response returned.",
                "RETURN": "\u041e\u0442\u0432\u0435\u0442 API \u0432 \u0432\u0438\u0434\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f.",
                "THROW": "SupersetAPIError, NetworkError, TypeError."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_perform_upload",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 453,
              "end_line": 479,
              "tags": {
                "PURPOSE": "(Helper) \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 POST \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c.",
                "PARAM": "timeout (Optional[int]) - \u0422\u0430\u0439\u043c\u0430\u0443\u0442.",
                "PRE": "url, files, and headers must be provided.",
                "POST": "POST request is performed and JSON response returned.",
                "RETURN": "Dict - \u041e\u0442\u0432\u0435\u0442."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "fetch_paginated_count",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 481,
              "end_line": 493,
              "tags": {
                "PURPOSE": "\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438.",
                "PARAM": "count_field (str) - \u041f\u043e\u043b\u0435 \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c.",
                "PRE": "query_params must be a dictionary.",
                "POST": "Returns total count of items.",
                "RETURN": "int - \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "fetch_paginated_data",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 495,
              "end_line": 534,
              "tags": {
                "PURPOSE": "\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043f\u0430\u0433\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430.",
                "PARAM": "pagination_options (Dict[str, Any]) - \u041e\u043f\u0446\u0438\u0438 \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438.",
                "PRE": "pagination_options must contain 'base_query', 'results_field'. 'total_count' is optional.",
                "POST": "Returns all items across all pages.",
                "RETURN": "List[Any] - \u0421\u043f\u0438\u0441\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 88,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "set",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 137,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "invalidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 150,
          "end_line": 150,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 170,
          "end_line": 170,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "init_poolmanager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 199,
          "end_line": 199,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "authenticate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 270,
          "end_line": 270,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 538 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "backend.src.core.utils.matching",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 55,
      "tags": {
        "SEMANTICS": "fuzzy, matching, rapidfuzz, database, mapping",
        "PURPOSE": "Provides utility functions for fuzzy matching database names.",
        "LAYER": "Core",
        "INVARIANT": "Confidence scores are returned as floats between 0.0 and 1.0."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "rapidfuzz"
        }
      ],
      "children": [
        {
          "name": "suggest_mappings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Suggests mappings between source and target databases using fuzzy matching.",
            "PRE": "source_databases and target_databases are lists of dictionaries with 'uuid' and 'database_name'.",
            "POST": "Returns a list of suggested mappings with confidence scores.",
            "PARAM": "threshold (int) - Minimum confidence score (0-100).",
            "RETURN": "List[Dict] - Suggested mappings."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "backend.core.utils.dataset_mapper",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 237,
      "tags": {
        "SEMANTICS": "dataset, mapping, postgresql, xlsx, superset",
        "PURPOSE": "\u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 (verbose_map) \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u0445 Superset, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u044f \u0438\u0445 \u0438\u0437 PostgreSQL \u0438\u043b\u0438 XLSX-\u0444\u0430\u0439\u043b\u043e\u0432.",
        "LAYER": "Domain",
        "PUBLIC_API": "DatasetMapper"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.core.superset_client"
        },
        {
          "type": "DEPENDS_ON",
          "target": "pandas"
        },
        {
          "type": "DEPENDS_ON",
          "target": "psycopg2"
        }
      ],
      "children": [
        {
          "name": "DatasetMapper",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 235,
          "tags": {
            "PURPOSE": "\u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u043c\u0435\u043f\u043f\u0438\u043d\u0433\u0430 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f verbose_map \u0432 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u0445 Superset."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 21,
              "end_line": 26,
              "tags": {
                "PURPOSE": "Initializes the mapper.",
                "POST": "\u041e\u0431\u044a\u0435\u043a\u0442 DatasetMapper \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_postgres_comments",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 28,
              "end_line": 91,
              "tags": {
                "PURPOSE": "\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 PostgreSQL.",
                "PRE": "table_name \u0438 table_schema \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438.",
                "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447\u0438 - \u0438\u043c\u0435\u043d\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f - \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438\u0437 \u0411\u0414.",
                "THROW": "Exception - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u0411\u0414.",
                "PARAM": "table_schema (str) - \u0421\u0445\u0435\u043c\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.",
                "RETURN": "Dict[str, str] - \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438 \u043a \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u043c."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "load_excel_mappings",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 93,
              "end_line": 111,
              "tags": {
                "PURPOSE": "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043c\u0435\u043f\u043f\u0438\u043d\u0433\u0438 'column_name' -> 'column_comment' \u0438\u0437 XLSX \u0444\u0430\u0439\u043b\u0430.",
                "PRE": "file_path \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 XLSX \u0444\u0430\u0439\u043b.",
                "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043c\u0435\u043f\u043f\u0438\u043d\u0433\u0430\u043c\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430.",
                "THROW": "Exception - \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430.",
                "PARAM": "file_path (str) - \u041f\u0443\u0442\u044c \u043a XLSX \u0444\u0430\u0439\u043b\u0443.",
                "RETURN": "Dict[str, str] - \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043c\u0435\u043f\u043f\u0438\u043d\u0433\u0430\u043c\u0438."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "run_mapping",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 113,
              "end_line": 234,
              "tags": {
                "PURPOSE": "\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u043f\u043f\u0438\u043d\u0433\u0430 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f verbose_map \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0432 Superset.",
                "PRE": "dataset_id \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c ID \u0432 Superset.",
                "POST": "\u0415\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0432 Superset \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d \u0447\u0435\u0440\u0435\u0437 API.",
                "PARAM": "table_schema (Optional[str]) - \u0421\u0445\u0435\u043c\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 PostgreSQL."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "self.get_postgres_comments"
                },
                {
                  "type": "CALLS",
                  "target": "self.load_excel_mappings"
                },
                {
                  "type": "CALLS",
                  "target": "superset_client.get_dataset"
                },
                {
                  "type": "CALLS",
                  "target": "superset_client.update_dataset"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "src.core.utils",
      "type": "Package",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Shared utility package root."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "NativeFilterExtractionTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, superset, native, filters, permalink, filter_state",
        "PURPOSE": "Verify native filter extraction from permalinks and native_filters_key URLs.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "SupersetClient"
        },
        {
          "type": "BINDS_TO",
          "target": "AsyncSupersetClient"
        },
        {
          "type": "BINDS_TO",
          "target": "FilterState, ParsedNativeFilters, ExtraFormDataMerge"
        }
      ],
      "children": [
        {
          "name": "_make_environment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 43,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "NativeFilterExtractionTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_extract_native_filters_from_permalink",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": null,
          "tags": {
            "PURPOSE": "Extract native filters from a permalink key."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "NativeFilterExtractionTests"
            }
          ],
          "children": [
            {
              "name": "test_extract_native_filters_from_permalink_direct_response",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 95,
              "end_line": null,
              "tags": {
                "PURPOSE": "Handle permalink response without result wrapper."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "NativeFilterExtractionTests"
                }
              ],
              "children": [
                {
                  "name": "test_extract_native_filters_from_key",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 123,
                  "end_line": null,
                  "tags": {
                    "PURPOSE": "Extract native filters from a native_filters_key."
                  },
                  "relations": [
                    {
                      "type": "BINDS_TO",
                      "target": "NativeFilterExtractionTests"
                    }
                  ],
                  "children": [
                    {
                      "name": "test_extract_native_filters_from_key_single_filter",
                      "type": "Function",
                      "complexity": 1,
                      "tier": "TRIVIAL",
                      "start_line": 162,
                      "end_line": null,
                      "tags": {
                        "PURPOSE": "Handle single filter format in native filter state."
                      },
                      "relations": [
                        {
                          "type": "BINDS_TO",
                          "target": "NativeFilterExtractionTests"
                        }
                      ],
                      "children": [
                        {
                          "name": "test_extract_native_filters_from_key_dict_value",
                          "type": "Function",
                          "complexity": 1,
                          "tier": "TRIVIAL",
                          "start_line": 196,
                          "end_line": null,
                          "tags": {
                            "PURPOSE": "Handle filter state value as dict instead of JSON string."
                          },
                          "relations": [
                            {
                              "type": "BINDS_TO",
                              "target": "NativeFilterExtractionTests"
                            }
                          ],
                          "children": [
                            {
                              "name": "test_parse_dashboard_url_for_filters_permalink",
                              "type": "Function",
                              "complexity": 1,
                              "tier": "TRIVIAL",
                              "start_line": 223,
                              "end_line": null,
                              "tags": {
                                "PURPOSE": "Parse permalink URL format."
                              },
                              "relations": [
                                {
                                  "type": "BINDS_TO",
                                  "target": "NativeFilterExtractionTests"
                                }
                              ],
                              "children": [
                                {
                                  "name": "test_parse_dashboard_url_for_filters_native_key",
                                  "type": "Function",
                                  "complexity": 1,
                                  "tier": "TRIVIAL",
                                  "start_line": 243,
                                  "end_line": null,
                                  "tags": {
                                    "PURPOSE": "Parse native_filters_key URL format with numeric dashboard ID."
                                  },
                                  "relations": [
                                    {
                                      "type": "BINDS_TO",
                                      "target": "NativeFilterExtractionTests"
                                    }
                                  ],
                                  "children": [
                                    {
                                      "name": "test_parse_dashboard_url_for_filters_native_key_slug",
                                      "type": "Function",
                                      "complexity": 1,
                                      "tier": "TRIVIAL",
                                      "start_line": 268,
                                      "end_line": null,
                                      "tags": {
                                        "PURPOSE": "Parse native_filters_key URL format when dashboard reference is a slug, not a numeric ID."
                                      },
                                      "relations": [
                                        {
                                          "type": "BINDS_TO",
                                          "target": "NativeFilterExtractionTests"
                                        }
                                      ],
                                      "children": [
                                        {
                                          "name": "test_parse_dashboard_url_for_filters_native_key_slug_resolution_fails",
                                          "type": "Function",
                                          "complexity": 1,
                                          "tier": "TRIVIAL",
                                          "start_line": 301,
                                          "end_line": null,
                                          "tags": {
                                            "PURPOSE": "Gracefully handle slug resolution failure for native_filters_key URL."
                                          },
                                          "relations": [
                                            {
                                              "type": "BINDS_TO",
                                              "target": "NativeFilterExtractionTests"
                                            }
                                          ],
                                          "children": [
                                            {
                                              "name": "test_parse_dashboard_url_for_filters_native_filters_direct",
                                              "type": "Function",
                                              "complexity": 1,
                                              "tier": "TRIVIAL",
                                              "start_line": 319,
                                              "end_line": null,
                                              "tags": {
                                                "PURPOSE": "Parse native_filters direct query param."
                                              },
                                              "relations": [
                                                {
                                                  "type": "BINDS_TO",
                                                  "target": "NativeFilterExtractionTests"
                                                }
                                              ],
                                              "children": [
                                                {
                                                  "name": "test_parse_dashboard_url_for_filters_no_filters",
                                                  "type": "Function",
                                                  "complexity": 1,
                                                  "tier": "TRIVIAL",
                                                  "start_line": 337,
                                                  "end_line": null,
                                                  "tags": {
                                                    "PURPOSE": "Return empty result when no filters present."
                                                  },
                                                  "relations": [
                                                    {
                                                      "type": "BINDS_TO",
                                                      "target": "NativeFilterExtractionTests"
                                                    }
                                                  ],
                                                  "children": [
                                                    {
                                                      "name": "test_extra_form_data_merge",
                                                      "type": "Function",
                                                      "complexity": 1,
                                                      "tier": "TRIVIAL",
                                                      "start_line": 354,
                                                      "end_line": null,
                                                      "tags": {
                                                        "PURPOSE": "Test ExtraFormDataMerge correctly merges dictionaries."
                                                      },
                                                      "relations": [
                                                        {
                                                          "type": "BINDS_TO",
                                                          "target": "NativeFilterExtractionTests"
                                                        }
                                                      ],
                                                      "children": [
                                                        {
                                                          "name": "test_filter_state_model",
                                                          "type": "Function",
                                                          "complexity": 1,
                                                          "tier": "TRIVIAL",
                                                          "start_line": 392,
                                                          "end_line": null,
                                                          "tags": {
                                                            "PURPOSE": "Test FilterState Pydantic model."
                                                          },
                                                          "relations": [
                                                            {
                                                              "type": "BINDS_TO",
                                                              "target": "NativeFilterExtractionTests"
                                                            }
                                                          ],
                                                          "children": [
                                                            {
                                                              "name": "test_parsed_native_filters_model",
                                                              "type": "Function",
                                                              "complexity": 1,
                                                              "tier": "TRIVIAL",
                                                              "start_line": 410,
                                                              "end_line": null,
                                                              "tags": {
                                                                "PURPOSE": "Test ParsedNativeFilters Pydantic model."
                                                              },
                                                              "relations": [
                                                                {
                                                                  "type": "BINDS_TO",
                                                                  "target": "NativeFilterExtractionTests"
                                                                }
                                                              ],
                                                              "children": [
                                                                {
                                                                  "name": "test_parsed_native_filters_empty",
                                                                  "type": "Function",
                                                                  "complexity": 1,
                                                                  "tier": "TRIVIAL",
                                                                  "start_line": 429,
                                                                  "end_line": null,
                                                                  "tags": {
                                                                    "PURPOSE": "Test ParsedNativeFilters with no filters."
                                                                  },
                                                                  "relations": [
                                                                    {
                                                                      "type": "BINDS_TO",
                                                                      "target": "NativeFilterExtractionTests"
                                                                    }
                                                                  ],
                                                                  "children": [
                                                                    {
                                                                      "name": "test_native_filter_data_mask_model",
                                                                      "type": "Function",
                                                                      "complexity": 1,
                                                                      "tier": "TRIVIAL",
                                                                      "start_line": 442,
                                                                      "end_line": null,
                                                                      "tags": {
                                                                        "PURPOSE": "Test NativeFilterDataMask model."
                                                                      },
                                                                      "relations": [
                                                                        {
                                                                          "type": "BINDS_TO",
                                                                          "target": "NativeFilterExtractionTests"
                                                                        }
                                                                      ],
                                                                      "children": [
                                                                        {
                                                                          "name": "test_recover_imported_filters_reconciles_raw_native_filter_ids_to_metadata_names",
                                                                          "type": "Function",
                                                                          "complexity": 1,
                                                                          "tier": "TRIVIAL",
                                                                          "start_line": 463,
                                                                          "end_line": 527,
                                                                          "tags": {
                                                                            "PURPOSE": "Reconcile raw native filter ids from state to canonical metadata filter names."
                                                                          },
                                                                          "relations": [
                                                                            {
                                                                              "type": "BINDS_TO",
                                                                              "target": "NativeFilterExtractionTests"
                                                                            }
                                                                          ],
                                                                          "children": [],
                                                                          "compliance": {
                                                                            "valid": true,
                                                                            "issues": [],
                                                                            "score": 1.0
                                                                          }
                                                                        },
                                                                        {
                                                                          "name": "test_recover_imported_filters_collapses_state_and_metadata_duplicates_into_one_canonical_filter",
                                                                          "type": "Function",
                                                                          "complexity": 1,
                                                                          "tier": "TRIVIAL",
                                                                          "start_line": 530,
                                                                          "end_line": 585,
                                                                          "tags": {
                                                                            "PURPOSE": "Collapse raw-id state entries and metadata entries into one canonical filter."
                                                                          },
                                                                          "relations": [
                                                                            {
                                                                              "type": "BINDS_TO",
                                                                              "target": "NativeFilterExtractionTests"
                                                                            }
                                                                          ],
                                                                          "children": [],
                                                                          "compliance": {
                                                                            "valid": true,
                                                                            "issues": [],
                                                                            "score": 1.0
                                                                          }
                                                                        },
                                                                        {
                                                                          "name": "test_recover_imported_filters_preserves_unmatched_raw_native_filter_ids",
                                                                          "type": "Function",
                                                                          "complexity": 1,
                                                                          "tier": "TRIVIAL",
                                                                          "start_line": 588,
                                                                          "end_line": 642,
                                                                          "tags": {
                                                                            "PURPOSE": "Preserve unmatched raw native filter ids as fallback diagnostics when metadata mapping is unavailable."
                                                                          },
                                                                          "relations": [
                                                                            {
                                                                              "type": "BINDS_TO",
                                                                              "target": "NativeFilterExtractionTests"
                                                                            }
                                                                          ],
                                                                          "children": [],
                                                                          "compliance": {
                                                                            "valid": true,
                                                                            "issues": [],
                                                                            "score": 1.0
                                                                          }
                                                                        },
                                                                        {
                                                                          "name": "test_extract_imported_filters_preserves_clause_level_native_filter_payload_for_preview",
                                                                          "type": "Function",
                                                                          "complexity": 1,
                                                                          "tier": "TRIVIAL",
                                                                          "start_line": 645,
                                                                          "end_line": 687,
                                                                          "tags": {
                                                                            "PURPOSE": "Recovered native filter state should preserve exact Superset clause payload and time extras for preview compilation."
                                                                          },
                                                                          "relations": [
                                                                            {
                                                                              "type": "BINDS_TO",
                                                                              "target": "NativeFilterExtractionTests"
                                                                            }
                                                                          ],
                                                                          "children": [],
                                                                          "compliance": {
                                                                            "valid": true,
                                                                            "issues": [],
                                                                            "score": 1.0
                                                                          }
                                                                        },
                                                                        {
                                                                          "name": "test_sanitize_imported_filter_for_assistant_masks_sensitive_raw_values",
                                                                          "type": "Function",
                                                                          "complexity": 1,
                                                                          "tier": "TRIVIAL",
                                                                          "start_line": 690,
                                                                          "end_line": 708,
                                                                          "tags": {
                                                                            "PURPOSE": "Assistant-facing imported-filter payload should redact likely PII while preserving structure metadata."
                                                                          },
                                                                          "relations": [
                                                                            {
                                                                              "type": "BINDS_TO",
                                                                              "target": "NativeFilterExtractionTests"
                                                                            }
                                                                          ],
                                                                          "children": [],
                                                                          "compliance": {
                                                                            "valid": true,
                                                                            "issues": [],
                                                                            "score": 1.0
                                                                          }
                                                                        }
                                                                      ],
                                                                      "compliance": {
                                                                        "valid": false,
                                                                        "issues": [
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          },
                                                                          {
                                                                            "message": "Unclosed Anchor: [DEF:test_native_filter_data_mask_model:Function] started at line 442",
                                                                            "severity": "ERROR",
                                                                            "line_number": 442
                                                                          }
                                                                        ],
                                                                        "score": 0.0
                                                                      }
                                                                    }
                                                                  ],
                                                                  "compliance": {
                                                                    "valid": false,
                                                                    "issues": [
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      },
                                                                      {
                                                                        "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_empty:Function] started at line 429",
                                                                        "severity": "ERROR",
                                                                        "line_number": 429
                                                                      }
                                                                    ],
                                                                    "score": 0.0
                                                                  }
                                                                }
                                                              ],
                                                              "compliance": {
                                                                "valid": false,
                                                                "issues": [
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:test_parsed_native_filters_model:Function] started at line 410",
                                                                    "severity": "ERROR",
                                                                    "line_number": 410
                                                                  }
                                                                ],
                                                                "score": 0.0
                                                              }
                                                            }
                                                          ],
                                                          "compliance": {
                                                            "valid": false,
                                                            "issues": [
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_filter_state_model:Function] started at line 392",
                                                                "severity": "ERROR",
                                                                "line_number": 392
                                                              }
                                                            ],
                                                            "score": 0.0
                                                          }
                                                        }
                                                      ],
                                                      "compliance": {
                                                        "valid": false,
                                                        "issues": [
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:test_extra_form_data_merge:Function] started at line 354",
                                                            "severity": "ERROR",
                                                            "line_number": 354
                                                          }
                                                        ],
                                                        "score": 0.0
                                                      }
                                                    }
                                                  ],
                                                  "compliance": {
                                                    "valid": false,
                                                    "issues": [
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_no_filters:Function] started at line 337",
                                                        "severity": "ERROR",
                                                        "line_number": 337
                                                      }
                                                    ],
                                                    "score": 0.0
                                                  }
                                                }
                                              ],
                                              "compliance": {
                                                "valid": false,
                                                "issues": [
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_filters_direct:Function] started at line 319",
                                                    "severity": "ERROR",
                                                    "line_number": 319
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_filters_direct:Function] started at line 319",
                                                    "severity": "ERROR",
                                                    "line_number": 319
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_filters_direct:Function] started at line 319",
                                                    "severity": "ERROR",
                                                    "line_number": 319
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_filters_direct:Function] started at line 319",
                                                    "severity": "ERROR",
                                                    "line_number": 319
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_filters_direct:Function] started at line 319",
                                                    "severity": "ERROR",
                                                    "line_number": 319
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_filters_direct:Function] started at line 319",
                                                    "severity": "ERROR",
                                                    "line_number": 319
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_filters_direct:Function] started at line 319",
                                                    "severity": "ERROR",
                                                    "line_number": 319
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_filters_direct:Function] started at line 319",
                                                    "severity": "ERROR",
                                                    "line_number": 319
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_filters_direct:Function] started at line 319",
                                                    "severity": "ERROR",
                                                    "line_number": 319
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_filters_direct:Function] started at line 319",
                                                    "severity": "ERROR",
                                                    "line_number": 319
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_filters_direct:Function] started at line 319",
                                                    "severity": "ERROR",
                                                    "line_number": 319
                                                  }
                                                ],
                                                "score": 0.0
                                              }
                                            }
                                          ],
                                          "compliance": {
                                            "valid": false,
                                            "issues": [
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug_resolution_fails:Function] started at line 301",
                                                "severity": "ERROR",
                                                "line_number": 301
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug_resolution_fails:Function] started at line 301",
                                                "severity": "ERROR",
                                                "line_number": 301
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug_resolution_fails:Function] started at line 301",
                                                "severity": "ERROR",
                                                "line_number": 301
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug_resolution_fails:Function] started at line 301",
                                                "severity": "ERROR",
                                                "line_number": 301
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug_resolution_fails:Function] started at line 301",
                                                "severity": "ERROR",
                                                "line_number": 301
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug_resolution_fails:Function] started at line 301",
                                                "severity": "ERROR",
                                                "line_number": 301
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug_resolution_fails:Function] started at line 301",
                                                "severity": "ERROR",
                                                "line_number": 301
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug_resolution_fails:Function] started at line 301",
                                                "severity": "ERROR",
                                                "line_number": 301
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug_resolution_fails:Function] started at line 301",
                                                "severity": "ERROR",
                                                "line_number": 301
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug_resolution_fails:Function] started at line 301",
                                                "severity": "ERROR",
                                                "line_number": 301
                                              }
                                            ],
                                            "score": 0.0
                                          }
                                        }
                                      ],
                                      "compliance": {
                                        "valid": false,
                                        "issues": [
                                          {
                                            "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug:Function] started at line 268",
                                            "severity": "ERROR",
                                            "line_number": 268
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug:Function] started at line 268",
                                            "severity": "ERROR",
                                            "line_number": 268
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug:Function] started at line 268",
                                            "severity": "ERROR",
                                            "line_number": 268
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug:Function] started at line 268",
                                            "severity": "ERROR",
                                            "line_number": 268
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug:Function] started at line 268",
                                            "severity": "ERROR",
                                            "line_number": 268
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug:Function] started at line 268",
                                            "severity": "ERROR",
                                            "line_number": 268
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug:Function] started at line 268",
                                            "severity": "ERROR",
                                            "line_number": 268
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug:Function] started at line 268",
                                            "severity": "ERROR",
                                            "line_number": 268
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key_slug:Function] started at line 268",
                                            "severity": "ERROR",
                                            "line_number": 268
                                          }
                                        ],
                                        "score": 0.0
                                      }
                                    }
                                  ],
                                  "compliance": {
                                    "valid": false,
                                    "issues": [
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key:Function] started at line 243",
                                        "severity": "ERROR",
                                        "line_number": 243
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key:Function] started at line 243",
                                        "severity": "ERROR",
                                        "line_number": 243
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key:Function] started at line 243",
                                        "severity": "ERROR",
                                        "line_number": 243
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key:Function] started at line 243",
                                        "severity": "ERROR",
                                        "line_number": 243
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key:Function] started at line 243",
                                        "severity": "ERROR",
                                        "line_number": 243
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key:Function] started at line 243",
                                        "severity": "ERROR",
                                        "line_number": 243
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key:Function] started at line 243",
                                        "severity": "ERROR",
                                        "line_number": 243
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_native_key:Function] started at line 243",
                                        "severity": "ERROR",
                                        "line_number": 243
                                      }
                                    ],
                                    "score": 0.0
                                  }
                                }
                              ],
                              "compliance": {
                                "valid": false,
                                "issues": [
                                  {
                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_permalink:Function] started at line 223",
                                    "severity": "ERROR",
                                    "line_number": 223
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_permalink:Function] started at line 223",
                                    "severity": "ERROR",
                                    "line_number": 223
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_permalink:Function] started at line 223",
                                    "severity": "ERROR",
                                    "line_number": 223
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_permalink:Function] started at line 223",
                                    "severity": "ERROR",
                                    "line_number": 223
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_permalink:Function] started at line 223",
                                    "severity": "ERROR",
                                    "line_number": 223
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_permalink:Function] started at line 223",
                                    "severity": "ERROR",
                                    "line_number": 223
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:test_parse_dashboard_url_for_filters_permalink:Function] started at line 223",
                                    "severity": "ERROR",
                                    "line_number": 223
                                  }
                                ],
                                "score": 0.0
                              }
                            }
                          ],
                          "compliance": {
                            "valid": false,
                            "issues": [
                              {
                                "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key_dict_value:Function] started at line 196",
                                "severity": "ERROR",
                                "line_number": 196
                              },
                              {
                                "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key_dict_value:Function] started at line 196",
                                "severity": "ERROR",
                                "line_number": 196
                              },
                              {
                                "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key_dict_value:Function] started at line 196",
                                "severity": "ERROR",
                                "line_number": 196
                              },
                              {
                                "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key_dict_value:Function] started at line 196",
                                "severity": "ERROR",
                                "line_number": 196
                              },
                              {
                                "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key_dict_value:Function] started at line 196",
                                "severity": "ERROR",
                                "line_number": 196
                              },
                              {
                                "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key_dict_value:Function] started at line 196",
                                "severity": "ERROR",
                                "line_number": 196
                              }
                            ],
                            "score": 0.0
                          }
                        }
                      ],
                      "compliance": {
                        "valid": false,
                        "issues": [
                          {
                            "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key_single_filter:Function] started at line 162",
                            "severity": "ERROR",
                            "line_number": 162
                          },
                          {
                            "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key_single_filter:Function] started at line 162",
                            "severity": "ERROR",
                            "line_number": 162
                          },
                          {
                            "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key_single_filter:Function] started at line 162",
                            "severity": "ERROR",
                            "line_number": 162
                          },
                          {
                            "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key_single_filter:Function] started at line 162",
                            "severity": "ERROR",
                            "line_number": 162
                          },
                          {
                            "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key_single_filter:Function] started at line 162",
                            "severity": "ERROR",
                            "line_number": 162
                          }
                        ],
                        "score": 0.0
                      }
                    }
                  ],
                  "compliance": {
                    "valid": false,
                    "issues": [
                      {
                        "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key:Function] started at line 123",
                        "severity": "ERROR",
                        "line_number": 123
                      },
                      {
                        "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key:Function] started at line 123",
                        "severity": "ERROR",
                        "line_number": 123
                      },
                      {
                        "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key:Function] started at line 123",
                        "severity": "ERROR",
                        "line_number": 123
                      },
                      {
                        "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_key:Function] started at line 123",
                        "severity": "ERROR",
                        "line_number": 123
                      }
                    ],
                    "score": 0.0
                  }
                }
              ],
              "compliance": {
                "valid": false,
                "issues": [
                  {
                    "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_permalink_direct_response:Function] started at line 95",
                    "severity": "ERROR",
                    "line_number": 95
                  },
                  {
                    "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_permalink_direct_response:Function] started at line 95",
                    "severity": "ERROR",
                    "line_number": 95
                  },
                  {
                    "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_permalink_direct_response:Function] started at line 95",
                    "severity": "ERROR",
                    "line_number": 95
                  }
                ],
                "score": 0.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_permalink:Function] started at line 46",
                "severity": "ERROR",
                "line_number": 46
              },
              {
                "message": "Unclosed Anchor: [DEF:test_extract_native_filters_from_permalink:Function] started at line 46",
                "severity": "ERROR",
                "line_number": 46
              }
            ],
            "score": 0.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:NativeFilterExtractionTests:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "TestSupersetProfileLookup",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 153,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, superset, profile, lookup, fallback, sorting",
        "PURPOSE": "Verifies Superset profile lookup adapter payload normalization and fallback error precedence.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_RecordingNetworkClient",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 68,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Records request payloads and returns scripted responses for deterministic adapter tests.",
            "INVARIANT": "Each request consumes one scripted response in call order and persists call metadata."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestSupersetProfileLookup"
            }
          ],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 31,
              "end_line": 39,
              "tags": {
                "PURPOSE": "Initializes scripted network responses.",
                "PRE": "scripted_responses is ordered per expected request sequence.",
                "POST": "Instance stores response script and captures subsequent request calls."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "request",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 41,
              "end_line": 65,
              "tags": {
                "PURPOSE": "Mimics APIClient.request while capturing call arguments.",
                "PRE": "method and endpoint are provided.",
                "POST": "Returns scripted response or raises scripted exception."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_users_page_sends_lowercase_order_direction",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Ensures adapter sends lowercase order_direction compatible with Superset rison schema.",
            "PRE": "Adapter is initialized with recording network client.",
            "POST": "First request query payload contains order_direction='asc' for asc sort."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestSupersetProfileLookup"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_users_page_preserves_primary_schema_error_over_fallback_auth_error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 99,
          "end_line": 122,
          "tags": {
            "PURPOSE": "Ensures fallback auth error does not mask primary schema/query failure.",
            "PRE": "Primary endpoint fails with SupersetAPIError and fallback fails with AuthenticationError.",
            "POST": "Raised exception remains primary SupersetAPIError (non-auth) to preserve root cause."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestSupersetProfileLookup"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_users_page_uses_fallback_endpoint_when_primary_fails",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 150,
          "tags": {
            "PURPOSE": "Verifies adapter retries second users endpoint and succeeds when fallback is healthy.",
            "PRE": "Primary endpoint fails; fallback returns valid users payload.",
            "POST": "Result status is success and both endpoints were attempted in order."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestSupersetProfileLookup"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "SupersetPreviewPipelineTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 542,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, superset, preview, chart_data, network, 404-mapping",
        "PURPOSE": "Verify explicit chart-data preview compilation and ensure non-dashboard 404 errors remain generic across sync and async clients.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "AsyncNetworkModule"
        }
      ],
      "children": [
        {
          "name": "_make_environment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 33,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_requests_http_error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 50,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_httpx_status_error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 63,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_compile_dataset_preview_prefers_legacy_explore_form_data_strategy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Superset preview compilation should prefer the legacy form_data transport inferred from browser traffic before falling back to chart-data."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_compile_dataset_preview_falls_back_to_chart_data_after_legacy_failures",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 152,
          "end_line": 246,
          "tags": {
            "PURPOSE": "Superset preview compilation should fall back to chart-data when legacy form_data strategies are rejected."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_build_dataset_preview_query_context_places_recovered_filters_in_chart_style_form_data",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 249,
          "end_line": 309,
          "tags": {
            "PURPOSE": "Preview query context should mirror chart-style filter transport so recovered native filters reach Superset compilation."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_build_dataset_preview_query_context_merges_dataset_template_params_and_preserves_user_values",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 312,
          "end_line": 340,
          "tags": {
            "PURPOSE": "Preview query context should merge dataset template params for parity with real dataset definitions while preserving explicit session overrides."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_build_dataset_preview_query_context_preserves_time_range_from_native_filter_payload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 343,
          "end_line": 379,
          "tags": {
            "PURPOSE": "Preview query context should preserve time-range native filter extras even when dataset defaults differ."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_build_dataset_preview_legacy_form_data_preserves_native_filter_clauses",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 382,
          "end_line": 433,
          "tags": {
            "PURPOSE": "Legacy preview form_data should preserve recovered native filter clauses in browser-style fields without duplicating datasource for QueryObjectFactory."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_sync_network_404_mapping_keeps_non_dashboard_endpoints_generic",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 436,
          "end_line": 457,
          "tags": {
            "PURPOSE": "Sync network client should reserve dashboard-not-found translation for dashboard endpoints only."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_sync_network_404_mapping_translates_dashboard_endpoints",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 460,
          "end_line": 480,
          "tags": {
            "PURPOSE": "Sync network client should still translate dashboard endpoint 404 responses into dashboard-not-found errors."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_async_network_404_mapping_keeps_non_dashboard_endpoints_generic",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 483,
          "end_line": 510,
          "tags": {
            "PURPOSE": "Async network client should reserve dashboard-not-found translation for dashboard endpoints only."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_async_network_404_mapping_translates_dashboard_endpoints",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 513,
          "end_line": 539,
          "tags": {
            "PURPOSE": "Async network client should still translate dashboard endpoint 404 responses into dashboard-not-found errors."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SupersetPreviewPipelineTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 542 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "test_throttled_scheduler",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 5,
      "end_line": 153,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for ThrottledSchedulerConfigurator distribution logic."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_calculate_schedule_even_distribution",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Validate even spacing across a two-hour scheduling window for three tasks."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_throttled_scheduler"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_calculate_schedule_midnight_crossing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Validate scheduler correctly rolls timestamps into the next day across midnight."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_throttled_scheduler"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_calculate_schedule_single_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Validate single-task schedule returns only the window start timestamp."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_throttled_scheduler"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_calculate_schedule_empty_list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Validate empty dashboard list produces an empty schedule."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_throttled_scheduler"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_calculate_schedule_zero_window",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 127,
          "tags": {
            "PURPOSE": "Validate zero-length window schedules all tasks at identical start timestamp."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_throttled_scheduler"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_calculate_schedule_very_small_window",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 152,
          "tags": {
            "PURPOSE": "Validate sub-second interpolation when task count exceeds near-zero window granularity."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_throttled_scheduler"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 5
          },
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 5
          },
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 5
          }
        ],
        "score": 0.32500000000000007
      }
    },
    {
      "name": "TestConfigManagerCompat",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "config-manager, compatibility, payload, tests",
        "PURPOSE": "Verifies ConfigManager compatibility wrappers preserve legacy payload sections.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "ConfigManager"
        }
      ],
      "children": [
        {
          "name": "test_get_payload_preserves_legacy_sections",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Ensure get_payload merges typed config into raw payload without dropping legacy sections."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestConfigManagerCompat"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_save_config_accepts_raw_payload_and_keeps_extras",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": null,
          "tags": {
            "PURPOSE": "Ensure save_config accepts raw dict payload, refreshes typed config, and preserves extra sections."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestConfigManagerCompat"
            }
          ],
          "children": [
            {
              "name": "test_save_config_syncs_environment_records_for_fk_backed_flows",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 59,
              "end_line": 128,
              "tags": {
                "PURPOSE": "Ensure saving config mirrors typed environments into relational records required by FK-backed session persistence."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "TestConfigManagerCompat"
                }
              ],
              "children": [
                {
                  "name": "_FakeQuery",
                  "type": "Class",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 76,
                  "end_line": 85,
                  "tags": {
                    "COMPLEXITY": "1",
                    "PURPOSE": "Minimal query stub returning hardcoded existing environment record list for sync tests.",
                    "INVARIANT": "all() always returns [existing_record]; no parameterization or filtering."
                  },
                  "relations": [
                    {
                      "type": "BINDS_TO",
                      "target": "test_save_config_syncs_environment_records_for_fk_backed_flows"
                    }
                  ],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                },
                {
                  "name": "_FakeSession",
                  "type": "Class",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 87,
                  "end_line": 102,
                  "tags": {
                    "COMPLEXITY": "1",
                    "PURPOSE": "Minimal SQLAlchemy session stub that captures add/delete calls for environment sync assertions.",
                    "INVARIANT": "query() always returns _FakeQuery; no real DB interaction."
                  },
                  "relations": [
                    {
                      "type": "BINDS_TO",
                      "target": "test_save_config_syncs_environment_records_for_fk_backed_flows"
                    }
                  ],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                }
              ],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_load_config_syncs_environment_records_from_existing_db_payload",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 131,
              "end_line": 193,
              "tags": {
                "PURPOSE": "Ensure loading an existing DB-backed config also mirrors environment rows required by FK-backed runtime flows."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "TestConfigManagerCompat"
                }
              ],
              "children": [
                {
                  "name": "_FakeSession",
                  "type": "Class",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 144,
                  "end_line": 156,
                  "tags": {
                    "COMPLEXITY": "1",
                    "PURPOSE": "Minimal session stub tracking commit/close signals for config load lifecycle assertions.",
                    "INVARIANT": "No query or add semantics; only lifecycle signal tracking."
                  },
                  "relations": [
                    {
                      "type": "BINDS_TO",
                      "target": "test_load_config_syncs_environment_records_from_existing_db_payload"
                    }
                  ],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                }
              ],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Unclosed Anchor: [DEF:test_save_config_accepts_raw_payload_and_keeps_extras:Function] started at line 31",
                "severity": "ERROR",
                "line_number": 31
              },
              {
                "message": "Unclosed Anchor: [DEF:test_save_config_accepts_raw_payload_and_keeps_extras:Function] started at line 31",
                "severity": "ERROR",
                "line_number": 31
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_capture_save",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "query",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "add",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 99,
          "end_line": 99,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "commit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 150,
          "end_line": 150,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "close",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 153,
          "end_line": 153,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:TestConfigManagerCompat:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "test_logger",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 291,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for logger module",
        "LAYER": "Infra"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "src.core.logger"
        }
      ],
      "children": [
        {
          "name": "test_belief_scope_logs_entry_action_exit_at_debug",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Test that belief_scope generates [ID][Entry], [ID][Action], and [ID][Exit] logs at DEBUG level.",
            "PRE": "belief_scope is available. caplog fixture is used. Logger configured to DEBUG.",
            "POST": "Logs are verified to contain Entry, Action, and Exit tags at DEBUG level."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_logger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_belief_scope_error_handling",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Test that belief_scope logs Coherence:Failed on exception.",
            "PRE": "belief_scope is available. caplog fixture is used. Logger configured to DEBUG.",
            "POST": "Logs are verified to contain Coherence:Failed tag."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_logger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_belief_scope_success_coherence",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 137,
          "tags": {
            "PURPOSE": "Test that belief_scope logs Coherence:OK on success.",
            "PRE": "belief_scope is available. caplog fixture is used. Logger configured to DEBUG.",
            "POST": "Logs are verified to contain Coherence:OK tag."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_logger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_belief_scope_not_visible_at_info",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 140,
          "end_line": 160,
          "tags": {
            "PURPOSE": "Test that belief_scope Entry/Exit/Coherence logs are NOT visible at INFO level.",
            "PRE": "belief_scope is available. caplog fixture is used.",
            "POST": "Entry/Exit/Coherence logs are not captured at INFO level."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_logger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_task_log_level_default",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 172,
          "tags": {
            "PURPOSE": "Test that default task log level is INFO.",
            "PRE": "None.",
            "POST": "Default level is INFO."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_logger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_should_log_task_level",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 175,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Test that should_log_task_level correctly filters log levels.",
            "PRE": "None.",
            "POST": "Filtering works correctly for all level combinations."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_logger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_configure_logger_task_log_level",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 190,
          "end_line": 206,
          "tags": {
            "PURPOSE": "Test that configure_logger updates task_log_level.",
            "PRE": "LoggingConfig is available.",
            "POST": "task_log_level is updated correctly."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_logger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_enable_belief_state_flag",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 209,
          "end_line": 236,
          "tags": {
            "PURPOSE": "Test that enable_belief_state flag controls belief_scope logging.",
            "PRE": "LoggingConfig is available. caplog fixture is used.",
            "POST": "belief_scope logs are controlled by the flag."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_logger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_belief_scope_missing_anchor",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 239,
          "end_line": 250,
          "tags": {
            "PURPOSE": "Test @PRE condition: anchor_id must be provided"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_logger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_configure_logger_post_conditions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 252,
          "end_line": 289,
          "tags": {
            "PURPOSE": "Test @POST condition: Logger level, handlers, belief state flag, and task log level are updated."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_logger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "reset_logger_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "MigrationDryRunOrchestratorModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 363,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "migration, dry_run, diff, risk, superset",
        "PURPOSE": "Compute pre-flight migration diff and risk scoring without apply.",
        "LAYER": "Core",
        "INVARIANT": "Dry run is informative only and must not mutate target environment."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "SupersetClient"
        },
        {
          "type": "DEPENDS_ON",
          "target": "MigrationEngine"
        },
        {
          "type": "DEPENDS_ON",
          "target": "MigrationArchiveParser"
        },
        {
          "type": "DEPENDS_ON",
          "target": "RiskAssessorModule"
        }
      ],
      "children": [
        {
          "name": "MigrationDryRunService",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 28,
          "end_line": 362,
          "tags": {
            "PURPOSE": "Build deterministic diff/risk payload for migration pre-flight."
          },
          "relations": [
            {
              "type": "CONTAINS",
              "target": "__init__"
            },
            {
              "type": "CONTAINS",
              "target": "run"
            },
            {
              "type": "CONTAINS",
              "target": "_load_db_mapping"
            },
            {
              "type": "CONTAINS",
              "target": "_accumulate_objects"
            },
            {
              "type": "CONTAINS",
              "target": "_index_by_uuid"
            },
            {
              "type": "CONTAINS",
              "target": "_build_object_diff"
            },
            {
              "type": "CONTAINS",
              "target": "_build_target_signatures"
            },
            {
              "type": "CONTAINS",
              "target": "_build_risks"
            }
          ],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 39,
              "end_line": 46,
              "tags": {
                "PURPOSE": "Wire parser dependency for archive object extraction.",
                "PRE": "parser can be omitted to use default implementation.",
                "POST": "Service is ready to calculate dry-run payload."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "run",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 48,
              "end_line": 159,
              "tags": {
                "PURPOSE": "Execute full dry-run computation for selected dashboards.",
                "PRE": "source/target clients are authenticated and selection validated by caller.",
                "POST": "Returns JSON-serializable pre-flight payload with summary, diff and risk.",
                "SIDE_EFFECT": "Reads source export archives and target metadata via network."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "_load_db_mapping"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "_accumulate_objects"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "_build_target_signatures"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "_build_object_diff"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "_build_risks"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_load_db_mapping",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 161,
              "end_line": 176,
              "tags": {
                "PURPOSE": "Resolve UUID mapping for optional DB config replacement."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_accumulate_objects",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 178,
              "end_line": 191,
              "tags": {
                "PURPOSE": "Merge extracted resources by UUID to avoid duplicates."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_index_by_uuid",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 193,
              "end_line": 205,
              "tags": {
                "PURPOSE": "Build UUID-index map for normalized resources."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_object_diff",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 207,
              "end_line": 233,
              "tags": {
                "PURPOSE": "Compute create/update/delete buckets by UUID+signature."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "_index_by_uuid"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_target_signatures",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 235,
              "end_line": 346,
              "tags": {
                "PURPOSE": "Pull target metadata and normalize it into comparable signatures."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_risks",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 348,
              "end_line": 359,
              "tags": {
                "PURPOSE": "Build risk items for missing datasource, broken refs, overwrite, owner mismatch."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 28
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 28
              }
            ],
            "score": 0.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 363 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "MigrationArchiveParserModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 158,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "migration, zip, parser, yaml, metadata",
        "PURPOSE": "Parse Superset export ZIP archives into normalized object catalogs for diffing.",
        "LAYER": "Core",
        "INVARIANT": "Parsing is read-only and never mutates archive files."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "LoggerModule"
        }
      ],
      "children": [
        {
          "name": "MigrationArchiveParser",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 20,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Extract normalized dashboards/charts/datasets metadata from ZIP archives."
          },
          "relations": [
            {
              "type": "CONTAINS",
              "target": "extract_objects_from_zip"
            },
            {
              "type": "CONTAINS",
              "target": "_collect_yaml_objects"
            },
            {
              "type": "CONTAINS",
              "target": "_normalize_object_payload"
            }
          ],
          "children": [
            {
              "name": "extract_objects_from_zip",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 26,
              "end_line": 54,
              "tags": {
                "PURPOSE": "Extract object catalogs from Superset archive.",
                "PRE": "zip_path points to a valid readable ZIP.",
                "POST": "Returns object lists grouped by resource type.",
                "RETURN": "Dict[str, List[Dict[str, Any]]]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "_collect_yaml_objects"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_collect_yaml_objects",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 56,
              "end_line": 84,
              "tags": {
                "PURPOSE": "Read and normalize YAML manifests for one object type.",
                "PRE": "object_type is one of dashboards/charts/datasets.",
                "POST": "Returns only valid normalized objects."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "_normalize_object_payload"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_normalize_object_payload",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 86,
              "end_line": 154,
              "tags": {
                "PURPOSE": "Convert raw YAML payload to stable diff signature shape.",
                "PRE": "payload is parsed YAML mapping.",
                "POST": "Returns normalized descriptor with `uuid`, `title`, and `signature`."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 20
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 20
              }
            ],
            "score": 0.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "RiskAssessorModule",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 202,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "migration, dry_run, risk, scoring, preflight",
        "PURPOSE": "Compute deterministic migration risk items and aggregate score for dry-run reporting.",
        "LAYER": "Domain",
        "INVARIANT": "Risk scoring must remain bounded to [0,100] and preserve severity-to-weight mapping.",
        "PRE": "Risk assessor functions receive normalized migration object collections from dry-run orchestration.",
        "POST": "Risk scoring output preserves item list and provides bounded score with derived level.",
        "SIDE_EFFECT": "Emits diagnostic logs and performs read-only metadata requests via Superset client.",
        "DATA_CONTRACT": "Module[build_risks, score_risks]",
        "TEST_CONTRACT": "[source_objects,target_objects,diff,target_client] -> [List[RiskItem]]",
        "TEST_SCENARIO": "[owner_mismatch_dashboard] -> [low owner_mismatch risk is emitted]",
        "TEST_EDGE": "[external_fail] -> [target_client get_databases exception propagates to caller]",
        "TEST_INVARIANT": "[score_upper_bound_100] -> VERIFIED_BY: [severity_weight_aggregation]",
        "UX_STATE": "[Idle] -> [N/A backend domain module]",
        "UX_FEEDBACK": "[N/A] -> [No direct UI side effects in this module]",
        "UX_RECOVERY": "[N/A] -> [Caller-level retry/recovery]",
        "UX_REACTIVITY": "[N/A] -> [Backend synchronous function contracts]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "SupersetClient"
        },
        {
          "type": "CONTAINS",
          "target": "index_by_uuid"
        },
        {
          "type": "CONTAINS",
          "target": "extract_owner_identifiers"
        },
        {
          "type": "CONTAINS",
          "target": "build_risks"
        },
        {
          "type": "CONTAINS",
          "target": "score_risks"
        }
      ],
      "children": [
        {
          "name": "index_by_uuid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Build UUID-index from normalized objects.",
            "PRE": "Input list items are dict-like payloads potentially containing \"uuid\".",
            "POST": "Returns mapping keyed by string uuid; only truthy uuid values are included.",
            "SIDE_EFFECT": "Emits reasoning/reflective logs only.",
            "DATA_CONTRACT": "List[Dict[str, Any]] -> Dict[str, Dict[str, Any]]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extract_owner_identifiers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Normalize owner payloads for stable comparison.",
            "PRE": "Owners may be list payload, scalar values, or None.",
            "POST": "Returns sorted unique owner identifiers as strings.",
            "SIDE_EFFECT": "Emits reasoning/reflective logs only.",
            "DATA_CONTRACT": "Any -> List[str]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_risks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Build risk list from computed diffs and target catalog state.",
            "PRE": "target_client is authenticated/usable for database list retrieval.",
            "POST": "Returns list of deterministic risk items derived from overwrite, missing datasource, reference, and owner mismatch checks.",
            "SIDE_EFFECT": "Calls target Superset API for databases metadata and emits logs.",
            "DATA_CONTRACT": ") -> List[Dict[str, Any]]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "index_by_uuid"
            },
            {
              "type": "DEPENDS_ON",
              "target": "extract_owner_identifiers"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "score_risks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 199,
          "tags": {
            "PURPOSE": "Aggregate risk list into score and level.",
            "PRE": "risk_items contains optional severity fields expected in {high,medium,low} or defaults to low weight.",
            "POST": "Returns dict with score in [0,100], derived level, and original items.",
            "SIDE_EFFECT": "Emits reasoning/reflective logs only.",
            "DATA_CONTRACT": "List[Dict[str, Any]] -> Dict[str, Any]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "MigrationPackage",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 12,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "migration, package, exports",
        "PURPOSE": "Namespace package for migration pre-flight orchestration components.",
        "LAYER": "Core"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TaskLoggerModule",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 194,
      "tags": {
        "SEMANTICS": "task, logger, context, plugin, attribution",
        "PURPOSE": "Provides a dedicated logger for tasks with automatic source attribution.",
        "LAYER": "Core",
        "COMPLEXITY": "2",
        "INVARIANT": "Each TaskLogger instance is bound to a specific task_id and default source."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TaskManager"
        },
        {
          "type": "DEPENDS_ON",
          "target": "EventBus"
        }
      ],
      "children": [
        {
          "name": "TaskLogger",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 192,
          "tags": {
            "SEMANTICS": "logger, task, source, attribution",
            "PURPOSE": "A wrapper around TaskManager._add_log that carries task_id and source context.",
            "COMPLEXITY": "2",
            "INVARIANT": "All log calls include the task_id and source.",
            "UX_STATE": "Idle -> Logging -> (system records log)",
            "TEST_CONTRACT": "TaskLoggerContract ->",
            "TEST_FIXTURE": "valid_task_logger -> {\"task_id\": \"test_123\", \"add_log_fn\": lambda *args: None, \"source\": \"test_plugin\"}",
            "TEST_EDGE": "invalid_add_log_fn -> raises TypeError",
            "TEST_INVARIANT": "consistent_delegation -> verifies: [valid_task_logger]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TaskManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "EventBus"
            },
            {
              "type": "USED_BY",
              "target": "TaskContext"
            }
          ],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 52,
              "end_line": 64,
              "tags": {
                "PURPOSE": "Initialize the TaskLogger with task context.",
                "PRE": "add_log_fn is a callable that accepts (task_id, level, message, context, source, metadata).",
                "POST": "TaskLogger is ready to log messages.",
                "PARAM": "source (str) - Default source for logs (default: \"plugin\")."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "with_source",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 66,
              "end_line": 78,
              "tags": {
                "PURPOSE": "Create a sub-logger with a different default source.",
                "PRE": "source is a non-empty string.",
                "POST": "Returns new TaskLogger with the same task_id but different source.",
                "PARAM": "source (str) - New default source.",
                "RETURN": "TaskLogger - New logger instance."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_log",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 80,
              "end_line": 105,
              "tags": {
                "PURPOSE": "Internal method to log a message at a given level.",
                "PRE": "level is a valid log level string.",
                "POST": "Log entry added via add_log_fn.",
                "PARAM": "metadata (Optional[Dict]) - Additional structured data.",
                "UX_STATE": "Logging -> (writing internal log)"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "debug",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 107,
              "end_line": 122,
              "tags": {
                "PURPOSE": "Log a DEBUG level message.",
                "PRE": "message is a string.",
                "POST": "Log entry added via internally with DEBUG level.",
                "PARAM": "metadata (Optional[Dict]) - Additional data."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "info",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 124,
              "end_line": 139,
              "tags": {
                "PURPOSE": "Log an INFO level message.",
                "PRE": "message is a string.",
                "POST": "Log entry added internally with INFO level.",
                "PARAM": "metadata (Optional[Dict]) - Additional data."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "warning",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 141,
              "end_line": 156,
              "tags": {
                "PURPOSE": "Log a WARNING level message.",
                "PRE": "message is a string.",
                "POST": "Log entry added internally with WARNING level.",
                "PARAM": "metadata (Optional[Dict]) - Additional data."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "error",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 158,
              "end_line": 173,
              "tags": {
                "PURPOSE": "Log an ERROR level message.",
                "PRE": "message is a string.",
                "POST": "Log entry added internally with ERROR level.",
                "PARAM": "metadata (Optional[Dict]) - Additional data."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "progress",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 175,
              "end_line": 189,
              "tags": {
                "PURPOSE": "Log a progress update with percentage.",
                "PRE": "percent is between 0 and 100.",
                "POST": "Log entry with progress metadata added.",
                "PARAM": "source (Optional[str]) - Override source."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 15
              },
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 15
              }
            ],
            "score": 0.7
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TaskPersistenceModule",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 624,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "persistence, sqlite, sqlalchemy, task, storage",
        "PURPOSE": "Handles the persistence of tasks using SQLAlchemy and the tasks.db database.",
        "LAYER": "Core",
        "PRE": "Tasks database must be initialized with TaskRecord and TaskLogRecord schemas.",
        "POST": "Provides reliable storage and retrieval for task metadata and logs.",
        "SIDE_EFFECT": "Performs database I/O on tasks.db.",
        "DATA_CONTRACT": "Input[Task, LogEntry] -> Model[TaskRecord, TaskLogRecord]",
        "INVARIANT": "Database schema must match the TaskRecord model structure."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TaskManager"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskGraph"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TasksSessionLocal"
        }
      ],
      "children": [
        {
          "name": "TaskPersistenceService",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 30,
          "end_line": 343,
          "tags": {
            "COMPLEXITY": "5",
            "SEMANTICS": "persistence, service, database, sqlalchemy",
            "PURPOSE": "Provides methods to save, load, and delete task records in tasks.db using SQLAlchemy models.",
            "PRE": "TasksSessionLocal must provide an active SQLAlchemy session, Task inputs must expose id/plugin_id/status/params/result/logs fields, and TaskRecord plus Environment schemas must be available.",
            "POST": "Persist operations leave matching TaskRecord rows committed or rolled back without leaking sessions, load operations return reconstructed Task objects from stored TaskRecord rows, and delete operations remove only the addressed task rows.",
            "SIDE_EFFECT": "Opens SQLAlchemy sessions, reads and writes task_records rows, resolves environment foreign keys against environments, commits or rolls back transactions, and emits error logs on persistence failures.",
            "DATA_CONTRACT": "Input[Task | List[Task] | List[str] | Query(limit:int,status:Optional[TaskStatus])] -> Model[TaskRecord, Environment] -> Output[None | List[Task]]",
            "INVARIANT": "Persistence must handle potentially missing task fields natively.",
            "TEST_CONTRACT": "TaskPersistenceContract ->",
            "TEST_FIXTURE": "valid_task_persistence -> {\"task_id\": \"123\", \"status\": \"PENDING\"}",
            "TEST_EDGE": "load_corrupt_json_params -> handled gracefully",
            "TEST_INVARIANT": "accurate_round_trip -> verifies: [valid_task_persistence, load_corrupt_json_params]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TasksSessionLocal"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskRecord"
            },
            {
              "type": "DEPENDS_ON",
              "target": "Environment"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskGraph"
            }
          ],
          "children": [
            {
              "name": "_json_load_if_needed",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 59,
              "end_line": 81,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Safely load JSON strings from DB if necessary",
                "PRE": "value is an arbitrary database value",
                "POST": "Returns parsed JSON object, list, string, or primitive"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_parse_datetime",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 83,
              "end_line": 100,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Safely parse a datetime string from the database",
                "PRE": "value is an ISO string or datetime object",
                "POST": "Returns datetime object or None"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_resolve_environment_id",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 102,
              "end_line": 150,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Resolve environment id into existing environments.id value to satisfy FK constraints.",
                "PRE": "Session is active",
                "POST": "Returns existing environments.id or None when unresolved.",
                "DATA_CONTRACT": "Input[env_id: Optional[str]] -> Output[Optional[str]]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "Environment"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 152,
              "end_line": 162,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Initializes the persistence service.",
                "PRE": "None.",
                "POST": "Service is ready."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                    "severity": "WARNING",
                    "line_number": 152
                  },
                  {
                    "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                    "severity": "WARNING",
                    "line_number": 152
                  },
                  {
                    "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                    "severity": "WARNING",
                    "line_number": 152
                  }
                ],
                "score": 0.4
              }
            },
            {
              "name": "persist_task",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 164,
              "end_line": 234,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Persists or updates a single task in the database.",
                "PRE": "isinstance(task, Task)",
                "POST": "Task record created or updated in database.",
                "PARAM": "task (Task) - The task object to persist.",
                "SIDE_EFFECT": "Writes to task_records table in tasks.db",
                "DATA_CONTRACT": "Input[Task] -> Model[TaskRecord]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_resolve_environment_id"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "persist_tasks",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 236,
              "end_line": 248,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Persists multiple tasks.",
                "PRE": "isinstance(tasks, list)",
                "POST": "All tasks in list are persisted.",
                "PARAM": "tasks (List[Task]) - The list of tasks to persist."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "persist_task"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "load_tasks",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 250,
              "end_line": 314,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Loads tasks from the database.",
                "PRE": "limit is an integer.",
                "POST": "Returns list of Task objects.",
                "PARAM": "status (Optional[TaskStatus]) - Filter by status.",
                "RETURN": "List[Task] - The loaded tasks.",
                "DATA_CONTRACT": "Model[TaskRecord] -> Output[List[Task]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_json_load_if_needed"
                },
                {
                  "type": "CALLS",
                  "target": "_parse_datetime"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "delete_tasks",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 316,
              "end_line": 340,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Deletes specific tasks from the database.",
                "PRE": "task_ids is a list of strings.",
                "POST": "Specified task records deleted from database.",
                "PARAM": "task_ids (List[str]) - List of task IDs to delete.",
                "SIDE_EFFECT": "Deletes rows from task_records table."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskRecord"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9571428571428571
          }
        },
        {
          "name": "TaskLogPersistenceService",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 346,
          "end_line": 623,
          "tags": {
            "COMPLEXITY": "5",
            "SEMANTICS": "persistence, service, database, log, sqlalchemy",
            "PURPOSE": "Provides methods to store, query, summarize, and delete task log rows in the task_logs table.",
            "PRE": "TasksSessionLocal must provide an active SQLAlchemy session, task_id inputs must identify task log rows, LogEntry batches must expose timestamp/level/source/message/metadata fields, and LogFilter inputs must provide pagination and filter attributes used by queries.",
            "POST": "add_logs commits all provided log entries or rolls back on failure, query methods return TaskLog or LogStats views reconstructed from TaskLogRecord rows, and delete methods remove only log rows matching the supplied task identifiers.",
            "SIDE_EFFECT": "Opens SQLAlchemy sessions, inserts, reads, aggregates, and deletes task_logs rows, serializes log metadata to JSON, commits or rolls back transactions, and emits error logs on persistence failures.",
            "DATA_CONTRACT": "Input[task_id:str, logs:List[LogEntry], log_filter:LogFilter, task_ids:List[str]] -> Model[TaskLogRecord] -> Output[None | List[TaskLog] | LogStats | List[str]]",
            "INVARIANT": "Log entries are batch-inserted for performance.",
            "TEST_CONTRACT": "TaskLogPersistenceContract ->",
            "TEST_FIXTURE": "valid_log_batch -> {\"task_id\": \"123\", \"logs\": [{\"level\": \"INFO\", \"message\": \"msg\"}]}",
            "TEST_EDGE": "add_logs_db_error -> rollback and log error",
            "TEST_INVARIANT": "accurate_log_aggregation -> verifies: [valid_log_batch]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TaskLogRecord"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TasksSessionLocal"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "EventBus"
            }
          ],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 378,
              "end_line": 386,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Initializes the TaskLogPersistenceService",
                "PRE": "config is provided or defaults are used",
                "POST": "Service is ready for log persistence"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                    "severity": "WARNING",
                    "line_number": 378
                  },
                  {
                    "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                    "severity": "WARNING",
                    "line_number": 378
                  },
                  {
                    "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                    "severity": "WARNING",
                    "line_number": 378
                  }
                ],
                "score": 0.4
              }
            },
            {
              "name": "add_logs",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 388,
              "end_line": 423,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Batch insert log entries for a task.",
                "PRE": "logs is a list of LogEntry objects.",
                "POST": "All logs inserted into task_logs table.",
                "PARAM": "logs (List[LogEntry]) - Log entries to insert.",
                "SIDE_EFFECT": "Writes to task_logs table.",
                "DATA_CONTRACT": "Input[List[LogEntry]] -> Model[TaskLogRecord]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskLogRecord"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_logs",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 425,
              "end_line": 487,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Query logs for a task with filtering and pagination.",
                "PRE": "task_id is a valid task ID.",
                "POST": "Returns list of TaskLog objects matching filters.",
                "PARAM": "log_filter (LogFilter) - Filter parameters.",
                "RETURN": "List[TaskLog] - Filtered log entries.",
                "DATA_CONTRACT": "Model[TaskLogRecord] -> Output[List[TaskLog]]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskLogRecord"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "LogFilter"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskLog"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_log_stats",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 489,
              "end_line": 540,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Get statistics about logs for a task.",
                "PRE": "task_id is a valid task ID.",
                "POST": "Returns LogStats with counts by level and source.",
                "PARAM": "task_id (str) - The task ID.",
                "RETURN": "LogStats - Statistics about task logs.",
                "DATA_CONTRACT": "Model[TaskLogRecord] -> Output[LogStats]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskLogRecord"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "LogStats"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_sources",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 542,
              "end_line": 568,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Get unique sources for a task's logs.",
                "PRE": "task_id is a valid task ID.",
                "POST": "Returns list of unique source strings.",
                "PARAM": "task_id (str) - The task ID.",
                "RETURN": "List[str] - Unique source names.",
                "DATA_CONTRACT": "Model[TaskLogRecord] -> Output[List[str]]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskLogRecord"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "delete_logs_for_task",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 570,
              "end_line": 594,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Delete all logs for a specific task.",
                "PRE": "task_id is a valid task ID.",
                "POST": "All logs for the task are deleted.",
                "PARAM": "task_id (str) - The task ID.",
                "SIDE_EFFECT": "Deletes from task_logs table."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskLogRecord"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "delete_logs_for_tasks",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 596,
              "end_line": 620,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Delete all logs for multiple tasks.",
                "PRE": "task_ids is a list of task IDs.",
                "POST": "All logs for the tasks are deleted.",
                "PARAM": "task_ids (List[str]) - List of task IDs.",
                "SIDE_EFFECT": "Deletes rows from task_logs table."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskLogRecord"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9571428571428571
          }
        },
        {
          "name": "normalize_token",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 133,
          "end_line": 133,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "json_serializable",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 196,
          "end_line": 196,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 624 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8166666666666667
      }
    },
    {
      "name": "TaskManagerModule",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 829,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "task, manager, lifecycle, execution, state",
        "PURPOSE": "Manages the lifecycle of tasks, including their creation, execution, and state tracking. It uses a thread pool to run plugins asynchronously.",
        "LAYER": "Core",
        "PRE": "Plugin loader and database sessions are initialized.",
        "POST": "Orchestrates task execution and persistence.",
        "SIDE_EFFECT": "Spawns worker threads and flushes logs to DB.",
        "DATA_CONTRACT": "Input[plugin_id, params] -> Model[Task, LogEntry]",
        "INVARIANT": "Task IDs are unique.",
        "CONSTRAINT": "Must use belief_scope for logging.",
        "TEST_CONTRACT": "TaskManagerRuntime -> {",
        "TEST_FIXTURE": "valid_module -> {\"manager_initialized\": true}",
        "TEST_EDGE": "external_failure -> {\"db_unavailable\": true}",
        "TEST_INVARIANT": "logger_compliance -> verifies: [valid_module]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "PluginLoader"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskPersistenceService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskLogPersistenceService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskContext"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskGraph"
        },
        {
          "type": "DEPENDS_ON",
          "target": "JobLifecycle"
        },
        {
          "type": "DEPENDS_ON",
          "target": "EventBus"
        }
      ],
      "children": [
        {
          "name": "TaskManager",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 46,
          "end_line": 828,
          "tags": {
            "COMPLEXITY": "5",
            "SEMANTICS": "task, manager, lifecycle, execution, state",
            "PURPOSE": "Manages the lifecycle of tasks, including their creation, execution, and state tracking.",
            "LAYER": "Core",
            "PRE": "Plugin loader resolves plugin ids and persistence services are available for task state hydration.",
            "POST": "In-memory task graph, lifecycle scheduler, and log event bus stay consistent with persisted task state.",
            "INVARIANT": "Log entries are never deleted after being added to a task.",
            "SIDE_EFFECT": "Spawns worker threads, flushes logs to database, and mutates task states.",
            "DATA_CONTRACT": "Input[plugin_id, params] -> Output[Task]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TaskPersistenceService"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskLogPersistenceService"
            },
            {
              "type": "DEPENDS_ON",
              "target": "PluginLoader"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskContext"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskGraph"
            },
            {
              "type": "DEPENDS_ON",
              "target": "JobLifecycle"
            },
            {
              "type": "DEPENDS_ON",
              "target": "EventBus"
            }
          ],
          "children": [
            {
              "name": "TaskGraph",
              "type": "Block",
              "complexity": 5,
              "tier": "CRITICAL",
              "start_line": 73,
              "end_line": 83,
              "tags": {
                "COMPLEXITY": "5",
                "PURPOSE": "Represents the in-memory task dependency graph spanning task registry nodes, paused futures, and persistence-backed hydration.",
                "PRE": "Task ids are generated before insertion and persisted tasks can be reconstructed into Task models.",
                "POST": "Each live task id resolves to at most one active Task node and optional pause future.",
                "SIDE_EFFECT": "Mutates the in-memory task registry and loads persisted state during manager startup.",
                "DATA_CONTRACT": "Input[Task lifecycle events] -> Output[tasks:Dict[str, Task], task_futures:Dict[str, asyncio.Future]]",
                "INVARIANT": "Registry membership is keyed by unique task id and survives log streaming side channels."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "Task"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskPersistenceService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "EventBus",
              "type": "Block",
              "complexity": 5,
              "tier": "CRITICAL",
              "start_line": 85,
              "end_line": 95,
              "tags": {
                "COMPLEXITY": "5",
                "PURPOSE": "Coordinates task-scoped log buffering, persistence flushes, and subscriber fan-out for real-time observers.",
                "PRE": "Task log records accept structured LogEntry payloads and subscribers consume asyncio queues.",
                "POST": "Accepted task logs are buffered, optionally persisted, and dispatched to active subscribers in emission order.",
                "SIDE_EFFECT": "Writes task logs to persistence, mutates in-memory buffers, and pushes log entries into subscriber queues.",
                "DATA_CONTRACT": "Input[task_id, LogEntry, Queue subscribers] -> Output[persisted log rows, streamed log events]",
                "INVARIANT": "Buffered logs are retried on persistence failure and every subscriber receives only task-scoped events."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "LogEntry"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskLogPersistenceService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "JobLifecycle",
              "type": "Block",
              "complexity": 5,
              "tier": "CRITICAL",
              "start_line": 97,
              "end_line": 109,
              "tags": {
                "COMPLEXITY": "5",
                "PURPOSE": "Encodes task creation, execution, pause/resume, and completion transitions for plugin-backed jobs.",
                "PRE": "Requested plugin ids resolve to executable plugins and task state transitions target known TaskStatus values.",
                "POST": "Every scheduled task transitions through a valid lifecycle path ending in persisted terminal or waiting state.",
                "SIDE_EFFECT": "Schedules async execution, pauses on input/mapping requests, and mutates persisted task lifecycle markers.",
                "DATA_CONTRACT": "Input[plugin_id, params, task_id, resolution payloads] -> Output[Task status transitions, task result]",
                "INVARIANT": "A task cannot be resumed from a waiting state unless a matching future exists or a new wait future is created."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskGraph"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskContext"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "PluginLoader"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 5,
              "tier": "CRITICAL",
              "start_line": 111,
              "end_line": 157,
              "tags": {
                "COMPLEXITY": "5",
                "PURPOSE": "Initialize the TaskManager with dependencies.",
                "PRE": "plugin_loader is initialized.",
                "POST": "TaskManager is ready to accept tasks.",
                "SIDE_EFFECT": "Starts background flusher thread and loads persisted task state into memory.",
                "PARAM": "plugin_loader - The plugin loader instance."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskPersistenceService.load_tasks"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskGraph"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": false,
                "issues": [
                  {
                    "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                    "severity": "ERROR",
                    "line_number": 111
                  },
                  {
                    "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                    "severity": "ERROR",
                    "line_number": 111
                  },
                  {
                    "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                    "severity": "ERROR",
                    "line_number": 111
                  }
                ],
                "score": 0.0
              }
            },
            {
              "name": "_flusher_loop",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 159,
              "end_line": 172,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Background thread that periodically flushes log buffer to database.",
                "PRE": "TaskManager is initialized.",
                "POST": "Logs are batch-written to database every LOG_FLUSH_INTERVAL seconds."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskManager._flush_logs"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_flush_logs",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 174,
              "end_line": 202,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Flush all buffered logs to the database.",
                "PRE": "None.",
                "POST": "All buffered logs are written to task_logs table."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskLogPersistenceService.add_logs"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_flush_task_logs",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 204,
              "end_line": 224,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Flush logs for a specific task immediately.",
                "PRE": "task_id exists.",
                "POST": "Task's buffered logs are written to database.",
                "PARAM": "task_id (str) - The task ID."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskLogPersistenceService.add_logs"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "create_task",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 226,
              "end_line": 267,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Creates and queues a new task for execution.",
                "PRE": "Plugin with plugin_id exists. Params are valid.",
                "POST": "Task is created, added to registry, and scheduled for execution.",
                "PARAM": "user_id (Optional[str]) - ID of the user requesting the task.",
                "RETURN": "Task - The created task instance.",
                "THROWS": "ValueError if plugin not found or params invalid."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskPersistenceService.persist_task"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "JobLifecycle"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskGraph"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_run_task",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 269,
              "end_line": 366,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Internal method to execute a task with TaskContext support.",
                "PRE": "Task exists in registry.",
                "POST": "Task is executed, status updated to SUCCESS or FAILED.",
                "PARAM": "task_id (str) - The ID of the task to run."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskPersistenceService.persist_task"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "JobLifecycle"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskContext"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "resolve_task",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 368,
              "end_line": 394,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Resumes a task that is awaiting mapping.",
                "PRE": "Task exists and is in AWAITING_MAPPING state.",
                "POST": "Task status updated to RUNNING, params updated, execution resumed.",
                "PARAM": "resolution_params (Dict[str, Any]) - Params to resolve the wait.",
                "THROWS": "ValueError if task not found or not awaiting mapping."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskPersistenceService.persist_task"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "JobLifecycle"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "wait_for_resolution",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 396,
              "end_line": 420,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Pauses execution and waits for a resolution signal.",
                "PRE": "Task exists.",
                "POST": "Execution pauses until future is set.",
                "PARAM": "task_id (str) - The ID of the task."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskPersistenceService.persist_task"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "JobLifecycle"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "wait_for_input",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 422,
              "end_line": 444,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Pauses execution and waits for user input.",
                "PRE": "Task exists.",
                "POST": "Execution pauses until future is set via resume_task_with_password.",
                "PARAM": "task_id (str) - The ID of the task."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "JobLifecycle"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_task",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 446,
              "end_line": 458,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Retrieves a task by its ID.",
                "PRE": "task_id is a string.",
                "POST": "Returns Task object or None.",
                "PARAM": "task_id (str) - ID of the task.",
                "RETURN": "Optional[Task] - The task or None."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskGraph"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_all_tasks",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 460,
              "end_line": 471,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Retrieves all registered tasks.",
                "PRE": "None.",
                "POST": "Returns list of all Task objects.",
                "RETURN": "List[Task] - All tasks."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskGraph"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_tasks",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 473,
              "end_line": 517,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Retrieves tasks with pagination and optional status filter.",
                "PRE": "limit and offset are non-negative integers.",
                "POST": "Returns a list of tasks sorted by start_time descending.",
                "PARAM": "status (Optional[TaskStatus]) - Filter by task status.",
                "RETURN": "List[Task] - List of tasks matching criteria."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskGraph"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_task_logs",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 519,
              "end_line": 555,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Retrieves logs for a specific task (from memory for running, persistence for completed).",
                "PRE": "task_id is a string.",
                "POST": "Returns list of LogEntry or TaskLog objects.",
                "PARAM": "log_filter (Optional[LogFilter]) - Filter parameters.",
                "RETURN": "List[LogEntry] - List of log entries."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskLogPersistenceService.get_logs"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_task_log_stats",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 557,
              "end_line": 570,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Get statistics about logs for a task.",
                "PRE": "task_id is a valid task ID.",
                "POST": "Returns LogStats with counts by level and source.",
                "PARAM": "task_id (str) - The task ID.",
                "RETURN": "LogStats - Statistics about task logs."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskLogPersistenceService.get_log_stats"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_task_log_sources",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 572,
              "end_line": 585,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Get unique sources for a task's logs.",
                "PRE": "task_id is a valid task ID.",
                "POST": "Returns list of unique source strings.",
                "PARAM": "task_id (str) - The task ID.",
                "RETURN": "List[str] - Unique source names."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskLogPersistenceService.get_sources"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_add_log",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 587,
              "end_line": 641,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Adds a log entry to a task buffer and notifies subscribers.",
                "PRE": "Task exists.",
                "POST": "Log added to buffer and pushed to queues (if level meets task_log_level filter).",
                "PARAM": "context (Optional[Dict]) - Legacy context (for backward compatibility)."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "should_log_task_level"
                },
                {
                  "type": "DISPATCHES",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "subscribe_logs",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 643,
              "end_line": 659,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Subscribes to real-time logs for a task.",
                "PRE": "task_id is a string.",
                "POST": "Returns an asyncio.Queue for log entries.",
                "PARAM": "task_id (str) - ID of the task.",
                "RETURN": "asyncio.Queue - Queue for log entries."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "unsubscribe_logs",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 661,
              "end_line": 677,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Unsubscribes from real-time logs for a task.",
                "PRE": "task_id is a string, queue is asyncio.Queue.",
                "POST": "Queue removed from subscribers.",
                "PARAM": "queue (asyncio.Queue) - Queue to remove."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "load_persisted_tasks",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 679,
              "end_line": 693,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Load persisted tasks using persistence service.",
                "PRE": "None.",
                "POST": "Persisted tasks loaded into self.tasks."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskPersistenceService.load_tasks"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskGraph"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "await_input",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 695,
              "end_line": 726,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Transition a task to AWAITING_INPUT state with input request.",
                "PRE": "Task exists and is in RUNNING state.",
                "POST": "Task status changed to AWAITING_INPUT, input_request set, persisted.",
                "PARAM": "input_request (Dict) - Details about required input.",
                "THROWS": "ValueError if task not found or not RUNNING."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskPersistenceService.persist_task"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "JobLifecycle"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "resume_task_with_password",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 728,
              "end_line": 770,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Resume a task that is awaiting input with provided passwords.",
                "PRE": "Task exists and is in AWAITING_INPUT state.",
                "POST": "Task status changed to RUNNING, passwords injected, task resumed.",
                "PARAM": "passwords (Dict[str, str]) - Mapping of database name to password.",
                "THROWS": "ValueError if task not found, not awaiting input, or passwords invalid."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskPersistenceService.persist_task"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "JobLifecycle"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "clear_tasks",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 772,
              "end_line": 825,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Clears tasks based on status filter (also deletes associated logs).",
                "PRE": "status is Optional[TaskStatus].",
                "POST": "Tasks matching filter (or all non-active) cleared from registry and database.",
                "PARAM": "status (Optional[TaskStatus]) - Filter by task status.",
                "RETURN": "int - Number of tasks cleared."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskPersistenceService.delete_tasks"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskGraph"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "EventBus"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9571428571428571
          }
        },
        {
          "name": "sort_key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 504,
          "end_line": 504,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 829 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8166666666666667
      }
    },
    {
      "name": "TaskManagerModels",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 173,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "task, models, pydantic, enum, state",
        "PURPOSE": "Defines the data models and enumerations used by the Task Manager.",
        "LAYER": "Core",
        "INVARIANT": "Task IDs are immutable once created.",
        "CONSTRAINT": "Must use Pydantic for data validation."
      },
      "relations": [
        {
          "type": "USED_BY",
          "target": "TaskManager"
        },
        {
          "type": "USED_BY",
          "target": "TaskManagerPackage"
        }
      ],
      "children": [
        {
          "name": "TaskStatus",
          "type": "Enum",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 34,
          "tags": {
            "COMPLEXITY": "1",
            "SEMANTICS": "task, status, state, enum",
            "PURPOSE": "Defines the possible states a task can be in during its lifecycle."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LogLevel",
          "type": "Enum",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 50,
          "tags": {
            "SEMANTICS": "log, level, severity, enum",
            "PURPOSE": "Defines the possible log levels for task logging.",
            "COMPLEXITY": "1"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "LogEntry"
            },
            {
              "type": "USED_BY",
              "target": "TaskLogger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 37
              },
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 37
              }
            ],
            "score": 0.7
          }
        },
        {
          "name": "LogEntry",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 83,
          "tags": {
            "SEMANTICS": "log, entry, record, pydantic",
            "PURPOSE": "A Pydantic model representing a single, structured log entry associated with a task.",
            "COMPLEXITY": "2",
            "INVARIANT": "Each log entry has a unique timestamp and source.",
            "TEST_CONTRACT": "LogEntryModel ->",
            "TEST_FIXTURE": "valid_log_entry -> {\"message\": \"Plugin initialized\"}",
            "TEST_EDGE": "empty_message -> {\"message\": \"\"}"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "LogLevel"
            },
            {
              "type": "DEPENDS_ON",
              "target": "Task"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TaskLog",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 86,
          "end_line": 104,
          "tags": {
            "SEMANTICS": "task, log, persistent, pydantic",
            "PURPOSE": "A Pydantic model representing a persisted log entry from the database.",
            "COMPLEXITY": "3"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TaskLogRecord"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "LogFilter",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 120,
          "tags": {
            "SEMANTICS": "log, filter, query, pydantic",
            "PURPOSE": "Filter parameters for querying task logs.",
            "COMPLEXITY": "1"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TaskManager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LogStats",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 123,
          "end_line": 134,
          "tags": {
            "SEMANTICS": "log, stats, aggregation, pydantic",
            "PURPOSE": "Statistics about log entries for a task.",
            "COMPLEXITY": "1"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TaskLog"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "Task",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 137,
          "end_line": 171,
          "tags": {
            "COMPLEXITY": "3",
            "SEMANTICS": "task, job, execution, state, pydantic",
            "PURPOSE": "A Pydantic model representing a single execution instance of a plugin, including its status, parameters, and logs."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TaskStatus"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LogEntry"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskManager"
            }
          ],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 158,
              "end_line": 168,
              "tags": {
                "PURPOSE": "Initializes the Task model and validates input_request for AWAITING_INPUT status.",
                "PRE": "If status is AWAITING_INPUT, input_request must be provided.",
                "POST": "Task instance is created or ValueError is raised.",
                "PARAM": "**data - Keyword arguments for model initialization."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.625
      }
    },
    {
      "name": "TaskCleanupModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 75,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "task, cleanup, retention, logs",
        "PURPOSE": "Implements task cleanup and retention policies, including associated logs.",
        "LAYER": "Core",
        "RELATION": "Uses TaskPersistenceService and TaskLogPersistenceService to delete old tasks and logs."
      },
      "relations": [],
      "children": [
        {
          "name": "TaskCleanupService",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 13,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Provides methods to clean up old task records and their associated logs.",
            "COMPLEXITY": "3"
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 17,
              "end_line": 30,
              "tags": {
                "PURPOSE": "Initializes the cleanup service with dependencies.",
                "PRE": "persistence_service and config_manager are valid.",
                "POST": "Cleanup service is ready."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "run_cleanup",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 32,
              "end_line": 55,
              "tags": {
                "PURPOSE": "Deletes tasks older than the configured retention period and their logs.",
                "PRE": "Config manager has valid settings.",
                "POST": "Old tasks and their logs are deleted from persistence."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "delete_task_with_logs",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 57,
              "end_line": 72,
              "tags": {
                "PURPOSE": "Delete a single task and all its associated logs.",
                "PRE": "task_id is a valid task ID.",
                "POST": "Task and all its logs are deleted.",
                "PARAM": "task_id (str) - The task ID to delete."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 13
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 13
              }
            ],
            "score": 0.5499999999999999
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TaskManagerPackage",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 16,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "task, manager, package, exports",
        "PURPOSE": "Exports the public API of the task manager package.",
        "LAYER": "Core",
        "INVARIANT": "Package exports stay aligned with manager and models contracts."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TaskManagerModels"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskManagerModule"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskManager"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TaskContextModule",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 167,
      "tags": {
        "SEMANTICS": "task, context, plugin, execution, logger",
        "PURPOSE": "Provides execution context passed to plugins during task execution.",
        "LAYER": "Core",
        "COMPLEXITY": "5",
        "INVARIANT": "Each TaskContext is bound to a single task execution.",
        "PRE": "Task execution pipeline provides valid task identifiers, logging callbacks, and parameter dictionaries.",
        "POST": "Plugins receive context instances with stable logger and parameter accessors.",
        "SIDE_EFFECT": "Creates task-scoped logger wrappers and carries optional background task handles across sub-contexts.",
        "DATA_CONTRACT": "Input[task_id, add_log_fn, params, default_source, background_tasks] -> Output[TaskContext]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TaskLoggerModule"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskManager"
        }
      ],
      "children": [
        {
          "name": "TaskContext",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 22,
          "end_line": 165,
          "tags": {
            "SEMANTICS": "context, task, execution, plugin",
            "PURPOSE": "A container passed to plugin.execute() providing the logger and other task-specific utilities.",
            "COMPLEXITY": "5",
            "INVARIANT": "logger is always a valid TaskLogger instance.",
            "PRE": "Constructor receives non-empty task_id, callable add_log_fn, and params mapping.",
            "POST": "Instance exposes immutable task identity with logger, params, and optional background task access.",
            "SIDE_EFFECT": "Emits structured task logs through TaskLogger on plugin interactions.",
            "DATA_CONTRACT": "Input[task_id, add_log_fn, params, default_source, background_tasks] -> Output[TaskContext]",
            "UX_STATE": "Idle -> Active -> Complete",
            "TEST_CONTRACT": "TaskContextContract ->",
            "TEST_FIXTURE": "valid_context -> {\"task_id\": \"123\", \"add_log_fn\": lambda *args: None, \"params\": {\"k\": \"v\"}, \"default_source\": \"plugin\"}",
            "TEST_EDGE": "missing_add_log_fn -> raises TypeError",
            "TEST_INVARIANT": "logger_initialized -> verifies: [valid_context]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TaskLogger"
            }
          ],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 59,
              "end_line": 83,
              "tags": {
                "PURPOSE": "Initialize the TaskContext with task-specific resources.",
                "PRE": "task_id is a valid task identifier, add_log_fn is callable.",
                "POST": "TaskContext is ready to be passed to plugin.execute().",
                "PARAM": "default_source (str) - Default source for logs (default: \"plugin\")."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "task_id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 85,
              "end_line": 95,
              "tags": {
                "PURPOSE": "Get the task ID.",
                "PRE": "TaskContext must be initialized.",
                "POST": "Returns the task ID string.",
                "RETURN": "str - The task ID."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "logger",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 97,
              "end_line": 107,
              "tags": {
                "PURPOSE": "Get the TaskLogger instance for this context.",
                "PRE": "TaskContext must be initialized.",
                "POST": "Returns the TaskLogger instance.",
                "RETURN": "TaskLogger - The logger instance."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "params",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 109,
              "end_line": 119,
              "tags": {
                "PURPOSE": "Get the task parameters.",
                "PRE": "TaskContext must be initialized.",
                "POST": "Returns the parameters dictionary.",
                "RETURN": "Dict[str, Any] - The task parameters."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "background_tasks",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 121,
              "end_line": 130,
              "tags": {
                "PURPOSE": "Expose optional background task scheduler for plugins that dispatch deferred side effects.",
                "PRE": "TaskContext must be initialized.",
                "POST": "Returns BackgroundTasks-like object or None."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_param",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 132,
              "end_line": 143,
              "tags": {
                "PURPOSE": "Get a specific parameter value with optional default.",
                "PRE": "TaskContext must be initialized.",
                "POST": "Returns parameter value or default.",
                "PARAM": "default (Any) - Default value if key not found.",
                "RETURN": "Any - Parameter value or default."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "create_sub_context",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 145,
              "end_line": 162,
              "tags": {
                "PURPOSE": "Create a sub-context with a different default source.",
                "PRE": "source is a non-empty string.",
                "POST": "Returns new TaskContext with different logger source.",
                "PARAM": "source (str) - New default source for logging.",
                "RETURN": "TaskContext - New context with different source."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9571428571428571
          }
        },
        {
          "name": "execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9666666666666667
      }
    },
    {
      "name": "test_task_logger_initialization",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 20,
      "end_line": 28,
      "tags": {
        "TEST_CONTRACT": "invariants -> \"All specific log methods (info, error) delegate to _log\""
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_task_logger"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_log_methods_delegation",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 30,
      "end_line": 71,
      "tags": {
        "TEST_CONTRACT": "invariants -> \"with_source creates a new logger with the same task_id\""
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_task_logger"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_with_source",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 73,
      "end_line": 84,
      "tags": {
        "TEST_EDGE": "missing_task_id -> raises TypeError"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_task_logger"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_missing_task_id",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 86,
      "end_line": 94,
      "tags": {
        "TEST_EDGE": "invalid_add_log_fn -> raises TypeError"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_task_logger"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_invalid_add_log_fn",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 96,
      "end_line": 104,
      "tags": {
        "TEST_INVARIANT": "consistent_delegation"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_task_logger"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_progress_log",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 106,
      "end_line": 125,
      "tags": {},
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_task_logger"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_task_logger",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 125,
      "tags": {
        "PURPOSE": "Auto-generated module for backend/src/core/task_manager/__tests__/test_task_logger.py",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "mock_add_log",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 12,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "task_logger",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TestContext",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 31,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, task-context, background-tasks, sub-context",
        "PURPOSE": "Verify TaskContext preserves optional background task scheduler across sub-context creation."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_task_context_preserves_background_tasks_across_sub_context",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Plugins must be able to access background_tasks from both root and sub-context loggers.",
            "PRE": "TaskContext is initialized with a BackgroundTasks-like object.",
            "POST": "background_tasks remains available on root and derived sub-contexts."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestContext"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "AuthApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 156,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "api, auth, routes, login, logout",
        "PURPOSE": "Authentication API endpoints.",
        "LAYER": "API",
        "INVARIANT": "All auth endpoints must return consistent error codes."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AuthService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "get_auth_db"
        },
        {
          "type": "DEPENDS_ON",
          "target": "get_current_user"
        },
        {
          "type": "DEPENDS_ON",
          "target": "is_adfs_configured"
        }
      ],
      "children": [
        {
          "name": "router",
          "type": "Variable",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 32,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "APIRouter instance for authentication routes."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "fastapi.APIRouter"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "login_for_access_token",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 35,
          "end_line": 66,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Authenticates a user and returns a JWT access token.",
            "PRE": "form_data contains username and password.",
            "POST": "Returns a Token object on success.",
            "THROW": "HTTPException 401 if authentication fails.",
            "PARAM": "db (Session) - Auth database session.",
            "RETURN": "Token - The generated JWT token."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "AuthService.authenticate_user"
            },
            {
              "type": "CALLS",
              "target": "AuthService.create_session"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "read_users_me",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 69,
          "end_line": 83,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Retrieves the profile of the currently authenticated user.",
            "PRE": "Valid JWT token provided.",
            "POST": "Returns the current user's data.",
            "PARAM": "current_user (UserSchema) - The user extracted from the token.",
            "RETURN": "UserSchema - The current user profile."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "get_current_user"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "logout",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 86,
          "end_line": 102,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Logs out the current user (placeholder for session revocation).",
            "PRE": "Valid JWT token provided.",
            "POST": "Returns success message.",
            "PARAM": "current_user (UserSchema) - The user extracted from the token."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "get_current_user"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "login_adfs",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 105,
          "end_line": 122,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Initiates the ADFS OIDC login flow.",
            "POST": "Redirects the user to ADFS."
          },
          "relations": [
            {
              "type": "USES",
              "target": "is_adfs_configured"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 105
              },
              {
                "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 105
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "auth_callback_adfs",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 125,
          "end_line": 154,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Handles the callback from ADFS after successful authentication.",
            "POST": "Provisions user JIT and returns session token."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "is_adfs_configured"
            },
            {
              "type": "CALLS",
              "target": "AuthService.provision_adfs_user"
            },
            {
              "type": "CALLS",
              "target": "AuthService.create_session"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "src.api",
      "type": "Package",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Backend API package root."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "LlmRoutes",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 336,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "api, routes, llm",
        "PURPOSE": "API routes for LLM provider configuration and management.",
        "LAYER": "UI (API)"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "LLMProviderService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "LLMProviderConfig"
        },
        {
          "type": "DEPENDS_ON",
          "target": "get_current_user"
        },
        {
          "type": "DEPENDS_ON",
          "target": "get_db"
        }
      ],
      "children": [
        {
          "name": "router",
          "type": "Global",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 24,
          "tags": {
            "PURPOSE": "APIRouter instance for LLM routes."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_is_valid_runtime_api_key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Validate decrypted runtime API key presence/shape.",
            "PRE": "value can be None.",
            "POST": "Returns True only for non-placeholder key."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "LlmRoutes"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_providers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Retrieve all LLM provider configurations.",
            "PRE": "User is authenticated.",
            "POST": "Returns list of LLMProviderConfig."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "LLMProviderService"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LLMProviderConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_llm_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 147,
          "tags": {
            "PURPOSE": "Returns whether LLM runtime is configured for dashboard validation.",
            "PRE": "User is authenticated.",
            "POST": "configured=true only when an active provider with valid decrypted key exists."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "LLMProviderService"
            },
            {
              "type": "CALLS",
              "target": "_is_valid_runtime_api_key"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_provider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 150,
          "end_line": 180,
          "tags": {
            "PURPOSE": "Create a new LLM provider configuration.",
            "PRE": "User is authenticated and has admin permissions.",
            "POST": "Returns the created LLMProviderConfig."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "LLMProviderService"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LLMProviderConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update_provider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 183,
          "end_line": 215,
          "tags": {
            "PURPOSE": "Update an existing LLM provider configuration.",
            "PRE": "User is authenticated and has admin permissions.",
            "POST": "Returns the updated LLMProviderConfig."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "LLMProviderService"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LLMProviderConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delete_provider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 218,
          "end_line": 238,
          "tags": {
            "PURPOSE": "Delete an LLM provider configuration.",
            "PRE": "User is authenticated and has admin permissions.",
            "POST": "Returns success status."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "LLMProviderService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_connection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 241,
          "end_line": 292,
          "tags": {
            "PURPOSE": "Test connection to an LLM provider.",
            "PRE": "User is authenticated.",
            "POST": "Returns success status and message."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "LLMProviderService"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LLMClient"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_provider_config",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 295,
          "end_line": 334,
          "tags": {
            "PURPOSE": "Test connection with a provided configuration (not yet saved).",
            "PRE": "User is authenticated.",
            "POST": "Returns success status and message."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "LLMClient"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LLMProviderConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 336 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "DatasetsApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 426,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "api, datasets, resources, hub",
        "PURPOSE": "API endpoints for the Dataset Hub - listing datasets with mapping progress",
        "LAYER": "API",
        "INVARIANT": "All dataset responses include last_task metadata"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AppDependencies"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.resource_service.ResourceService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.superset_client.SupersetClient"
        }
      ],
      "children": [
        {
          "name": "MappedFields",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 30,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "DTO for dataset mapping progress statistics"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LastTask",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 38,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "DTO for the most recent task associated with a dataset"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatasetItem",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 53,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Summary DTO for a dataset in the hub listing"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LinkedDashboard",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 62,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "DTO for a dashboard linked to a dataset"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatasetColumn",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 74,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "DTO for a single dataset column's metadata"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatasetDetailResponse",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 96,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Detailed DTO for a dataset including columns and links"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatasetsResponse",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 107,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Paginated response DTO for dataset listings"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TaskResponse",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 114,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Response DTO containing a task ID for tracking"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dataset_ids",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 116,
          "end_line": 166,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Fetch list of all dataset IDs from a specific environment (without pagination)",
            "PRE": "env_id must be a valid environment ID",
            "POST": "Returns a list of all dataset IDs",
            "PARAM": "search (Optional[str]) - Filter by table name",
            "RETURN": "List[int] - List of dataset IDs"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "get_datasets_with_status"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "get_datasets",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 168,
          "end_line": 246,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Fetch list of datasets from a specific environment with mapping progress",
            "PRE": "page_size must be between 1 and 100 if provided",
            "POST": "Response includes pagination metadata (page, page_size, total, total_pages)",
            "PARAM": "page_size (Optional[int]) - Items per page (default: 10, max: 100)",
            "RETURN": "DatasetsResponse - List of datasets with status metadata"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "backend.src.services.resource_service.ResourceService.get_datasets_with_status"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "MapColumnsRequest",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 248,
          "end_line": 257,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Request DTO for initiating column mapping"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "map_columns",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 259,
          "end_line": 319,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Trigger bulk column mapping for datasets",
            "PRE": "dataset_ids is a non-empty list",
            "POST": "Task is created and queued for execution",
            "PARAM": "request (MapColumnsRequest) - Mapping request with environment and dataset IDs",
            "RETURN": "TaskResponse - Task ID for tracking"
          },
          "relations": [
            {
              "type": "DISPATCHES",
              "target": "backend.src.plugins.mapper.MapperPlugin"
            },
            {
              "type": "CALLS",
              "target": "backend.src.core.task_manager.manager.TaskManager:create_task"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "GenerateDocsRequest",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 321,
          "end_line": 329,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Request DTO for initiating documentation generation"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generate_docs",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 331,
          "end_line": 385,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Trigger bulk documentation generation for datasets",
            "PRE": "dataset_ids is a non-empty list",
            "POST": "Task is created and queued for execution",
            "PARAM": "request (GenerateDocsRequest) - Documentation generation request",
            "RETURN": "TaskResponse - Task ID for tracking"
          },
          "relations": [
            {
              "type": "DISPATCHES",
              "target": "backend.src.plugins.llm_analysis.plugin.DocumentationPlugin"
            },
            {
              "type": "CALLS",
              "target": "backend.src.core.task_manager.manager.TaskManager:create_task"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "get_dataset_detail",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 387,
          "end_line": 424,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Get detailed dataset information including columns and linked dashboards",
            "PRE": "dataset_id is a valid dataset ID",
            "POST": "Returns detailed dataset info with columns and linked dashboards",
            "PARAM": "dataset_id (int) - The dataset ID",
            "RETURN": "DatasetDetailResponse - Detailed dataset information"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "backend.src.core.superset_client.SupersetClient:get_dataset_detail"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 426 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "GitApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 1749,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "git, routes, api, fastapi, repository, deployment",
        "PURPOSE": "Provides FastAPI endpoints for Git integration operations.",
        "LAYER": "API",
        "INVARIANT": "All Git operations must be routed through GitService."
      },
      "relations": [
        {
          "type": "USES",
          "target": "backend.src.services.git_service.GitService"
        },
        {
          "type": "USES",
          "target": "GitSchemas"
        },
        {
          "type": "USES",
          "target": "backend.src.models.git"
        }
      ],
      "children": [
        {
          "name": "_build_no_repo_status_payload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 88,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Build a consistent status payload for dashboards without initialized repositories.",
            "PRE": "None.",
            "POST": "Returns a stable payload compatible with frontend repository status parsing.",
            "RETURN": "dict"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_handle_unexpected_git_route_error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 103,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Convert unexpected route-level exceptions to stable 500 API responses.",
            "PRE": "`error` is a non-HTTPException instance.",
            "POST": "Raises HTTPException(500) with route-specific context.",
            "PARAM": "error (Exception)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_repository_status",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 132,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve repository status for one dashboard with graceful NO_REPO semantics.",
            "PRE": "`dashboard_id` is a valid integer.",
            "POST": "Returns standard status payload or `NO_REPO` payload when repository path is absent.",
            "PARAM": "dashboard_id (int)",
            "RETURN": "dict"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_git_config_or_404",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 135,
          "end_line": 147,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve GitServerConfig by id or raise 404.",
            "PRE": "db session is available.",
            "POST": "Returns GitServerConfig model."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_find_dashboard_id_by_slug",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 150,
          "end_line": 184,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve dashboard numeric ID by slug in a specific environment.",
            "PRE": "dashboard_slug is non-empty.",
            "POST": "Returns dashboard ID or None when not found."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_dashboard_id_from_ref",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 187,
          "end_line": 223,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve dashboard ID from slug-or-id reference for Git routes.",
            "PRE": "dashboard_ref is provided; env_id is required for slug values.",
            "POST": "Returns numeric dashboard ID or raises HTTPException."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_find_dashboard_id_by_slug_async",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 226,
          "end_line": 260,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve dashboard numeric ID by slug asynchronously for hot-path Git routes.",
            "PRE": "dashboard_slug is non-empty.",
            "POST": "Returns dashboard ID or None when not found."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_dashboard_id_from_ref_async",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 263,
          "end_line": 303,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve dashboard ID asynchronously from slug-or-id reference for hot Git routes.",
            "PRE": "dashboard_ref is provided; env_id is required for slug values.",
            "POST": "Returns numeric dashboard ID or raises HTTPException."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_repo_key_from_ref",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 306,
          "end_line": 340,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve repository folder key with slug-first strategy and deterministic fallback.",
            "PRE": "dashboard_id is resolved and valid.",
            "POST": "Returns safe key to be used in local repository path.",
            "RETURN": "str"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_sanitize_optional_identity_value",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 343,
          "end_line": 356,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Normalize optional identity value into trimmed string or None.",
            "PRE": "value may be None or blank.",
            "POST": "Returns sanitized value suitable for git identity configuration.",
            "RETURN": "Optional[str]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_current_user_git_identity",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 359,
          "end_line": 404,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve configured Git username/email from current user's profile preferences.",
            "PRE": "`db` may be stubbed in tests; `current_user` may be absent for direct handler invocations.",
            "POST": "Returns tuple(username, email) only when both values are configured.",
            "RETURN": "Optional[tuple[str, str]]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_apply_git_identity_from_profile",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 407,
          "end_line": 430,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Apply user-scoped Git identity to repository-local config before write/pull operations.",
            "PRE": "dashboard_id is resolved; db/current_user may be missing in direct test invocation context.",
            "POST": "git_service.configure_identity is called only when identity and method are available.",
            "RETURN": "None"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_git_configs",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 433,
          "end_line": 453,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "List all configured Git servers.",
            "PRE": "Database session `db` is available.",
            "POST": "Returns a list of all GitServerConfig objects from the database.",
            "RETURN": "List[GitServerConfigSchema]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_git_config",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 456,
          "end_line": 478,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Register a new Git server configuration.",
            "PRE": "`config` contains valid GitServerConfigCreate data.",
            "POST": "A new GitServerConfig record is created in the database.",
            "PARAM": "config (GitServerConfigCreate)",
            "RETURN": "GitServerConfigSchema"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update_git_config",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 481,
          "end_line": 518,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Update an existing Git server configuration.",
            "PRE": "`config_id` corresponds to an existing configuration.",
            "POST": "The configuration record is updated in the database.",
            "PARAM": "config_update (GitServerConfigUpdate)",
            "RETURN": "GitServerConfigSchema"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delete_git_config",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 521,
          "end_line": 545,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Remove a Git server configuration.",
            "PRE": "`config_id` corresponds to an existing configuration.",
            "POST": "The configuration record is removed from the database.",
            "PARAM": "config_id (str)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_git_config",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 548,
          "end_line": 589,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Validate connection to a Git server using provided credentials.",
            "PRE": "`config` contains provider, url, and pat.",
            "POST": "Returns success if the connection is validated via GitService.",
            "PARAM": "config (GitServerConfigCreate)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_gitea_repositories",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 592,
          "end_line": 624,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "List repositories in Gitea for a saved Gitea config.",
            "PRE": "config_id exists and provider is GITEA.",
            "POST": "Returns repositories visible to PAT user."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_gitea_repository",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 627,
          "end_line": 665,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Create a repository in Gitea for a saved Gitea config.",
            "PRE": "config_id exists and provider is GITEA.",
            "POST": "Returns created repository payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_remote_repository",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 668,
          "end_line": 730,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Create repository on remote Git server using selected provider config.",
            "PRE": "config_id exists and PAT has creation permissions.",
            "POST": "Returns normalized remote repository payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delete_gitea_repository",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 733,
          "end_line": 761,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Delete repository in Gitea for a saved Gitea config.",
            "PRE": "config_id exists and provider is GITEA.",
            "POST": "Target repository is deleted on Gitea."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "init_repository",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 764,
          "end_line": 846,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Link a dashboard to a Git repository and perform initial clone/init.",
            "PRE": "`dashboard_ref` exists and `init_data` contains valid config_id and remote_url.",
            "POST": "Repository is initialized on disk and a GitRepository record is saved in DB.",
            "PARAM": "init_data (RepoInitRequest)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 764
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 764
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "get_repository_binding",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 849,
          "end_line": 892,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Return repository binding with provider metadata for selected dashboard.",
            "PRE": "`dashboard_ref` resolves to a valid dashboard and repository is initialized.",
            "POST": "Returns dashboard repository binding and linked provider.",
            "PARAM": "dashboard_ref (str)",
            "RETURN": "RepositoryBindingSchema"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delete_repository",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 895,
          "end_line": 922,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Delete local repository workspace and DB binding for selected dashboard.",
            "PRE": "`dashboard_ref` resolves to a valid dashboard.",
            "POST": "Repository files and binding record are removed when present.",
            "PARAM": "dashboard_ref (str)",
            "RETURN": "dict"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_branches",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 925,
          "end_line": 951,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "List all branches for a dashboard's repository.",
            "PRE": "Repository for `dashboard_ref` is initialized.",
            "POST": "Returns a list of branches from the local repository.",
            "PARAM": "dashboard_ref (str)",
            "RETURN": "List[BranchSchema]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_branch",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 954,
          "end_line": 987,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Create a new branch in the dashboard's repository.",
            "PRE": "`dashboard_ref` repository exists and `branch_data` has name and from_branch.",
            "POST": "A new branch is created in the local repository.",
            "PARAM": "branch_data (BranchCreate)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "checkout_branch",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 990,
          "end_line": 1018,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Switch the dashboard's repository to a specific branch.",
            "PRE": "`dashboard_ref` repository exists and branch `checkout_data.name` exists.",
            "POST": "The local repository HEAD is moved to the specified branch.",
            "PARAM": "checkout_data (BranchCheckout)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "commit_changes",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1021,
          "end_line": 1054,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Stage and commit changes in the dashboard's repository.",
            "PRE": "`dashboard_ref` repository exists and `commit_data` has message and files.",
            "POST": "Specified files are staged and a new commit is created.",
            "PARAM": "commit_data (CommitCreate)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "push_changes",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1057,
          "end_line": 1083,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Push local commits to the remote repository.",
            "PRE": "`dashboard_ref` repository exists and has a remote configured.",
            "POST": "Local commits are pushed to the remote repository.",
            "PARAM": "dashboard_ref (str)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pull_changes",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1086,
          "end_line": 1153,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Pull changes from the remote repository.",
            "PRE": "`dashboard_ref` repository exists and has a remote configured.",
            "POST": "Remote changes are fetched and merged into the local branch.",
            "PARAM": "dashboard_ref (str)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1086
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1086
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "get_merge_status",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1156,
          "end_line": 1182,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Return unfinished-merge status for repository (web-only recovery support).",
            "PRE": "`dashboard_ref` resolves to a valid dashboard repository.",
            "POST": "Returns merge status payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_merge_conflicts",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1185,
          "end_line": 1212,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Return conflicted files with mine/theirs previews for web conflict resolver.",
            "PRE": "`dashboard_ref` resolves to a valid dashboard repository.",
            "POST": "Returns conflict file list."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolve_merge_conflicts",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1215,
          "end_line": 1244,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Apply mine/theirs/manual conflict resolutions from WebUI and stage files.",
            "PRE": "`dashboard_ref` resolves; request contains at least one resolution item.",
            "POST": "Resolved files are staged in index."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1215
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1215
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "abort_merge",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1247,
          "end_line": 1271,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Abort unfinished merge from WebUI flow.",
            "PRE": "`dashboard_ref` resolves to repository.",
            "POST": "Merge operation is aborted or reports no active merge."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "continue_merge",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1274,
          "end_line": 1299,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Finalize unfinished merge from WebUI flow.",
            "PRE": "All conflicts are resolved and staged.",
            "POST": "Merge commit is created."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1274
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1274
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "sync_dashboard",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1302,
          "end_line": 1338,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Sync dashboard state from Superset to Git using the GitPlugin.",
            "PRE": "`dashboard_ref` is valid; GitPlugin is available.",
            "POST": "Dashboard YAMLs are exported from Superset and committed to Git.",
            "PARAM": "source_env_id (Optional[str])"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1302
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1302
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "promote_dashboard",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1341,
          "end_line": 1462,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Promote changes between branches via MR or direct merge.",
            "PRE": "dashboard repository is initialized and Git config is valid.",
            "POST": "Returns promotion result metadata."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1341
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1341
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "get_environments",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1465,
          "end_line": 1486,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "List all deployment environments.",
            "PRE": "Config manager is accessible.",
            "POST": "Returns a list of DeploymentEnvironmentSchema objects.",
            "RETURN": "List[DeploymentEnvironmentSchema]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deploy_dashboard",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1489,
          "end_line": 1525,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Deploy dashboard from Git to a target environment.",
            "PRE": "`dashboard_ref` and `deploy_data.environment_id` are valid.",
            "POST": "Dashboard YAMLs are read from Git and imported into the target Superset.",
            "PARAM": "deploy_data (DeployRequest)"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1489
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1489
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "get_history",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1528,
          "end_line": 1556,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "View commit history for a dashboard's repository.",
            "PRE": "`dashboard_ref` repository exists.",
            "POST": "Returns a list of recent commits from the repository.",
            "PARAM": "limit (int)",
            "RETURN": "List[CommitSchema]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_repository_status",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1559,
          "end_line": 1585,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Get current Git status for a dashboard repository.",
            "PRE": "`dashboard_ref` resolves to a valid dashboard.",
            "POST": "Returns repository status; if repo is not initialized, returns `NO_REPO` payload.",
            "PARAM": "dashboard_ref (str)",
            "RETURN": "dict"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_repository_status_batch",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1588,
          "end_line": 1631,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Get Git statuses for multiple dashboard repositories in one request.",
            "PRE": "`request.dashboard_ids` is provided.",
            "POST": "Returns `statuses` map where each key is dashboard ID and value is repository status payload.",
            "PARAM": "request (RepoStatusBatchRequest)",
            "RETURN": "RepoStatusBatchResponse"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_repository_diff",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1634,
          "end_line": 1665,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Get Git diff for a dashboard repository.",
            "PRE": "`dashboard_ref` repository exists.",
            "POST": "Returns the diff text for the specified file or all changes.",
            "PARAM": "staged (bool)",
            "RETURN": "str"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generate_commit_message",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1668,
          "end_line": 1747,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Generate a suggested commit message using LLM.",
            "PRE": "Repository for `dashboard_ref` is initialized.",
            "POST": "Returns a suggested commit message string."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1668
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1668
              }
            ],
            "score": 0.5499999999999999
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 1749 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.325
      }
    },
    {
      "name": "ConnectionsRouter",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 158,
      "tags": {
        "SEMANTICS": "api, router, connections, database",
        "PURPOSE": "Defines the FastAPI router for managing external database connections.",
        "COMPLEXITY": "3",
        "LAYER": "UI (API)",
        "CONSTRAINT": "Must use belief_scope for logging."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "Session"
        }
      ],
      "children": [
        {
          "name": "_ensure_connections_schema",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 23,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Ensures the connection_configs table exists before CRUD access.",
            "COMPLEXITY": "3",
            "PRE": "db is an active SQLAlchemy session.",
            "POST": "The current bind can safely query ConnectionConfig."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "ensure_connection_configs_table"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "ConnectionSchema",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 37,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Pydantic model for connection response.",
            "COMPLEXITY": "3"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "ConnectionConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "ConnectionCreate",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 58,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Pydantic model for creating a connection.",
            "COMPLEXITY": "3"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "ConnectionConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "list_connections",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 75,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Lists all saved connections.",
            "COMPLEXITY": "3",
            "PRE": "Database session is active.",
            "POST": "Returns list of connection configs.",
            "PARAM": "db (Session) - Database session.",
            "RETURN": "List[ConnectionSchema] - List of connections."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "_ensure_connections_schema"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ConnectionConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "create_connection",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 95,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Creates a new connection configuration.",
            "COMPLEXITY": "3",
            "PRE": "Connection name is unique.",
            "POST": "Connection is saved to DB.",
            "PARAM": "db (Session) - Database session.",
            "RETURN": "ConnectionSchema - Created connection."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "_ensure_connections_schema"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ConnectionConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "delete_connection",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 124,
          "end_line": 156,
          "tags": {
            "PURPOSE": "Deletes a connection configuration.",
            "COMPLEXITY": "3",
            "PRE": "Connection ID exists.",
            "POST": "Connection is removed from DB.",
            "PARAM": "db (Session) - Database session.",
            "RETURN": "None."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "_ensure_connections_schema"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ConnectionConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "health_router",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 62,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "health, monitoring, dashboards",
        "PURPOSE": "API endpoints for dashboard health monitoring and status aggregation.",
        "LAYER": "UI/API"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "health_service"
        }
      ],
      "children": [
        {
          "name": "get_health_summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Get aggregated health status for all dashboards.",
            "PRE": "Caller has read permission for dashboard health view.",
            "POST": "Returns HealthSummaryResponse."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "backend.src.services.health_service.HealthService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delete_health_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Delete one persisted dashboard validation report from health summary.",
            "PRE": "Caller has write permission for tasks/report maintenance.",
            "POST": "Validation record is removed; linked task/logs are cleaned when available."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "backend.src.services.health_service.HealthService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "EnvironmentsApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 159,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "api, environments, superset, databases",
        "PURPOSE": "API endpoints for listing environments and their databases.",
        "LAYER": "API",
        "INVARIANT": "Environment IDs must exist in the configuration."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.dependencies"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.superset_client"
        }
      ],
      "children": [
        {
          "name": "_normalize_superset_env_url",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Canonicalize Superset environment URL to base host/path without trailing /api/v1.",
            "PRE": "raw_url can be empty.",
            "POST": "Returns normalized base URL."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScheduleSchema",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 39,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "EnvironmentResponse",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 49,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatabaseResponse",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 56,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_environments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 95,
          "tags": {
            "PURPOSE": "List all configured environments.",
            "LAYER": "API",
            "SEMANTICS": "list, environments, config",
            "PRE": "config_manager is injected via Depends.",
            "POST": "Returns a list of EnvironmentResponse objects.",
            "RETURN": "List[EnvironmentResponse]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update_environment_schedule",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Update backup schedule for an environment.",
            "LAYER": "API",
            "SEMANTICS": "update, schedule, backup, environment",
            "PRE": "Environment id exists, schedule is valid ScheduleSchema.",
            "POST": "Backup schedule updated and scheduler reloaded.",
            "PARAM": "schedule (ScheduleSchema) - The new schedule."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_environment_databases",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Fetch the list of databases from a specific environment.",
            "LAYER": "API",
            "SEMANTICS": "fetch, databases, superset, environment",
            "PRE": "Environment id exists.",
            "POST": "Returns a list of database summaries from the environment.",
            "PARAM": "id (str) - The environment ID.",
            "RETURN": "List[Dict] - List of databases."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "DatasetReviewApi",
      "type": "Module",
      "complexity": 4,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 2231,
      "tags": {
        "COMPLEXITY": "4",
        "SEMANTICS": "dataset_review, api, session_lifecycle, exports, rbac, feature_flags",
        "PURPOSE": "Expose dataset review session lifecycle and export endpoints for backend US1.",
        "LAYER": "API",
        "PRE": "Authenticated user and valid environment/session scope are required for all mutations and reads.",
        "POST": "Returns ownership-scoped session state and export payloads with feature-flag/RBAC enforcement.",
        "SIDE_EFFECT": "Persists session state and may enqueue recovery task.",
        "DATA_CONTRACT": "Input[HTTP Request] -> Output[SessionSummary | SessionDetail | ExportArtifactResponse | HTTP 204]",
        "INVARIANT": "No cross-user session leakage is allowed; export payloads only expose the current user's accessible session."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AppDependencies"
        },
        {
          "type": "DEPENDS_ON",
          "target": "DatasetReviewSessionRepository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "DatasetReviewOrchestrator"
        }
      ],
      "children": [
        {
          "name": "DatasetReviewApi.imports",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 81,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "StartSessionRequest",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 95,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Request DTO for starting one dataset review session from a Superset link or dataset selection."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "UpdateSessionRequest",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 106,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Request DTO for lifecycle state updates on an existing session."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SessionCollectionResponse",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 120,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Paginated ownership-scoped dataset review session collection response."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ExportArtifactResponse",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 123,
          "end_line": 137,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Inline export response for documentation or validation outputs without introducing unrelated persistence changes."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "FieldSemanticUpdateRequest",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 140,
          "end_line": 152,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Request DTO for field-level semantic candidate acceptance or manual override."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "FeedbackRequest",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 155,
          "end_line": 162,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Request DTO for thumbs up/down feedback persistence on AI-assisted content."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationAnswerRequest",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 174,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Request DTO for submitting one clarification answer."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationSessionSummaryResponse",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 177,
          "end_line": 190,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Summary DTO for current clarification session state without exposing historical noise."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationStateResponse",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 193,
          "end_line": 201,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Response DTO for current clarification state and active question payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationAnswerResultResponse",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 204,
          "end_line": 213,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Response DTO for one clarification answer mutation result."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "FeedbackResponse",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 216,
          "end_line": 224,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Minimal response DTO for persisted AI feedback actions."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ApproveMappingRequest",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 227,
          "end_line": 234,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Optional request DTO for explicit mapping approval audit notes."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "BatchApproveSemanticItemRequest",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 237,
          "end_line": 246,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Request DTO for one batch semantic-approval item aligned with single-field acceptance semantics."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "BatchApproveSemanticRequest",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 249,
          "end_line": 256,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Request DTO for explicit batch semantic approvals inside one owned session scope."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "BatchApproveMappingRequest",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 259,
          "end_line": 267,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Request DTO for explicit batch mapping approvals aligned with single-item approval semantics."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "PreviewEnqueueResultResponse",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 270,
          "end_line": 280,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Contract-compliant async preview trigger response exposing only enqueue state."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MappingCollectionResponse",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 283,
          "end_line": 290,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Contract-compliant wrapper for execution mapping list responses."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "UpdateExecutionMappingRequest",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 293,
          "end_line": 305,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Request DTO for one manual execution-mapping override update without introducing unrelated bulk mutation semantics."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LaunchDatasetResponse",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 308,
          "end_line": 316,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Contract-compliant launch result exposing audited run context and SQL Lab redirect target."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_require_auto_review_flag",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 319,
          "end_line": 333,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Guard US1 dataset review endpoints behind the configured feature flag."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ConfigManager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_require_clarification_flag",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 336,
          "end_line": 350,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Guard clarification-specific US2 endpoints behind the configured feature flag."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ConfigManager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_require_execution_flag",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 353,
          "end_line": 367,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Guard US3 execution endpoints behind the configured feature flag."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ConfigManager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_repository",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 370,
          "end_line": 377,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Build repository dependency for dataset review session aggregate access."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_orchestrator",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 380,
          "end_line": 396,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Build orchestrator dependency for session lifecycle actions."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewOrchestrator"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_clarification_engine",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 399,
          "end_line": 409,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Build clarification engine dependency for one-question-at-a-time guided clarification mutations."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ClarificationEngine"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_serialize_session_summary",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 412,
          "end_line": 423,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Map SQLAlchemy session aggregate root into stable API summary DTO."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSession"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SessionSummary"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_serialize_session_detail",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 426,
          "end_line": 436,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Map SQLAlchemy session aggregate root into stable API detail DTO."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SessionDetail"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_require_session_version_header",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 439,
          "end_line": 448,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Read the optimistic-lock session version header required by dataset review mutation endpoints."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_enforce_session_version",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 451,
          "end_line": 476,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Convert repository optimistic-lock conflicts into deterministic HTTP 409 responses."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSessionRepository"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 451
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 451
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 451
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 451
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 451
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 451
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 451
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 451
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_prepare_owned_session_mutation",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 479,
          "end_line": 493,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Resolve owner-scoped mutation session and enforce optimistic-lock version before changing dataset review state."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 479
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 479
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 479
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 479
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 479
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 479
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 479
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 479
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 479
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 479
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_commit_owned_session_mutation",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 496,
          "end_line": 514,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Centralize dataset-review session version bumping and commit semantics for owner-scoped mutation endpoints."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSessionRepository"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 496
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 496
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 496
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 496
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 496
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 496
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 496
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 496
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_serialize_semantic_field",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 517,
          "end_line": 531,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Map one semantic field aggregate into stable field-level DTO output."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SemanticFieldEntryDto"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_serialize_clarification_question_payload",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 534,
          "end_line": 561,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Convert clarification engine payload into API DTO aligned with the clarification contract."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ClarificationQuestionDto"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_serialize_clarification_state",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 564,
          "end_line": 587,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Convert clarification engine state into stable API response payload."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ClarificationStateResponse"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_serialize_empty_clarification_state",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 590,
          "end_line": 601,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Return a stable empty clarification payload for sessions that have not started clarification yet."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ClarificationStateResponse"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_owned_session_or_404",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 604,
          "end_line": 630,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Resolve one session for current user or collaborator scope, returning 404 when inaccessible.",
            "PRE": "session_id is a non-empty identifier and current_user is authenticated.",
            "POST": "returns accessible session detail or raises HTTP 404 without leaking foreign-session existence.",
            "SIDE_EFFECT": "none.",
            "DATA_CONTRACT": "Input[session_id:str,current_user:User] -> Output[DatasetReviewSession|HTTPException]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "load_detail"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "_require_owner_mutation_scope",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 633,
          "end_line": 653,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Enforce owner-only mutation scope for dataset review write endpoints.",
            "PRE": "Session is already ownership-visible to the current user.",
            "POST": "Returns the session when current user is owner, otherwise raises HTTP 403.",
            "SIDE_EFFECT": "none.",
            "DATA_CONTRACT": "Input[DatasetReviewSession,User] -> Output[DatasetReviewSession|HTTPException]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSession"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 633
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 633
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_record_session_event",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 656,
          "end_line": 678,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Persist one explicit audit event for an owned dataset-review mutation endpoint."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "SessionEventLogger.log_for_session"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_owned_mapping_or_404",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 681,
          "end_line": 701,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Resolve one execution mapping inside one owned session aggregate without leaking foreign-mapping existence.",
            "PRE": "Session is accessible to current user.",
            "POST": "Returns the requested mapping or raises HTTP 404.",
            "SIDE_EFFECT": "none.",
            "DATA_CONTRACT": "Input[DatasetReviewSession,mapping_id:str] -> Output[ExecutionMapping|HTTPException]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ExecutionMapping"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 681
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 681
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_get_owned_field_or_404",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 704,
          "end_line": 724,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Resolve a semantic field inside one owned session aggregate without leaking foreign-field existence.",
            "PRE": "Session is accessible to current user.",
            "POST": "Returns the requested field or raises HTTP 404.",
            "SIDE_EFFECT": "none.",
            "DATA_CONTRACT": "Input[DatasetReviewSession,field_id:str] -> Output[SemanticFieldEntry|HTTPException]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SemanticFieldEntry"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 704
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 704
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_get_latest_clarification_session_or_404",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 727,
          "end_line": 746,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve the latest clarification aggregate for one session or raise when clarification is unavailable."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ClarificationSession"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_map_candidate_provenance",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 749,
          "end_line": 762,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Translate accepted semantic candidate type into stable field provenance."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_candidate_source_version",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 765,
          "end_line": 784,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve the semantic source version for one accepted candidate from the loaded session aggregate."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SemanticFieldEntry"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SemanticSource"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_update_semantic_field_state",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 787,
          "end_line": 865,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Apply field-level semantic manual override or candidate acceptance while preserving lock/provenance invariants.",
            "PRE": "Field belongs to the owned session and request is owner-authorized.",
            "POST": "Manual overrides always set manual provenance plus lock; explicit field edits may lock accepted candidate state but later imports cannot silently replace locked values.",
            "SIDE_EFFECT": "Mutates field state and candidate statuses in persistence.",
            "DATA_CONTRACT": "Input[SemanticFieldEntry,FieldSemanticUpdateRequest,changed_by:str] -> Output[SemanticFieldEntry]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SemanticFieldEntry"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SemanticCandidate"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 787
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 787
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_serialize_execution_mapping",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 868,
          "end_line": 882,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Map one persisted execution mapping into stable API DTO output."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ExecutionMappingDto"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_serialize_preview",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 885,
          "end_line": 903,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Map one persisted preview snapshot into stable API DTO output and surface the refreshed session version for follow-up optimistic-lock mutations."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "CompiledPreviewDto"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_serialize_run_context",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 906,
          "end_line": 920,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Map one persisted launch run context into stable API DTO output for SQL Lab handoff confirmation."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetRunContextDto"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_build_sql_lab_redirect_url",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 923,
          "end_line": 943,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Build a stable SQL Lab redirect URL from the configured Superset environment and persisted run context reference."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetRunContextDto"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_build_documentation_export",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 946,
          "end_line": 1005,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Produce session documentation export content from current persisted review state."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSession"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_build_validation_export",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1008,
          "end_line": 1058,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Produce validation-focused export content from persisted findings and readiness state."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSession"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_sessions",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1061,
          "end_line": 1093,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "List resumable dataset review sessions for the current user."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "list_user_sess"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "start_session",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1096,
          "end_line": 1144,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Start a new dataset review session from a Superset link or dataset selection.",
            "PRE": "feature flag enabled, user authenticated, and request body valid.",
            "POST": "returns persisted session summary scoped to the authenticated user.",
            "SIDE_EFFECT": "persists session/profile/findings and may enqueue recovery task.",
            "DATA_CONTRACT": "Input[StartSessionRequest] -> Output[SessionSummary]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "start_session:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "get_session_detail",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1147,
          "end_line": 1169,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Return the full accessible dataset review session aggregate for current user scope."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "_get_owned_session_or_404"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "update_session",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1172,
          "end_line": 1228,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Update resumable lifecycle status for an owned dataset review session.",
            "PRE": "session is accessible to current user and requested status is allowed by lifecycle policy.",
            "POST": "returns updated summary without changing ownership or unrelated aggregates.",
            "SIDE_EFFECT": "mutates session lifecycle fields in persistence.",
            "DATA_CONTRACT": "Input[UpdateSessionRequest] -> Output[SessionSummary]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSession"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "delete_session",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1231,
          "end_line": 1290,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Archive or hard-delete a session owned by the current user.",
            "PRE": "session is owner-scoped to current user.",
            "POST": "session is archived or deleted and no foreign-session existence is disclosed.",
            "SIDE_EFFECT": "mutates or deletes persisted session aggregate.",
            "DATA_CONTRACT": "Input[session_id:str,hard_delete:bool] -> Output[HTTP 204]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSession"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "export_documentation",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1293,
          "end_line": 1334,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Export documentation output for the current session in JSON or Markdown form.",
            "PRE": "session is accessible to current user and requested format is supported.",
            "POST": "returns ownership-scoped export payload without fabricating unrelated artifacts.",
            "SIDE_EFFECT": "none beyond response construction.",
            "DATA_CONTRACT": "Input[session_id:str,format:ArtifactFormat] -> Output[ExportArtifactResponse]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSession"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "export_validation",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1337,
          "end_line": 1378,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Export validation findings for the current session in JSON or Markdown form.",
            "PRE": "session is accessible to current user and requested format is supported.",
            "POST": "returns explicit validation export payload scoped to current user session access.",
            "SIDE_EFFECT": "none beyond response construction.",
            "DATA_CONTRACT": "Input[session_id:str,format:ArtifactFormat] -> Output[ExportArtifactResponse]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSession"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "get_clarification_state",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1381,
          "end_line": 1421,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Return the current clarification session summary and one active question payload, or an empty state when clarification has not started.",
            "PRE": "Session is accessible to current user and clarification feature is enabled.",
            "POST": "Returns at most one active clarification question with why_it_matters, current_guess, and ordered options; sessions without a clarification record return a non-blocking empty state.",
            "SIDE_EFFECT": "May normalize clarification pointer and readiness state in persistence.",
            "DATA_CONTRACT": "Input[session_id:str] -> Output[ClarificationStateResponse]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "build_question_payload:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "resume_clarification",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1424,
          "end_line": 1464,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Resume clarification mode on the highest-priority unresolved question for an owned session.",
            "PRE": "Session belongs to the current owner and clarification feature is enabled.",
            "POST": "Clarification session enters active state with one current question or completes deterministically when no unresolved items remain.",
            "SIDE_EFFECT": "Mutates clarification pointer, readiness, and recommended action.",
            "DATA_CONTRACT": "Input[session_id:str] -> Output[ClarificationStateResponse]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "build_question_payload:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "record_clarification_answer",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1467,
          "end_line": 1521,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Persist one clarification answer before advancing the active pointer or readiness state.",
            "PRE": "Target question is the session's active clarification question and current user owns the session.",
            "POST": "Answer is persisted, changed findings are returned, and unresolved skipped/expert-review questions remain visible.",
            "SIDE_EFFECT": "Inserts answer row and mutates clarification/session state.",
            "DATA_CONTRACT": "Input[ClarificationAnswerRequest] -> Output[ClarificationAnswerResultResponse]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "record_answer:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "update_field_semantic",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1524,
          "end_line": 1574,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Apply one field-level semantic candidate decision or manual override with lock/provenance safeguards.",
            "PRE": "Session and field belong to the current owner, and request contains a candidate selection or manual override values.",
            "POST": "Manual overrides set manual provenance plus lock; explicit lock state prevents later silent replacement.",
            "SIDE_EFFECT": "Mutates field state and accepted/superseded candidate statuses in persistence.",
            "DATA_CONTRACT": "Input[FieldSemanticUpdateRequest] -> Output[SemanticFieldEntryDto]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "_update_semantic_field_state"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "lock_field_semantic",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1577,
          "end_line": 1623,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Lock one semantic field against later automatic overwrite while preserving the current active value.",
            "PRE": "Field belongs to the current owner.",
            "POST": "Field remains active and locked; later imports may add candidates but cannot replace the locked value implicitly.",
            "SIDE_EFFECT": "Mutates field lock state in persistence.",
            "DATA_CONTRACT": "Input[session_id:str,field_id:str] -> Output[SemanticFieldEntryDto]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SemanticFieldEntry"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "unlock_field_semantic",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1626,
          "end_line": 1675,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Unlock one semantic field so later automated candidate application may replace it explicitly.",
            "PRE": "Field belongs to the current owner.",
            "POST": "Field becomes unlocked; manual-override provenance is downgraded to unresolved to preserve the lock/provenance invariant.",
            "SIDE_EFFECT": "Mutates field lock/provenance state in persistence.",
            "DATA_CONTRACT": "Input[session_id:str,field_id:str] -> Output[SemanticFieldEntryDto]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SemanticFieldEntry"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "approve_batch_semantic_fields",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1678,
          "end_line": 1737,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Approve multiple semantic candidate decisions in one owner-authorized batch without bypassing single-field semantics.",
            "PRE": "Session belongs to the current owner and each requested field/candidate pair is contained in the session aggregate.",
            "POST": "Returns updated semantic fields after applying the same candidate/lock invariants as the single-field endpoint.",
            "SIDE_EFFECT": "Persists multiple semantic field decisions in one transaction and records one explicit session audit event.",
            "DATA_CONTRACT": "Input[BatchApproveSemanticRequest] -> Output[List[SemanticFieldEntryDto]]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "_update_semantic_field_state"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "list_execution_mappings",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1740,
          "end_line": 1772,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Return the current mapping-review set for one accessible session.",
            "PRE": "Session is ownership-accessible to the authenticated user and execution feature is enabled.",
            "POST": "Returns the persisted mapping review set for the requested session wrapped in the contract collection shape without mutating approval state.",
            "SIDE_EFFECT": "none.",
            "DATA_CONTRACT": "Input[session_id:str] -> Output[MappingCollectionResponse]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "_get_owned_session_or_404"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "update_execution_mapping",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1775,
          "end_line": 1853,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Persist one owner-authorized execution-mapping effective value override and invalidate stale preview truth.",
            "PRE": "Mapping belongs to the current owner session and request carries an explicit effective value decision.",
            "POST": "Mapping effective value and override metadata are persisted and any prior preview truth is marked stale for safe relaunch.",
            "SIDE_EFFECT": "Mutates mapping value/approval state, may mark latest preview stale, and updates session readiness cues.",
            "DATA_CONTRACT": "Input[UpdateExecutionMappingRequest] -> Output[ExecutionMappingDto]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ExecutionMapping"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "approve_execution_mapping",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1856,
          "end_line": 1911,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Explicitly approve a warning-sensitive mapping transformation and preserve audit note state.",
            "PRE": "Mapping belongs to the current owner session and execution feature is enabled.",
            "POST": "Mapping approval state becomes approved and owner-scoped audit markers are updated.",
            "SIDE_EFFECT": "Mutates persisted mapping approval state and session readiness cues.",
            "DATA_CONTRACT": "Input[ApproveMappingRequest] -> Output[ExecutionMappingDto]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ExecutionMapping"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "approve_batch_execution_mappings",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1914,
          "end_line": 1976,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Approve multiple warning-sensitive execution mappings in one owner-authorized batch.",
            "PRE": "Session belongs to the current owner and every requested mapping belongs to the same session aggregate.",
            "POST": "Returns updated mappings after applying the same approval semantics as the single mapping endpoint.",
            "SIDE_EFFECT": "Persists multiple approvals and records one explicit audit event.",
            "DATA_CONTRACT": "Input[BatchApproveMappingRequest] -> Output[List[ExecutionMappingDto]]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ExecutionMapping"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "trigger_preview_generation",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1979,
          "end_line": 2043,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Trigger Superset-side preview compilation for the current owned execution context.",
            "PRE": "Session belongs to the current owner and required mapping inputs are available.",
            "POST": "Returns the compiled preview directly for synchronous success or enqueue-state shape when preview generation remains pending.",
            "SIDE_EFFECT": "Persists preview attempt and updates readiness state.",
            "DATA_CONTRACT": "Input[session_id:str] -> Output[CompiledPreviewDto | PreviewEnqueueResultResponse]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "prepare_launch_preview:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "launch_dataset",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 2046,
          "end_line": 2108,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Execute the current owned session launch handoff through the orchestrator and return audited SQL Lab run context.",
            "PRE": "Session belongs to the current owner, execution feature is enabled, and launch gates are satisfied or a deterministic conflict is returned.",
            "POST": "Returns persisted run context plus redirect URL when launch handoff is accepted.",
            "SIDE_EFFECT": "Persists launch audit snapshot and may trigger SQL Lab session creation.",
            "DATA_CONTRACT": "Input[session_id:str] -> Output[LaunchDatasetResponse]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "launch_dataset:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "record_field_feedback",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 2111,
          "end_line": 2158,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Persist thumbs up/down feedback for AI-assisted semantic field content.",
            "PRE": "Field belongs to the current owner and feedback value is valid.",
            "POST": "Field feedback is stored without altering lock or active semantic value.",
            "SIDE_EFFECT": "Updates one persisted semantic field feedback marker.",
            "DATA_CONTRACT": "Input[FeedbackRequest] -> Output[FeedbackResponse]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SemanticFieldEntry"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "record_clarification_feedback",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 2161,
          "end_line": 2229,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Persist thumbs up/down feedback for clarification question/answer content used in guided review.",
            "PRE": "Clarification question belongs to the current owner session and already has a persisted answer.",
            "POST": "Feedback is stored on the clarification answer audit record.",
            "SIDE_EFFECT": "Updates one clarification answer feedback marker in persistence.",
            "DATA_CONTRACT": "Input[FeedbackRequest] -> Output[FeedbackResponse]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ClarificationAnswer"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 2231 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8071428571428572
      }
    },
    {
      "name": "MigrationApi",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 400,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "api, migration, dashboards, sync, dry-run",
        "PURPOSE": "HTTP contract layer for migration orchestration, settings, dry-run, and mapping sync endpoints.",
        "LAYER": "Infra",
        "INVARIANT": "Migration endpoints never execute with invalid environment references and always return explicit HTTP errors on guard failures.",
        "PRE": "Backend core services initialized and Database session available.",
        "POST": "Migration tasks are enqueued or dry-run results are computed and returned.",
        "SIDE_EFFECT": "Enqueues long-running tasks, potentially mutates ResourceMapping table, and performs remote Superset API calls.",
        "DATA_CONTRACT": "[DashboardSelection | QueryParams] -> [TaskResponse | DryRunResult | MappingSummary]",
        "TEST_CONTRACT": "[DashboardSelection + configured envs] -> [task_id | dry-run result | sync summary]",
        "TEST_SCENARIO": "[valid_execution] -> [success_payload_with_required_fields]",
        "TEST_EDGE": "[external_fail] ->[HTTP_500]",
        "TEST_INVARIANT": "[EnvironmentValidationBeforeAction] -> VERIFIED_BY: [invalid_environment, valid_execution]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AppDependencies"
        },
        {
          "type": "DEPENDS_ON",
          "target": "DatabaseModule"
        },
        {
          "type": "DEPENDS_ON",
          "target": "DashboardSelection"
        },
        {
          "type": "DEPENDS_ON",
          "target": "DashboardMetadata"
        },
        {
          "type": "DEPENDS_ON",
          "target": "MigrationDryRunService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "IdMappingService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ResourceMapping"
        }
      ],
      "children": [
        {
          "name": "get_dashboards",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 43,
          "end_line": 72,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Fetch dashboard metadata from a requested environment for migration selection UI.",
            "PRE": "env_id is provided and exists in configured environments.",
            "POST": "Returns List[DashboardMetadata] for the resolved environment; emits HTTP_404 when environment is absent.",
            "SIDE_EFFECT": "Reads environment configuration and performs remote Superset metadata retrieval over network.",
            "DATA_CONTRACT": "Input[str env_id] -> Output[List[DashboardMetadata]]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "SupersetClient.get_dashboards_summary"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "execute_migration",
          "type": "Function",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 75,
          "end_line": 136,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Validate migration selection and enqueue asynchronous migration task execution.",
            "PRE": "DashboardSelection payload is valid and both source/target environments exist.",
            "POST": "Returns {\"task_id\": str, \"message\": str} when task creation succeeds; emits HTTP_400/HTTP_500 on failure.",
            "SIDE_EFFECT": "Reads configuration, writes task record through task manager, and writes operational logs.",
            "DATA_CONTRACT": "Input[DashboardSelection] -> Output[Dict[str, str]]",
            "INVARIANT": "Migration task dispatch never occurs before source and target environment ids pass guard validation."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "create_task"
            },
            {
              "type": "DEPENDS_ON",
              "target": "DashboardSelection"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.95
          }
        },
        {
          "name": "dry_run_migration",
          "type": "Function",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 139,
          "end_line": 203,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Build pre-flight migration diff and risk summary without mutating target systems.",
            "PRE": "DashboardSelection is valid, source and target environments exist, differ, and selected_ids is non-empty.",
            "POST": "Returns deterministic dry-run payload; emits HTTP_400 for guard violations and HTTP_500 for orchestrator value errors.",
            "SIDE_EFFECT": "Reads local mappings from DB and fetches source/target metadata via Superset API.",
            "DATA_CONTRACT": "Input[DashboardSelection] -> Output[Dict[str, Any]]",
            "INVARIANT": "Dry-run flow remains read-only and rejects identical source/target environments before service execution."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DashboardSelection"
            },
            {
              "type": "DEPENDS_ON",
              "target": "MigrationDryRunService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.95
          }
        },
        {
          "name": "get_migration_settings",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 206,
          "end_line": 225,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Read and return configured migration synchronization cron expression.",
            "PRE": "Configuration store is available and requester has READ permission.",
            "POST": "Returns {\"cron\": str} reflecting current persisted settings value.",
            "SIDE_EFFECT": "Reads configuration from config manager.",
            "DATA_CONTRACT": "Input[None] -> Output[Dict[str, str]]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "AppDependencies"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "update_migration_settings",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 228,
          "end_line": 257,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Validate and persist migration synchronization cron expression update.",
            "PRE": "Payload includes \"cron\" key and requester has WRITE permission.",
            "POST": "Returns {\"cron\": str, \"status\": \"updated\"} and persists updated cron value.",
            "SIDE_EFFECT": "Mutates configuration and writes persisted config through config manager.",
            "DATA_CONTRACT": "Input[Dict[str, str]] -> Output[Dict[str, str]]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "AppDependencies"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "get_resource_mappings",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 260,
          "end_line": 330,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Fetch synchronized resource mappings with optional filters and pagination for migration mappings view.",
            "PRE": "skip>=0, 1<=limit<=500, DB session is active, requester has READ permission.",
            "POST": "Returns {\"items\": [...], \"total\": int} where items reflect applied filters and pagination.",
            "SIDE_EFFECT": "Executes database read queries against ResourceMapping table.",
            "DATA_CONTRACT": "Input[QueryParams] -> Output[Dict[str, Any]]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ResourceMapping"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "trigger_sync_now",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 333,
          "end_line": 398,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Trigger immediate ID synchronization for every configured environment.",
            "PRE": "At least one environment is configured and requester has EXECUTE permission.",
            "POST": "Returns sync summary with synced/failed counts after attempting all environments.",
            "SIDE_EFFECT": "Upserts Environment rows, commits DB transaction, performs network sync calls, and writes logs.",
            "DATA_CONTRACT": "Input[None] -> Output[Dict[str, Any]]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "IdMappingService"
            },
            {
              "type": "CALLS",
              "target": "sync_environment"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 400 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8166666666666667
      }
    },
    {
      "name": "PluginsRouter",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 39,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "api, router, plugins, list",
        "PURPOSE": "Defines the FastAPI router for plugin-related endpoints, allowing clients to list available plugins.",
        "LAYER": "UI (API)"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "PluginConfig"
        },
        {
          "type": "DEPENDS_ON",
          "target": "get_plugin_loader"
        },
        {
          "type": "BINDS_TO",
          "target": "API_Routes"
        }
      ],
      "children": [
        {
          "name": "list_plugins",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Retrieve a list of all available plugins.",
            "PRE": "plugin_loader is injected via Depends.",
            "POST": "Returns a list of PluginConfig objects.",
            "RETURN": "List[PluginConfig] - List of registered plugins."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "get_plugin_loader"
            },
            {
              "type": "DEPENDS_ON",
              "target": "PluginConfig"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "CleanReleaseV2Api",
      "type": "Module",
      "complexity": 4,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 332,
      "tags": {
        "COMPLEXITY": "4",
        "PURPOSE": "Redesigned clean release API for headless candidate lifecycle.",
        "LAYER": "UI (API)",
        "PRE": "Clean release repository dependency is available for candidate lifecycle endpoints.",
        "POST": "Candidate registration, approval, publication, and revocation routes are registered without behavior changes.",
        "SIDE_EFFECT": "Persists candidate lifecycle state through clean release services and repository adapters."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "CleanReleaseRepository"
        },
        {
          "type": "CALLS",
          "target": "approve_candidate"
        },
        {
          "type": "CALLS",
          "target": "publish_candidate"
        }
      ],
      "children": [
        {
          "name": "ApprovalRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 43,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Schema for approval request payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "PublishRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 53,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Schema for publication request payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RevokeRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 63,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Schema for revocation request payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "register_candidate",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 66,
          "end_line": 100,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Register a new release candidate.",
            "PRE": "Payload contains required fields (id, version, source_snapshot_ref, created_by).",
            "POST": "Candidate is saved in repository.",
            "RETURN": "CandidateDTO"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "CleanReleaseRepository.save_candidate"
            },
            {
              "type": "DEPENDS_ON",
              "target": "CandidateDTO"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "import_artifacts",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 103,
          "end_line": 134,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Associate artifacts with a release candidate.",
            "PRE": "Candidate exists.",
            "POST": "Artifacts are processed (placeholder)."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "CleanReleaseRepository.get_candidate"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "build_manifest",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 137,
          "end_line": 184,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Generate distribution manifest for a candidate.",
            "PRE": "Candidate exists.",
            "POST": "Manifest is created and saved.",
            "RETURN": "ManifestDTO"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "CleanReleaseRepository.save_manifest"
            },
            {
              "type": "CALLS",
              "target": "CleanReleaseRepository.get_candidate"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "approve_candidate_endpoint",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 187,
          "end_line": 213,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Endpoint to record candidate approval."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "approve_candidate"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "reject_candidate_endpoint",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 216,
          "end_line": 242,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Endpoint to record candidate rejection."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "reject_candidate"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "publish_candidate_endpoint",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 245,
          "end_line": 287,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Endpoint to publish an approved candidate."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "publish_candidate"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "revoke_publication_endpoint",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 290,
          "end_line": 330,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Endpoint to revoke a previous publication."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "revoke_publication"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 4)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 332 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.2642857142857143
      }
    },
    {
      "name": "MappingsApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 130,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "api, mappings, database, fuzzy-matching",
        "PURPOSE": "API endpoints for managing database mappings and getting suggestions.",
        "LAYER": "API",
        "INVARIANT": "Mappings are persisted in the SQLite database."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.dependencies"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.database"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.mapping_service"
        }
      ],
      "children": [
        {
          "name": "MappingCreate",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 35,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MappingResponse",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 50,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SuggestRequest",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 56,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_mappings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 76,
          "tags": {
            "PURPOSE": "List all saved database mappings.",
            "PRE": "db session is injected.",
            "POST": "Returns filtered list of DatabaseMapping records."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_mapping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Create or update a database mapping.",
            "PRE": "mapping is valid MappingCreate, db session is injected.",
            "POST": "DatabaseMapping created or updated in database."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "suggest_mappings_api",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Get suggested mappings based on fuzzy matching.",
            "PRE": "request is valid SuggestRequest, config_manager is injected.",
            "POST": "Returns mapping suggestions."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "SettingsRouter",
      "type": "Module",
      "complexity": 4,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 622,
      "tags": {
        "COMPLEXITY": "4",
        "SEMANTICS": "settings, api, router, fastapi",
        "PURPOSE": "Provides API endpoints for managing application settings and Superset environments.",
        "LAYER": "UI (API)",
        "INVARIANT": "All settings changes must be persisted via ConfigManager.",
        "PUBLIC_API": "router"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "ConfigManager"
        },
        {
          "type": "DEPENDS_ON",
          "target": "get_config_manager:Function"
        },
        {
          "type": "DEPENDS_ON",
          "target": "has_permission:Function"
        }
      ],
      "children": [
        {
          "name": "LoggingConfigResponse",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 47,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Response model for logging configuration with current task log level.",
            "SEMANTICS": "logging, config, response"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_normalize_superset_env_url",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 64,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Canonicalize Superset environment URL to base host/path without trailing /api/v1.",
            "PRE": "raw_url can be empty.",
            "POST": "Returns normalized base URL."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_validate_superset_connection_fast",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 86,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Run lightweight Superset connectivity validation without full pagination scan.",
            "PRE": "env contains valid URL and credentials.",
            "POST": "Raises on auth/API failures; returns None on success."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_settings",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 111,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Retrieves all application settings.",
            "PRE": "Config manager is available.",
            "POST": "Returns masked AppConfig.",
            "RETURN": "AppConfig - The current configuration."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update_global_settings",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 134,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Updates global application settings.",
            "PRE": "New settings are provided.",
            "POST": "Global settings are updated.",
            "PARAM": "settings (GlobalSettings) - The new global settings.",
            "RETURN": "GlobalSettings - The updated settings."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_storage_settings",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 150,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Retrieves storage-specific settings.",
            "RETURN": "StorageConfig - The storage configuration."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update_storage_settings",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 153,
          "end_line": 176,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Updates storage-specific settings.",
            "PARAM": "storage (StorageConfig) - The new storage settings.",
            "POST": "Storage settings are updated and saved.",
            "RETURN": "StorageConfig - The updated storage settings."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_environments",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 199,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Lists all configured Superset environments.",
            "PRE": "Config manager is available.",
            "POST": "Returns list of environments.",
            "RETURN": "List[Environment] - List of environments."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "add_environment",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 202,
          "end_line": 234,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Adds a new Superset environment.",
            "PRE": "Environment data is valid and reachable.",
            "POST": "Environment is added to config.",
            "PARAM": "env (Environment) - The environment to add.",
            "RETURN": "Environment - The added environment."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update_environment",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 237,
          "end_line": 281,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Updates an existing Superset environment.",
            "PRE": "ID and valid environment data are provided.",
            "POST": "Environment is updated in config.",
            "PARAM": "env (Environment) - The updated environment data.",
            "RETURN": "Environment - The updated environment."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delete_environment",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 284,
          "end_line": 300,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Deletes a Superset environment.",
            "PRE": "ID is provided.",
            "POST": "Environment is removed from config.",
            "PARAM": "id (str) - The ID of the environment to delete."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_environment_connection",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 303,
          "end_line": 336,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Tests the connection to a Superset environment.",
            "PRE": "ID is provided.",
            "POST": "Returns success or error status.",
            "PARAM": "id (str) - The ID of the environment to test.",
            "RETURN": "dict - Success message or error."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_logging_config",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 339,
          "end_line": 359,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Retrieves current logging configuration.",
            "PRE": "Config manager is available.",
            "POST": "Returns logging configuration.",
            "RETURN": "LoggingConfigResponse - The current logging config."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update_logging_config",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 362,
          "end_line": 392,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Updates logging configuration.",
            "PRE": "New logging config is provided.",
            "POST": "Logging configuration is updated and saved.",
            "PARAM": "config (LoggingConfig) - The new logging configuration.",
            "RETURN": "LoggingConfigResponse - The updated logging config."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ConsolidatedSettingsResponse",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 395,
          "end_line": 408,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Response model for consolidated application settings."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_consolidated_settings",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 411,
          "end_line": 479,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Retrieves all settings categories in a single call",
            "PRE": "Config manager is available.",
            "POST": "Returns all consolidated settings.",
            "RETURN": "ConsolidatedSettingsResponse - All settings categories."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ConfigManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LLMProviderService"
            },
            {
              "type": "DEPENDS_ON",
              "target": "AppConfigRecord"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SessionLocal"
            },
            {
              "type": "DEPENDS_ON",
              "target": "has_permission:Function"
            },
            {
              "type": "DEPENDS_ON",
              "target": "normalize_llm_settings:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 411
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 411
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "update_consolidated_settings",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 482,
          "end_line": 530,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Bulk update application settings from the consolidated view.",
            "PRE": "User has admin permissions, config is valid.",
            "POST": "Settings are updated and saved via ConfigManager."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_validation_policies",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 533,
          "end_line": 545,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Lists all validation policies.",
            "RETURN": "List[ValidationPolicyResponse] - List of policies."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_validation_policy",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 548,
          "end_line": 567,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Creates a new validation policy.",
            "PARAM": "policy (ValidationPolicyCreate) - The policy data.",
            "RETURN": "ValidationPolicyResponse - The created policy."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update_validation_policy",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 570,
          "end_line": 597,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Updates an existing validation policy.",
            "PARAM": "policy (ValidationPolicyUpdate) - The updated policy data.",
            "RETURN": "ValidationPolicyResponse - The updated policy."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delete_validation_policy",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 600,
          "end_line": 620,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Deletes a validation policy.",
            "PARAM": "id (str) - The ID of the policy to delete."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 622 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "AdminApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 403,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "api, admin, users, roles, permissions",
        "PURPOSE": "Admin API endpoints for user and role management.",
        "LAYER": "API",
        "INVARIANT": "All endpoints in this module require 'Admin' role or 'admin' scope."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AuthRepository:Class"
        },
        {
          "type": "DEPENDS_ON",
          "target": "get_auth_db:Function"
        },
        {
          "type": "DEPENDS_ON",
          "target": "has_permission:Function"
        }
      ],
      "children": [
        {
          "name": "router",
          "type": "Variable",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 44,
          "tags": {
            "PURPOSE": "APIRouter instance for admin routes."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "fastapi.APIRouter"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_users",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 47,
          "end_line": 64,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Lists all registered users.",
            "PRE": "Current user has 'Admin' role.",
            "POST": "Returns a list of UserSchema objects.",
            "PARAM": "db (Session) - Auth database session.",
            "RETURN": "List[UserSchema] - List of users."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "User"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "create_user",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 67,
          "end_line": 106,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Creates a new local user.",
            "PRE": "Current user has 'Admin' role.",
            "POST": "New user is created in the database.",
            "PARAM": "db (Session) - Auth database session.",
            "RETURN": "UserSchema - The created user."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "AuthRepository:Class"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "update_user",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 109,
          "end_line": 151,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Updates an existing user.",
            "PRE": "Current user has 'Admin' role.",
            "POST": "User record is updated in the database.",
            "PARAM": "db (Session) - Auth database session.",
            "RETURN": "UserSchema - The updated user profile."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "AuthRepository"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "delete_user",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 154,
          "end_line": 192,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Deletes a user.",
            "PRE": "Current user has 'Admin' role.",
            "POST": "User record is removed from the database.",
            "PARAM": "db (Session) - Auth database session.",
            "RETURN": "None"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "AuthRepository"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "list_roles",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 195,
          "end_line": 208,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Lists all available roles.",
            "RETURN": "List[RoleSchema] - List of roles."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "Role:Class"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "create_role",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 211,
          "end_line": 249,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Creates a new system role with associated permissions.",
            "PRE": "Role name must be unique.",
            "POST": "New Role record is created in auth.db.",
            "PARAM": "db (Session) - Auth database session.",
            "RETURN": "RoleSchema - The created role.",
            "SIDE_EFFECT": "Commits new role and associations to auth.db."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "get_permission_by_id:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "update_role",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 252,
          "end_line": 297,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Updates an existing role's metadata and permissions.",
            "PRE": "role_id must be a valid existing role UUID.",
            "POST": "Role record is updated in auth.db.",
            "PARAM": "db (Session) - Auth database session.",
            "RETURN": "RoleSchema - The updated role.",
            "SIDE_EFFECT": "Commits updates to auth.db."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "get_role_by_id:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "delete_role",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 300,
          "end_line": 327,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Removes a role from the system.",
            "PRE": "role_id must be a valid existing role UUID.",
            "POST": "Role record is removed from auth.db.",
            "PARAM": "db (Session) - Auth database session.",
            "RETURN": "None",
            "SIDE_EFFECT": "Deletes record from auth.db and commits."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "get_role_by_id:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "list_permissions",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 330,
          "end_line": 360,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Lists all available system permissions for assignment.",
            "POST": "Returns a list of all PermissionSchema objects.",
            "PARAM": "db (Session) - Auth database session.",
            "RETURN": "List[PermissionSchema] - List of permissions."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "backend.src.core.auth.repository.AuthRepository.list_permissions"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "list_ad_mappings",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 363,
          "end_line": 376,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Lists all AD Group to Role mappings."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "ADGroupMapping"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "create_ad_mapping",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 379,
          "end_line": 401,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Creates a new AD Group mapping."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ADGroupMapping:Class"
            },
            {
              "type": "DEPENDS_ON",
              "target": "get_auth_db:Function"
            },
            {
              "type": "DEPENDS_ON",
              "target": "has_permission:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 403 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "GitSchemas",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 293,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "git, schemas, pydantic, api, contracts",
        "PURPOSE": "Defines Pydantic models for the Git integration API layer.",
        "LAYER": "API",
        "INVARIANT": "All schemas must be compatible with the FastAPI router."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.git"
        }
      ],
      "children": [
        {
          "name": "GitServerConfigBase",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 27,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Base schema for Git server configuration attributes."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "GitServerConfigUpdate",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Schema for updating an existing Git server configuration."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "GitServerConfigCreate",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Schema for creating a new Git server configuration."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "GitServerConfigSchema",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Schema for representing a Git server configuration with metadata."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "GitRepositorySchema",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Schema for tracking a local Git repository linked to a dashboard."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "BranchSchema",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Schema for representing a Git branch metadata."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CommitSchema",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Schema for representing Git commit details."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "BranchCreate",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Schema for branch creation requests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "BranchCheckout",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 110,
          "tags": {
            "PURPOSE": "Schema for branch checkout requests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CommitCreate",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Schema for staging and committing changes."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ConflictResolution",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 127,
          "tags": {
            "PURPOSE": "Schema for resolving merge conflicts."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MergeStatusSchema",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Schema representing unfinished merge status for repository."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MergeConflictFileSchema",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 143,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Schema describing one conflicted file with optional side snapshots."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MergeResolveRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 152,
          "end_line": 156,
          "tags": {
            "PURPOSE": "Request schema for resolving one or multiple merge conflicts."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MergeContinueRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Request schema for finishing merge with optional explicit commit message."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DeploymentEnvironmentSchema",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 176,
          "tags": {
            "PURPOSE": "Schema for representing a target deployment environment."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DeployRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 183,
          "tags": {
            "PURPOSE": "Schema for dashboard deployment requests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RepoInitRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 185,
          "end_line": 191,
          "tags": {
            "PURPOSE": "Schema for repository initialization requests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RepositoryBindingSchema",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 194,
          "end_line": 202,
          "tags": {
            "PURPOSE": "Schema describing repository-to-config binding and provider metadata."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RepoStatusBatchRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 204,
          "end_line": 208,
          "tags": {
            "PURPOSE": "Schema for requesting repository statuses for multiple dashboards in a single call."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RepoStatusBatchResponse",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 211,
          "end_line": 215,
          "tags": {
            "PURPOSE": "Schema for returning repository statuses keyed by dashboard ID."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "GiteaRepoSchema",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 218,
          "end_line": 228,
          "tags": {
            "PURPOSE": "Schema describing a Gitea repository."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "GiteaRepoCreateRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 231,
          "end_line": 239,
          "tags": {
            "PURPOSE": "Request schema for creating a Gitea repository."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RemoteRepoSchema",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 242,
          "end_line": 253,
          "tags": {
            "PURPOSE": "Provider-agnostic remote repository payload."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RemoteRepoCreateRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 256,
          "end_line": 264,
          "tags": {
            "PURPOSE": "Provider-agnostic repository creation request."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "PromoteRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 267,
          "end_line": 278,
          "tags": {
            "PURPOSE": "Request schema for branch promotion workflow."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "PromoteResponse",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 281,
          "end_line": 291,
          "tags": {
            "PURPOSE": "Response schema for promotion operation result."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AssistantApi",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 3396,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "api, assistant, chat, command, confirmation",
        "PURPOSE": "API routes for LLM assistant command parsing and safe execution orchestration.",
        "LAYER": "API",
        "INVARIANT": "Risky operations are never executed without valid confirmation token."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TaskManager"
        },
        {
          "type": "DEPENDS_ON",
          "target": "AssistantMessageRecord"
        },
        {
          "type": "DEPENDS_ON",
          "target": "AssistantConfirmationRecord"
        },
        {
          "type": "DEPENDS_ON",
          "target": "AssistantAuditRecord"
        }
      ],
      "children": [
        {
          "name": "AssistantMessageRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 90,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Input payload for assistant message endpoint.",
            "DATA_CONTRACT": "Input[conversation_id?:str, message:str(1..4000)] -> Output[AssistantMessageRequest]",
            "SIDE_EFFECT": "None (schema declaration only).",
            "PRE": "message length is within accepted bounds.",
            "POST": "Request object provides message text and optional conversation binding.",
            "INVARIANT": "message is always non-empty and no longer than 4000 characters."
          },
          "relations": [
            {
              "type": "USED_BY",
              "target": "send_message"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 75
              },
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 75
              }
            ],
            "score": 0.7
          }
        },
        {
          "name": "AssistantAction",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 108,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "UI action descriptor returned with assistant responses.",
            "DATA_CONTRACT": "Input[type:str, label:str, target?:str] -> Output[AssistantAction]",
            "SIDE_EFFECT": "None (schema declaration only).",
            "PRE": "type and label are provided by orchestration logic.",
            "POST": "Action can be rendered as button on frontend.",
            "INVARIANT": "type and label are required for every UI action."
          },
          "relations": [
            {
              "type": "USED_BY",
              "target": "AssistantMessageResponse"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 93
              },
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 93
              }
            ],
            "score": 0.7
          }
        },
        {
          "name": "AssistantMessageResponse",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 134,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Output payload contract for assistant interaction endpoints.",
            "DATA_CONTRACT": "Input[conversation_id,response_id,state,text,intent?,confirmation_id?,task_id?,actions[],created_at] -> Output[AssistantMessageResponse]",
            "SIDE_EFFECT": "None (schema declaration only).",
            "PRE": "Response includes deterministic state and text.",
            "POST": "Payload may include task_id/confirmation_id/actions for UI follow-up.",
            "INVARIANT": "created_at and state are always present in endpoint responses."
          },
          "relations": [
            {
              "type": "RETURNED_BY",
              "target": "send_message"
            },
            {
              "type": "RETURNED_BY",
              "target": "confirm_operation"
            },
            {
              "type": "RETURNED_BY",
              "target": "cancel_operation"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: RETURNED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 111
              },
              {
                "message": "Invalid @RELATION predicate: RETURNED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 111
              },
              {
                "message": "Invalid @RELATION predicate: RETURNED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 111
              },
              {
                "message": "Invalid @RELATION predicate: RETURNED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 111
              },
              {
                "message": "Invalid @RELATION predicate: RETURNED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 111
              },
              {
                "message": "Invalid @RELATION predicate: RETURNED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 111
              }
            ],
            "score": 0.10000000000000009
          }
        },
        {
          "name": "ConfirmationRecord",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 159,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "In-memory confirmation token model for risky operation dispatch.",
            "DATA_CONTRACT": "Input[id,user_id,conversation_id,intent,dispatch,expires_at,state?,created_at] -> Output[ConfirmationRecord]",
            "SIDE_EFFECT": "None (schema declaration only).",
            "PRE": "intent/dispatch/user_id are populated at confirmation request time.",
            "POST": "Record tracks lifecycle state and expiry timestamp.",
            "INVARIANT": "state defaults to \"pending\" and expires_at bounds confirmation validity."
          },
          "relations": [
            {
              "type": "USED_BY",
              "target": "send_message"
            },
            {
              "type": "USED_BY",
              "target": "confirm_operation"
            },
            {
              "type": "USED_BY",
              "target": "cancel_operation"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 137
              },
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 137
              },
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 137
              },
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 137
              },
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 137
              },
              {
                "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 137
              }
            ],
            "score": 0.10000000000000009
          }
        },
        {
          "name": "_append_history",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 189,
          "end_line": 224,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Append conversation message to in-memory history buffer.",
            "DATA_CONTRACT": "Input[user_id,conversation_id,role,text,state?,task_id?,confirmation_id?] -> Output[None]",
            "SIDE_EFFECT": "Mutates in-memory CONVERSATIONS store for user conversation history.",
            "PRE": "user_id and conversation_id identify target conversation bucket.",
            "POST": "Message entry is appended to CONVERSATIONS key list.",
            "INVARIANT": "every appended entry includes generated message_id and created_at timestamp."
          },
          "relations": [
            {
              "type": "UPDATES",
              "target": "CONVERSATIONS"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: UPDATES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 189
              },
              {
                "message": "Invalid @RELATION predicate: UPDATES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 189
              }
            ],
            "score": 0.7
          }
        },
        {
          "name": "_persist_message",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 227,
          "end_line": 266,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Persist assistant/user message record to database.",
            "DATA_CONTRACT": "Input[Session,user_id,conversation_id,role,text,state?,task_id?,confirmation_id?,metadata?] -> Output[None]",
            "SIDE_EFFECT": "Writes AssistantMessageRecord rows and commits or rollbacks the DB session.",
            "PRE": "db session is writable and message payload is serializable.",
            "POST": "Message row is committed or persistence failure is logged.",
            "INVARIANT": "failed persistence attempts always rollback before returning."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "AssistantMessageRecord"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_audit",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 269,
          "end_line": 287,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Append in-memory audit record for assistant decision trace.",
            "DATA_CONTRACT": "Input[user_id,payload:Dict[str,Any]] -> Output[None]",
            "SIDE_EFFECT": "Mutates in-memory ASSISTANT_AUDIT store and emits structured log event.",
            "PRE": "payload describes decision/outcome fields.",
            "POST": "ASSISTANT_AUDIT list for user contains new timestamped entry.",
            "INVARIANT": "persisted in-memory audit entry always contains created_at in ISO format."
          },
          "relations": [
            {
              "type": "UPDATES",
              "target": "ASSISTANT_AUDIT"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: UPDATES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 269
              },
              {
                "message": "Invalid @RELATION predicate: UPDATES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 269
              }
            ],
            "score": 0.7
          }
        },
        {
          "name": "_persist_audit",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 290,
          "end_line": 315,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Persist structured assistant audit payload in database.",
            "PRE": "db session is writable and payload is JSON-serializable.",
            "POST": "Audit row is committed or failure is logged with rollback."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_persist_confirmation",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 318,
          "end_line": 343,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Persist confirmation token record to database.",
            "PRE": "record contains id/user/intent/dispatch/expiry fields.",
            "POST": "Confirmation row exists in persistent storage."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_update_confirmation_state",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 346,
          "end_line": 369,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Update persistent confirmation token lifecycle state.",
            "PRE": "confirmation_id references existing row.",
            "POST": "State and consumed_at fields are updated when applicable."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_load_confirmation_from_db",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 372,
          "end_line": 399,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Load confirmation token from database into in-memory model.",
            "PRE": "confirmation_id may or may not exist in storage.",
            "POST": "Returns ConfirmationRecord when found, otherwise None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_ensure_conversation",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 402,
          "end_line": 421,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve active conversation id in memory or create a new one.",
            "PRE": "user_id identifies current actor.",
            "POST": "Returns stable conversation id and updates USER_ACTIVE_CONVERSATION."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_or_create_conversation",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 424,
          "end_line": 455,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve active conversation using explicit id, memory cache, or persisted history.",
            "PRE": "user_id and db session are available.",
            "POST": "Returns conversation id and updates USER_ACTIVE_CONVERSATION cache."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_cleanup_history_ttl",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 458,
          "end_line": 497,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Enforce assistant message retention window by deleting expired rows and in-memory records.",
            "PRE": "db session is available and user_id references current actor scope.",
            "POST": "Messages older than ASSISTANT_MESSAGE_TTL_DAYS are removed from persistence and memory mirrors."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_is_conversation_archived",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 500,
          "end_line": 512,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Determine archived state for a conversation based on last update timestamp.",
            "PRE": "updated_at can be null for empty conversations.",
            "POST": "Returns True when conversation inactivity exceeds archive threshold."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_coerce_query_bool",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 515,
          "end_line": 528,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Normalize bool-like query values for compatibility in direct handler invocations/tests.",
            "PRE": "value may be bool, string, or FastAPI Query metadata object.",
            "POST": "Returns deterministic boolean flag."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_id",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 531,
          "end_line": 544,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Extract first regex match group from text by ordered pattern list.",
            "PRE": "patterns contain at least one capture group.",
            "POST": "Returns first matched token or None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_env_id",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 547,
          "end_line": 566,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve environment identifier/name token to canonical environment id.",
            "PRE": "config_manager provides environment list.",
            "POST": "Returns matched environment id or None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_is_production_env",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 569,
          "end_line": 586,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Determine whether environment token resolves to production-like target.",
            "PRE": "config_manager provides environments or token text is provided.",
            "POST": "Returns True for production/prod synonyms, else False."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_provider_id",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 589,
          "end_line": 624,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve provider token to provider id with active/default fallback.",
            "PRE": "db session can load provider list through LLMProviderService.",
            "POST": "Returns provider id or None when no providers configured."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_default_environment_id",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 627,
          "end_line": 650,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve default environment id from settings or first configured environment.",
            "PRE": "config_manager returns environments list.",
            "POST": "Returns default environment id or None when environment list is empty."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_dashboard_id_by_ref",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 653,
          "end_line": 704,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve dashboard id by title or slug reference in selected environment.",
            "PRE": "dashboard_ref is a non-empty string-like token.",
            "POST": "Returns dashboard id when uniquely matched, otherwise None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_dashboard_id_entity",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 707,
          "end_line": 747,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve dashboard id from intent entities using numeric id or dashboard_ref fallback.",
            "PRE": "entities may contain dashboard_id as int/str and optional dashboard_ref.",
            "POST": "Returns resolved dashboard id or None when ambiguous/unresolvable."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_environment_name_by_id",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 750,
          "end_line": 766,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve human-readable environment name by id.",
            "PRE": "environment id may be None.",
            "POST": "Returns matching environment name or fallback id."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_result_deep_links",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 769,
          "end_line": 839,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Build deep-link actions to verify task result from assistant chat.",
            "PRE": "task object is available.",
            "POST": "Returns zero or more assistant actions for dashboard open/diff."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_build_task_observability_summary",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 842,
          "end_line": 907,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Build compact textual summary for completed tasks to reduce \"black box\" effect.",
            "PRE": "task may contain plugin-specific result payload.",
            "POST": "Returns non-empty summary line for known task types or empty string fallback."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_parse_command",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 910,
          "end_line": 1117,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Deterministically parse RU/EN command text into intent payload.",
            "DATA_CONTRACT": "Input[message:str, config_manager:ConfigManager] -> Output[Dict[str,Any]{domain,operation,entities,confidence,risk_level,requires_confirmation}]",
            "SIDE_EFFECT": "None (pure parsing logic).",
            "PRE": "message contains raw user text and config manager resolves environments.",
            "POST": "Returns intent dict with domain/operation/entities/confidence/risk fields.",
            "INVARIANT": "every return path includes domain, operation, entities, confidence, risk_level, requires_confirmation."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "_extract_id"
            },
            {
              "type": "DEPENDS_ON",
              "target": "_is_production_env"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 910
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 910
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_check_any_permission",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1120,
          "end_line": 1141,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Validate user against alternative permission checks (logical OR).",
            "PRE": "checks list contains resource-action tuples.",
            "POST": "Returns on first successful permission; raises 403-like HTTPException otherwise."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_has_any_permission",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1144,
          "end_line": 1157,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Check whether user has at least one permission tuple from the provided list.",
            "PRE": "current_user and checks list are valid.",
            "POST": "Returns True when at least one permission check passes."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_build_tool_catalog",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1160,
          "end_line": 1359,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Build current-user tool catalog for LLM planner with operation contracts and defaults.",
            "PRE": "current_user is authenticated; config/db are available.",
            "POST": "Returns list of executable tools filtered by permission and runtime availability."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1160
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1160
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "_coerce_intent_entities",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1362,
          "end_line": 1382,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Normalize intent entity value types from LLM output to route-compatible values.",
            "PRE": "intent contains entities dict or missing entities.",
            "POST": "Returned intent has numeric ids coerced where possible and string values stripped."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_serialize_dataset_review_context",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1400,
          "end_line": 1504,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Build assistant-safe dataset-review context snapshot with masked imported-filter payloads for session-scoped assistant routing."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSession"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1400
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1400
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1400
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1400
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1400
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1400
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1400
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1400
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_load_dataset_review_context",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1507,
          "end_line": 1525,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Load owner-scoped dataset-review context for assistant planning and grounded response generation."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSessionRepository"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1507
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1507
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1507
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1507
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1507
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1507
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1507
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1507
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_extract_dataset_review_target",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1528,
          "end_line": 1542,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Extract structured dataset-review focus target hints embedded in assistant prompts."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_match_dataset_review_field",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1545,
          "end_line": 1573,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve one semantic field from assistant-visible context by id or user-visible label."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_quoted_segment",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1576,
          "end_line": 1585,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Extract one quoted assistant command segment after a label token."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_dataset_review_conflict_http_exception",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1588,
          "end_line": 1606,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Convert dataset-review optimistic-lock conflicts into shared 409 assistant semantics."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_plan_dataset_review_intent",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1609,
          "end_line": 1760,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Parse session-scoped dataset-review assistant commands before falling back to generic assistant tool routing."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1609
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1609
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "_dispatch_dataset_review_intent",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1763,
          "end_line": 1981,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Route confirmed dataset-review assistant intents through existing backend dataset-review APIs and orchestration boundaries."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1763
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1763
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1763
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1763
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1763
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1763
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1763
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1763
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_confirmation_summary",
          "type": "Function",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 1984,
          "end_line": 2124,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Build human-readable confirmation prompt for an intent before execution.",
            "PRE": "intent contains operation and entities fields.",
            "POST": "Returns descriptive Russian-language text ending with confirmation prompt."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1984
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1984
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1984
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1984
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1984
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                "severity": "ERROR",
                "line_number": 1984
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "_clarification_text_for_intent",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 2127,
          "end_line": 2152,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Convert technical missing-parameter errors into user-facing clarification prompts.",
            "PRE": "state was classified as needs_clarification for current intent/error combination.",
            "POST": "Returned text is human-readable and actionable for target operation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_plan_intent_with_llm",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 2155,
          "end_line": 2274,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Use active LLM provider to select best tool/operation from dynamic catalog.",
            "PRE": "tools list contains allowed operations for current user.",
            "POST": "Returns normalized intent dict when planning succeeds; otherwise None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_authorize_intent",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 2277,
          "end_line": 2288,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Validate user permissions for parsed intent before confirmation/dispatch.",
            "PRE": "intent.operation is present for known assistant command domains.",
            "POST": "Returns if authorized; raises HTTPException(403) when denied."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_dispatch_intent",
          "type": "Function",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 2291,
          "end_line": 2701,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Execute parsed assistant intent via existing task/plugin/git services.",
            "DATA_CONTRACT": "Input[intent,current_user,task_manager,config_manager,db] -> Output[Tuple[text:str,task_id:Optional[str],actions:List[AssistantAction]]]",
            "SIDE_EFFECT": "May enqueue tasks, invoke git operations, and query/update external service state.",
            "PRE": "intent operation is known and actor permissions are validated per operation.",
            "POST": "Returns response text, optional task id, and UI actions for follow-up.",
            "INVARIANT": "unsupported operations are rejected via HTTPException(400)."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "_check_any_permission"
            },
            {
              "type": "DEPENDS_ON",
              "target": "_resolve_dashboard_id_entity"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "GitService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 2291
              },
              {
                "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 2291
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "send_message",
          "type": "Function",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 2705,
          "end_line": 2967,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Parse assistant command, enforce safety gates, and dispatch executable intent.",
            "DATA_CONTRACT": "Input[AssistantMessageRequest,User,TaskManager,ConfigManager,Session] -> Output[AssistantMessageResponse]",
            "SIDE_EFFECT": "Persists chat/audit state, mutates in-memory conversation and confirmation stores, and may create confirmation records.",
            "PRE": "Authenticated user is available and message text is non-empty.",
            "POST": "Response state is one of clarification/confirmation/started/success/denied/failed.",
            "RETURN": "AssistantMessageResponse with operation feedback and optional actions.",
            "INVARIANT": "non-safe operations are gated with confirmation before execution from this endpoint."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "_plan_intent_with_llm"
            },
            {
              "type": "DEPENDS_ON",
              "target": "_parse_command"
            },
            {
              "type": "DEPENDS_ON",
              "target": "_dispatch_intent"
            },
            {
              "type": "DEPENDS_ON",
              "target": "_append_history"
            },
            {
              "type": "DEPENDS_ON",
              "target": "_persist_message"
            },
            {
              "type": "DEPENDS_ON",
              "target": "_audit"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.95
          }
        },
        {
          "name": "confirm_operation",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 2973,
          "end_line": 3056,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Execute previously requested risky operation after explicit user confirmation.",
            "PRE": "confirmation_id exists, belongs to current user, is pending, and not expired.",
            "POST": "Confirmation state becomes consumed and operation result is persisted in history.",
            "RETURN": "AssistantMessageResponse with task details when async execution starts."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "cancel_operation",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 3062,
          "end_line": 3133,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Cancel pending risky operation and mark confirmation token as cancelled.",
            "PRE": "confirmation_id exists, belongs to current user, and is still pending.",
            "POST": "Confirmation becomes cancelled and cannot be executed anymore.",
            "RETURN": "AssistantMessageResponse confirming cancellation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_conversations",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 3136,
          "end_line": 3231,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Return paginated conversation list for current user with archived flag and last message preview.",
            "PRE": "Authenticated user context and valid pagination params.",
            "POST": "Conversations are grouped by conversation_id sorted by latest activity descending.",
            "RETURN": "Dict with items, paging metadata, and archive segmentation counts."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delete_conversation",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 3234,
          "end_line": 3277,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Soft-delete or hard-delete a conversation and clear its in-memory trace.",
            "PRE": "conversation_id belongs to current_user.",
            "POST": "Conversation records are removed from DB and CONVERSATIONS cache."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_history",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3281,
          "end_line": 3349,
          "tags": {
            "PURPOSE": "Retrieve paginated assistant conversation history for current user.",
            "PRE": "Authenticated user is available and page params are valid.",
            "POST": "Returns persistent messages and mirrored in-memory snapshot for diagnostics.",
            "RETURN": "Dict with items, paging metadata, and resolved conversation_id."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_assistant_audit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 3353,
          "end_line": 3394,
          "tags": {
            "PURPOSE": "Return assistant audit decisions for current user from persistent and in-memory stores.",
            "PRE": "User has tasks:READ permission.",
            "POST": "Audit payload is returned in reverse chronological order from DB.",
            "RETURN": "Dict with persistent and memory audit slices."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_async_confirmation_summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1989,
          "end_line": 1989,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_label",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 2007,
          "end_line": 2007,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 3396 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "storage_routes",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 194,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "storage, files, upload, download, backup, repository",
        "PURPOSE": "API endpoints for file storage management (backups and repositories).",
        "LAYER": "API",
        "INVARIANT": "All paths must be validated against path traversal."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.storage"
        }
      ],
      "children": [
        {
          "name": "list_files",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 24,
          "end_line": 49,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "List all files and directories in the storage system.",
            "PRE": "None.",
            "POST": "Returns a list of StoredFile objects.",
            "PARAM": "path (Optional[str]) - Subpath within the category.",
            "RETURN": "List[StoredFile] - List of files/directories."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "backend.src.plugins.storage.plugin.StoragePlugin.list_files"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "upload_file",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 51,
          "end_line": 83,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Upload a file to the storage system.",
            "PRE": "file must be a valid UploadFile.",
            "POST": "Returns the StoredFile object of the uploaded file.",
            "PARAM": "file (UploadFile) - The file content.",
            "RETURN": "StoredFile - Metadata of the uploaded file.",
            "SIDE_EFFECT": "Writes file to the filesystem."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "backend.src.plugins.storage.plugin.StoragePlugin.save_file"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "delete_file",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 85,
          "end_line": 116,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Delete a specific file or directory.",
            "PRE": "category must be a valid FileCategory.",
            "POST": "Item is removed from storage.",
            "PARAM": "path (str) - Relative path of the item.",
            "RETURN": "None",
            "SIDE_EFFECT": "Deletes item from the filesystem."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "backend.src.plugins.storage.plugin.StoragePlugin.delete_file"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "download_file",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 118,
          "end_line": 149,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Retrieve a file for download.",
            "PRE": "category must be a valid FileCategory.",
            "POST": "Returns a FileResponse.",
            "PARAM": "path (str) - Relative path of the file.",
            "RETURN": "FileResponse - The file content."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "backend.src.plugins.storage.plugin.StoragePlugin.get_file_path"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "get_file_by_path",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 151,
          "end_line": 192,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Retrieve a file by validated absolute/relative path under storage root.",
            "PRE": "path must resolve under configured storage root.",
            "POST": "Returns a FileResponse for existing files.",
            "PARAM": "path (str) - Absolute or storage-root-relative file path.",
            "RETURN": "FileResponse - The file content."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "backend.src.plugins.storage.plugin.StoragePlugin.get_storage_root"
            },
            {
              "type": "CALLS",
              "target": "backend.src.plugins.storage.plugin.StoragePlugin.validate_path"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "backend.src.api.routes.clean_release",
      "type": "Module",
      "complexity": 4,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 636,
      "tags": {
        "COMPLEXITY": "4",
        "SEMANTICS": "api, clean-release, candidate-preparation, compliance",
        "PURPOSE": "Expose clean release endpoints for candidate preparation and subsequent compliance flow.",
        "LAYER": "API",
        "INVARIANT": "API never reports prepared status if preparation errors are present."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.dependencies.get_clean_release_repository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.preparation_service"
        }
      ],
      "children": [
        {
          "name": "PrepareCandidateRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Request schema for candidate preparation endpoint."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "StartCheckRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Request schema for clean compliance check run startup."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RegisterCandidateRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Request schema for candidate registration endpoint."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ImportArtifactsRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Request schema for candidate artifact import endpoint."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "BuildManifestRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Request schema for manifest build endpoint."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CreateComplianceRunRequest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 116,
          "tags": {
            "PURPOSE": "Request schema for compliance run creation with optional manifest pinning."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "register_candidate_v2_endpoint",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 119,
          "end_line": 157,
          "tags": {
            "PURPOSE": "Register a clean-release candidate for headless lifecycle.",
            "PRE": "Candidate identifier is unique.",
            "POST": "Candidate is persisted in DRAFT status."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "import_candidate_artifacts_v2_endpoint",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 215,
          "tags": {
            "PURPOSE": "Import candidate artifacts in headless flow.",
            "PRE": "Candidate exists and artifacts array is non-empty.",
            "POST": "Artifacts are persisted and candidate advances to PREPARED if it was DRAFT."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_candidate_manifest_v2_endpoint",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 218,
          "end_line": 259,
          "tags": {
            "PURPOSE": "Build immutable manifest snapshot for prepared candidate.",
            "PRE": "Candidate exists and has imported artifacts.",
            "POST": "Returns created ManifestDTO with incremented version."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_candidate_overview_v2_endpoint",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 262,
          "end_line": 375,
          "tags": {
            "PURPOSE": "Return expanded candidate overview DTO for headless lifecycle visibility.",
            "PRE": "Candidate exists.",
            "POST": "Returns CandidateOverviewDTO built from the same repository state used by headless US1 endpoints."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "prepare_candidate_endpoint",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 378,
          "end_line": 409,
          "tags": {
            "PURPOSE": "Prepare candidate with policy evaluation and deterministic manifest generation.",
            "PRE": "Candidate and active policy exist in repository.",
            "POST": "Returns preparation result including manifest reference and violations."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "start_check",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 412,
          "end_line": 545,
          "tags": {
            "PURPOSE": "Start and finalize a clean compliance check run and persist report artifacts.",
            "PRE": "Active policy and candidate exist.",
            "POST": "Returns accepted payload with check_run_id and started_at."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_check_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 548,
          "end_line": 597,
          "tags": {
            "PURPOSE": "Return terminal/intermediate status payload for a check run.",
            "PRE": "check_run_id references an existing run.",
            "POST": "Deterministic payload shape includes checks and violations arrays."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 600,
          "end_line": 635,
          "tags": {
            "PURPOSE": "Return persisted compliance report by report_id.",
            "PRE": "report_id references an existing report.",
            "POST": "Returns serialized report object."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 636 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ReportsRouter",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 187,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "api, reports, list, detail, pagination, filters",
        "PURPOSE": "FastAPI router for unified task report list and detail retrieval endpoints.",
        "LAYER": "UI (API)",
        "INVARIANT": "Endpoints are read-only and do not trigger long-running tasks.",
        "PRE": "Reports service and dependencies are initialized.",
        "POST": "Router is configured and endpoints are ready for registration.",
        "SIDE_EFFECT": "None",
        "DATA_CONTRACT": "[ReportQuery] -> [ReportCollection | ReportDetailView]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "ReportsService:Class"
        },
        {
          "type": "DEPENDS_ON",
          "target": "get_task_manager:Function"
        },
        {
          "type": "DEPENDS_ON",
          "target": "get_clean_release_repository:Function"
        },
        {
          "type": "DEPENDS_ON",
          "target": "has_permission:Function"
        }
      ],
      "children": [
        {
          "name": "_parse_csv_enum_list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 78,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Parse comma-separated query value into enum list.",
            "PRE": "raw may be None/empty or comma-separated values.",
            "POST": "Returns enum list or raises HTTP 400 with deterministic machine-readable payload.",
            "PARAM": "field_name (str) - Query field name for diagnostics.",
            "RETURN": "List - Parsed enum values."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "ReportsRouter"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_reports",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 154,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Return paginated unified reports list.",
            "PRE": "authenticated/authorized request and validated query params.",
            "POST": "deterministic error payload for invalid filters.",
            "TEST_CONTRACT": "ListReportsApi ->",
            "TEST_FIXTURE": "valid_list_request -> {\"page\": 1, \"page_size\": 20}",
            "TEST_EDGE": "malformed_query -> raises HTTPException(400)",
            "TEST_INVARIANT": "consistent_list_payload -> verifies: [valid_list_request]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "_parse_csv_enum_list:Function"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ReportQuery:Class"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ReportsService:Class"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_report_detail",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 157,
          "end_line": 185,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Return one normalized report detail with diagnostics and next actions.",
            "PRE": "authenticated/authorized request and existing report_id.",
            "POST": "returns normalized detail envelope or 404 when report is not found."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "ReportsService:Class"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9666666666666667
      }
    },
    {
      "name": "ProfileApiModule",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 151,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "api, profile, preferences, self-service, account-lookup",
        "PURPOSE": "Exposes self-scoped profile preference endpoints and environment-based Superset account lookup.",
        "LAYER": "API",
        "INVARIANT": "Endpoints are self-scoped and never mutate another user preference.",
        "UX_STATE": "LookupLoading -> Returns success/degraded Superset lookup payload.",
        "UX_FEEDBACK": "Stable status/message/warning payloads support profile page feedback.",
        "UX_RECOVERY": "Lookup degradation keeps manual username save path available."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.profile_service"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.dependencies.get_current_user"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.database.get_db"
        }
      ],
      "children": [
        {
          "name": "_get_profile_service",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Build profile service for current request scope.",
            "PRE": "db session and config manager are available.",
            "POST": "Returns a ready ProfileService instance."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "ProfileService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_preferences",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Get authenticated user's dashboard filter preference.",
            "PRE": "Valid JWT and authenticated user context.",
            "POST": "Returns preference payload for current user only."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "ProfileService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "update_preferences",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Update authenticated user's dashboard filter preference.",
            "PRE": "Valid JWT and valid request payload.",
            "POST": "Persists normalized preference for current user or raises validation/authorization errors."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "ProfileService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "lookup_superset_accounts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Lookup Superset account candidates in selected environment.",
            "PRE": "Valid JWT, authenticated context, and environment_id query parameter.",
            "POST": "Returns success or degraded lookup payload with stable shape."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "ProfileService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ApiRoutesModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 59,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "routes, lazy-import, module-registry",
        "PURPOSE": "Provide lazy route module loading to avoid heavyweight imports during tests.",
        "LAYER": "API",
        "INVARIANT": "Only names listed in __all__ are importable via __getattr__."
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "ApiRoutesGetAttr"
        },
        {
          "type": "BINDS_TO",
          "target": "Route_Group_Contracts"
        }
      ],
      "children": [
        {
          "name": "Route_Group_Contracts",
          "type": "Block",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 10,
          "end_line": 41,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Declare the canonical route-module registry used by lazy imports and app router inclusion."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "PluginsRouter"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TasksRouter"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SettingsRouter"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ConnectionsRouter"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ReportsRouter"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LlmRoutes"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ApiRoutesGetAttr",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 44,
          "end_line": 58,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Lazily import route module by attribute name.",
            "PRE": "name is module candidate exposed in __all__.",
            "POST": "Returns imported submodule or raises AttributeError."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ApiRoutesModule"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "__getattr__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "TasksRouter",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 423,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "api, router, tasks, create, list, get, logs",
        "PURPOSE": "Defines the FastAPI router for task-related endpoints, allowing clients to create, list, and get the status of tasks.",
        "LAYER": "UI (API)"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TaskManager"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ConfigManager"
        },
        {
          "type": "DEPENDS_ON",
          "target": "LLMProviderService"
        }
      ],
      "children": [
        {
          "name": "create_task",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 54,
          "end_line": 134,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Create and start a new task for a given plugin.",
            "PARAM": "task_manager (TaskManager) - The task manager instance.",
            "PRE": "plugin_id must exist and params must be valid for that plugin.",
            "POST": "A new task is created and started.",
            "RETURN": "Task - The created task instance."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "TaskManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ConfigManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LLMProviderService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "list_tasks",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 137,
          "end_line": 185,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Retrieve a list of tasks with pagination and optional status filter.",
            "PARAM": "task_manager (TaskManager) - The task manager instance.",
            "PRE": "task_manager must be available.",
            "POST": "Returns a list of tasks.",
            "RETURN": "List[Task] - List of tasks."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "TaskManager"
            },
            {
              "type": "BINDS_TO",
              "target": "TASK_TYPE_PLUGIN_MAP"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_task",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 188,
          "end_line": 212,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Retrieve the details of a specific task.",
            "PARAM": "task_manager (TaskManager) - The task manager instance.",
            "PRE": "task_id must exist.",
            "POST": "Returns task details or raises 404.",
            "RETURN": "Task - The task details."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "TaskManager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_task_logs",
          "type": "Function",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 215,
          "end_line": 268,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Retrieve logs for a specific task with optional filtering.",
            "PARAM": "task_manager (TaskManager) - The task manager instance.",
            "PRE": "task_id must exist.",
            "POST": "Returns a list of log entries or raises 404.",
            "RETURN": "List[LogEntry] - List of log entries.",
            "TEST_CONTRACT": "TaskLogQueryInput -> List[LogEntry]",
            "TEST_SCENARIO": "existing_task_logs_filtered -> Returns filtered logs by level/source/search with pagination.",
            "TEST_FIXTURE": "valid_task_with_mixed_logs -> backend/tests/fixtures/task_logs/valid_task_with_mixed_logs.json",
            "TEST_EDGE": "pagination_bounds -> offset=0 and limit=1000 remain within API bounds and do not overflow.",
            "TEST_INVARIANT": "logs_only_for_existing_task -> VERIFIED_BY: [existing_task_logs_filtered, missing_task]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "TaskManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LogFilter"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 215
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 215
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 215
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 215
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "get_task_log_stats",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 271,
          "end_line": 317,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Get statistics about logs for a task (counts by level and source).",
            "PARAM": "task_manager (TaskManager) - The task manager instance.",
            "PRE": "task_id must exist.",
            "POST": "Returns log statistics or raises 404.",
            "RETURN": "LogStats - Statistics about task logs."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "TaskManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LogStats"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_task_log_sources",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 320,
          "end_line": 343,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Get unique sources for a task's logs.",
            "PARAM": "task_manager (TaskManager) - The task manager instance.",
            "PRE": "task_id must exist.",
            "POST": "Returns list of unique source names or raises 404.",
            "RETURN": "List[str] - Unique source names."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "TaskManager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolve_task",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 346,
          "end_line": 371,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve a task that is awaiting mapping.",
            "PARAM": "task_manager (TaskManager) - The task manager instance.",
            "PRE": "task must be in AWAITING_MAPPING status.",
            "POST": "Task is resolved and resumes execution.",
            "RETURN": "Task - The updated task object."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "TaskManager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resume_task",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 374,
          "end_line": 399,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resume a task that is awaiting input (e.g., passwords).",
            "PARAM": "task_manager (TaskManager) - The task manager instance.",
            "PRE": "task must be in AWAITING_INPUT status.",
            "POST": "Task resumes execution with provided input.",
            "RETURN": "Task - The updated task object."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "TaskManager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clear_tasks",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 402,
          "end_line": 421,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Clear tasks matching the status filter.",
            "PARAM": "task_manager (TaskManager) - The task manager instance.",
            "PRE": "task_manager is available.",
            "POST": "Tasks are removed from memory/persistence."
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "TaskManager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 423 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "DashboardsApi",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 1618,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "api, dashboards, resources, hub",
        "PURPOSE": "API endpoints for the Dashboard Hub - listing dashboards with Git and task status",
        "LAYER": "API",
        "INVARIANT": "All dashboard responses include git_status and last_task metadata",
        "PRE": "Valid environment configurations exist in ConfigManager.",
        "POST": "Dashboard responses are projected into DashboardsResponse DTO.",
        "SIDE_EFFECT": "Performs external calls to Superset API and potentially Git providers.",
        "DATA_CONTRACT": "Input(env_id, filters) -> Output(DashboardsResponse)",
        "TEST_CONTRACT": "DashboardsAPI -> {",
        "TEST_FIXTURE": "dashboard_list_happy -> {",
        "TEST_EDGE": "external_superset_failure -> {\"env_id\": \"bad_conn\", \"status\": 503}",
        "TEST_INVARIANT": "metadata_consistency -> verifies: [dashboard_list_happy, empty_dashboards]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AppDependencies"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ResourceService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SupersetClient"
        }
      ],
      "children": [
        {
          "name": "GitStatus",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 79,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "DTO for dashboard Git synchronization status."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LastTask",
          "type": "DataClass",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 94,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "DTO for the most recent background task associated with a dashboard."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardItem",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 113,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "DTO representing a single dashboard with projected metadata."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "EffectiveProfileFilter",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 129,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Metadata about applied profile filters for UI context."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardsResponse",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 132,
          "end_line": 144,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Envelope DTO for paginated dashboards list."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardChartItem",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 159,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "DTO for a chart linked to a dashboard."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardDatasetItem",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 162,
          "end_line": 174,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "DTO for a dataset associated with a dashboard."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardDetailResponse",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 177,
          "end_line": 194,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Detailed dashboard metadata including children."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardTaskHistoryItem",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 197,
          "end_line": 211,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Individual history record entry."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardTaskHistoryResponse",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 214,
          "end_line": 222,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Collection DTO for task history."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatabaseMapping",
          "type": "DataClass",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 225,
          "end_line": 236,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "DTO for cross-environment database ID mapping."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatabaseMappingsResponse",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 239,
          "end_line": 246,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Wrapper for database mappings."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_find_dashboard_id_by_slug",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 249,
          "end_line": 284,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve dashboard numeric ID by slug using Superset list endpoint.",
            "PRE": "`dashboard_slug` is non-empty.",
            "POST": "Returns dashboard ID when found, otherwise None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_dashboard_id_from_ref",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 287,
          "end_line": 311,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve dashboard ID from slug-first reference with numeric fallback.",
            "PRE": "`dashboard_ref` is provided in route path.",
            "POST": "Returns a valid dashboard ID or raises HTTPException(404)."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_find_dashboard_id_by_slug_async",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 314,
          "end_line": 349,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve dashboard numeric ID by slug using async Superset list endpoint.",
            "PRE": "dashboard_slug is non-empty.",
            "POST": "Returns dashboard ID when found, otherwise None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_dashboard_id_from_ref_async",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 352,
          "end_line": 375,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve dashboard ID from slug-first reference using async Superset client.",
            "PRE": "dashboard_ref is provided in route path.",
            "POST": "Returns valid dashboard ID or raises HTTPException(404)."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_normalize_filter_values",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 378,
          "end_line": 394,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Normalize query filter values to lower-cased non-empty tokens.",
            "PRE": "values may be None or list of strings.",
            "POST": "Returns trimmed normalized list preserving input order."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_dashboard_git_filter_value",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 397,
          "end_line": 417,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Build comparable git status token for dashboards filtering.",
            "PRE": "dashboard payload may contain git_status or None.",
            "POST": "Returns one of ok|diff|no_repo|error|pending."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_normalize_actor_alias_token",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 420,
          "end_line": 430,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Normalize actor alias token to comparable trim+lower text.",
            "PRE": "value can be scalar/None.",
            "POST": "Returns normalized token or None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_normalize_owner_display_token",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 433,
          "end_line": 461,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Project owner payload value into stable display string for API response contracts.",
            "PRE": "owner can be scalar, dict or None.",
            "POST": "Returns trimmed non-empty owner display token or None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_normalize_dashboard_owner_values",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 464,
          "end_line": 488,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Normalize dashboard owners payload to optional list of display strings.",
            "PRE": "owners payload can be None, scalar, or list with mixed values.",
            "POST": "Returns deduplicated owner labels preserving order, or None when absent."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_project_dashboard_response_items",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 491,
          "end_line": 509,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Project dashboard payloads to response-contract-safe shape.",
            "PRE": "dashboards is a list of dict-like dashboard payloads.",
            "POST": "Returned items satisfy DashboardItem owners=list[str]|None contract."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_profile_filter_binding",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 512,
          "end_line": 568,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve dashboard profile-filter binding through current or legacy profile service contracts.",
            "PRE": "profile_service implements get_dashboard_filter_binding or get_my_preference.",
            "POST": "Returns normalized binding payload with deterministic defaults."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_profile_actor_aliases",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 571,
          "end_line": 633,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Resolve stable actor aliases for profile filtering without per-dashboard detail fan-out.",
            "PRE": "bound username is available and env is valid.",
            "POST": "Returns at least normalized username; may include Superset display-name alias.",
            "SIDE_EFFECT": "Performs at most one Superset users-lookup request."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_matches_dashboard_actor_aliases",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 636,
          "end_line": 657,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Apply profile actor matching against multiple aliases (username + optional display name).",
            "PRE": "actor_aliases contains normalized non-empty tokens.",
            "POST": "Returns True when any alias matches owners OR modified_by."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dashboards",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 660,
          "end_line": 1032,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Fetch list of dashboards from a specific environment with Git status and last task status",
            "PRE": "page_size must be between 1 and 100 if provided",
            "POST": "Response includes effective profile filter metadata for main dashboards page context",
            "PARAM": "page_size (Optional[int]) - Items per page (default: 10, max: 100)",
            "RETURN": "DashboardsResponse - List of dashboards with status metadata"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "get_dashboards_with_status"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "get_database_mappings",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1035,
          "end_line": 1105,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Get database mapping suggestions between source and target environments",
            "PRE": "source_env_id and target_env_id are valid environment IDs",
            "POST": "Returns list of suggested database mappings with confidence scores",
            "PARAM": "target_env_id (str) - Target environment ID",
            "RETURN": "DatabaseMappingsResponse - List of suggested mappings"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "MappingService:get_suggestions"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dashboard_detail",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1108,
          "end_line": 1151,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Fetch detailed dashboard info with related charts and datasets",
            "PRE": "env_id must be valid and dashboard ref (slug or id) must exist",
            "POST": "Returns dashboard detail payload for overview page"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "AsyncSupersetClient"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_task_matches_dashboard",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1154,
          "end_line": 1189,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Checks whether task params are tied to a specific dashboard and environment.",
            "PRE": "task-like object exposes plugin_id and params fields.",
            "POST": "Returns True only for supported task plugins tied to dashboard_id (+optional env_id)."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dashboard_tasks_history",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1192,
          "end_line": 1292,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Returns history of backup and LLM validation tasks for a dashboard.",
            "PRE": "dashboard ref (slug or id) is valid.",
            "POST": "Response contains sorted task history (newest first)."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_dashboard_thumbnail",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 1295,
          "end_line": 1417,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Proxies Superset dashboard thumbnail with cache support.",
            "PRE": "env_id must exist.",
            "POST": "Returns image bytes or 202 when thumbnail is being prepared by Superset."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1295
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 1295
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "MigrateRequest",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1420,
          "end_line": 1435,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "DTO for dashboard migration requests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TaskResponse",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1438,
          "end_line": 1445,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "DTO for async task ID return."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "migrate_dashboards",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1448,
          "end_line": 1529,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Trigger bulk migration of dashboards from source to target environment",
            "PRE": "dashboard_ids is a non-empty list",
            "POST": "Task is created and queued for execution",
            "PARAM": "request (MigrateRequest) - Migration request with source, target, and dashboard IDs",
            "RETURN": "TaskResponse - Task ID for tracking"
          },
          "relations": [
            {
              "type": "DISPATCHES",
              "target": "MigrationPlugin:execute"
            },
            {
              "type": "CALLS",
              "target": "TaskManager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "BackupRequest",
          "type": "DataClass",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1532,
          "end_line": 1543,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "DTO for dashboard backup requests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "backup_dashboards",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 1546,
          "end_line": 1616,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Trigger bulk backup of dashboards with optional cron schedule",
            "PRE": "dashboard_ids is a non-empty list",
            "POST": "If schedule is provided, a scheduled task is created",
            "PARAM": "request (BackupRequest) - Backup request with environment and dashboard IDs",
            "RETURN": "TaskResponse - Task ID for tracking"
          },
          "relations": [
            {
              "type": "DISPATCHES",
              "target": "BackupPlugin:execute"
            },
            {
              "type": "CALLS",
              "target": "TaskManager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_read_optional_string",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 520,
          "end_line": 520,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_read_bool",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 523,
          "end_line": 523,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_matches_dashboard_filters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 941,
          "end_line": 941,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_sort_key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1241,
          "end_line": 1241,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1618 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8166666666666667
      }
    },
    {
      "name": "DashboardsApiTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 1051,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for dashboards API endpoints.",
        "LAYER": "API"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.api.routes.dashboards"
        }
      ],
      "children": [
        {
          "name": "test_get_dashboards_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Validate dashboards listing returns a populated response that satisfies the schema contract.",
            "TEST": "GET /api/dashboards returns 200 and valid schema",
            "PRE": "env_id exists",
            "POST": "Response matches DashboardsResponse schema",
            "TEST_FIXTURE": "dashboard_list_happy -> {\"id\": 1, \"title\": \"Main Revenue\"}"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_with_search",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Validate dashboards listing applies the search filter and returns only matching rows.",
            "TEST": "GET /api/dashboards filters by search term",
            "PRE": "search parameter provided",
            "POST": "Filtered result count must match search"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_empty",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 162,
          "end_line": 183,
          "tags": {
            "PURPOSE": "Validate dashboards listing returns an empty payload for an environment without dashboards.",
            "TEST_EDGE": "empty_dashboards -> {env_id: 'empty_env', expected_total: 0}"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_superset_failure",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 186,
          "end_line": 205,
          "tags": {
            "PURPOSE": "Validate dashboards listing surfaces a 503 contract when Superset access fails.",
            "TEST_EDGE": "external_superset_failure -> {env_id: 'bad_conn', status: 503}"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 208,
          "end_line": 222,
          "tags": {
            "PURPOSE": "Validate dashboards listing returns 404 when the requested environment does not exist.",
            "TEST": "GET /api/dashboards returns 404 if env_id missing",
            "PRE": "env_id does not exist",
            "POST": "Returns 404 error"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_invalid_pagination",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 225,
          "end_line": 246,
          "tags": {
            "PURPOSE": "Validate dashboards listing rejects invalid pagination parameters with 400 responses.",
            "TEST": "GET /api/dashboards returns 400 for invalid page/page_size",
            "PRE": "page < 1 or page_size > 100",
            "POST": "Returns 400 error"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboard_detail_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 249,
          "end_line": 302,
          "tags": {
            "PURPOSE": "Validate dashboard detail returns charts and datasets for an existing dashboard.",
            "TEST": "GET /api/dashboards/{id} returns dashboard detail with charts and datasets"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboard_detail_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 305,
          "end_line": 318,
          "tags": {
            "PURPOSE": "Validate dashboard detail returns 404 when the requested environment is missing.",
            "TEST": "GET /api/dashboards/{id} returns 404 for missing environment"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_migrate_dashboards_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 321,
          "end_line": 355,
          "tags": {
            "TEST": "POST /api/dashboards/migrate creates migration task",
            "PRE": "Valid source_env_id, target_env_id, dashboard_ids",
            "PURPOSE": "Validate dashboard migration request creates an async task and returns its identifier.",
            "POST": "Returns task_id and create_task was called"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_migrate_dashboards_no_ids",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 358,
          "end_line": 378,
          "tags": {
            "TEST": "POST /api/dashboards/migrate returns 400 for empty dashboard_ids",
            "PRE": "dashboard_ids is empty",
            "PURPOSE": "Validate dashboard migration rejects empty dashboard identifier lists.",
            "POST": "Returns 400 error"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_migrate_dashboards_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 381,
          "end_line": 396,
          "tags": {
            "PURPOSE": "Validate migration creation returns 404 when the source environment cannot be resolved.",
            "PRE": "source_env_id and target_env_id are valid environment IDs"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_backup_dashboards_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 399,
          "end_line": 426,
          "tags": {
            "TEST": "POST /api/dashboards/backup creates backup task",
            "PRE": "Valid env_id, dashboard_ids",
            "PURPOSE": "Validate dashboard backup request creates an async backup task and returns its identifier.",
            "POST": "Returns task_id and create_task was called"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_backup_dashboards_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 429,
          "end_line": 443,
          "tags": {
            "PURPOSE": "Validate backup task creation returns 404 when the target environment is missing.",
            "PRE": "env_id is a valid environment ID"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_database_mappings_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 446,
          "end_line": 482,
          "tags": {
            "TEST": "GET /api/dashboards/db-mappings returns mapping suggestions",
            "PRE": "Valid source_env_id, target_env_id",
            "PURPOSE": "Validate database mapping suggestions are returned for valid source and target environments.",
            "POST": "Returns list of database mappings"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_database_mappings_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 485,
          "end_line": 498,
          "tags": {
            "PURPOSE": "Validate database mapping suggestions return 404 when either environment is missing.",
            "PRE": "source_env_id and target_env_id are valid environment IDs"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboard_tasks_history_filters_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 501,
          "end_line": 549,
          "tags": {
            "PURPOSE": "Validate dashboard task history returns only related backup and LLM tasks.",
            "TEST": "GET /api/dashboards/{id}/tasks returns backup and llm tasks for dashboard"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboard_thumbnail_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 552,
          "end_line": 583,
          "tags": {
            "PURPOSE": "Validate dashboard thumbnail endpoint proxies image bytes and content type from Superset.",
            "TEST": "GET /api/dashboards/{id}/thumbnail proxies image bytes from Superset"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_build_profile_preference_stub",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 586,
          "end_line": 604,
          "tags": {
            "PURPOSE": "Creates profile preference payload stub for dashboards filter contract tests.",
            "PRE": "username can be empty; enabled indicates profile-default toggle state.",
            "POST": "Returns object compatible with ProfileService.get_my_preference contract."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_matches_actor_case_insensitive",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 607,
          "end_line": 629,
          "tags": {
            "PURPOSE": "Applies trim + case-insensitive owners OR modified_by matching used by route contract tests.",
            "PRE": "owners can be None or list-like values.",
            "POST": "Returns True when bound username matches any owner or modified_by."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_profile_filter_contract_owners_or_modified_by",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 632,
          "end_line": 696,
          "tags": {
            "TEST": "GET /api/dashboards applies profile-default filter with owners OR modified_by trim+case-insensitive semantics.",
            "PURPOSE": "Validate profile-default filtering matches owner and modifier aliases using normalized Superset actor values.",
            "PRE": "Current user has enabled profile-default preference and bound username.",
            "POST": "Response includes only matching dashboards and effective_profile_filter metadata."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_override_show_all_contract",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 699,
          "end_line": 757,
          "tags": {
            "TEST": "GET /api/dashboards honors override_show_all and disables profile-default filter for current page.",
            "PURPOSE": "Validate override_show_all bypasses profile-default filtering without changing dashboard list semantics.",
            "PRE": "Profile-default preference exists but override_show_all=true query is provided.",
            "POST": "Response remains unfiltered and effective_profile_filter.applied is false."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_profile_filter_no_match_results_contract",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 760,
          "end_line": 820,
          "tags": {
            "TEST": "GET /api/dashboards returns empty result set when profile-default filter is active and no dashboard actors match.",
            "PURPOSE": "Validate profile-default filtering returns an empty dashboard page when no actor aliases match the bound user.",
            "PRE": "Profile-default preference is enabled with bound username and all dashboards are non-matching.",
            "POST": "Response total is 0 with deterministic pagination and active effective_profile_filter metadata."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_page_context_other_disables_profile_default",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 823,
          "end_line": 881,
          "tags": {
            "TEST": "GET /api/dashboards does not auto-apply profile-default filter outside dashboards_main page context.",
            "PURPOSE": "Validate non-dashboard page contexts suppress profile-default filtering and preserve unfiltered results.",
            "PRE": "Profile-default preference exists but page_context=other query is provided.",
            "POST": "Response remains unfiltered and metadata reflects source_page=other."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_profile_filter_matches_display_alias_without_detail_fanout",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 884,
          "end_line": 966,
          "tags": {
            "TEST": "GET /api/dashboards resolves Superset display-name alias once and filters without per-dashboard detail calls.",
            "PURPOSE": "Validate profile-default filtering reuses resolved Superset display aliases without triggering per-dashboard detail fanout.",
            "PRE": "Profile-default filter is active, bound username is `admin`, dashboard actors contain display labels.",
            "POST": "Route matches by alias (`Superset Admin`) and does not call `SupersetClient.get_dashboard` in list filter path."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_profile_filter_matches_owner_object_payload_contract",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 969,
          "end_line": 1048,
          "tags": {
            "TEST": "GET /api/dashboards profile-default filter matches Superset owner object payloads.",
            "PURPOSE": "Validate profile-default filtering accepts owner object payloads once aliases resolve to the bound Superset username.",
            "PRE": "Profile-default preference is enabled and owners list contains dict payloads.",
            "POST": "Response keeps dashboards where owner object resolves to bound username alias."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DashboardsApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mock_deps",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mock_get_dashboards",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_network_request",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 568,
          "end_line": 568,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 1051 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "TestGitStatusRoute",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 454,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, git, api, status, no_repo",
        "PURPOSE": "Validate status endpoint behavior for missing and error repository states.",
        "LAYER": "Domain (Tests)"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "GitApi"
        }
      ],
      "children": [
        {
          "name": "test_get_repository_status_returns_no_repo_payload_for_missing_repo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Ensure missing local repository is represented as NO_REPO payload instead of an API error.",
            "PRE": "GitService.get_status raises HTTPException(404).",
            "POST": "Route returns a deterministic NO_REPO status payload."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_repository_status_propagates_non_404_http_exception",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Ensure HTTP exceptions other than 404 are not masked.",
            "PRE": "GitService.get_status raises HTTPException with non-404 status.",
            "POST": "Raised exception preserves original status and detail."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_repository_diff_propagates_http_exception",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Ensure diff endpoint preserves domain HTTP errors from GitService.",
            "PRE": "GitService.get_diff raises HTTPException.",
            "POST": "Endpoint raises same HTTPException values."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_history_wraps_unexpected_error_as_500",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Ensure non-HTTP exceptions in history endpoint become deterministic 500 errors.",
            "PRE": "GitService.get_commit_history raises ValueError.",
            "POST": "Endpoint returns HTTPException with status 500 and route context."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_commit_changes_wraps_unexpected_error_as_500",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 125,
          "tags": {
            "PURPOSE": "Ensure commit endpoint does not leak unexpected errors as 400.",
            "PRE": "GitService.commit_changes raises RuntimeError.",
            "POST": "Endpoint raises HTTPException(500) with route context."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_repository_status_batch_returns_mixed_statuses",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 153,
          "tags": {
            "PURPOSE": "Ensure batch endpoint returns per-dashboard statuses in one response.",
            "PRE": "Some repositories are missing and some are initialized.",
            "POST": "Returned map includes resolved status for each requested dashboard ID."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_repository_status_batch_marks_item_as_error_on_service_failure",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 156,
          "end_line": 179,
          "tags": {
            "PURPOSE": "Ensure batch endpoint marks failed items as ERROR without failing entire request.",
            "PRE": "GitService raises non-HTTP exception for one dashboard.",
            "POST": "Failed dashboard status is marked as ERROR."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_repository_status_batch_deduplicates_and_truncates_ids",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 182,
          "end_line": 205,
          "tags": {
            "PURPOSE": "Ensure batch endpoint protects server from oversized payloads.",
            "PRE": "request includes duplicate IDs and more than MAX_REPOSITORY_STATUS_BATCH entries.",
            "POST": "Result contains unique IDs up to configured cap."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_commit_changes_applies_profile_identity_before_commit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 208,
          "end_line": 267,
          "tags": {
            "PURPOSE": "Ensure commit route configures repository identity from profile preferences before commit call.",
            "PRE": "Profile preference contains git_username/git_email for current user.",
            "POST": "git_service.configure_identity receives resolved identity and commit proceeds."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_pull_changes_applies_profile_identity_before_pull",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 270,
          "end_line": 324,
          "tags": {
            "PURPOSE": "Ensure pull route configures repository identity from profile preferences before pull call.",
            "PRE": "Profile preference contains git_username/git_email for current user.",
            "POST": "git_service.configure_identity receives resolved identity and pull proceeds."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_merge_status_returns_service_payload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 327,
          "end_line": 357,
          "tags": {
            "PURPOSE": "Ensure merge status route returns service payload as-is.",
            "PRE": "git_service.get_merge_status returns unfinished merge payload.",
            "POST": "Route response contains has_unfinished_merge=True."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_resolve_merge_conflicts_passes_resolution_items_to_service",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 360,
          "end_line": 395,
          "tags": {
            "PURPOSE": "Ensure merge resolve route forwards parsed resolutions to service.",
            "PRE": "resolve_data has one file strategy.",
            "POST": "Service receives normalized list and route returns resolved files."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_abort_merge_calls_service_and_returns_result",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 398,
          "end_line": 420,
          "tags": {
            "PURPOSE": "Ensure abort route delegates to service.",
            "PRE": "Service abort_merge returns aborted status.",
            "POST": "Route returns aborted status."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_continue_merge_passes_message_and_returns_commit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 423,
          "end_line": 451,
          "tags": {
            "PURPOSE": "Ensure continue route passes commit message to service.",
            "PRE": "continue_data.message is provided.",
            "POST": "Route returns committed status and hash."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitStatusRoute"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_repo_path",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_repo_path",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_diff",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_commit_history",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "commit_changes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_repo_path",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 135,
          "end_line": 135,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 138,
          "end_line": 138,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_repo_path",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 166,
          "end_line": 166,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_repo_path",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 189,
          "end_line": 189,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 192,
          "end_line": 192,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 215,
          "end_line": 215,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "configure_identity",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 219,
          "end_line": 219,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "commit_changes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 222,
          "end_line": 222,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 230,
          "end_line": 230,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "first",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 233,
          "end_line": 233,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "query",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 237,
          "end_line": 237,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 277,
          "end_line": 277,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "configure_identity",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 281,
          "end_line": 281,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "pull_changes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 284,
          "end_line": 284,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 292,
          "end_line": 292,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "first",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 295,
          "end_line": 295,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "query",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 299,
          "end_line": 299,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_merge_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 334,
          "end_line": 334,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolve_merge_conflicts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 369,
          "end_line": 369,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dict",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 376,
          "end_line": 376,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "abort_merge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 405,
          "end_line": 405,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "continue_merge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 430,
          "end_line": 430,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 454 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.625
      }
    },
    {
      "name": "TestReportsOpenapiConformance",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 118,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, reports, openapi, conformance",
        "PURPOSE": "Validate implemented reports payload shape against OpenAPI-required top-level contract fields.",
        "LAYER": "Domain (Tests)",
        "INVARIANT": "List and detail payloads include required contract keys."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_FakeTaskManager",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 32,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Minimal task-manager fake exposing static task list for OpenAPI conformance checks.",
            "INVARIANT": "get_all_tasks returns seeded tasks unchanged."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsOpenapiConformance"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_admin_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Provide admin principal fixture required by reports routes in conformance tests."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsOpenapiConformance"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Construct deterministic task fixture consumed by reports list/detail payload assertions."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsOpenapiConformance"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_reports_list_openapi_required_keys",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Verify reports list endpoint includes all required OpenAPI top-level keys."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsOpenapiConformance"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_reports_detail_openapi_required_keys",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 117,
          "tags": {
            "PURPOSE": "Verify reports detail endpoint returns payload containing the report object key."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsOpenapiConformance"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_all_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestCleanReleaseSourcePolicy",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 114,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, api, clean-release, source-policy",
        "PURPOSE": "Validate API behavior for source isolation violations in clean release preparation.",
        "LAYER": "Domain",
        "INVARIANT": "External endpoints must produce blocking violation entries."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_repo_with_seed_data",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Seed repository with candidate, registry, and active policy for source isolation test flow."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseSourcePolicy"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_prepare_candidate_blocks_external_source",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Verify candidate preparation is blocked when at least one source host is external to the trusted registry."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseSourcePolicy"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestCleanReleaseApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 193,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, api, clean-release, checks, reports",
        "PURPOSE": "Contract tests for clean release checks and reports endpoints.",
        "LAYER": "Domain",
        "INVARIANT": "API returns deterministic payload shapes for checks and reports."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_repo_with_seed_data",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 77,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_start_check_and_get_status_contract",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Validate checks start endpoint returns expected identifiers and status endpoint reflects the same run."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_report_not_found_returns_404",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 132,
          "tags": {
            "PURPOSE": "Validate reports endpoint returns 404 for an unknown report identifier."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_report_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 135,
          "end_line": 162,
          "tags": {
            "PURPOSE": "Validate reports endpoint returns persisted report payload for an existing report identifier."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_prepare_candidate_api_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 192,
          "tags": {
            "PURPOSE": "Validate candidate preparation endpoint returns prepared status and manifest identifier on valid input."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "test_tasks_logs_module",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 108,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "tests, tasks, logs, api, contract, validation",
        "PURPOSE": "Contract testing for task logs API endpoints.",
        "LAYER": "Domain (Tests)",
        "TEST_FIXTURE": "valid_task_logs_request",
        "INVARIANT": "unconstrained mock \u2014 no spec= enforced",
        "TEST_CONTRACT": "get_task_logs_api -> Invariants"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "src.api.routes.tasks:Module"
        }
      ],
      "children": [
        {
          "name": "test_get_task_logs_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Validate task logs endpoint returns filtered logs for an existing task.",
            "TEST_EDGE": "task_not_found"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_tasks_logs_module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_task_logs_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Validate task logs endpoint returns 404 when the task identifier is missing.",
            "TEST_EDGE": "invalid_limit"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_tasks_logs_module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_task_logs_invalid_limit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Validate task logs endpoint enforces query validation for limit lower bound.",
            "TEST_INVARIANT": "response_purity"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_tasks_logs_module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_task_log_stats_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Validate log stats endpoint returns success payload for an existing task."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_tasks_logs_module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "client",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "TestReportsApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 249,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, reports, api, contract, pagination, filtering",
        "PURPOSE": "Contract tests for GET /api/reports defaults, pagination, and filtering behavior.",
        "LAYER": "Domain (Tests)",
        "INVARIANT": "API response contract contains {items,total,page,page_size,has_next,applied_filters}.",
        "DEBT": "Divergent _FakeTaskManager definition. Canonical version should be in conftest.py. Authz variant is missing get_all_tasks()."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_FakeTaskManager",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 33,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Minimal task-manager double exposing only get_all_tasks used by reports route tests.",
            "INVARIANT": "Returns pre-seeded tasks without mutation or side effects."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_admin_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Build deterministic admin principal accepted by reports authorization guard."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Build Task fixture with controlled timestamps/status for reports list/detail normalization."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_reports_default_pagination_contract",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 123,
          "tags": {
            "PURPOSE": "Validate reports list endpoint default pagination and contract keys for mixed task statuses."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_reports_filter_and_pagination",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 126,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Validate reports list endpoint applies task-type/status filters and pagination boundaries."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_reports_handles_mixed_naive_and_aware_datetimes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 217,
          "tags": {
            "PURPOSE": "Validate reports sorting remains stable when task timestamps mix naive and timezone-aware datetimes."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_reports_invalid_filter_returns_400",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 220,
          "end_line": 248,
          "tags": {
            "PURPOSE": "Validate reports list endpoint rejects unsupported task type filters with HTTP 400."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_all_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "DatasetsApiTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 326,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "datasets, api, tests, pagination, mapping, docs",
        "PURPOSE": "Unit tests for datasets API endpoints.",
        "LAYER": "API",
        "INVARIANT": "unconstrained mock \u2014 no spec= enforced; attribute typos will silently pass"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "src.api.routes.datasets:Module"
        }
      ],
      "children": [
        {
          "name": "test_get_datasets_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Validate successful datasets listing contract for an existing environment.",
            "TEST": "GET /api/datasets returns 200 and valid schema",
            "PRE": "env_id exists",
            "POST": "Response matches DatasetsResponse schema"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetsApiTests:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_datasets_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Validate datasets listing returns 404 when the requested environment does not exist.",
            "TEST": "GET /api/datasets returns 404 if env_id missing",
            "PRE": "env_id does not exist",
            "POST": "Returns 404 error"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetsApiTests:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_datasets_invalid_pagination",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 132,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Validate datasets listing rejects invalid pagination parameters with 400 responses.",
            "TEST": "GET /api/datasets returns 400 for invalid page/page_size",
            "PRE": "page < 1 or page_size > 100",
            "POST": "Returns 400 error",
            "TEST_EDGE": "page_size > 100 exceeds max"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetsApiTests:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_map_columns_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 162,
          "end_line": 191,
          "tags": {
            "PURPOSE": "Validate map-columns request creates an async mapping task and returns its identifier.",
            "TEST": "POST /api/datasets/map-columns creates mapping task",
            "PRE": "Valid env_id, dataset_ids, source_type",
            "POST": "Returns task_id"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetsApiTests:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_map_columns_invalid_source_type",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 194,
          "end_line": 210,
          "tags": {
            "PURPOSE": "Validate map-columns rejects unsupported source types with a 400 contract response.",
            "TEST": "POST /api/datasets/map-columns returns 400 for invalid source_type",
            "PRE": "source_type is not 'postgresql' or 'xlsx'",
            "POST": "Returns 400 error"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetsApiTests:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_generate_docs_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 213,
          "end_line": 242,
          "tags": {
            "TEST": "POST /api/datasets/generate-docs creates doc generation task",
            "PRE": "Valid env_id, dataset_ids, llm_provider",
            "PURPOSE": "Validate generate-docs request creates an async documentation task and returns its identifier.",
            "POST": "Returns task_id"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetsApiTests:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_map_columns_empty_ids",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 245,
          "end_line": 261,
          "tags": {
            "PURPOSE": "Validate map-columns rejects empty dataset identifier lists.",
            "TEST": "POST /api/datasets/map-columns returns 400 for empty dataset_ids",
            "PRE": "dataset_ids is empty",
            "POST": "Returns 400 error"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetsApiTests:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_generate_docs_empty_ids",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 264,
          "end_line": 280,
          "tags": {
            "PURPOSE": "Validate generate-docs rejects empty dataset identifier lists.",
            "TEST": "POST /api/datasets/generate-docs returns 400 for empty dataset_ids",
            "PRE": "dataset_ids is empty",
            "POST": "Returns 400 error"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetsApiTests:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_generate_docs_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 283,
          "end_line": 300,
          "tags": {
            "TEST": "POST /api/datasets/generate-docs returns 404 for missing env",
            "PRE": "env_id does not exist",
            "PURPOSE": "Validate generate-docs returns 404 when the requested environment cannot be resolved.",
            "POST": "Returns 404 error"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetsApiTests:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_datasets_superset_failure",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 303,
          "end_line": 323,
          "tags": {
            "PURPOSE": "Validate datasets listing surfaces a 503 contract when Superset access fails.",
            "TEST_EDGE": "external_superset_failure -> {status: 503}",
            "POST": "Returns 503 with stable error detail when upstream dataset fetch fails."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetsApiTests:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mock_deps",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 326 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestProfileApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 307,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, profile, api, preferences, lookup, contract",
        "PURPOSE": "Verifies profile API route contracts for preference read/update and Superset account lookup.",
        "LAYER": "API"
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "mock_profile_route_dependencies",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Provides deterministic dependency overrides for profile route tests.",
            "PRE": "App instance is initialized.",
            "POST": "Dependencies are overridden for current test and restored afterward."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestProfileApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "profile_route_deps_fixture",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Pytest fixture wrapper for profile route dependency overrides.",
            "PRE": "None.",
            "POST": "Yields overridden dependencies and clears overrides after test."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestProfileApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_build_preference_response",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Builds stable profile preference response payload for route tests.",
            "PRE": "user_id is provided.",
            "POST": "Returns ProfilePreferenceResponse object with deterministic timestamps."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestProfileApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_profile_preferences_returns_self_payload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Verifies GET /api/profile/preferences returns stable self-scoped payload.",
            "PRE": "Authenticated user context is available.",
            "POST": "Response status is 200 and payload contains current user preference."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestProfileApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_patch_profile_preferences_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 195,
          "tags": {
            "PURPOSE": "Verifies PATCH /api/profile/preferences persists valid payload through route mapping.",
            "PRE": "Valid request payload and authenticated user.",
            "POST": "Response status is 200 with saved preference payload."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestProfileApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_patch_profile_preferences_validation_error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 198,
          "end_line": 222,
          "tags": {
            "PURPOSE": "Verifies route maps domain validation failure to HTTP 422 with actionable details.",
            "PRE": "Service raises ProfileValidationError.",
            "POST": "Response status is 422 and includes validation messages."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestProfileApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_patch_profile_preferences_cross_user_denied",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 225,
          "end_line": 248,
          "tags": {
            "PURPOSE": "Verifies route maps domain authorization guard failure to HTTP 403.",
            "PRE": "Service raises ProfileAuthorizationError.",
            "POST": "Response status is 403 with denial message."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestProfileApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_lookup_superset_accounts_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 251,
          "end_line": 285,
          "tags": {
            "PURPOSE": "Verifies lookup route returns success payload with normalized candidates.",
            "PRE": "Valid environment_id and service success response.",
            "POST": "Response status is 200 and items list is returned."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestProfileApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_lookup_superset_accounts_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 288,
          "end_line": 305,
          "tags": {
            "PURPOSE": "Verifies lookup route maps missing environment to HTTP 404.",
            "PRE": "Service raises EnvironmentNotFoundError.",
            "POST": "Response status is 404 with explicit message."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestProfileApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 307 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.625
      }
    },
    {
      "name": "TestReportsDetailApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 122,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, reports, api, detail, diagnostics",
        "PURPOSE": "Contract tests for GET /api/reports/{report_id} detail endpoint behavior.",
        "LAYER": "Domain (Tests)",
        "INVARIANT": "Detail endpoint tests must keep deterministic assertions for success and not-found contracts.",
        "DEBT": "Divergent _FakeTaskManager definition. Canonical version should be in conftest.py. Authz variant is missing get_all_tasks()."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_FakeTaskManager",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 33,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Minimal task-manager double exposing pre-seeded tasks to detail endpoint under test.",
            "INVARIANT": "get_all_tasks returns exactly seeded tasks list."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsDetailApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_admin_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Provide admin principal fixture accepted by reports detail authorization policy."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsDetailApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Build deterministic Task payload for reports detail endpoint contract assertions."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsDetailApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_report_detail_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 68,
          "end_line": 101,
          "tags": {
            "PURPOSE": "Validate report detail endpoint returns report body with diagnostics and next actions for existing task."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsDetailApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_report_detail_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Validate report detail endpoint returns 404 when requested report identifier is absent."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportsDetailApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_all_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "RoutesTestsConftest",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 45,
      "tags": {
        "COMPLEXITY": "1",
        "PURPOSE": "Shared low-fidelity test doubles for API route test modules."
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "order_by",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "limit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "offset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "first",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TestCleanReleaseLegacyCompat",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 187,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Compatibility tests for legacy clean-release API paths retained during v2 migration.",
        "LAYER": "Tests"
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_seed_legacy_repo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 119,
          "tags": {
            "PURPOSE": "Seed in-memory repository with minimum trusted data for legacy endpoint contracts.",
            "PRE": "Repository is empty.",
            "POST": "Candidate, policy, registry and manifest are available for legacy checks flow."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseLegacyCompat"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_legacy_prepare_endpoint_still_available",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 149,
          "tags": {
            "PURPOSE": "Verify legacy prepare endpoint remains reachable and returns a status payload."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseLegacyCompat"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_legacy_checks_endpoints_still_available",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 152,
          "end_line": 186,
          "tags": {
            "PURPOSE": "Verify legacy checks start/status endpoints remain available during v2 transition."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseLegacyCompat"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "DatasetReviewApiTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 1728,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset_review, api, tests, lifecycle, exports, orchestration",
        "PURPOSE": "Verify backend US1 dataset review lifecycle, export, parsing, and dictionary-resolution contracts.",
        "LAYER": "API"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "DatasetReviewApi"
        },
        {
          "type": "BINDS_TO",
          "target": "DatasetReviewOrchestrator"
        }
      ],
      "children": [
        {
          "name": "_make_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 90,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_config_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 112,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 139,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_us2_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 142,
          "end_line": 257,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_us3_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 260,
          "end_line": 327,
          "tags": {
            "RISK": "No spec= guard \u2014 enum/field contract changes are undetectable at test time."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_preview_ready_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 330,
          "end_line": 340,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dataset_review_api_dependencies",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 343,
          "end_line": 363,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_parse_superset_link_dashboard_partial_recovery",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 366,
          "end_line": 400,
          "tags": {
            "PURPOSE": "Verify dashboard links recover dataset context and preserve explicit partial-recovery markers."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_parse_superset_link_dashboard_slug_recovery",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 403,
          "end_line": 437,
          "tags": {
            "PURPOSE": "Verify dashboard slug links resolve through dashboard detail endpoints and recover dataset context."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_parse_superset_link_dashboard_permalink_partial_recovery",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 440,
          "end_line": 532,
          "tags": {
            "PURPOSE": "Verify dashboard permalink links no longer fail parsing and preserve permalink filter state for partial recovery."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [
            {
              "name": "test_parse_superset_link_dashboard_permalink_recovers_dataset_from_nested_dashboard_state",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 487,
              "end_line": 531,
              "tags": {
                "PURPOSE": "Verify permalink state with nested dashboard id recovers dataset binding and keeps imported filters."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "DatasetReviewApiTests"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_resolve_from_dictionary_prefers_exact_match",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 535,
          "end_line": 577,
          "tags": {
            "PURPOSE": "Verify trusted dictionary exact matches outrank fuzzy candidates and unresolved fields stay explicit."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_orchestrator_start_session_preserves_partial_recovery",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 580,
          "end_line": 645,
          "tags": {
            "PURPOSE": "Verify session start persists usable recovery-required state when Superset intake is partial."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_orchestrator_start_session_bootstraps_recovery_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 648,
          "end_line": 753,
          "tags": {
            "PURPOSE": "Verify session start persists recovered filters, template variables, and initial execution mappings for review workspace bootstrap."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_start_session_endpoint_returns_created_summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 756,
          "end_line": 786,
          "tags": {
            "PURPOSE": "Verify POST session lifecycle endpoint returns a persisted ownership-scoped summary."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_session_detail_export_and_lifecycle_endpoints",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 789,
          "end_line": 904,
          "tags": {
            "PURPOSE": "Verify lifecycle get/patch/delete plus documentation and validation exports remain ownership-scoped and usable."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_clarification_state_returns_empty_payload_when_session_has_no_record",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 907,
          "end_line": 927,
          "tags": {
            "PURPOSE": "Clarification state endpoint should return a non-blocking empty payload when the session has no clarification aggregate yet."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_us2_clarification_endpoints_persist_answer_and_feedback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 930,
          "end_line": 994,
          "tags": {
            "PURPOSE": "Clarification endpoints should expose one current question, persist the answer before advancement, and store feedback on the answer audit record."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_us2_field_semantic_override_lock_unlock_and_feedback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 997,
          "end_line": 1076,
          "tags": {
            "PURPOSE": "Semantic field endpoints should apply manual overrides with lock/provenance invariants and persist feedback independently."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_us3_mapping_patch_approval_preview_and_launch_endpoints",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1079,
          "end_line": 1284,
          "tags": {
            "PURPOSE": "US3 execution endpoints should persist manual overrides, preserve explicit approval semantics, return contract-shaped preview truth, and expose audited launch handoff."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_us3_preview_response_propagates_refreshed_session_version_for_launch_follow_up",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1287,
          "end_line": 1383,
          "tags": {
            "PURPOSE": "Preview response should expose the refreshed session version so the normal preview-then-launch UI flow can satisfy optimistic locking without a forced full reload."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_us3_preview_endpoint_returns_failed_preview_without_false_dashboard_not_found_contract_drift",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1386,
          "end_line": 1437,
          "tags": {
            "PURPOSE": "Preview endpoint should preserve API contract and surface generic upstream preview failures without fabricating dashboard-not-found semantics for non-dashboard 404s."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_mutation_endpoints_surface_session_version_conflict_payload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1440,
          "end_line": 1477,
          "tags": {
            "PURPOSE": "Dataset review mutation endpoints should return deterministic 409 conflict semantics when optimistic-lock versions are stale."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_execution_snapshot_includes_recovered_imported_filters_without_template_mapping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1480,
          "end_line": 1550,
          "tags": {
            "PURPOSE": "Recovered imported filters with values should flow into preview filter context even when no template variable mapping exists."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_execution_snapshot_preserves_mapped_template_variables_and_filter_context",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1553,
          "end_line": 1589,
          "tags": {
            "PURPOSE": "Mapped template variables should still populate template params while contributing their effective filter context."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_execution_snapshot_skips_partial_imported_filters_without_values",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1592,
          "end_line": 1631,
          "tags": {
            "PURPOSE": "Partial imported filters without raw or normalized values must not emit bogus active preview filters."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_us3_launch_endpoint_requires_launch_permission",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1634,
          "end_line": 1687,
          "tags": {
            "PURPOSE": "Launch endpoint should enforce the contract RBAC permission instead of the generic session-manage permission."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_semantic_source_version_propagation_preserves_locked_fields",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1690,
          "end_line": 1726,
          "tags": {
            "PURPOSE": "Updated semantic source versions should mark unlocked fields reviewable while preserving locked manual values."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "DatasetReviewApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_add_side_effect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 944,
          "end_line": 944,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_assert_expected_preview_version",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1154,
          "end_line": 1154,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_assert_expected_launch_version",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1160,
          "end_line": 1160,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_assert_expected_pending_preview_version",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1235,
          "end_line": 1235,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_require_session_version",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1299,
          "end_line": 1299,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_prepare_preview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1342,
          "end_line": 1342,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_launch_dataset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 1351,
          "end_line": 1351,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 1728 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "CleanReleaseV2ApiTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 115,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "API contract tests for redesigned clean release endpoints.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.api.routes.clean_release_v2"
        }
      ],
      "children": [
        {
          "name": "test_candidate_registration_contract",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Validate candidate registration endpoint creates a draft candidate with expected identifier contract."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "CleanReleaseV2ApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_artifact_import_contract",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Validate artifact import endpoint accepts candidate artifacts and returns success status payload."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "CleanReleaseV2ApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_manifest_build_contract",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Validate manifest build endpoint produces manifest payload linked to the target candidate."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "CleanReleaseV2ApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "TestAssistantAuthz",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 4,
      "end_line": 359,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, assistant, authz, confirmation, rbac",
        "PURPOSE": "Verify assistant confirmation ownership, expiration, and deny behavior for restricted users.",
        "LAYER": "UI (API Tests)",
        "INVARIANT": "Security-sensitive flows fail closed for unauthorized actors.",
        "DEBT": "Divergent _FakeTaskManager definition. Canonical version should be in conftest.py. Authz variant is missing get_all_tasks().",
        "CONTRACT": "Partial ConfigManager stub for authz tests. Missing: get_config()."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.api.routes.assistant"
        }
      ],
      "children": [
        {
          "name": "_run_async",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 47,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Execute async endpoint handler in synchronous test context.",
            "PRE": "coroutine is awaitable endpoint invocation.",
            "POST": "Returns coroutine result or raises propagated exception."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_FakeTask",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 63,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Lightweight task model used for assistant authz tests.",
            "PRE": "task_id is non-empty string.",
            "POST": "Returns task with provided id, status, and user_id accessible as attributes."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_FakeTaskManager",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 95,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "In-memory task manager double that records assistant-created tasks deterministically.",
            "INVARIANT": "Only create_task/get_task/get_tasks behavior used by assistant authz routes is emulated."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_FakeConfigManager",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 117,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Provide deterministic environment aliases required by intent parsing.",
            "PRE": "No external config or DB state is required.",
            "POST": "get_environments() returns two deterministic SimpleNamespace stubs with id/name.",
            "INVARIANT": "get_config() is absent; only get_environments() is emulated. Safe only for routes that do not invoke get_config() on the injected ConfigManager \u2014 verify against assistant.py route handler code before adding new test cases that use this fake."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_admin_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 129,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Build admin principal fixture.",
            "PRE": "Test requires privileged principal for risky operations.",
            "POST": "Returns admin-like user stub with Admin role."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_other_admin_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 130,
          "end_line": 141,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Build second admin principal fixture for ownership tests.",
            "PRE": "Ownership mismatch scenario needs distinct authenticated actor.",
            "POST": "Returns alternate admin-like user stub."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_limited_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 142,
          "end_line": 153,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Build limited principal without required assistant execution privileges.",
            "PRE": "Permission denial scenario needs non-admin actor.",
            "POST": "Returns restricted user stub."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_FakeQuery",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 156,
          "end_line": 190,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Minimal chainable query object for fake DB interactions.",
            "INVARIANT": "filter() is predicate-blind; returns all records regardless of user_id scope"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_FakeDb",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 191,
          "end_line": 239,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "In-memory DB session double constrained to assistant message/confirmation/audit persistence paths.",
            "INVARIANT": "query/add/merge are intentionally narrow and must not claim full SQLAlchemy Session semantics."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_clear_assistant_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 240,
          "end_line": 253,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Reset assistant process-local state between test cases.",
            "PRE": "Assistant globals may contain state from prior tests.",
            "POST": "Assistant in-memory state dictionaries are cleared."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_confirmation_owner_mismatch_returns_403",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 256,
          "end_line": 292,
          "tags": {
            "PURPOSE": "Confirm endpoint should reject requests from user that does not own the confirmation token.",
            "PRE": "Confirmation token is created by first admin actor.",
            "POST": "Second actor receives 403 on confirm operation."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_expired_confirmation_cannot_be_confirmed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 295,
          "end_line": 334,
          "tags": {
            "PURPOSE": "Expired confirmation token should be rejected and not create task.",
            "PRE": "Confirmation token exists and is manually expired before confirm request.",
            "POST": "Confirm endpoint raises 400 and no task is created."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_limited_user_cannot_launch_restricted_operation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 337,
          "end_line": 358,
          "tags": {
            "PURPOSE": "Limited user should receive denied state for privileged operation.",
            "PRE": "Restricted user attempts dangerous deploy command.",
            "POST": "Assistant returns denied state and does not execute operation."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAssistantAuthz"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_all_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_environments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_config",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 162,
          "end_line": 162,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "order_by",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 169,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "first",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 172,
          "end_line": 172,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 175,
          "end_line": 175,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "limit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 178,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "offset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 182,
          "end_line": 182,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 186,
          "end_line": 186,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 197,
          "end_line": 197,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "add",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 202,
          "end_line": 202,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "merge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 211,
          "end_line": 211,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "query",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 223,
          "end_line": 223,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "commit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 232,
          "end_line": 232,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "rollback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 235,
          "end_line": 235,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 356 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 4
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "CleanReleaseV2ReleaseApiTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 127,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "API contract test scaffolding for clean release approval and publication endpoints.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.api.routes.clean_release_v2"
        }
      ],
      "children": [
        {
          "name": "_seed_candidate_and_passed_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Seed repository with approvable candidate and passed report for release endpoint contracts."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "CleanReleaseV2ReleaseApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_release_approve_and_publish_revoke_contract",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Verify approve, publish, and revoke endpoints preserve expected release lifecycle contract."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "CleanReleaseV2ReleaseApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_release_reject_contract",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 126,
          "tags": {
            "PURPOSE": "Verify reject endpoint returns successful rejection decision payload."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "CleanReleaseV2ReleaseApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "ConnectionsRoutesTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 87,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Verifies connection routes bootstrap their table before CRUD access.",
        "LAYER": "API",
        "SIDE_EFFECT_WARNING": "os.environ mutation at module import time \u2014 no teardown. This bleeds into all subsequently collected tests. Migrate to pytest.fixture(autouse=True) with monkeypatch.setenv."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "ConnectionsRouter"
        }
      ],
      "children": [
        {
          "name": "test_list_connections_bootstraps_missing_table",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Ensure listing connections auto-creates missing table and returns empty payload."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "ConnectionsRoutesTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_connection_bootstraps_missing_table",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Ensure connection creation bootstraps table and persists returned connection fields."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "ConnectionsRoutesTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "db_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "TestGitApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "API tests for Git configurations and repository operations."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "GitApi"
        }
      ],
      "children": [
        {
          "name": "DbMock",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 87,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "In-memory session double for git route tests with minimal query/filter persistence semantics.",
            "INVARIANT": "Supports only the SQLAlchemy-like operations exercised by this test module."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_git_configs_masks_pat",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 119,
          "tags": {
            "PURPOSE": "Validate listing git configs masks stored PAT values in API-facing responses."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_git_config_persists_config",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 152,
          "tags": {
            "PURPOSE": "Validate creating git config persists supplied server attributes in backing session."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_update_git_config_modifies_record",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 157,
          "end_line": null,
          "tags": {
            "PURPOSE": "Validate updating git config modifies mutable fields while preserving masked PAT semantics."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitApi"
            }
          ],
          "children": [
            {
              "name": "SingleConfigDbMock",
              "type": "Class",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 176,
              "end_line": null,
              "tags": {},
              "relations": [],
              "children": [
                {
                  "name": "test_update_git_config_raises_404_if_not_found",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 212,
                  "end_line": 234,
                  "tags": {
                    "PURPOSE": "Validate updating non-existent git config raises HTTP 404 contract response."
                  },
                  "relations": [
                    {
                      "type": "BINDS_TO",
                      "target": "TestGitApi"
                    }
                  ],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                },
                {
                  "name": "test_delete_git_config_removes_record",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 237,
                  "end_line": null,
                  "tags": {
                    "PURPOSE": "Validate deleting existing git config removes record and returns success payload."
                  },
                  "relations": [
                    {
                      "type": "BINDS_TO",
                      "target": "TestGitApi"
                    }
                  ],
                  "children": [
                    {
                      "name": "SingleConfigDbMock",
                      "type": "Class",
                      "complexity": 1,
                      "tier": "TRIVIAL",
                      "start_line": 247,
                      "end_line": null,
                      "tags": {},
                      "relations": [],
                      "children": [
                        {
                          "name": "test_test_git_config_validates_connection_successfully",
                          "type": "Function",
                          "complexity": 1,
                          "tier": "TRIVIAL",
                          "start_line": 275,
                          "end_line": null,
                          "tags": {
                            "PURPOSE": "Validate test-connection endpoint returns success when provider connectivity check passes."
                          },
                          "relations": [
                            {
                              "type": "BINDS_TO",
                              "target": "TestGitApi"
                            }
                          ],
                          "children": [
                            {
                              "name": "MockGitService",
                              "type": "Class",
                              "complexity": 1,
                              "tier": "TRIVIAL",
                              "start_line": 284,
                              "end_line": null,
                              "tags": {},
                              "relations": [],
                              "children": [
                                {
                                  "name": "test_test_git_config_fails_validation",
                                  "type": "Function",
                                  "complexity": 1,
                                  "tier": "TRIVIAL",
                                  "start_line": 308,
                                  "end_line": null,
                                  "tags": {
                                    "PURPOSE": "Validate test-connection endpoint raises HTTP 400 when provider connectivity check fails."
                                  },
                                  "relations": [
                                    {
                                      "type": "BINDS_TO",
                                      "target": "TestGitApi"
                                    }
                                  ],
                                  "children": [
                                    {
                                      "name": "MockGitService",
                                      "type": "Class",
                                      "complexity": 1,
                                      "tier": "TRIVIAL",
                                      "start_line": 317,
                                      "end_line": null,
                                      "tags": {},
                                      "relations": [],
                                      "children": [
                                        {
                                          "name": "test_list_gitea_repositories_returns_payload",
                                          "type": "Function",
                                          "complexity": 1,
                                          "tier": "TRIVIAL",
                                          "start_line": 343,
                                          "end_line": null,
                                          "tags": {
                                            "PURPOSE": "Validate gitea repositories endpoint returns normalized list for GITEA provider configs."
                                          },
                                          "relations": [
                                            {
                                              "type": "BINDS_TO",
                                              "target": "TestGitApi"
                                            }
                                          ],
                                          "children": [
                                            {
                                              "name": "MockGitService",
                                              "type": "Class",
                                              "complexity": 1,
                                              "tier": "TRIVIAL",
                                              "start_line": 352,
                                              "end_line": null,
                                              "tags": {},
                                              "relations": [],
                                              "children": [
                                                {
                                                  "name": "test_list_gitea_repositories_rejects_non_gitea",
                                                  "type": "Function",
                                                  "complexity": 1,
                                                  "tier": "TRIVIAL",
                                                  "start_line": 381,
                                                  "end_line": 405,
                                                  "tags": {
                                                    "PURPOSE": "Validate gitea repositories endpoint rejects non-GITEA providers with HTTP 400."
                                                  },
                                                  "relations": [
                                                    {
                                                      "type": "BINDS_TO",
                                                      "target": "TestGitApi"
                                                    }
                                                  ],
                                                  "children": [],
                                                  "compliance": {
                                                    "valid": true,
                                                    "issues": [],
                                                    "score": 1.0
                                                  }
                                                },
                                                {
                                                  "name": "test_create_remote_repository_creates_provider_repo",
                                                  "type": "Function",
                                                  "complexity": 1,
                                                  "tier": "TRIVIAL",
                                                  "start_line": 408,
                                                  "end_line": null,
                                                  "tags": {
                                                    "PURPOSE": "Validate remote repository creation endpoint maps provider response into normalized payload."
                                                  },
                                                  "relations": [
                                                    {
                                                      "type": "BINDS_TO",
                                                      "target": "TestGitApi"
                                                    }
                                                  ],
                                                  "children": [
                                                    {
                                                      "name": "MockGitService",
                                                      "type": "Class",
                                                      "complexity": 1,
                                                      "tier": "TRIVIAL",
                                                      "start_line": 417,
                                                      "end_line": null,
                                                      "tags": {},
                                                      "relations": [],
                                                      "children": [
                                                        {
                                                          "name": "test_init_repository_initializes_and_saves_binding",
                                                          "type": "Function",
                                                          "complexity": 1,
                                                          "tier": "TRIVIAL",
                                                          "start_line": 456,
                                                          "end_line": null,
                                                          "tags": {
                                                            "PURPOSE": "Validate repository initialization endpoint creates local repo and persists dashboard binding."
                                                          },
                                                          "relations": [
                                                            {
                                                              "type": "BINDS_TO",
                                                              "target": "TestGitApi"
                                                            }
                                                          ],
                                                          "children": [
                                                            {
                                                              "name": "MockGitService",
                                                              "type": "Class",
                                                              "complexity": 1,
                                                              "tier": "TRIVIAL",
                                                              "start_line": 466,
                                                              "end_line": null,
                                                              "tags": {},
                                                              "relations": [],
                                                              "children": [],
                                                              "compliance": {
                                                                "valid": false,
                                                                "issues": [
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  },
                                                                  {
                                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 466",
                                                                    "severity": "ERROR",
                                                                    "line_number": 466
                                                                  }
                                                                ],
                                                                "score": 0.0
                                                              }
                                                            }
                                                          ],
                                                          "compliance": {
                                                            "valid": false,
                                                            "issues": [
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              },
                                                              {
                                                                "message": "Unclosed Anchor: [DEF:test_init_repository_initializes_and_saves_binding:Function] started at line 456",
                                                                "severity": "ERROR",
                                                                "line_number": 456
                                                              }
                                                            ],
                                                            "score": 0.0
                                                          }
                                                        }
                                                      ],
                                                      "compliance": {
                                                        "valid": false,
                                                        "issues": [
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          },
                                                          {
                                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 417",
                                                            "severity": "ERROR",
                                                            "line_number": 417
                                                          }
                                                        ],
                                                        "score": 0.0
                                                      }
                                                    }
                                                  ],
                                                  "compliance": {
                                                    "valid": false,
                                                    "issues": [
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      },
                                                      {
                                                        "message": "Unclosed Anchor: [DEF:test_create_remote_repository_creates_provider_repo:Function] started at line 408",
                                                        "severity": "ERROR",
                                                        "line_number": 408
                                                      }
                                                    ],
                                                    "score": 0.0
                                                  }
                                                }
                                              ],
                                              "compliance": {
                                                "valid": false,
                                                "issues": [
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 352",
                                                    "severity": "ERROR",
                                                    "line_number": 352
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 352",
                                                    "severity": "ERROR",
                                                    "line_number": 352
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 352",
                                                    "severity": "ERROR",
                                                    "line_number": 352
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 352",
                                                    "severity": "ERROR",
                                                    "line_number": 352
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 352",
                                                    "severity": "ERROR",
                                                    "line_number": 352
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 352",
                                                    "severity": "ERROR",
                                                    "line_number": 352
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 352",
                                                    "severity": "ERROR",
                                                    "line_number": 352
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 352",
                                                    "severity": "ERROR",
                                                    "line_number": 352
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 352",
                                                    "severity": "ERROR",
                                                    "line_number": 352
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 352",
                                                    "severity": "ERROR",
                                                    "line_number": 352
                                                  },
                                                  {
                                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 352",
                                                    "severity": "ERROR",
                                                    "line_number": 352
                                                  }
                                                ],
                                                "score": 0.0
                                              }
                                            }
                                          ],
                                          "compliance": {
                                            "valid": false,
                                            "issues": [
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_list_gitea_repositories_returns_payload:Function] started at line 343",
                                                "severity": "ERROR",
                                                "line_number": 343
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_list_gitea_repositories_returns_payload:Function] started at line 343",
                                                "severity": "ERROR",
                                                "line_number": 343
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_list_gitea_repositories_returns_payload:Function] started at line 343",
                                                "severity": "ERROR",
                                                "line_number": 343
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_list_gitea_repositories_returns_payload:Function] started at line 343",
                                                "severity": "ERROR",
                                                "line_number": 343
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_list_gitea_repositories_returns_payload:Function] started at line 343",
                                                "severity": "ERROR",
                                                "line_number": 343
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_list_gitea_repositories_returns_payload:Function] started at line 343",
                                                "severity": "ERROR",
                                                "line_number": 343
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_list_gitea_repositories_returns_payload:Function] started at line 343",
                                                "severity": "ERROR",
                                                "line_number": 343
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_list_gitea_repositories_returns_payload:Function] started at line 343",
                                                "severity": "ERROR",
                                                "line_number": 343
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_list_gitea_repositories_returns_payload:Function] started at line 343",
                                                "severity": "ERROR",
                                                "line_number": 343
                                              },
                                              {
                                                "message": "Unclosed Anchor: [DEF:test_list_gitea_repositories_returns_payload:Function] started at line 343",
                                                "severity": "ERROR",
                                                "line_number": 343
                                              }
                                            ],
                                            "score": 0.0
                                          }
                                        }
                                      ],
                                      "compliance": {
                                        "valid": false,
                                        "issues": [
                                          {
                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 317",
                                            "severity": "ERROR",
                                            "line_number": 317
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 317",
                                            "severity": "ERROR",
                                            "line_number": 317
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 317",
                                            "severity": "ERROR",
                                            "line_number": 317
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 317",
                                            "severity": "ERROR",
                                            "line_number": 317
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 317",
                                            "severity": "ERROR",
                                            "line_number": 317
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 317",
                                            "severity": "ERROR",
                                            "line_number": 317
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 317",
                                            "severity": "ERROR",
                                            "line_number": 317
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 317",
                                            "severity": "ERROR",
                                            "line_number": 317
                                          },
                                          {
                                            "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 317",
                                            "severity": "ERROR",
                                            "line_number": 317
                                          }
                                        ],
                                        "score": 0.0
                                      }
                                    }
                                  ],
                                  "compliance": {
                                    "valid": false,
                                    "issues": [
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_test_git_config_fails_validation:Function] started at line 308",
                                        "severity": "ERROR",
                                        "line_number": 308
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_test_git_config_fails_validation:Function] started at line 308",
                                        "severity": "ERROR",
                                        "line_number": 308
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_test_git_config_fails_validation:Function] started at line 308",
                                        "severity": "ERROR",
                                        "line_number": 308
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_test_git_config_fails_validation:Function] started at line 308",
                                        "severity": "ERROR",
                                        "line_number": 308
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_test_git_config_fails_validation:Function] started at line 308",
                                        "severity": "ERROR",
                                        "line_number": 308
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_test_git_config_fails_validation:Function] started at line 308",
                                        "severity": "ERROR",
                                        "line_number": 308
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_test_git_config_fails_validation:Function] started at line 308",
                                        "severity": "ERROR",
                                        "line_number": 308
                                      },
                                      {
                                        "message": "Unclosed Anchor: [DEF:test_test_git_config_fails_validation:Function] started at line 308",
                                        "severity": "ERROR",
                                        "line_number": 308
                                      }
                                    ],
                                    "score": 0.0
                                  }
                                }
                              ],
                              "compliance": {
                                "valid": false,
                                "issues": [
                                  {
                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 284",
                                    "severity": "ERROR",
                                    "line_number": 284
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 284",
                                    "severity": "ERROR",
                                    "line_number": 284
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 284",
                                    "severity": "ERROR",
                                    "line_number": 284
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 284",
                                    "severity": "ERROR",
                                    "line_number": 284
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 284",
                                    "severity": "ERROR",
                                    "line_number": 284
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 284",
                                    "severity": "ERROR",
                                    "line_number": 284
                                  },
                                  {
                                    "message": "Unclosed Anchor: [DEF:MockGitService:Class] started at line 284",
                                    "severity": "ERROR",
                                    "line_number": 284
                                  }
                                ],
                                "score": 0.0
                              }
                            }
                          ],
                          "compliance": {
                            "valid": false,
                            "issues": [
                              {
                                "message": "Unclosed Anchor: [DEF:test_test_git_config_validates_connection_successfully:Function] started at line 275",
                                "severity": "ERROR",
                                "line_number": 275
                              },
                              {
                                "message": "Unclosed Anchor: [DEF:test_test_git_config_validates_connection_successfully:Function] started at line 275",
                                "severity": "ERROR",
                                "line_number": 275
                              },
                              {
                                "message": "Unclosed Anchor: [DEF:test_test_git_config_validates_connection_successfully:Function] started at line 275",
                                "severity": "ERROR",
                                "line_number": 275
                              },
                              {
                                "message": "Unclosed Anchor: [DEF:test_test_git_config_validates_connection_successfully:Function] started at line 275",
                                "severity": "ERROR",
                                "line_number": 275
                              },
                              {
                                "message": "Unclosed Anchor: [DEF:test_test_git_config_validates_connection_successfully:Function] started at line 275",
                                "severity": "ERROR",
                                "line_number": 275
                              },
                              {
                                "message": "Unclosed Anchor: [DEF:test_test_git_config_validates_connection_successfully:Function] started at line 275",
                                "severity": "ERROR",
                                "line_number": 275
                              }
                            ],
                            "score": 0.0
                          }
                        }
                      ],
                      "compliance": {
                        "valid": false,
                        "issues": [
                          {
                            "message": "Unclosed Anchor: [DEF:SingleConfigDbMock:Class] started at line 247",
                            "severity": "ERROR",
                            "line_number": 247
                          },
                          {
                            "message": "Unclosed Anchor: [DEF:SingleConfigDbMock:Class] started at line 247",
                            "severity": "ERROR",
                            "line_number": 247
                          },
                          {
                            "message": "Unclosed Anchor: [DEF:SingleConfigDbMock:Class] started at line 247",
                            "severity": "ERROR",
                            "line_number": 247
                          },
                          {
                            "message": "Unclosed Anchor: [DEF:SingleConfigDbMock:Class] started at line 247",
                            "severity": "ERROR",
                            "line_number": 247
                          },
                          {
                            "message": "Unclosed Anchor: [DEF:SingleConfigDbMock:Class] started at line 247",
                            "severity": "ERROR",
                            "line_number": 247
                          }
                        ],
                        "score": 0.0
                      }
                    }
                  ],
                  "compliance": {
                    "valid": false,
                    "issues": [
                      {
                        "message": "Unclosed Anchor: [DEF:test_delete_git_config_removes_record:Function] started at line 237",
                        "severity": "ERROR",
                        "line_number": 237
                      },
                      {
                        "message": "Unclosed Anchor: [DEF:test_delete_git_config_removes_record:Function] started at line 237",
                        "severity": "ERROR",
                        "line_number": 237
                      },
                      {
                        "message": "Unclosed Anchor: [DEF:test_delete_git_config_removes_record:Function] started at line 237",
                        "severity": "ERROR",
                        "line_number": 237
                      },
                      {
                        "message": "Unclosed Anchor: [DEF:test_delete_git_config_removes_record:Function] started at line 237",
                        "severity": "ERROR",
                        "line_number": 237
                      }
                    ],
                    "score": 0.0
                  }
                }
              ],
              "compliance": {
                "valid": false,
                "issues": [
                  {
                    "message": "Unclosed Anchor: [DEF:SingleConfigDbMock:Class] started at line 176",
                    "severity": "ERROR",
                    "line_number": 176
                  },
                  {
                    "message": "Unclosed Anchor: [DEF:SingleConfigDbMock:Class] started at line 176",
                    "severity": "ERROR",
                    "line_number": 176
                  },
                  {
                    "message": "Unclosed Anchor: [DEF:SingleConfigDbMock:Class] started at line 176",
                    "severity": "ERROR",
                    "line_number": 176
                  }
                ],
                "score": 0.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Unclosed Anchor: [DEF:test_update_git_config_modifies_record:Function] started at line 157",
                "severity": "ERROR",
                "line_number": 157
              },
              {
                "message": "Unclosed Anchor: [DEF:test_update_git_config_modifies_record:Function] started at line 157",
                "severity": "ERROR",
                "line_number": 157
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "query",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "first",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "add",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "commit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refresh",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "query",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 178,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 181,
          "end_line": 181,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "first",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 184,
          "end_line": 184,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "commit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 187,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refresh",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 190,
          "end_line": 190,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "query",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 249,
          "end_line": 249,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 252,
          "end_line": 252,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "first",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 255,
          "end_line": 255,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "delete",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 258,
          "end_line": 258,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "commit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 261,
          "end_line": 261,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_connection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 286,
          "end_line": 286,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_connection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 319,
          "end_line": 319,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_gitea_repositories",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 354,
          "end_line": 354,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_gitlab_repository",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 419,
          "end_line": 419,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "init_repo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 468,
          "end_line": 468,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_repo_path",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 471,
          "end_line": 471,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:TestGitApi:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "AssistantApiTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 4,
      "end_line": 564,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, assistant, api",
        "PURPOSE": "Validate assistant API endpoint logic via direct async handler invocation.",
        "INVARIANT": "Every test clears assistant in-memory state before execution.",
        "DEBT": "Divergent _FakeTaskManager definition. Canonical version should be in conftest.py. Authz variant is missing get_all_tasks()."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.api.routes.assistant"
        }
      ],
      "children": [
        {
          "name": "_run_async",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 46,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_FakeTask",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 74,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Lightweight task model stub used as return value from _FakeTaskManager.create_task in assistant route tests.",
            "INVARIANT": "status is a bare string not a TaskStatus enum; callers must not depend on enum semantics."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_FakeTaskManager",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 111,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "In-memory task manager stub that records created tasks for route-level assertions.",
            "INVARIANT": "create_task stores tasks retrievable by get_task/get_tasks without external side effects."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_FakeConfigManager",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 140,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Deterministic config stub providing hardcoded dev/prod environments and minimal settings shape for assistant route tests.",
            "INVARIANT": "get_config() returns anonymous inner classes, not real GlobalSettings; only default_environment_id and llm fields are safe to access."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_admin_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 143,
          "end_line": 157,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Build admin principal with spec=User for assistant route authorization tests."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_limited_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 172,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Build limited user principal with empty roles for assistant route denial tests."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_FakeQuery",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 175,
          "end_line": 215,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Chainable SQLAlchemy-like query stub returning fixed item lists for assistant message persistence paths.",
            "INVARIANT": "filter() is predicate-blind; returns all records regardless of user_id scope"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_FakeDb",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 218,
          "end_line": 251,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Explicit in-memory DB session double limited to assistant message persistence paths.",
            "INVARIANT": "query() always returns _FakeQuery with intentionally non-evaluated predicates; add/merge stay deterministic and never emulate unrelated SQLAlchemy behavior."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_clear_assistant_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 254,
          "end_line": 263,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_dataset_review_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 266,
          "end_line": 367,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Build minimal owned dataset-review session fixture for assistant scoped routing tests."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_await_none",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 370,
          "end_line": 378,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Async helper returning None for planner fallback tests."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_unknown_command_returns_needs_clarification",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 381,
          "end_line": 405,
          "tags": {
            "PURPOSE": "Unknown command should return clarification state and unknown intent."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_capabilities_question_returns_successful_help",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 408,
          "end_line": 429,
          "tags": {
            "PURPOSE": "Capability query should return deterministic help response."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_assistant_message_request_accepts_dataset_review_session_binding",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 432,
          "end_line": 444,
          "tags": {
            "PURPOSE": "Assistant request schema should accept active dataset review session binding for scoped orchestration."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_dataset_review_scoped_message_uses_masked_filter_context",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 447,
          "end_line": 492,
          "tags": {
            "PURPOSE": "Session-scoped assistant context should mask imported-filter raw values before assistant-visible metadata is persisted."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_dataset_review_scoped_command_returns_confirmation_for_mapping_approval",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 495,
          "end_line": 525,
          "tags": {
            "PURPOSE": "Session-scoped assistant commands should route dataset-review mapping approvals into confirmation workflow with bound session metadata."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_dataset_review_scoped_command_routes_field_semantics_update",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 528,
          "end_line": 559,
          "tags": {
            "PURPOSE": "Session-scoped assistant commands should route semantic field updates through explicit confirmation metadata."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "AssistantApiTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 87,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 99,
          "end_line": 99,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_all_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_environments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 125,
          "end_line": 125,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_config",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 181,
          "end_line": 181,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "outerjoin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 184,
          "end_line": 184,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "options",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 187,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 190,
          "end_line": 190,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "order_by",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 194,
          "end_line": 194,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "limit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 197,
          "end_line": 197,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "offset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 201,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "first",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 205,
          "end_line": 205,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 208,
          "end_line": 208,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 211,
          "end_line": 211,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 224,
          "end_line": 224,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "query",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 228,
          "end_line": 228,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "add",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 235,
          "end_line": 235,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "commit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 238,
          "end_line": 238,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "rollback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 241,
          "end_line": 241,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "merge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 244,
          "end_line": 244,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "refresh",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 247,
          "end_line": 247,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_fake_dispatch_dataset_review_intent",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 460,
          "end_line": 460,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 4
          },
          {
            "message": "Fractal limit warning: Module length is 561 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 4
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "TestMigrationRoutes",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 656,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for migration API route handlers.",
        "LAYER": "API",
        "SIDE_EFFECT_WARNING": "os.environ mutation at module import time \u2014 no teardown. This bleeds into all subsequently collected tests. Migrate to pytest.fixture(autouse=True) with monkeypatch.setenv.",
        "TEST_EDGE": "breaking_reference -> validates high risk on missing dataset link"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "backend.src.api.routes.migration"
        }
      ],
      "children": [
        {
          "name": "_make_config_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 79,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationRoutes"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_mock_env",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 332,
          "end_line": 347,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationRoutes"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_sync_config_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 350,
          "end_line": 365,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationRoutes"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "db_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_migration_settings_returns_default_cron",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_migration_settings_returns_fallback_when_no_cron",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_update_migration_settings_saves_cron",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 113,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_update_migration_settings_rejects_missing_cron",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_resource_mappings_returns_formatted_list",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 148,
          "end_line": 148,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_resource_mappings_respects_pagination",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 185,
          "end_line": 185,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_resource_mappings_search_by_name",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 215,
          "end_line": 215,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_resource_mappings_filter_by_env",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 253,
          "end_line": 253,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_resource_mappings_filter_by_type",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 291,
          "end_line": 291,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_trigger_sync_now_creates_env_row_and_syncs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 369,
          "end_line": 369,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_trigger_sync_now_rejects_empty_environments",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 403,
          "end_line": 403,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_trigger_sync_now_handles_partial_failure",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 417,
          "end_line": 417,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_trigger_sync_now_idempotent_env_upsert",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 452,
          "end_line": 452,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 474,
          "end_line": 474,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_invalid_env_raises_404",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 490,
          "end_line": 490,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_execute_migration_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 504,
          "end_line": 504,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_execute_migration_invalid_env_raises_400",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 524,
          "end_line": 524,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_dry_run_migration_returns_diff_and_risk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 541,
          "end_line": 541,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_dry_run_migration_rejects_same_environment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 631,
          "end_line": 631,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 656 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.4
      }
    },
    {
      "name": "ConfigModels",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 53,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "database, config, settings, sqlalchemy, notification",
        "PURPOSE": "Defines SQLAlchemy persistence models for application and notification configuration records.",
        "LAYER": "Domain",
        "INVARIANT": "Configuration payload and notification credentials must remain persisted as non-null JSON documents."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "MappingModels:Base"
        }
      ],
      "children": [
        {
          "name": "AppConfigRecord",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 17,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Stores persisted application configuration as a single authoritative record model.",
            "PRE": "SQLAlchemy declarative Base is initialized and table metadata registration is active.",
            "POST": "ORM table 'app_configurations' exposes id, payload, and updated_at fields with declared nullability/default semantics.",
            "SIDE_EFFECT": "Registers ORM mapping metadata during module import.",
            "DATA_CONTRACT": "Input -> persistence row {id:str, payload:json, updated_at:datetime}; Output -> AppConfigRecord ORM entity."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 17
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 17
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 17
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 17
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 17
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 17
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "NotificationConfig",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 33,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Stores persisted provider-level notification configuration and encrypted credentials metadata.",
            "PRE": "SQLAlchemy declarative Base is initialized and uuid generation is available at instance creation time.",
            "POST": "ORM table 'notification_configs' exposes id, type, name, credentials, is_active, created_at, updated_at fields with declared constraints/defaults.",
            "SIDE_EFFECT": "Registers ORM mapping metadata during module import; may generate UUID values for new entity instances.",
            "DATA_CONTRACT": "Input -> persistence row {id:str, type:str, name:str, credentials:json, is_active:bool, created_at:datetime, updated_at:datetime}; Output -> NotificationConfig ORM entity."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 33
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 33
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 33
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 33
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 33
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 33
              }
            ],
            "score": 0.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "LlmModels",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 68,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "llm, models, sqlalchemy, persistence",
        "PURPOSE": "SQLAlchemy models for LLM provider configuration and validation results.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "INHERITS_FROM",
          "target": "MappingModels:Base"
        }
      ],
      "children": [
        {
          "name": "ValidationPolicy",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Defines a scheduled rule for validating a group of dashboards within an execution window."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LLMProvider",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 49,
          "tags": {
            "PURPOSE": "SQLAlchemy model for LLM provider configuration."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ValidationRecord",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 66,
          "tags": {
            "PURPOSE": "SQLAlchemy model for dashboard validation history."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "generate_uuid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: INHERITS_FROM. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "GitModels",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 74,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "git, models, sqlalchemy, database, schema",
        "PURPOSE": "Git-specific SQLAlchemy models for configuration and repository tracking.",
        "LAYER": "Model",
        "RELATION": "specs/011-git-integration-dashboard/data-model.md"
      },
      "relations": [],
      "children": [
        {
          "name": "GitServerConfig",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 44,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Configuration for a Git server connection."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "GitRepository",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 59,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Tracking for a local Git repository linked to a dashboard."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DeploymentEnvironment",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 72,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Target Superset environments for dashboard deployment."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TaskModels",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 116,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "database, task, record, sqlalchemy, sqlite",
        "PURPOSE": "Defines the database schema for task execution records.",
        "LAYER": "Domain",
        "INVARIANT": "All primary keys are UUID strings."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "sqlalchemy"
        }
      ],
      "children": [
        {
          "name": "TaskRecord",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 35,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Represents a persistent record of a task execution."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TaskLogRecord",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 37,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Represents a single persistent log entry for a task.",
            "COMPLEXITY": "3",
            "INVARIANT": "Each log entry belongs to exactly one task.",
            "TEST_CONTRACT": "TaskLogCreate ->",
            "TEST_FIXTURE": "basic_info_log ->",
            "TEST_EDGE": "empty_message ->",
            "TEST_INVARIANT": "exact_one_task_association -> verifies: [basic_info_log, missing_required_field]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TaskRecord"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ConnectionModels",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 36,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "database, connection, configuration, sqlalchemy, sqlite",
        "PURPOSE": "Defines the database schema for external database connection configurations.",
        "LAYER": "Domain",
        "INVARIANT": "All primary keys are UUID strings."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "sqlalchemy"
        }
      ],
      "children": [
        {
          "name": "ConnectionConfig",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 34,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Stores credentials for external databases used for column mapping."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "DatasetReviewModels",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 983,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset_review, session, profile, findings, semantics, clarification, execution, sqlalchemy",
        "PURPOSE": "SQLAlchemy models for the dataset review orchestration flow.",
        "LAYER": "Domain",
        "INVARIANT": "Session and profile entities are strictly scoped to an authenticated user."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AuthModels"
        },
        {
          "type": "DEPENDS_ON",
          "target": "MappingModels"
        }
      ],
      "children": [
        {
          "name": "SessionStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 43,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SessionPhase",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 59,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ReadinessState",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 79,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RecommendedAction",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 97,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SessionCollaboratorRole",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 107,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SessionCollaborator",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 110,
          "end_line": 126,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatasetReviewSession",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 211,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "BusinessSummarySource",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 214,
          "end_line": 223,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ConfidenceState",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 226,
          "end_line": 235,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatasetProfile",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 238,
          "end_line": 270,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "FindingArea",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 273,
          "end_line": 286,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "FindingSeverity",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 289,
          "end_line": 296,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ResolutionState",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 299,
          "end_line": 309,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ValidationFinding",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 312,
          "end_line": 336,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SemanticSourceType",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 339,
          "end_line": 348,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TrustLevel",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 351,
          "end_line": 359,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SemanticSourceStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 362,
          "end_line": 372,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SemanticSource",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 375,
          "end_line": 399,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "FieldKind",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 402,
          "end_line": 410,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "FieldProvenance",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 413,
          "end_line": 423,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SemanticFieldEntry",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 426,
          "end_line": 461,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CandidateMatchType",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 464,
          "end_line": 472,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CandidateStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 475,
          "end_line": 483,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SemanticCandidate",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 486,
          "end_line": 509,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "FilterSource",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 512,
          "end_line": 522,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "FilterConfidenceState",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 525,
          "end_line": 534,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "FilterRecoveryStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 537,
          "end_line": 545,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ImportedFilter",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 548,
          "end_line": 574,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "VariableKind",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 577,
          "end_line": 585,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MappingStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 588,
          "end_line": 597,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TemplateVariable",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 600,
          "end_line": 624,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MappingMethod",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 627,
          "end_line": 635,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MappingWarningLevel",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 638,
          "end_line": 645,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ApprovalState",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 648,
          "end_line": 656,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ExecutionMapping",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 659,
          "end_line": 688,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 691,
          "end_line": 700,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationSession",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 703,
          "end_line": 738,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "QuestionState",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 741,
          "end_line": 750,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationQuestion",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 753,
          "end_line": 788,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationOption",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 791,
          "end_line": 807,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "AnswerKind",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 810,
          "end_line": 818,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationAnswer",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 821,
          "end_line": 842,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "PreviewStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 845,
          "end_line": 853,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CompiledPreview",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 856,
          "end_line": 878,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LaunchStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 881,
          "end_line": 888,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatasetRunContext",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 891,
          "end_line": 915,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SessionEvent",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 918,
          "end_line": 940,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ArtifactType",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 943,
          "end_line": 950,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ArtifactFormat",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 953,
          "end_line": 961,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ExportArtifact",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 964,
          "end_line": 981,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 983 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "MappingModels",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 104,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "database, mapping, environment, migration, sqlalchemy, sqlite",
        "PURPOSE": "Defines the database schema for environment metadata and database mappings using SQLAlchemy.",
        "LAYER": "Domain",
        "INVARIANT": "All primary keys are UUID strings.",
        "CONSTRAINT": "source_env_id and target_env_id must be valid environment IDs."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "sqlalchemy"
        }
      ],
      "children": [
        {
          "name": "ResourceType",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 30,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Enumeration of possible Superset resource types for ID mapping."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "MigrationStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 42,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Enumeration of possible migration job statuses."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "Environment",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 44,
          "end_line": 55,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Represents a Superset instance environment."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "MappingModels"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "DatabaseMapping",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 57,
          "end_line": 71,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Represents a mapping between source and target databases."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 57
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 57
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "MigrationJob",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 85,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Represents a single migration execution job."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ResourceMapping",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 87,
          "end_line": 102,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Maps a universal UUID for a resource to its actual ID on a specific environment.",
            "TEST_DATA": "resource_mapping_record -> {'environment_id': 'prod-env-1', 'resource_type': 'chart', 'uuid': '123e4567-e89b-12d3-a456-426614174000', 'remote_integer_id': '42'}"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "MappingModels"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "ReportModels",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 250,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "reports, models, pydantic, normalization, pagination",
        "PURPOSE": "Canonical report schemas for unified task reporting across heterogeneous task types.",
        "LAYER": "Domain",
        "PRE": "Pydantic library and task manager models are available.",
        "POST": "Provides validated schemas for cross-plugin reporting and UI consumption.",
        "SIDE_EFFECT": "None (schema definition).",
        "DATA_CONTRACT": "Model[TaskReport, ReportCollection, ReportDetailView]",
        "INVARIANT": "Canonical report fields are always present for every report item."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TaskModels"
        }
      ],
      "children": [
        {
          "name": "TaskType",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 22,
          "end_line": 37,
          "tags": {
            "COMPLEXITY": "3",
            "INVARIANT": "Must contain valid generic task type mappings.",
            "SEMANTICS": "enum, type, task",
            "PURPOSE": "Supported normalized task report types."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ReportModels"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "ReportStatus",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 40,
          "end_line": 52,
          "tags": {
            "COMPLEXITY": "3",
            "INVARIANT": "TaskStatus enum mapping logic holds.",
            "SEMANTICS": "enum, status, task",
            "PURPOSE": "Supported normalized report status values."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 40
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 40
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "ErrorContext",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 55,
          "end_line": 79,
          "tags": {
            "COMPLEXITY": "3",
            "INVARIANT": "The properties accurately describe error state.",
            "SEMANTICS": "error, context, payload",
            "PURPOSE": "Error and recovery context for failed/partial reports.",
            "TEST_CONTRACT": "ErrorContextModel ->",
            "TEST_FIXTURE": "basic_error -> {\"message\": \"Connection timeout\", \"code\": \"ERR_504\", \"next_actions\": [\"retry\"]}",
            "TEST_EDGE": "missing_message -> {\"code\": \"ERR_504\"}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 55
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 55
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "TaskReport",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 82,
          "end_line": 138,
          "tags": {
            "COMPLEXITY": "3",
            "INVARIANT": "Must represent canonical task record attributes.",
            "SEMANTICS": "report, model, summary",
            "PURPOSE": "Canonical normalized report envelope for one task execution.",
            "TEST_CONTRACT": "TaskReportModel ->",
            "TEST_FIXTURE": "valid_task_report ->",
            "TEST_EDGE": "invalid_task_type -> {\"report_id\": \"rep-123\", \"task_id\": \"task-456\", \"task_type\": \"invalid_type\", \"status\": \"success\", \"updated_at\": \"2026-02-26T12:00:00Z\", \"summary\": \"Done\"}",
            "TEST_INVARIANT": "non_empty_validators -> verifies: [empty_report_id, empty_summary]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 82
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 82
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "ReportQuery",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 141,
          "end_line": 198,
          "tags": {
            "COMPLEXITY": "3",
            "INVARIANT": "Time and pagination queries are mutually consistent.",
            "SEMANTICS": "query, filter, search",
            "PURPOSE": "Query object for server-side report filtering, sorting, and pagination.",
            "TEST_CONTRACT": "ReportQueryModel ->",
            "TEST_FIXTURE": "valid_query -> {\"page\": 1, \"page_size\":20, \"sort_by\": \"updated_at\", \"sort_order\": \"desc\"}",
            "TEST_EDGE": "invalid_time_range -> {\"time_from\": \"2026-02-26T12:00:00Z\", \"time_to\": \"2026-02-25T12:00:00Z\"}",
            "TEST_INVARIANT": "attribute_constraints_enforced -> verifies: [invalid_page_size_large, invalid_sort_by, invalid_time_range]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 141
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 141
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "ReportCollection",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 201,
          "end_line": 225,
          "tags": {
            "COMPLEXITY": "3",
            "INVARIANT": "Represents paginated data correctly.",
            "SEMANTICS": "collection, pagination",
            "PURPOSE": "Paginated collection of normalized task reports.",
            "TEST_CONTRACT": "ReportCollectionModel ->",
            "TEST_FIXTURE": "empty_collection -> {\"items\": [], \"total\": 0, \"page\": 1, \"page_size\": 20, \"has_next\": False, \"applied_filters\": {}}",
            "TEST_EDGE": "negative_total -> {\"items\": [], \"total\": -5, \"page\": 1, \"page_size\": 20, \"has_next\": False, \"applied_filters\": {}}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 201
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 201
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "ReportDetailView",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 228,
          "end_line": 248,
          "tags": {
            "COMPLEXITY": "3",
            "INVARIANT": "Incorporates a report and logs correctly.",
            "SEMANTICS": "view, detail, logs",
            "PURPOSE": "Detailed report representation including diagnostics and recovery actions.",
            "TEST_CONTRACT": "ReportDetailViewModel ->",
            "TEST_FIXTURE": "valid_detail -> {\"report\": {\"report_id\": \"rep-1\", \"task_id\": \"task-1\", \"task_type\": \"backup\", \"status\": \"success\", \"updated_at\": \"2026-02-26T12:00:00Z\", \"summary\": \"Done\"}}",
            "TEST_EDGE": "missing_report -> {}"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 228
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 228
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "_non_empty_str",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 132,
          "end_line": 132,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_validate_sort_by",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 178,
          "end_line": 178,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_validate_sort_order",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 186,
          "end_line": 186,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_validate_time_range",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 192,
          "end_line": 192,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "FilterStateModels",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 151,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "superset, native, filters, pydantic, models, dataclasses",
        "PURPOSE": "Pydantic models for Superset native filter state extraction and restoration.",
        "LAYER": "Models"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "pydantic"
        }
      ],
      "children": [
        {
          "name": "FilterState",
          "type": "Model",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 27,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Represents the state of a single native filter.",
            "DATA_CONTRACT": "Input[extraFormData: Dict, filterState: Dict, ownState: Optional[Dict]] -> Model[FilterState]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "NativeFilterDataMask",
          "type": "Model",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 51,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Represents the dataMask containing all native filter states.",
            "DATA_CONTRACT": "Input[Dict[filter_id, FilterState]] -> Model[NativeFilterDataMask]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ParsedNativeFilters",
          "type": "Model",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 79,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Result of parsing native filters from permalink or native_filters_key.",
            "DATA_CONTRACT": "Input[dataMask: Dict, metadata: Dict] -> Model[ParsedNativeFilters]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardURLFilterExtraction",
          "type": "Model",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 97,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Result of parsing a complete dashboard URL for filter information.",
            "DATA_CONTRACT": "Input[url: str, dashboard_id: Optional, filter_type: Optional, filters: Dict] -> Model[DashboardURLFilterExtraction]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ExtraFormDataMerge",
          "type": "Model",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 148,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Configuration for merging extraFormData from different sources.",
            "DATA_CONTRACT": "Input[append_keys: List[str], override_keys: List[str]] -> Model[ExtraFormDataMerge]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_filter_ids",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_extra_form_data",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "has_filters",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_filter_count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "merge",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "AssistantModels",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 83,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "assistant, audit, confirmation, chat",
        "PURPOSE": "SQLAlchemy models for assistant audit trail and confirmation tokens.",
        "LAYER": "Domain",
        "INVARIANT": "Assistant records preserve immutable ids and creation timestamps."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "MappingModels"
        }
      ],
      "children": [
        {
          "name": "AssistantAuditRecord",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 16,
          "end_line": 35,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Store audit decisions and outcomes produced by assistant command handling.",
            "PRE": "user_id must identify the actor for every record.",
            "POST": "Audit payload remains available for compliance and debugging."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "MappingModels"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "AssistantMessageRecord",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 38,
          "end_line": 59,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Persist chat history entries for assistant conversations.",
            "PRE": "user_id, conversation_id, role and text must be present.",
            "POST": "Message row can be queried in chronological order."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "MappingModels"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "AssistantConfirmationRecord",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 62,
          "end_line": 82,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Persist risky operation confirmation tokens with lifecycle state.",
            "PRE": "intent/dispatch and expiry timestamp must be provided.",
            "POST": "State transitions can be tracked and audited."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "MappingModels"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "StorageModels",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 44,
      "tags": {
        "COMPLEXITY": "1",
        "SEMANTICS": "storage, file, model, pydantic",
        "PURPOSE": "Data models for the storage system.",
        "LAYER": "Domain"
      },
      "relations": [],
      "children": [
        {
          "name": "FileCategory",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 18,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Enumeration of supported file categories in the storage system."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "StorageConfig",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 30,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Configuration model for the storage system, defining paths and naming patterns."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "StoredFile",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 42,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Data model representing metadata for a file stored in the system."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "DashboardModels",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 32,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dashboard, model, metadata, migration",
        "PURPOSE": "Defines data models for dashboard metadata and selection.",
        "LAYER": "Model"
      },
      "relations": [
        {
          "type": "USED_BY",
          "target": "MigrationApi"
        }
      ],
      "children": [
        {
          "name": "DashboardMetadata",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 19,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Represents a dashboard available for migration."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DashboardSelection",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 30,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Represents the user's selection of dashboards to migrate."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "CleanReleaseModels",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 699,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, models, lifecycle, compliance, evidence, immutability",
        "PURPOSE": "Define canonical clean release domain entities and lifecycle guards.",
        "LAYER": "Domain",
        "PRE": "Base mapping model and release enums are available.",
        "POST": "Provides SQLAlchemy and dataclass definitions for governance domain.",
        "SIDE_EFFECT": "None (schema definition).",
        "DATA_CONTRACT": "Model[ReleaseCandidate, CandidateArtifact, DistributionManifest, ComplianceRun, ComplianceReport]",
        "INVARIANT": "Immutable snapshots are never mutated; forbidden lifecycle transitions are rejected."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "MappingModels"
        }
      ],
      "children": [
        {
          "name": "ExecutionMode",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Backward-compatible execution mode enum for legacy TUI/orchestrator tests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CheckFinalStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Backward-compatible final status enum for legacy TUI/orchestrator tests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CheckStageName",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Backward-compatible stage name enum for legacy TUI/orchestrator tests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CheckStageStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Backward-compatible stage status enum for legacy TUI/orchestrator tests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CheckStageResult",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Backward-compatible stage result container for legacy TUI/orchestrator tests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ProfileType",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Backward-compatible profile enum for legacy TUI bootstrap logic."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "RegistryStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Backward-compatible registry status enum for legacy TUI bootstrap logic."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ReleaseCandidateStatus",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Backward-compatible release candidate status enum for legacy TUI."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ResourceSourceEntry",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Backward-compatible source entry model for legacy TUI bootstrap logic."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ResourceSourceRegistry",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 113,
          "end_line": 142,
          "tags": {
            "PURPOSE": "Backward-compatible source registry model for legacy TUI bootstrap logic."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CleanProfilePolicy",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 183,
          "tags": {
            "PURPOSE": "Backward-compatible policy model for legacy TUI bootstrap logic."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ComplianceCheckRun",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 185,
          "end_line": 230,
          "tags": {
            "PURPOSE": "Backward-compatible run model for legacy TUI typing/import compatibility."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ReleaseCandidate",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 232,
          "end_line": 294,
          "tags": {
            "PURPOSE": "Represents the release unit being prepared and governed.",
            "PRE": "id, version, source_snapshot_ref are non-empty.",
            "POST": "status advances only through legal transitions."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CandidateArtifact",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 296,
          "end_line": 311,
          "tags": {
            "PURPOSE": "Represents one artifact associated with a release candidate."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ManifestItem",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 313,
          "end_line": 321,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ManifestSummary",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 323,
          "end_line": 329,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DistributionManifest",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 331,
          "end_line": 417,
          "tags": {
            "PURPOSE": "Immutable snapshot of the candidate payload.",
            "INVARIANT": "Immutable after creation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SourceRegistrySnapshot",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 419,
          "end_line": 432,
          "tags": {
            "PURPOSE": "Immutable registry snapshot for allowed sources."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CleanPolicySnapshot",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 434,
          "end_line": 446,
          "tags": {
            "PURPOSE": "Immutable policy snapshot used to evaluate a run."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ComplianceRun",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 448,
          "end_line": 471,
          "tags": {
            "PURPOSE": "Operational record for one compliance execution."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ComplianceStageRun",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 473,
          "end_line": 486,
          "tags": {
            "PURPOSE": "Stage-level execution record inside a run."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ViolationSeverity",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 488,
          "end_line": 494,
          "tags": {
            "PURPOSE": "Backward-compatible violation severity enum for legacy clean-release tests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ViolationCategory",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 496,
          "end_line": 504,
          "tags": {
            "PURPOSE": "Backward-compatible violation category enum for legacy clean-release tests."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ComplianceViolation",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 506,
          "end_line": 580,
          "tags": {
            "PURPOSE": "Violation produced by a stage."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ComplianceReport",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 582,
          "end_line": 654,
          "tags": {
            "PURPOSE": "Immutable result derived from a completed run.",
            "INVARIANT": "Immutable after creation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ApprovalDecision",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 656,
          "end_line": 668,
          "tags": {
            "PURPOSE": "Approval or rejection bound to a candidate and report."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "PublicationRecord",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 670,
          "end_line": 683,
          "tags": {
            "PURPOSE": "Publication or revocation record."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CleanReleaseAuditLog",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 685,
          "end_line": 697,
          "tags": {
            "PURPOSE": "Represents a persistent audit log entry for clean release actions."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "populate_legacy_allowlists",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 140,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validate_enterprise_policy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 161,
          "end_line": 161,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 177,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "registry_snapshot_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 181,
          "end_line": 181,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validate_final_status_alignment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 200,
          "end_line": 200,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 216,
          "end_line": 216,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "run_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 220,
          "end_line": 220,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 224,
          "end_line": 224,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 248,
          "end_line": 248,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "candidate_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 265,
          "end_line": 265,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "transition_to",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 268,
          "end_line": 268,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 349,
          "end_line": 349,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "manifest_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 402,
          "end_line": 402,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "deterministic_hash",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 406,
          "end_line": 406,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 410,
          "end_line": 410,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "check_run_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 469,
          "end_line": 469,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 521,
          "end_line": 521,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "violation_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 550,
          "end_line": 550,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "violation_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 554,
          "end_line": 554,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "check_run_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 558,
          "end_line": 558,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "category",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 562,
          "end_line": 562,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "category",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 566,
          "end_line": 566,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "location",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 570,
          "end_line": 570,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remediation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 574,
          "end_line": 574,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "blocked_release",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 578,
          "end_line": 578,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 596,
          "end_line": 596,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "report_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 632,
          "end_line": 632,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "check_run_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 636,
          "end_line": 636,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "operator_summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 640,
          "end_line": 640,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "structured_payload_ref",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 644,
          "end_line": 644,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "violations_count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 648,
          "end_line": 648,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "blocking_violations_count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 652,
          "end_line": 652,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 699 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "AuthModels",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 132,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "auth, models, user, role, permission, sqlalchemy",
        "PURPOSE": "SQLAlchemy models for multi-user authentication and authorization.",
        "LAYER": "Domain",
        "INVARIANT": "Usernames and emails must be unique."
      },
      "relations": [
        {
          "type": "INHERITS_FROM",
          "target": "Base"
        }
      ],
      "children": [
        {
          "name": "generate_uuid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Generates a unique UUID string.",
            "POST": "Returns a string representation of a new UUID."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "uuid"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "user_roles",
          "type": "Table",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Association table for many-to-many relationship between Users and Roles."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "Base"
            },
            {
              "type": "DEPENDS_ON",
              "target": "User"
            },
            {
              "type": "DEPENDS_ON",
              "target": "Role"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "role_permissions",
          "type": "Table",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Association table for many-to-many relationship between Roles and Permissions."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "Base"
            },
            {
              "type": "DEPENDS_ON",
              "target": "Role"
            },
            {
              "type": "DEPENDS_ON",
              "target": "Permission"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "User",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 56,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Represents an identity that can authenticate to the system."
          },
          "relations": [
            {
              "type": "HAS_MANY",
              "target": "Role"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Invalid @RELATION predicate: HAS_MANY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Invalid @RELATION predicate: HAS_MANY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 56
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 56
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "Role",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 79,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Represents a collection of permissions."
          },
          "relations": [
            {
              "type": "HAS_MANY",
              "target": "User"
            },
            {
              "type": "HAS_MANY",
              "target": "Permission"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Invalid @RELATION predicate: HAS_MANY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Invalid @RELATION predicate: HAS_MANY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Invalid @RELATION predicate: HAS_MANY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Invalid @RELATION predicate: HAS_MANY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 79
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 79
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "Permission",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 99,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Represents a specific capability within the system."
          },
          "relations": [
            {
              "type": "HAS_MANY",
              "target": "Role"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Invalid @RELATION predicate: HAS_MANY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Invalid @RELATION predicate: HAS_MANY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "ERROR",
                "line_number": 99
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 99
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "ADGroupMapping",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 117,
          "end_line": 130,
          "tags": {
            "PURPOSE": "Maps an Active Directory group to a local System Role."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "Role"
            }
          ],
          "children": [],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              },
              {
                "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              },
              {
                "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 117
              }
            ],
            "score": 0.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: INHERITS_FROM. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "ProfileModels",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 61,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "profile, preferences, persistence, user, dashboard-filter, git, ui-preferences, sqlalchemy",
        "PURPOSE": "Defines persistent per-user profile settings for dashboard filter, Git identity/token, and UX preferences.",
        "LAYER": "Domain",
        "INVARIANT": "Sensitive Git token is stored encrypted and never returned in plaintext."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AuthModels"
        },
        {
          "type": "INHERITS_FROM",
          "target": "MappingModels:Base"
        }
      ],
      "children": [
        {
          "name": "UserDashboardPreference",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 22,
          "end_line": 59,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Stores Superset username binding and default \"my dashboards\" toggle for one authenticated user."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "MappingModels:Base"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: INHERITS_FROM. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "ModelsPackage",
      "type": "Package",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Domain model package root."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_models",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 39,
      "tags": {
        "COMPLEXITY": "1",
        "PURPOSE": "Unit tests for data models",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "ModelsPackage"
        }
      ],
      "children": [
        {
          "name": "test_environment_model",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Tests that Environment model correctly stores values.",
            "PRE": "Environment class is available.",
            "POST": "Values are verified."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_models"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "test_report_models",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 235,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for report Pydantic models and their validators",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_enum_values",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_enum_values",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_valid_creation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_minimal_creation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_valid_creation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_empty_report_id_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_whitespace_report_id_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_empty_task_id_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 85,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_empty_summary_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_summary_whitespace_trimmed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_optional_fields",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_with_error_context",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_defaults",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_invalid_sort_by_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_valid_sort_by_values",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_invalid_sort_order_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 135,
          "end_line": 135,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_valid_sort_order_values",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 140,
          "end_line": 140,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_time_range_validation_valid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 146,
          "end_line": 146,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_time_range_validation_invalid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 152,
          "end_line": 152,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_page_ge_1",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_page_size_bounds",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_valid_creation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 174,
          "end_line": 174,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_with_items",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 187,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_valid_creation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 205,
          "end_line": 205,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_with_all_fields",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 218,
          "end_line": 218,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "TestCleanReleaseModels",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 4,
      "tags": {
        "PURPOSE": "Contract testing for Clean Release models"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "CleanReleaseModels"
        }
      ],
      "children": [
        {
          "name": "valid_candidate_data",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "valid_policy_data",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "test_release_candidate_valid",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 41,
      "end_line": 50,
      "tags": {
        "PURPOSE": "Verify that a valid release candidate can be instantiated."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "TestCleanReleaseModels"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_release_candidate_empty_id",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 53,
      "end_line": 63,
      "tags": {
        "PURPOSE": "Verify that a release candidate with an empty ID is rejected.",
        "TEST_FIXTURE": "valid_enterprise_policy"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "TestCleanReleaseModels"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_enterprise_policy_valid",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 81,
      "end_line": 90,
      "tags": {
        "PURPOSE": "Verify that a valid enterprise policy is accepted.",
        "TEST_EDGE": "enterprise_policy_missing_prohibited"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "TestCleanReleaseModels"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_enterprise_policy_missing_prohibited",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 93,
      "end_line": 106,
      "tags": {
        "PURPOSE": "Verify that an enterprise policy without prohibited categories is rejected.",
        "TEST_EDGE": "enterprise_policy_external_allowed"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "TestCleanReleaseModels"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_enterprise_policy_external_allowed",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 109,
      "end_line": 123,
      "tags": {
        "PURPOSE": "Verify that an enterprise policy allowing external sources is rejected.",
        "TEST_INVARIANT": "manifest_consistency",
        "TEST_EDGE": "manifest_count_mismatch"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "TestCleanReleaseModels"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_manifest_count_mismatch",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 126,
      "end_line": 168,
      "tags": {
        "PURPOSE": "Verify that a manifest with count mismatches is rejected.",
        "TEST_INVARIANT": "run_integrity",
        "TEST_EDGE": "compliant_run_stage_fail"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "TestCleanReleaseModels"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_compliant_run_validation",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 171,
      "end_line": 214,
      "tags": {
        "PURPOSE": "Verify compliant run validation logic and mandatory stage checks."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "TestCleanReleaseModels"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_report_validation",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 217,
      "end_line": 249,
      "tags": {
        "PURPOSE": "Verify compliance report validation based on status and violation counts."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "TestCleanReleaseModels"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "profile_service",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 861,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "profile, service, validation, ownership, filtering, superset, preferences",
        "PURPOSE": "Orchestrates profile preference persistence, Superset account lookup, and deterministic actor matching.",
        "LAYER": "Domain",
        "INVARIANT": "Username normalization is trim+lower and shared by save and matching paths.",
        "TEST_CONTRACT": "ProfilePreferenceUpdateRequest -> ProfilePreferenceResponse",
        "TEST_FIXTURE": "valid_profile_update -> {\"user_id\":\"u-1\",\"superset_username\":\"John_Doe\",\"show_only_my_dashboards\":true}",
        "TEST_EDGE": "lookup_env_not_found -> unknown environment_id returns not found",
        "TEST_INVARIANT": "normalization_consistency -> VERIFIED_BY: [valid_profile_update, enable_without_username]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.profile"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.schemas.profile"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.superset_client"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.auth.repository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.auth"
        },
        {
          "type": "DEPENDS_ON",
          "target": "sqlalchemy.orm.Session"
        }
      ],
      "children": [
        {
          "name": "ProfileValidationError",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 63,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Domain validation error for profile preference update requests."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "Exception"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "EnvironmentNotFoundError",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 74,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Raised when environment_id from lookup request is unknown in app configuration."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "Exception"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ProfileAuthorizationError",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 85,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Raised when caller attempts cross-user preference mutation."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "Exception"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ProfileService",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 88,
          "end_line": 859,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Implements profile preference read/update flow and Superset account lookup degradation strategy.",
            "PRE": "Caller provides authenticated User context for external service methods.",
            "POST": "Preference operations remain user-scoped and return normalized profile/lookup responses.",
            "SIDE_EFFECT": "Writes preference records and encrypted tokens; performs external account lookups when requested.",
            "DATA_CONTRACT": "Input[User,ProfilePreferenceUpdateRequest|SupersetAccountLookupRequest] -> Output[ProfilePreferenceResponse|SupersetAccountLookupResponse|bool]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "sqlalchemy.orm.Session"
            },
            {
              "type": "DEPENDS_ON",
              "target": "backend.src.core.auth.repository.AuthRepository"
            },
            {
              "type": "DEPENDS_ON",
              "target": "backend.src.core.superset_client.SupersetClient"
            },
            {
              "type": "DEPENDS_ON",
              "target": "backend.src.core.superset_profile_lookup.SupersetAccountLookupAdapter"
            },
            {
              "type": "DEPENDS_ON",
              "target": "backend.src.models.profile.UserDashboardPreference"
            },
            {
              "type": "CALLS",
              "target": "backend.src.services.rbac_permission_catalog.discover_declared_permissions"
            }
          ],
          "children": [
            {
              "name": "init",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 102,
              "end_line": 114,
              "tags": {
                "PURPOSE": "Initialize service with DB session and config manager.",
                "PRE": "db session is active and config_manager supports get_environments().",
                "POST": "Service is ready for preference persistence and lookup operations."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_my_preference",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 116,
              "end_line": 145,
              "tags": {
                "PURPOSE": "Return current user's persisted preference or default non-configured view.",
                "PRE": "current_user is authenticated.",
                "POST": "Returned payload belongs to current_user only."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_dashboard_filter_binding",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 147,
              "end_line": 180,
              "tags": {
                "PURPOSE": "Return only dashboard-filter fields required by dashboards listing hot path.",
                "PRE": "current_user is authenticated.",
                "POST": "Returns normalized username and profile-default filter toggles without security summary expansion."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "update_my_preference",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 182,
              "end_line": 329,
              "tags": {
                "PURPOSE": "Validate and persist current user's profile preference in self-scoped mode.",
                "PRE": "current_user is authenticated and payload is provided.",
                "POST": "Preference row for current_user is created/updated when validation passes."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "lookup_superset_accounts",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 331,
              "end_line": 411,
              "tags": {
                "PURPOSE": "Query Superset users in selected environment and project canonical account candidates.",
                "PRE": "current_user is authenticated and environment_id exists.",
                "POST": "Returns success payload or degraded payload with warning while preserving manual fallback."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "matches_dashboard_actor",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 413,
              "end_line": 437,
              "tags": {
                "PURPOSE": "Apply trim+case-insensitive actor match across owners OR modified_by.",
                "PRE": "bound_username can be empty; owners may contain mixed payload.",
                "POST": "Returns True when normalized username matches owners or modified_by."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_security_summary",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 439,
              "end_line": 501,
              "tags": {
                "PURPOSE": "Build read-only security snapshot with role and permission badges.",
                "PRE": "current_user is authenticated.",
                "POST": "Returns deterministic security projection for profile UI."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_collect_user_permission_pairs",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 503,
              "end_line": 522,
              "tags": {
                "PURPOSE": "Collect effective permission tuples from current user's roles.",
                "PRE": "current_user can include role/permission graph.",
                "POST": "Returns unique normalized (resource, ACTION) tuples."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_format_permission_key",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 524,
              "end_line": 536,
              "tags": {
                "PURPOSE": "Convert normalized permission pair to compact UI key.",
                "PRE": "resource and action are normalized.",
                "POST": "Returns user-facing badge key."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_to_preference_payload",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 538,
              "end_line": 596,
              "tags": {
                "PURPOSE": "Map ORM preference row to API DTO with token metadata.",
                "PRE": "preference row can contain nullable optional fields.",
                "POST": "Returns normalized ProfilePreference object."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_mask_secret_value",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 598,
              "end_line": 611,
              "tags": {
                "PURPOSE": "Build a safe display value for sensitive secrets.",
                "PRE": "secret may be None or plaintext.",
                "POST": "Returns masked representation or None."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_sanitize_text",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 613,
              "end_line": 624,
              "tags": {
                "PURPOSE": "Normalize optional text into trimmed form or None.",
                "PRE": "value may be empty or None.",
                "POST": "Returns trimmed value or None."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_sanitize_secret",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 626,
              "end_line": 639,
              "tags": {
                "PURPOSE": "Normalize secret input into trimmed form or None.",
                "PRE": "value may be None or blank.",
                "POST": "Returns trimmed secret or None."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_normalize_start_page",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 641,
              "end_line": 654,
              "tags": {
                "PURPOSE": "Normalize supported start page aliases to canonical values.",
                "PRE": "value may be None or alias.",
                "POST": "Returns one of SUPPORTED_START_PAGES."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_normalize_density",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 656,
              "end_line": 669,
              "tags": {
                "PURPOSE": "Normalize supported density aliases to canonical values.",
                "PRE": "value may be None or alias.",
                "POST": "Returns one of SUPPORTED_DENSITIES."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_resolve_environment",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 671,
              "end_line": 683,
              "tags": {
                "PURPOSE": "Resolve environment model from configured environments by id.",
                "PRE": "environment_id is provided.",
                "POST": "Returns environment object when found else None."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_get_preference_row",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 685,
              "end_line": 693,
              "tags": {
                "PURPOSE": "Return persisted preference row for user or None.",
                "PRE": "user_id is provided.",
                "POST": "Returns matching row or None."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_get_or_create_preference_row",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 695,
              "end_line": 706,
              "tags": {
                "PURPOSE": "Return existing preference row or create new unsaved row.",
                "PRE": "user_id is provided.",
                "POST": "Returned row always contains user_id."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_default_preference",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 708,
              "end_line": 735,
              "tags": {
                "PURPOSE": "Build non-persisted default preference DTO for unconfigured users.",
                "PRE": "user_id is provided.",
                "POST": "Returns ProfilePreference with disabled toggle and empty username."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_validate_update_payload",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 737,
              "end_line": 791,
              "tags": {
                "PURPOSE": "Validate username/toggle constraints for preference mutation.",
                "PRE": "payload is provided.",
                "POST": "Returns validation errors list; empty list means valid."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_sanitize_username",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 793,
              "end_line": 801,
              "tags": {
                "PURPOSE": "Normalize raw username into trimmed form or None for empty input.",
                "PRE": "value can be empty or None.",
                "POST": "Returns trimmed username or None."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_normalize_username",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 803,
              "end_line": 814,
              "tags": {
                "PURPOSE": "Apply deterministic trim+lower normalization for actor matching.",
                "PRE": "value can be empty or None.",
                "POST": "Returns lowercase normalized token or None."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_normalize_owner_tokens",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 816,
              "end_line": 856,
              "tags": {
                "PURPOSE": "Normalize owners payload into deduplicated lower-cased tokens.",
                "PRE": "owners can be iterable of scalars or dict-like values.",
                "POST": "Returns list of unique normalized owner tokens."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ProfileService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 88
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 88
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 88
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 88
              }
            ],
            "score": 0.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 861 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "ResourceServiceModule",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 498,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "service, resources, dashboards, datasets, tasks, git",
        "PURPOSE": "Shared service for fetching resource data with Git status and task status",
        "LAYER": "Service",
        "INVARIANT": "All resources include metadata about their current state"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "SupersetClient"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskManagerPackage"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskManagerModels"
        },
        {
          "type": "DEPENDS_ON",
          "target": "GitService"
        }
      ],
      "children": [
        {
          "name": "ResourceService",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 21,
          "end_line": 497,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Provides centralized access to resource data with enhanced metadata"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SupersetClient"
            },
            {
              "type": "DEPENDS_ON",
              "target": "GitService"
            }
          ],
          "children": [
            {
              "name": "ResourceService_init",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 28,
              "end_line": 37,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Initialize the resource service with dependencies",
                "PRE": "None",
                "POST": "ResourceService is ready to fetch resources"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_dashboards_with_status",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 39,
              "end_line": 87,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetch dashboards from environment with Git status and last task status",
                "PRE": "env is a valid Environment object",
                "POST": "Returns list of dashboards with enhanced metadata",
                "PARAM": "tasks (List[Task]) - List of tasks to check for status",
                "RETURN": "List[Dict] - Dashboards with git_status and last_task fields"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dashboards_summary"
                },
                {
                  "type": "CALLS",
                  "target": "_get_git_status_for_dashboard"
                },
                {
                  "type": "CALLS",
                  "target": "_get_last_llm_task_for_dashboard"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_dashboards_page_with_status",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 89,
              "end_line": 154,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetch one dashboard page from environment and enrich only that page with status metadata.",
                "PRE": "env is valid; page >= 1; page_size > 0.",
                "POST": "Returns page items plus total counters without scanning all pages locally.",
                "PARAM": "page_size (int) - Page size.",
                "RETURN": "Dict[str, Any] - {\"dashboards\": List[Dict], \"total\": int, \"total_pages\": int}"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_dashboards_summary_page"
                },
                {
                  "type": "CALLS",
                  "target": "_get_git_status_for_dashboard"
                },
                {
                  "type": "CALLS",
                  "target": "_get_last_llm_task_for_dashboard"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_get_last_llm_task_for_dashboard",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 156,
              "end_line": 238,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Get most recent LLM validation task for a dashboard in an environment",
                "PRE": "dashboard_id is a valid integer identifier",
                "POST": "Returns the newest llm_dashboard_validation task summary or None",
                "PARAM": "tasks (Optional[List[Task]]) - List of tasks to search",
                "RETURN": "Optional[Dict] - Task summary with task_id and status"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_normalize_datetime_for_compare"
                },
                {
                  "type": "CALLS",
                  "target": "_normalize_validation_status"
                },
                {
                  "type": "CALLS",
                  "target": "_normalize_task_status"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_normalize_task_status",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 240,
              "end_line": 256,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Normalize task status to stable uppercase values for UI/API projections",
                "PRE": "raw_status can be enum or string",
                "POST": "Returns uppercase status without enum class prefix",
                "PARAM": "raw_status (Any) - Raw task status object/value",
                "RETURN": "str - Normalized status token"
              },
              "relations": [
                {
                  "type": "USED_BY",
                  "target": "_get_last_llm_task_for_dashboard"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 240
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 240
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 240
                  }
                ],
                "score": 0.4
              }
            },
            {
              "name": "_normalize_validation_status",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 258,
              "end_line": 273,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Normalize LLM validation status to PASS/FAIL/WARN/UNKNOWN",
                "PRE": "raw_status can be any scalar type",
                "POST": "Returns normalized validation status token or None",
                "PARAM": "raw_status (Any) - Raw validation status from task result",
                "RETURN": "Optional[str] - PASS|FAIL|WARN|UNKNOWN"
              },
              "relations": [
                {
                  "type": "USED_BY",
                  "target": "_get_last_llm_task_for_dashboard"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 258
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 258
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 258
                  }
                ],
                "score": 0.4
              }
            },
            {
              "name": "_normalize_datetime_for_compare",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 275,
              "end_line": 290,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Normalize datetime values to UTC-aware values for safe comparisons.",
                "PRE": "value may be datetime or any scalar.",
                "POST": "Returns UTC-aware datetime; non-datetime values map to minimal UTC datetime.",
                "PARAM": "value (Any) - Candidate datetime-like value.",
                "RETURN": "datetime - UTC-aware comparable datetime."
              },
              "relations": [
                {
                  "type": "USED_BY",
                  "target": "_get_last_llm_task_for_dashboard"
                },
                {
                  "type": "USED_BY",
                  "target": "_get_last_task_for_resource"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 275
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 275
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 275
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 275
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 275
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 275
                  }
                ],
                "score": 0.0
              }
            },
            {
              "name": "get_datasets_with_status",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 292,
              "end_line": 329,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Fetch datasets from environment with mapping progress and last task status",
                "PRE": "env is a valid Environment object",
                "POST": "Returns list of datasets with enhanced metadata",
                "PARAM": "tasks (List[Task]) - List of tasks to check for status",
                "RETURN": "List[Dict] - Datasets with mapped_fields and last_task fields"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient.get_datasets_summary"
                },
                {
                  "type": "CALLS",
                  "target": "_get_last_task_for_resource"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_activity_summary",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 331,
              "end_line": 371,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Get summary of active and recent tasks for the activity indicator",
                "PRE": "tasks is a list of Task objects",
                "POST": "Returns summary with active_count and recent_tasks",
                "PARAM": "tasks (List[Task]) - List of tasks to summarize",
                "RETURN": "Dict - Activity summary"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_extract_resource_name_from_task"
                },
                {
                  "type": "CALLS",
                  "target": "_extract_resource_type_from_task"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_get_git_status_for_dashboard",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 373,
              "end_line": 431,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Get Git sync status for a dashboard",
                "PRE": "dashboard_id is a valid integer",
                "POST": "Returns git status or None if no repo exists",
                "PARAM": "dashboard_id (int) - The dashboard ID",
                "RETURN": "Optional[Dict] - Git status with branch and sync_status"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_get_last_task_for_resource",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 433,
              "end_line": 470,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Get the most recent task for a specific resource",
                "PRE": "resource_id is a valid string",
                "POST": "Returns task summary or None if no tasks found",
                "PARAM": "tasks (Optional[List[Task]]) - List of tasks to search",
                "RETURN": "Optional[Dict] - Task summary with task_id and status"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_normalize_datetime_for_compare"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_extract_resource_name_from_task",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 472,
              "end_line": 483,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Extract resource name from task params",
                "PRE": "task is a valid Task object",
                "POST": "Returns resource name or task ID",
                "PARAM": "task (Task) - The task to extract from",
                "RETURN": "str - Resource name or fallback"
              },
              "relations": [
                {
                  "type": "USED_BY",
                  "target": "get_activity_summary"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 472
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 472
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 472
                  }
                ],
                "score": 0.4
              }
            },
            {
              "name": "_extract_resource_type_from_task",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 485,
              "end_line": 496,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Extract resource type from task params",
                "PRE": "task is a valid Task object",
                "POST": "Returns resource type or 'unknown'",
                "PARAM": "task (Task) - The task to extract from",
                "RETURN": "str - Resource type"
              },
              "relations": [
                {
                  "type": "USED_BY",
                  "target": "get_activity_summary"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 485
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 485
                  },
                  {
                    "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 485
                  }
                ],
                "score": 0.4
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_task_time",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 198,
          "end_line": 198,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 498 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "llm_prompt_templates",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 200,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "llm, prompts, templates, settings",
        "PURPOSE": "Provide default LLM prompt templates and normalization helpers for runtime usage.",
        "LAYER": "Domain",
        "INVARIANT": "All required prompt template keys are always present after normalization."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.config_manager:Function"
        }
      ],
      "children": [
        {
          "name": "DEFAULT_LLM_PROMPTS",
          "type": "Constant",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 61,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Default prompt templates used by documentation, dashboard validation, and git commit generation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DEFAULT_LLM_PROVIDER_BINDINGS",
          "type": "Constant",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 72,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Default provider binding per task domain."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DEFAULT_LLM_ASSISTANT_SETTINGS",
          "type": "Constant",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 82,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Default planner settings for assistant chat intent model/provider resolution."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalize_llm_settings",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 85,
          "end_line": 126,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Ensure llm settings contain stable schema with prompts section and default templates.",
            "PRE": "llm_settings is dictionary-like value or None.",
            "POST": "Returned dict contains prompts with all required template keys."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 85
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 85
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "is_multimodal_model",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 129,
          "end_line": 168,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Heuristically determine whether model supports image input required for dashboard validation.",
            "PRE": "model_name may be empty or mixed-case.",
            "POST": "Returns True when model likely supports multimodal input."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 129
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 129
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "resolve_bound_provider_id",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 171,
          "end_line": 184,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Resolve provider id configured for a task binding with fallback to default provider.",
            "PRE": "llm_settings is normalized or raw dict from config.",
            "POST": "Returns configured provider id or fallback id/empty string when not defined."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 171
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 171
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "render_prompt",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 187,
          "end_line": 197,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Render prompt template using deterministic placeholder replacement with graceful fallback.",
            "PRE": "template is a string and variables values are already stringifiable.",
            "POST": "Returns rendered prompt text with known placeholders substituted."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 187
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 187
              }
            ],
            "score": 0.5499999999999999
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "health_service",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 384,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "health, aggregation, dashboards",
        "PURPOSE": "Business logic for aggregating dashboard health status from validation records.",
        "LAYER": "Domain/Service"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "ValidationRecord"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SupersetClient"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskCleanupService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskManager"
        }
      ],
      "children": [
        {
          "name": "HealthService",
          "type": "Class",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 28,
          "end_line": 382,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Aggregate latest dashboard validation state and manage persisted health report lifecycle.",
            "PRE": "Service is constructed with a live SQLAlchemy session and optional config manager.",
            "POST": "Exposes health summary aggregation and validation report deletion operations.",
            "SIDE_EFFECT": "Maintains in-memory dashboard metadata caches and may coordinate cleanup through collaborators.",
            "DATA_CONTRACT": "Input[Session, Optional[Any]] -> Output[HealthSummaryResponse|bool]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "ValidationRecord"
            },
            {
              "type": "DEPENDS_ON",
              "target": "DashboardHealthItem"
            },
            {
              "type": "DEPENDS_ON",
              "target": "HealthSummaryResponse"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SupersetClient"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskCleanupService"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskManager"
            }
          ],
          "children": [
            {
              "name": "HealthService_init",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 51,
              "end_line": 64,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Initialize health service with DB session and optional config access for dashboard metadata resolution.",
                "PRE": "db is a valid SQLAlchemy session.",
                "POST": "Service is ready to aggregate summaries and delete health reports.",
                "SIDE_EFFECT": "Initializes per-instance dashboard metadata cache.",
                "DATA_CONTRACT": "Input[db: Session, config_manager: Optional[Any]] -> Output[HealthService]"
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "HealthService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_prime_dashboard_meta_cache",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 66,
              "end_line": 156,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Warm dashboard slug/title cache with one Superset list fetch per environment.",
                "PRE": "records may contain mixed numeric and slug dashboard identifiers.",
                "POST": "Numeric dashboard ids for known environments are cached when discoverable.",
                "SIDE_EFFECT": "May call Superset dashboard list API once per referenced environment.",
                "DATA_CONTRACT": "Input[records: List[ValidationRecord]] -> Output[None]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationRecord"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "ConfigManager"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "SupersetClient"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_resolve_dashboard_meta",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 158,
              "end_line": 187,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Resolve slug/title for a dashboard referenced by persisted validation record.",
                "PRE": "dashboard_id may be numeric or slug-like; environment_id may be empty.",
                "POST": "Returns dict with `slug` and `title` keys, using cache when possible.",
                "SIDE_EFFECT": "Writes default cache entries for unresolved numeric dashboard ids."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_health_summary",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 189,
              "end_line": 291,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Aggregate latest validation status per dashboard and enrich rows with dashboard slug/title.",
                "PRE": "environment_id may be omitted to aggregate across all environments.",
                "POST": "Returns HealthSummaryResponse with counts and latest record row per dashboard.",
                "SIDE_EFFECT": "May call Superset API to resolve dashboard metadata.",
                "DATA_CONTRACT": "Input[environment_id: Optional[str]] -> Output[HealthSummaryResponse]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_prime_dashboard_meta_cache"
                },
                {
                  "type": "CALLS",
                  "target": "_resolve_dashboard_meta"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "delete_validation_report",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 293,
              "end_line": 379,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Delete one persisted health report and optionally clean linked task/log artifacts.",
                "PRE": "record_id is a validation record identifier.",
                "POST": "Returns True only when a matching record was deleted.",
                "SIDE_EFFECT": "Deletes DB rows, optional screenshot file, and optional task/log persistence.",
                "DATA_CONTRACT": "Input[record_id: str, task_manager: Optional[TaskManager]] -> Output[bool]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationRecord"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskManager"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskCleanupService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "_empty_dashboard_meta",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 384 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "llm_provider",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 270,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "service, llm, provider, encryption",
        "PURPOSE": "Service for managing LLM provider configurations with encrypted API keys.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "LLMProvider"
        },
        {
          "type": "DEPENDS_ON",
          "target": "EncryptionManager"
        },
        {
          "type": "DEPENDS_ON",
          "target": "LLMProviderConfig"
        }
      ],
      "children": [
        {
          "name": "_require_fernet_key",
          "type": "Function",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 22,
          "end_line": 53,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Load and validate the Fernet key used for secret encryption.",
            "PRE": "ENCRYPTION_KEY environment variable must be set to a valid Fernet key.",
            "POST": "Returns validated key bytes ready for Fernet initialization.",
            "SIDE_EFFECT": "Emits belief-state logs for missing or invalid encryption configuration.",
            "DATA_CONTRACT": "Input[ENCRYPTION_KEY:str] -> Output[bytes]",
            "INVARIANT": "Encryption initialization never falls back to a hardcoded secret."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "backend.src.core.logger:Function"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.95
          }
        },
        {
          "name": "EncryptionManager",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 56,
          "end_line": 109,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Handles encryption and decryption of sensitive data like API keys.",
            "PRE": "ENCRYPTION_KEY is configured with a valid Fernet key before instantiation.",
            "POST": "Manager exposes reversible encrypt/decrypt operations for persisted secrets.",
            "SIDE_EFFECT": "Initializes Fernet cryptography state from process environment.",
            "DATA_CONTRACT": "Input[str] -> Output[str]",
            "INVARIANT": "Uses only a validated secret key from environment.",
            "TEST_CONTRACT": "EncryptionManagerModel ->",
            "TEST_FIXTURE": "basic_encryption_cycle -> {\"data\": \"my_secret_key\"}",
            "TEST_EDGE": "empty_string_encryption -> {\"data\": \"\"}",
            "TEST_INVARIANT": "symmetric_encryption -> verifies: [basic_encryption_cycle, empty_string_encryption]"
          },
          "relations": [
            {
              "type": "CALLS",
              "target": "_require_fernet_key"
            }
          ],
          "children": [
            {
              "name": "EncryptionManager_init",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 78,
              "end_line": 86,
              "tags": {
                "PURPOSE": "Initialize the encryption manager with a Fernet key.",
                "PRE": "ENCRYPTION_KEY env var must be set to a valid Fernet key.",
                "POST": "Fernet instance ready for encryption/decryption."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "encrypt",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 88,
              "end_line": 96,
              "tags": {
                "PURPOSE": "Encrypt a plaintext string.",
                "PRE": "data must be a non-empty string.",
                "POST": "Returns encrypted string."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "decrypt",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 98,
              "end_line": 106,
              "tags": {
                "PURPOSE": "Decrypt an encrypted string.",
                "PRE": "encrypted_data must be a valid Fernet-encrypted string.",
                "POST": "Returns original plaintext string."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9571428571428571
          }
        },
        {
          "name": "LLMProviderService",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 112,
          "end_line": 268,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Service to manage LLM provider lifecycle."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "LLMProvider"
            },
            {
              "type": "DEPENDS_ON",
              "target": "EncryptionManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "LLMProviderConfig"
            }
          ],
          "children": [
            {
              "name": "LLMProviderService_init",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 119,
              "end_line": 128,
              "tags": {
                "PURPOSE": "Initialize the service with database session.",
                "PRE": "db must be a valid SQLAlchemy Session.",
                "POST": "Service ready for provider operations."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "EncryptionManager"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_all_providers",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 130,
              "end_line": 140,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Returns all configured LLM providers.",
                "PRE": "Database connection must be active.",
                "POST": "Returns list of all LLMProvider records."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "LLMProvider"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_provider",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 142,
              "end_line": 154,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Returns a single LLM provider by ID.",
                "PRE": "provider_id must be a valid string.",
                "POST": "Returns LLMProvider or None if not found."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "LLMProvider"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "create_provider",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 156,
              "end_line": 180,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Creates a new LLM provider with encrypted API key.",
                "PRE": "config must contain valid provider configuration.",
                "POST": "New provider created and persisted to database."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "LLMProviderConfig"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "LLMProvider"
                },
                {
                  "type": "CALLS",
                  "target": "encrypt"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "update_provider",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 182,
              "end_line": 215,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Updates an existing LLM provider.",
                "PRE": "provider_id must exist, config must be valid.",
                "POST": "Provider updated and persisted to database."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "LLMProviderConfig"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "LLMProvider"
                },
                {
                  "type": "CALLS",
                  "target": "encrypt"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "delete_provider",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 217,
              "end_line": 232,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Deletes an LLM provider.",
                "PRE": "provider_id must exist.",
                "POST": "Provider removed from database."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "LLMProvider"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_decrypted_api_key",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 234,
              "end_line": 265,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Returns the decrypted API key for a provider.",
                "PRE": "provider_id must exist with valid encrypted key.",
                "POST": "Returns decrypted API key or None on failure."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "LLMProvider"
                },
                {
                  "type": "CALLS",
                  "target": "decrypt"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "rbac_permission_catalog",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 190,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "rbac, permissions, catalog, sync, discovery",
        "PURPOSE": "Discovers declared RBAC permissions from API routes/plugins and synchronizes them into auth database.",
        "LAYER": "Service",
        "INVARIANT": "Synchronization is idempotent for existing (resource, action) permission pairs."
      },
      "relations": [
        {
          "type": "CALLS",
          "target": "backend.src.core.plugin_loader.PluginLoader.get_all_plugin_configs"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.auth.Permission"
        }
      ],
      "children": [
        {
          "name": "HAS_PERMISSION_PATTERN",
          "type": "Constant",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Regex pattern for extracting has_permission(\"resource\", \"ACTION\") declarations."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ROUTES_DIR",
          "type": "Constant",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Absolute directory path where API route RBAC declarations are defined."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_iter_route_files",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Iterates API route files that may contain RBAC declarations.",
            "PRE": "ROUTES_DIR points to backend/src/api/routes.",
            "POST": "Yields Python files excluding test and cache directories.",
            "RETURN": "Iterable[Path] - Route file paths for permission extraction."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_discover_route_permissions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Extracts explicit has_permission declarations from API route source code.",
            "PRE": "Route files are readable UTF-8 text files.",
            "POST": "Returns unique set of (resource, action) pairs declared in route guards.",
            "RETURN": "Set[Tuple[str, str]] - Permission pairs from route-level RBAC declarations."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_discover_route_permissions_cached",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Cache route permission discovery because route source files are static during normal runtime.",
            "PRE": "None.",
            "POST": "Returns stable discovered route permission pairs without repeated filesystem scans."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_discover_plugin_execute_permissions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Derives dynamic task permissions of form plugin:{plugin_id}:EXECUTE from plugin registry.",
            "PRE": "plugin_loader is optional and may expose get_all_plugin_configs.",
            "POST": "Returns unique plugin EXECUTE permissions if loader is available.",
            "RETURN": "Set[Tuple[str, str]] - Permission pairs derived from loaded plugin IDs."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_discover_plugin_execute_permissions_cached",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 123,
          "end_line": 133,
          "tags": {
            "PURPOSE": "Cache dynamic plugin EXECUTE permission pairs by normalized plugin id tuple.",
            "PRE": "plugin_ids is a deterministic tuple of plugin ids.",
            "POST": "Returns stable permission tuple without repeated plugin catalog expansion."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "discover_declared_permissions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 136,
          "end_line": 155,
          "tags": {
            "PURPOSE": "Builds canonical RBAC permission catalog from routes and plugin registry.",
            "PRE": "plugin_loader may be provided for dynamic task plugin permission discovery.",
            "POST": "Returns union of route-declared and dynamic plugin EXECUTE permissions.",
            "RETURN": "Set[Tuple[str, str]] - Complete discovered permission set."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "sync_permission_catalog",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 188,
          "tags": {
            "PURPOSE": "Persists missing RBAC permission pairs into auth database.",
            "PRE": "declared_permissions is an iterable of (resource, action) tuples.",
            "POST": "Missing permissions are inserted; existing permissions remain untouched.",
            "SIDE_EFFECT": "Commits auth database transaction when new permissions are added.",
            "RETURN": "int - Number of inserted permission records."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "services",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 21,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "services, package, init",
        "PURPOSE": "Package initialization for services module",
        "LAYER": "Core",
        "NOTE": "GitService, AuthService, LLMProviderService have circular import issues - import directly when needed"
      },
      "relations": [
        {
          "type": "EXPORTS",
          "target": "resource_service, mapping_service"
        }
      ],
      "children": [
        {
          "name": "__getattr__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 13,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: EXPORTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "auth_service",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 149,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "auth, service, business-logic, login, jwt, adfs, jit-provisioning",
        "PURPOSE": "Orchestrates credential authentication and ADFS JIT user provisioning.",
        "LAYER": "Domain",
        "INVARIANT": "Authentication succeeds only for active users with valid credentials; issued sessions encode subject and scopes from assigned roles.",
        "PRE": "Core auth models and security utilities available.",
        "POST": "User identity verified and session tokens issued according to role scopes.",
        "SIDE_EFFECT": "Writes last login timestamps and JIT-provisions external users.",
        "DATA_CONTRACT": "[Credentials | ADFSClaims] -> [UserEntity | SessionToken]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "AuthRepository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "verify_password"
        },
        {
          "type": "DEPENDS_ON",
          "target": "create_access_token"
        },
        {
          "type": "DEPENDS_ON",
          "target": "User"
        },
        {
          "type": "DEPENDS_ON",
          "target": "Role"
        }
      ],
      "children": [
        {
          "name": "AuthService",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 29,
          "end_line": 147,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Provides high-level authentication services."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "AuthRepository"
            },
            {
              "type": "DEPENDS_ON",
              "target": "User"
            },
            {
              "type": "DEPENDS_ON",
              "target": "Role"
            }
          ],
          "children": [
            {
              "name": "AuthService_init",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 36,
              "end_line": 48,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Initializes the authentication service with repository access over an active DB session.",
                "PRE": "db is a valid SQLAlchemy Session instance bound to the auth persistence context.",
                "POST": "self.repo is initialized and ready for auth user/role CRUD operations.",
                "SIDE_EFFECT": "Allocates AuthRepository and binds it to the provided Session.",
                "DATA_CONTRACT": "Input(Session) -> Model(AuthRepository)",
                "PARAM": "db (Session) - SQLAlchemy session."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "AuthService.authenticate_user",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 50,
              "end_line": 79,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Validates credentials and account state for local username/password authentication.",
                "PRE": "username and password are non-empty credential inputs.",
                "POST": "Returns User only when user exists, is active, and password hash verification succeeds; otherwise returns None.",
                "SIDE_EFFECT": "Persists last_login update for successful authentications via repository.",
                "DATA_CONTRACT": "Input(str username, str password) -> Output(User | None)",
                "PARAM": "password (str) - The plain password.",
                "RETURN": "Optional[User] - The authenticated user or None."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "AuthRepository"
                },
                {
                  "type": "CALLS",
                  "target": "verify_password"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "User"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "AuthService.create_session",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 81,
              "end_line": 101,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Issues an access token payload for an already authenticated user.",
                "PRE": "user is a valid User entity containing username and iterable roles with role.name values.",
                "POST": "Returns session dict with non-empty access_token and token_type='bearer'.",
                "SIDE_EFFECT": "Generates signed JWT via auth JWT provider.",
                "DATA_CONTRACT": "Input(User) -> Output(Dict[str, str]{access_token, token_type})",
                "PARAM": "user (User) - The authenticated user.",
                "RETURN": "Dict[str, str] - Session data."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "create_access_token"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "User"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "Role"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "AuthService.provision_adfs_user",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 103,
              "end_line": 144,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Performs ADFS Just-In-Time provisioning and role synchronization from AD group mappings.",
                "PRE": "user_info contains identity claims where at least one of 'upn' or 'email' is present; 'groups' may be absent.",
                "POST": "Returns persisted user entity with roles synchronized to mapped AD groups and refreshed state.",
                "SIDE_EFFECT": "May insert new User, mutate user.roles, commit transaction, and refresh ORM state.",
                "DATA_CONTRACT": "Input(Dict[str, Any]{upn|email, email, groups[]}) -> Output(User persisted)",
                "PARAM": "user_info (Dict[str, Any]) - Claims from ADFS token.",
                "RETURN": "User - The provisioned user."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "AuthRepository"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "User"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "Role"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "authenticate_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "provision_adfs_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9666666666666667
      }
    },
    {
      "name": "git_service",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 2049,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "git, service, gitpython, repository, version_control",
        "PURPOSE": "Core Git logic using GitPython to manage dashboard repositories.",
        "LAYER": "Service",
        "INVARIANT": "All Git operations must be performed on a valid local directory."
      },
      "relations": [
        {
          "type": "USED_BY",
          "target": "backend.src.api.routes.git"
        },
        {
          "type": "USED_BY",
          "target": "backend.src.plugins.git_plugin"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.database.SessionLocal"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.config.AppConfigRecord"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.git.GitRepository"
        }
      ],
      "children": [
        {
          "name": "GitService",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 34,
          "end_line": 2048,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Wrapper for GitPython operations with semantic logging and error handling."
          },
          "relations": [],
          "children": [
            {
              "name": "GitService_init",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 42,
              "end_line": 56,
              "tags": {
                "PURPOSE": "Initializes the GitService with a base path for repositories.",
                "PARAM": "base_path (str) - Root directory for all Git clones.",
                "PRE": "base_path is a valid string path.",
                "POST": "GitService is initialized; base_path directory exists."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._resolve_base_path"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._ensure_base_path_exists"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_ensure_base_path_exists",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 58,
              "end_line": 75,
              "tags": {
                "PURPOSE": "Ensure the repositories root directory exists and is a directory.",
                "PRE": "self.base_path is resolved to filesystem path.",
                "POST": "self.base_path exists as directory or raises ValueError.",
                "RETURN": "None"
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "self.base_path"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 58
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 58
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 58
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_resolve_base_path",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 77,
              "end_line": 118,
              "tags": {
                "PURPOSE": "Resolve base repository directory from explicit argument or global storage settings.",
                "PRE": "base_path is a string path.",
                "POST": "Returns absolute path for Git repositories root.",
                "RETURN": "str"
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "AppConfigRecord"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 77
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 77
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 77
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_normalize_repo_key",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 120,
              "end_line": 130,
              "tags": {
                "PURPOSE": "Convert user/dashboard-provided key to safe filesystem directory name.",
                "PRE": "repo_key can be None/empty.",
                "POST": "Returns normalized non-empty key.",
                "RETURN": "str"
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "re.sub"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 120
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 120
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 120
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_update_repo_local_path",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 132,
              "end_line": 154,
              "tags": {
                "PURPOSE": "Persist repository local_path in GitRepository table when record exists.",
                "PRE": "dashboard_id is valid integer.",
                "POST": "local_path is updated for existing record.",
                "RETURN": "None"
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "GitRepository"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 132
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 132
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 132
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_migrate_repo_directory",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 156,
              "end_line": 185,
              "tags": {
                "PURPOSE": "Move legacy repository directory to target path and sync DB metadata.",
                "PRE": "source_path exists.",
                "POST": "Repository content available at target_path.",
                "RETURN": "str"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._update_repo_local_path"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_ensure_gitflow_branches",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 187,
              "end_line": 270,
              "tags": {
                "PURPOSE": "Ensure standard GitFlow branches (main/dev/preprod) exist locally and on origin.",
                "PRE": "repo is a valid GitPython Repo instance.",
                "POST": "main, dev, preprod are available in local repository and pushed to origin when available.",
                "RETURN": "None"
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "Repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 187
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 187
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 187
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_get_repo_path",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 272,
              "end_line": 324,
              "tags": {
                "PURPOSE": "Resolves the local filesystem path for a dashboard's repository.",
                "PARAM": "repo_key (Optional[str]) - Slug-like key used when DB local_path is absent.",
                "PRE": "dashboard_id is an integer.",
                "POST": "Returns DB-local_path when present, otherwise base_path/<normalized repo_key>.",
                "RETURN": "str"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._normalize_repo_key"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._migrate_repo_directory"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._update_repo_local_path"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "init_repo",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 326,
              "end_line": 374,
              "tags": {
                "PURPOSE": "Initialize or clone a repository for a dashboard.",
                "PARAM": "repo_key (Optional[str]) - Slug-like key for deterministic folder naming on first init.",
                "PRE": "dashboard_id is int, remote_url is valid Git URL, pat is provided.",
                "POST": "Repository is cloned or opened at the local path.",
                "RETURN": "Repo - GitPython Repo object."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._get_repo_path"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._ensure_gitflow_branches"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "delete_repo",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 376,
              "end_line": 423,
              "tags": {
                "PURPOSE": "Remove local repository and DB binding for a dashboard.",
                "PRE": "dashboard_id is a valid integer.",
                "POST": "Local path is deleted when present and GitRepository row is removed.",
                "RETURN": "None"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._get_repo_path"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_repo",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 425,
              "end_line": 442,
              "tags": {
                "PURPOSE": "Get Repo object for a dashboard.",
                "PRE": "Repository must exist on disk for the given dashboard_id.",
                "POST": "Returns a GitPython Repo instance for the dashboard.",
                "RETURN": "Repo"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._get_repo_path"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "configure_identity",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 444,
              "end_line": 474,
              "tags": {
                "PURPOSE": "Configure repository-local Git committer identity for user-scoped operations.",
                "PRE": "dashboard_id repository exists; git_username/git_email may be empty.",
                "POST": "Repository config has user.name and user.email when both identity values are provided.",
                "RETURN": "None"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "list_branches",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 476,
              "end_line": 529,
              "tags": {
                "PURPOSE": "List all branches for a dashboard's repository.",
                "PRE": "Repository for dashboard_id exists.",
                "POST": "Returns a list of branch metadata dictionaries.",
                "RETURN": "List[dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "create_branch",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 531,
              "end_line": 566,
              "tags": {
                "PURPOSE": "Create a new branch from an existing one.",
                "PARAM": "from_branch (str) - Source branch.",
                "PRE": "Repository exists; name is valid; from_branch exists or repo is empty.",
                "POST": "A new branch is created in the repository."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "checkout_branch",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 568,
              "end_line": 578,
              "tags": {
                "PURPOSE": "Switch to a specific branch.",
                "PRE": "Repository exists and the specified branch name exists.",
                "POST": "The repository working directory is updated to the specified branch."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "commit_changes",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 580,
              "end_line": 605,
              "tags": {
                "PURPOSE": "Stage and commit changes.",
                "PARAM": "files (List[str]) - Optional list of specific files to stage.",
                "PRE": "Repository exists and has changes (dirty) or files are specified.",
                "POST": "Changes are staged and a new commit is created."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_extract_http_host",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 607,
              "end_line": 629,
              "tags": {
                "PURPOSE": "Extract normalized host[:port] from HTTP(S) URL.",
                "PRE": "url_value may be empty.",
                "POST": "Returns lowercase host token or None.",
                "RETURN": "Optional[str]"
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "urlparse"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 607
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 607
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 607
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_strip_url_credentials",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 631,
              "end_line": 651,
              "tags": {
                "PURPOSE": "Remove credentials from URL while preserving scheme/host/path.",
                "PRE": "url_value may contain credentials.",
                "POST": "Returns URL without username/password.",
                "RETURN": "str"
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "urlparse"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 631
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 631
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 631
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_replace_host_in_url",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 653,
              "end_line": 690,
              "tags": {
                "PURPOSE": "Replace source URL host with host from configured server URL.",
                "PRE": "source_url and config_url are HTTP(S) URLs.",
                "POST": "Returns source URL with updated host (credentials preserved) or None.",
                "RETURN": "Optional[str]"
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "urlparse"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 653
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 653
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 653
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_align_origin_host_with_config",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 692,
              "end_line": 759,
              "tags": {
                "PURPOSE": "Auto-align local origin host to configured Git server host when they drift.",
                "PRE": "origin remote exists.",
                "POST": "origin URL host updated and DB binding normalized when mismatch detected.",
                "RETURN": "Optional[str]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._extract_http_host"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._replace_host_in_url"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._strip_url_credentials"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "push_changes",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 761,
              "end_line": 874,
              "tags": {
                "PURPOSE": "Push local commits to remote.",
                "PRE": "Repository exists and has an 'origin' remote.",
                "POST": "Local branch commits are pushed to origin."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._align_origin_host_with_config"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_read_blob_text",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 876,
              "end_line": 887,
              "tags": {
                "PURPOSE": "Read text from a Git blob."
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "Blob"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 876
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 876
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 876
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_get_unmerged_file_paths",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 889,
              "end_line": 898,
              "tags": {
                "PURPOSE": "List files with merge conflicts."
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "Repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 889
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 889
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 889
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_build_unfinished_merge_payload",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 900,
              "end_line": 952,
              "tags": {
                "PURPOSE": "Build payload for unfinished merge state."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._get_unmerged_file_paths"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_merge_status",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 954,
              "end_line": 987,
              "tags": {
                "PURPOSE": "Get current merge status for a dashboard repository."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._build_unfinished_merge_payload"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_merge_conflicts",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 989,
              "end_line": 1014,
              "tags": {
                "PURPOSE": "List all files with conflicts and their contents."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._read_blob_text"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "resolve_merge_conflicts",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1016,
              "end_line": 1052,
              "tags": {
                "PURPOSE": "Resolve conflicts using specified strategy."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "abort_merge",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1054,
              "end_line": 1069,
              "tags": {
                "PURPOSE": "Abort ongoing merge."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "continue_merge",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1071,
              "end_line": 1107,
              "tags": {
                "PURPOSE": "Finalize merge after conflict resolution."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._get_unmerged_file_paths"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "pull_changes",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1109,
              "end_line": 1192,
              "tags": {
                "PURPOSE": "Pull changes from remote.",
                "PRE": "Repository exists and has an 'origin' remote.",
                "POST": "Changes from origin are pulled and merged into the active branch."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._build_unfinished_merge_payload"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_status",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1194,
              "end_line": 1269,
              "tags": {
                "PURPOSE": "Get current repository status (dirty files, untracked, etc.)",
                "PRE": "Repository for dashboard_id exists.",
                "POST": "Returns a dictionary representing the Git status.",
                "RETURN": "dict"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_diff",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1271,
              "end_line": 1289,
              "tags": {
                "PURPOSE": "Generate diff for a file or the whole repository.",
                "PARAM": "staged (bool) - Whether to show staged changes.",
                "PRE": "Repository for dashboard_id exists.",
                "POST": "Returns the diff text as a string.",
                "RETURN": "str"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_commit_history",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1291,
              "end_line": 1320,
              "tags": {
                "PURPOSE": "Retrieve commit history for a repository.",
                "PARAM": "limit (int) - Max number of commits to return.",
                "PRE": "Repository for dashboard_id exists.",
                "POST": "Returns a list of dictionaries for each commit in history.",
                "RETURN": "List[dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_connection",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1322,
              "end_line": 1371,
              "tags": {
                "PURPOSE": "Test connection to Git provider using PAT.",
                "PARAM": "pat (str)",
                "PRE": "provider is valid; url is a valid HTTP(S) URL; pat is provided.",
                "POST": "Returns True if connection to the provider's API succeeds.",
                "RETURN": "bool"
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "httpx.AsyncClient"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 1322
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 1322
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 1322
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_normalize_git_server_url",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1373,
              "end_line": 1383,
              "tags": {
                "PURPOSE": "Normalize Git server URL for provider API calls.",
                "PRE": "raw_url is non-empty.",
                "POST": "Returns URL without trailing slash.",
                "RETURN": "str"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_gitea_headers",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1385,
              "end_line": 1399,
              "tags": {
                "PURPOSE": "Build Gitea API authorization headers.",
                "PRE": "pat is provided.",
                "POST": "Returns headers with token auth.",
                "RETURN": "Dict[str, str]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_gitea_request",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1401,
              "end_line": 1449,
              "tags": {
                "PURPOSE": "Execute HTTP request against Gitea API with stable error mapping.",
                "PRE": "method and endpoint are valid.",
                "POST": "Returns decoded JSON payload.",
                "RETURN": "Any"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._normalize_git_server_url"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._gitea_headers"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_gitea_current_user",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1451,
              "end_line": 1463,
              "tags": {
                "PURPOSE": "Resolve current Gitea user for PAT.",
                "PRE": "server_url and pat are valid.",
                "POST": "Returns current username.",
                "RETURN": "str"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._gitea_request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "list_gitea_repositories",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1465,
              "end_line": 1481,
              "tags": {
                "PURPOSE": "List repositories visible to authenticated Gitea user.",
                "PRE": "server_url and pat are valid.",
                "POST": "Returns repository list from Gitea.",
                "RETURN": "List[dict]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._gitea_request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "create_gitea_repository",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1483,
              "end_line": 1518,
              "tags": {
                "PURPOSE": "Create repository in Gitea for authenticated user.",
                "PRE": "name is non-empty and PAT has repo creation permission.",
                "POST": "Returns created repository payload.",
                "RETURN": "dict"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._gitea_request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "delete_gitea_repository",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1520,
              "end_line": 1540,
              "tags": {
                "PURPOSE": "Delete repository in Gitea.",
                "PRE": "owner and repo_name are non-empty.",
                "POST": "Repository deleted on Gitea server."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._gitea_request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_gitea_branch_exists",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1542,
              "end_line": 1566,
              "tags": {
                "PURPOSE": "Check whether a branch exists in Gitea repository.",
                "PRE": "owner/repo/branch are non-empty.",
                "POST": "Returns True when branch exists, False when 404.",
                "RETURN": "bool"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._gitea_request"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_gitea_pr_404_detail",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1568,
              "end_line": 1602,
              "tags": {
                "PURPOSE": "Build actionable error detail for Gitea PR 404 responses.",
                "PRE": "owner/repo/from_branch/to_branch are provided.",
                "POST": "Returns specific branch-missing message when detected.",
                "RETURN": "Optional[str]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._gitea_branch_exists"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "create_github_repository",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1604,
              "end_line": 1655,
              "tags": {
                "PURPOSE": "Create repository in GitHub or GitHub Enterprise.",
                "PRE": "PAT has repository create permission.",
                "POST": "Returns created repository payload.",
                "RETURN": "dict"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._normalize_git_server_url"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "create_gitlab_repository",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1657,
              "end_line": 1716,
              "tags": {
                "PURPOSE": "Create repository(project) in GitLab.",
                "PRE": "PAT has api scope.",
                "POST": "Returns created repository payload.",
                "RETURN": "dict"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._normalize_git_server_url"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_parse_remote_repo_identity",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1718,
              "end_line": 1752,
              "tags": {
                "PURPOSE": "Parse owner/repo from remote URL for Git server API operations.",
                "PRE": "remote_url is a valid git URL.",
                "POST": "Returns owner/repo tokens.",
                "RETURN": "Dict[str, str]"
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "urlparse"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 1718
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 1718
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 1718
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "_derive_server_url_from_remote",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1754,
              "end_line": 1775,
              "tags": {
                "PURPOSE": "Build API base URL from remote repository URL without credentials.",
                "PRE": "remote_url may be any git URL.",
                "POST": "Returns normalized http(s) base URL or None when derivation is impossible.",
                "RETURN": "Optional[str]"
              },
              "relations": [
                {
                  "type": "USES",
                  "target": "urlparse"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 1754
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 1754
                  },
                  {
                    "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                    "severity": "WARNING",
                    "line_number": 1754
                  }
                ],
                "score": 0.55
              }
            },
            {
              "name": "promote_direct_merge",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1777,
              "end_line": 1841,
              "tags": {
                "PURPOSE": "Perform direct merge between branches in local repo and push target branch.",
                "PRE": "Repository exists and both branches are valid.",
                "POST": "Target branch contains merged changes from source branch.",
                "RETURN": "Dict[str, Any]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService.get_repo"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "create_gitea_pull_request",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1843,
              "end_line": 1934,
              "tags": {
                "PURPOSE": "Create pull request in Gitea.",
                "PRE": "Config and remote URL are valid.",
                "POST": "Returns normalized PR metadata.",
                "RETURN": "Dict[str, Any]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._parse_remote_repo_identity"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._gitea_request"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._derive_server_url_from_remote"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._normalize_git_server_url"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._build_gitea_pr_404_detail"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "create_github_pull_request",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1936,
              "end_line": 1990,
              "tags": {
                "PURPOSE": "Create pull request in GitHub or GitHub Enterprise.",
                "PRE": "Config and remote URL are valid.",
                "POST": "Returns normalized PR metadata.",
                "RETURN": "Dict[str, Any]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._parse_remote_repo_identity"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._normalize_git_server_url"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "create_gitlab_merge_request",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 1992,
              "end_line": 2046,
              "tags": {
                "PURPOSE": "Create merge request in GitLab.",
                "PRE": "Config and remote URL are valid.",
                "POST": "Returns normalized MR metadata.",
                "RETURN": "Dict[str, Any]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "GitService._parse_remote_repo_identity"
                },
                {
                  "type": "CALLS",
                  "target": "GitService._normalize_git_server_url"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 34
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
                "severity": "WARNING",
                "line_number": 34
              }
            ],
            "score": 0.5499999999999999
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 2049 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.47500000000000003
      }
    },
    {
      "name": "mapping_service",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 99,
      "tags": {
        "SEMANTICS": "service, mapping, fuzzy-matching, superset",
        "PURPOSE": "Orchestrates database fetching and fuzzy matching suggestions.",
        "COMPLEXITY": "3",
        "LAYER": "Service",
        "PRE": "source/target environment identifiers are provided by caller.",
        "POST": "Exposes stateless mapping suggestion orchestration over configured environments.",
        "SIDE_EFFECT": "Performs remote metadata reads through Superset API clients.",
        "DATA_CONTRACT": "Input[source_env_id: str, target_env_id: str] -> Output[List[Dict]]",
        "INVARIANT": "Suggestions are based on database names."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "SupersetClient"
        },
        {
          "type": "DEPENDS_ON",
          "target": "suggest_mappings"
        }
      ],
      "children": [
        {
          "name": "MappingService",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 24,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Service for handling database mapping logic.",
            "COMPLEXITY": "3",
            "PRE": "config_manager exposes get_environments() with environment objects containing id.",
            "POST": "Provides client resolution and mapping suggestion methods.",
            "SIDE_EFFECT": "Instantiates Superset clients and performs upstream metadata reads.",
            "DATA_CONTRACT": "Input[config_manager] -> Output[List[Dict]]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SupersetClient"
            },
            {
              "type": "DEPENDS_ON",
              "target": "suggest_mappings"
            }
          ],
          "children": [
            {
              "name": "init",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 34,
              "end_line": 45,
              "tags": {
                "PURPOSE": "Initializes the mapping service with a config manager.",
                "COMPLEXITY": "3",
                "PRE": "config_manager is provided.",
                "PARAM": "config_manager (ConfigManager) - The configuration manager.",
                "POST": "Service is initialized."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "MappingService"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_get_client",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 47,
              "end_line": 64,
              "tags": {
                "PURPOSE": "Helper to get an initialized SupersetClient for an environment.",
                "COMPLEXITY": "3",
                "PARAM": "env_id (str) - The ID of the environment.",
                "PRE": "environment must exist in config.",
                "POST": "Returns an initialized SupersetClient.",
                "RETURN": "SupersetClient - Initialized client."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetClient"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "get_suggestions",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 66,
              "end_line": 94,
              "tags": {
                "PURPOSE": "Fetches databases from both environments and returns fuzzy matching suggestions.",
                "COMPLEXITY": "3",
                "PARAM": "target_env_id (str) - Target environment ID.",
                "PRE": "Both environments must be accessible.",
                "POST": "Returns fuzzy-matched database suggestions.",
                "RETURN": "List[Dict] - Suggested mappings."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_get_client"
                },
                {
                  "type": "CALLS",
                  "target": "suggest_mappings"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "test_encryption_manager",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 138,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "encryption, security, fernet, api-keys, tests",
        "PURPOSE": "Unit tests for EncryptionManager encrypt/decrypt functionality.",
        "LAYER": "Domain",
        "INVARIANT": "Encrypt+decrypt roundtrip always returns original plaintext."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "TestEncryptionManager",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 137,
          "tags": {
            "PURPOSE": "Validate EncryptionManager encrypt/decrypt roundtrip, uniqueness, and error handling.",
            "PRE": "cryptography package installed.",
            "POST": "All encrypt/decrypt invariants verified."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_encryption_manager"
            }
          ],
          "children": [
            {
              "name": "test_encrypt_decrypt_roundtrip",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 44,
              "end_line": 55,
              "tags": {
                "PURPOSE": "Encrypt then decrypt returns original plaintext.",
                "PRE": "Valid plaintext string.",
                "POST": "Decrypted output equals original input."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_encrypt_produces_different_output",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 57,
              "end_line": 67,
              "tags": {
                "PURPOSE": "Same plaintext produces different ciphertext (Fernet uses random IV).",
                "PRE": "Two encrypt calls with same input.",
                "POST": "Ciphertexts differ but both decrypt to same value."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_different_inputs_yield_different_ciphertext",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 69,
              "end_line": 78,
              "tags": {
                "PURPOSE": "Different inputs produce different ciphertexts.",
                "PRE": "Two different plaintext values.",
                "POST": "Encrypted outputs differ."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_decrypt_invalid_data_raises",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 80,
              "end_line": 88,
              "tags": {
                "PURPOSE": "Decrypting invalid data raises InvalidToken.",
                "PRE": "Invalid ciphertext string.",
                "POST": "Exception raised."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_encrypt_empty_string",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 90,
              "end_line": 100,
              "tags": {
                "PURPOSE": "Encrypting and decrypting an empty string works.",
                "PRE": "Empty string input.",
                "POST": "Decrypted output equals empty string."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_missing_key_fails_fast",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 102,
              "end_line": 112,
              "tags": {
                "PURPOSE": "Missing ENCRYPTION_KEY must abort initialization instead of using a fallback secret.",
                "PRE": "ENCRYPTION_KEY is unset.",
                "POST": "RuntimeError raised during EncryptionManager construction."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_custom_key_roundtrip",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 114,
              "end_line": 135,
              "tags": {
                "PURPOSE": "Custom Fernet key produces valid roundtrip.",
                "PRE": "Generated Fernet key.",
                "POST": "Encrypt/decrypt with custom key succeeds."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "encrypt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "decrypt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 123,
          "end_line": 123,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "encrypt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 126,
          "end_line": 126,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "decrypt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "test_health_service",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 7,
      "end_line": 306,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for HealthService aggregation logic."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "src.services.health_service.HealthService"
        }
      ],
      "children": [
        {
          "name": "test_delete_validation_report_deletes_dashboard_scope_and_linked_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 237,
          "tags": {
            "RISK": "db.query side_effect chain may not propagate through .filter().first() \u2014 verify mock chain setup is correct for this test."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_health_service"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_delete_validation_report_returns_false_for_unknown_record",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 240,
          "end_line": 251,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_health_service"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_delete_validation_report_swallows_linked_task_cleanup_failure",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 254,
          "end_line": 305,
          "tags": {
            "RISK": "db.query side_effect chain may not propagate through .filter().first() \u2014 verify mock chain setup is correct for this test."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_health_service"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_health_summary_aggregation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 14,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_health_summary_empty",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_health_summary_resolves_slug_and_title_from_superset",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_health_summary_reuses_dashboard_metadata_cache_across_service_instances",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 7
          },
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 7
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 7
          },
          {
            "message": "Fractal limit warning: Module length is 300 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 7
          }
        ],
        "score": 0.17500000000000004
      }
    },
    {
      "name": "test_llm_plugin_persistence",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 221,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Regression test for ValidationRecord persistence fields populated from task context."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "DashboardValidationPlugin:Class"
        }
      ],
      "children": [
        {
          "name": "_DummyLogger",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 34,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Minimal logger shim for TaskContext-like objects used in tests.",
            "INVARIANT": "Logging methods are no-ops and must not mutate test state."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_llm_plugin_persistence:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_FakeDBSession",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 58,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Captures persisted records for assertion and mimics SQLAlchemy session methods used by plugin.",
            "INVARIANT": "add/commit/close provide only persistence signals asserted by this test."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_llm_plugin_persistence:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_dashboard_validation_plugin_persists_task_and_environment_ids",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 218,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Ensure db ValidationRecord includes context.task_id and params.environment_id.",
            "INVARIANT": "Assertions remain restricted to persisted task/environment identity fields and session lifecycle signals."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_llm_plugin_persistence:Module"
            },
            {
              "type": "VERIFIES",
              "target": "DashboardValidationPlugin:Class"
            }
          ],
          "children": [
            {
              "name": "_FakeProviderService",
              "type": "Class",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 83,
              "end_line": 98,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "LLM provider service stub returning deterministic provider and decrypted API key for plugin tests.",
                "INVARIANT": "Returns same provider and key regardless of provider_id argument; no lookup logic."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_dashboard_validation_plugin_persists_task_and_environment_ids:Function"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_FakeScreenshotService",
              "type": "Class",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 100,
              "end_line": 112,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Screenshot service stub that accepts capture_dashboard calls without side effects.",
                "INVARIANT": "capture_dashboard is intentionally permissive for this persistence-focused test and does not validate argument values."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_dashboard_validation_plugin_persists_task_and_environment_ids:Function"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_FakeLLMClient",
              "type": "Class",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 114,
              "end_line": 136,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Deterministic LLM client double returning canonical analysis payload for persistence-path assertions.",
                "INVARIANT": "analyze_dashboard is side-effect free and returns schema-compatible PASS result."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_dashboard_validation_plugin_persists_task_and_environment_ids:Function"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_FakeNotificationService",
              "type": "Class",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 138,
              "end_line": 150,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Notification service stub that accepts plugin dispatch_report payload without introducing side effects.",
                "INVARIANT": "dispatch_report accepts arbitrary keyword payloads because this test verifies persistence fields, not notification payload schema."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_dashboard_validation_plugin_persists_task_and_environment_ids:Function"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_FakeConfigManager",
              "type": "Class",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 152,
              "end_line": 169,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Config manager stub providing storage root path and minimal settings for plugin execution path.",
                "INVARIANT": "Only storage.root_path and llm fields are safe to access; all other settings fields are absent."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_dashboard_validation_plugin_persists_task_and_environment_ids:Function"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_FakeSupersetClient",
              "type": "Class",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 171,
              "end_line": 182,
              "tags": {
                "COMPLEXITY": "1",
                "PURPOSE": "Superset client stub exposing network.request as a lambda that returns empty result list.",
                "INVARIANT": "network.request intentionally accepts arbitrary keyword payloads because response shape, not request signature, is the persistence-path dependency."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_dashboard_validation_plugin_persists_task_and_environment_ids:Function"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 61
              },
              {
                "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 61
              }
            ],
            "score": 0.7
          }
        },
        {
          "name": "with_source",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "info",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 21,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "debug",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "warning",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 27,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 30,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "add",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "commit",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "close",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_provider",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_decrypted_api_key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 106,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "capture_dashboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 126,
          "end_line": 126,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "analyze_dashboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "dispatch_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 147,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_environment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_config",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 161,
          "end_line": 161,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 177,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.32500000000000007
      }
    },
    {
      "name": "test_llm_prompt_templates",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 126,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, llm, prompts, templates, settings",
        "PURPOSE": "Validate normalization and rendering behavior for configurable LLM prompt templates.",
        "LAYER": "Domain Tests",
        "INVARIANT": "All required prompt keys remain available after normalization."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.llm_prompt_templates:Function"
        }
      ],
      "children": [
        {
          "name": "test_normalize_llm_settings_adds_default_prompts",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 20,
          "end_line": 41,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Ensure legacy/partial llm settings are expanded with all prompt defaults.",
            "PRE": "Input llm settings do not contain complete prompts object.",
            "POST": "Returned structure includes required prompt templates with fallback defaults."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_llm_prompt_templates"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "test_normalize_llm_settings_keeps_custom_prompt_values",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 44,
          "end_line": 57,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Ensure user-customized prompt values are preserved during normalization.",
            "PRE": "Input llm settings contain custom prompt override.",
            "POST": "Custom prompt value remains unchanged in normalized output."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_llm_prompt_templates"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "test_render_prompt_replaces_known_placeholders",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 60,
          "end_line": 75,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Ensure template placeholders are deterministically replaced.",
            "PRE": "Template contains placeholders matching provided variables.",
            "POST": "Rendered prompt string contains substituted values."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_llm_prompt_templates"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "test_is_multimodal_model_detects_known_vision_models",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 89,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Ensure multimodal model detection recognizes common vision-capable model names."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_llm_prompt_templates"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_resolve_bound_provider_id_prefers_binding_then_default",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 105,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Verify provider binding resolution priority."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_llm_prompt_templates"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_normalize_llm_settings_keeps_assistant_planner_settings",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 123,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Ensure assistant planner provider/model fields are preserved and normalized."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_llm_prompt_templates"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "test_llm_provider",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 6,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, llm-provider, encryption, contract",
        "PURPOSE": "Contract testing for LLMProviderService and EncryptionManager"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "src.services.llm_provider:Module"
        }
      ],
      "children": [
        {
          "name": "mock_db",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "service",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 88,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "_test_encryption_key_fixture",
      "type": "Global",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 17,
      "end_line": 21,
      "tags": {
        "PURPOSE": "Ensure encryption-dependent provider tests run with a valid Fernet key."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "pytest:Module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_encryption_cycle",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 26,
      "end_line": 39,
      "tags": {
        "PURPOSE": "Verify EncryptionManager round-trip encryption/decryption invariant for non-empty secrets.",
        "TEST_EDGE": "empty_string_encryption"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "test_llm_provider:Module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_empty_string_encryption",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 42,
      "end_line": 53,
      "tags": {
        "PURPOSE": "Verify EncryptionManager preserves empty-string payloads through encrypt/decrypt cycle.",
        "TEST_EDGE": "decrypt_invalid_data"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "test_llm_provider:Module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_decrypt_invalid_data",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 56,
      "end_line": 66,
      "tags": {
        "PURPOSE": "Ensure decrypt rejects invalid ciphertext input by raising an exception.",
        "TEST_FIXTURE": "mock_db_session"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "test_llm_provider:Module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "mock_db",
      "type": "Fixture",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 69,
      "end_line": 80,
      "tags": {
        "COMPLEXITY": "1",
        "PURPOSE": "MagicMock(spec=Session) fixture providing a constrained DB session double for LLMProviderService tests.",
        "INVARIANT": "Chained calls beyond Session spec create unconstrained intermediate mocks; only top-level query/add/commit are spec-enforced.",
        "RISK": "query() returns unconstrained MagicMock \u2014 chain beyond query() has no spec protection. Consider create_autospec(Session) for full chain safety."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "test_llm_provider:Module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "service",
      "type": "Fixture",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 83,
      "end_line": 92,
      "tags": {
        "COMPLEXITY": "1",
        "PURPOSE": "LLMProviderService fixture wired to mock_db for provider CRUD tests."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "test_llm_provider:Module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_get_all_providers",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 95,
      "end_line": 104,
      "tags": {
        "PURPOSE": "Verify provider list retrieval issues query/all calls on the backing DB session."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "test_llm_provider:Module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_create_provider",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 107,
      "end_line": 130,
      "tags": {
        "PURPOSE": "Ensure provider creation persists entity and stores API key in encrypted form."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "test_llm_provider:Module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_get_decrypted_api_key",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 133,
      "end_line": 146,
      "tags": {
        "PURPOSE": "Verify service decrypts stored provider API key for an existing provider record."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "test_llm_provider:Module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_get_decrypted_api_key_not_found",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 149,
      "end_line": 157,
      "tags": {
        "PURPOSE": "Verify missing provider lookup returns None instead of attempting decryption."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "test_llm_provider:Module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_update_provider_ignores_masked_placeholder_api_key",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 160,
      "end_line": 193,
      "tags": {
        "PURPOSE": "Ensure masked placeholder API keys do not overwrite previously encrypted provider secrets."
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "test_llm_provider:Module"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TestResourceService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 455,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "resource-service, tests, dashboards, datasets, activity",
        "PURPOSE": "Unit tests for ResourceService",
        "LAYER": "Service",
        "INVARIANT": "Resource summaries preserve task linkage and status projection behavior."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "src.services.resource_service.ResourceService"
        }
      ],
      "children": [
        {
          "name": "test_get_dashboards_with_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Validate dashboard enrichment includes git/task status projections.",
            "TEST": "get_dashboards_with_status returns dashboards with git and task status",
            "PRE": "SupersetClient returns dashboard list",
            "POST": "Each dashboard has git_status and last_task fields"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_datasets_with_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 116,
          "tags": {
            "TEST": "get_datasets_with_status returns datasets with task status",
            "PRE": "SupersetClient returns dataset list",
            "POST": "Each dataset has last_task field"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_activity_summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 119,
          "end_line": 154,
          "tags": {
            "TEST": "get_activity_summary returns active count and recent tasks",
            "PRE": "tasks list provided",
            "POST": "Returns dict with active_count and recent_tasks"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_git_status_for_dashboard_no_repo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 157,
          "end_line": 176,
          "tags": {
            "TEST": "_get_git_status_for_dashboard returns None when no repo exists",
            "PRE": "GitService returns None for repo",
            "POST": "Returns None"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_last_task_for_resource",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 179,
          "end_line": 209,
          "tags": {
            "TEST": "_get_last_task_for_resource returns most recent task for resource",
            "PRE": "tasks list with matching resource_id",
            "POST": "Returns task summary with task_id and status"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_extract_resource_name_from_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 212,
          "end_line": 239,
          "tags": {
            "TEST": "_extract_resource_name_from_task extracts name from params",
            "PRE": "task has resource_name in params",
            "POST": "Returns resource name or fallback"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_last_task_for_resource_empty_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 242,
          "end_line": 256,
          "tags": {
            "TEST": "_get_last_task_for_resource returns None for empty tasks list",
            "PRE": "tasks is empty list",
            "POST": "Returns None"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_last_task_for_resource_no_match",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 259,
          "end_line": 279,
          "tags": {
            "TEST": "_get_last_task_for_resource returns None when no tasks match resource_id",
            "PRE": "tasks list has no matching resource_id",
            "POST": "Returns None"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_with_status_handles_mixed_naive_and_aware_task_datetimes",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 282,
          "end_line": 322,
          "tags": {
            "TEST": "get_dashboards_with_status handles mixed naive/aware datetimes without comparison errors.",
            "PRE": "Task list includes both timezone-aware and timezone-naive timestamps.",
            "POST": "Latest task is selected deterministically and no exception is raised."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_with_status_prefers_latest_decisive_validation_status_over_newer_unknown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 325,
          "end_line": 371,
          "tags": {
            "TEST": "get_dashboards_with_status keeps latest task identity while falling back to older decisive validation status.",
            "PRE": "Same dashboard has older WARN and newer UNKNOWN validation tasks.",
            "POST": "Returned last_task points to newest task but preserves WARN as last meaningful validation state."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_with_status_falls_back_to_latest_unknown_without_decisive_history",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 374,
          "end_line": 419,
          "tags": {
            "TEST": "get_dashboards_with_status still returns newest UNKNOWN when no decisive validation exists.",
            "PRE": "Same dashboard has only UNKNOWN validation tasks.",
            "POST": "Returned last_task keeps newest UNKNOWN task."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_last_task_for_resource_handles_mixed_naive_and_aware_created_at",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 422,
          "end_line": 452,
          "tags": {
            "TEST": "_get_last_task_for_resource handles mixed naive/aware created_at values.",
            "PRE": "Matching tasks include naive and aware created_at timestamps.",
            "POST": "Latest task is returned without raising datetime comparison errors."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 455 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.625
      }
    },
    {
      "name": "test_rbac_permission_catalog",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 144,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, rbac, permissions, catalog, discovery, sync",
        "PURPOSE": "Verifies RBAC permission catalog discovery and idempotent synchronization behavior.",
        "LAYER": "Service Tests",
        "INVARIANT": "Synchronization adds only missing normalized permission pairs."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_discover_route_permissions_extracts_declared_pairs_and_ignores_tests",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Ensures route-scanner extracts has_permission pairs from route files and skips __tests__.",
            "PRE": "Temporary route directory contains route and test files.",
            "POST": "Returned set includes production route permissions and excludes test-only declarations."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_rbac_permission_catalog"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_discover_declared_permissions_unions_route_and_plugin_permissions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Ensures full catalog includes route-level permissions plus dynamic plugin EXECUTE rights.",
            "PRE": "Route discovery and plugin loader both return permission sources.",
            "POST": "Result set contains union of both sources."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_rbac_permission_catalog"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_sync_permission_catalog_inserts_only_missing_normalized_pairs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Ensures synchronization inserts only missing pairs and normalizes action/resource tokens.",
            "PRE": "DB already contains subset of permissions.",
            "POST": "Only missing normalized pairs are inserted and commit is executed once."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_rbac_permission_catalog"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_sync_permission_catalog_is_noop_when_all_permissions_exist",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 141,
          "tags": {
            "PURPOSE": "Ensures synchronization is idempotent when all declared pairs already exist.",
            "PRE": "DB contains full declared permission set.",
            "POST": "No inserts are added and commit is not called."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_rbac_permission_catalog"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "providers",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 177,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "notifications, providers, smtp, slack, telegram, abstraction",
        "PURPOSE": "Defines abstract base and concrete implementations for external notification delivery.",
        "LAYER": "Infra",
        "PRE": "Provider configuration dictionaries are supplied by trusted configuration sources.",
        "POST": "Each provider exposes async send contract returning boolean delivery outcome.",
        "SIDE_EFFECT": "Performs outbound network I/O to SMTP or HTTP endpoints.",
        "DATA_CONTRACT": "Input[target, subject, body, context?] -> Output[bool]",
        "INVARIANT": "Sensitive credentials must be handled via encrypted config."
      },
      "relations": [
        {
          "type": "DEPENDED_ON_BY",
          "target": "NotificationService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "NotificationProvider"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SMTPProvider"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TelegramProvider"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SlackProvider"
        }
      ],
      "children": [
        {
          "name": "NotificationProvider",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 57,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Abstract base class for all notification providers."
          },
          "relations": [
            {
              "type": "DEPENDED_ON_BY",
              "target": "SMTPProvider"
            },
            {
              "type": "DEPENDED_ON_BY",
              "target": "TelegramProvider"
            },
            {
              "type": "DEPENDED_ON_BY",
              "target": "SlackProvider"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [
              {
                "message": "Invalid @RELATION predicate: DEPENDED_ON_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 31
              },
              {
                "message": "Invalid @RELATION predicate: DEPENDED_ON_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 31
              },
              {
                "message": "Invalid @RELATION predicate: DEPENDED_ON_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 31
              },
              {
                "message": "Invalid @RELATION predicate: DEPENDED_ON_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 31
              },
              {
                "message": "Invalid @RELATION predicate: DEPENDED_ON_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 31
              },
              {
                "message": "Invalid @RELATION predicate: DEPENDED_ON_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
                "severity": "WARNING",
                "line_number": 31
              }
            ],
            "score": 0.10000000000000009
          }
        },
        {
          "name": "SMTPProvider",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 60,
          "end_line": 102,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Delivers notifications via SMTP."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "NotificationProvider"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "TelegramProvider",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 105,
          "end_line": 142,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Delivers notifications via Telegram Bot API."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "NotificationProvider"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "SlackProvider",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 145,
          "end_line": 175,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Delivers notifications via Slack Webhooks or API."
          },
          "relations": [
            {
              "type": "INHERITS",
              "target": "NotificationProvider"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "send",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 65,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "send",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 73,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 110,
          "end_line": 110,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "send",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 113,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 150,
          "end_line": 150,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "send",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 153,
          "end_line": 153,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: DEPENDED_ON_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.4666666666666667
      }
    },
    {
      "name": "service",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 238,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "notifications, service, routing, dispatch, background-tasks",
        "PURPOSE": "Orchestrates notification routing based on user preferences and policy context.",
        "LAYER": "Domain",
        "INVARIANT": "Missing profile or provider config must not crash the pipeline."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "NotificationProvider"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SMTPProvider"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TelegramProvider"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SlackProvider"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ValidationRecord"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ValidationPolicy"
        },
        {
          "type": "DEPENDS_ON",
          "target": "UserDashboardPreference"
        }
      ],
      "children": [
        {
          "name": "NotificationService",
          "type": "Class",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 34,
          "end_line": 236,
          "tags": {
            "PURPOSE": "Routes validation reports to appropriate users and channels.",
            "COMPLEXITY": "4",
            "PRE": "Service receives a live DB session and configuration manager with notification payload settings.",
            "POST": "Service can resolve targets and dispatch provider sends without mutating validation records.",
            "SIDE_EFFECT": "Reads notification configuration, queries user preferences, and dispatches provider I/O.",
            "DATA_CONTRACT": "Input[ValidationRecord, Optional[ValidationPolicy], Optional[BackgroundTasks]] -> Output[None]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "NotificationProvider"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ValidationRecord"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ValidationPolicy"
            },
            {
              "type": "DEPENDS_ON",
              "target": "UserDashboardPreference"
            }
          ],
          "children": [
            {
              "name": "NotificationService_init",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 46,
              "end_line": 57,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Bind DB and configuration collaborators used for provider initialization and routing."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "NotificationService"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationPolicy"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_initialize_providers",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 59,
              "end_line": 83,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Materialize configured notification channel adapters once per service lifetime."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "SMTPProvider"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TelegramProvider"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "SlackProvider"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "dispatch_report",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 85,
              "end_line": 141,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Route one validation record to resolved owners and configured custom channels.",
                "PRE": "record is persisted and providers can be initialized from configuration payload.",
                "POST": "Eligible notification sends are scheduled in background or awaited inline.",
                "SIDE_EFFECT": "Schedules or performs outbound provider sends and emits notification logs.",
                "DATA_CONTRACT": "Input[ValidationRecord, Optional[ValidationPolicy], Optional[BackgroundTasks]] -> Output[None]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_initialize_providers"
                },
                {
                  "type": "CALLS",
                  "target": "_should_notify"
                },
                {
                  "type": "CALLS",
                  "target": "_resolve_targets"
                },
                {
                  "type": "CALLS",
                  "target": "_build_body"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "_should_notify",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 143,
              "end_line": 159,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Evaluate record status against effective alert policy."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationRecord"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationPolicy"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_resolve_targets",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 161,
              "end_line": 196,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Resolve owner and policy-defined delivery targets for one validation record."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "_find_dashboard_owners"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationRecord"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationPolicy"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_find_dashboard_owners",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 198,
              "end_line": 218,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Load candidate dashboard owners from persisted profile preferences."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationRecord"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "UserDashboardPreference"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "_build_body",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 220,
              "end_line": 233,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Format one validation record into provider-ready body text."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationRecord"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "notifications",
      "type": "Package",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 4,
      "tags": {
        "PURPOSE": "Notification service package root."
      },
      "relations": [
        {
          "type": "EXPORTS",
          "target": "NotificationService:Class"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: EXPORTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "test_notification_service",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 121,
      "tags": {
        "COMPLEXITY": "2",
        "PURPOSE": "Unit tests for NotificationService routing and dispatch logic."
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "NotificationService:Class"
        }
      ],
      "children": [
        {
          "name": "mock_db",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mock_config_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "service",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_should_notify_fail_only",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_should_notify_warn_and_fail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_resolve_targets_owner_routing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_resolve_targets_custom_channels",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_dispatch_report_skips_if_no_notify",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_dispatch_report_calls_providers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "compliance_orchestrator",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "clean-release, orchestrator, compliance-gate, stages",
        "PURPOSE": "Execute mandatory clean compliance stages and produce final COMPLIANT/BLOCKED/FAILED outcome.",
        "LAYER": "Domain",
        "INVARIANT": "COMPLIANT is impossible when any mandatory stage fails.",
        "TEST_CONTRACT": "ComplianceCheckRun -> ComplianceCheckRun",
        "TEST_FIXTURE": "compliant_candidate -> file:backend/tests/fixtures/clean_release/fixtures_clean_release.json",
        "TEST_EDGE": "report_generation_error -> Downstream reporting failure does not alter orchestrator status derivation contract",
        "TEST_INVARIANT": "compliant_requires_all_mandatory_pass -> VERIFIED_BY: [stage_failure_blocks_release]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.stages"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.report_builder"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.repository"
        }
      ],
      "children": [
        {
          "name": "CleanComplianceOrchestrator",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": null,
          "tags": {
            "PURPOSE": "Coordinate clean-release compliance verification stages."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 45,
              "end_line": null,
              "tags": {
                "PURPOSE": "Bind repository dependency used for orchestrator persistence and lookups.",
                "PRE": "repository is a valid CleanReleaseRepository instance with required methods.",
                "POST": "self.repository is assigned and used by all orchestration steps.",
                "SIDE_EFFECT": "Stores repository reference on orchestrator instance.",
                "DATA_CONTRACT": "Input -> CleanReleaseRepository, Output -> None"
              },
              "relations": [],
              "children": [
                {
                  "name": "start_check_run",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 56,
                  "end_line": 124,
                  "tags": {
                    "PURPOSE": "Initiate a new compliance run session.",
                    "PRE": "candidate_id and policy_id are provided; legacy callers may omit persisted manifest/policy records.",
                    "POST": "Returns initialized ComplianceRun in RUNNING state persisted in repository.",
                    "SIDE_EFFECT": "Reads manifest/policy when present and writes new ComplianceRun via repository.save_check_run.",
                    "DATA_CONTRACT": "Input -> (candidate_id:str, policy_id:str, requested_by:str, manifest_id:str|None), Output -> ComplianceRun"
                  },
                  "relations": [],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                },
                {
                  "name": "execute_stages",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 126,
                  "end_line": 179,
                  "tags": {
                    "PURPOSE": "Execute or accept compliance stage outcomes and set intermediate/final check-run status fields.",
                    "PRE": "check_run exists and references candidate/policy/registry/manifest identifiers resolvable by repository.",
                    "POST": "Returns persisted ComplianceRun with status FAILED on missing dependencies, otherwise SUCCEEDED with final_status set.",
                    "SIDE_EFFECT": "Reads candidate/policy/registry/manifest and persists updated check_run.",
                    "DATA_CONTRACT": "Input -> (check_run:ComplianceRun, forced_results:Optional[List[ComplianceStageRun]]), Output -> ComplianceRun"
                  },
                  "relations": [],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                },
                {
                  "name": "finalize_run",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 181,
                  "end_line": 205,
                  "tags": {
                    "PURPOSE": "Finalize run status based on cumulative stage results.",
                    "PRE": "check_run was started and may already contain a derived final_status from stage execution.",
                    "POST": "Returns persisted ComplianceRun in SUCCEEDED status with final_status guaranteed non-empty.",
                    "SIDE_EFFECT": "Mutates check_run terminal fields and persists via repository.save_check_run.",
                    "DATA_CONTRACT": "Input -> ComplianceRun, Output -> ComplianceRun"
                  },
                  "relations": [],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                },
                {
                  "name": "run_check_legacy",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 209,
                  "end_line": 232,
                  "tags": {
                    "PURPOSE": "Legacy wrapper for compatibility with previous orchestrator call style.",
                    "PRE": "repository and identifiers are valid and resolvable by orchestrator dependencies.",
                    "POST": "Returns finalized ComplianceRun produced by orchestrator start->execute->finalize sequence.",
                    "SIDE_EFFECT": "Reads/writes compliance entities through repository during orchestrator calls.",
                    "DATA_CONTRACT": "Input -> (repository:CleanReleaseRepository, candidate_id:str, policy_id:str, requested_by:str, manifest_id:str), Output -> ComplianceRun"
                  },
                  "relations": [],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                }
              ],
              "compliance": {
                "valid": false,
                "issues": [
                  {
                    "message": "Unclosed Anchor: [DEF:__init__:Function] started at line 45",
                    "severity": "ERROR",
                    "line_number": 45
                  },
                  {
                    "message": "Unclosed Anchor: [DEF:__init__:Function] started at line 45",
                    "severity": "ERROR",
                    "line_number": 45
                  },
                  {
                    "message": "Unclosed Anchor: [DEF:__init__:Function] started at line 45",
                    "severity": "ERROR",
                    "line_number": 45
                  }
                ],
                "score": 0.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Unclosed Anchor: [DEF:CleanComplianceOrchestrator:Class] started at line 42",
                "severity": "ERROR",
                "line_number": 42
              },
              {
                "message": "Unclosed Anchor: [DEF:CleanComplianceOrchestrator:Class] started at line 42",
                "severity": "ERROR",
                "line_number": 42
              }
            ],
            "score": 0.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:compliance_orchestrator:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "compliance_execution_service",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "clean-release, compliance, execution, stages, immutable-evidence",
        "PURPOSE": "Create and execute compliance runs with trusted snapshots, deterministic stages, violations and immutable report persistence.",
        "LAYER": "Domain",
        "INVARIANT": "A run binds to exactly one candidate/manifest/policy/registry snapshot set."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.repository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.policy_resolution_service"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.stages"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.report_builder"
        }
      ],
      "children": [
        {
          "name": "ComplianceExecutionResult",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Return envelope for compliance execution with run/report and persisted stage artifacts."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ComplianceExecutionService",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 195,
          "tags": {
            "PURPOSE": "Execute clean-release compliance lifecycle over trusted snapshots and immutable evidence.",
            "PRE": "repository and config_manager are initialized.",
            "POST": "run state, stage records, violations and optional report are persisted consistently."
          },
          "relations": [],
          "children": [
            {
              "name": "_resolve_manifest",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 60,
              "end_line": 78,
              "tags": {
                "PURPOSE": "Resolve explicit manifest or fallback to latest candidate manifest.",
                "PRE": "candidate exists.",
                "POST": "Returns manifest snapshot or raises ComplianceRunError."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_persist_stage_run",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 80,
              "end_line": 86,
              "tags": {
                "PURPOSE": "Persist stage run if repository supports stage records.",
                "POST": "Stage run is persisted when adapter is available, otherwise no-op."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_persist_violations",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 88,
              "end_line": 94,
              "tags": {
                "PURPOSE": "Persist stage violations via repository adapters.",
                "POST": "Violations are appended to repository evidence store."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "execute_run",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 96,
              "end_line": 194,
              "tags": {
                "PURPOSE": "Execute compliance run stages and finalize immutable report on terminal success.",
                "PRE": "candidate exists and trusted policy/registry snapshots are resolvable.",
                "POST": "Run and evidence are persisted; report exists for SUCCEEDED runs."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:compliance_execution_service:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "manifest_builder",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, manifest, deterministic-hash, summary",
        "PURPOSE": "Build deterministic distribution manifest from classified artifact input.",
        "LAYER": "Domain",
        "INVARIANT": "Equal semantic artifact sets produce identical deterministic hash values."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release"
        }
      ],
      "children": [
        {
          "name": "build_distribution_manifest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 87,
          "tags": {
            "PURPOSE": "Build DistributionManifest with deterministic hash and validated counters.",
            "PRE": "artifacts list contains normalized classification values.",
            "POST": "Returns DistributionManifest with summary counts matching items cardinality."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_manifest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Legacy compatibility wrapper for old manifest builder import paths.",
            "PRE": "Same as build_distribution_manifest.",
            "POST": "Returns DistributionManifest produced by canonical builder."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_stable_hash_payload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:manifest_builder:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "policy_engine",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "clean-release, policy, classification, source-isolation",
        "PURPOSE": "Evaluate artifact/source policies for enterprise clean profile with deterministic outcomes.",
        "LAYER": "Domain",
        "INVARIANT": "Enterprise-clean policy always treats non-registry sources as violations."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release.CleanProfilePolicy"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release.ResourceSourceRegistry"
        }
      ],
      "children": [
        {
          "name": "CleanPolicyEngine",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 195,
          "tags": {
            "PRE": "Active policy exists and is internally consistent.",
            "POST": "Deterministic classification and source validation are available.",
            "TEST_CONTRACT": "CandidateEvaluationInput -> PolicyValidationResult|SourceValidationResult",
            "TEST_SCENARIO": "policy_valid -> Enterprise clean policy with matching registry returns ok=True",
            "TEST_FIXTURE": "policy_enterprise_clean -> file:backend/tests/fixtures/clean_release/fixtures_clean_release.json",
            "TEST_EDGE": "external_endpoint -> endpoint not present in enabled internal registry entries",
            "TEST_INVARIANT": "deterministic_classification -> VERIFIED_BY: [policy_valid]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validate_policy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "classify_artifact",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "validate_resource_source",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 129,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "evaluate_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 165,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:policy_engine:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "clean_release_exceptions",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 38,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Domain exceptions for clean release compliance subsystem.",
        "LAYER": "Domain"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "candidate_service",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "clean-release, candidate, artifacts, lifecycle, validation",
        "PURPOSE": "Register release candidates with validated artifacts and advance lifecycle through legal transitions.",
        "LAYER": "Domain",
        "PRE": "candidate_id must be unique; artifacts input must be non-empty and valid.",
        "POST": "candidate and artifacts are persisted; candidate transitions DRAFT -> PREPARED only.",
        "INVARIANT": "Candidate lifecycle transitions are delegated to domain guard logic."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.repository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release"
        }
      ],
      "children": [
        {
          "name": "_validate_artifacts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Validate raw artifact payload list for required fields and shape.",
            "PRE": "artifacts payload is provided by caller.",
            "POST": "Returns normalized artifact list or raises ValueError."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "register_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Register a candidate and persist its artifacts with legal lifecycle transition.",
            "PRE": "candidate_id must be unique and artifacts must pass validation.",
            "POST": "Candidate exists in repository with PREPARED status and artifacts persisted."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:candidate_service:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "clean_release_enums",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 72,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Canonical enums for clean release lifecycle and compliance.",
        "LAYER": "Domain"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "publication_service",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "clean-release, publication, revoke, gate, lifecycle",
        "PURPOSE": "Enforce publication and revocation gates with append-only publication records.",
        "LAYER": "Domain",
        "INVARIANT": "Publication records are append-only snapshots; revoke mutates only publication status for targeted record."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.repository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.approval_service"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.audit_service"
        }
      ],
      "children": [
        {
          "name": "_get_or_init_publications_store",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Provide in-memory append-only publication storage.",
            "PRE": "repository is initialized.",
            "POST": "Returns publication list attached to repository."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_latest_publication_for_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 51,
          "tags": {
            "PURPOSE": "Resolve latest publication record for candidate.",
            "PRE": "candidate_id is non-empty.",
            "POST": "Returns latest record or None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_latest_approval_for_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Resolve latest approval decision from repository decision store.",
            "PRE": "candidate_id is non-empty.",
            "POST": "Returns latest decision object or None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "publish_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 128,
          "tags": {
            "PURPOSE": "Create immutable publication record for approved candidate.",
            "PRE": "Candidate exists, report belongs to candidate, latest approval is APPROVED.",
            "POST": "New ACTIVE publication record is appended."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "revoke_publication",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 171,
          "tags": {
            "PURPOSE": "Revoke existing publication record without deleting history.",
            "PRE": "publication_id exists in repository publication store.",
            "POST": "Target publication status becomes REVOKED and updated record is returned."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:publication_service:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "artifact_catalog_loader",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, artifacts, bootstrap, json, tui",
        "PURPOSE": "Load bootstrap artifact catalogs for clean release real-mode flows.",
        "LAYER": "Domain",
        "INVARIANT": "Artifact catalog must produce deterministic CandidateArtifact entries with required identity and checksum fields."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release.CandidateArtifact"
        }
      ],
      "children": [
        {
          "name": "load_bootstrap_artifacts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 92,
          "tags": {
            "PURPOSE": "Parse artifact catalog JSON into CandidateArtifact models for TUI/bootstrap flows.",
            "PRE": "path points to readable JSON file; payload is list[artifact] or {\"artifacts\": list[artifact]}.",
            "POST": "Returns non-mutated CandidateArtifact models with required fields populated."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:artifact_catalog_loader:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "audit_service",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, audit, lifecycle, logging",
        "PURPOSE": "Provide lightweight audit hooks for clean release preparation/check/report lifecycle.",
        "LAYER": "Infra",
        "INVARIANT": "Audit hooks are append-only log actions."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.logger"
        }
      ],
      "children": [
        {
          "name": "_append_event",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "audit_preparation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "audit_check_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "audit_violation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "audit_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:audit_service:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "source_isolation",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, source-isolation, internal-only, validation",
        "PURPOSE": "Validate that all resource endpoints belong to the approved internal source registry.",
        "LAYER": "Domain",
        "INVARIANT": "Any endpoint outside enabled registry entries is treated as external-source violation."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release.ResourceSourceRegistry"
        }
      ],
      "children": [
        {
          "name": "validate_internal_sources",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 16,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:source_isolation:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "report_builder",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "clean-release, report, audit, counters, violations",
        "PURPOSE": "Build and persist compliance reports with consistent counter invariants.",
        "LAYER": "Domain",
        "INVARIANT": "blocking_violations_count never exceeds violations_count.",
        "TEST_CONTRACT": "ComplianceCheckRun,List[ComplianceViolation] -> ComplianceReport",
        "TEST_FIXTURE": "blocked_with_two_violations -> file:backend/tests/fixtures/clean_release/fixtures_clean_release.json",
        "TEST_EDGE": "missing_operator_summary -> non-terminal run prevents report creation and summary generation",
        "TEST_INVARIANT": "blocking_count_le_total_count -> VERIFIED_BY: [counter_mismatch, empty_violations_for_blocked]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.repository"
        }
      ],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_report_payload",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 31,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "persist_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:report_builder:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "repository",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, repository, persistence, in-memory",
        "PURPOSE": "Provide repository adapter for clean release entities with deterministic access methods.",
        "LAYER": "Infra",
        "INVARIANT": "Repository operations are side-effect free outside explicit save/update calls."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release"
        }
      ],
      "children": [
        {
          "name": "CleanReleaseRepository",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 123,
          "tags": {
            "PURPOSE": "Data access object for clean release lifecycle."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_policy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_policy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_active_policy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_registry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_registry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_artifact",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_artifacts_by_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_manifest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_manifest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_distribution_manifest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 81,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_distribution_manifest",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_check_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 87,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_check_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_compliance_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 94,
          "end_line": 94,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_compliance_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_violation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 110,
          "end_line": 110,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_violations_by_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_manifests_by_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 117,
          "end_line": 117,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "clear_history",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 119,
          "end_line": 119,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:repository:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "preparation_service",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, preparation, manifest, policy-evaluation",
        "PURPOSE": "Prepare release candidate by policy evaluation and deterministic manifest creation.",
        "LAYER": "Domain",
        "INVARIANT": "Candidate preparation always persists manifest and candidate status deterministically."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.policy_engine"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.manifest_builder"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.repository"
        }
      ],
      "children": [
        {
          "name": "prepare_candidate_legacy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Legacy compatibility wrapper kept for migration period.",
            "PRE": "Same as prepare_candidate.",
            "POST": "Delegates to canonical prepare_candidate and preserves response shape."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "prepare_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:preparation_service:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "clean_release_facade",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 122,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unified entry point for clean release operations.",
        "LAYER": "Application"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolve_active_policy_snapshot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 49,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolve_active_registry_snapshot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_candidate_overview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_candidates",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "policy_resolution_service",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "clean-release, policy, registry, trusted-resolution, immutable-snapshots",
        "PURPOSE": "Resolve trusted policy and registry snapshots from ConfigManager without runtime overrides.",
        "LAYER": "Domain",
        "INVARIANT": "Trusted snapshot resolution is based only on ConfigManager active identifiers."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.config_manager"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.repository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.exceptions"
        }
      ],
      "children": [
        {
          "name": "resolve_trusted_policy_snapshots",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Resolve immutable trusted policy and registry snapshots using active config IDs only.",
            "PRE": "ConfigManager provides active_policy_id and active_registry_id; repository contains referenced snapshots.",
            "POST": "Returns immutable policy and registry snapshots; runtime override attempts are rejected.",
            "SIDE_EFFECT": "None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:policy_resolution_service:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "demo_data_service",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, demo-mode, namespace, isolation, repository",
        "PURPOSE": "Provide deterministic namespace helpers and isolated in-memory repository creation for demo and real modes.",
        "LAYER": "Domain",
        "INVARIANT": "Demo and real namespaces must never collide for generated physical identifiers."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.repository"
        }
      ],
      "children": [
        {
          "name": "resolve_namespace",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 14,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Resolve canonical clean-release namespace for requested mode.",
            "PRE": "mode is a non-empty string identifying runtime mode.",
            "POST": "Returns deterministic namespace key for demo/real separation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_namespaced_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Build storage-safe physical identifier under mode namespace.",
            "PRE": "namespace and logical_id are non-empty strings.",
            "POST": "Returns deterministic \"{namespace}::{logical_id}\" identifier."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_isolated_repository",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Create isolated in-memory repository instance for selected mode namespace.",
            "PRE": "mode is a valid runtime mode marker.",
            "POST": "Returns repository instance tagged with namespace metadata."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:demo_data_service:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "clean_release_dto",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 85,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Data Transfer Objects for clean release compliance subsystem.",
        "LAYER": "Application"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "clean_release_mappers",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 67,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Map between domain entities (SQLAlchemy models) and DTOs.",
        "LAYER": "Application"
      },
      "relations": [],
      "children": [
        {
          "name": "map_candidate_to_dto",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 22,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "map_manifest_to_dto",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "map_run_to_dto",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "map_report_to_dto",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "clean_release",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 16,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Redesigned clean release compliance subsystem.",
        "LAYER": "Domain"
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "manifest_service",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "clean-release, manifest, versioning, immutability, lifecycle",
        "PURPOSE": "Build immutable distribution manifests with deterministic digest and version increment.",
        "LAYER": "Domain",
        "PRE": "Candidate exists and is PREPARED or MANIFEST_BUILT; artifacts are present.",
        "POST": "New immutable manifest is persisted with incremented version and deterministic digest.",
        "INVARIANT": "Existing manifests are never mutated."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.repository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.manifest_builder"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release"
        }
      ],
      "children": [
        {
          "name": "build_manifest_snapshot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Create a new immutable manifest version for a candidate.",
            "PRE": "Candidate is prepared, artifacts are available, candidate_id is valid.",
            "POST": "Returns persisted DistributionManifest with monotonically incremented version."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:manifest_service:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "approval_service",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "clean-release, approval, decision, lifecycle, gate",
        "PURPOSE": "Enforce approval/rejection gates over immutable compliance reports.",
        "LAYER": "Domain",
        "INVARIANT": "Approval is allowed only for PASSED report bound to candidate; decisions are append-only."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.repository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.audit_service"
        }
      ],
      "children": [
        {
          "name": "_get_or_init_decisions_store",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Provide append-only in-memory storage for approval decisions.",
            "PRE": "repository is initialized.",
            "POST": "Returns mutable decision list attached to repository."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_latest_decision_for_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Resolve latest approval decision for candidate from append-only store.",
            "PRE": "candidate_id is non-empty.",
            "POST": "Returns latest ApprovalDecision or None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_resolve_candidate_and_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 73,
          "tags": {
            "PURPOSE": "Validate candidate/report existence and ownership prior to decision persistence.",
            "PRE": "candidate_id and report_id are non-empty.",
            "POST": "Returns tuple(candidate, report); raises ApprovalGateError on contract violation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "approve_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 136,
          "tags": {
            "PURPOSE": "Persist immutable APPROVED decision and advance candidate lifecycle to APPROVED.",
            "PRE": "Candidate exists, report belongs to candidate, report final_status is PASSED, candidate not already APPROVED.",
            "POST": "Approval decision is appended and candidate transitions to APPROVED."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "reject_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 139,
          "end_line": 176,
          "tags": {
            "PURPOSE": "Persist immutable REJECTED decision without promoting candidate lifecycle.",
            "PRE": "Candidate exists and report belongs to candidate.",
            "POST": "Rejected decision is appended; candidate lifecycle is unchanged."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:approval_service:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "TestAuditService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 53,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, clean-release, audit, logging",
        "PURPOSE": "Validate audit hooks emit expected log patterns for clean release lifecycle.",
        "LAYER": "Infra"
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_audit_preparation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 26,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuditService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_audit_check_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 39,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuditService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_audit_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 52,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuditService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "test_policy_valid",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 43,
      "end_line": 53,
      "tags": {
        "TEST_EDGE": "missing_registry_ref"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_policy_engine"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_missing_registry_ref",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 55,
      "end_line": 66,
      "tags": {
        "TEST_EDGE": "conflicting_registry"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_policy_engine"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_conflicting_registry",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 68,
      "end_line": 79,
      "tags": {
        "TEST_INVARIANT": "deterministic_classification"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_policy_engine"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_classify_artifact",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 81,
      "end_line": 95,
      "tags": {
        "TEST_EDGE": "external_endpoint"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_policy_engine"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_validate_resource_source",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 97,
      "end_line": 113,
      "tags": {},
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_policy_engine"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_evaluate_candidate",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 115,
      "end_line": 137,
      "tags": {},
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_policy_engine"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_policy_engine",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 137,
      "tags": {
        "PURPOSE": "Auto-generated module for backend/src/services/clean_release/__tests__/test_policy_engine.py",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "enterprise_clean_setup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 19,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TestComplianceOrchestrator",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 116,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, clean-release, orchestrator, stage-state-machine",
        "PURPOSE": "Validate compliance orchestrator stage transitions and final status derivation.",
        "LAYER": "Domain",
        "INVARIANT": "Failed mandatory stage forces BLOCKED terminal status."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_orchestrator_stage_failure_blocks_release",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 49,
          "tags": {
            "PURPOSE": "Verify mandatory stage failure forces BLOCKED final status."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceOrchestrator"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_orchestrator_compliant_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Verify happy path where all mandatory stages pass yields COMPLIANT."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceOrchestrator"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_orchestrator_missing_stage_result",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Verify incomplete mandatory stage set cannot end as COMPLIANT and results in FAILED."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceOrchestrator"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_orchestrator_report_generation_error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 98,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Verify downstream report errors do not mutate orchestrator final status."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceOrchestrator"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestReportBuilder",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 118,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, clean-release, report-builder, counters",
        "PURPOSE": "Validate compliance report builder counter integrity and blocked-run constraints.",
        "LAYER": "Domain",
        "INVARIANT": "blocked run requires at least one blocking violation."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_terminal_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Build terminal/non-terminal run fixtures for report builder tests."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportBuilder"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_blocking_violation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 57,
          "tags": {
            "PURPOSE": "Build a blocking violation fixture for blocked report scenarios."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportBuilder"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_report_builder_blocked_requires_blocking_violations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Verify BLOCKED run requires at least one blocking violation."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportBuilder"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_report_builder_blocked_with_two_violations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Verify report builder generates conformant payload for a BLOCKED run with violations."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportBuilder"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_report_builder_counter_consistency",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Verify violations counters remain consistent for blocking payload."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportBuilder"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_missing_operator_summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 117,
          "tags": {
            "PURPOSE": "Validate non-terminal run prevents operator summary/report generation."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportBuilder"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestManifestBuilder",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 42,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "tests, clean-release, manifest, deterministic",
        "PURPOSE": "Validate deterministic manifest generation behavior for US1.",
        "LAYER": "Domain",
        "INVARIANT": "Same input artifacts produce identical deterministic hash."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "backend.src.services.clean_release.manifest_builder"
        }
      ],
      "children": [
        {
          "name": "test_manifest_deterministic_hash_for_same_input",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Ensure hash is stable for same candidate/policy/artifact input.",
            "PRE": "Same input lists are passed twice.",
            "POST": "Hash and summary remain identical."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestManifestBuilder"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestStages",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 70,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, clean-release, compliance, stages",
        "PURPOSE": "Validate final status derivation logic from stage results.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_derive_final_status_compliant",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 27,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestStages"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_derive_final_status_blocked",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 41,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestStages"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_derive_final_status_failed_missing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 55,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestStages"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_derive_final_status_failed_skipped",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 69,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestStages"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestSourceIsolation",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 74,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, clean-release, source-isolation, internal-only",
        "PURPOSE": "Verify internal source registry validation behavior.",
        "LAYER": "Domain",
        "INVARIANT": "External endpoints always produce blocking violations."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_registry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 43,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestSourceIsolation"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_validate_internal_sources_all_internal_ok",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 57,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestSourceIsolation"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_validate_internal_sources_external_blocked",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 73,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestSourceIsolation"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestPreparationService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 229,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, clean-release, preparation, flow",
        "PURPOSE": "Validate release candidate preparation flow, including policy evaluation and manifest persisting.",
        "LAYER": "Domain",
        "INVARIANT": "Candidate preparation always persists manifest and candidate status deterministically."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.preparation_service:Module"
        }
      ],
      "children": [
        {
          "name": "_mock_policy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Build a valid clean profile policy fixture for preparation tests."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPreparationService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_mock_registry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Build an internal-only source registry fixture for preparation tests."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPreparationService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_mock_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Build a draft release candidate fixture with provided identifier."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPreparationService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_prepare_candidate_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 136,
          "tags": {
            "PURPOSE": "Verify candidate transitions to PREPARED when evaluation returns no violations.",
            "TEST_CONTRACT": "[valid_candidate + active_policy + internal_sources + no_violations] -> [status=PREPARED, manifest_persisted, candidate_saved]",
            "TEST_SCENARIO": "[prepare_success] -> [prepared status and persistence side effects are produced]",
            "TEST_FIXTURE": "[INLINE_MOCKS] -> INLINE_JSON",
            "TEST_EDGE": "[external_fail] -> [none; dependency interactions mocked and successful]",
            "TEST_INVARIANT": "[prepared_flow_persists_state] -> VERIFIED_BY: [prepare_success]"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPreparationService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_prepare_candidate_with_violations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 139,
          "end_line": 187,
          "tags": {
            "PURPOSE": "Verify candidate transitions to BLOCKED when evaluation returns blocking violations.",
            "TEST_CONTRACT": "[valid_candidate + active_policy + evaluation_with_violations] -> [status=BLOCKED, violations_exposed]",
            "TEST_SCENARIO": "[prepare_blocked_due_to_policy] -> [blocked status and violation list are produced]",
            "TEST_FIXTURE": "[INLINE_MOCKS] -> INLINE_JSON",
            "TEST_EDGE": "[external_fail] -> [none; dependency interactions mocked and successful]",
            "TEST_INVARIANT": "[blocked_flow_reports_violations] -> VERIFIED_BY: [prepare_blocked_due_to_policy]"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPreparationService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_prepare_candidate_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 190,
          "end_line": 206,
          "tags": {
            "PURPOSE": "Verify preparation raises ValueError when candidate does not exist.",
            "TEST_CONTRACT": "[missing_candidate] -> [ValueError('Candidate not found')]",
            "TEST_SCENARIO": "[prepare_missing_candidate] -> [raises candidate not found error]",
            "TEST_FIXTURE": "[INLINE_MOCKS] -> INLINE_JSON",
            "TEST_EDGE": "[missing_field] -> [candidate lookup returns None]",
            "TEST_INVARIANT": "[missing_candidate_is_rejected] -> VERIFIED_BY: [prepare_missing_candidate]"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPreparationService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_prepare_candidate_no_active_policy",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 209,
          "end_line": 226,
          "tags": {
            "PURPOSE": "Verify preparation raises ValueError when no active policy is available.",
            "TEST_CONTRACT": "[candidate_present + missing_active_policy] -> [ValueError('Active clean policy not found')]",
            "TEST_SCENARIO": "[prepare_missing_policy] -> [raises active policy missing error]",
            "TEST_FIXTURE": "[INLINE_MOCKS] -> INLINE_JSON",
            "TEST_EDGE": "[invalid_type] -> [policy dependency resolves to None]",
            "TEST_INVARIANT": "[active_policy_required] -> VERIFIED_BY: [prepare_missing_policy]"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPreparationService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "no_external_endpoints",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, compliance-stage, endpoints, network",
        "PURPOSE": "Block manifest payloads that expose external endpoints outside trusted schemes and hosts.",
        "LAYER": "Domain",
        "INVARIANT": "Endpoint outside allowed scheme/host always yields BLOCKED stage decision."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "backend.src.services.clean_release.stages.base.ComplianceStage"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.stages.base"
        }
      ],
      "children": [
        {
          "name": "NoExternalEndpointsStage",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 19,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Validate endpoint references from manifest against trusted registry.",
            "PRE": "context.registry includes allowed hosts and schemes.",
            "POST": "Returns PASSED when all endpoints are trusted, otherwise BLOCKED with endpoint violations."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:no_external_endpoints:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "internal_sources_only",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, compliance-stage, source-isolation, registry",
        "PURPOSE": "Verify manifest-declared sources belong to trusted internal registry allowlist.",
        "LAYER": "Domain",
        "INVARIANT": "Any source host outside allowed_hosts yields BLOCKED decision with at least one violation."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "backend.src.services.clean_release.stages.base.ComplianceStage"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.stages.base"
        }
      ],
      "children": [
        {
          "name": "InternalSourcesOnlyStage",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Enforce internal-source-only policy from trusted registry snapshot.",
            "PRE": "context.registry.allowed_hosts is available.",
            "POST": "Returns PASSED when all hosts are allowed; otherwise BLOCKED and violations captured."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:internal_sources_only:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "data_purity",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, compliance-stage, data-purity",
        "PURPOSE": "Evaluate manifest purity counters and emit blocking violations for prohibited artifacts.",
        "LAYER": "Domain",
        "INVARIANT": "prohibited_detected_count > 0 always yields BLOCKED stage decision."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "backend.src.services.clean_release.stages.base.ComplianceStage"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.stages.base"
        }
      ],
      "children": [
        {
          "name": "DataPurityStage",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 64,
          "tags": {
            "PURPOSE": "Validate manifest summary for prohibited artifacts.",
            "PRE": "context.manifest.content_json contains summary block or defaults to safe counters.",
            "POST": "Returns PASSED when no prohibited artifacts are detected, otherwise BLOCKED with violations."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:data_purity:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "base",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, compliance, stages, contracts, base",
        "PURPOSE": "Define shared contracts and helpers for pluggable clean-release compliance stages.",
        "LAYER": "Domain",
        "INVARIANT": "Stage execution is deterministic for equal input context."
      },
      "relations": [
        {
          "type": "CALLED_BY",
          "target": "backend.src.services.clean_release.compliance_execution_service"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release"
        }
      ],
      "children": [
        {
          "name": "ComplianceStageContext",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Immutable input envelope passed to each compliance stage."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "StageExecutionResult",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Structured stage output containing decision, details and violations."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ComplianceStage",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Protocol for pluggable stage implementations."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_stage_run_record",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 87,
          "tags": {
            "PURPOSE": "Build persisted stage run record from stage result.",
            "PRE": "run_id and stage_name are non-empty.",
            "POST": "Returns ComplianceStageRun with deterministic identifiers and timestamps."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_violation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 90,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Construct a compliance violation with normalized defaults.",
            "PRE": "run_id, stage_name, code and message are non-empty.",
            "POST": "Returns immutable-style violation payload ready for persistence."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 58,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:base:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: CALLED_BY. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "manifest_consistency",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, compliance-stage, manifest, consistency, digest",
        "PURPOSE": "Ensure run is bound to the exact manifest snapshot and digest used at run creation time.",
        "LAYER": "Domain",
        "INVARIANT": "Digest mismatch between run and manifest yields ERROR with blocking violation evidence."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "backend.src.services.clean_release.stages.base.ComplianceStage"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.stages.base"
        }
      ],
      "children": [
        {
          "name": "ManifestConsistencyStage",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Validate run/manifest linkage consistency.",
            "PRE": "context.run and context.manifest are loaded from repository for same run.",
            "POST": "Returns PASSED when digests match, otherwise ERROR with one violation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:manifest_consistency:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "stages",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": null,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, compliance, stages, state-machine",
        "PURPOSE": "Define compliance stage order and helper functions for deterministic run-state evaluation.",
        "LAYER": "Domain",
        "INVARIANT": "Stage order remains deterministic for all compliance runs."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.clean_release"
        }
      ],
      "children": [
        {
          "name": "build_default_stages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Build default deterministic stage pipeline implementation order.",
            "PRE": "None.",
            "POST": "Returns stage instances in mandatory execution order."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "stage_result_map",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Convert stage result list to dictionary by stage name.",
            "PRE": "stage_results may be empty or contain unique stage names.",
            "POST": "Returns stage->status dictionary for downstream evaluation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "missing_mandatory_stages",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 83,
          "end_line": 89,
          "tags": {
            "PURPOSE": "Identify mandatory stages that are absent from run results.",
            "PRE": "stage_status_map contains zero or more known stage statuses.",
            "POST": "Returns ordered list of missing mandatory stages."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "derive_final_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 110,
          "tags": {
            "PURPOSE": "Derive final run status from stage results with deterministic blocking behavior.",
            "PRE": "Stage statuses correspond to compliance checks.",
            "POST": "Returns one of PASSED/BLOCKED/ERROR according to mandatory stage outcomes."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Unclosed Anchor: [DEF:stages:Module] started at line 1",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "candidate_repository",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 47,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Persist and query release candidates.",
        "LAYER": "Infra"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_by_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 33,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "compliance_repository",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 87,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Persist and query compliance runs, stage runs, and violations.",
        "LAYER": "Infra"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_runs_by_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_stage_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_stages_by_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_violation",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_violations",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_violations_by_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "audit_repository",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 46,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Persist and query audit logs for clean release operations.",
        "LAYER": "Infra"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 20,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "log",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_by_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "manifest_repository",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 53,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Persist and query distribution manifests.",
        "LAYER": "Infra"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_by_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_latest_for_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_by_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "artifact_repository",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 54,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Persist and query candidate artifacts.",
        "LAYER": "Infra"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_all",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_by_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_by_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 47,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "policy_repository",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 52,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Persist and query policy and registry snapshots.",
        "LAYER": "Infra"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_policy_snapshot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_policy_snapshot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_registry_snapshot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_registry_snapshot",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 45,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "report_repository",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 50,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Persist and query compliance reports.",
        "LAYER": "Infra"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_by_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_by_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_by_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 43,
          "end_line": 43,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "approval_repository",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 53,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Persist and query approval decisions.",
        "LAYER": "Infra"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_by_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_latest_for_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_by_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "publication_repository",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 53,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Persist and query publication records.",
        "LAYER": "Infra"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 15,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_by_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 29,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_latest_for_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_by_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 46,
          "end_line": 46,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "clean_release_repositories",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 28,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Export all clean release repositories."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @RELATION (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.32500000000000007
      }
    },
    {
      "name": "normalizer",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 171,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "reports, normalization, tasks, fallback",
        "PURPOSE": "Convert task manager task objects into canonical unified TaskReport entities with deterministic fallback behavior.",
        "LAYER": "Domain",
        "INVARIANT": "Unknown task types and partial payloads remain visible via fallback mapping."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.task_manager.models.Task:Function"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.report:Function"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.reports.type_profiles:Function"
        }
      ],
      "children": [
        {
          "name": "status_to_report_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 22,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Normalize internal task status to canonical report status.",
            "PRE": "status may be known or unknown string/enum value.",
            "POST": "Always returns one of canonical ReportStatus values.",
            "PARAM": "status (Any) - Internal task status value.",
            "RETURN": "ReportStatus - Canonical report status."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "build_summary",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Build deterministic user-facing summary from task payload and status.",
            "PRE": "report_status is canonical; plugin_id may be unknown.",
            "POST": "Returns non-empty summary text.",
            "PARAM": "report_status (ReportStatus) - Canonical status.",
            "RETURN": "str - Normalized summary."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "extract_error_context",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Extract normalized error context and next actions for failed/partial reports.",
            "PRE": "task is a valid Task object.",
            "POST": "Returns ErrorContext for failed/partial when context exists; otherwise None.",
            "PARAM": "report_status (ReportStatus) - Canonical status.",
            "RETURN": "Optional[ErrorContext] - Error context block."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "normalize_task_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 110,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Convert one Task to canonical TaskReport envelope.",
            "PRE": "task has valid id and plugin_id fields.",
            "POST": "Returns TaskReport with required fields and deterministic fallback behavior.",
            "PARAM": "task (Task) - Source task.",
            "RETURN": "TaskReport - Canonical normalized report.",
            "TEST_CONTRACT": "NormalizeTaskReport ->",
            "TEST_FIXTURE": "valid_task -> {\"task\": \"MockTask(id='1', plugin_id='superset-migration', status=TaskStatus.SUCCESS)\"}",
            "TEST_EDGE": "unknown_plugin_type -> {\"task\": \"MockTask(plugin_id='unknown-plugin', status=TaskStatus.PENDING)\"}",
            "TEST_INVARIANT": "deterministic_normalization -> verifies: [valid_task, task_with_error, unknown_plugin_type]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "type_profiles",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 129,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "reports, type_profiles, normalization, fallback",
        "PURPOSE": "Deterministic mapping of plugin/task identifiers to canonical report task types and fallback profile metadata.",
        "LAYER": "Domain",
        "INVARIANT": "Unknown input always resolves to TaskType.UNKNOWN with a single fallback profile."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TaskType"
        },
        {
          "type": "CONTAINS",
          "target": "resolve_task_type"
        },
        {
          "type": "CONTAINS",
          "target": "get_type_profile"
        }
      ],
      "children": [
        {
          "name": "PLUGIN_TO_TASK_TYPE",
          "type": "Data",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Maps plugin identifiers to normalized report task types."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "TASK_TYPE_PROFILES",
          "type": "Data",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 76,
          "tags": {
            "PURPOSE": "Profile metadata registry for each normalized task type."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "resolve_task_type",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 104,
          "tags": {
            "PURPOSE": "Resolve canonical task type from plugin/task identifier with guaranteed fallback.",
            "PRE": "plugin_id may be None or unknown.",
            "POST": "Always returns one of TaskType enum values.",
            "PARAM": "plugin_id (Optional[str]) - Source plugin/task identifier from task record.",
            "RETURN": "TaskType - Resolved canonical type or UNKNOWN fallback.",
            "TEST_CONTRACT": "ResolveTaskType ->",
            "TEST_FIXTURE": "valid_plugin -> {\"plugin_id\": \"superset-migration\"}",
            "TEST_EDGE": "unknown_plugin -> {\"plugin_id\": \"invalid-plugin\"}",
            "TEST_INVARIANT": "fallback_to_unknown -> verifies: [empty_plugin, none_plugin, unknown_plugin]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_type_profile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 127,
          "tags": {
            "PURPOSE": "Return deterministic profile metadata for a task type.",
            "PRE": "task_type may be known or unknown.",
            "POST": "Returns a profile dict and never raises for unknown types.",
            "PARAM": "task_type (TaskType) - Canonical task type.",
            "RETURN": "Dict[str, Any] - Profile metadata used by normalization and UI contracts.",
            "TEST_CONTRACT": "GetTypeProfile ->",
            "TEST_FIXTURE": "valid_profile -> {\"task_type\": \"migration\"}",
            "TEST_EDGE": "missing_profile -> {\"task_type\": \"some_new_type\"}",
            "TEST_INVARIANT": "always_returns_dict -> verifies: [valid_profile, missing_profile]"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "report_service",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 306,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "reports, service, aggregation, filtering, pagination, detail",
        "PURPOSE": "Aggregate, normalize, filter, and paginate task reports for unified list/detail API use cases.",
        "LAYER": "Domain",
        "INVARIANT": "List responses are deterministic and include applied filter echo metadata."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "TaskManager"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskReport"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ReportQuery"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ReportCollection"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ReportDetailView"
        },
        {
          "type": "DEPENDS_ON",
          "target": "normalize_task_report"
        },
        {
          "type": "DEPENDS_ON",
          "target": "CleanReleaseRepository"
        }
      ],
      "children": [
        {
          "name": "ReportsService",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 35,
          "end_line": 304,
          "tags": {
            "PURPOSE": "Service layer for list/detail report retrieval and normalization.",
            "COMPLEXITY": "5",
            "PRE": "TaskManager dependency is initialized.",
            "POST": "Provides deterministic list/detail report responses.",
            "SIDE_EFFECT": "Reads task history and optional clean-release repository state without mutating source records.",
            "DATA_CONTRACT": "Input[TaskManager, Optional[CleanReleaseRepository], ReportQuery|report_id] -> Output[ReportCollection|ReportDetailView|None]",
            "INVARIANT": "Service methods are read-only over task history source.",
            "TEST_CONTRACT": "ReportsServiceModel ->",
            "TEST_FIXTURE": "valid_service -> {\"task_manager\": \"MockTaskManager()\"}",
            "TEST_EDGE": "report_not_found -> get_report_detail returns None",
            "TEST_INVARIANT": "consistent_pagination -> verifies: [valid_service]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "TaskManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "CleanReleaseRepository"
            },
            {
              "type": "CALLS",
              "target": "normalize_task_report"
            }
          ],
          "children": [
            {
              "name": "init",
              "type": "Function",
              "complexity": 5,
              "tier": "CRITICAL",
              "start_line": 60,
              "end_line": 81,
              "tags": {
                "COMPLEXITY": "5",
                "PURPOSE": "Initialize service with TaskManager dependency.",
                "PRE": "task_manager is a live TaskManager instance.",
                "POST": "self.task_manager is assigned and ready for read operations.",
                "INVARIANT": "Constructor performs no task mutations.",
                "SIDE_EFFECT": "Stores collaborator references for later read-only report projections.",
                "DATA_CONTRACT": "Input[TaskManager, Optional[CleanReleaseRepository]] -> Output[ReportsService]",
                "PARAM": "task_manager (TaskManager) - Task manager providing source task history."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "ReportsService"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskManager"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "CleanReleaseRepository"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.95
              }
            },
            {
              "name": "_load_normalized_reports",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 83,
              "end_line": 95,
              "tags": {
                "PURPOSE": "Build normalized reports from all available tasks.",
                "PRE": "Task manager returns iterable task history records.",
                "POST": "Returns normalized report list preserving source cardinality.",
                "INVARIANT": "Every returned item is a TaskReport.",
                "RETURN": "List[TaskReport] - Reports sorted later by list logic."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_to_utc_datetime",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 97,
              "end_line": 112,
              "tags": {
                "PURPOSE": "Normalize naive/aware datetime values to UTC-aware datetime for safe comparisons.",
                "PRE": "value is either datetime or None.",
                "POST": "Returns UTC-aware datetime or None.",
                "INVARIANT": "Naive datetimes are interpreted as UTC to preserve deterministic ordering/filtering.",
                "PARAM": "value (Optional[datetime]) - Source datetime value.",
                "RETURN": "Optional[datetime] - UTC-aware datetime or None."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_datetime_sort_key",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 114,
              "end_line": 128,
              "tags": {
                "PURPOSE": "Produce stable numeric sort key for report timestamps.",
                "PRE": "report contains updated_at datetime.",
                "POST": "Returns float timestamp suitable for deterministic sorting.",
                "INVARIANT": "Mixed naive/aware datetimes never raise TypeError.",
                "PARAM": "report (TaskReport) - Report item.",
                "RETURN": "float - UTC timestamp key."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_matches_query",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 130,
              "end_line": 167,
              "tags": {
                "PURPOSE": "Apply query filtering to a report.",
                "PRE": "report and query are normalized schema instances.",
                "POST": "Returns True iff report satisfies all active query filters.",
                "INVARIANT": "Filter evaluation is side-effect free.",
                "PARAM": "query (ReportQuery) - Applied query.",
                "RETURN": "bool - True if report matches all filters."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_sort_reports",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 169,
              "end_line": 192,
              "tags": {
                "PURPOSE": "Sort reports deterministically according to query settings.",
                "PRE": "reports contains only TaskReport items.",
                "POST": "Returns reports ordered by selected sort field and order.",
                "INVARIANT": "Sorting criteria are deterministic for equal input.",
                "PARAM": "query (ReportQuery) - Sort config.",
                "RETURN": "List[TaskReport] - Sorted reports."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "list_reports",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 194,
              "end_line": 223,
              "tags": {
                "PURPOSE": "Return filtered, sorted, paginated report collection.",
                "PRE": "query has passed schema validation.",
                "POST": "Returns {items,total,page,page_size,has_next,applied_filters}.",
                "PARAM": "query (ReportQuery) - List filters and pagination.",
                "RETURN": "ReportCollection - Paginated unified reports payload."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_report_detail",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 225,
              "end_line": 301,
              "tags": {
                "PURPOSE": "Return one normalized report with timeline/diagnostics/next actions.",
                "PRE": "report_id exists in normalized report set.",
                "POST": "Returns normalized detail envelope with diagnostics and next actions where applicable.",
                "PARAM": "report_id (str) - Stable report identifier.",
                "RETURN": "Optional[ReportDetailView] - Detailed report or None if not found."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9571428571428571
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 306 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "reports",
      "type": "Package",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Report service package root."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_resolve_task_type_fallbacks",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 12,
      "end_line": 22,
      "tags": {
        "TEST_FIXTURE": "valid_plugin"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_report_type_profiles"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_resolve_task_type_valid",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 24,
      "end_line": 34,
      "tags": {
        "TEST_FIXTURE": "valid_profile"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_report_type_profiles"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_get_type_profile_valid",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 36,
      "end_line": 47,
      "tags": {
        "TEST_INVARIANT": "always_returns_dict",
        "TEST_EDGE": "missing_profile"
      },
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_report_type_profiles"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_get_type_profile_fallback",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 49,
      "end_line": 62,
      "tags": {},
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "__tests__/test_report_type_profiles"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_report_service",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 187,
      "tags": {
        "COMPLEXITY": "2",
        "PURPOSE": "Unit tests for ReportsService list/detail operations",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "ReportsService:Class"
        }
      ],
      "children": [
        {
          "name": "_make_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 16,
          "end_line": 33,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_report_service"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_service",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_empty_tasks_returns_empty_collection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_single_task_normalized",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_pagination_first_page",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 61,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_pagination_last_page",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_filter_by_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_filter_by_task_type",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 97,
          "end_line": 97,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_search_filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_sort_by_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_applied_filters_echoed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 134,
          "end_line": 134,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_service",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 146,
          "end_line": 146,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_detail_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 152,
          "end_line": 152,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_detail_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 159,
          "end_line": 159,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_detail_includes_timeline",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 164,
          "end_line": 164,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_detail_failed_task_has_next_actions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 174,
          "end_line": 174,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_detail_success_task_no_error_next_actions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 180,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "test_report_normalizer",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 84,
      "tags": {
        "COMPLEXITY": "2",
        "SEMANTICS": "tests, reports, normalizer, fallback",
        "PURPOSE": "Validate unknown task type fallback and partial payload normalization behavior.",
        "LAYER": "Domain (Tests)",
        "INVARIANT": "Unknown plugin types are mapped to canonical unknown task type."
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "normalize_report:Function"
        }
      ],
      "children": [
        {
          "name": "test_unknown_type_maps_to_unknown_profile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Ensure unknown plugin IDs map to unknown profile with populated summary and error context."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_report_normalizer"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_partial_payload_keeps_report_visible_with_placeholders",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Ensure missing result payload still yields visible report details with result placeholder."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_report_normalizer"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_clean_release_plugin_maps_to_clean_release_task_type",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Ensure clean-release plugin ID maps to clean_release task profile and summary passthrough."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_report_normalizer"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "SemanticSourceResolver",
      "type": "Module",
      "complexity": 4,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 400,
      "tags": {
        "COMPLEXITY": "4",
        "SEMANTICS": "dataset_review, semantic_resolution, dictionary, trusted_sources, ranking",
        "PURPOSE": "Resolve and rank semantic candidates from trusted dictionary-like sources before any inferred fallback.",
        "LAYER": "Domain",
        "PRE": "selected source and target field set must be known.",
        "POST": "candidate ranking follows the configured confidence hierarchy and unresolved fuzzy matches remain reviewable.",
        "SIDE_EFFECT": "may create conflict findings and semantic candidate records.",
        "INVARIANT": "Manual overrides are never silently replaced by imported, inferred, or AI-generated values."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "LLMProviderService"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SemanticSource"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SemanticFieldEntry"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SemanticCandidate"
        }
      ],
      "children": [
        {
          "name": "imports",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 29,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DictionaryResolutionResult",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 41,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Carries field-level dictionary resolution output with explicit review and partial-recovery state."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SemanticSourceResolver",
          "type": "Class",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 44,
          "end_line": 398,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Resolve semantic candidates from trusted sources while preserving manual locks and confidence ordering.",
            "PRE": "source payload and target field collection are provided by the caller.",
            "POST": "result contains confidence-ranked candidates and does not overwrite manual locks implicitly.",
            "SIDE_EFFECT": "emits semantic trace logs for ranking and fallback decisions."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SemanticFieldEntry"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SemanticCandidate"
            }
          ],
          "children": [
            {
              "name": "resolve_from_file",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 53,
              "end_line": 58,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Normalize uploaded semantic file records into field-level candidates."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "resolve_from_dictionary",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 60,
              "end_line": 216,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Resolve candidates from connected tabular dictionary sources.",
                "PRE": "dictionary source exists and fields contain stable field_name values.",
                "POST": "returns confidence-ranked candidates where exact dictionary matches outrank fuzzy matches and unresolved fields stay explicit.",
                "SIDE_EFFECT": "emits belief-state logs describing trusted-match and partial-recovery outcomes.",
                "DATA_CONTRACT": "Input[source_payload:Mapping,fields:Iterable] -> Output[DictionaryResolutionResult]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "SemanticFieldEntry"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "SemanticCandidate"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "resolve_from_reference_dataset",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 218,
              "end_line": 227,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Reuse semantic metadata from trusted Superset datasets."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "rank_candidates",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 229,
              "end_line": 245,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Apply confidence ordering and determine best candidate per field."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "SemanticCandidate"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "detect_conflicts",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 247,
              "end_line": 252,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Mark competing candidate sets that require explicit user review."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "apply_field_decision",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 254,
              "end_line": 261,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Accept, reject, or manually override a field-level semantic value."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "propagate_source_version_update",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 263,
              "end_line": 318,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Propagate a semantic source version change to unlocked field entries without silently overwriting manual or locked values.",
                "PRE": "source is persisted and fields belong to the same session aggregate.",
                "POST": "unlocked fields linked to the source carry the new source version and are marked reviewable; manual or locked fields keep their active values untouched.",
                "SIDE_EFFECT": "mutates in-memory field state for the caller to persist.",
                "DATA_CONTRACT": "Input[SemanticSource,List[SemanticFieldEntry]] -> Output[Dict[str,int]]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "SemanticSource"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "SemanticFieldEntry"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "_normalize_dictionary_row",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 320,
              "end_line": 338,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Normalize one dictionary row into a consistent lookup structure."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_find_fuzzy_matches",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 340,
              "end_line": 356,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Produce confidence-scored fuzzy matches while keeping them reviewable."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_candidate_payload",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 358,
              "end_line": 377,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Project normalized dictionary rows into semantic candidate payloads."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_match_priority",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 379,
              "end_line": 390,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Encode trusted-confidence ordering so exact dictionary reuse beats fuzzy invention."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_normalize_key",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 392,
              "end_line": 397,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Normalize field identifiers for stable exact/fuzzy comparisons."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 400 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8071428571428572
      }
    },
    {
      "name": "SessionEventLoggerModule",
      "type": "Module",
      "complexity": 4,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 158,
      "tags": {
        "COMPLEXITY": "4",
        "SEMANTICS": "dataset_review, audit, session_events, persistence, observability",
        "PURPOSE": "Persist explicit session mutation events for dataset-review audit trails without weakening ownership or approval invariants.",
        "LAYER": "Domain",
        "PRE": "Caller provides an owned session scope and an authenticated actor identifier for each persisted mutation event.",
        "POST": "Every logged event is committed as an explicit, queryable audit record with deterministic event metadata.",
        "SIDE_EFFECT": "Inserts persisted session event rows and emits runtime belief-state logs for audit-sensitive mutations.",
        "DATA_CONTRACT": "Input[SessionEventPayload] -> Output[SessionEvent]"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "SessionEvent"
        },
        {
          "type": "DEPENDS_ON",
          "target": "DatasetReviewSession"
        }
      ],
      "children": [
        {
          "name": "SessionEventLoggerImports",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 15,
          "end_line": 23,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SessionEventPayload",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 38,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Typed input contract for one persisted dataset-review session audit event."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "SessionEventLogger",
          "type": "Class",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 41,
          "end_line": 156,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Persist explicit dataset-review session audit events with meaningful runtime reasoning logs.",
            "PRE": "The database session is live and payload identifiers are non-empty.",
            "POST": "Returns the committed session event row with a stable identifier and stored detail payload.",
            "SIDE_EFFECT": "Writes one audit row to persistence and emits logger.reason/logger.reflect traces.",
            "DATA_CONTRACT": "Input[SessionEventPayload] -> Output[SessionEvent]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SessionEvent"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SessionEventPayload"
            }
          ],
          "children": [
            {
              "name": "SessionEventLogger_init",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 51,
              "end_line": 56,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Bind a live SQLAlchemy session to the session-event logger."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "log_event",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 58,
              "end_line": 129,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Persist one explicit session event row for an owned dataset-review mutation.",
                "PRE": "session_id, actor_user_id, event_type, and event_summary are non-empty.",
                "POST": "Returns the committed SessionEvent record with normalized detail payload.",
                "SIDE_EFFECT": "Inserts and commits one session_events row.",
                "DATA_CONTRACT": "Input[SessionEventPayload] -> Output[SessionEvent]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "SessionEvent"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "log_for_session",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 131,
              "end_line": 155,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Convenience wrapper for logging an event directly from a session aggregate root."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SessionEventLogger.log_event"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 54,
          "end_line": 54,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.9571428571428571
      }
    },
    {
      "name": "DatasetReviewOrchestrator",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 1196,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "dataset_review, orchestration, session_lifecycle, intake, recovery",
        "PURPOSE": "Coordinate dataset review session startup and lifecycle-safe intake recovery for one authenticated user.",
        "LAYER": "Domain",
        "PRE": "session mutations must execute inside a persisted session boundary scoped to one authenticated user.",
        "POST": "state transitions are persisted atomically and emit observable progress for long-running steps.",
        "SIDE_EFFECT": "creates task records, updates session aggregates, triggers upstream Superset calls, persists audit artifacts.",
        "DATA_CONTRACT": "Input[SessionCommand] -> Output[DatasetReviewSession | CompiledPreview | DatasetRunContext]",
        "INVARIANT": "Launch is blocked unless a current session has no open blocking findings, all launch-sensitive mappings are approved, and a non-stale Superset-generated compiled preview matches the current input fingerprint."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "DatasetReviewSessionRepository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SemanticSourceResolver"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SupersetContextExtractor"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SupersetCompilationAdapter"
        },
        {
          "type": "DEPENDS_ON",
          "target": "TaskManager"
        },
        {
          "type": "CONTAINS",
          "target": "DatasetReviewOrchestrator"
        }
      ],
      "children": [
        {
          "name": "imports",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 73,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "StartSessionCommand",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 78,
          "end_line": 89,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Typed input contract for starting a dataset review session."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "StartSessionResult",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 102,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Session-start result carrying the persisted session and intake recovery metadata."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "PreparePreviewCommand",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 115,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Typed input contract for compiling one Superset-backed session preview."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "PreparePreviewResult",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 128,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Result contract for one persisted compiled preview attempt."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LaunchDatasetCommand",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 141,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Typed input contract for launching one dataset-review session into SQL Lab."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LaunchDatasetResult",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 154,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Launch result carrying immutable run context and any gate blockers surfaced before launch."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatasetReviewOrchestrator",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 157,
          "end_line": 1194,
          "tags": {
            "COMPLEXITY": "5",
            "PURPOSE": "Coordinate safe session startup while preserving cross-user isolation and explicit partial recovery.",
            "PRE": "constructor dependencies are valid and tied to the current request/task scope.",
            "POST": "orchestrator instance can execute session-scoped mutations for one authenticated user.",
            "SIDE_EFFECT": "downstream operations may persist session/profile/finding state and enqueue background tasks.",
            "DATA_CONTRACT": "Input[StartSessionCommand] -> Output[StartSessionResult]",
            "INVARIANT": "session ownership is preserved on every mutation and recovery remains explicit when partial."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSessionRepository"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SupersetContextExtractor"
            },
            {
              "type": "DEPENDS_ON",
              "target": "TaskManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ConfigManager"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SemanticSourceResolver"
            }
          ],
          "children": [
            {
              "name": "DatasetReviewOrchestrator_init",
              "type": "Function",
              "complexity": 3,
              "tier": "STANDARD",
              "start_line": 171,
              "end_line": 193,
              "tags": {
                "COMPLEXITY": "3",
                "PURPOSE": "Bind repository, config, and task dependencies required by the orchestration boundary.",
                "PRE": "repository/config_manager are valid collaborators for the current request scope.",
                "POST": "Instance holds collaborator references used by start/preview/launch orchestration methods.",
                "SIDE_EFFECT": "Stores dependency references for later session lifecycle operations."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSessionRepository"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "ConfigManager"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TaskManager"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "SemanticSourceResolver"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.85
              }
            },
            {
              "name": "start_session",
              "type": "Function",
              "complexity": 5,
              "tier": "CRITICAL",
              "start_line": 195,
              "end_line": 389,
              "tags": {
                "COMPLEXITY": "5",
                "PURPOSE": "Initialize a new session from a Superset link or dataset selection and trigger context recovery.",
                "PRE": "source input is non-empty and environment is accessible.",
                "POST": "session exists in persisted storage with intake/recovery state and task linkage when async work is required.",
                "SIDE_EFFECT": "persists session and may enqueue recovery task.",
                "DATA_CONTRACT": "Input[StartSessionCommand] -> Output[StartSessionResult]",
                "INVARIANT": "no cross-user session leakage occurs; session and follow-up task remain owned by the authenticated user."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSessionRepository"
                },
                {
                  "type": "CALLS",
                  "target": "SupersetContextExtractor.parse_superset_link"
                },
                {
                  "type": "CALLS",
                  "target": "TaskManager.create_task"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.95
              }
            },
            {
              "name": "prepare_launch_preview",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 391,
              "end_line": 506,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Assemble effective execution inputs and trigger Superset-side preview compilation.",
                "PRE": "all required variables have candidate values or explicitly accepted defaults.",
                "POST": "returns preview artifact in pending, ready, failed, or stale state.",
                "SIDE_EFFECT": "persists preview attempt and upstream compilation diagnostics.",
                "DATA_CONTRACT": "Input[PreparePreviewCommand] -> Output[PreparePreviewResult]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetCompilationAdapter.compile_preview"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "launch_dataset",
              "type": "Function",
              "complexity": 5,
              "tier": "CRITICAL",
              "start_line": 508,
              "end_line": 645,
              "tags": {
                "COMPLEXITY": "5",
                "PURPOSE": "Start the approved dataset execution through SQL Lab and persist run context for audit/replay.",
                "PRE": "session is run-ready and compiled preview is current.",
                "POST": "returns persisted run context with SQL Lab session reference and launch outcome.",
                "SIDE_EFFECT": "creates SQL Lab execution session and audit snapshot.",
                "DATA_CONTRACT": "Input[LaunchDatasetCommand] -> Output[LaunchDatasetResult]",
                "INVARIANT": "launch remains blocked unless blocking findings are closed, approvals are satisfied, and the latest Superset preview fingerprint matches current execution inputs."
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetCompilationAdapter.create_sql_lab_session"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.95
              }
            },
            {
              "name": "_parse_dataset_selection",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 647,
              "end_line": 668,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Normalize dataset-selection payload into canonical session references."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_initial_profile",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 670,
              "end_line": 711,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Create the first profile snapshot so exports and detail views remain usable immediately after intake."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetProfile"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_partial_recovery_findings",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 713,
              "end_line": 743,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Project partial Superset intake recovery into explicit findings without blocking session usability.",
                "PRE": "parsed_context.partial_recovery is true.",
                "POST": "returns warning-level findings that preserve usable but incomplete state.",
                "SIDE_EFFECT": "none beyond structured finding creation.",
                "DATA_CONTRACT": "Input[SupersetParsedContext] -> Output[List[ValidationFinding]]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationFinding"
                }
              ],
              "children": [],
              "compliance": {
                "valid": false,
                "issues": [
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 713
                  },
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 713
                  },
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 713
                  }
                ],
                "score": 0.0
              }
            },
            {
              "name": "_build_recovery_bootstrap",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 745,
              "end_line": 905,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Recover and materialize initial imported filters, template variables, and draft execution mappings after session creation.",
                "PRE": "session belongs to the just-created review aggregate and parsed_context was produced for the same environment scope.",
                "POST": "Returns bootstrap imported filters, template variables, execution mappings, and updated findings without persisting them directly.",
                "SIDE_EFFECT": "Performs Superset reads through the extractor and may append warning findings for incomplete recovery.",
                "DATA_CONTRACT": "Input[Environment, DatasetReviewSession, SupersetParsedContext, List[ValidationFinding]] -> Output[Tuple[List[ImportedFilter], List[TemplateVariable], List[ExecutionMapping], List[ValidationFinding]]]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "SupersetContextExtractor.recover_imported_filters"
                },
                {
                  "type": "CALLS",
                  "target": "SupersetContextExtractor.discover_template_variables"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "_extract_effective_filter_value",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 907,
              "end_line": 920,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Separate normalized filter payload metadata from the user-facing effective filter value."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_execution_snapshot",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 922,
              "end_line": 1058,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Build effective filters, template params, approvals, and fingerprint for preview and launch gating.",
                "PRE": "Session aggregate includes imported filters, template variables, and current execution mappings.",
                "POST": "returns deterministic execution snapshot for current session state without mutating persistence.",
                "SIDE_EFFECT": "none.",
                "DATA_CONTRACT": "Input[DatasetReviewSession] -> Output[Dict[str,Any]]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                }
              ],
              "children": [],
              "compliance": {
                "valid": false,
                "issues": [
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 922
                  },
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 922
                  },
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 922
                  }
                ],
                "score": 0.0
              }
            },
            {
              "name": "_build_launch_blockers",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 1060,
              "end_line": 1101,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Enforce launch gates from findings, approvals, and current preview truth.",
                "PRE": "execution_snapshot was computed from current session state and preview is the latest persisted preview or None.",
                "POST": "returns explicit blocker codes for every unmet launch invariant.",
                "SIDE_EFFECT": "none.",
                "DATA_CONTRACT": "Input[DatasetReviewSession,Dict[str,Any],CompiledPreview|None] -> Output[List[str]]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "CompiledPreview"
                }
              ],
              "children": [],
              "compliance": {
                "valid": false,
                "issues": [
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 1060
                  },
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 1060
                  },
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 1060
                  }
                ],
                "score": 0.0
              }
            },
            {
              "name": "_get_latest_preview",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 1103,
              "end_line": 1122,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Resolve the current latest preview snapshot for one session aggregate."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_compute_preview_fingerprint",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 1124,
              "end_line": 1131,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Produce deterministic execution fingerprint for preview truth and staleness checks."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_enqueue_recovery_task",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 1133,
              "end_line": 1191,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Link session start to observable async recovery when task infrastructure is available.",
                "PRE": "session is already persisted.",
                "POST": "returns task identifier when a task could be enqueued, otherwise None.",
                "SIDE_EFFECT": "may create one background task for progressive recovery.",
                "DATA_CONTRACT": "Input[StartSessionCommand,DatasetReviewSession,SupersetParsedContext|None] -> Output[task_id:str|None]"
              },
              "relations": [
                {
                  "type": "CALLS",
                  "target": "TaskManager.create_task"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9571428571428571
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 181,
          "end_line": 181,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: CONTAINS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 1196 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.31666666666666665
      }
    },
    {
      "name": "dataset_review",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 8,
      "tags": {
        "SEMANTICS": "dataset, review, orchestration",
        "PURPOSE": "Provides services for dataset-centered orchestration flow.",
        "LAYER": "Services"
      },
      "relations": [
        {
          "type": "EXPORTS",
          "target": "DatasetReviewOrchestrator:Class"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: EXPORTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "ClarificationEngine",
      "type": "Module",
      "complexity": 4,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 635,
      "tags": {
        "COMPLEXITY": "4",
        "SEMANTICS": "dataset_review, clarification, question_payload, answer_persistence, readiness, findings",
        "PURPOSE": "Manage one-question-at-a-time clarification state, deterministic answer persistence, and readiness/finding updates.",
        "LAYER": "Domain",
        "PRE": "Target session contains a persisted clarification aggregate in the current ownership scope.",
        "POST": "Active clarification payload exposes one highest-priority unresolved question, and each recorded answer is persisted before pointer/readiness mutation.",
        "SIDE_EFFECT": "Persists clarification answers, question/session states, and related readiness/finding changes.",
        "DATA_CONTRACT": "Input[DatasetReviewSession|ClarificationAnswerCommand] -> Output[ClarificationStateResult]",
        "INVARIANT": "Only one active clarification question may exist at a time; skipped and expert-review items remain unresolved and visible."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "DatasetReviewSessionRepository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ClarificationSession"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ClarificationQuestion"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ClarificationAnswer"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ValidationFinding"
        }
      ],
      "children": [
        {
          "name": "imports",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 45,
          "tags": {},
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationQuestionPayload",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 48,
          "end_line": 64,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Typed active-question payload returned to the API layer."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationStateResult",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 78,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Clarification state result carrying the current session, active payload, and changed findings."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationAnswerCommand",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 81,
          "end_line": 93,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Typed answer command for clarification state mutation."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ClarificationEngine",
          "type": "Class",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 96,
          "end_line": 633,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Provide deterministic one-question-at-a-time clarification selection and answer persistence.",
            "PRE": "Repository is bound to the current request transaction scope.",
            "POST": "Returned clarification state is persistence-backed and aligned with session readiness/recommended action.",
            "SIDE_EFFECT": "Mutates clarification answers, session flags, and related clarification findings."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSessionRepository"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ClarificationSession"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ValidationFinding"
            }
          ],
          "children": [
            {
              "name": "ClarificationEngine_init",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 106,
              "end_line": 112,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Bind repository dependency for clarification persistence operations."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "build_question_payload",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 114,
              "end_line": 219,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Return the one active highest-priority clarification question payload with why-it-matters, current guess, and options.",
                "PRE": "Session contains unresolved clarification state or a resumable clarification session.",
                "POST": "Returns exactly one active/open question payload or None when no unresolved question remains.",
                "SIDE_EFFECT": "Normalizes the active-question pointer and clarification status in persistence.",
                "DATA_CONTRACT": "Input[DatasetReviewSession] -> Output[ClarificationQuestionPayload|None]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ClarificationQuestion"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "ClarificationOption"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "record_answer",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 221,
              "end_line": 376,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Persist one clarification answer before any pointer/readiness mutation and compute deterministic state impact.",
                "PRE": "Target question belongs to the session's active clarification session and is still open.",
                "POST": "Answer row is persisted before current-question pointer advances; skipped/expert-review items remain unresolved and visible.",
                "SIDE_EFFECT": "Inserts answer row, mutates question/session states, updates clarification findings, and commits.",
                "DATA_CONTRACT": "Input[ClarificationAnswerCommand] -> Output[ClarificationStateResult]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ClarificationAnswer"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationFinding"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "summarize_progress",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 378,
              "end_line": 387,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Produce a compact progress summary for pause/resume and completion UX."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ClarificationSession"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_get_latest_clarification_session",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 389,
              "end_line": 405,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Select the latest clarification session for the current dataset review aggregate."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_find_question",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 407,
              "end_line": 420,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Resolve a clarification question from the active clarification aggregate."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_select_next_open_question",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 422,
              "end_line": 441,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Select the next unresolved question in deterministic priority order."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_count_resolved_questions",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 443,
              "end_line": 455,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Count questions whose answers fully resolved the ambiguity."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_count_remaining_questions",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 457,
              "end_line": 470,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Count questions still unresolved or deferred after clarification interaction."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_normalize_answer_value",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 472,
              "end_line": 503,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Validate and normalize answer payload based on answer kind and active question options."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_build_impact_summary",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 505,
              "end_line": 520,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Build a compact audit note describing how the clarification answer affects session state."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_upsert_clarification_finding",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 522,
              "end_line": 593,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Keep one finding per clarification topic aligned with answer outcome and unresolved visibility rules."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationFinding"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_derive_readiness_state",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 595,
              "end_line": 613,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Recompute readiness after clarification mutation while preserving unresolved visibility semantics."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ClarificationSession"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_derive_recommended_action",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 615,
              "end_line": 630,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "Recompute next-action guidance after clarification mutations."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 109,
          "end_line": 109,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 635 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.8071428571428572
      }
    },
    {
      "name": "DatasetReviewSessionRepository",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 514,
      "tags": {
        "COMPLEXITY": "5",
        "PURPOSE": "Persist and retrieve dataset review session aggregates, including readiness, findings, semantic decisions, clarification state, previews, and run contexts.",
        "LAYER": "Domain",
        "PRE": "repository operations execute within authenticated request or task scope.",
        "POST": "session aggregate reads are structurally consistent and writes preserve ownership and version semantics.",
        "SIDE_EFFECT": "reads and writes SQLAlchemy-backed session aggregates.",
        "DATA_CONTRACT": "Input[SessionMutation] -> Output[PersistedSessionAggregate]",
        "INVARIANT": "answers, mapping approvals, preview artifacts, and launch snapshots are never attributed to the wrong user or session."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "DatasetReviewSession"
        },
        {
          "type": "DEPENDS_ON",
          "target": "DatasetProfile"
        },
        {
          "type": "DEPENDS_ON",
          "target": "ValidationFinding"
        },
        {
          "type": "DEPENDS_ON",
          "target": "CompiledPreview"
        }
      ],
      "children": [
        {
          "name": "DatasetReviewSessionVersionConflictError",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 53,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Signal optimistic-lock conflicts for dataset review session mutations."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "DatasetReviewSessionRepository",
          "type": "Class",
          "complexity": 4,
          "tier": "STANDARD",
          "start_line": 56,
          "end_line": 512,
          "tags": {
            "COMPLEXITY": "4",
            "PURPOSE": "Enforce ownership-scoped persistence and retrieval for dataset review session aggregates.",
            "PRE": "constructor receives a live SQLAlchemy session and callers provide authenticated user scope for guarded reads and writes.",
            "POST": "repository methods return ownership-scoped aggregates or persisted child records without changing domain meaning.",
            "SIDE_EFFECT": "mutates and queries the persistence layer through the injected database session.",
            "DATA_CONTRACT": "Input[OwnedSessionQuery|SessionMutation] -> Output[PersistedSessionAggregate|PersistedChildRecord]"
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "DatasetReviewSession"
            },
            {
              "type": "DEPENDS_ON",
              "target": "DatasetProfile"
            },
            {
              "type": "DEPENDS_ON",
              "target": "ValidationFinding"
            },
            {
              "type": "DEPENDS_ON",
              "target": "CompiledPreview"
            },
            {
              "type": "DEPENDS_ON",
              "target": "SessionEventLogger"
            }
          ],
          "children": [
            {
              "name": "init_repo",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 69,
              "end_line": 76,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Bind one live SQLAlchemy session to the repository instance."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": false,
                "issues": [
                  {
                    "message": "Missing Mandatory Tag: @RELATION (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Mandatory Tag: @RELATION (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Mandatory Tag: @RELATION (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  },
                  {
                    "message": "Missing Belief State Logging: Function should use belief_scope / molecular methods (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 69
                  }
                ],
                "score": 0.0
              }
            },
            {
              "name": "get_owned_session",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 78,
              "end_line": 112,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Resolve one owner-scoped dataset review session for mutation paths without leaking foreign-session state.",
                "PRE": "session_id and user_id are non-empty identifiers from the authenticated ownership scope.",
                "POST": "returns the owned session or raises a deterministic access error.",
                "SIDE_EFFECT": "reads one session row from the current database transaction.",
                "DATA_CONTRACT": "Input[OwnedSessionQuery] -> Output[DatasetReviewSession|ValueError]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "create_sess",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 114,
              "end_line": 140,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Persist an initial dataset review session shell.",
                "PRE": "session is a new aggregate root bound to the current ownership scope.",
                "POST": "session is committed, refreshed, and returned with persisted identifiers.",
                "SIDE_EFFECT": "inserts a session row and commits the active transaction.",
                "DATA_CONTRACT": "Input[DatasetReviewSession] -> Output[DatasetReviewSession]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "require_session_version",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 142,
              "end_line": 182,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Enforce optimistic-lock version matching before a session mutation is persisted.",
                "PRE": "session belongs to the current owner mutation scope and expected_version is the caller's last observed version.",
                "POST": "returns the same session when versions match; otherwise raises deterministic conflict error.",
                "SIDE_EFFECT": "none.",
                "DATA_CONTRACT": "Input[DatasetReviewSession,int] -> Output[DatasetReviewSession|DatasetReviewSessionVersionConflictError]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "bump_session_version",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 184,
              "end_line": 204,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Increment optimistic-lock version after a successful session mutation is assembled.",
                "PRE": "session mutation has passed guards and will be committed in the current transaction.",
                "POST": "session version increments monotonically and last_activity_at reflects the mutation time.",
                "SIDE_EFFECT": "mutates the in-memory session aggregate before commit.",
                "DATA_CONTRACT": "Input[DatasetReviewSession] -> Output[int]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "load_detail",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 206,
              "end_line": 265,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Return the full session aggregate for API and frontend resume flows."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "SessionCollaborator"
                }
              ],
              "children": [],
              "compliance": {
                "valid": false,
                "issues": [
                  {
                    "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 206
                  },
                  {
                    "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 206
                  },
                  {
                    "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 206
                  },
                  {
                    "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 206
                  },
                  {
                    "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 206
                  },
                  {
                    "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 206
                  },
                  {
                    "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 206
                  },
                  {
                    "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 206
                  },
                  {
                    "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 206
                  }
                ],
                "score": 0.0
              }
            },
            {
              "name": "save_prof_find",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 267,
              "end_line": 329,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Persist profile state and replace validation findings for an owned session in one transaction.",
                "PRE": "session_id belongs to user_id and the supplied profile/findings belong to the same aggregate scope.",
                "POST": "stored profile matches the current session and findings are replaced by the supplied collection.",
                "SIDE_EFFECT": "updates profile rows, deletes stale findings, inserts current findings, and commits the transaction.",
                "DATA_CONTRACT": "Input[ProfileAndFindingsMutation] -> Output[DatasetReviewSession]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetProfile"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "ValidationFinding"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "save_recovery_state",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 331,
              "end_line": 401,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Persist imported filters, template variables, and initial execution mappings for one owned session."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "ImportedFilter"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "TemplateVariable"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "ExecutionMapping"
                }
              ],
              "children": [],
              "compliance": {
                "valid": false,
                "issues": [
                  {
                    "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 331
                  },
                  {
                    "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 331
                  },
                  {
                    "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 331
                  },
                  {
                    "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 331
                  },
                  {
                    "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 331
                  },
                  {
                    "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 331
                  },
                  {
                    "message": "Missing Mandatory Tag: @PRE (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 331
                  },
                  {
                    "message": "Missing Mandatory Tag: @POST (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 331
                  },
                  {
                    "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 4)",
                    "severity": "ERROR",
                    "line_number": 331
                  }
                ],
                "score": 0.0
              }
            },
            {
              "name": "save_prev",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 403,
              "end_line": 445,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Persist a preview snapshot and mark prior session previews stale.",
                "PRE": "session_id belongs to user_id and preview is prepared for the same session aggregate.",
                "POST": "preview is persisted and the session points to the latest preview identifier.",
                "SIDE_EFFECT": "updates prior preview statuses, inserts a preview row, mutates the parent session, and commits.",
                "DATA_CONTRACT": "Input[PreviewMutation] -> Output[CompiledPreview]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "CompiledPreview"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "save_run_ctx",
              "type": "Function",
              "complexity": 4,
              "tier": "STANDARD",
              "start_line": 447,
              "end_line": 485,
              "tags": {
                "COMPLEXITY": "4",
                "PURPOSE": "Persist an immutable launch audit snapshot for an owned session.",
                "PRE": "session_id belongs to user_id and run_context targets the same aggregate.",
                "POST": "run context is persisted and linked as the latest launch snapshot for the session.",
                "SIDE_EFFECT": "inserts a run-context row, mutates the parent session pointer, and commits.",
                "DATA_CONTRACT": "Input[RunContextMutation] -> Output[DatasetRunContext]"
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                },
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetRunContext"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 0.9400000000000001
              }
            },
            {
              "name": "list_user_sess",
              "type": "Function",
              "complexity": 2,
              "tier": "TRIVIAL",
              "start_line": 487,
              "end_line": 509,
              "tags": {
                "COMPLEXITY": "2",
                "PURPOSE": "List review sessions owned by a specific user ordered by most recent update."
              },
              "relations": [
                {
                  "type": "DEPENDS_ON",
                  "target": "DatasetReviewSession"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.9400000000000001
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 72,
          "end_line": 72,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_get_owned_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 122,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "load_session_detail",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 211,
          "end_line": 211,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_profile_and_findings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 277,
          "end_line": 277,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_preview",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 412,
          "end_line": 412,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "save_run_context",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 456,
          "end_line": 456,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_sessions_for_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 491,
          "end_line": 491,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 514 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.2833333333333333
      }
    },
    {
      "name": "SessionRepositoryTests",
      "type": "Module",
      "complexity": 2,
      "tier": "TRIVIAL",
      "start_line": 28,
      "end_line": 615,
      "tags": {
        "COMPLEXITY": "2",
        "PURPOSE": "Unit tests for DatasetReviewSessionRepository."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "db_session",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 36,
          "end_line": 59,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Build isolated in-memory SQLAlchemy session seeded with baseline user/environment rows."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 86,
          "tags": {
            "PURPOSE": "Verify session creation and persistence."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_require_session_version_conflict",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Verify optimistic-lock conflict is raised when caller version is stale."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_bump_session_version_updates_last_activity",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 136,
          "tags": {
            "PURPOSE": "Verify repository version bump increments monotonically and refreshes last activity."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_save_recovery_state_preserves_raw_value_masked_flag",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 139,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Verify imported-filter masking metadata persists with recovery bootstrap state."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_load_session_detail_ownership",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 180,
          "end_line": 203,
          "tags": {
            "PURPOSE": "Verify ownership enforcement in detail loading."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_load_session_detail_collaborator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 206,
          "end_line": 240,
          "tags": {
            "PURPOSE": "Verify collaborator access in detail loading."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_save_preview_marks_stale",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 243,
          "end_line": 273,
          "tags": {
            "PURPOSE": "Verify that saving a new preview marks old ones as stale."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_save_preview_increments_session_version_once_per_call",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 276,
          "end_line": 315,
          "tags": {
            "PURPOSE": "Verify preview persistence itself contributes exactly one optimistic-lock version increment so higher orchestration layers do not need to bump again for the same preview mutation."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_save_profile_and_findings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 318,
          "end_line": 374,
          "tags": {
            "PURPOSE": "Verify persistence of profile and findings."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_save_run_context",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 377,
          "end_line": 409,
          "tags": {
            "PURPOSE": "Verify saving of run context."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_ensure_dataset_review_session_columns_adds_missing_legacy_columns",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 412,
          "end_line": 576,
          "tags": {
            "PURPOSE": "Verify additive dataset review migration creates missing legacy columns for session and imported-filter tables without dropping rows."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_list_sessions_for_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 579,
          "end_line": 614,
          "tags": {
            "PURPOSE": "Verify listing of sessions by user."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "SessionRepositoryTests"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "db_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 35,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 28
          },
          {
            "message": "Fractal limit warning: Module length is 588 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 28
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "BackupPlugin",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 261,
      "tags": {
        "SEMANTICS": "backup, superset, automation, dashboard, plugin",
        "PURPOSE": "A plugin that provides functionality to back up Superset dashboards.",
        "LAYER": "App"
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "PluginBase"
        },
        {
          "type": "DEPENDS_ON",
          "target": "superset_tool.client"
        },
        {
          "type": "DEPENDS_ON",
          "target": "superset_tool.utils"
        },
        {
          "type": "USES",
          "target": "TaskContext"
        }
      ],
      "children": [
        {
          "name": "BackupPlugin",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 29,
          "end_line": 260,
          "tags": {
            "PURPOSE": "Implementation of the backup plugin logic."
          },
          "relations": [],
          "children": [
            {
              "name": "id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 37,
              "end_line": 45,
              "tags": {
                "PURPOSE": "Returns the unique identifier for the backup plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string ID.",
                "RETURN": "str - \"superset-backup\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "name",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 48,
              "end_line": 56,
              "tags": {
                "PURPOSE": "Returns the human-readable name of the backup plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string name.",
                "RETURN": "str - Plugin name."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "description",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 59,
              "end_line": 67,
              "tags": {
                "PURPOSE": "Returns a description of the backup plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string description.",
                "RETURN": "str - Plugin description."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "version",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 70,
              "end_line": 78,
              "tags": {
                "PURPOSE": "Returns the version of the backup plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string version.",
                "RETURN": "str - \"1.0.0\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "ui_route",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 81,
              "end_line": 87,
              "tags": {
                "PURPOSE": "Returns the frontend route for the backup plugin.",
                "RETURN": "str - \"/tools/backups\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_schema",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 89,
              "end_line": 112,
              "tags": {
                "PURPOSE": "Returns the JSON schema for backup plugin parameters.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns dictionary schema.",
                "RETURN": "Dict[str, Any] - JSON schema."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "execute",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 114,
              "end_line": 259,
              "tags": {
                "PURPOSE": "Executes the dashboard backup logic with TaskContext support.",
                "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.",
                "PRE": "Target environment must be configured. params must be a dictionary.",
                "POST": "All dashboards are exported and archived."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "DebugPluginModule",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 216,
      "tags": {
        "SEMANTICS": "plugin, debug, api, database, superset",
        "PURPOSE": "Implements a plugin for system diagnostics and debugging Superset API responses.",
        "LAYER": "Plugins",
        "RELATION": "Inherits from PluginBase. Uses SupersetClient from core.",
        "CONSTRAINT": "Must use belief_scope for logging."
      },
      "relations": [
        {
          "type": "USES",
          "target": "TaskContext"
        }
      ],
      "children": [
        {
          "name": "DebugPlugin",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 215,
          "tags": {
            "PURPOSE": "Plugin for system diagnostics and debugging."
          },
          "relations": [],
          "children": [
            {
              "name": "id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 25,
              "end_line": 33,
              "tags": {
                "PURPOSE": "Returns the unique identifier for the debug plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string ID.",
                "RETURN": "str - \"system-debug\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "name",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 36,
              "end_line": 44,
              "tags": {
                "PURPOSE": "Returns the human-readable name of the debug plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string name.",
                "RETURN": "str - Plugin name."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "description",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 47,
              "end_line": 55,
              "tags": {
                "PURPOSE": "Returns a description of the debug plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string description.",
                "RETURN": "str - Plugin description."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "version",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 58,
              "end_line": 66,
              "tags": {
                "PURPOSE": "Returns the version of the debug plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string version.",
                "RETURN": "str - \"1.0.0\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "ui_route",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 69,
              "end_line": 75,
              "tags": {
                "PURPOSE": "Returns the frontend route for the debug plugin.",
                "RETURN": "str - \"/tools/debug\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_schema",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 77,
              "end_line": 116,
              "tags": {
                "PURPOSE": "Returns the JSON schema for the debug plugin parameters.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns dictionary schema.",
                "RETURN": "Dict[str, Any] - JSON schema."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "execute",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 118,
              "end_line": 143,
              "tags": {
                "PURPOSE": "Executes the debug logic with TaskContext support.",
                "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.",
                "PRE": "action must be provided in params.",
                "POST": "Debug action is executed and results returned.",
                "RETURN": "Dict[str, Any] - Execution results."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_test_db_api",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 145,
              "end_line": 181,
              "tags": {
                "PURPOSE": "Tests database API connectivity for source and target environments.",
                "PRE": "source_env and target_env params exist in params.",
                "POST": "Returns DB counts for both envs.",
                "PARAM": "log - Logger instance for superset_api source.",
                "RETURN": "Dict - Comparison results."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_get_dataset_structure",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 183,
              "end_line": 213,
              "tags": {
                "PURPOSE": "Retrieves the structure of a dataset.",
                "PRE": "env and dataset_id params exist in params.",
                "POST": "Returns dataset JSON structure.",
                "PARAM": "log - Logger instance for superset_api source.",
                "RETURN": "Dict - Dataset structure."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "SearchPluginModule",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 221,
      "tags": {
        "SEMANTICS": "plugin, search, datasets, regex, superset",
        "PURPOSE": "Implements a plugin for searching text patterns across all datasets in a specific Superset environment.",
        "LAYER": "Plugins",
        "RELATION": "Inherits from PluginBase. Uses SupersetClient from core.",
        "CONSTRAINT": "Must use belief_scope for logging."
      },
      "relations": [
        {
          "type": "USES",
          "target": "TaskContext"
        }
      ],
      "children": [
        {
          "name": "SearchPlugin",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 220,
          "tags": {
            "PURPOSE": "Plugin for searching text patterns in Superset datasets."
          },
          "relations": [],
          "children": [
            {
              "name": "id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 26,
              "end_line": 34,
              "tags": {
                "PURPOSE": "Returns the unique identifier for the search plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string ID.",
                "RETURN": "str - \"search-datasets\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "name",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 37,
              "end_line": 45,
              "tags": {
                "PURPOSE": "Returns the human-readable name of the search plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string name.",
                "RETURN": "str - Plugin name."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "description",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 48,
              "end_line": 56,
              "tags": {
                "PURPOSE": "Returns a description of the search plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string description.",
                "RETURN": "str - Plugin description."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "version",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 59,
              "end_line": 67,
              "tags": {
                "PURPOSE": "Returns the version of the search plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string version.",
                "RETURN": "str - \"1.0.0\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "ui_route",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 70,
              "end_line": 76,
              "tags": {
                "PURPOSE": "Returns the frontend route for the search plugin.",
                "RETURN": "str - \"/tools/search\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_schema",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 78,
              "end_line": 101,
              "tags": {
                "PURPOSE": "Returns the JSON schema for the search plugin parameters.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns dictionary schema.",
                "RETURN": "Dict[str, Any] - JSON schema."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "execute",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 103,
              "end_line": 180,
              "tags": {
                "PURPOSE": "Executes the dataset search logic with TaskContext support.",
                "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.",
                "PRE": "Params contain valid 'env' and 'query'.",
                "POST": "Returns a dictionary with count and results list.",
                "RETURN": "Dict[str, Any] - Search results."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "_get_context",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 182,
              "end_line": 218,
              "tags": {
                "PURPOSE": "Extracts a small context around the match for display.",
                "PARAM": "context_lines (int) - Number of lines of context to include.",
                "PRE": "text and match_text must be strings.",
                "POST": "Returns context string.",
                "RETURN": "str - Extracted context."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "MapperPluginModule",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 215,
      "tags": {
        "SEMANTICS": "plugin, mapper, datasets, postgresql, excel",
        "PURPOSE": "Implements a plugin for mapping dataset columns using external database connections or Excel files.",
        "LAYER": "Plugins",
        "RELATION": "Inherits from PluginBase. Uses DatasetMapper from superset_tool.",
        "CONSTRAINT": "Must use belief_scope for logging."
      },
      "relations": [
        {
          "type": "USES",
          "target": "TaskContext"
        }
      ],
      "children": [
        {
          "name": "MapperPlugin",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 214,
          "tags": {
            "PURPOSE": "Plugin for mapping dataset columns verbose names."
          },
          "relations": [],
          "children": [
            {
              "name": "id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 28,
              "end_line": 36,
              "tags": {
                "PURPOSE": "Returns the unique identifier for the mapper plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string ID.",
                "RETURN": "str - \"dataset-mapper\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "name",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 39,
              "end_line": 47,
              "tags": {
                "PURPOSE": "Returns the human-readable name of the mapper plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string name.",
                "RETURN": "str - Plugin name."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "description",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 50,
              "end_line": 58,
              "tags": {
                "PURPOSE": "Returns a description of the mapper plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string description.",
                "RETURN": "str - Plugin description."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "version",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 61,
              "end_line": 69,
              "tags": {
                "PURPOSE": "Returns the version of the mapper plugin.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns string version.",
                "RETURN": "str - \"1.0.0\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "ui_route",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 72,
              "end_line": 78,
              "tags": {
                "PURPOSE": "Returns the frontend route for the mapper plugin.",
                "RETURN": "str - \"/tools/mapper\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_schema",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 80,
              "end_line": 130,
              "tags": {
                "PURPOSE": "Returns the JSON schema for the mapper plugin parameters.",
                "PRE": "Plugin instance exists.",
                "POST": "Returns dictionary schema.",
                "RETURN": "Dict[str, Any] - JSON schema."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "execute",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 132,
              "end_line": 212,
              "tags": {
                "PURPOSE": "Executes the dataset mapping logic with TaskContext support.",
                "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.",
                "PRE": "Params contain valid 'env', 'dataset_id', and 'source'. params must be a dictionary.",
                "POST": "Updates the dataset in Superset.",
                "RETURN": "Dict[str, Any] - Execution status."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "backend.src.plugins.git_plugin",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 401,
      "tags": {
        "SEMANTICS": "git, plugin, dashboard, version_control, sync, deploy",
        "PURPOSE": "\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432 Superset.",
        "LAYER": "Plugin",
        "INVARIANT": "\u0412\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 Git \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 GitService.",
        "CONSTRAINT": "\u041f\u043b\u0430\u0433\u0438\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 YAML-\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430\u043c\u0438 Superset."
      },
      "relations": [
        {
          "type": "INHERITS_FROM",
          "target": "src.core.plugin_base.PluginBase"
        },
        {
          "type": "USES",
          "target": "src.services.git_service.GitService"
        },
        {
          "type": "USES",
          "target": "src.core.superset_client.SupersetClient"
        },
        {
          "type": "USES",
          "target": "src.core.config_manager.ConfigManager"
        },
        {
          "type": "USES",
          "target": "TaskContext"
        }
      ],
      "children": [
        {
          "name": "GitPlugin",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 400,
          "tags": {
            "PURPOSE": "\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Git Integration \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 36,
              "end_line": 64,
              "tags": {
                "PURPOSE": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u0438 \u0435\u0433\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.",
                "PRE": "config.json exists or shared config_manager is available.",
                "POST": "\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b git_service \u0438 config_manager."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 67,
              "end_line": 74,
              "tags": {
                "PURPOSE": "Returns the plugin identifier.",
                "PRE": "GitPlugin is initialized.",
                "POST": "Returns 'git-integration'."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "name",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 77,
              "end_line": 84,
              "tags": {
                "PURPOSE": "Returns the plugin name.",
                "PRE": "GitPlugin is initialized.",
                "POST": "Returns the human-readable name."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "description",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 87,
              "end_line": 94,
              "tags": {
                "PURPOSE": "Returns the plugin description.",
                "PRE": "GitPlugin is initialized.",
                "POST": "Returns the plugin's purpose description."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "version",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 97,
              "end_line": 104,
              "tags": {
                "PURPOSE": "Returns the plugin version.",
                "PRE": "GitPlugin is initialized.",
                "POST": "Returns the version string."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "ui_route",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 107,
              "end_line": 113,
              "tags": {
                "PURPOSE": "Returns the frontend route for the git plugin.",
                "RETURN": "str - \"/git\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_schema",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 115,
              "end_line": 132,
              "tags": {
                "PURPOSE": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 JSON-\u0441\u0445\u0435\u043c\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043f\u043b\u0430\u0433\u0438\u043d\u0430.",
                "PRE": "GitPlugin is initialized.",
                "POST": "Returns a JSON schema dictionary.",
                "RETURN": "Dict[str, Any] - \u0421\u0445\u0435\u043c\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "initialize",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 134,
              "end_line": 399,
              "tags": {
                "PURPOSE": "\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u0430.",
                "PRE": "GitPlugin is initialized.",
                "POST": "\u041f\u043b\u0430\u0433\u0438\u043d \u0433\u043e\u0442\u043e\u0432 \u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447."
              },
              "relations": [],
              "children": [
                {
                  "name": "execute",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 142,
                  "end_line": 179,
                  "tags": {
                    "PURPOSE": "\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 TaskContext.",
                    "PRE": "task_data \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 'operation' \u0438 'dashboard_id'.",
                    "POST": "\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.",
                    "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.",
                    "RETURN": "Dict[str, Any] - \u0421\u0442\u0430\u0442\u0443\u0441 \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435."
                  },
                  "relations": [
                    {
                      "type": "CALLS",
                      "target": "self._handle_sync"
                    },
                    {
                      "type": "CALLS",
                      "target": "self._handle_deploy"
                    }
                  ],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                },
                {
                  "name": "_handle_sync",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 181,
                  "end_line": 261,
                  "tags": {
                    "PURPOSE": "\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0438\u0437 Superset \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432 Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439.",
                    "PRE": "\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u043b\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c.",
                    "POST": "\u0424\u0430\u0439\u043b\u044b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0434\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0432 Superset.",
                    "PARAM": "source_env_id (Optional[str]) - ID \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.",
                    "RETURN": "Dict[str, str] - \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438.",
                    "SIDE_EFFECT": "\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0444\u0430\u0439\u043b\u044b \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f."
                  },
                  "relations": [
                    {
                      "type": "CALLS",
                      "target": "src.services.git_service.GitService.get_repo"
                    },
                    {
                      "type": "CALLS",
                      "target": "src.core.superset_client.SupersetClient.export_dashboard"
                    }
                  ],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                },
                {
                  "name": "_handle_deploy",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 263,
                  "end_line": 332,
                  "tags": {
                    "PURPOSE": "\u0423\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0432 ZIP \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 Superset.",
                    "PRE": "environment_id \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c\u0443 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044e.",
                    "POST": "\u0414\u0430\u0448\u0431\u043e\u0440\u0434 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 Superset.",
                    "PARAM": "superset_log - Superset API-specific logger instance.",
                    "RETURN": "Dict[str, Any] - \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0435\u043f\u043b\u043e\u044f.",
                    "SIDE_EFFECT": "\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 ZIP-\u0444\u0430\u0439\u043b."
                  },
                  "relations": [
                    {
                      "type": "CALLS",
                      "target": "src.core.superset_client.SupersetClient.import_dashboard"
                    }
                  ],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                },
                {
                  "name": "_get_env",
                  "type": "Function",
                  "complexity": 1,
                  "tier": "TRIVIAL",
                  "start_line": 334,
                  "end_line": 397,
                  "tags": {
                    "PURPOSE": "\u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.",
                    "PARAM": "env_id (Optional[str]) - ID \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f.",
                    "PRE": "env_id is a string or None.",
                    "POST": "Returns an Environment object from config or DB.",
                    "RETURN": "Environment - \u041e\u0431\u044a\u0435\u043a\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f."
                  },
                  "relations": [],
                  "children": [],
                  "compliance": {
                    "valid": true,
                    "issues": [],
                    "score": 1.0
                  }
                }
              ],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: INHERITS_FROM. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 401 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.10000000000000009
      }
    },
    {
      "name": "MigrationPlugin",
      "type": "Module",
      "complexity": 5,
      "tier": "CRITICAL",
      "start_line": 1,
      "end_line": 384,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "migration, superset, automation, dashboard, plugin, transformation",
        "PURPOSE": "Orchestrates export, DB-mapping transformation, and import of Superset dashboards across environments.",
        "LAYER": "App",
        "INVARIANT": "Dashboards must never be imported with unmapped/source DB connections to prevent data leaks or cross-environment pollution."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "PluginBase"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SupersetClient"
        },
        {
          "type": "DEPENDS_ON",
          "target": "MigrationEngine"
        },
        {
          "type": "DEPENDS_ON",
          "target": "IdMappingService"
        },
        {
          "type": "USES",
          "target": "TaskContext"
        }
      ],
      "children": [
        {
          "name": "MigrationPlugin",
          "type": "Class",
          "complexity": 5,
          "tier": "CRITICAL",
          "start_line": 27,
          "end_line": 383,
          "tags": {
            "PURPOSE": "Implementation of the migration plugin workflow and transformation orchestration.",
            "PRE": "Plugin loader must register this instance.",
            "POST": "Provides migration UI schema and executes atomic dashboard transfers.",
            "TEST_FIXTURE": "password_inject_payload -> INLINE_JSON: {\"passwords\": {\"PostgreSQL\": \"secret123\"}}",
            "TEST_INVARIANT": "strict_db_isolation -> VERIFIED_BY: [successful_dashboard_transfer, missing_mapping_resolution]"
          },
          "relations": [],
          "children": [
            {
              "name": "id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 41,
              "end_line": 49,
              "tags": {
                "PURPOSE": "Returns the unique identifier for the migration plugin.",
                "PRE": "None.",
                "POST": "Returns stable string \"superset-migration\".",
                "RETURN": "str"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "name",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 52,
              "end_line": 60,
              "tags": {
                "PURPOSE": "Returns the human-readable name of the plugin.",
                "PRE": "None.",
                "POST": "Returns \"Superset Dashboard Migration\".",
                "RETURN": "str"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "description",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 63,
              "end_line": 71,
              "tags": {
                "PURPOSE": "Returns the semantic description of the plugin.",
                "PRE": "None.",
                "POST": "Returns description string.",
                "RETURN": "str"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "version",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 74,
              "end_line": 82,
              "tags": {
                "PURPOSE": "Returns the semantic version of the migration plugin.",
                "PRE": "None.",
                "POST": "Returns \"1.0.0\".",
                "RETURN": "str"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "ui_route",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 85,
              "end_line": 93,
              "tags": {
                "PURPOSE": "Returns the frontend routing anchor for the plugin.",
                "PRE": "None.",
                "POST": "Returns \"/migration\".",
                "RETURN": "str"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_schema",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 95,
              "end_line": 147,
              "tags": {
                "PURPOSE": "Generates the JSON Schema for the plugin execution form dynamically.",
                "PRE": "ConfigManager is accessible and environments are defined.",
                "POST": "Returns a JSON Schema dict matching current system environments.",
                "RETURN": "Dict[str, Any]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "execute",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 149,
              "end_line": 382,
              "tags": {
                "PURPOSE": "Orchestrates the dashboard migration pipeline including extraction, AST mutation, and ingestion.",
                "PARAM": "context (Optional[TaskContext]) - Dependency injected TaskContext for IO tracing.",
                "PRE": "Source and target environments must resolve. Matching dashboards must exist.",
                "POST": "Dashboard ZIP bundles are transformed and imported. ID mappings are synchronized.",
                "SIDE_EFFECT": "Creates temp files, mutates target Superset state, blocks on user input (passwords/mappings).",
                "TEST_CONTRACT": "Dict[str, Any] -> Dict[str, Any]",
                "TEST_SCENARIO": "empty_selection -> Returns NO_MATCHES gracefully when regex finds zero dashboards.",
                "TEST_EDGE": "target_api_timeout -> [Dashboard added to failed_dashboards, task concludes with PARTIAL_SUCCESS]"
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": false,
            "issues": [
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing Mandatory Tag: @RELATION (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing Mandatory Tag: @INVARIANT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              },
              {
                "message": "Missing @INVARIANT tag (required for complexity 5)",
                "severity": "ERROR",
                "line_number": 27
              }
            ],
            "score": 0.0
          }
        }
      ],
      "compliance": {
        "valid": false,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @PRE (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @POST (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @SIDE_EFFECT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Missing Mandatory Tag: @DATA_CONTRACT (required for complexity 5)",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "ERROR",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 384 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "src.plugins",
      "type": "Package",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Plugin package root for dynamic discovery and runtime imports."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "schedule_dashboard_validation",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 12,
      "end_line": 42,
      "tags": {
        "PURPOSE": "Schedules a recurring dashboard validation task.",
        "PARAM": "params (Dict[str, Any]) - Task parameters (environment_id, provider_id).",
        "SIDE_EFFECT": "Adds a job to the scheduler service."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "_parse_cron",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 44,
      "end_line": 60,
      "tags": {
        "PURPOSE": "Basic cron parser placeholder.",
        "PARAM": "cron (str) - Cron expression.",
        "RETURN": "Dict[str, str] - Parsed cron parts."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "scheduler",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 62,
      "tags": {
        "PURPOSE": "Auto-generated module for backend/src/plugins/llm_analysis/scheduler.py",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "job_func",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 25,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "LLMProviderType",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 12,
      "end_line": 18,
      "tags": {
        "PURPOSE": "Enum for supported LLM providers."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "LLMProviderConfig",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 20,
      "end_line": 30,
      "tags": {
        "PURPOSE": "Configuration for an LLM provider."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ValidationStatus",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 32,
      "end_line": 39,
      "tags": {
        "PURPOSE": "Enum for dashboard validation status."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "DetectedIssue",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 41,
      "end_line": 47,
      "tags": {
        "PURPOSE": "Model for a single issue detected during validation."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "ValidationResult",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 49,
      "end_line": 60,
      "tags": {
        "PURPOSE": "Model for dashboard validation result."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "_is_masked_or_invalid_api_key",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 34,
      "end_line": 46,
      "tags": {
        "PURPOSE": "Guards against placeholder or malformed API keys in runtime.",
        "PRE": "value may be None.",
        "POST": "Returns True when value cannot be used for authenticated provider calls."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "_json_safe_value",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 48,
      "end_line": 60,
      "tags": {
        "PURPOSE": "Recursively normalize payload values for JSON serialization.",
        "PRE": "value may be nested dict/list with datetime values.",
        "POST": "datetime values are converted to ISO strings."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "DashboardValidationPlugin",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 62,
      "end_line": 323,
      "tags": {
        "PURPOSE": "Plugin for automated dashboard health analysis using LLMs."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "backend.src.core.plugin_base.PluginBase"
        }
      ],
      "children": [
        {
          "name": "DashboardValidationPlugin.execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 93,
          "end_line": 322,
          "tags": {
            "PURPOSE": "Executes the dashboard validation task with TaskContext support.",
            "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.",
            "PRE": "params contains dashboard_id, environment_id, and provider_id.",
            "POST": "Returns a dictionary with validation results and persists them to the database.",
            "SIDE_EFFECT": "Captures a screenshot, calls LLM API, and writes to the database."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "DocumentationPlugin",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 325,
      "end_line": 479,
      "tags": {
        "PURPOSE": "Plugin for automated dataset documentation using LLMs."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "backend.src.core.plugin_base.PluginBase"
        }
      ],
      "children": [
        {
          "name": "DocumentationPlugin.execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 356,
          "end_line": 478,
          "tags": {
            "PURPOSE": "Executes the dataset documentation task with TaskContext support.",
            "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.",
            "PRE": "params contains dataset_id, environment_id, and provider_id.",
            "POST": "Returns generated documentation and updates the dataset in Superset.",
            "SIDE_EFFECT": "Calls LLM API and updates dataset metadata in Superset."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "plugin",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 481,
      "tags": {
        "PURPOSE": "Auto-generated module for backend/src/plugins/llm_analysis/plugin.py",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 67,
          "end_line": 67,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "name",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 71,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "description",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "version",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_schema",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 330,
          "end_line": 330,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "name",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 334,
          "end_line": 334,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "description",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 338,
          "end_line": 338,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "version",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 342,
          "end_line": 342,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_schema",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 345,
          "end_line": 345,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 363,
          "end_line": 363,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 481 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "ScreenshotService",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 28,
      "end_line": 675,
      "tags": {
        "PURPOSE": "Handles capturing screenshots of Superset dashboards."
      },
      "relations": [],
      "children": [
        {
          "name": "ScreenshotService.__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Initializes the ScreenshotService with environment configuration.",
            "PRE": "env is a valid Environment object."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScreenshotService._find_first_visible_locator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Resolve the first visible locator from multiple Playwright locator strategies.",
            "PRE": "candidates is a non-empty list of locator-like objects.",
            "POST": "Returns a locator ready for interaction or None when nothing matches."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScreenshotService._iter_login_roots",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Enumerate page and child frames where login controls may be rendered.",
            "PRE": "page is a Playwright page-like object.",
            "POST": "Returns ordered roots starting with main page followed by frames."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScreenshotService._extract_hidden_login_fields",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 90,
          "tags": {
            "PURPOSE": "Collect hidden form fields required for direct login POST fallback.",
            "PRE": "Login page is loaded.",
            "POST": "Returns hidden input name/value mapping aggregated from page and child frames."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScreenshotService._extract_csrf_token",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 92,
          "end_line": 99,
          "tags": {
            "PURPOSE": "Resolve CSRF token value from main page or embedded login frame.",
            "PRE": "Login page is loaded.",
            "POST": "Returns first non-empty csrf token or empty string."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScreenshotService._response_looks_like_login_page",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 101,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Detect when fallback login POST returned the login form again instead of an authenticated page.",
            "PRE": "response_text is normalized HTML or text from login POST response.",
            "POST": "Returns True when login-page markers dominate the response body."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScreenshotService._redirect_looks_authenticated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 120,
          "end_line": 129,
          "tags": {
            "PURPOSE": "Treat non-login redirects after form POST as successful authentication without waiting for redirect target.",
            "PRE": "redirect_location may be empty or relative.",
            "POST": "Returns True when redirect target does not point back to login flow."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScreenshotService._submit_login_via_form_post",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 191,
          "tags": {
            "PURPOSE": "Fallback login path that submits credentials directly with csrf token.",
            "PRE": "login_url is same-origin and csrf token can be read from DOM.",
            "POST": "Browser context receives authenticated cookies when login succeeds."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScreenshotService._find_login_field_locator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 193,
          "end_line": 231,
          "tags": {
            "PURPOSE": "Resolve login form input using semantic label text plus generic visible-input fallbacks.",
            "PRE": "field_name is `username` or `password`.",
            "POST": "Returns a locator for the corresponding input or None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScreenshotService._find_submit_locator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 233,
          "end_line": 251,
          "tags": {
            "PURPOSE": "Resolve login submit button from main page or embedded auth frame.",
            "PRE": "page is ready for login interaction.",
            "POST": "Returns visible submit locator or None."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScreenshotService._goto_resilient",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 253,
          "end_line": 272,
          "tags": {
            "PURPOSE": "Navigate without relying on networkidle for pages with long-polling or persistent requests.",
            "PRE": "page is a valid Playwright page and url is non-empty.",
            "POST": "Returns last navigation response or raises when both primary and fallback waits fail."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "ScreenshotService.capture_dashboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 274,
          "end_line": 674,
          "tags": {
            "PURPOSE": "Captures a full-page screenshot of a dashboard using Playwright and CDP.",
            "PRE": "dashboard_id is a valid string, output_path is a writable path.",
            "POST": "Returns True if screenshot is saved successfully.",
            "SIDE_EFFECT": "Launches a browser, performs UI login, switches tabs, and writes a PNG file.",
            "UX_STATE": "[Capturing] -> Executing CDP screenshot"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "LLMClient",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 677,
      "end_line": 951,
      "tags": {
        "PURPOSE": "Wrapper for LLM provider APIs."
      },
      "relations": [],
      "children": [
        {
          "name": "LLMClient.__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 680,
          "end_line": 720,
          "tags": {
            "PURPOSE": "Initializes the LLMClient with provider settings.",
            "PRE": "api_key, base_url, and default_model are non-empty strings."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LLMClient._supports_json_response_format",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 722,
          "end_line": 740,
          "tags": {
            "PURPOSE": "Detect whether provider/model is likely compatible with response_format=json_object.",
            "PRE": "Client initialized with base_url and default_model.",
            "POST": "Returns False for known-incompatible combinations to avoid avoidable 400 errors."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LLMClient.get_json_completion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 742,
          "end_line": 862,
          "tags": {
            "PURPOSE": "Helper to handle LLM calls with JSON mode and fallback parsing.",
            "PRE": "messages is a list of valid message dictionaries.",
            "POST": "Returns a parsed JSON dictionary.",
            "SIDE_EFFECT": "Calls external LLM API."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LLMClient.test_runtime_connection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 864,
          "end_line": 878,
          "tags": {
            "PURPOSE": "Validate provider credentials using the same chat completions transport as runtime analysis.",
            "PRE": "Client is initialized with provider credentials and default_model.",
            "POST": "Returns lightweight JSON payload when runtime auth/model path is valid.",
            "SIDE_EFFECT": "Calls external LLM API."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "LLMClient.analyze_dashboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 880,
          "end_line": 950,
          "tags": {
            "PURPOSE": "Sends dashboard data (screenshot + logs) to LLM for health analysis.",
            "PRE": "screenshot_path exists, logs is a list of strings.",
            "POST": "Returns a structured analysis dictionary (status, summary, issues).",
            "SIDE_EFFECT": "Reads screenshot file and calls external LLM API."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "service",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 953,
      "tags": {
        "PURPOSE": "Auto-generated module for backend/src/plugins/llm_analysis/service.py",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 34,
          "end_line": 34,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_find_first_visible_locator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 42,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_iter_login_roots",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_hidden_login_fields",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 75,
          "end_line": 75,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_extract_csrf_token",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_response_looks_like_login_page",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 105,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_redirect_looks_authenticated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_submit_login_via_form_post",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 135,
          "end_line": 135,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_find_login_field_locator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 197,
          "end_line": 197,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_find_submit_locator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 237,
          "end_line": 237,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_goto_resilient",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 257,
          "end_line": 257,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "capture_dashboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 283,
          "end_line": 283,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "switch_tabs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 514,
          "end_line": 514,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 683,
          "end_line": 683,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_supports_json_response_format",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 726,
          "end_line": 726,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_should_retry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 747,
          "end_line": 747,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_json_completion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 761,
          "end_line": 761,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_runtime_connection",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 869,
          "end_line": 869,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "analyze_dashboard",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 885,
          "end_line": 885,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 953 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "TestService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 70,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, llm-analysis, fallback, provider-error, unknown-status",
        "PURPOSE": "Verify LLM analysis transport/provider failures do not masquerade as dashboard FAIL results."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_test_runtime_connection_uses_json_completion_transport",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 13,
          "end_line": 39,
          "tags": {
            "PURPOSE": "Provider self-test must exercise the same chat completion transport as runtime analysis.",
            "PRE": "get_json_completion is available on initialized client.",
            "POST": "Self-test forwards a lightweight user message into get_json_completion and returns its payload."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_analyze_dashboard_provider_error_maps_to_unknown",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 42,
          "end_line": 69,
          "tags": {
            "PURPOSE": "Infrastructure/provider failures must produce UNKNOWN analysis status rather than FAIL.",
            "PRE": "LLMClient.get_json_completion raises provider/auth exception.",
            "POST": "Returned payload uses status=UNKNOWN and issue severity UNKNOWN."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_fake_get_json_completion",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_raise_provider_error",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "TestClientHeaders",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 32,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, llm-client, openrouter, headers",
        "PURPOSE": "Verify OpenRouter client initialization includes provider-specific headers."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_openrouter_client_includes_referer_and_title_headers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 11,
          "end_line": 31,
          "tags": {
            "PURPOSE": "OpenRouter requests should carry site/app attribution headers for compatibility.",
            "PRE": "Client is initialized for OPENROUTER provider.",
            "POST": "Async client headers include Authorization, HTTP-Referer, and X-Title."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestClientHeaders"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "TestScreenshotService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 404,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, screenshot-service, navigation, timeout-regression",
        "PURPOSE": "Protect dashboard screenshot navigation from brittle networkidle waits."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "src.plugins.llm_analysis.service.ScreenshotService"
        }
      ],
      "children": [
        {
          "name": "test_iter_login_roots_includes_child_frames",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 12,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Login discovery must search embedded auth frames, not only the main page.",
            "PRE": "Page exposes child frames list.",
            "POST": "Returned roots include page plus child frames in order."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestScreenshotService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_response_looks_like_login_page_detects_login_markup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 31,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Direct login fallback must reject responses that render the login screen again.",
            "PRE": "Response body contains stable login-page markers.",
            "POST": "Helper returns True so caller treats fallback as failed authentication."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestScreenshotService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_find_first_visible_locator_skips_hidden_first_match",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Locator helper must not reject a selector collection just because its first element is hidden.",
            "PRE": "First matched element is hidden and second matched element is visible.",
            "POST": "Helper returns the second visible candidate."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestScreenshotService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_submit_login_via_form_post_uses_browser_context_request",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 99,
          "end_line": 207,
          "tags": {
            "PURPOSE": "Fallback login must submit hidden fields and credentials through the context request cookie jar.",
            "PRE": "Login DOM exposes csrf hidden field and request context returns authenticated HTML.",
            "POST": "Helper returns True and request payload contains csrf_token plus credentials plus request options."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestScreenshotService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_submit_login_via_form_post_accepts_authenticated_redirect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 210,
          "end_line": 282,
          "tags": {
            "PURPOSE": "Fallback login must treat non-login 302 redirect as success without waiting for redirect target.",
            "PRE": "Request response is 302 with Location outside login path.",
            "POST": "Helper returns True."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestScreenshotService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_submit_login_via_form_post_rejects_login_markup_response",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 285,
          "end_line": 365,
          "tags": {
            "PURPOSE": "Fallback login must fail when POST response still contains login form content.",
            "PRE": "Login DOM exposes csrf hidden field and request response renders login markup.",
            "POST": "Helper returns False."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestScreenshotService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_goto_resilient_falls_back_from_domcontentloaded_to_load",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 368,
          "end_line": 403,
          "tags": {
            "PURPOSE": "Pages with unstable primary wait must retry with fallback wait strategy.",
            "PRE": "First page.goto call raises; second succeeds.",
            "POST": "Helper returns second response and attempts both wait modes in order."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestScreenshotService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 66,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "is_visible",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 74,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "nth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 80,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_attribute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "input_value",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 114,
          "end_line": 114,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 121,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "nth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "text",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 131,
          "end_line": 131,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 135,
          "end_line": 135,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "post",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 138,
          "end_line": 138,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 160,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 164,
          "end_line": 164,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "locator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 168,
          "end_line": 168,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 218,
          "end_line": 218,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_attribute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 222,
          "end_line": 222,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "input_value",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 225,
          "end_line": 225,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 229,
          "end_line": 229,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 232,
          "end_line": 232,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "nth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 235,
          "end_line": 235,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "text",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 243,
          "end_line": 243,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "post",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 247,
          "end_line": 247,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 259,
          "end_line": 259,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 263,
          "end_line": 263,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "locator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 267,
          "end_line": 267,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 293,
          "end_line": 293,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_attribute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 297,
          "end_line": 297,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "input_value",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 300,
          "end_line": 300,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 304,
          "end_line": 304,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "count",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 307,
          "end_line": 307,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "nth",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 310,
          "end_line": 310,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "text",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 317,
          "end_line": 317,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "post",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 330,
          "end_line": 330,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 342,
          "end_line": 342,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 346,
          "end_line": 346,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "locator",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 350,
          "end_line": 350,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 376,
          "end_line": 376,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "goto",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 379,
          "end_line": 379,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @LAYER (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 404 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.4
      }
    },
    {
      "name": "StoragePlugin",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 391,
      "tags": {
        "SEMANTICS": "storage, files, filesystem, plugin",
        "PURPOSE": "Provides core filesystem operations for managing backups and repositories.",
        "LAYER": "App",
        "INVARIANT": "All file operations must be restricted to the configured storage root."
      },
      "relations": [
        {
          "type": "IMPLEMENTS",
          "target": "PluginBase"
        },
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.models.storage"
        },
        {
          "type": "USES",
          "target": "TaskContext"
        }
      ],
      "children": [
        {
          "name": "StoragePlugin",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 27,
          "end_line": 390,
          "tags": {
            "PURPOSE": "Implementation of the storage management plugin."
          },
          "relations": [],
          "children": [
            {
              "name": "__init__",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 34,
              "end_line": 41,
              "tags": {
                "PURPOSE": "Initializes the StoragePlugin and ensures required directories exist.",
                "PRE": "Configuration manager must be accessible.",
                "POST": "Storage root and category directories are created on disk."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 44,
              "end_line": 52,
              "tags": {
                "PURPOSE": "Returns the unique identifier for the storage plugin.",
                "PRE": "None.",
                "POST": "Returns the plugin ID string.",
                "RETURN": "str - \"storage-manager\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "name",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 55,
              "end_line": 63,
              "tags": {
                "PURPOSE": "Returns the human-readable name of the storage plugin.",
                "PRE": "None.",
                "POST": "Returns the plugin name string.",
                "RETURN": "str - \"Storage Manager\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "description",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 66,
              "end_line": 74,
              "tags": {
                "PURPOSE": "Returns a description of the storage plugin.",
                "PRE": "None.",
                "POST": "Returns the plugin description string.",
                "RETURN": "str - Plugin description."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "version",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 77,
              "end_line": 85,
              "tags": {
                "PURPOSE": "Returns the version of the storage plugin.",
                "PRE": "None.",
                "POST": "Returns the version string.",
                "RETURN": "str - \"1.0.0\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "ui_route",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 88,
              "end_line": 94,
              "tags": {
                "PURPOSE": "Returns the frontend route for the storage plugin.",
                "RETURN": "str - \"/tools/storage\""
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_schema",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 96,
              "end_line": 114,
              "tags": {
                "PURPOSE": "Returns the JSON schema for storage plugin parameters.",
                "PRE": "None.",
                "POST": "Returns a dictionary representing the JSON schema.",
                "RETURN": "Dict[str, Any] - JSON schema."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "execute",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 116,
              "end_line": 132,
              "tags": {
                "PURPOSE": "Executes storage-related tasks with TaskContext support.",
                "PARAM": "context (Optional[TaskContext]) - Task context for logging with source attribution.",
                "PRE": "params must match the plugin schema.",
                "POST": "Task is executed and logged."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_storage_root",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 134,
              "end_line": 154,
              "tags": {
                "PURPOSE": "Resolves the absolute path to the storage root.",
                "PRE": "Settings must define a storage root path.",
                "POST": "Returns a Path object representing the storage root."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "resolve_path",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 156,
              "end_line": 178,
              "tags": {
                "PURPOSE": "Resolves a dynamic path pattern using provided variables.",
                "PARAM": "variables (Dict[str, str]) - Variables to substitute in the pattern.",
                "PRE": "pattern must be a valid format string.",
                "POST": "Returns the resolved path string.",
                "RETURN": "str - The resolved path."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "ensure_directories",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 180,
              "end_line": 193,
              "tags": {
                "PURPOSE": "Creates the storage root and category subdirectories if they don't exist.",
                "PRE": "Storage root must be resolvable.",
                "POST": "Directories are created on the filesystem.",
                "SIDE_EFFECT": "Creates directories on the filesystem."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "validate_path",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 195,
              "end_line": 209,
              "tags": {
                "PURPOSE": "Prevents path traversal attacks by ensuring the path is within the storage root.",
                "PRE": "path must be a Path object.",
                "POST": "Returns the resolved absolute path if valid, otherwise raises ValueError."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "list_files",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 211,
              "end_line": 307,
              "tags": {
                "PURPOSE": "Lists all files and directories in a specific category and subpath.",
                "PARAM": "recursive (bool) - Whether to scan nested subdirectories recursively.",
                "PRE": "Storage root must exist.",
                "POST": "Returns a list of StoredFile objects.",
                "RETURN": "List[StoredFile] - List of file and directory metadata objects."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "save_file",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 309,
              "end_line": 341,
              "tags": {
                "PURPOSE": "Saves an uploaded file to the specified category and optional subpath.",
                "PARAM": "subpath (Optional[str]) - The target subpath.",
                "PRE": "file must be a valid UploadFile; category must be valid.",
                "POST": "File is written to disk and metadata is returned.",
                "RETURN": "StoredFile - Metadata of the saved file.",
                "SIDE_EFFECT": "Writes file to disk."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "delete_file",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 343,
              "end_line": 367,
              "tags": {
                "PURPOSE": "Deletes a file or directory from the specified category and path.",
                "PARAM": "path (str) - The relative path of the file or directory.",
                "PRE": "path must belong to the specified category and exist on disk.",
                "POST": "The file or directory is removed from disk.",
                "SIDE_EFFECT": "Removes item from disk."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "get_file_path",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 369,
              "end_line": 388,
              "tags": {
                "PURPOSE": "Returns the absolute path of a file for download.",
                "PARAM": "path (str) - The relative path of the file.",
                "PRE": "path must belong to the specified category and be a file.",
                "POST": "Returns the absolute Path to the file.",
                "RETURN": "Path - Absolute path to the file."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: USES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 391 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "GitLLMExtension",
      "type": "Class",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 14,
      "end_line": 62,
      "tags": {
        "PURPOSE": "Provides LLM capabilities to the Git plugin."
      },
      "relations": [],
      "children": [
        {
          "name": "suggest_commit_message",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 61,
          "tags": {
            "PURPOSE": "Generates a suggested commit message based on a diff and history.",
            "PARAM": "history (List[str]) - Recent commit messages for context.",
            "RETURN": "str - The suggested commit message."
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "llm_extension",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 64,
      "tags": {
        "PURPOSE": "Auto-generated module for backend/src/plugins/git/llm_extension.py",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 17,
          "end_line": 17,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "src.plugins.git",
      "type": "Package",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 3,
      "tags": {
        "PURPOSE": "Git plugin extension package root."
      },
      "relations": [],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_task_persistence",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 433,
      "tags": {
        "SEMANTICS": "test, task, persistence, unit_test",
        "PURPOSE": "Unit tests for TaskPersistenceService.",
        "LAYER": "Test",
        "COMPLEXITY": "5",
        "TEST_DATA": "valid_task -> {\"id\": \"test-uuid-1\", \"plugin_id\": \"backup\", \"status\": \"PENDING\"}"
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "TestTaskPersistenceHelpers",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 23,
          "end_line": 110,
          "tags": {
            "PURPOSE": "Test suite for TaskPersistenceService static helper methods.",
            "COMPLEXITY": "5"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_task_persistence"
            }
          ],
          "children": [
            {
              "name": "test_json_load_if_needed_none",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 29,
              "end_line": 33,
              "tags": {
                "PURPOSE": "Test _json_load_if_needed with None input."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_json_load_if_needed_dict",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 35,
              "end_line": 40,
              "tags": {
                "PURPOSE": "Test _json_load_if_needed with dict input."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_json_load_if_needed_list",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 42,
              "end_line": 47,
              "tags": {
                "PURPOSE": "Test _json_load_if_needed with list input."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_json_load_if_needed_json_string",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 49,
              "end_line": 54,
              "tags": {
                "PURPOSE": "Test _json_load_if_needed with JSON string."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_json_load_if_needed_empty_string",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 56,
              "end_line": 62,
              "tags": {
                "PURPOSE": "Test _json_load_if_needed with empty/null strings."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_json_load_if_needed_plain_string",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 64,
              "end_line": 69,
              "tags": {
                "PURPOSE": "Test _json_load_if_needed with non-JSON string."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_json_load_if_needed_integer",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 71,
              "end_line": 75,
              "tags": {
                "PURPOSE": "Test _json_load_if_needed with integer."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_parse_datetime_none",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 77,
              "end_line": 81,
              "tags": {
                "PURPOSE": "Test _parse_datetime with None."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_parse_datetime_datetime_object",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 83,
              "end_line": 88,
              "tags": {
                "PURPOSE": "Test _parse_datetime with datetime object."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_parse_datetime_iso_string",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 90,
              "end_line": 96,
              "tags": {
                "PURPOSE": "Test _parse_datetime with ISO string."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_parse_datetime_invalid_string",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 98,
              "end_line": 102,
              "tags": {
                "PURPOSE": "Test _parse_datetime with invalid string."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_parse_datetime_integer",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 104,
              "end_line": 108,
              "tags": {
                "PURPOSE": "Test _parse_datetime with non-string, non-datetime."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "TestTaskPersistenceService",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 113,
          "end_line": 432,
          "tags": {
            "PURPOSE": "Test suite for TaskPersistenceService CRUD operations.",
            "COMPLEXITY": "5",
            "TEST_DATA": "valid_task -> {\"id\": \"test-uuid-1\", \"plugin_id\": \"backup\", \"status\": \"PENDING\"}"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_task_persistence"
            }
          ],
          "children": [
            {
              "name": "setup_class",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 120,
              "end_line": 129,
              "tags": {
                "PURPOSE": "Setup in-memory test database."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "teardown_class",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 131,
              "end_line": 136,
              "tags": {
                "PURPOSE": "Dispose of test database."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "setup_method",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 138,
              "end_line": 146,
              "tags": {
                "PURPOSE": "Clean task_records table before each test."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_persist_task_new",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 166,
              "end_line": 184,
              "tags": {
                "PURPOSE": "Test persisting a new task creates a record.",
                "PRE": "Empty database.",
                "POST": "TaskRecord exists in database."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_persist_task_update",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 186,
              "end_line": 210,
              "tags": {
                "PURPOSE": "Test updating an existing task.",
                "PRE": "Task already persisted.",
                "POST": "Task record updated with new status."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_persist_task_with_logs",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 212,
              "end_line": 233,
              "tags": {
                "PURPOSE": "Test persisting a task with log entries.",
                "PRE": "Task has logs attached.",
                "POST": "Logs serialized as JSON in task record."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_persist_task_failed_extracts_error",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 235,
              "end_line": 257,
              "tags": {
                "PURPOSE": "Test that FAILED task extracts last error message.",
                "PRE": "Task has FAILED status with ERROR logs.",
                "POST": "record.error contains last error message."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_persist_tasks_batch",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 259,
              "end_line": 278,
              "tags": {
                "PURPOSE": "Test persisting multiple tasks.",
                "PRE": "Empty database.",
                "POST": "All task records created."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_load_tasks",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 280,
              "end_line": 306,
              "tags": {
                "PURPOSE": "Test loading tasks from database.",
                "PRE": "Tasks persisted.",
                "POST": "Returns list of Task objects with correct data."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_load_tasks_with_status_filter",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 308,
              "end_line": 329,
              "tags": {
                "PURPOSE": "Test loading tasks filtered by status.",
                "PRE": "Tasks with different statuses persisted.",
                "POST": "Returns only tasks matching status filter."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_load_tasks_with_limit",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 331,
              "end_line": 349,
              "tags": {
                "PURPOSE": "Test loading tasks with limit.",
                "PRE": "Multiple tasks persisted.",
                "POST": "Returns at most `limit` tasks."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_delete_tasks",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 351,
              "end_line": 375,
              "tags": {
                "PURPOSE": "Test deleting tasks by ID list.",
                "PRE": "Tasks persisted.",
                "POST": "Specified tasks deleted, others remain."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_delete_tasks_empty_list",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 377,
              "end_line": 385,
              "tags": {
                "PURPOSE": "Test deleting with empty list (no-op).",
                "PRE": "None.",
                "POST": "No error, no changes."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_persist_task_with_datetime_in_params",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 387,
              "end_line": 406,
              "tags": {
                "PURPOSE": "Test json_serializable handles datetime in params.",
                "PRE": "Task params contain datetime values.",
                "POST": "Params serialized correctly."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_persist_task_resolves_environment_slug_to_existing_id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 408,
              "end_line": 430,
              "tags": {
                "PURPOSE": "Ensure slug-like environment token resolves to environments.id before persisting task.",
                "PRE": "environments table contains env with name convertible to provided slug token.",
                "POST": "task_records.environment_id stores actual environments.id and does not violate FK."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "_patched",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 148,
          "end_line": 148,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 155,
          "end_line": 155,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 433 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.625
      }
    },
    {
      "name": "test_environment_model",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 4,
      "end_line": 21,
      "tags": {
        "PURPOSE": "Tests that Environment model correctly stores values.",
        "PRE": "Environment class is available.",
        "POST": "Values are verified."
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "Environment"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 4
          }
        ],
        "score": 0.85
      }
    },
    {
      "name": "test_task_manager",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 503,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "task-manager, lifecycle, CRUD, log-buffer, filtering, tests",
        "PURPOSE": "Unit tests for TaskManager lifecycle, CRUD, log buffering, and filtering.",
        "LAYER": "Core",
        "INVARIANT": "TaskManager state changes are deterministic and testable with mocked dependencies."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_make_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 55,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_task_manager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_cleanup_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 57,
          "end_line": 65,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_task_manager"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_init_creates_empty_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_init_loads_persisted_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 77,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_init_starts_flusher_thread",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 84,
          "end_line": 84,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_task_returns_none_for_missing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 95,
          "end_line": 95,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_task_returns_existing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 102,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_all_tasks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_tasks_with_status_filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_tasks_with_plugin_filter",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 143,
          "end_line": 143,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_tasks_with_pagination",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 160,
          "end_line": 160,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_tasks_completed_only",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 177,
          "end_line": 177,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_task_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 206,
          "end_line": 206,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_task_unknown_plugin_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 218,
          "end_line": 218,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_task_invalid_params_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 228,
          "end_line": 228,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_add_log_appends_to_task_and_buffer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 240,
          "end_line": 240,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_add_log_skips_nonexistent_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 256,
          "end_line": 256,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_flush_logs_writes_to_persistence",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 264,
          "end_line": 264,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_flush_task_logs_writes_single_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 282,
          "end_line": 282,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_flush_logs_requeues_on_failure",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 298,
          "end_line": 298,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_clear_all_non_active",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 319,
          "end_line": 319,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_clear_by_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 342,
          "end_line": 342,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_clear_preserves_awaiting_input",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 360,
          "end_line": 360,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_subscribe_creates_queue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 379,
          "end_line": 379,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_unsubscribe_removes_queue",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 390,
          "end_line": 390,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_multiple_subscribers",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 400,
          "end_line": 400,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_await_input_sets_status",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 416,
          "end_line": 416,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_await_input_not_running_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 437,
          "end_line": 437,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_await_input_nonexistent_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 450,
          "end_line": 450,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_resume_with_password",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 458,
          "end_line": 458,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_resume_not_awaiting_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 477,
          "end_line": 477,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_resume_empty_passwords_raises",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 490,
          "end_line": 490,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 503 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.625
      }
    },
    {
      "name": "TestDashboardsApi",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 586,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Comprehensive contract-driven tests for Dashboard Hub API",
        "LAYER": "Domain (Tests)",
        "SEMANTICS": "tests, dashboards, api, contract, remediation"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "src.api.routes.dashboards"
        }
      ],
      "children": [
        {
          "name": "test_get_dashboards_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 76,
          "end_line": 115,
          "tags": {
            "TEST_FIXTURE": "expected_count: 1"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_with_search",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 139,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_empty",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 142,
          "end_line": 161,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_superset_failure",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 164,
          "end_line": 181,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 184,
          "end_line": 193,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboards_invalid_pagination",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 196,
          "end_line": 216,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_database_mappings_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 219,
          "end_line": 239,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_database_mappings_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 242,
          "end_line": 254,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboard_detail_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 257,
          "end_line": 284,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboard_detail_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 287,
          "end_line": 297,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboard_tasks_history_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 300,
          "end_line": 323,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboard_tasks_history_sorting",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 326,
          "end_line": 369,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboard_thumbnail_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 372,
          "end_line": 395,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboard_thumbnail_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 398,
          "end_line": 406,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_dashboard_thumbnail_202",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 409,
          "end_line": 437,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_migrate_dashboards_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 440,
          "end_line": 458,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_migrate_dashboards_pre_checks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 461,
          "end_line": 473,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_migrate_dashboards_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 476,
          "end_line": 491,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_backup_dashboards_success",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 494,
          "end_line": 509,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_backup_dashboards_pre_checks",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 512,
          "end_line": 521,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_backup_dashboards_env_not_found",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 524,
          "end_line": 536,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_backup_dashboards_with_schedule",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 539,
          "end_line": 562,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_task_matches_dashboard_logic",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 567,
          "end_line": 585,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDashboardsApi"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mock_deps",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 586 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.625
      }
    },
    {
      "name": "TestResourceHubs",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 310,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, resource-hubs, dashboards, datasets, pagination, api",
        "PURPOSE": "Contract tests for resource hub dashboards/datasets listing and pagination boundary validation.",
        "LAYER": "Domain (Tests)"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "DashboardsApi"
        },
        {
          "type": "DEPENDS_ON",
          "target": "DatasetsApi"
        }
      ],
      "children": [
        {
          "name": "test_dashboards_api",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 141,
          "tags": {
            "PURPOSE": "Verify GET /api/dashboards contract compliance",
            "TEST_CONTRACT": "dashboards_query -> dashboards payload or not_found response",
            "TEST_SCENARIO": "dashboards_search_filters_results -> Search narrows payload to matching dashboard title.",
            "TEST_INVARIANT": "dashboards_route_contract_stays_observable -> VERIFIED_BY: [dashboards_env_found_returns_payload, dashboards_unknown_env_returns_not_found, dashboards_search_filters_results]"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceHubs"
            }
          ],
          "children": [
            {
              "name": "mock_deps",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 31,
              "end_line": 99,
              "tags": {
                "PURPOSE": "Provide dependency override fixture for resource hub route tests.",
                "TEST_FIXTURE": "resource_hub_overrides -> INLINE_JSON",
                "INVARIANT": "unconstrained mock \u2014 no spec= enforced; attribute typos will silently pass"
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "TestResourceHubs"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_dashboards_success",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 102,
              "end_line": 115,
              "tags": {
                "PURPOSE": "Verify dashboards endpoint returns 200 with expected dashboard payload fields."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_dashboards_api"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_dashboards_not_found",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 118,
              "end_line": 126,
              "tags": {
                "PURPOSE": "Verify dashboards endpoint returns 404 for unknown environment identifier."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_dashboards_api"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_dashboards_search",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 129,
              "end_line": 140,
              "tags": {
                "PURPOSE": "Verify dashboards endpoint search filter returns matching subset."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_dashboards_api"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_datasets_api",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 144,
          "end_line": 244,
          "tags": {
            "PURPOSE": "Verify GET /api/datasets contract compliance",
            "TEST_CONTRACT": "datasets_query -> datasets payload or error response",
            "TEST_SCENARIO": "datasets_service_failure_returns_503 -> Backend fetch failure surfaces as HTTP 503.",
            "TEST_INVARIANT": "datasets_route_contract_stays_observable -> VERIFIED_BY: [datasets_env_found_returns_payload, datasets_unknown_env_returns_not_found, datasets_search_filters_results, datasets_service_failure_returns_503]"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceHubs"
            }
          ],
          "children": [
            {
              "name": "test_get_datasets_success",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 155,
              "end_line": 181,
              "tags": {
                "PURPOSE": "Verify datasets endpoint returns 200 with mapped fields payload."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_datasets_api"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_datasets_not_found",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 184,
              "end_line": 192,
              "tags": {
                "PURPOSE": "Verify datasets endpoint returns 404 for unknown environment identifier."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_datasets_api"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_datasets_search",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 195,
              "end_line": 227,
              "tags": {
                "PURPOSE": "Verify datasets endpoint search filter returns matching dataset subset."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_datasets_api"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_datasets_service_failure",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 230,
              "end_line": 243,
              "tags": {
                "PURPOSE": "Verify datasets endpoint surfaces backend fetch failure as HTTP 503."
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_datasets_api"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_pagination_boundaries",
          "type": "Block",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 247,
          "end_line": 309,
          "tags": {
            "PURPOSE": "Verify pagination validation for GET endpoints",
            "TEST_CONTRACT": "pagination_query -> validation error response",
            "TEST_SCENARIO": "datasets_oversize_page_rejected -> page_size=101 returns HTTP 400.",
            "TEST_EDGE": "external_fail -> Validation failure returns HTTP 400 without partial payload.",
            "TEST_INVARIANT": "pagination_limits_apply_to_both_routes -> VERIFIED_BY: [dashboards_zero_page_rejected, dashboards_oversize_page_rejected, datasets_zero_page_rejected, datasets_oversize_page_rejected]"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestResourceHubs"
            }
          ],
          "children": [
            {
              "name": "test_get_dashboards_pagination_zero_page",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 261,
              "end_line": 271,
              "tags": {
                "PURPOSE": "Verify dashboards endpoint rejects page=0 with HTTP 400 validation error.",
                "TEST_EDGE": "pagination_zero_page -> {page: 0, status: 400}"
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_pagination_boundaries"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_dashboards_pagination_oversize",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 274,
              "end_line": 284,
              "tags": {
                "PURPOSE": "Verify dashboards endpoint rejects oversized page_size with HTTP 400.",
                "TEST_EDGE": "pagination_oversize -> {page_size: 101, status: 400}"
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_pagination_boundaries"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_datasets_pagination_zero_page",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 287,
              "end_line": 296,
              "tags": {
                "PURPOSE": "Verify datasets endpoint rejects page=0 with HTTP 400.",
                "TEST_EDGE": "pagination_zero_page_datasets -> {page: 0, status: 400}"
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_pagination_boundaries"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_datasets_pagination_oversize",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 299,
              "end_line": 308,
              "tags": {
                "PURPOSE": "Verify datasets endpoint rejects oversized page_size with HTTP 400.",
                "TEST_EDGE": "pagination_oversize_datasets -> {page_size: 101, status: 400}"
              },
              "relations": [
                {
                  "type": "BINDS_TO",
                  "target": "test_pagination_boundaries"
                }
              ],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Fractal limit warning: Module length is 310 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "test_smoke_plugins",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 64,
      "tags": {
        "PURPOSE": "Auto-generated module for backend/tests/test_smoke_plugins.py",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "test_plugins_load_successfully",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 18,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_task_manager_initializes_with_plugins",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TestLogger",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 230,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "logging, tests, belief_state",
        "PURPOSE": "Unit tests for the custom logger formatters and configuration context manager.",
        "LAYER": "Logging (Tests)",
        "INVARIANT": "All required log statements must correctly check the threshold."
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "src/core/logger.py"
        }
      ],
      "children": [
        {
          "name": "test_belief_scope_logs_entry_action_exit_at_debug",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 50,
          "tags": {
            "PURPOSE": "Test that belief_scope generates [ID][Entry], [ID][Action], and [ID][Exit] logs at DEBUG level.",
            "PRE": "belief_scope is available. caplog fixture is used. Logger configured to DEBUG.",
            "POST": "Logs are verified to contain Entry, Action, and Exit tags at DEBUG level."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestLogger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_belief_scope_error_handling",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Test that belief_scope logs Coherence:Failed on exception.",
            "PRE": "belief_scope is available. caplog fixture is used. Logger configured to DEBUG.",
            "POST": "Logs are verified to contain Coherence:Failed tag."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestLogger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_belief_scope_success_coherence",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Test that belief_scope logs Coherence:OK on success.",
            "PRE": "belief_scope is available. caplog fixture is used. Logger configured to DEBUG.",
            "POST": "Logs are verified to contain Coherence:OK tag."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestLogger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_belief_scope_not_visible_at_info",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 136,
          "tags": {
            "PURPOSE": "Test that belief_scope Entry/Exit/Coherence logs are NOT visible at INFO level.",
            "PRE": "belief_scope is available. caplog fixture is used.",
            "POST": "Entry/Exit/Coherence logs are not captured at INFO level."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestLogger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_task_log_level_default",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 139,
          "end_line": 148,
          "tags": {
            "PURPOSE": "Test that default task log level is INFO.",
            "PRE": "None.",
            "POST": "Default level is INFO."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestLogger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_should_log_task_level",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 151,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Test that should_log_task_level correctly filters log levels.",
            "PRE": "None.",
            "POST": "Filtering works correctly for all level combinations."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestLogger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_configure_logger_task_log_level",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 166,
          "end_line": 191,
          "tags": {
            "PURPOSE": "Test that configure_logger updates task_log_level.",
            "PRE": "LoggingConfig is available.",
            "POST": "task_log_level is updated correctly."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestLogger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_enable_belief_state_flag",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 194,
          "end_line": 229,
          "tags": {
            "PURPOSE": "Test that enable_belief_state flag controls belief_scope logging.",
            "PRE": "LoggingConfig is available. caplog fixture is used.",
            "POST": "belief_scope logs are controlled by the flag."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestLogger"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestAuth",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 332,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Covers authentication service/repository behavior and auth bootstrap helpers.",
        "LAYER": "Test"
      },
      "relations": [
        {
          "type": "TESTS",
          "target": "AuthService"
        },
        {
          "type": "TESTS",
          "target": "AuthRepository"
        },
        {
          "type": "TESTS",
          "target": "create_admin"
        },
        {
          "type": "TESTS",
          "target": "ensure_encryption_key"
        }
      ],
      "children": [
        {
          "name": "test_create_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 64,
          "end_line": 85,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_authenticate_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 88,
          "end_line": 116,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 119,
          "end_line": 140,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_role_permission_association",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 143,
          "end_line": 165,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_user_role_association",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 168,
          "end_line": 192,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_ad_group_mapping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 195,
          "end_line": 218,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_admin_creates_user_with_optional_email",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 221,
          "end_line": 238,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_admin_is_idempotent_for_existing_user",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 241,
          "end_line": 263,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_ensure_encryption_key_generates_backend_env_file",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 266,
          "end_line": 284,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_ensure_encryption_key_reuses_existing_env_file_value",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 287,
          "end_line": 307,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_ensure_encryption_key_prefers_process_environment",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 310,
          "end_line": 324,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestAuth"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "db_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "auth_service",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 55,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "auth_repo",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 60,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "verify_fernet_key",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 327,
          "end_line": 327,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: TESTS. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 332 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.0
      }
    },
    {
      "name": "test_log_persistence",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 339,
      "tags": {
        "SEMANTICS": "test, log, persistence, unit_test",
        "PURPOSE": "Unit tests for TaskLogPersistenceService.",
        "LAYER": "Test",
        "COMPLEXITY": "5"
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "TestLogPersistence",
          "type": "Class",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 20,
          "end_line": 338,
          "tags": {
            "PURPOSE": "Test suite for TaskLogPersistenceService.",
            "COMPLEXITY": "5",
            "TEST_DATA": "log_entry -> {\"task_id\": \"test-task-1\", \"level\": \"INFO\", \"source\": \"test_source\", \"message\": \"Test message\"}"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_log_persistence"
            }
          ],
          "children": [
            {
              "name": "setup_class",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 27,
              "end_line": 38,
              "tags": {
                "PURPOSE": "Setup test database and service instance.",
                "PRE": "None.",
                "POST": "In-memory database and service instance created."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "teardown_class",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 40,
              "end_line": 48,
              "tags": {
                "PURPOSE": "Clean up test database.",
                "PRE": "None.",
                "POST": "Database disposed."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "setup_method",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 50,
              "end_line": 61,
              "tags": {
                "PURPOSE": "Setup for each test method \u2014 clean task_logs table.",
                "PRE": "None.",
                "POST": "task_logs table is empty."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_add_logs_single",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 70,
              "end_line": 96,
              "tags": {
                "PURPOSE": "Test adding a single log entry.",
                "PRE": "Service and session initialized.",
                "POST": "Log entry persisted to database."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_add_logs_batch",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 98,
              "end_line": 119,
              "tags": {
                "PURPOSE": "Test adding multiple log entries in batch.",
                "PRE": "Service and session initialized.",
                "POST": "All log entries persisted to database."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_add_logs_empty",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 121,
              "end_line": 135,
              "tags": {
                "PURPOSE": "Test adding empty log list (should be no-op).",
                "PRE": "Service initialized.",
                "POST": "No logs added."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_logs_by_task_id",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 137,
              "end_line": 155,
              "tags": {
                "PURPOSE": "Test retrieving logs by task ID.",
                "PRE": "Service and session initialized, logs exist.",
                "POST": "Returns logs for the specified task."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_logs_with_filters",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 157,
              "end_line": 182,
              "tags": {
                "PURPOSE": "Test retrieving logs with level and source filters.",
                "PRE": "Service and session initialized, logs exist.",
                "POST": "Returns filtered logs."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_logs_with_pagination",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 184,
              "end_line": 204,
              "tags": {
                "PURPOSE": "Test retrieving logs with pagination.",
                "PRE": "Service and session initialized, logs exist.",
                "POST": "Returns paginated logs."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_logs_with_search",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 206,
              "end_line": 224,
              "tags": {
                "PURPOSE": "Test retrieving logs with search query.",
                "PRE": "Service and session initialized, logs exist.",
                "POST": "Returns logs matching search query."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_log_stats",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 226,
              "end_line": 251,
              "tags": {
                "PURPOSE": "Test retrieving log statistics.",
                "PRE": "Service and session initialized, logs exist.",
                "POST": "Returns LogStats model with counts by level and source."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_get_sources",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 253,
              "end_line": 274,
              "tags": {
                "PURPOSE": "Test retrieving unique log sources.",
                "PRE": "Service and session initialized, logs exist.",
                "POST": "Returns list of unique sources."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_delete_logs_for_task",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 276,
              "end_line": 302,
              "tags": {
                "PURPOSE": "Test deleting logs by task ID.",
                "PRE": "Service and session initialized, logs exist.",
                "POST": "Logs for the task are deleted."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_delete_logs_for_tasks",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 304,
              "end_line": 326,
              "tags": {
                "PURPOSE": "Test deleting logs for multiple tasks.",
                "PRE": "Service and session initialized, logs exist.",
                "POST": "Logs for all specified tasks are deleted."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            },
            {
              "name": "test_delete_logs_for_tasks_empty",
              "type": "Function",
              "complexity": 1,
              "tier": "TRIVIAL",
              "start_line": 328,
              "end_line": 336,
              "tags": {
                "PURPOSE": "Test deleting with empty list (no-op).",
                "PRE": "Service initialized.",
                "POST": "No error, no deletion."
              },
              "relations": [],
              "children": [],
              "compliance": {
                "valid": true,
                "issues": [],
                "score": 1.0
              }
            }
          ],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "_patched",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 63,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 339 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.625
      }
    },
    {
      "name": "test_clean_release_cli",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 346,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Smoke tests for the redesigned clean release CLI.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_cli_candidate_register_scaffold",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 47,
          "tags": {
            "PURPOSE": "Verify candidate-register command exits successfully for valid required arguments."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_clean_release_cli"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_cli_manifest_build_scaffold",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 50,
          "end_line": 99,
          "tags": {
            "PURPOSE": "Verify candidate-register/artifact-import/manifest-build smoke path succeeds end-to-end."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_clean_release_cli"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_cli_compliance_run_scaffold",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 210,
          "tags": {
            "PURPOSE": "Verify compliance run/status/violations/report commands complete for prepared candidate.",
            "INVARIANT": "SimpleNamespace substitutes for GlobalSettings \u2014 any field rename in GlobalSettings will silently not propagate here; re-verify on GlobalSettings schema changes."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_clean_release_cli"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_cli_release_gate_commands_scaffold",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 213,
          "end_line": 345,
          "tags": {
            "PURPOSE": "Verify approve/reject/publish/revoke release-gate commands execute with valid fixtures."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_clean_release_cli"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 346 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.4
      }
    },
    {
      "name": "TestCleanReleaseTui",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 247,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, tui, clean-release, curses",
        "PURPOSE": "Unit tests for the interactive curses TUI of the clean release process.",
        "LAYER": "Scripts",
        "INVARIANT": "TUI initializes, handles hotkeys (F5, F10) and safely falls back without TTY."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_headless_fallback",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 49,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseTui"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_tui_initial_render",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 52,
          "end_line": 86,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseTui"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_tui_run_checks_f5",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 89,
          "end_line": 125,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseTui"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_tui_exit_f10",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 146,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseTui"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_tui_clear_history_f7",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 149,
          "end_line": 174,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseTui"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_tui_real_mode_bootstrap_imports_artifacts_catalog",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 177,
          "end_line": 183,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestCleanReleaseTui"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "mock_stdscr",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 23,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "side_effect",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 107,
          "end_line": 107,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "test_clean_release_tui_v2",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 125,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Smoke tests for thin-client TUI action dispatch and blocked transition behavior.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_build_mock_stdscr",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 18,
          "end_line": 28,
          "tags": {
            "PURPOSE": "Build deterministic curses screen mock with default terminal geometry and exit key."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_clean_release_tui_v2"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_tui_f5_dispatches_run_action",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 52,
          "tags": {
            "PURPOSE": "Verify F5 key dispatch invokes run_checks exactly once before graceful exit."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_clean_release_tui_v2"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_tui_f5_run_smoke_reports_blocked_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 83,
          "tags": {
            "PURPOSE": "Verify blocked compliance state is surfaced after F5-triggered run action."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_clean_release_tui_v2"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_tui_non_tty_refuses_startup",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 86,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Verify non-TTY execution returns exit code 2 with actionable stderr guidance."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_clean_release_tui_v2"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_tui_f8_blocked_without_facade_binding",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 104,
          "end_line": 124,
          "tags": {
            "PURPOSE": "Verify F8 path reports disabled action instead of mutating hidden facade state."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_clean_release_tui_v2"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_set_blocked_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 70,
          "end_line": 70,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "TestGitServiceGiteaPr",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 107,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "tests, git, gitea, pull_request, fallback",
        "PURPOSE": "Validate Gitea PR creation fallback behavior when configured server URL is stale.",
        "LAYER": "Domain",
        "INVARIANT": "A 404 from primary Gitea URL retries once against remote-url host when different."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "test_derive_server_url_from_remote_strips_credentials",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Ensure helper returns host base URL and removes embedded credentials.",
            "PRE": "remote_url is an https URL with username/token.",
            "POST": "Result is scheme+host only."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitServiceGiteaPr"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_gitea_pull_request_retries_with_remote_host_on_404",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 68,
          "tags": {
            "PURPOSE": "Verify create_gitea_pull_request retries with remote URL host after primary 404.",
            "PRE": "primary server_url differs from remote_url host.",
            "POST": "Method returns success payload from fallback request."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitServiceGiteaPr"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_gitea_pull_request_returns_branch_error_when_target_missing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 71,
          "end_line": 105,
          "tags": {
            "PURPOSE": "Ensure Gitea 404 on PR creation is mapped to actionable target-branch validation error.",
            "PRE": "PR create call returns 404 and target branch is absent.",
            "POST": "Service raises HTTPException 400 with explicit missing target branch message."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestGitServiceGiteaPr"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fake_gitea_request",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 44,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fake_gitea_request",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 79,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestMappingService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 345,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for the IdMappingService matching UUIDs to integer IDs.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "src.core.mapping_service.IdMappingService"
        }
      ],
      "children": [
        {
          "name": "test_sync_environment_upserts_correctly",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 71,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMappingService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_remote_id_returns_integer",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 74,
          "end_line": 93,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMappingService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_remote_ids_batch_returns_dict",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 125,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMappingService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_sync_environment_updates_existing_mapping",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 128,
          "end_line": 172,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMappingService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_sync_environment_skips_resources_without_uuid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 175,
          "end_line": 204,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMappingService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_sync_environment_handles_api_error_gracefully",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 207,
          "end_line": 229,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMappingService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_remote_id_returns_none_for_missing",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 232,
          "end_line": 241,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMappingService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_get_remote_ids_batch_returns_empty_for_empty_input",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 244,
          "end_line": 253,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMappingService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_mapping_service_alignment_with_test_data",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 256,
          "end_line": 282,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMappingService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_sync_environment_requires_existing_env",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 285,
          "end_line": 305,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMappingService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_sync_environment_deletes_stale_mappings",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 308,
          "end_line": 344,
          "tags": {},
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMappingService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "db_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 26,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 37,
          "end_line": 37,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_all_resources",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 40,
          "end_line": 40,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_all_resources",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 213,
          "end_line": 213,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 345 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.4
      }
    },
    {
      "name": "test_git_service_get_repo_path_guard",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 14,
      "end_line": 23,
      "tags": {},
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "UnknownModule"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_git_service_get_repo_path_recreates_base_dir",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 25,
      "end_line": 37,
      "tags": {},
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "UnknownModule"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_superset_client_import_dashboard_guard",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 39,
      "end_line": 55,
      "tags": {},
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "UnknownModule"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_git_service_init_repo_reclones_when_path_is_not_a_git_repo",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 57,
      "end_line": 78,
      "tags": {},
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "UnknownModule"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_git_service_ensure_gitflow_branches_creates_and_pushes_missing_defaults",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 80,
      "end_line": 136,
      "tags": {},
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "UnknownModule"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_git_service_configure_identity_updates_repo_local_config",
      "type": "Function",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 138,
      "end_line": 155,
      "tags": {},
      "relations": [
        {
          "type": "BINDS_TO",
          "target": "UnknownModule"
        }
      ],
      "children": [],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "test_defensive_guards",
      "type": "Module",
      "complexity": 1,
      "tier": "TRIVIAL",
      "start_line": 1,
      "end_line": 155,
      "tags": {
        "PURPOSE": "Auto-generated module for backend/tests/core/test_defensive_guards.py",
        "COMPLEXITY": "1",
        "LAYER": "Unknown"
      },
      "relations": [],
      "children": [
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 87,
          "end_line": 87,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 91,
          "end_line": 91,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 96,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "fetch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 100,
          "end_line": 100,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "push",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 103,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 108,
          "end_line": 108,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 112,
          "end_line": 112,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "create_head",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 117,
          "end_line": 117,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "remote",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 122,
          "end_line": 122,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 1.0
      }
    },
    {
      "name": "TestMigrationEngine",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 365,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for MigrationEngine's cross-filter patching algorithms.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "VERIFIES",
          "target": "src.core.migration_engine:Module"
        }
      ],
      "children": [
        {
          "name": "MockMappingService",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 30,
          "end_line": 50,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Deterministic mapping service double for native filter ID remapping scenarios.",
            "INVARIANT": "Returns mappings only for requested UUID keys present in seeded map.",
            "INVARIANT_VIOLATION": "resource_type parameter is silently ignored. Lookups are UUID-only; chart and dataset UUIDs share the same namespace. Tests that mix resource types will produce false positives."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_write_dashboard_yaml",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 53,
          "end_line": 66,
          "tags": {
            "PURPOSE": "Serialize dashboard metadata into YAML fixture with json_metadata payload for patch tests."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_patch_dashboard_metadata_replaces_chart_ids",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 69,
          "end_line": 93,
          "tags": {
            "PURPOSE": "Verify native filter target chartId values are remapped via mapping service results."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_patch_dashboard_metadata_replaces_dataset_ids",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 96,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Verify native filter target datasetId values are remapped via mapping service results."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_patch_dashboard_metadata_skips_when_no_metadata",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 124,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Ensure dashboard files without json_metadata are left unchanged by metadata patching."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_patch_dashboard_metadata_handles_missing_targets",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 178,
          "tags": {
            "PURPOSE": "Verify patching updates mapped targets while preserving unmapped native filter IDs."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_extract_chart_uuids_from_archive",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 181,
          "end_line": 207,
          "tags": {
            "PURPOSE": "Verify chart archive scan returns complete local chart id-to-uuid mapping."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_transform_yaml_replaces_database_uuid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 210,
          "end_line": 230,
          "tags": {
            "PURPOSE": "Ensure dataset YAML database_uuid fields are replaced when source UUID mapping exists."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_transform_yaml_ignores_unmapped_uuid",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 233,
          "end_line": 255,
          "tags": {
            "PURPOSE": "Ensure transform_yaml leaves dataset files untouched when database_uuid is not mapped."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_transform_zip_end_to_end",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 258,
          "end_line": 336,
          "tags": {
            "PURPOSE": "Validate full ZIP transform pipeline remaps datasets and dashboard cross-filter chart IDs."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_transform_zip_invalid_path",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 339,
          "end_line": 349,
          "tags": {
            "PURPOSE": "Verify transform_zip returns False when source archive path does not exist."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_transform_yaml_nonexistent_file",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 352,
          "end_line": 364,
          "tags": {
            "PURPOSE": "Verify transform_yaml raises FileNotFoundError for missing YAML source files."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestMigrationEngine:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 38,
          "end_line": 38,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_remote_ids_batch",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 41,
          "end_line": 41,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: VERIFIES. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 365 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.4
      }
    },
    {
      "name": "TestDryRunOrchestrator",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 135,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for MigrationDryRunService diff and risk computation contracts.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "MigrationDryRunOrchestratorModule"
        }
      ],
      "children": [
        {
          "name": "_load_fixture",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 26,
          "end_line": 36,
          "tags": {
            "PURPOSE": "Load canonical migration dry-run fixture payload used by deterministic orchestration assertions."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDryRunOrchestrator"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 39,
          "end_line": 53,
          "tags": {
            "PURPOSE": "Build isolated in-memory SQLAlchemy session for dry-run service tests."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDryRunOrchestrator"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_migration_dry_run_service_builds_diff_and_risk",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 56,
          "end_line": 134,
          "tags": {
            "PURPOSE": "Verify dry-run orchestration returns stable diff summary and required risk codes.",
            "TEST_SCENARIO": "dry_run_builds_diff_and_risk -> Stable diff summary and required risk codes are returned.",
            "TEST_EDGE": "breaking_reference -> fixture.transformed_zip_objects.charts[0].dataset_uuid",
            "TEST_INVARIANT": "dry_run_result_contract_matches_fixture -> VERIFIED_BY: [dry_run_builds_diff_and_risk]",
            "TEST_CONTRACT": "dry_run_result_contract -> {",
            "TEST_FIXTURE": "migration_dry_run_fixture -> backend/tests/fixtures/migration_dry_run_fixture.json"
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDryRunOrchestrator"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "TestArchiveParser",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 79,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Unit tests for MigrationArchiveParser ZIP extraction contract.",
        "LAYER": "Domain"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "MigrationArchiveParserModule"
        }
      ],
      "children": [
        {
          "name": "test_extract_objects_from_zip_collects_all_types",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 78,
          "tags": {
            "PURPOSE": "Verify archive parser collects dashboard/chart/dataset YAML objects into typed buckets.",
            "TEST_CONTRACT": "zip_archive_fixture -> typed dashboard/chart/dataset extraction buckets",
            "TEST_SCENARIO": "archive_with_supported_objects_extracts_all_types -> One YAML file per supported type lands in matching bucket.",
            "TEST_EDGE": "external_fail -> Corrupt archive would fail extraction before typed buckets are returned."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestArchiveParser"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.7
      }
    },
    {
      "name": "TestPublicationService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 150,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "tests, clean-release, publication, revoke, gate",
        "PURPOSE": "Define publication gate contracts over approved candidates and immutable publication records.",
        "LAYER": "Tests",
        "INVARIANT": "Publish requires approval; revoke requires existing publication; republish after revoke is allowed as a new record."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_seed_candidate_with_passed_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 55,
          "tags": {
            "PURPOSE": "Seed candidate/report fixtures for publication gate scenarios.",
            "PRE": "candidate_id and report_id are non-empty.",
            "POST": "Repository contains candidate and PASSED report."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPublicationService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_publish_without_approval_rejected",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 58,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Ensure publish action is blocked until candidate is approved.",
            "PRE": "Candidate has PASSED report but status is not APPROVED.",
            "POST": "publish_candidate raises PublicationGateError."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPublicationService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_revoke_unknown_publication_rejected",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 99,
          "tags": {
            "PURPOSE": "Ensure revocation is rejected for unknown publication id.",
            "PRE": "Repository has no matching publication record.",
            "POST": "revoke_publication raises PublicationGateError."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPublicationService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_republish_after_revoke_creates_new_active_record",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 148,
          "tags": {
            "PURPOSE": "Ensure republish after revoke is allowed and creates a new ACTIVE record.",
            "PRE": "Candidate is APPROVED and first publication has been revoked.",
            "POST": "New publish call returns distinct publication id with ACTIVE status."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPublicationService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestComplianceTaskIntegration",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 309,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "tests, clean-release, compliance, task-manager, integration",
        "PURPOSE": "Verify clean release compliance runs execute through TaskManager lifecycle with observable success/failure outcomes.",
        "LAYER": "Tests",
        "INVARIANT": "Compliance execution triggered as task produces terminal task status and persists run evidence."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_seed_repository",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 103,
          "tags": {
            "PURPOSE": "Prepare deterministic candidate/policy/registry/manifest fixtures for task integration tests.",
            "PRE": "with_manifest controls manifest availability.",
            "POST": "Returns initialized repository and identifiers for compliance run startup."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceTaskIntegration"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "CleanReleaseCompliancePlugin",
          "type": "Class",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 106,
          "end_line": 142,
          "tags": {
            "PURPOSE": "TaskManager plugin shim that executes clean release compliance orchestration."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceTaskIntegration"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_PluginLoaderStub",
          "type": "Class",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 145,
          "end_line": 179,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Provide minimal plugin loader contract used by TaskManager in integration tests.",
            "INVARIANT": "has_plugin/get_plugin only acknowledge the seeded compliance plugin id.",
            "CONTRACT": "Partial PluginLoader stub. Implements: has_plugin, get_plugin. Stubs (NotImplementedError): list_plugins, get_all_plugins, get_all_plugin_configs."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceTaskIntegration"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_make_task_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 182,
          "end_line": 207,
          "tags": {
            "PURPOSE": "Build TaskManager with mocked persistence services for isolated integration tests.",
            "POST": "Returns TaskManager ready for async task execution."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceTaskIntegration"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_wait_for_terminal_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 210,
          "end_line": 228,
          "tags": {
            "PURPOSE": "Poll task registry until target task reaches terminal status.",
            "PRE": "task_id exists in manager registry.",
            "POST": "Returns task with SUCCESS or FAILED status, otherwise raises TimeoutError."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceTaskIntegration"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_compliance_run_executes_as_task_manager_task",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 231,
          "end_line": 269,
          "tags": {
            "PURPOSE": "Verify successful compliance execution is observable as TaskManager SUCCESS task.",
            "PRE": "Candidate, policy and manifest are available in repository.",
            "POST": "Task ends with SUCCESS; run is persisted with SUCCEEDED status and task binding."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceTaskIntegration"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_compliance_run_missing_manifest_marks_task_failed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 272,
          "end_line": 307,
          "tags": {
            "PURPOSE": "Verify missing manifest startup failure is surfaced as TaskManager FAILED task.",
            "PRE": "Candidate/policy exist but manifest is absent.",
            "POST": "Task ends with FAILED and run history remains empty."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceTaskIntegration"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 111,
          "end_line": 111,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "name",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 115,
          "end_line": 115,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "execute",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 118,
          "end_line": 118,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "__init__",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 152,
          "end_line": 152,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "has_plugin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 155,
          "end_line": 155,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_plugin",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 158,
          "end_line": 158,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "list_plugins",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 163,
          "end_line": 163,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_all_plugins",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 168,
          "end_line": 168,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "get_all_plugin_configs",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 173,
          "end_line": 173,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Fractal limit warning: Module length is 309 lines (must be < 300)",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.625
      }
    },
    {
      "name": "TestDemoModeIsolation",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 90,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "clean-release, demo-mode, isolation, namespace, repository",
        "PURPOSE": "Verify demo and real mode namespace isolation contracts before TUI integration.",
        "LAYER": "Tests"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.services.clean_release.demo_data_service"
        }
      ],
      "children": [
        {
          "name": "test_resolve_namespace_separates_demo_and_real",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 20,
          "end_line": 32,
          "tags": {
            "PURPOSE": "Ensure namespace resolver returns deterministic and distinct namespaces.",
            "PRE": "Mode names are provided as user/runtime strings.",
            "POST": "Demo and real namespaces are different and stable."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDemoModeIsolation"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_build_namespaced_id_prevents_cross_mode_collisions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 35,
          "end_line": 48,
          "tags": {
            "PURPOSE": "Ensure ID generation prevents demo/real collisions for identical logical IDs.",
            "PRE": "Same logical candidate id is used in two different namespaces.",
            "POST": "Produced physical IDs differ by namespace prefix."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDemoModeIsolation"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_create_isolated_repository_keeps_mode_data_separate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 51,
          "end_line": 88,
          "tags": {
            "PURPOSE": "Verify demo and real repositories do not leak state across mode boundaries.",
            "PRE": "Two repositories are created for distinct modes.",
            "POST": "Candidate mutations in one mode are not visible in the other mode."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestDemoModeIsolation"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "TestReportAuditImmutability",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 143,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "tests, clean-release, report, audit, immutability, append-only",
        "PURPOSE": "Validate report snapshot immutability expectations and append-only audit hook behavior for US2.",
        "LAYER": "Tests",
        "INVARIANT": "Built reports are immutable snapshots; audit hooks produce append-only event traces."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_terminal_run",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 32,
          "end_line": 56,
          "tags": {
            "PURPOSE": "Build deterministic terminal run fixture for report snapshot tests.",
            "PRE": "final_status is a valid ComplianceDecision value.",
            "POST": "Returns a terminal ComplianceRun suitable for report generation."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportAuditImmutability"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_report_builder_sets_immutable_snapshot_flag",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 59,
          "end_line": 77,
          "tags": {
            "PURPOSE": "Ensure generated report payload is marked immutable and persisted as snapshot.",
            "PRE": "Terminal run exists.",
            "POST": "Built report has immutable=True and repository stores same immutable object."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportAuditImmutability"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_repository_rejects_report_overwrite_for_same_report_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 80,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Define immutability contract that report snapshots cannot be overwritten by same identifier.",
            "PRE": "Existing report with id is already persisted.",
            "POST": "Second save for same report id is rejected with explicit immutability error."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportAuditImmutability"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_audit_hooks_emit_append_only_event_stream",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 123,
          "end_line": 141,
          "tags": {
            "PURPOSE": "Verify audit hooks emit one event per action call and preserve call order.",
            "PRE": "Logger backend is patched.",
            "POST": "Three calls produce three ordered info entries with molecular prefixes."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestReportAuditImmutability"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "test_candidate_manifest_services",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 290,
      "tags": {
        "COMPLEXITY": "3",
        "PURPOSE": "Test lifecycle and manifest versioning for release candidates.",
        "LAYER": "Tests"
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot:Module"
        }
      ],
      "children": [
        {
          "name": "test_candidate_lifecycle_transitions",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 33,
          "end_line": 62,
          "tags": {
            "PURPOSE": "Verify release candidate allows legal status transitions and rejects forbidden back-transitions."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_candidate_manifest_services:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_manifest_versioning_and_immutability",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 65,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Verify manifest versions increment monotonically and older snapshots remain queryable."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_candidate_manifest_services:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "_valid_artifacts",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 123,
          "end_line": 137,
          "tags": {
            "PURPOSE": "Provide canonical valid artifact payload used by candidate registration tests."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_candidate_manifest_services:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_register_candidate_rejects_duplicate_candidate_id",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 140,
          "end_line": 165,
          "tags": {
            "PURPOSE": "Verify duplicate candidate_id registration is rejected by service invariants."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_candidate_manifest_services:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_register_candidate_rejects_malformed_artifact_input",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 168,
          "end_line": 186,
          "tags": {
            "PURPOSE": "Verify candidate registration rejects artifact payloads missing required fields."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_candidate_manifest_services:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_register_candidate_rejects_empty_artifact_set",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 189,
          "end_line": 206,
          "tags": {
            "PURPOSE": "Verify candidate registration rejects empty artifact collections."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_candidate_manifest_services:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_manifest_service_rebuild_creates_new_version",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 209,
          "end_line": 235,
          "tags": {
            "PURPOSE": "Verify repeated manifest build creates a new incremented immutable version."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_candidate_manifest_services:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_manifest_service_existing_manifest_cannot_be_mutated",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 238,
          "end_line": 272,
          "tags": {
            "PURPOSE": "Verify existing manifest snapshot remains immutable when rebuilding newer manifest version."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_candidate_manifest_services:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_manifest_service_rejects_missing_candidate",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 275,
          "end_line": 289,
          "tags": {
            "PURPOSE": "Verify manifest build fails with missing candidate identifier."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "test_candidate_manifest_services:Module"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "db_session",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 24,
          "end_line": 24,
          "tags": {
            "PURPOSE": "Auto-detected function (orphan)",
            "COMPLEXITY": "1"
          },
          "relations": [],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Missing Mandatory Tag: @SEMANTICS (required for complexity 3)",
            "severity": "WARNING",
            "line_number": 1
          },
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.5499999999999999
      }
    },
    {
      "name": "TestPolicyResolutionService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 123,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "clean-release, policy-resolution, trusted-snapshots, contracts",
        "PURPOSE": "Verify trusted policy snapshot resolution contract and error guards.",
        "LAYER": "Tests",
        "INVARIANT": "Resolution uses only ConfigManager active IDs and rejects runtime override attempts."
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "policy_resolution_service"
        },
        {
          "type": "DEPENDS_ON",
          "target": "repository"
        },
        {
          "type": "DEPENDS_ON",
          "target": "clean_release_exceptions"
        }
      ],
      "children": [
        {
          "name": "_config_manager",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 25,
          "end_line": 41,
          "tags": {
            "COMPLEXITY": "1",
            "PURPOSE": "Build deterministic ConfigManager-like stub for tests.",
            "INVARIANT": "Only settings.clean_release.active_policy_id and active_registry_id are populated; any other settings field access raises AttributeError.",
            "PRE": "policy_id and registry_id may be None or non-empty strings.",
            "POST": "Returns object exposing get_config().settings.clean_release active IDs."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPolicyResolutionService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_resolve_trusted_policy_snapshots_missing_profile",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 44,
          "end_line": 60,
          "tags": {
            "PURPOSE": "Ensure resolution fails when trusted profile is not configured.",
            "PRE": "active_policy_id is None.",
            "POST": "Raises PolicyResolutionError with missing trusted profile reason."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPolicyResolutionService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_resolve_trusted_policy_snapshots_missing_registry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 63,
          "end_line": 79,
          "tags": {
            "PURPOSE": "Ensure resolution fails when trusted registry is not configured.",
            "PRE": "active_registry_id is None and active_policy_id is set.",
            "POST": "Raises PolicyResolutionError with missing trusted registry reason."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPolicyResolutionService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_resolve_trusted_policy_snapshots_rejects_override_attempt",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 82,
          "end_line": 121,
          "tags": {
            "PURPOSE": "Ensure runtime override attempt is rejected even if snapshots exist.",
            "PRE": "valid trusted snapshots exist in repository and override is provided.",
            "POST": "Raises PolicyResolutionError with override forbidden reason."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestPolicyResolutionService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    },
    {
      "name": "TestApprovalService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 203,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "tests, clean-release, approval, lifecycle, gate",
        "PURPOSE": "Define approval gate contracts for approve/reject operations over immutable compliance evidence.",
        "LAYER": "Tests",
        "INVARIANT": "Approval is allowed only for PASSED report bound to candidate; duplicate approve and foreign report must be rejected."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_seed_candidate_with_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 21,
          "end_line": 59,
          "tags": {
            "PURPOSE": "Seed candidate and report fixtures for approval gate tests.",
            "PRE": "candidate_id and report_id are non-empty.",
            "POST": "Repository contains candidate and report linked by candidate_id."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestApprovalService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_approve_rejects_blocked_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 62,
          "end_line": 82,
          "tags": {
            "PURPOSE": "Ensure approve is rejected when latest report final status is not PASSED.",
            "PRE": "Candidate has BLOCKED report.",
            "POST": "approve_candidate raises ApprovalGateError."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestApprovalService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_approve_rejects_foreign_report",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 85,
          "end_line": 113,
          "tags": {
            "PURPOSE": "Ensure approve is rejected when report belongs to another candidate.",
            "PRE": "Candidate exists, report candidate_id differs.",
            "POST": "approve_candidate raises ApprovalGateError."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestApprovalService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_approve_rejects_duplicate_approve",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 116,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Ensure repeated approve decision for same candidate is blocked.",
            "PRE": "Candidate has already been approved once.",
            "POST": "Second approve_candidate call raises ApprovalGateError."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestApprovalService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_reject_persists_decision_without_promoting_candidate_state",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 169,
          "tags": {
            "PURPOSE": "Ensure reject decision is immutable and does not promote candidate to APPROVED.",
            "PRE": "Candidate has PASSED report and CHECK_PASSED lifecycle state.",
            "POST": "reject_candidate persists REJECTED decision; candidate status remains unchanged."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestApprovalService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_reject_then_publish_is_blocked",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 172,
          "end_line": 201,
          "tags": {
            "PURPOSE": "Ensure latest REJECTED decision blocks publication gate.",
            "PRE": "Candidate is rejected for passed report.",
            "POST": "publish_candidate raises PublicationGateError."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestApprovalService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "TestComplianceExecutionService",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 176,
      "tags": {
        "COMPLEXITY": "5",
        "SEMANTICS": "tests, clean-release, compliance, pipeline, run-finalization",
        "PURPOSE": "Validate stage pipeline and run finalization contracts for compliance execution.",
        "LAYER": "Tests",
        "INVARIANT": "Missing manifest prevents run startup; failed execution cannot finalize as PASSED."
      },
      "relations": [
        {
          "type": "BELONGS_TO",
          "target": "SrcRoot"
        }
      ],
      "children": [
        {
          "name": "_seed_with_candidate_policy_registry",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 28,
          "end_line": 99,
          "tags": {
            "PURPOSE": "Build deterministic repository state for run startup tests.",
            "PRE": "candidate_id and snapshot ids are non-empty.",
            "POST": "Returns repository with candidate, policy and registry; manifest is optional."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceExecutionService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_run_without_manifest_rejected",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 102,
          "end_line": 120,
          "tags": {
            "PURPOSE": "Ensure compliance run cannot start when manifest is unresolved.",
            "PRE": "Candidate/policy exist but manifest is missing.",
            "POST": "start_check_run raises ValueError and no run is persisted."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceExecutionService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_task_crash_mid_run_marks_failed",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 123,
          "end_line": 144,
          "tags": {
            "PURPOSE": "Ensure execution crash conditions force FAILED run status.",
            "PRE": "Run exists, then required dependency becomes unavailable before execute_stages.",
            "POST": "execute_stages persists run with FAILED status."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceExecutionService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_blocked_run_finalization_blocks_report_builder",
          "type": "Function",
          "complexity": 1,
          "tier": "TRIVIAL",
          "start_line": 147,
          "end_line": 174,
          "tags": {
            "PURPOSE": "Ensure blocked runs require blocking violations before report creation.",
            "PRE": "Manifest contains prohibited artifacts leading to BLOCKED decision.",
            "POST": "finalize keeps BLOCKED and report_builder rejects zero blocking violations."
          },
          "relations": [
            {
              "type": "BINDS_TO",
              "target": "TestComplianceExecutionService"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [
          {
            "message": "Invalid @RELATION predicate: BELONGS_TO. Allowed: BINDS_TO, CALLS, DEPENDS_ON, DISPATCHES, IMPLEMENTS, INHERITS",
            "severity": "WARNING",
            "line_number": 1
          }
        ],
        "score": 0.775
      }
    },
    {
      "name": "SupersetCompatibilityMatrixTests",
      "type": "Module",
      "complexity": 3,
      "tier": "STANDARD",
      "start_line": 1,
      "end_line": 146,
      "tags": {
        "COMPLEXITY": "3",
        "SEMANTICS": "dataset_review, superset, compatibility_matrix, preview, sql_lab, tests",
        "PURPOSE": "Verifies Superset preview and SQL Lab endpoint fallback strategy used by dataset-review orchestration.",
        "LAYER": "Tests"
      },
      "relations": [
        {
          "type": "DEPENDS_ON",
          "target": "backend.src.core.superset_client.SupersetClient"
        },
        {
          "type": "DEPENDS_ON",
          "target": "SupersetCompilationAdapter"
        }
      ],
      "children": [
        {
          "name": "make_adapter",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 23,
          "end_line": 42,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Build an adapter with a mock Superset client and deterministic environment for compatibility tests."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SupersetCompilationAdapter"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_preview_prefers_supported_client_method_before_network_fallback",
          "type": "Function",
          "complexity": 2,
          "tier": "TRIVIAL",
          "start_line": 45,
          "end_line": 68,
          "tags": {
            "COMPLEXITY": "2",
            "PURPOSE": "Confirms preview compilation uses a supported client method first when the capability exists."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SupersetCompilationAdapter"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 1.0
          }
        },
        {
          "name": "test_preview_falls_back_across_matrix_until_supported_endpoint_returns_sql",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 71,
          "end_line": 103,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Confirms preview fallback walks the compatibility matrix from preferred to legacy endpoints until one returns compiled SQL.",
            "FRAGILE": "Positional call assertion \u2014 ordering changes will break this test without indicating a real regression. Prefer content-based assertion."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SupersetCompilationAdapter"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        },
        {
          "name": "test_sql_lab_launch_falls_back_to_legacy_execute_endpoint",
          "type": "Function",
          "complexity": 3,
          "tier": "STANDARD",
          "start_line": 106,
          "end_line": 143,
          "tags": {
            "COMPLEXITY": "3",
            "PURPOSE": "Confirms SQL Lab launch falls back from modern to legacy execute endpoint and preserves canonical session reference extraction.",
            "FRAGILE": "Positional call assertion \u2014 ordering changes will break this test without indicating a real regression. Prefer content-based assertion."
          },
          "relations": [
            {
              "type": "DEPENDS_ON",
              "target": "SupersetCompilationAdapter"
            }
          ],
          "children": [],
          "compliance": {
            "valid": true,
            "issues": [],
            "score": 0.85
          }
        }
      ],
      "compliance": {
        "valid": true,
        "issues": [],
        "score": 0.925
      }
    }
  ]
}