Skip to content

Commit 6b46cf9

Browse files
refactor(docs): code analysis engine
changes: - file: benchmark_optimizations.py area: core added: [clear_caches, print_summary, run_analysis, benchmark_cold_vs_warm, main] - file: base.py area: core modified: [analyze_c_family] - file: cpp.py area: core modified: [analyze_cpp] - file: csharp.py area: core modified: [analyze_csharp] - file: go_lang.py area: core added: [_analyze_go_regex] modified: [analyze_go] - file: java.py area: core modified: [analyze_java] - file: ts_extractors.py area: core added: [_extract_classes_ts, _extract_functions_ts, _get_node_text, extract_declarations_ts, visit, _find_name_node] - file: ts_parser.py area: analyzer added: [_get_language, get_parser, _get_parser, _init_tree_sitter, available, supports, +5 more] dependencies: flow: "go_lang→ts_extractors" - go_lang.py -> ts_parser.py - go_lang.py -> ts_extractors.py stats: lines: "+1691/-751 (net +940)" files: 14 complexity: "Large structural change (normalized)"
1 parent 2899224 commit 6b46cf9

25 files changed

Lines changed: 1716 additions & 750 deletions

CHANGELOG.md

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

3+
## [0.5.103] - 2026-03-31
4+
5+
### Docs
6+
- Update README.md
7+
- Update context.md
8+
- Update project/README.md
9+
- Update project/context.md
10+
11+
### Other
12+
- Update analysis.toon.yaml
13+
- Update batch_1/analysis.toon.yaml
14+
- Update benchmarks/benchmark_optimizations.py
15+
- Update code2llm/.code2llm_incremental.json
16+
- Update code2llm/core/lang/base.py
17+
- Update code2llm/core/lang/cpp.py
18+
- Update code2llm/core/lang/csharp.py
19+
- Update code2llm/core/lang/go_lang.py
20+
- Update code2llm/core/lang/java.py
21+
- Update code2llm/core/lang/ts_extractors.py
22+
- ... and 5 more files
23+
324
## [0.5.102] - 2026-03-31
425

526
## [0.5.101] - 2026-03-31

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
## AI Cost Tracking
55

