Skip to content

Commit b1bf9a8

Browse files
refactoring
1 parent 9560418 commit b1bf9a8

16 files changed

Lines changed: 2777 additions & 565 deletions

File tree

README.md

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

TODO.md

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,52 @@
125125
- [x] **Auto-benchmark** script (`benchmarks/benchmark_evolution.py`)
126126
- [x] **Example projects** (Claude Code, shell LLM, LiteLLM)
127127

128-
## 🎯 Sprint 5 — Self-analysis + gap fixes (v0.6.0)
128+
## ✅ Completed — Sprint 5 (v0.6.0)
129+
130+
- [x] **Structural splits** (Phase 1-3)
131+
- [x] `exporters/toon.py``exporters/toon/` package (renderer, metrics, helpers, module_detail)
132+
- [x] `core/analyzer.py``core/core/` subpackage (file_analyzer, file_filter, refactoring, cache)
133+
- [x] `core/streaming_analyzer.py``core/streaming/` subpackage (scanner, prioritizer, incremental)
134+
135+
- [x] **Split high-CC functions** (Phase 4)
136+
- [x] `render_coupling` CC=28 → 6 sub-methods
137+
- [x] `render_layers` CC=21 → 4 sub-methods
138+
- [x] `render_functions` CC=18 → 2 sub-methods
139+
- [x] `parse_toon_content` CC=35 → dispatch dict + 4 parsers
140+
- [x] `_annotation_to_str` CC=18 → dispatch dict + 6 handlers
141+
142+
- [x] **Bug fixes** (Phase 5)
143+
- [x] `PipelineDetector._resolve_callee` — method→method edges (self.X resolution)
144+
- [x] `MermaidExporter._module_of` — subpackage-level grouping in compact_flow.mmd
145+
- [x] Cleanup: removed `analyzer_old.py`, `streaming_analyzer_old.py`, `TODO/`
146+
147+
- [x] **Test fixes** — 8 broken tests fixed, 159/159 passing
148+
- [x] `test_advanced_analysis.py` — updated imports for RefactoringAnalyzer, fixed complexity key
149+
- [x] `test_edge_cases.py` — fixed should_skip_function signature, nested classes assertion
150+
- [x] `test_prompt_engine.py` — updated assertions to match Jinja2 template output
151+
- [x] `test_refactoring_engine.py` — fixed god_function detection threshold
152+
153+
- [x] **Self-analysis benchmark**
154+
- [x] CC̄=4.7 (was 5.1), max-CC=19 (was 35), 0 god modules
155+
- [x] 12 pipelines detected (Analysis:8, Export:4)
156+
- [x] compact_flow.mmd: 5 subpackage nodes with weighted edges
157+
158+
## 🎯 Sprint 6 — Remaining improvements (v0.7.0)
129159

130160
### High Priority
131161

132-
- [ ] **Self-analysis**
133-
- Run code2llm on itself with new flow.toon
134-
- Verify: detect NLP, Analysis, Export, Refactor pipelines
135-
- Verify: AnalysisResult marked as hub-type
162+
- [ ] **Fix 9 remaining CC>15 functions** (CC̄ 4.7 → target ≤3.5)
163+
- [ ] `parse_llm_task_text` CC=19
164+
- [ ] `_resolve_callee` CC=18
165+
- [ ] `_infer_from_name` CC=17
166+
- [ ] `_find_data_pipelines` CC=17
167+
- [ ] `_compute_god_modules` CC=16
168+
- [ ] `_run_exports` CC=15
169+
- [ ] `_analyze_data_types` CC=15
170+
- [ ] `_trace_flow` CC=15
171+
- [ ] `_collect_entrypoints` CC=15
136172

137-
- [ ] **Fix benchmark gaps**
138-
- god_function detection in flow.toon (CC≥15 marker)
139-
- missing_types detection across formats
140-
- Purity info in structural features
173+
- [ ] **Streaming analysis** — accumulate results properly (remove double-analysis TODO in cli.py:305)
141174

142175
### Medium Priority
143176

@@ -162,8 +195,6 @@
162195

163196
## 📝 Notes
164197

165-
- Format taxonomy based on TODO/action_plan_v3.md benchmark results
166198
- Each format has one purpose: map=structure, toon=health, flow=data-flow, context=LLM, evolution=refactoring
167-
- This TODO list is managed by Goal — use `goal -t` for auto-detection
168199

169200
Last updated: 2026-03-01

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.4
1+
0.5.6

analysis.toon

Lines changed: 747 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)