Skip to content

Commit a3a9d06

Browse files
refactor(docs): code analysis engine
changes: - file: ast_helpers.py area: analyzer added: [ast_unparse] - file: cli_analysis.py area: analyzer modified: [_build_config] - file: cli_commands.py area: cli added: [handle_cache_command] modified: [handle_special_commands] - file: orchestrator.py area: cli added: [_export_readme, _export_mermaid_pngs, _get_format_kwargs, _export_single, _export_calls, _expand_all_formats, +8 more] modified: [_get_filtered_subprojects, _run_exports] removed: [_export_chunked_results, _export_single_project, _process_subproject_result] - file: cli_parser.py area: analyzer modified: [create_parser] - file: analyzer.py area: analyzer added: [_print_summary, _build_stats, _load_from_persistent_cache, _resolve_call, _store_to_persistent_cache, _find_entry_points, +4 more] modified: [analyze_project, _build_call_graph, ProjectAnalyzer] - file: file_filter.py area: core added: [_passes_gitignore, _passes_excludes, _passes_line_count, _passes_visibility, _passes_includes] modified: [FastFileFilter, should_process, should_skip_function] - file: gitignore.py area: core added: [_pattern_to_regex, _parse_entry, _GitIgnoreEntry] modified: [_load_gitignore, GitIgnoreParser, is_ignored, __init__] removed: [_parse_pattern, _wildcard_to_regex] - file: persistent_cache.py area: core added: [save, get_changed_files, put_file_result, content_hash, gc, cache_size_mb, +13 more] - file: base.py area: core added: [generate, get_exporter, _write_text, export_format, BaseExporter, decorator, +2 more] modified: [export] removed: [Exporter] - file: context_exporter.py area: core modified: [export, ContextExporter] - file: evolution_exporter.py area: core modified: [export, EvolutionExporter] - file: flow_exporter.py area: core modified: [FlowExporter, export] - file: json_exporter.py area: core modified: [export, JSONExporter] - file: map_exporter.py area: core modified: [export, MapExporter] - file: mermaid_exporter.py area: core added: [_build_callers_graph, _find_leaves, _longest_path_dfs, _select_longest_path] modified: [export, _find_critical_path, MermaidExporter, _write] removed: [longest_path_dfs] - file: core.py area: core modified: [export, ProjectYAMLExporter] - file: readme_exporter.py area: docs modified: [READMEExporter, export] - file: helpers.py area: util modified: [_scan_line_counts] - file: yaml_exporter.py area: core modified: [export, YAMLExporter] - file: mermaid.py area: core added: [_prepare_and_render] modified: [generate_pngs] - file: sample.py area: test added: [add, list_all, Product, find_by_id, ProductRepository] modified: [__init__, main] removed: [process_users, UserService, get_user, add_user, User] - file: test_persistent_cache.py area: test added: [TestClear, tmp_project, TestFileResultRoundtrip, cache, TestGetChangedFiles, TestContentHash, +4 more] new_tests: 20 - file: test_project_toon_export.py area: test modified: [test_export_single_project_all_triggers_project_toon] testing: new_tests: 20 scenarios: - version_mismatch_resets_manifest - manifest_updated_after_put - new_files_are_changed - gc_removes_old_exports - put_then_get - get_all_projects_after_save - different_config_different_dir - missing_export_returns_none - modified_file_is_changed - save_creates_manifest # +10 more dependencies: flow: "orchestrator→prompt, analyzer→file_filter→gitignore" - orchestrator.py -> prompt.py - analyzer.py -> file_filter.py - analyzer.py -> persistent_cache.py - file_filter.py -> gitignore.py stats: lines: "+10853/-2205 (net +8648)" files: 54 complexity: "Large structural change (normalized)"
1 parent 9a3b7f7 commit a3a9d06

80 files changed

Lines changed: 10896 additions & 2209 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

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

3+
## [0.5.115] - 2026-04-19
4+
5+
### Docs
6+
- Update README.md
7+
- Update SUMD.md
8+
- Update SUMR.md
9+
- Update context.md
10+
- Update docs/README.md
11+
- Update project/README.md
12+
- Update project/batch_1/context.md
13+
- Update project/context.md
14+
- Update project/root/context.md
15+
- Update project/test_python_only_examples/context.md
16+
- ... and 1 more files
17+
18+
### Test
19+
- Update test_langs/valid/sample.py
20+
- Update test_python_only_examples_tests/analysis.toon.yaml
21+
- Update tests/test_persistent_cache.py
22+
- Update tests/test_project_toon_export.py
23+
24+
### Other
25+
- Update Taskfile.yml
26+
- Update analysis.toon
27+
- Update analysis.toon.yaml
28+
- Update batch_1/analysis.toon.yaml
29+
- Update code2llm/analysis/utils/ast_helpers.py
30+
- Update code2llm/cli_analysis.py
31+
- Update code2llm/cli_commands.py
32+
- Update code2llm/cli_exports/orchestrator.py
33+
- Update code2llm/cli_parser.py
34+
- Update code2llm/core/analyzer.py
35+
- ... and 49 more files
36+
337
## [0.5.114] - 2026-04-18
438

539
## [0.5.113] - 2026-04-18

README.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# code2llm - Generated Analysis Files
22

3+
4+
## AI Cost Tracking
5+
6+
![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.5.115-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-57.3h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
8+
9+
- 🤖 **LLM usage:** $7.5000 (166 commits)
10+
- 👤 **Human dev:** ~$5731 (57.3h @ $100/h, 30min dedup)
11+
12+
Generated on 2026-04-19 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
13+
14+
---
15+
16+
17+
318
This directory contains the complete analysis of your project generated by `code2llm`. Each file serves a specific purpose for understanding, refactoring, and documenting your codebase.
419

520
## 📁 Generated Files Overview
@@ -10,7 +25,7 @@ When you run `code2llm ./ -f all`, the following files are created:
1025

1126
| File | Format | Purpose | Key Insights |
1227
|------|--------|---------|--------------|
13-
| `analysis.toon` | **TOON** | **🔥 Health diagnostics** - Health, LAYERS, COUPLING | 69 critical functions, 0 god modules |
28+
| `evolution.toon.yaml` | **YAML** | **📋 Refactoring queue** - Prioritized improvements | 0 refactoring actions needed |
1429

1530
### 🤖 LLM-Ready Documentation
1631

@@ -22,9 +37,7 @@ When you run `code2llm ./ -f all`, the following files are created:
2237

2338
| File | Format | Purpose | Description |
2439
|------|--------|---------|-------------|
25-
| `flow.mmd` | **Mermaid** | **🔄 Control flow diagram** | Function call paths with complexity styling |
2640
| `calls.mmd` | **Mermaid** | **📞 Call graph** | Function dependencies (edges only) |
27-
| `compact_flow.mmd` | **Mermaid** | **📦 Module overview** | Aggregated module-level view |
2841

2942
## 🚀 Quick Start Commands
3043

@@ -329,9 +342,14 @@ code2llm ./ -f yaml --separate-orphans
329342
---
330343

331344
**Generated by**: `code2llm ./ -f all --readme`
332-
**Analysis Date**: 2026-04-18
333-
**Total Functions**: 1041
334-
**Total Classes**: 111
335-
**Modules**: 143
345+
**Analysis Date**: 2026-04-19
346+
**Total Functions**: 1115
347+
**Total Classes**: 121
348+
**Modules**: 152
336349

337350
For more information about code2llm, visit: https://github.com/tom-sapletta/code2llm
351+
352+
353+
## License
354+
355+
Licensed under Apache-2.0.

0 commit comments

Comments
 (0)