6-
![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.5.102-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
7-
![AI Cost](https://img.shields.io/badge/AI%20Cost-$7.50-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-51.2h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
6+
![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.5.103-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
7+
![AI Cost](https://img.shields.io/badge/AI%20Cost-$7.50-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-52.2h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
88

9-
- 🤖 **LLM usage:** $7.5000 (148 commits)
10-
- 👤 **Human dev:** ~$5123 (51.2h @ $100/h, 30min dedup)
9+
- 🤖 **LLM usage:** $7.5000 (151 commits)
10+
- 👤 **Human dev:** ~$5223 (52.2h @ $100/h, 30min dedup)
1111

1212
Generated on 2026-03-31 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
1313

@@ -338,9 +338,9 @@ code2llm ./ -f yaml --separate-orphans
338338

339339
**Generated by**: `code2llm ./ -f all --readme`
340340
**Analysis Date**: 2026-03-31
341-
**Total Functions**: 934
342-
**Total Classes**: 106
343-
**Modules**: 122
341+
**Total Functions**: 1006
342+
**Total Classes**: 111
343+
**Modules**: 131
344344

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

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.102
1+
0.5.103

analysis.toon.yaml

Lines changed: 51 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,58 @@
1-
# code2llm | 113f 21502L | python:108,shell:4,java:1 | 2026-03-31
2-
# CC̄=4.6 | critical:11/934 | dups:0 | cycles:0
1+
# code2llm | 122f 22716L | python:117,shell:4,java:1 | 2026-03-31
2+
# CC̄=4.4 | critical:2/1006 | dups:0 | cycles:0
33

4-
HEALTH[11]:
5-
🟡 CC _process_functions CC=34 (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)
4+
HEALTH[2]:
105
🟡 CC main CC=17 (limit:15)
11-
🟡 CC analyze_ruby CC=17 (limit:15)
12-
🟡 CC _export_mermaid CC=16 (limit:15)
13-
🟡 CC _build_prompt_footer CC=16 (limit:15)
14-
🟡 CC extract_calls_regex CC=16 (limit:15)
156
🟡 CC validate_chunked_output CC=15 (limit:15)
167

178
REFACTOR[1]:
18-
1. split 11 high-CC methods (CC>15)
9+
1. split 2 high-CC methods (CC>15)
1910

20-
PIPELINES[638]:
21-
[1] Src [run_benchmark]: run_benchmark → load_previous
11+
PIPELINES[670]:
12+
[1] Src [read_readme]: read_readme
2213
PURITY: 100% pure
23-
[2] Src [read_readme]: read_readme
14+
[2] Src [demo_quick_strategy]: demo_quick_strategy
2415
PURITY: 100% pure
25-
[3] Src [save_report]: save_report
16+
[3] Src [demo_standard_strategy]: demo_standard_strategy
2617
PURITY: 100% pure
27-
[4] Src [main]: main → load_file → is_toon_file
18+
[4] Src [demo_deep_strategy]: demo_deep_strategy
2819
PURITY: 100% pure
29-
[5] Src [__init__]: __init__
20+
[5] Src [demo_incremental_analysis]: demo_incremental_analysis
3021
PURITY: 100% pure
3122

3223
LAYERS:
33-
code2llm/ CC̄=4.8 ←in:0 →out:5
24+
code2llm/ CC̄=4.5 ←in:0 →out:5
3425
│ !! index_generator 790L 1C 7m CC=5 ←0
35-
│ !! mermaid_exporter 628L 1C 19m CC=25 ←0
3626
│ !! project_yaml_exporter 513L 1C 18m CC=13 ←0
3727
│ !! pipeline_detector 506L 3C 18m CC=13 ←0
3828
│ !! html_dashboard 504L 1C 14m CC=7 ←0
3929
│ !! metrics 501L 1C 27m CC=12 ←0
4030
│ readme_exporter 496L 1C 7m CC=13 ←0
4131
│ large_repo 488L 2C 20m CC=9 ←1
4232
│ mermaid 485L 0C 16m CC=13 ←1
33+
│ mermaid_exporter 480L 1C 19m CC=13 ←0
34+
│ prompt 475L 0C 18m CC=14 ←1
4335
│ llm_flow 472L 1C 24m CC=14 ←0
4436
│ evolution_exporter 471L 1C 17m CC=11 ←0
4537
│ renderer 471L 1C 26m CC=11 ←0
46-
!! prompt 464L 0C 17m CC=161
47-
!! map_exporter 435L 1C 21m CC=25 ←4
48-
│ file_analyzer 398L 1C 17m CC=12 ←0
38+
base 454L 0C 14m CC=148
39+
│ map_exporter 439L 1C 25m CC=13 ←4
40+
│ file_analyzer 396L 1C 18m CC=12 ←0
4941
│ flow_exporter 391L 1C 14m CC=10 ←0
5042
│ pipeline 388L 3C 20m CC=10 ←0
51-
│ !! base 370L 0C 9m CC=34 ←8
52-
│ analyzer 333L 1C 9m CC=14 ←0
53-
│ entity_resolution 326L 3C 16m CC=13 ←0
54-
│ side_effects 324L 2C 17m CC=14 ←0
43+
│ analyzer 355L 1C 9m CC=14 ←0
44+
│ entity_resolution 326L 3C 16m CC=13 ←1
5545
│ cli_analysis 323L 0C 11m CC=14 ←1
56-
│ type_inference 321L 1C 19m CC=9 ←0
5746
│ intent_matching 297L 3C 15m CC=7 ←0
47+
│ side_effects 294L 2C 15m CC=14 ←0
5848
│ cfg 293L 1C 17m CC=5 ←0
59-
!! formats 287L 0C 12m CC=16 ←3
49+
type_inference 290L 1C 17m CC=9 ←0
6050
│ data_analysis 286L 1C 18m CC=14 ←0
51+
│ formats 285L 0C 13m CC=13 ←3
6152
│ llm_task 284L 0C 15m CC=14 ←0
6253
│ cli_parser 277L 0C 1m CC=1 ←1
6354
│ toon_size_manager 265L 0C 8m CC=10 ←1
55+
│ mermaid_flow_helpers 262L 0C 12m CC=10 ←1
6456
│ context_exporter 248L 1C 15m CC=10 ←0
6557
│ dfg 224L 1C 12m CC=7 ←0
6658
│ !! cli_commands 220L 0C 6m CC=15 ←1
@@ -73,44 +65,50 @@ LAYERS:
7365
│ smells 192L 1C 9m CC=7 ←0
7466
│ flow_renderer 188L 1C 6m CC=14 ←0
7567
│ streaming_analyzer 181L 1C 6m CC=12 ←0
68+
│ ts_extractors 180L 0C 5m CC=7 ←2
7669
│ config 174L 5C 2m CC=1 ←0
77-
│ repo_files 171L 0C 8m CC=8 ←1
70+
│ repo_files 173L 0C 8m CC=8 ←1
7871
│ detector 168L 1C 8m CC=9 ←0
7972
│ article_view 163L 1C 9m CC=7 ←0
8073
│ module_detail 162L 1C 9m CC=7 ←0
74+
│ ts_parser 158L 1C 9m CC=7 ←2
8175
│ toon_view 157L 1C 9m CC=6 ←0
76+
│ export_pipeline 153L 2C 5m CC=4 ←0
77+
│ incremental 150L 1C 10m CC=4 ←0
8278
│ prompt_engine 150L 1C 7m CC=12 ←0
8379
│ orchestrator 149L 0C 5m CC=11 ←1
8480
│ toon_parser 147L 0C 10m CC=8 ←1
81+
│ ruby 143L 0C 3m CC=14 ←1
8582
│ context_view 140L 1C 8m CC=11 ←0
8683
│ gitignore 139L 1C 6m CC=10 ←2
87-
│ !! ruby 135L 0C 2m CC=17 ←1
8884
│ prioritizer 131L 2C 4m CC=9 ←0
8985
│ code2logic 127L 0C 8m CC=6 ←1
9086
│ normalization 122L 2C 13m CC=6 ←0
9187
│ helpers 120L 0C 8m CC=8 ←3
9288
│ validate_project 118L 0C 3m CC=11 ←1
9389
│ yaml_exporter 108L 1C 7m CC=8 ←0
9490
│ php 106L 0C 1m CC=14 ←1
91+
│ file_cache 103L 1C 9m CC=5 ←0
92+
│ ast_registry 102L 1C 9m CC=5 ←4
93+
│ go_lang 102L 0C 2m CC=10 ←1
94+
│ file_filter 98L 1C 4m CC=13 ←0
9595
│ rust 94L 0C 1m CC=9 ←1
96-
│ go_lang 87L 0C 1m CC=10 ←1
9796
│ coupling 77L 1C 5m CC=7 ←0
9897
│ incremental 75L 1C 5m CC=5 ←0
9998
│ api 73L 0C 2m CC=2 ←0
10099
│ generic 71L 0C 1m CC=12 ←1
101100
│ cli 69L 0C 1m CC=7 ←0
102101
│ strategies 68L 1C 0m CC=0.0 ←0
103-
│ file_cache 62L 1C 6m CC=4 ←0
104-
│ file_filter 58L 1C 3m CC=10 ←0
105102
│ typescript 55L 0C 1m CC=1 ←1
106103
│ __init__ 55L 0C 0m CC=0.0 ←0
104+
│ ast_helpers 54L 0C 3m CC=8 ←2
107105
│ __init__ 53L 0C 1m CC=6 ←0
108106
│ __init__ 52L 0C 1m CC=3 ←0
109107
│ cache 51L 1C 5m CC=4 ←0
110-
│ java 50L 0C 1m CC=1 ←1
111-
│ csharp 49L 0C 1m CC=1 ←1
112108
│ __init__ 48L 0C 0m CC=0.0 ←0
113-
│ cpp 42L 0C 1m CC=1 ←1
109+
│ java 43L 0C 1m CC=1 ←1
110+
│ csharp 42L 0C 1m CC=1 ←1
111+
│ cpp 35L 0C 1m CC=1 ←1
114112
│ report_generators 34L 0C 1m CC=3 ←1
115113
│ __init__ 33L 0C 1m CC=2 ←0
116114
│ flow_constants 29L 0C 0m CC=0.0 ←0
@@ -122,6 +120,7 @@ LAYERS:
122120
│ __init__ 11L 0C 0m CC=0.0 ←0
123121
│ __init__ 7L 0C 0m CC=0.0 ←0
124122
│ __main__ 6L 0C 0m CC=0.0 ←0
123+
│ __init__ 5L 0C 0m CC=0.0 ←0
125124
│ __init__ 0L 0C 0m CC=0.0 ←0
126125
│ __init__ 0L 0C 0m CC=0.0 ←0
127126
@@ -135,10 +134,11 @@ LAYERS:
135134
│ benchmark_badges 392L 0C 9m CC=13 ←0
136135
│ bump_version 96L 0C 7m CC=4 ←0
137136
138-
benchmarks/ CC̄=3.1 ←in:0 →out:0
137+
benchmarks/ CC̄=3.0 ←in:0 →out:1
139138
│ benchmark_performance 306L 0C 7m CC=6 ←0
140139
│ project_generator 233L 0C 6m CC=1 ←1
141140
│ reporting 179L 0C 9m CC=6 ←1
141+
│ benchmark_optimizations 157L 0C 5m CC=7 ←0
142142
│ benchmark_format_quality 143L 0C 5m CC=4 ←0
143143
│ format_evaluator 138L 1C 5m CC=5 ←1
144144
│ benchmark_evolution 137L 0C 4m CC=13 ←0
@@ -160,15 +160,19 @@ LAYERS:
160160
code2llm/refactor/__init__.py 0L
161161

162162
COUPLING:
163-
code2llm.cli_exports code2llm code2llm.exporters code2llm.core code2llm.parsers validate_toon code2llm.generators
164-
code2llm.cli_exports ── ←4 3 1 1
165-
code2llm 4 ── 1
166-
code2llm.exporters ←3 ──
167-
code2llm.core ←1 ←1 ──
168-
code2llm.parsers ── ←2
169-
validate_toon 2 ──
170-
code2llm.generators ←1 ──
163+
code2llm.cli_exports code2llm.core code2llm code2llm.exporters code2llm.analysis code2llm.parsers validate_toon benchmarks code2llm.generators code2llm.nlp
164+
code2llm.cli_exports ── 1 ←4 3 1
165+
code2llm.core ←1 ── ←1 ←3 ←1 hub
166+
code2llm 4 1 ──
167+
code2llm.exporters ←3 ── 1
168+
code2llm.analysis 3 ──
169+
code2llm.parsers ── ←2
170+
validate_toon 2 ──
171+
benchmarks 1 ──
172+
code2llm.generators ←1 ──
173+
code2llm.nlp ←1 ──
171174
CYCLES: none
175+
HUB: code2llm.core/ (fan-in=6)
172176

173177
EXTERNAL:
174178
validation: run `vallm batch .` → validation.toon

0 commit comments

Comments
 (0)