Skip to content

Commit c3ec787

Browse files
refactor(docs): code analysis engine
changes: - file: formats.py area: cli modified: [_export_simple_formats] stats: lines: "+71431/-74364 (net -2933)" files: 14 complexity: "Stable complexity"
1 parent 7791ef2 commit c3ec787

25 files changed

Lines changed: 71454 additions & 74368 deletions

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
## [Unreleased]
22

3+
## [0.5.78] - 2026-03-25
4+
5+
### Docs
6+
- Update project/README.md
7+
- Update project/context.md
8+
9+
### Other
10+
- Update code2llm/cli_exports/formats.py
11+
- Update project/analysis.json
12+
- Update project/analysis.toon.yaml
13+
- Update project/analysis.yaml
14+
- Update project/batch_1/analysis.toon.yaml
15+
- Update project/batch_1/evolution.toon.yaml
16+
- Update project/batch_1/map.toon.yaml
17+
- Update project/calls.mmd
18+
- Update project/calls.png
19+
- Update project/evolution.toon.yaml
20+
- ... and 8 more files
21+
322
## [0.5.77] - 2026-03-25
423

524
### Other

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.77
1+
0.5.78

code2llm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
and entity resolution with multilingual support.
99
"""
1010

11-
__version__ = "0.5.77"
11+
__version__ = "0.5.78"
1212
__author__ = "STTS Project"
1313

1414
# Core analysis components (lightweight, always needed)

code2llm/cli_exports/formats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _run_report(args, project_yaml_path: str, output_dir: Path) -> None:
100100
def _export_simple_formats(args, result, output_dir: Path, formats):
101101
"""Export toon, map, flow, context, yaml, json, project-yaml formats."""
102102
format_map = {
103-
'toon': (ToonExporter, 'toon.toon.yaml', 'TOON (diagnostics)'),
103+
'toon': (ToonExporter, 'analysis.toon.yaml', 'TOON (diagnostics)'),
104104
'map': (MapExporter, 'map.toon.yaml', 'MAP (structure)'),
105105
'flow': (FlowExporter, 'flow.toon.yaml', 'FLOW (data-flow)'),
106106
'context': (ContextExporter, 'context.md', 'CONTEXT (LLM narrative)'),

code2llm/nlp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
with multilingual support and fuzzy matching.
55
"""
66

7-
__version__ = "0.5.77"
7+
__version__ = "0.5.78"
88

99
from .pipeline import NLPPipeline
1010
from .normalization import QueryNormalizer

project/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ When you run `code2llm ./ -f all`, the following files are created:
1111
| File | Format | Purpose | Key Insights |
1212
|------|--------|---------|--------------|
1313
| `evolution.toon.yaml` | **YAML** | **📋 Refactoring queue** - Prioritized improvements | 0 refactoring actions needed |
14-
| `map.toon.yaml` | **YAML** | **🗺️ Structural map + project header** - Modules, imports, exports, signatures, stats, alerts, hotspots, trend | Project architecture overview |
1514

1615
### 🤖 LLM-Ready Documentation
1716

@@ -332,6 +331,6 @@ code2llm ./ -f yaml --separate-orphans
332331
**Analysis Date**: 2026-03-25
333332
**Total Functions**: 923
334333
**Total Classes**: 106
335-
**Modules**: 117
334+
**Modules**: 122
336335

337336
For more information about code2llm, visit: https://github.com/tom-sapletta/code2llm

project/analysis.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

project/analysis.toon.yaml

