Skip to content

Commit de4b3d5

Browse files
refactor(docs): code analysis engine
stats: lines: "+332/-274 (net +58)" files: 13 complexity: "Stable complexity"
1 parent edfe1a4 commit de4b3d5

File tree

18 files changed

+354
-278
lines changed

18 files changed

+354
-278
lines changed

CHANGELOG.md

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

3+
## [0.5.90] - 2026-03-26
4+
5+
### Docs
6+
- Update project/README.md
7+
- Update project/context.md
8+
9+
### Other
10+
- Update project/analysis.toon.yaml
11+
- Update project/calls.mmd
12+
- Update project/calls.png
13+
- Update project/compact_flow.mmd
14+
- Update project/flow.mmd
15+
- Update project/flow.png
16+
- Update project/index.html
17+
- Update project/map.toon.yaml
18+
- Update project/project.toon.yaml
19+
- Update project/prompt.txt
20+
321
## [0.5.89] - 2026-03-26
422

523
## [0.5.88] - 2026-03-26

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.89
1+
0.5.90

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

1414
# Core analysis components (lightweight, always needed)

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.89"
7+
__version__ = "0.5.90"
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
@@ -153,7 +153,7 @@ grep -E "^ .*[0-9]{3,}$" project.toon.yaml | sort -t',' -k2 -n -r | head -10
153153
**Purpose**: Pre-formatted prompt listing all generated files for LLM conversation
154154
**Generation**: Written when `code2llm` runs with a source path and requests `-f all` (including `--no-chunk`) or `code2logic`
155155
**Contents**:
156-
- **Files section**: Lists all existing generated files with descriptions
156+
- **Files section**: Lists all existing generated files with descriptions, including `project.toon.yaml` when generated by `-f all`
157157
- **Source files section**: Highlights important source files such as `cli_exports/orchestrator.py`
158158
- **Missing section**: Shows which files weren't generated (if any)
159159
- **Task section**: Instructions for LLM analysis

project/analysis.toon.yaml

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

44
HEALTH[10]:
@@ -16,7 +16,7 @@ HEALTH[10]:
1616
REFACTOR[1]:
1717
1. split 10 high-CC methods (CC>15)
1818

19-
PIPELINES[638]:
19+
PIPELINES[637]:
2020
[1] Src [read_readme]: read_readme
2121
PURITY: 100% pure
2222
[2] Src [save_report]: save_report
@@ -25,7 +25,7 @@ PIPELINES[638]:
2525
PURITY: 100% pure
2626
[4] Src [main]: main → load_file → is_toon_file
2727
PURITY: 100% pure
28-
[5] Src [main]: main → create_html → get_shield_url
28+
[5] Src [__init__]: __init__
2929
PURITY: 100% pure
3030

3131
LAYERS:
@@ -43,7 +43,7 @@ LAYERS:
4343
│ evolution_exporter 471L 1C 17m CC=11 ←0
4444
│ renderer 471L 1C 26m CC=11 ←0
4545
│ !! map_exporter 435L 1C 21m CC=25 ←4
46-
│ prompt 411L 0C 17m CC=13 ←1
46+
│ prompt 426L 0C 17m CC=14 ←1
4747
│ file_analyzer 398L 1C 17m CC=12 ←0
4848
│ flow_exporter 391L 1C 14m CC=10 ←0
4949
│ pipeline 388L 3C 20m CC=10 ←0
@@ -55,8 +55,8 @@ LAYERS:
5555
│ type_inference 321L 1C 19m CC=9 ←0
5656
│ intent_matching 297L 3C 15m CC=7 ←0
5757
│ cfg 293L 1C 17m CC=5 ←0
58+
│ !! formats 287L 0C 12m CC=16 ←3
5859
│ data_analysis 286L 1C 18m CC=14 ←0
59-
│ !! formats 286L 0C 12m CC=16 ←3
6060
│ llm_task 284L 0C 15m CC=14 ←0
6161
│ cli_parser 277L 0C 1m CC=1 ←1
6262
│ toon_size_manager 265L 0C 8m CC=10 ←1
@@ -79,8 +79,8 @@ LAYERS:
7979
│ module_detail 162L 1C 9m CC=7 ←0
8080
│ toon_view 157L 1C 9m CC=6 ←0
8181
│ prompt_engine 150L 1C 7m CC=12 ←0
82+
│ orchestrator 149L 0C 5m CC=11 ←1
8283
│ toon_parser 147L 0C 10m CC=8 ←1
83-
│ orchestrator 142L 0C 5m CC=11 ←1
8484
│ context_view 140L 1C 8m CC=11 ←0
8585
│ gitignore 139L 1C 6m CC=10 ←2
8686
│ !! ruby 135L 0C 2m CC=17 ←1

project/calls.mmd

