Skip to content

Commit 142272d

Browse files
refactor(docs): code analysis engine
changes: - file: test_performance.py area: test modified: [test_max_workers_limiting, TestPerformanceOptimizations, test_parallel_vs_sequential_performance] stats: lines: "+1286/-733 (net +553)" files: 14 complexity: "Stable complexity"
1 parent fc6f19d commit 142272d

19 files changed

+1311
-736
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
124124
- **Tree-sitter for all** — syntax validation for 165+ languages
125125
- **Example 07** — comprehensive multi-language demo with 8 languages
126126

127+
## [0.1.15] - 2026-03-23
128+
129+
### Docs
130+
- Update docs/README.md
131+
- Update project/README.md
132+
133+
### Test
134+
- Update tests/test_performance.py
135+
136+
### Other
137+
- Update project/analysis.yaml
138+
- Update project/calls.mmd
139+
- Update project/calls.png
140+
- Update project/compact_flow.mmd
141+
- Update project/compact_flow.png
142+
- Update project/duplication.toon
143+
- Update project/evolution.toon
144+
- Update project/flow.mmd
145+
- Update project/flow.png
146+
- Update project/index.html
147+
- ... and 2 more files
148+
127149
## [0.1.14] - 2026-03-23
128150

129151
### Other

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.14
1+
0.1.15

docs/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- code2docs:start --># vallm
22

