code2llm 0.5.79__tar.gz → 0.5.81__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code2llm-0.5.79 → code2llm-0.5.81}/PKG-INFO +13 -13
- {code2llm-0.5.79 → code2llm-0.5.81}/README.md +12 -12
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/__init__.py +1 -1
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/cli_exports/formats.py +3 -3
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/cli_exports/orchestrator.py +5 -5
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/cli_exports/prompt.py +46 -35
- code2llm-0.5.81/code2llm/core/lang/base.py +370 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/project_yaml_exporter.py +1 -1
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/readme_exporter.py +6 -6
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/report_generators.py +1 -1
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/toon_view.py +2 -2
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/validate_project.py +7 -7
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/nlp/__init__.py +1 -1
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm.egg-info/PKG-INFO +13 -13
- {code2llm-0.5.79 → code2llm-0.5.81}/pyproject.toml +1 -1
- {code2llm-0.5.79 → code2llm-0.5.81}/setup.py +2 -2
- code2llm-0.5.79/code2llm/core/lang/base.py +0 -312
- {code2llm-0.5.79 → code2llm-0.5.81}/LICENSE +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/__main__.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/analysis/__init__.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/analysis/call_graph.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/analysis/cfg.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/analysis/coupling.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/analysis/data_analysis.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/analysis/dfg.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/analysis/pipeline_detector.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/analysis/side_effects.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/analysis/smells.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/analysis/type_inference.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/api.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/cli.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/cli_analysis.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/cli_commands.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/cli_exports/__init__.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/cli_exports/code2logic.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/cli_parser.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/__init__.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/analyzer.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/config.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/file_analyzer.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/file_cache.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/file_filter.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/gitignore.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/lang/__init__.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/lang/cpp.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/lang/csharp.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/lang/generic.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/lang/go_lang.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/lang/java.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/lang/php.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/lang/ruby.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/lang/rust.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/lang/typescript.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/large_repo.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/models.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/refactoring.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/repo_files.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/streaming/__init__.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/streaming/cache.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/streaming/incremental.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/streaming/prioritizer.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/streaming/scanner.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/streaming/strategies.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/streaming_analyzer.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/core/toon_size_manager.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/__init__.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/article_view.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/base.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/context_exporter.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/context_view.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/evolution_exporter.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/flow_constants.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/flow_exporter.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/flow_renderer.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/html_dashboard.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/index_generator.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/json_exporter.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/llm_exporter.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/map_exporter.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/mermaid_exporter.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/toon/__init__.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/toon/helpers.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/toon/metrics.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/toon/module_detail.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/toon/renderer.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/toon.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/exporters/yaml_exporter.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/generators/__init__.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/generators/llm_flow.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/generators/llm_task.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/generators/mermaid.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/nlp/config.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/nlp/entity_resolution.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/nlp/intent_matching.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/nlp/normalization.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/nlp/pipeline.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/patterns/__init__.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/patterns/detector.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/refactor/__init__.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm/refactor/prompt_engine.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm.egg-info/SOURCES.txt +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm.egg-info/dependency_links.txt +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm.egg-info/entry_points.txt +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm.egg-info/requires.txt +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/code2llm.egg-info/top_level.txt +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/setup.cfg +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_advanced_analysis.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_analyzer.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_deep_analysis.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_edge_cases.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_flow_exporter.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_format_quality.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_multilanguage_e2e.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_nlp_pipeline.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_nonpython_cc_calls.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_pipeline_detector.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_prompt_engine.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_prompt_txt.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_refactoring_engine.py +0 -0
- {code2llm-0.5.79 → code2llm-0.5.81}/tests/test_toon_v2.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code2llm
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.81
|
|
4
4
|
Summary: High-performance Python code flow analysis with optimized TOON format - CFG, DFG, call graphs, and intelligent code queries
|
|
5
5
|
Home-page: https://github.com/wronai/stts
|
|
6
6
|
Author: STTS Project
|
|
@@ -128,7 +128,7 @@ cat analysis.toon | head -30
|
|
|
128
128
|
grep "REFACTOR" analysis.toon
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
### `evolution.toon` - Refactoring Queue
|
|
131
|
+
### `evolution.toon.yaml` - Refactoring Queue
|
|
132
132
|
**Purpose**: Step-by-step refactoring plan
|
|
133
133
|
**Key sections**:
|
|
134
134
|
- **NEXT**: Immediate actions to take
|
|
@@ -138,10 +138,10 @@ grep "REFACTOR" analysis.toon
|
|
|
138
138
|
**Example usage**:
|
|
139
139
|
```bash
|
|
140
140
|
# Get refactoring plan
|
|
141
|
-
cat evolution.toon
|
|
141
|
+
cat evolution.toon.yaml
|
|
142
142
|
|
|
143
143
|
# Track progress
|
|
144
|
-
grep "NEXT" evolution.toon
|
|
144
|
+
grep "NEXT" evolution.toon.yaml
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
### `flow.toon` - Legacy Data Flow Analysis
|
|
@@ -160,21 +160,21 @@ grep "PIPELINES" flow.toon
|
|
|
160
160
|
grep "SIDE_EFFECTS" flow.toon
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
### `map.toon` - Structural Map + Project Header
|
|
163
|
+
### `map.toon.yaml` - Structural Map + Project Header
|
|
164
164
|
**Purpose**: High-level architecture overview plus compact project header
|
|
165
165
|
**Key sections**:
|
|
166
166
|
- **MODULES**: All modules with basic stats
|
|
167
167
|
- **IMPORTS**: Dependency relationships
|
|
168
|
-
- **
|
|
168
|
+
- **EXPORTS**: Public API surface and signatures
|
|
169
169
|
- **HEADER**: Stats, alerts, hotspots, evolution trend
|
|
170
170
|
|
|
171
171
|
**Example usage**:
|
|
172
172
|
```bash
|
|
173
173
|
# See project structure
|
|
174
|
-
cat map.toon | head -50
|
|
174
|
+
cat map.toon.yaml | head -50
|
|
175
175
|
|
|
176
176
|
# Find public APIs
|
|
177
|
-
grep "
|
|
177
|
+
grep "SIGNATURES" map.toon.yaml
|
|
178
178
|
```
|
|
179
179
|
|
|
180
180
|
### `project.toon` - Legacy Project Logic (Deprecated)
|
|
@@ -256,7 +256,7 @@ cat analysis.toon | grep -E "(HEALTH|REFACTOR)"
|
|
|
256
256
|
```bash
|
|
257
257
|
# Get refactoring queue
|
|
258
258
|
code2llm ./ -f evolution
|
|
259
|
-
cat evolution.toon
|
|
259
|
+
cat evolution.toon.yaml
|
|
260
260
|
|
|
261
261
|
# Focus on specific issues
|
|
262
262
|
code2llm ./ -f toon --refactor --smell god_function
|
|
@@ -335,7 +335,7 @@ cat docs/context.md >> README.md
|
|
|
335
335
|
## 📚 Next Steps
|
|
336
336
|
|
|
337
337
|
1. **Review `analysis.toon`** - Identify critical issues
|
|
338
|
-
2. **Check `evolution.toon`** - Plan refactoring priorities
|
|
338
|
+
2. **Check `evolution.toon.yaml`** - Plan refactoring priorities
|
|
339
339
|
3. **Use `context.md`** - Get LLM assistance for complex changes
|
|
340
340
|
4. **Reference visualizations** - Understand system architecture
|
|
341
341
|
5. **Track progress** - Re-run analysis after changes
|
|
@@ -369,10 +369,10 @@ code2llm ./ -f yaml --separate-orphans
|
|
|
369
369
|
---
|
|
370
370
|
|
|
371
371
|
**Generated by**: `code2llm ./ -f all --readme`
|
|
372
|
-
**Analysis Date**: 2026-03-
|
|
373
|
-
**Total Functions**:
|
|
372
|
+
**Analysis Date**: 2026-03-26
|
|
373
|
+
**Total Functions**: 923
|
|
374
374
|
**Total Classes**: 106
|
|
375
|
-
**Modules**:
|
|
375
|
+
**Modules**: 122
|
|
376
376
|
|
|
377
377
|
For more information about code2llm, visit: https://github.com/tom-sapletta/code2llm
|
|
378
378
|
|
|
@@ -78,7 +78,7 @@ cat analysis.toon | head -30
|
|
|
78
78
|
grep "REFACTOR" analysis.toon
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
### `evolution.toon` - Refactoring Queue
|
|
81
|
+
### `evolution.toon.yaml` - Refactoring Queue
|
|
82
82
|
**Purpose**: Step-by-step refactoring plan
|
|
83
83
|
**Key sections**:
|
|
84
84
|
- **NEXT**: Immediate actions to take
|
|
@@ -88,10 +88,10 @@ grep "REFACTOR" analysis.toon
|
|
|
88
88
|
**Example usage**:
|
|
89
89
|
```bash
|
|
90
90
|
# Get refactoring plan
|
|
91
|
-
cat evolution.toon
|
|
91
|
+
cat evolution.toon.yaml
|
|
92
92
|
|
|
93
93
|
# Track progress
|
|
94
|
-
grep "NEXT" evolution.toon
|
|
94
|
+
grep "NEXT" evolution.toon.yaml
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
### `flow.toon` - Legacy Data Flow Analysis
|
|
@@ -110,21 +110,21 @@ grep "PIPELINES" flow.toon
|
|
|
110
110
|
grep "SIDE_EFFECTS" flow.toon
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
### `map.toon` - Structural Map + Project Header
|
|
113
|
+
### `map.toon.yaml` - Structural Map + Project Header
|
|
114
114
|
**Purpose**: High-level architecture overview plus compact project header
|
|
115
115
|
**Key sections**:
|
|
116
116
|
- **MODULES**: All modules with basic stats
|
|
117
117
|
- **IMPORTS**: Dependency relationships
|
|
118
|
-
- **
|
|
118
|
+
- **EXPORTS**: Public API surface and signatures
|
|
119
119
|
- **HEADER**: Stats, alerts, hotspots, evolution trend
|
|
120
120
|
|
|
121
121
|
**Example usage**:
|
|
122
122
|
```bash
|
|
123
123
|
# See project structure
|
|
124
|
-
cat map.toon | head -50
|
|
124
|
+
cat map.toon.yaml | head -50
|
|
125
125
|
|
|
126
126
|
# Find public APIs
|
|
127
|
-
grep "
|
|
127
|
+
grep "SIGNATURES" map.toon.yaml
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
### `project.toon` - Legacy Project Logic (Deprecated)
|
|
@@ -206,7 +206,7 @@ cat analysis.toon | grep -E "(HEALTH|REFACTOR)"
|
|
|
206
206
|
```bash
|
|
207
207
|
# Get refactoring queue
|
|
208
208
|
code2llm ./ -f evolution
|
|
209
|
-
cat evolution.toon
|
|
209
|
+
cat evolution.toon.yaml
|
|
210
210
|
|
|
211
211
|
# Focus on specific issues
|
|
212
212
|
code2llm ./ -f toon --refactor --smell god_function
|
|
@@ -285,7 +285,7 @@ cat docs/context.md >> README.md
|
|
|
285
285
|
## 📚 Next Steps
|
|
286
286
|
|
|
287
287
|
1. **Review `analysis.toon`** - Identify critical issues
|
|
288
|
-
2. **Check `evolution.toon`** - Plan refactoring priorities
|
|
288
|
+
2. **Check `evolution.toon.yaml`** - Plan refactoring priorities
|
|
289
289
|
3. **Use `context.md`** - Get LLM assistance for complex changes
|
|
290
290
|
4. **Reference visualizations** - Understand system architecture
|
|
291
291
|
5. **Track progress** - Re-run analysis after changes
|
|
@@ -319,10 +319,10 @@ code2llm ./ -f yaml --separate-orphans
|
|
|
319
319
|
---
|
|
320
320
|
|
|
321
321
|
**Generated by**: `code2llm ./ -f all --readme`
|
|
322
|
-
**Analysis Date**: 2026-03-
|
|
323
|
-
**Total Functions**:
|
|
322
|
+
**Analysis Date**: 2026-03-26
|
|
323
|
+
**Total Functions**: 923
|
|
324
324
|
**Total Classes**: 106
|
|
325
|
-
**Modules**:
|
|
325
|
+
**Modules**: 122
|
|
326
326
|
|
|
327
327
|
For more information about code2llm, visit: https://github.com/tom-sapletta/code2llm
|
|
328
328
|
|
|
@@ -8,7 +8,7 @@ Includes NLP Processing Pipeline for query normalization, intent matching,
|
|
|
8
8
|
and entity resolution with multilingual support.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
-
__version__ = "0.5.
|
|
11
|
+
__version__ = "0.5.81"
|
|
12
12
|
__author__ = "STTS Project"
|
|
13
13
|
|
|
14
14
|
# Core analysis components (lightweight, always needed)
|
|
@@ -80,7 +80,7 @@ def _run_report(args, project_yaml_path: str, output_dir: Path) -> None:
|
|
|
80
80
|
report_formats = ['toon', 'context', 'article', 'html']
|
|
81
81
|
|
|
82
82
|
generator_map = {
|
|
83
|
-
'toon': ('
|
|
83
|
+
'toon': ('analysis_view.toon', ToonViewGenerator(), 'TOON view'),
|
|
84
84
|
'context': ('context.md', ContextViewGenerator(), 'Context view'),
|
|
85
85
|
'article': ('status.md', ArticleViewGenerator(), 'Article view'),
|
|
86
86
|
'html': ('dashboard.html', HTMLDashboardGenerator(), 'HTML dashboard'),
|
|
@@ -116,12 +116,12 @@ def _export_simple_formats(args, result, output_dir: Path, formats):
|
|
|
116
116
|
print(f" - {label}: {filepath}")
|
|
117
117
|
|
|
118
118
|
# Unified project.yaml (single source of truth)
|
|
119
|
-
if 'project-yaml' in formats
|
|
119
|
+
if 'project-yaml' in formats:
|
|
120
120
|
yaml_path = _export_project_yaml(args, result, output_dir)
|
|
121
121
|
# Auto-generate all views from project.yaml
|
|
122
122
|
data = load_project_yaml(str(yaml_path))
|
|
123
123
|
view_map = {
|
|
124
|
-
'
|
|
124
|
+
'analysis_view.toon': ToonViewGenerator(),
|
|
125
125
|
'context.md': ContextViewGenerator(),
|
|
126
126
|
'dashboard.html': HTMLDashboardGenerator(),
|
|
127
127
|
}
|
|
@@ -25,7 +25,7 @@ def _run_exports(args, result, output_dir: Path, source_path: Optional[Path] = N
|
|
|
25
25
|
"""
|
|
26
26
|
formats = [f.strip() for f in args.format.split(',')]
|
|
27
27
|
if 'all' in formats:
|
|
28
|
-
formats = ['toon', 'map', 'context', '
|
|
28
|
+
formats = ['toon', 'map', 'context', 'mermaid', 'evolution']
|
|
29
29
|
|
|
30
30
|
is_chunked = args.chunk if hasattr(args, 'chunk') else False
|
|
31
31
|
|
|
@@ -51,8 +51,8 @@ def _export_single_project(args, result, output_dir: Path, formats: list, source
|
|
|
51
51
|
_export_context_fallback(args, result, output_dir, formats)
|
|
52
52
|
|
|
53
53
|
if source_path is not None:
|
|
54
|
-
_export_code2logic(args, source_path, output_dir,
|
|
55
|
-
_export_prompt_txt(args, output_dir,
|
|
54
|
+
_export_code2logic(args, source_path, output_dir, args.format.split(','))
|
|
55
|
+
_export_prompt_txt(args, output_dir, args.format.split(','), source_path)
|
|
56
56
|
|
|
57
57
|
if hasattr(args, 'refactor') and args.refactor:
|
|
58
58
|
_export_refactor_prompts(args, result, output_dir)
|
|
@@ -75,8 +75,8 @@ def _export_chunked_results(args, result, output_dir: Path, source_path: Path, f
|
|
|
75
75
|
_export_evolution(args, result, output_dir)
|
|
76
76
|
|
|
77
77
|
if source_path is not None:
|
|
78
|
-
_export_code2logic(args, source_path, output_dir,
|
|
79
|
-
_export_chunked_prompt_txt(args, output_dir,
|
|
78
|
+
_export_code2logic(args, source_path, output_dir, args.format.split(','))
|
|
79
|
+
_export_chunked_prompt_txt(args, output_dir, args.format.split(','), source_path, subprojects)
|
|
80
80
|
|
|
81
81
|
_export_readme(args, result, output_dir)
|
|
82
82
|
|
|
@@ -77,11 +77,11 @@ def _get_prompt_paths(source_path: Optional[Path], output_dir: Path) -> Tuple[st
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
_MAIN_FILES = [
|
|
80
|
-
('analysis.toon', 'Health diagnostics - complexity metrics, god modules, coupling issues, refactoring priorities'),
|
|
80
|
+
('analysis.toon.yaml', 'Health diagnostics - complexity metrics, god modules, coupling issues, refactoring priorities'),
|
|
81
81
|
('map.toon.yaml', 'Structural map - files, sizes, imports, exports, signatures, project header'),
|
|
82
|
-
('context.md', 'LLM narrative - architecture summary, key entry points, process flows, public API surface'),
|
|
83
82
|
('evolution.toon.yaml', 'Refactoring queue - ranked actions by impact/effort, risks, metrics targets, history'),
|
|
84
|
-
('
|
|
83
|
+
('validation.toon.yaml', 'Validation analysis - generated by vallm tool (in project/ subdirectory)'),
|
|
84
|
+
('duplication.toon.yaml', 'Code duplication analysis - generated by redup tool (in project/ subdirectory)'),
|
|
85
85
|
]
|
|
86
86
|
|
|
87
87
|
|
|
@@ -94,6 +94,8 @@ def _build_prompt_header(project_path: str) -> List[str]:
|
|
|
94
94
|
f"we are in project path: {project_path}",
|
|
95
95
|
"",
|
|
96
96
|
"Files for analysis:",
|
|
97
|
+
"",
|
|
98
|
+
"Note: validation.toon.yaml and duplication.toon.yaml are generated by external tools (vallm and redup)",
|
|
97
99
|
]
|
|
98
100
|
|
|
99
101
|
|
|
@@ -101,11 +103,18 @@ def _build_main_files_section(output_dir: Path, output_rel_path: str) -> List[st
|
|
|
101
103
|
"""Build main files section with size metrics."""
|
|
102
104
|
lines = []
|
|
103
105
|
for name, desc in _MAIN_FILES:
|
|
104
|
-
|
|
106
|
+
# Special handling for validation and duplication files
|
|
107
|
+
if name in ['validation.toon.yaml', 'duplication.toon.yaml']:
|
|
108
|
+
file_path = output_dir / 'project' / name
|
|
109
|
+
rel_path = f"{output_rel_path}/project/{name}"
|
|
110
|
+
else:
|
|
111
|
+
file_path = output_dir / name
|
|
112
|
+
rel_path = f"{output_rel_path}/{name}"
|
|
113
|
+
|
|
105
114
|
if file_path.exists():
|
|
106
115
|
size_bytes = file_path.stat().st_size
|
|
107
116
|
size_str = _format_size(size_bytes)
|
|
108
|
-
lines.append(f"- {
|
|
117
|
+
lines.append(f"- {rel_path} ({desc}) [{size_str}]")
|
|
109
118
|
return lines
|
|
110
119
|
|
|
111
120
|
|
|
@@ -121,7 +130,15 @@ def _format_size(size_bytes: int) -> str:
|
|
|
121
130
|
|
|
122
131
|
def _get_missing_files(output_dir: Path) -> List[str]:
|
|
123
132
|
"""Return names of expected main files that are missing."""
|
|
124
|
-
|
|
133
|
+
missing = []
|
|
134
|
+
for name, _ in _MAIN_FILES:
|
|
135
|
+
if name in ['validation.toon.yaml', 'duplication.toon.yaml']:
|
|
136
|
+
file_path = output_dir / 'project' / name
|
|
137
|
+
else:
|
|
138
|
+
file_path = output_dir / name
|
|
139
|
+
if not file_path.exists():
|
|
140
|
+
missing.append(name)
|
|
141
|
+
return missing
|
|
125
142
|
|
|
126
143
|
|
|
127
144
|
def _build_subprojects_section(subprojects: list, output_dir: Path, output_rel_path: str) -> List[str]:
|
|
@@ -161,21 +178,22 @@ def _build_missing_files_section(output_dir: Path, output_rel_path: str) -> List
|
|
|
161
178
|
return []
|
|
162
179
|
lines = ["", "Missing files (not generated in this run):"]
|
|
163
180
|
for name in missing:
|
|
164
|
-
|
|
181
|
+
# Special handling for validation and duplication files
|
|
182
|
+
if name in ['validation.toon.yaml', 'duplication.toon.yaml']:
|
|
183
|
+
lines.append(f"- {output_rel_path}/project/{name}")
|
|
184
|
+
else:
|
|
185
|
+
lines.append(f"- {output_rel_path}/{name}")
|
|
165
186
|
return lines
|
|
166
187
|
|
|
167
188
|
|
|
168
189
|
def _analyze_generated_files(output_dir: Path, subprojects: list = None) -> dict:
|
|
169
190
|
"""Analyze which files were generated and determine appropriate focus areas."""
|
|
170
191
|
analysis = {
|
|
171
|
-
'has_analysis_toon': (output_dir / 'analysis.toon').exists(),
|
|
192
|
+
'has_analysis_toon': (output_dir / 'analysis.toon.yaml').exists(),
|
|
172
193
|
'has_map_toon': (output_dir / 'map.toon.yaml').exists(),
|
|
173
|
-
'has_context_md': (output_dir / 'context.md').exists(),
|
|
174
194
|
'has_evolution_toon': (output_dir / 'evolution.toon.yaml').exists(),
|
|
175
|
-
'
|
|
176
|
-
'
|
|
177
|
-
'has_json': (output_dir / 'analysis.json').exists(),
|
|
178
|
-
'has_mermaid': (output_dir / 'flow.mmd').exists() or (output_dir / 'calls.mmd').exists(),
|
|
195
|
+
'has_validation_toon': (output_dir / 'project/validation.toon.yaml').exists(),
|
|
196
|
+
'has_duplication_toon': (output_dir / 'project/duplication.toon.yaml').exists(),
|
|
179
197
|
'is_chunked': subprojects is not None and len(subprojects) > 0,
|
|
180
198
|
'file_count': 0,
|
|
181
199
|
}
|
|
@@ -201,17 +219,11 @@ def _build_dynamic_focus_areas(file_analysis: dict) -> List[str]:
|
|
|
201
219
|
if file_analysis['has_evolution_toon']:
|
|
202
220
|
focus_areas.append("3. **Refactoring Priorities** - Examine ranked refactoring actions and risk assessment from evolution.toon.yaml")
|
|
203
221
|
|
|
204
|
-
if file_analysis['
|
|
205
|
-
focus_areas.append("4. **
|
|
206
|
-
|
|
207
|
-
if file_analysis['has_yaml'] or file_analysis['has_json']:
|
|
208
|
-
focus_areas.append("5. **Structured Data** - Use machine-readable formats for automated analysis and metrics extraction")
|
|
222
|
+
if file_analysis['has_validation_toon']:
|
|
223
|
+
focus_areas.append("4. **Validation Analysis** - Review validation results and issues identified by vallm")
|
|
209
224
|
|
|
210
|
-
if file_analysis['
|
|
211
|
-
focus_areas.append("
|
|
212
|
-
|
|
213
|
-
if file_analysis['is_chunked']:
|
|
214
|
-
focus_areas.append("7. **Large Repository Patterns** - Identify cross-chunk dependencies and consolidation opportunities")
|
|
225
|
+
if file_analysis['has_duplication_toon']:
|
|
226
|
+
focus_areas.append("5. **Code Duplication** - Examine duplicate code patterns detected by redup")
|
|
215
227
|
|
|
216
228
|
if not focus_areas:
|
|
217
229
|
focus_areas.append("1. **General Code Review** - Provide overall architecture assessment and improvement recommendations")
|
|
@@ -236,11 +248,11 @@ def _build_dynamic_tasks(file_analysis: dict) -> List[str]:
|
|
|
236
248
|
if file_analysis['has_evolution_toon']:
|
|
237
249
|
tasks.append("- Prioritize refactoring actions by impact/effort ratio from evolution.toon.yaml.")
|
|
238
250
|
|
|
239
|
-
if file_analysis['
|
|
240
|
-
tasks.append("-
|
|
241
|
-
|
|
242
|
-
if file_analysis['
|
|
243
|
-
tasks.append("- Analyze
|
|
251
|
+
if file_analysis['has_validation_toon']:
|
|
252
|
+
tasks.append("- Review validation findings from project/validation.toon.yaml generated by vallm.")
|
|
253
|
+
|
|
254
|
+
if file_analysis['has_duplication_toon']:
|
|
255
|
+
tasks.append("- Analyze code duplication patterns from project/duplication.toon.yaml generated by redup.")
|
|
244
256
|
|
|
245
257
|
return tasks
|
|
246
258
|
|
|
@@ -271,14 +283,13 @@ def _build_prompt_footer(chunked: bool = False, file_analysis: dict = None) -> L
|
|
|
271
283
|
lines.append("")
|
|
272
284
|
lines.append("Analysis Strategy:")
|
|
273
285
|
if file_analysis['has_analysis_toon'] and file_analysis['has_map_toon']:
|
|
274
|
-
lines.append("- Start with analysis.toon for health metrics, then map.toon.yaml for structure and signatures")
|
|
286
|
+
lines.append("- Start with analysis.toon.yaml for health metrics, then map.toon.yaml for structure and signatures")
|
|
275
287
|
if file_analysis['has_evolution_toon']:
|
|
276
|
-
lines.append("-
|
|
277
|
-
|
|
278
|
-
lines.append("-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
lines.append("- Reference analysis.yaml for precise metrics and programmatic data")
|
|
288
|
+
lines.append("- Review evolution.toon.yaml for action priorities and next steps")
|
|
289
|
+
if file_analysis['has_validation_toon']:
|
|
290
|
+
lines.append("- Check project/validation.toon.yaml for validation issues (vallm tool output)")
|
|
291
|
+
if file_analysis['has_duplication_toon']:
|
|
292
|
+
lines.append("- Examine project/duplication.toon.yaml for duplicate code patterns (redup tool output)")
|
|
282
293
|
|
|
283
294
|
# Constraints
|
|
284
295
|
lines.append("")
|