Lines changed: 207 additions & 204 deletions
Large diffs are not rendered by default.

project/calls.png

-70.3 KB
Loading

project/compact_flow.mmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ flowchart TD
1616
code2llm_cli ==>|5| code2llm_cli_commands
1717
code2llm_cli_exports -->|3| code2llm_exporters
1818
validate_toon -->|2| code2llm_parsers
19-
code2llm_cli_analysis -->|2| code2llm_cli_exports
2019
benchmarks_benchmark_format_quality -->|2| benchmarks_reporting
20+
code2llm_cli_analysis -->|2| code2llm_cli_exports
2121
code2llm_cli -->|1| code2llm_cli_parser
2222
code2llm_cli -->|1| code2llm_cli_analysis
2323
code2llm_cli -->|1| code2llm_cli_exports
24-
code2llm_cli_analysis -->|1| code2llm_core
25-
code2llm_cli_commands -->|1| code2llm_cli_exports
2624
benchmarks_benchmark_format_quality -->|1| benchmarks_format_evaluator
2725
benchmarks_benchmark_format_quality -->|1| benchmarks_project_generator
26+
code2llm_cli_analysis -->|1| code2llm_core
27+
code2llm_cli_commands -->|1| code2llm_cli_exports
2828
code2llm_cli_exports -->|1| code2llm_core
2929
code2llm_cli_exports -->|1| code2llm_generators

project/context.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- **Total Functions**: 933
1010
- **Total Classes**: 106
1111
- **Modules**: 117
12-
- **Entry Points**: 696
12+
- **Entry Points**: 695
1313

1414
## Architecture by Module
1515

@@ -53,16 +53,16 @@
5353
- **Classes**: 1
5454
- **File**: `type_inference.py`
5555

56-
### code2llm.analysis.data_analysis
57-
- **Functions**: 18
58-
- **Classes**: 1
59-
- **File**: `data_analysis.py`
60-
6156
### code2llm.analysis.pipeline_detector
6257
- **Functions**: 18
6358
- **Classes**: 3
6459
- **File**: `pipeline_detector.py`
6560

61+
### code2llm.analysis.data_analysis
62+
- **Functions**: 18
63+
- **Classes**: 1
64+
- **File**: `data_analysis.py`
65+
6666
### code2llm.exporters.project_yaml_exporter
6767
- **Functions**: 18
6868
- **Classes**: 1
@@ -473,6 +473,10 @@ Key functions that process and transform data:
473473
> Create CLI argument parser.
474474
- **Output to**: argparse.ArgumentParser, parser.add_argument, parser.add_argument, parser.add_argument, parser.add_argument
475475

476+
### benchmarks.benchmark_format_quality._generate_format_outputs
477+
> Generate all format outputs and evaluate them.
478+
- **Output to**: format_configs.items, __import__, getattr, exporter_cls, time.time
479+
476480
### demo_langs.valid.sample.UserService.process_users
477481
- **Output to**: print
478482

@@ -487,10 +491,6 @@ Checks:
487491
1. All chunks have required files (analysis.toon, contex
488492
- **Output to**: print, print, sorted, print, print
489493

490-
### benchmarks.benchmark_format_quality._generate_format_outputs
491-
> Generate all format outputs and evaluate them.
492-
- **Output to**: format_configs.items, __import__, getattr, exporter_cls, time.time
493-
494494
### code2llm.analysis.data_analysis.DataAnalyzer._identify_process_patterns
495495
- **Output to**: result.functions.items, patterns.items, sorted, func.name.lower, indicators.items
496496

@@ -502,10 +502,6 @@ Checks:
502502
> Process Python files directly in level1 directory.
503503
- **Output to**: code2llm.core.repo_files._get_gitignore_parser, len, chunks.append, self._chunk_by_files, chunks.extend
504504

505-
### code2llm.analysis.cfg.CFGExtractor._format_except
506-
> Format except handler.
507-
- **Output to**: self._expr_to_str
508-
509505
### code2llm.core.repo_files._get_gitignore_parser
510506
> Load gitignore parser for project if available.
511507
- **Output to**: code2llm.core.gitignore.load_gitignore_patterns
@@ -524,6 +520,10 @@ Returns list of (module_name, start_line, end_line).
524520
> Check if file should be processed.
525521
- **Output to**: file_path.lower, Path, self._gitignore_parser.is_ignored, any, fnmatch.fnmatch
526522

523+
### code2llm.analysis.cfg.CFGExtractor._format_except
524+
> Format except handler.
525+
- **Output to**: self._expr_to_str
526+
527527
### code2llm.core.file_analyzer.FileAnalyzer._process_class
528528
> Process class definition.
529529
- **Output to**: ClassInfo, None.classes.append, isinstance, isinstance, methods.append

0 commit comments

Comments
 (0)