Skip to content

Commit 049aaa3

Browse files
feat(docs): code analysis engine
changes: - file: formats.py area: cli added: [_export_project_toon] - file: orchestrator.py area: cli modified: [_export_chunked_results, _export_single_project] dependencies: flow: "orchestrator→formats" - orchestrator.py -> formats.py - orchestrator.py -> prompt.py stats: lines: "+272/-249 (net +23)" files: 16 complexity: "+200% complexity (monitor)"
1 parent bce1db0 commit 049aaa3

21 files changed

+295
-253
lines changed

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.87] - 2026-03-26
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 code2llm/cli_exports/orchestrator.py
12+
- Update project/analysis.toon.yaml
13+
- Update project/calls.mmd
14+
- Update project/calls.png
15+
- Update project/compact_flow.mmd
16+
- Update project/compact_flow.png
17+
- Update project/evolution.toon.yaml
18+
- Update project/flow.mmd
19+
- Update project/flow.png
20+
- ... and 3 more files
21+
322
## [0.5.86] - 2026-03-26
423

524
### Docs

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.86
1+
0.5.87

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.86"
11+
__version__ = "0.5.87"
1212
__author__ = "STTS Project"
1313

1414
# Core analysis components (lightweight, always needed)

code2llm/cli_exports/formats.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ def _export_project_yaml(args, result, output_dir: Path):
6969
return filepath
7070

7171

72+
def _export_project_toon(args, result, output_dir: Path):
73+
"""Export project.toon.yaml directly from the current analysis result."""
74+
project_yaml_exporter = ProjectYAMLExporter()
75+
data = project_yaml_exporter._build_project_yaml(result, [])
76+
77+
exporter = ToonViewGenerator()
78+
filepath = output_dir / 'project.toon.yaml'
79+
exporter.generate(data, str(filepath))
80+
81+
if getattr(args, 'verbose', False):
82+
print(f" - PROJECT-TOON (project overview): {filepath}")
83+
84+
return filepath
85+
86+
7287
def _run_report(args, project_yaml_path: str, output_dir: Path) -> None:
7388
"""Generate views from project.yaml.
7489

code2llm/cli_exports/orchestrator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
_export_evolution,
1111
_export_data_structures,
1212
_export_context_fallback,
13+
_export_project_toon,
1314
_export_readme,
1415
_export_refactor_prompts,
1516
_export_index_html,
@@ -61,6 +62,9 @@ def _export_single_project(
6162
_export_data_structures(args, result, output_dir)
6263
_export_context_fallback(args, result, output_dir, formats)
6364

65+
if 'all' in requested_formats:
66+
_export_project_toon(args, result, output_dir)
67+
6468
if source_path is not None:
6569
_export_code2logic(args, source_path, output_dir, formats)
6670
_export_prompt_txt(args, output_dir, requested_formats, source_path)
@@ -95,6 +99,9 @@ def _export_chunked_results(
9599
_export_simple_formats(args, result, output_dir, ['toon', 'context'])
96100
_export_evolution(args, result, output_dir)
97101

102+
if 'all' in requested_formats:
103+
_export_project_toon(args, result, output_dir)
104+
98105
if source_path is not None:
99106
_export_code2logic(args, source_path, output_dir, formats)
100107
_export_chunked_prompt_txt(args, output_dir, requested_formats, source_path, subprojects)

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.86"
7+
__version__ = "0.5.87"
88

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

project/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ code2llm ./ -f yaml --separate-orphans
331331

332332
**Generated by**: `code2llm ./ -f all --readme`
333333
**Analysis Date**: 2026-03-26
334-
**Total Functions**: 932
334+
**Total Functions**: 933
335335
**Total Classes**: 106
336336
**Modules**: 117
337337

project/analysis.toon.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# code2llm | 113f 21434L | python:105,shell:2,php:1 | 2026-03-26
2-
# CC̄=4.6 | critical:10/932 | dups:0 | cycles:0
1+
# code2llm | 113f 21449L | python:105,shell:2,php:1 | 2026-03-26
2+
# CC̄=4.6 | critical:10/933 | dups:0 | cycles:0
33

44
HEALTH[10]:
55
🟡 CC main CC=17 (limit:15)
@@ -16,14 +16,14 @@ HEALTH[10]:
1616
REFACTOR[1]:
1717
1. split 10 high-CC methods (CC>15)
1818

19-
PIPELINES[637]:
20-
[1] Src [run_benchmark]: run_benchmark → load_previous
19+
PIPELINES[638]:
20+
[1] Src [read_readme]: read_readme
2121
PURITY: 100% pure
22-
[2] Src [read_readme]: read_readme
22+
[2] Src [save_report]: save_report
2323
PURITY: 100% pure
24-
[3] Src [main]: mainload_file → is_toon_file
24+
[3] Src [run_benchmark]: run_benchmarkload_previous
2525
PURITY: 100% pure
26-
[4] Src [save_report]: save_report
26+
[4] Src [main]: main → load_file → is_toon_file
2727
PURITY: 100% pure
2828
[5] Src [main]: main → create_html → get_shield_url
2929
PURITY: 100% pure
@@ -56,9 +56,9 @@ LAYERS:
5656
│ intent_matching 297L 3C 15m CC=7 ←0
5757
│ cfg 293L 1C 17m CC=5 ←0
5858
│ data_analysis 286L 1C 18m CC=14 ←0
59+
│ !! formats 286L 0C 12m CC=16 ←3
5960
│ llm_task 284L 0C 15m CC=14 ←0
6061
│ cli_parser 277L 0C 1m CC=1 ←1
61-
│ !! formats 271L 0C 11m CC=16 ←3
6262
│ toon_size_manager 265L 0C 8m CC=10 ←1
6363
│ context_exporter 248L 1C 15m CC=10 ←0
6464
│ dfg 224L 1C 12m CC=7 ←0

0 commit comments

Comments
 (0)