1- # code2llm | 24f 2544L | py:24 | 2026-03-07
2- # CC̄=4.2 | critical:12/127 | dups:0 | cycles:1
1+ # code2llm | 28f 3095L | py:28 | 2026-03-07
2+ # CC̄=4.4 | critical:16/154 | dups:0 | cycles:1
33
4- HEALTH[1]:
4+ HEALTH[3]:
5+ 🟡 CC _render_per_module CC=18 (limit:15)
6+ 🟡 CC _run_generate CC=17 (limit:15)
57 🟡 CC _parse_sections CC=15 (limit:15)
68
79REFACTOR[2]:
8- 1. split 1 high-CC methods (CC>15)
10+ 1. split 3 high-CC methods (CC>15)
911 2. break 1 circular dependencies
1012
1113COUPLING:
@@ -17,25 +19,29 @@ COUPLING:
1719 CYCLES: 1
1820
1921LAYERS:
20- code2docs/ CC̄=4.2 ←in:0 →out:1
22+ code2docs/ CC̄=4.4 ←in:0 →out:1
23+ │ !! cli 269L 1C 10m CC=17 ←0
2124 │ readme_gen 260L 1C 14m CC=7 ←0
22- │ ! cli 229L 1C 10m CC=13 ←0
2325 │ ! module_docs_gen 220L 1C 17m CC=12 ←0
2426 │ ! examples_gen 198L 1C 12m CC=12 ←0
27+ │ ! api_changelog_gen 196L 2C 9m CC=14 ←0
2528 │ ! architecture_gen 192L 1C 6m CC=12 ←0
2629 │ ! api_reference_gen 162L 1C 11m CC=13 ←0
2730 │ dependency_scanner 159L 3C 6m CC=8 ←0
2831 │ config 158L 5C 2m CC=7 ←1
32+ │ depgraph_gen 140L 1C 9m CC=9 ←0
2933 │ differ 125L 2C 7m CC=6 ←0
3034 │ changelog_gen 121L 2C 6m CC=6 ←0
3135 │ !! docstring_extractor 119L 2C 6m CC=15 ←0
3236 │ endpoint_detector 113L 2C 3m CC=5 ←0
37+ │ !! coverage_gen 85L 1C 5m CC=18 ←0
38+ │ mkdocs_gen 79L 1C 4m CC=8 ←0
3339 │ ! updater 77L 1C 2m CC=12 ←0
3440 │ watcher 75L 0C 1m CC=5 ←1
3541 │ markdown 73L 1C 13m CC=4 ←0
3642 │ toc 63L 0C 3m CC=6 ←0
43+ │ __init__ 53L 0C 1m CC=5 ←0
3744 │ ! badges 52L 0C 2m CC=11 ←1
38- │ __init__ 42L 0C 1m CC=5 ←0
3945 │ project_scanner 42L 1C 4m CC=2 ←0
4046 │ __init__ 32L 0C 1m CC=4 ←0
4147 │ __init__ 13L 0C 0m CC=0.0 ←0
@@ -46,10 +52,12 @@ LAYERS:
4652
4753DUPLICATES[0]: none
4854
49- FUNCTIONS (CC≥10, 12 of 127):
55+ FUNCTIONS (CC≥10, 16 of 154):
56+ 18.0 CoverageGenerator._render_per_module 4n 2exit loops+ret !! split
57+ 17.0 _run_generate 33n 2exit cond+ret !! split
5058 15.0 DocstringExtractor._parse_sections 15n 1exit loops+cond !! split
59+ 14.0 ApiChangelogGenerator._render 17n 4exit loops+cond+ret
5160 13.0 ApiReferenceGenerator._render_api_classes 14n 3exit loops+cond+ret
52- 13.0 _run_generate 25n 2exit cond+ret
5361 12.0 Updater.apply 14n 1exit loops+cond
5462 12.0 ModuleDocsGenerator._render_classes_section 14n 3exit loops+cond+ret
5563 12.0 ExamplesGenerator._generate_class_examples 10n 2exit loops+cond+ret
@@ -59,63 +67,61 @@ FUNCTIONS (CC≥10, 12 of 127):
5967 11.0 ArchitectureGenerator._generate_class_diagram 12n 2exit loops+cond+ret
6068 10.0 ModuleDocsGenerator._render_dependencies_section 12n 3exit loops+cond+ret
6169 10.0 ExamplesGenerator._generate_basic_usage 3n 2exit ret
70+ 10.0 ApiChangelogGenerator._diff_functions 9n 1exit loops+cond
71+ 10.0 ApiChangelogGenerator._diff_classes 15n 1exit loops+cond
6272
6373 summary:
64- critical(≥10): 12 | high(5-10): 33 | medium(2-5): 54 | low(<2): 28
65- 9 % CC≥10 35 % CC≥5
74+ critical(≥10): 16 | high(5-10): 39 | medium(2-5): 65 | low(<2): 34
75+ 10 % CC≥10 36 % CC≥5
6676
6777HOTSPOTS:
68- #1 _run_generate fan=24 "calls 24 functions"
78+ #1 _run_generate fan=34 "calls 34 functions"
6979 #2 start_watcher fan=22 "calls 22 functions"
7080 #3 Updater.apply fan=20 "Updater method, fan-out=20"
7181 #4 Code2DocsConfig.from_yaml fan=15 "Code2DocsConfig method, fan-out=15"
72- #5 ApiReferenceGenerator._render_api_classes fan=11 "ApiReferenceGenerator method, fan-out=11 "
73- #6 ArchitectureGenerator.generate fan=11 "ArchitectureGenerator method, fan-out=11 "
74- #7 DocstringExtractor._parse_sections fan=11 "DocstringExtractor method, fan-out=11"
75- #8 Differ.detect_changes fan=10 "Differ method, fan-out=10 "
76- #9 init fan=10 "calls 10 functions "
77- #10 EndpointDetector._scan_django_urls fan=10 "EndpointDetector method, fan-out=10"
82+ #5 ApiChangelogGenerator._diff_classes fan=12 "ApiChangelogGenerator method, fan-out=12 "
83+ #6 generate_docs fan=11 "calls 11 functions "
84+ #7 ApiReferenceGenerator._render_api_classes fan=11 "ApiReferenceGenerator method, fan-out=11"
85+ #8 ArchitectureGenerator.generate fan=11 "ArchitectureGenerator method, fan-out=11 "
86+ #9 DocstringExtractor._parse_sections fan=11 "DocstringExtractor method, fan-out=11 "
87+ #10 Differ.detect_changes fan=10 "Differ method, fan-out=10"
7888
7989CLASSES:
8090 ModuleDocsGenerator ████████████████████████ 17m CC̄=4.6 max=12
8191 MarkdownFormatter ██████████████████ 13m CC̄=1.2 max=4
8292 ReadmeGenerator ██████████████████ 13m CC̄=3.9 max=7
8393 ExamplesGenerator ████████████████ 12m CC̄=6.0 max=12
8494 ApiReferenceGenerator ███████████████ 11m CC̄=4.0 max=13
95+ DepGraphGenerator ████████████ 9m CC̄=3.9 max=9
96+ ApiChangelogGenerator ████████████ 9m CC̄=5.4 max=14
8597 Differ ████████ 6m CC̄=4.0 max=6
8698 ChangelogGenerator ████████ 6m CC̄=3.5 max=6
8799 ArchitectureGenerator ████████ 6m CC̄=7.8 max=12
88- DocstringExtractor ████████ 6m CC̄=6.2 max=15 !!
89100 DependencyScanner ████████ 6m CC̄=4.5 max=8
101+ DocstringExtractor ████████ 6m CC̄=6.2 max=15 !!
102+ CoverageGenerator ███████ 5m CC̄=6.4 max=18 !!
103+ MkDocsGenerator █████ 4m CC̄=3.0 max=8
90104 ProjectScanner ████ 3m CC̄=1.3 max=2
91105 EndpointDetector ████ 3m CC̄=4.0 max=5
92106 Updater ██ 2m CC̄=7.0 max=12
93107 Code2DocsConfig ██ 2m CC̄=4.0 max=7
94108 ChangeInfo █ 1m CC̄=1.0 max=1
95109 DefaultGroup █ 1m CC̄=4.0 max=4
96110 ChangelogEntry 0m CC̄=0.0 max=0.0
111+ ApiChange 0m CC̄=0.0 max=0.0
97112 ReadmeConfig 0m CC̄=0.0 max=0.0
98113 DocsConfig 0m CC̄=0.0 max=0.0
99114 ExamplesConfig 0m CC̄=0.0 max=0.0
100115 SyncConfig 0m CC̄=0.0 max=0.0
101- DocstringInfo 0m CC̄=0.0 max=0.0
102116 DependencyInfo 0m CC̄=0.0 max=0.0
103117 ProjectDependencies 0m CC̄=0.0 max=0.0
118+ DocstringInfo 0m CC̄=0.0 max=0.0
104119 Endpoint 0m CC̄=0.0 max=0.0
105120
106121D:
107- code2docs/analyzers/docstring_extractor.py:
108- e: DocstringInfo,DocstringExtractor
109- DocstringInfo # Parsed docstring with sections....
110- DocstringExtractor # Extract and parse docstrings from AnalysisResult....
111- extract_all(1) CC=5.0
112- → parse(1) CC=2.0
113- → _extract_summary(0) CC=2.0
114- → _parse_sections(2) CC=15.0 !
115- → _classify_section(0) CC=5.0
116- code2docs/generators/api_reference_gen.py:
117- e: ApiReferenceGenerator
118- ApiReferenceGenerator # Generate docs/api/ — per-module API reference from signature...
122+ code2docs/generators/coverage_gen.py:
123+ e: CoverageGenerator
124+ CoverageGenerator # Generate docs/coverage.md — docstring coverage report....
119125 __init__(2) CC=1.0
120126 code2docs/cli.py:
121127 e: DefaultGroup,main,generate,sync,watch,init,_load_config,_run_generate,_run_sync,_run_watch
131137 _run_generate(project_path,config,readme_only,dry_run)
132138 _run_sync(project_path,config,dry_run)
133139 _run_watch(project_path,config)
140+ code2docs/analyzers/docstring_extractor.py:
141+ e: DocstringInfo,DocstringExtractor
142+ DocstringInfo # Parsed docstring with sections....
143+ DocstringExtractor # Extract and parse docstrings from AnalysisResult....
144+ extract_all(1) CC=5.0
145+ → parse(1) CC=2.0
146+ → _extract_summary(0) CC=2.0
147+ → _parse_sections(2) CC=15.0 !
148+ → _classify_section(0) CC=5.0
149+ code2docs/generators/api_changelog_gen.py:
150+ e: ApiChange,ApiChangelogGenerator
151+ ApiChange # A single API change between two analysis snapshots....
152+ ApiChangelogGenerator # Generate API changelog by diffing current analysis with a sa...
153+ __init__(2) CC=1.0
154+ code2docs/generators/api_reference_gen.py:
155+ e: ApiReferenceGenerator
156+ ApiReferenceGenerator # Generate docs/api/ — per-module API reference from signature...
157+ __init__(2) CC=1.0
134158 code2docs/sync/updater.py:
135159 e: Updater
136160 Updater # Apply selective documentation updates based on detected chan...
151175 e: generate_badges,_make_badge
152176 generate_badges(project_name,badge_types,stats,deps)
153177 _make_badge(badge_type,project_name,stats,deps)
178+ code2docs/generators/depgraph_gen.py:
179+ e: DepGraphGenerator
180+ DepGraphGenerator # Generate docs/dependency-graph.md with Mermaid diagrams....
181+ __init__(2) CC=1.0
182+ code2docs/generators/mkdocs_gen.py:
183+ e: MkDocsGenerator
184+ MkDocsGenerator # Generate mkdocs.yml from the docs/ directory structure....
185+ __init__(2) CC=1.0
154186 code2docs/analyzers/dependency_scanner.py:
155187 e: DependencyInfo,ProjectDependencies,DependencyScanner
156188 DependencyInfo # Information about a project dependency....
217249 __init__(1) CC=2.0
218250 → _build_llm_config(0) CC=1.0
219251 analyze_and_document(project_path,config)
252+ examples/entry_points.py:
253+ examples/class_examples.py:
220254 code2docs/__main__.py:
255+ examples/basic_usage.py:
221256 code2docs/sync/__init__.py:
222257 code2docs/formatters/__init__.py:
223258 code2docs/analyzers/__init__.py:
0 commit comments