Skip to content

Commit 00049c0

Browse files
refactor(docs): code analysis engine
stats: lines: "+2132/-820 (net +1312)" files: 16 complexity: "Stable complexity"
1 parent 197342f commit 00049c0

17 files changed

Lines changed: 2132 additions & 820 deletions

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
## AI Cost Tracking
22

3-
![AI Cost](https://img.shields.io/badge/AI%20Cost-$7.50-yellow) ![AI Model](https://img.shields.io/badge/AI%20Model-openrouter%2Fqwen%2Fqwen3-coder-next-lightgrey)
3+
![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-3.0.34-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
4+
![AI Cost](https://img.shields.io/badge/AI%20Cost-$41.89-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-29.8h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
45

5-
This project uses AI-generated code. Total cost: **$7.5000** with **77** AI commits.
6+
- 🤖 **LLM usage:** $41.8907 (78 commits)
7+
- 👤 **Human dev:** ~$2984 (29.8h @ $100/h, 30min dedup)
68

7-
Generated on 2026-06-29 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/models/openrouter/qwen/qwen3-coder-next)
9+
Generated on 2026-07-06 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
810

911
---
1012

local.dev.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# local.dev.txt — locally developed dependencies of this project (generated 2026-07-04)
2+
# by ~/github/local.dev.sh — DO NOT EDIT; see ~/github/local.dev.md
3+
# project: code2docs 3.0.34 (python) at /home/tom/github/semcod/code2docs
4+
# deps declared: 22 | with local source: 5
5+
6+
## LOCAL DEPS (dep | required | local source (version) | installed | status)
7+
code2llm | >=0.5.0 | /home/tom/github/semcod/code2llm (0.5.169) | 0.5.102 non-editable | STALE-INSTALL (local 0.5.169) -> fix: pip install -e /home/tom/github/semcod/code2llm [pyproject.toml]
8+
code2llm | >=0.5.0 | /home/tom/github/wronai/teLLMe/code2llm-src (0.5.23) | 0.5.102 non-editable | STALE-INSTALL (local 0.5.23) -> fix: pip install -e /home/tom/github/wronai/teLLMe/code2llm-src [pyproject.toml]
9+
costs | >=0.1.20 | /home/tom/github/semcod/costs (0.1.53) | 0.1.48 non-editable | STALE-INSTALL (local 0.1.53) -> fix: pip install -e /home/tom/github/semcod/costs [pyproject.toml[dev]]
10+
goal | >=2.1.0 | /home/tom/github/semcod/goal (2.1.266) | 2.1.171 non-editable | STALE-INSTALL (local 2.1.266) -> fix: pip install -e /home/tom/github/semcod/goal [pyproject.toml[dev]]
11+
pfix | >=0.1.60 | /home/tom/github/semcod/pfix (0.1.76) | 0.1.73 editable | OK-EDITABLE [pyproject.toml[dev]]
12+
13+
## EXTERNAL DEPS (no local source, 17): black, build, click, gitpython, jinja2, litellm, mkdocs, mkdocs-material, mypy, pytest, pytest-cov, python-dotenv, pyyaml, rich, ruff, twine, watchdog

project/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# code2llm - Generated Analysis Files
2+
<!-- generated in 0.00s -->
23

3-
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.
4+
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. # noqa: E501
45

56
## 📁 Generated Files Overview
67

@@ -151,13 +152,13 @@ grep -E "^ .*[0-9]{3,}$" project.toon.yaml | sort -t',' -k2 -n -r | head -10
151152

152153
### `prompt.txt` - Ready-to-Send LLM Prompt
153154
**Purpose**: Pre-formatted prompt listing all generated files for LLM conversation
154-
**Generation**: Written when `code2llm` runs with a source path and requests `-f all` (including `--no-chunk`) or `code2logic`
155+
**Generation**: Written when `code2llm` runs with a source path and requests `-f all` (including `--no-chunk`) or `code2logic` # noqa: E501
155156
**Contents**:
156-
- **Files section**: Lists all existing generated files with descriptions, including `project.toon.yaml` when generated by `-f all`
157+
- **Files section**: Lists all existing generated files with descriptions, including `project.toon.yaml` when generated by `-f all` # noqa: E501
157158
- **Source files section**: Highlights important source files such as `cli_exports/orchestrator.py`
158159
- **Missing section**: Shows which files weren't generated (if any)
159160
- **Task section**: Refactoring brief with concrete execution instructions, not just analysis
160-
- **Priority Order section**: State-dependent refactoring priorities, starting with blockers and then architecture cleanup
161+
- **Priority Order section**: State-dependent refactoring priorities, starting with blockers and then architecture cleanup # noqa: E501
161162
- **Requirements section**: Guidelines for suggested changes
162163

163164
**Example usage**:
@@ -331,9 +332,9 @@ code2llm ./ -f yaml --separate-orphans
331332
---
332333

333334
**Generated by**: `code2llm ./ -f all --readme`
334-
**Analysis Date**: 2026-04-20
335+
**Analysis Date**: 2026-07-06
335336
**Total Functions**: 365
336337
**Total Classes**: 62
337-
**Modules**: 56
338+
**Modules**: 86
338339

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

project/analysis.toon.yaml

Lines changed: 164 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,172 @@
1-
# code2llm | 56f 7082L | python:55,shell:1 | 2026-04-20
2-
# CC̄=3.7 | critical:0/365 | dups:0 | cycles:0
1+
# code2llm | 86f 18058L | python:55,md:22,yaml:5,txt:1,toml:1,yml:1,shell:1 | 2026-07-06
2+
# generated in 0.02s
3+
# CC̅=3.7 | critical:0/365 | dups:0 | cycles:0
34

45
HEALTH[0]: ok
56

67
REFACTOR[0]: none needed
78

89
PIPELINES[295]:
9-
[1] Src [heading]: heading
10+
[1] Src [from_env]: from_env
1011
PURITY: 100% pure
11-
[2] Src [paragraph]: paragraph
12+
[2] Src [__post_init__]: __post_init__
1213
PURITY: 100% pure
13-
[3] Src [blockquote]: blockquote
14+
[3] Src [_detect_repo_url]: _detect_repo_url
1415
PURITY: 100% pure
15-
[4] Src [code_block]: code_block
16+
[4] Src [from_yaml]: from_yaml
1617
PURITY: 100% pure
17-
[5] Src [list_item]: list_item
18+
[5] Src [to_yaml]: to_yaml
19+
PURITY: 100% pure
20+
[6] Src [parse_args]: parse_args
21+
PURITY: 100% pure
22+
[7] Src [main]: main
23+
PURITY: 100% pure
24+
[8] Src [generate]: generate → _load_config
25+
PURITY: 100% pure
26+
[9] Src [sync]: sync → _load_config
27+
PURITY: 100% pure
28+
[10] Src [watch]: watch → _load_config
29+
PURITY: 100% pure
30+
[11] Src [init]: init
31+
PURITY: 100% pure
32+
[12] Src [check]: check → _load_config
33+
PURITY: 100% pure
34+
[13] Src [validate]: validate → validate_markdown_tree → validate_markdown_file → _check_links → ...(1 more)
35+
PURITY: 100% pure
36+
[14] Src [diff]: diff → _load_config
37+
PURITY: 100% pure
38+
[15] Src [add]: add
39+
PURITY: 100% pure
40+
[16] Src [run_all]: run_all
41+
PURITY: 100% pure
42+
[17] Src [run_only]: run_only
43+
PURITY: 100% pure
44+
[18] Src [complete]: complete → _get_litellm
45+
PURITY: 100% pure
46+
[19] Src [generate_project_description]: generate_project_description
47+
PURITY: 100% pure
48+
[20] Src [generate_architecture_summary]: generate_architecture_summary
49+
PURITY: 100% pure
50+
[21] Src [generate_getting_started_summary]: generate_getting_started_summary
51+
PURITY: 100% pure
52+
[22] Src [enhance_module_docstring]: enhance_module_docstring
53+
PURITY: 100% pure
54+
[23] Src [__getattr__]: __getattr__
55+
PURITY: 100% pure
56+
[24] Src [__init__]: __init__
57+
PURITY: 100% pure
58+
[25] Src [apply]: apply
59+
PURITY: 100% pure
60+
[26] Src [__init__]: __init__
61+
PURITY: 100% pure
62+
[27] Src [detect_changes]: detect_changes
63+
PURITY: 100% pure
64+
[28] Src [save_state]: save_state
65+
PURITY: 100% pure
66+
[29] Src [_load_state]: _load_state
67+
PURITY: 100% pure
68+
[30] Src [_compute_state]: _compute_state
69+
PURITY: 100% pure
70+
[31] Src [_file_to_module]: _file_to_module
71+
PURITY: 100% pure
72+
[32] Src [heading]: heading
73+
PURITY: 100% pure
74+
[33] Src [paragraph]: paragraph
75+
PURITY: 100% pure
76+
[34] Src [blockquote]: blockquote
77+
PURITY: 100% pure
78+
[35] Src [code_block]: code_block
79+
PURITY: 100% pure
80+
[36] Src [list_item]: list_item
81+
PURITY: 100% pure
82+
[37] Src [table]: table
83+
PURITY: 100% pure
84+
[38] Src [separator]: separator
85+
PURITY: 100% pure
86+
[39] Src [blank]: blank
87+
PURITY: 100% pure
88+
[40] Src [render]: render
89+
PURITY: 100% pure
90+
[41] Src [__init__]: __init__
91+
PURITY: 100% pure
92+
[42] Src [generate]: generate
93+
PURITY: 100% pure
94+
[43] Src [_build_context]: _build_context → generate_badges → _make_badge → _runtime_badge
95+
PURITY: 100% pure
96+
[44] Src [_collect_existing_docs]: _collect_existing_docs
97+
PURITY: 100% pure
98+
[45] Src [_calc_avg_complexity]: _calc_avg_complexity
99+
PURITY: 100% pure
100+
[46] Src [_build_module_tree]: _build_module_tree
101+
PURITY: 100% pure
102+
[47] Src [_generate_description]: _generate_description
103+
PURITY: 100% pure
104+
[48] Src [_extract_project_description]: _extract_project_description
105+
PURITY: 100% pure
106+
[49] Src [_extract_project_metadata]: _extract_project_metadata
107+
PURITY: 100% pure
108+
[50] Src [_extract_from_pyproject]: _extract_from_pyproject
18109
PURITY: 100% pure
19110

20111
LAYERS:
21-
code2docs/ CC̄=3.9 ←in:1 →out:2
22-
│ examples_gen 464L 1C 19m CC=13 ←0
23-
│ readme_gen 375L 1C 23m CC=13 ←1
24-
│ _registry_adapters 302L 15C 35m CC=7 ←0
25-
│ architecture_gen 294L 1C 10m CC=13 ←0
26-
│ cli 275L 1C 15m CC=10 ←0
27-
│ dependency_scanner 273L 3C 11m CC=9 ←0
28-
│ org_readme_gen 252L 1C 15m CC=8 ←0
29-
│ code2llm_gen 248L 1C 17m CC=7 ←0
30-
│ module_docs_gen 246L 1C 20m CC=9 ←0
31-
│ contributing_gen 246L 1C 11m CC=7 ←0
32-
│ getting_started_gen 218L 1C 14m CC=11 ←0
33-
│ api_changelog_gen 196L 2C 9m CC=14 ←0
34-
│ markdown_validator 194L 2C 10m CC=12 ←1
35-
│ api_reference_gen 181L 1C 12m CC=11 ←0
36-
│ llm_helper 161L 1C 7m CC=7 ←0
37-
│ config 155L 7C 5m CC=10 ←2
38-
│ depgraph_gen 140L 1C 9m CC=9 ←0
39-
│ docstring_extractor 138L 2C 10m CC=8 ←0
40-
│ differ 125L 2C 7m CC=6 ←0
112+
code2docs/ CC̄=3.9 ←in:0 →out:2
113+
│ !! api.md 559L 0C 0m CC=0.0 ←0
114+
│ !! modules.md 503L 0C 0m CC=0.0 ←0
115+
│ README.md 493L 0C 0m CC=0.0 ←0
116+
│ readme_gen 492L 1C 23m CC=13 ←1
117+
│ examples_gen 473L 1C 19m CC=13 ←0
118+
│ _registry_adapters 353L 15C 35m CC=7 ←0
119+
│ config 331L 7C 5m CC=10 ←0
120+
│ cli 315L 1C 15m CC=10 ←0
121+
│ architecture.md 299L 0C 0m CC=0.0 ←0
122+
│ architecture_gen 295L 1C 10m CC=13 ←0
123+
│ dependency_scanner 295L 3C 11m CC=9 ←0
124+
│ contributing_gen 264L 1C 11m CC=7 ←0
125+
│ org_readme_gen 258L 1C 15m CC=8 ←0
126+
│ code2llm_gen 257L 1C 17m CC=7 ←0
127+
│ module_docs_gen 240L 1C 20m CC=9 ←0
128+
│ api_changelog_gen 225L 2C 9m CC=14 ←0
129+
│ markdown_validator 218L 2C 10m CC=12 ←1
130+
│ getting_started_gen 217L 1C 14m CC=11 ←0
131+
│ api_reference_gen 187L 1C 12m CC=11 ←0
132+
│ llm_helper 162L 1C 7m CC=7 ←0
133+
│ depgraph_gen 139L 1C 9m CC=9 ←0
134+
│ docstring_extractor 139L 2C 10m CC=8 ←0
135+
│ differ 132L 2C 7m CC=6 ←0
136+
│ changelog_gen 127L 2C 6m CC=6 ←0
41137
│ config_docs_gen 124L 1C 4m CC=10 ←0
42-
changelog_gen 121L 2C 6m CC=6 ←0
43-
│ endpoint_detector 112L 2C 3m CC=5 ←0
44-
mkdocs_gen 110L 1C 5m CC=5 ←0
45-
coverage_gen 104L 1C 7m CC=12 ←0
138+
mkdocs_gen 118L 1C 5m CC=5 ←0
139+
│ endpoint_detector 111L 2C 3m CC=5 ←0
140+
coverage_gen 110L 1C 7m CC=12 ←0
141+
configuration.md 91L 0C 0m CC=0.0 ←0
46142
│ advanced_usage 89L 0C 0m CC=0.0 ←0
47-
│ _source_links 76L 1C 6m CC=5 ←0
48-
│ watcher 75L 0C 1m CC=5 ←2
143+
│ _source_links 78L 1C 6m CC=5 ←0
144+
│ watcher 74L 0C 1m CC=5 ←2
49145
│ markdown 73L 1C 13m CC=4 ←0
50146
│ badges 72L 0C 3m CC=14 ←2
51147
│ toc 63L 0C 3m CC=6 ←1
52148
│ __init__ 59L 0C 1m CC=5 ←0
53149
│ updater 51L 1C 2m CC=4 ←0
54-
│ quickstart 48L 0C 0m CC=0.0 ←0
55-
│ base 46L 2C 3m CC=1 ←0
56-
│ project_scanner 41L 1C 4m CC=2 ←3
57-
│ registry 35L 1C 4m CC=4 ←0
58-
│ __init__ 24L 0C 1m CC=4 ←0
150+
│ base 47L 2C 3m CC=1 ←0
151+
│ quickstart 47L 0C 0m CC=0.0 ←0
152+
│ getting-started.md 44L 0C 0m CC=0.0 ←0
153+
│ project_scanner 43L 1C 4m CC=2 ←3
154+
│ registry 37L 1C 4m CC=4 ←0
155+
│ CONTRIBUTING.md 28L 0C 0m CC=0.0 ←0
156+
│ __init__ 27L 0C 1m CC=4 ←0
59157
│ __init__ 23L 0C 0m CC=0.0 ←0
60158
│ __init__ 7L 0C 0m CC=0.0 ←0
61159
│ __main__ 6L 0C 0m CC=0.0 ←0
62160
│ __init__ 6L 0C 0m CC=0.0 ←0
63161
64-
examples/ CC̄=2.2 ←in:0 →out:18 !! split
162+
examples/ CC̄=2.2 ←in:0 →out:17 !! split
65163
│ 07_web_frameworks 221L 0C 5m CC=9 ←0
66164
│ 02_configuration 161L 0C 4m CC=1 ←0
67165
│ 05_custom_generators 144L 3C 13m CC=8 ←0
68166
│ 04_sync_and_watch 120L 0C 6m CC=4 ←0
69167
│ 06_formatters 96L 0C 5m CC=2 ←0
70168
│ 03_programmatic_api 85L 0C 5m CC=5 ←0
169+
│ README.md 85L 0C 0m CC=0.0 ←0
71170
│ 01_cli_usage 70L 0C 2m CC=1 ←0
72171
│ advanced_usage 51L 0C 0m CC=0.0 ←0
73172
│ class_examples 40L 0C 0m CC=0.0 ←0
@@ -76,25 +175,47 @@ LAYERS:
76175
│ basic_usage 22L 0C 0m CC=0.0 ←0
77176
78177
./ CC̄=0.0 ←in:0 →out:0
178+
│ !! planfile.yaml 1722L 0C 0m CC=0.0 ←0
179+
│ !! CHANGELOG.md 924L 0C 0m CC=0.0 ←0
180+
│ !! README.md 542L 0C 0m CC=0.0 ←0
181+
│ goal.yaml 428L 0C 0m CC=0.0 ←0
182+
│ TODO.md 244L 0C 0m CC=0.0 ←0
183+
│ Taskfile.yml 186L 0C 0m CC=0.0 ←0
184+
│ pyproject.toml 120L 0C 0m CC=0.0 ←0
185+
│ prefact.yaml 82L 0C 0m CC=0.0 ←0
186+
│ redsl_refactor_report.md 41L 0C 0m CC=0.0 ←0
187+
│ CONTRIBUTING.md 38L 0C 0m CC=0.0 ←0
79188
│ project.sh 35L 0C 0m CC=0.0 ←0
189+
│ redsl_refactor_report.toon.yaml 29L 0C 0m CC=0.0 ←0
190+
│ local.dev.txt 13L 0C 0m CC=0.0 ←0
191+
│ pyqual.yaml 10L 0C 0m CC=0.0 ←0
80192
81193
docs/ CC̄=0.0 ←in:0 →out:0
194+
│ !! README.md 2388L 0C 0m CC=0.0 ←0
195+
│ !! api.md 688L 0C 0m CC=0.0 ←0
196+
│ architecture.md 288L 0C 0m CC=0.0 ←0
197+
│ dependency-graph.md 236L 0C 0m CC=0.0 ←0
198+
│ modules.md 192L 0C 0m CC=0.0 ←0
82199
│ advanced_usage 90L 0C 0m CC=0.0 ←0
200+
│ coverage.md 60L 0C 0m CC=0.0 ←0
83201
│ quickstart 48L 0C 0m CC=0.0 ←0
202+
│ getting-started.md 39L 0C 0m CC=0.0 ←0
203+
│ configuration.md 37L 0C 0m CC=0.0 ←0
204+
│ CONTRIBUTING.md 31L 0C 0m CC=0.0 ←0
84205
85206

86207
COUPLING:
87208
examples code2docs.analyzers code2docs.formatters code2docs code2docs.generators code2docs.sync
88-
examples ── 10 5 1 1 1 !! fan-out
209+
examples ── 10 5 1 1 !! fan-out
89210
code2docs.analyzers ←10 ── ←1 hub
90211
code2docs.formatters ←5 ── ←1 hub
91-
code2docs ←1 1 ── 1
212+
code2docs 1 ── 1
92213
code2docs.generators ←1 1 ──
93214
code2docs.sync ←1 ←1 ──
94215
CYCLES: none
95-
HUB: code2docs.analyzers/ (fan-in=11)
96216
HUB: code2docs.formatters/ (fan-in=6)
97-
SMELL: examples/ fan-out=18 → split needed
217+
HUB: code2docs.analyzers/ (fan-in=11)
218+
SMELL: examples/ fan-out=17 → split needed
98219

99220
EXTERNAL:
100221
validation: run `vallm batch .` → validation.toon

0 commit comments

Comments
 (0)