Lines changed: 174 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,174 @@
1-
format: toon-v2-yaml
2-
timestamp: '2026-03-25'
3-
header:
4-
files: 113
5-
lines: 21247
6-
functions: 923
7-
avg_cc: 4.6
8-
critical_count: 11
9-
duplicates: 0
10-
cycles: 0
11-
health:
12-
count: 11
13-
status: issues_found
14-
issues:
15-
- severity: yellow
16-
code: CC
17-
message: main CC=17 (limit:15)
18-
- severity: yellow
19-
code: CC
20-
message: validate_chunked_output CC=15 (limit:15)
21-
- severity: yellow
22-
code: CC
23-
message: export_to_yaml CC=25 (limit:15)
24-
- severity: yellow
25-
code: CC
26-
message: export_flow_compact CC=23 (limit:15)
27-
- severity: yellow
28-
code: CC
29-
message: export_flow_detailed CC=25 (limit:15)
30-
- severity: yellow
31-
code: CC
32-
message: export_flow_full CC=23 (limit:15)
33-
- severity: yellow
34-
code: CC
35-
message: _export_simple_formats CC=16 (limit:15)
36-
- severity: yellow
37-
code: CC
38-
message: _export_mermaid CC=16 (limit:15)
39-
- severity: yellow
40-
code: CC
41-
message: extract_calls_regex CC=16 (limit:15)
42-
- severity: yellow
43-
code: CC
44-
message: _extract_declarations CC=65 (limit:15)
45-
- severity: yellow
46-
code: CC
47-
message: analyze_ruby CC=17 (limit:15)
48-
refactor:
49-
steps:
50-
- action: split_methods
51-
count: 11
52-
reason: high_cc
53-
pipelines:
54-
count: 0
55-
pipelines: []
56-
layers:
57-
count: 0
58-
layers: []
59-
coupling:
60-
count: 0
61-
packages: []
62-
external:
63-
count: 0
64-
libraries: []
1+
# code2llm | 113f 21241L | python:108,shell:4,php:1 | 2026-03-25
2+
# CC̄=4.6 | critical:10/923 | dups:0 | cycles:0
3+
4+
HEALTH[10]:
5+
🟡 CC _extract_declarations CC=65 (limit:15)
6+
🟡 CC export_to_yaml CC=25 (limit:15)
7+
🟡 CC export_flow_detailed CC=25 (limit:15)
8+
🟡 CC export_flow_compact CC=23 (limit:15)
9+
🟡 CC export_flow_full CC=23 (limit:15)
10+
🟡 CC main CC=17 (limit:15)
11+
🟡 CC analyze_ruby CC=17 (limit:15)
12+
🟡 CC _export_mermaid CC=16 (limit:15)
13+
🟡 CC extract_calls_regex CC=16 (limit:15)
14+
🟡 CC validate_chunked_output CC=15 (limit:15)
15+
16+
REFACTOR[1]:
17+
1. split 10 high-CC methods (CC>15)
18+
19+
PIPELINES[637]:
20+
[1] Src [read_readme]: read_readme
21+
PURITY: 100% pure
22+
[2] Src [run_benchmark]: run_benchmark → load_previous
23+
PURITY: 100% pure
24+
[3] Src [save_report]: save_report
25+
PURITY: 100% pure
26+
[4] Src [main]: main → load_file → is_toon_file
27+
PURITY: 100% pure
28+
[5] Src [__init__]: __init__
29+
PURITY: 100% pure
30+
31+
LAYERS:
32+
code2llm/ CC̄=4.8 ←in:0 →out:5
33+
│ !! index_generator 790L 1C 7m CC=5 ←0
34+
│ !! mermaid_exporter 637L 1C 18m CC=25 ←0
35+
│ !! project_yaml_exporter 513L 1C 18m CC=13 ←0
36+
│ !! pipeline_detector 506L 3C 18m CC=13 ←0
37+
│ !! html_dashboard 504L 1C 14m CC=7 ←0
38+
│ !! metrics 501L 1C 27m CC=12 ←0
39+
│ readme_exporter 493L 1C 7m CC=13 ←0
40+
│ large_repo 488L 2C 20m CC=9 ←1
41+
│ mermaid 485L 0C 16m CC=13 ←1
42+
│ llm_flow 472L 1C 24m CC=14 ←0
43+
│ evolution_exporter 471L 1C 17m CC=11 ←0
44+
│ renderer 471L 1C 26m CC=11 ←0
45+
│ !! map_exporter 435L 1C 21m CC=25 ←4
46+
│ file_analyzer 398L 1C 17m CC=12 ←0
47+
│ flow_exporter 391L 1C 14m CC=10 ←0
48+
│ pipeline 388L 3C 20m CC=10 ←0
49+
│ analyzer 333L 1C 9m CC=14 ←0
50+
│ entity_resolution 326L 3C 16m CC=13 ←0
51+
│ side_effects 324L 2C 17m CC=14 ←0
52+
│ cli_analysis 323L 0C 11m CC=14 ←1
53+
│ type_inference 321L 1C 19m CC=9 ←0
54+
│ !! base 312L 0C 4m CC=65 ←8
55+
│ prompt 299L 0C 13m CC=12 ←1
56+
│ intent_matching 297L 3C 15m CC=7 ←0
57+
│ cfg 293L 1C 17m CC=5 ←0
58+
│ data_analysis 286L 1C 18m CC=14 ←0
59+
│ llm_task 284L 0C 15m CC=14 ←0
60+
│ cli_parser 277L 0C 1m CC=1 ←1
61+
│ !! formats 271L 0C 11m CC=16 ←3
62+
│ toon_size_manager 265L 0C 8m CC=10 ←1
63+
│ context_exporter 248L 1C 15m CC=10 ←0
64+
│ dfg 224L 1C 12m CC=7 ←0
65+
│ !! cli_commands 220L 0C 6m CC=15 ←1
66+
│ call_graph 211L 1C 13m CC=9 ←0
67+
│ config 210L 6C 0m CC=0.0 ←0
68+
│ scanner 201L 1C 6m CC=14 ←0
69+
│ refactoring 196L 1C 11m CC=9 ←0
70+
│ __init__ 196L 1C 11m CC=9 ←0
71+
│ models 194L 11C 6m CC=8 ←0
72+
│ smells 192L 1C 9m CC=7 ←0
73+
│ flow_renderer 188L 1C 6m CC=14 ←0
74+
│ streaming_analyzer 181L 1C 6m CC=12 ←0
75+
│ config 174L 5C 2m CC=1 ←0
76+
│ repo_files 171L 0C 8m CC=8 ←1
77+
│ detector 168L 1C 8m CC=9 ←0
78+
│ article_view 163L 1C 9m CC=7 ←0
79+
│ module_detail 162L 1C 9m CC=7 ←0
80+
│ toon_view 157L 1C 9m CC=6 ←0
81+
│ prompt_engine 150L 1C 7m CC=12 ←0
82+
│ toon_parser 147L 0C 10m CC=8 ←1
83+
│ context_view 140L 1C 8m CC=11 ←0
84+
│ gitignore 139L 1C 6m CC=10 ←2
85+
│ !! ruby 135L 0C 2m CC=17 ←1
86+
│ prioritizer 131L 2C 4m CC=9 ←0
87+
│ code2logic 127L 0C 8m CC=6 ←1
88+
│ normalization 122L 2C 13m CC=6 ←0
89+
│ orchestrator 121L 0C 5m CC=11 ←1
90+
│ helpers 120L 0C 8m CC=8 ←3
91+
│ validate_project 118L 0C 3m CC=11 ←1
92+
│ yaml_exporter 108L 1C 7m CC=8 ←0
93+
│ php 106L 0C 1m CC=14 ←1
94+
│ rust 94L 0C 1m CC=9 ←1
95+
│ go_lang 87L 0C 1m CC=10 ←1
96+
│ coupling 77L 1C 5m CC=7 ←0
97+
│ incremental 75L 1C 5m CC=5 ←0
98+
│ api 73L 0C 2m CC=2 ←0
99+
│ generic 71L 0C 1m CC=12 ←1
100+
│ cli 69L 0C 1m CC=7 ←0
101+
│ strategies 68L 1C 0m CC=0.0 ←0
102+
│ file_cache 62L 1C 6m CC=4 ←0
103+
│ file_filter 58L 1C 3m CC=10 ←0
104+
│ typescript 55L 0C 1m CC=1 ←1
105+
│ __init__ 55L 0C 0m CC=0.0 ←0
106+
│ __init__ 53L 0C 1m CC=6 ←0
107+
│ __init__ 52L 0C 1m CC=3 ←0
108+
│ cache 51L 1C 5m CC=4 ←0
109+
│ java 50L 0C 1m CC=1 ←1
110+
│ csharp 49L 0C 1m CC=1 ←1
111+
│ __init__ 48L 0C 0m CC=0.0 ←0
112+
│ cpp 42L 0C 1m CC=1 ←1
113+
│ report_generators 34L 0C 1m CC=3 ←1
114+
│ __init__ 33L 0C 1m CC=2 ←0
115+
│ flow_constants 29L 0C 0m CC=0.0 ←0
116+
│ __init__ 23L 0C 0m CC=0.0 ←0
117+
│ json_exporter 17L 1C 1m CC=3 ←0
118+
│ base 13L 1C 1m CC=1 ←0
119+
│ llm_exporter 12L 0C 0m CC=0.0 ←0
120+
│ __init__ 12L 0C 0m CC=0.0 ←0
121+
│ __init__ 11L 0C 0m CC=0.0 ←0
122+
│ __init__ 7L 0C 0m CC=0.0 ←0
123+
│ __main__ 6L 0C 0m CC=0.0 ←0
124+
│ __init__ 0L 0C 0m CC=0.0 ←0
125+
│ __init__ 0L 0C 0m CC=0.0 ←0
126+
127+
./ CC̄=4.2 ←in:0 →out:0
128+
│ !! validate_toon 394L 0C 15m CC=17 ←0
129+
│ setup 67L 0C 1m CC=2 ←0
130+
│ orchestrator.sh 58L 0C 0m CC=0.0 ←0
131+
│ project.sh 49L 0C 0m CC=0.0 ←0
132+
133+
scripts/ CC̄=3.9 ←in:0 →out:0
134+
│ benchmark_badges 392L 0C 9m CC=13 ←0
135+
│ bump_version 96L 0C 7m CC=4 ←0
136+
137+
benchmarks/ CC̄=3.1 ←in:0 →out:0
138+
│ benchmark_performance 306L 0C 7m CC=6 ←0
139+
│ project_generator 233L 0C 6m CC=1 ←1
140+
│ reporting 179L 0C 9m CC=6 ←1
141+
│ benchmark_format_quality 143L 0C 5m CC=4 ←0
142+
│ format_evaluator 138L 1C 5m CC=5 ←1
143+
│ benchmark_evolution 137L 0C 4m CC=13 ←0
144+
│ benchmark_constants 29L 0C 0m CC=0.0 ←0
145+
146+
badges/ CC̄=2.7 ←in:0 →out:0
147+
│ server 110L 0C 3m CC=4 ←0
148+
149+
demo_langs/ CC̄=1.5 ←in:0 →out:0
150+
│ sample.rs 47L 1C 5m CC=2 ←0
151+
│ sample.java 47L 2C 4m CC=2 ←0
152+
│ sample.go 46L 0C 4m CC=3 ←0
153+
│ sample.php 44L 2C 4m CC=2 ←2
154+
│ sample 40L 1C 4m CC=3 ←0
155+
│ sample.ts 26L 0C 1m CC=1 ←0
156+
157+
── zero ──
158+
code2llm/patterns/__init__.py 0L
159+
code2llm/refactor/__init__.py 0L
160+
161+
COUPLING:
162+
code2llm.cli_exports code2llm code2llm.exporters code2llm.core code2llm.parsers validate_toon code2llm.generators
163+
code2llm.cli_exports ── ←4 3 1 1
164+
code2llm 4 ── 1
165+
code2llm.exporters ←3 ──
166+
code2llm.core ←1 ←1 ──
167+
code2llm.parsers ── ←2
168+
validate_toon 2 ──
169+
code2llm.generators ←1 ──
170+
CYCLES: none
171+
172+
EXTERNAL:
173+
validation: run `vallm batch .` → validation.toon
174+
duplication: run `redup scan .` → duplication.toon

0 commit comments

Comments
 (0)