33
![version](https://img.shields.io/badge/version-0.1.0-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.10-blue) ![coverage](https://img.shields.io/badge/coverage-unknown-lightgrey) ![functions](https://img.shields.io/badge/functions-322-green)
4-
> **322** functions | **40** classes | **82** files | CC̄ = 3.4
4+
> **322** functions | **40** classes | **82** files | CC̄ = 3.5
55
66
> Auto-generated project documentation from source code analysis.
77
@@ -151,18 +151,18 @@ Content outside the markers is preserved when regenerating. Enable this with `sy
151151

152152
```
153153
vallm/
154-
├── examples/ ├── cli/ ├── hookspecs ├── vallm/ ├── __main__ ├── bump_version ├── base ├── complexity ├── logical ├── validators/ ├── semantic_cache ├── security ├── syntax ├── lint ├── imports/ ├── semantic ├── graph_diff ├── core/ ├── ast_compare ├── proposal ├── gitignore ├── scoring ├── output_formatters ├── batch_processor ├── languages ├── sandbox/ ├── base ├── javascript_imports ├── python_imports ├── go_imports ├── c_imports ├── rust_imports ├── utils ├── wrapper ├── factory ├── java_imports ├── main_template ├── main ├── main ├── claude_autonomous_demo ├── main ├── ollama_simple_demo ├── iteration_1 ├── best_version ├── iteration_2 ├── main ├── main ├── main ├── main_template ├── main ├── main ├── refactored_output ├── runner ├── utils/ ├── mcp_demo ├── extraction ├── save_analysis_data ├── extract_code_from_response ├── logging_utils ├── validation_runner ├── order_processor ├── main ├── process_user_input ├── load_config ├── simple_buggy ├── utils/ ├── calculate_total ├── main ├── save_data├── project ├── run ├── run ├── docker-entrypoint ├── run ├── docker-entrypoint ├── run ├── docker-entrypoint ├── data_processor ├── config ├── command_handlers```
154+
├── bump_version ├── cli/├── examples/ ├── hookspecs ├── vallm/ ├── __main__ ├── base ├── logical ├── complexity ├── validators/ ├── security ├── semantic_cache ├── syntax ├── lint ├── semantic ├── imports/ ├── graph_diff ├── core/ ├── ast_compare ├── proposal ├── gitignore ├── scoring ├── output_formatters ├── batch_processor ├── languages ├── sandbox/ ├── base ├── javascript_imports ├── python_imports ├── go_imports ├── c_imports ├── rust_imports ├── utils ├── wrapper ├── factory ├── java_imports ├── main_template ├── main ├── main ├── claude_autonomous_demo ├── main ├── ollama_simple_demo ├── iteration_1 ├── best_version ├── iteration_2 ├── main ├── main ├── main ├── main_template ├── main ├── main ├── refactored_output ├── mcp_demo ├── runner ├── utils/ ├── save_analysis_data ├── extraction ├── extract_code_from_response ├── logging_utils ├── validation_runner ├── order_processor ├── main ├── simple_buggy ├── load_config ├── utils/ ├── process_user_input ├── calculate_total ├── main ├── save_data├── project ├── run ├── run ├── docker-entrypoint ├── run ├── docker-entrypoint ├── run ├── docker-entrypoint ├── data_processor ├── config ├── command_handlers```
155155
156156
## API Overview
157157
158158
### Classes
159159
160160
- **`VallmSpec`** — Hook specifications that validators must implement.
161161
- **`BaseValidator`** — Base class for all vallm validators.
162-
- **`ComplexityValidator`** — Tier 2: Cyclomatic complexity, maintainability index, and function metrics.
163162
- **`LogicalErrorValidator`** — Validator for logical errors using pyflakes.
164-
- **`SemanticCache`** — Cache for semantic validation results to improve performance.
163+
- **`ComplexityValidator`** — Tier 2: Cyclomatic complexity, maintainability index, and function metrics.
165164
- **`SecurityValidator`** — Tier 2: Security analysis using built-in patterns and optionally bandit.
165+
- **`SemanticCache`** — Cache for semantic validation results to improve performance.
166166
- **`SyntaxValidator`** — Tier 1: Fast syntax validation.
167167
- **`LintValidator`** — Validator for linting issues using ruff.
168168
- **`SemanticValidator`** — Tier 3: LLM-as-judge semantic code review.
@@ -188,9 +188,9 @@ vallm/
188188
- **`Colors`** — —
189189
- **`Colors`** — —
190190
- **`OrderManager`** — Class with single responsibility - adheres to SOLID principles.
191+
- **`Colors`** — —
191192
- **`ExecutionResult`** — Result of sandboxed code execution.
192193
- **`SandboxRunner`** — Unified interface for running code in a sandbox.
193-
- **`Colors`** — —
194194
- **`Colors`** — ANSI color codes for terminal output.
195195
- **`OrderManager`** — Class with mixed responsibilities - SOLID violation.
196196
- **`BadClass`** — Class with multiple issues.
@@ -229,9 +229,9 @@ vallm/
229229
- `output_rich(result, verbose)` — Output rich formatted validation result.
230230
- `output_batch_rich(results_by_language, filtered_files, passed_count, failed_files)` — Output rich formatted batch summary.
231231
- `output_batch_text(results_by_language, filtered_files, passed_count, failed_files)` — Output plain text batch summary.
232-
- `output_batch_json(results_by_language, filtered_files, passed_count, failed_files)` — Output JSON batch summary.
233-
- `output_batch_yaml(results_by_language, filtered_files, passed_count, failed_files)` — Output YAML batch summary.
234-
- `output_batch_toon(results_by_language, filtered_files, passed_count, failed_files)` — Output TOON format batch summary.
232+
- `output_batch_json(results_by_language, filtered_files, passed_count, failed_files)` — Output JSON batch summary with detailed per-file results.
233+
- `output_batch_yaml(results_by_language, filtered_files, passed_count, failed_files)` — Output YAML batch summary with detailed per-file results.
234+
- `output_batch_toon(results_by_language, filtered_files, passed_count, failed_files)` — Output TOON format batch summary with detailed per-file results.
235235
- `print_summary_header()` — Print summary header for batch results.
236236
- `build_results_table(results_by_language)` — Build results table for rich output.
237237
- `detect_language(source)` — Auto-detect language from file path, extension, or name.
@@ -297,10 +297,6 @@ vallm/
297297
- `save_data(data, filename)` — Save data safely using json.dump.
298298
- `process_order(data)` — Process order data with proper error handling and validation.
299299
- `main()` — —
300-
- `save_analysis_data(example_name, result_data)` — Save analysis data to .vallm folder.
301-
- `run_validation_examples(example_name, good_code, bad_code, complex_code)` — Run standard validation examples (good, bad, complex code).
302-
- `validate_code_example(name, code, settings, all_results)` — Validate a code example and store results.
303-
- `print_summary(all_results)` — Print summary of all validation results.
304300
- `log_section(title)` — Print a section header.
305301
- `log_step(step, description)` — Print a step.
306302
- `log_code(label, code, max_lines)` — Log code with label.
@@ -310,9 +306,13 @@ vallm/
310306
- `generate_refactoring_prompt(code, analysis)` — Generate prompt for LLM to refactor code.
311307
- `run_mcp_workflow(code_path, max_iterations)` — Run the complete MCP workflow.
312308
- `main()` — Main entry point.
309+
- `save_analysis_data(example_name, result_data)` — Save analysis data to .vallm folder.
310+
- `run_validation_examples(example_name, good_code, bad_code, complex_code)` — Run standard validation examples (good, bad, complex code).
311+
- `validate_code_example(name, code, settings, all_results)` — Validate a code example and store results.
312+
- `print_summary(all_results)` — Print summary of all validation results.
313+
- `save_analysis_data(example_name, result_data)` — Save analysis data to JSON file.
313314
- `extract_code_from_response(response, language)` — Extract code from LLM response.
314315
- `extract_json_from_response(response)` — Extract JSON object from LLM response.
315-
- `save_analysis_data(example_name, result_data)` — Save analysis data to JSON file.
316316
- `extract_code_from_response(response)` — Extract Python code from LLM response.
317317
- `log_section(title)` — Print a section header.
318318
- `log_step(step, description)` — Print a step indicator.
@@ -332,15 +332,15 @@ vallm/
332332
- `validate_with_vallm(project_path)` — Validate all Python files with vallm.
333333
- `generate_report(code2llm_result, vallm_result, output_path)` — Generate combined analysis report.
334334
- `main()` — Main example function.
335-
- `process_user_input(user_input)` — Process user input with standard logic.
336-
- `load_config()` — Load configuration with default values.
337335
- `process_user_input(user_input)` — Process user input with security issues.
338336
- `load_config()` — Load configuration with eval.
339337
- `save_data(data, filename)` — Save data without validation.
340338
- `calculate_total(items)` — Calculate total with no error handling.
341339
- `duplicate_function()` — Another duplicate function.
342340
- `unused_function()` — This function is never used.
343341
- `main()` — Main function with problems.
342+
- `load_config()` — Load configuration with default values.
343+
- `process_user_input(user_input)` — Process user input with standard logic.
344344
- `calculate_total(items)` — Calculate total price from items list.
345345
- `run_demo_main()` — Run the standard demo main function pattern.
346346
- `save_data(data, filename)` — Save data to JSON file.

project/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ When you run `code2llm ./ -f all`, the following files are created:
1010

1111
| File | Format | Purpose | Key Insights |
1212
|------|--------|---------|--------------|
13-
| `analysis.toon` | **TOON** | **🔥 Health diagnostics** - Complexity, god modules, coupling | 9 critical functions, 0 god modules |
13+
| `analysis.toon` | **TOON** | **🔥 Health diagnostics** - Complexity, god modules, coupling | 7 critical functions, 0 god modules |
1414
| `evolution.toon` | **TOON** | **📋 Refactoring queue** - Prioritized improvements | 0 refactoring actions needed |
1515
| `flow.toon` | **TOON** | **🔄 Data flow analysis** - Pipelines, contracts, types | Data dependencies and side effects |
1616
| `map.toon` | **TOON** | **🗺️ Structural map** - Modules, imports, signatures | Project architecture overview |
@@ -338,8 +338,8 @@ code2llm ./ -f yaml --separate-orphans
338338

339339
**Generated by**: `code2llm ./ -f all --readme`
340340
**Analysis Date**: 2026-03-23
341-
**Total Functions**: 12079
342-
**Total Classes**: 3036
343-
**Modules**: 1419
341+
**Total Functions**: 12066
342+
**Total Classes**: 3035
343+
**Modules**: 1418
344344

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

project/analysis.yaml

Whitespace-only changes.

0 commit comments

Comments
 (0)