Skip to content

Commit 7a0f90f

Browse files
chore: pyqual auto-fix iteration
1 parent a5ec875 commit 7a0f90f

File tree

17 files changed

+101
-81
lines changed

17 files changed

+101
-81
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Generated on 2026-03-31 using [openrouter/qwen/qwen3-coder-next](https://openrou
1717

1818
> Inspired by operational experience with [pyqual](https://github.com/semcod/pyqual): iterative quality-gate pipelines revealed that without structured regression tracking, metric changes across refactoring cycles are invisible until a gate breaks.
1919
20+
> **Why "Regix"?** From **reg**ression + **ix** (like fix/matrix vibe). Short, technical, memorable.
21+
2022
---
2123

2224
## Problem statement

project/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ code2llm ./ -f yaml --separate-orphans
331331
---
332332

333333
**Generated by**: `code2llm ./ -f all --readme`
334-
**Analysis Date**: 2026-04-01
334+
**Analysis Date**: 2026-04-02
335335
**Total Functions**: 166
336336
**Total Classes**: 41
337337
**Modules**: 25

project/analysis.toon.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# code2llm | 25f 4768L | python:24,shell:1 | 2026-04-01
1+
# code2llm | 25f 4783L | python:24,shell:1 | 2026-04-02
22
# CC̄=4.6 | critical:7/166 | dups:0 | cycles:1
33

44
HEALTH[8]:
@@ -7,25 +7,25 @@ HEALTH[8]:
77
🟡 CC compare CC=16 (limit:15)
88
🟡 CC diff CC=15 (limit:15)
99
🟡 CC capture CC=17 (limit:15)
10+
🟡 CC collect CC=19 (limit:15)
1011
🟡 CC filter CC=15 (limit:15)
1112
🟡 CC detect_smells CC=17 (limit:15)
12-
🟡 CC collect CC=19 (limit:15)
1313

1414
REFACTOR[3]:
1515
1. split regix/benchmark.py (god module)
1616
2. split 7 high-CC methods (CC>15)
1717
3. break 1 circular dependencies
1818

1919
PIPELINES[91]:
20-
[1] Src [run_command]: run_command
20+
[1] Src [__init__]: __init__
2121
PURITY: 100% pure
22-
[2] Src [check_regression]: check_regression → load_json_file
22+
[2] Src [__init__]: __init__
2323
PURITY: 100% pure
2424
[3] Src [__init__]: __init__
2525
PURITY: 100% pure
2626
[4] Src [__init__]: __init__
2727
PURITY: 100% pure
28-
[5] Src [__init__]: __init__
28+
[5] Src [run_command]: run_command
2929
PURITY: 100% pure
3030

3131
LAYERS:
@@ -52,7 +52,7 @@ LAYERS:
5252
│ vallm_backend 80L 1C 3m CC=11 ←0
5353
│ lizard_backend 80L 1C 3m CC=9 ←0
5454
│ docstring_backend 79L 1C 3m CC=14 ←0
55-
│ __init__ 64L 1C 2m CC=9 ←0
55+
│ __init__ 79L 1C 2m CC=9 ←0
5656
│ gates 60L 0C 2m CC=6 ←2
5757
│ __init__ 59L 1C 6m CC=1 ←3
5858
│ exceptions 54L 5C 4m CC=2 ←0

project/calls.mmd

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,101 @@
11
flowchart LR
22
subgraph regix__Regix
3-
regix__Regix__snapshot["snapshot"]
43
regix__Regix____init__["__init__"]
4+
regix__Regix__snapshot["snapshot"]
55
regix__Regix__history["history"]
66
end
77
subgraph regix__backends
8-
regix__backends__get_backend["get_backend"]
9-
regix__backends__structure_backend___analyse_function["_analyse_function"]
108
regix__backends__structure_backend__StructureBackend__collect["collect"]
9+
regix__backends__structure_backend___analyse_function["_analyse_function"]
10+
regix__backends__get_backend["get_backend"]
1111
end
1212
subgraph regix__benchmark
13-
regix__benchmark___make_compare_probe["_make_compare_probe"]
14-
regix__benchmark___make_config_parse_probe["_make_config_parse_probe"]
15-
regix__benchmark__BenchmarkReporter__print_plain["print_plain"]
16-
regix__benchmark__BenchmarkReporter__print["print"]
17-
regix__benchmark___make_snapshot_probe["_make_snapshot_probe"]
18-
regix__benchmark__main["main"]
1913
regix__benchmark__BenchmarkReporter__print_json["print_json"]
20-
regix__benchmark__BackendProbe__run["run"]
14+
regix__benchmark___make_snapshot_probe["_make_snapshot_probe"]
2115
regix__benchmark__build_regix_suite["build_regix_suite"]
16+
regix__benchmark__BenchmarkReporter__print["print"]
17+
regix__benchmark__BenchmarkReporter__print_plain["print_plain"]
18+
regix__benchmark___make_compare_probe["_make_compare_probe"]
19+
regix__benchmark__BackendProbe__run["run"]
2220
regix__benchmark___make_gates_probe["_make_gates_probe"]
21+
regix__benchmark___make_config_parse_probe["_make_config_parse_probe"]
22+
regix__benchmark__main["main"]
2323
end
2424
subgraph regix__cache
25-
regix__cache___cache_key["_cache_key"]
26-
regix__cache__store["store"]
2725
regix__cache__clear["clear"]
28-
regix__cache__lookup["lookup"]
2926
regix__cache___cache_dir["_cache_dir"]
27+
regix__cache__lookup["lookup"]
28+
regix__cache__store["store"]
29+
regix__cache___cache_key["_cache_key"]
3030
end
3131
subgraph regix__cli
32-
regix__cli__status["status"]
3332
regix__cli__diff["diff"]
3433
regix__cli__gates["gates"]
34+
regix__cli__status["status"]
3535
regix__cli__history["history"]
3636
regix__cli__snapshot["snapshot"]
3737
regix__cli___load_config["_load_config"]
3838
end
3939
subgraph regix__compare
40+
regix__compare___compare_symbol_metrics["_compare_symbol_metrics"]
4041
regix__compare___compute_delta["_compute_delta"]
4142
regix__compare__compare["compare"]
42-
regix__compare___compare_symbol_metrics["_compare_symbol_metrics"]
4343
end
4444
subgraph regix__config
4545
regix__config__RegressionConfig__from_file["from_file"]
4646
end
4747
subgraph regix__gates
48-
regix__gates__check_gates["check_gates"]
4948
regix__gates___passes["_passes"]
49+
regix__gates__check_gates["check_gates"]
5050
end
5151
subgraph regix__git
52+
regix__git___run_git["_run_git"]
5253
regix__git__is_clean["is_clean"]
53-
regix__git__read_local_sources["read_local_sources"]
54-
regix__git__list_commits["list_commits"]
5554
regix__git__read_tree_sources["read_tree_sources"]
55+
regix__git__resolve_ref["resolve_ref"]
5656
regix__git__checkout_temporary["checkout_temporary"]
57+
regix__git__read_local_sources["read_local_sources"]
5758
regix__git__get_dirty_files["get_dirty_files"]
58-
regix__git__resolve_ref["resolve_ref"]
59-
regix__git___run_git["_run_git"]
59+
regix__git__list_commits["list_commits"]
6060
regix__git__get_changed_files["get_changed_files"]
6161
end
6262
subgraph regix__history
63-
regix__history___compute_trends["_compute_trends"]
63+
regix__history___linear_slope["_linear_slope"]
6464
regix__history___aggregate_snapshot_metrics["_aggregate_snapshot_metrics"]
6565
regix__history__build_history["build_history"]
66-
regix__history___linear_slope["_linear_slope"]
66+
regix__history___compute_trends["_compute_trends"]
6767
end
6868
subgraph regix__report
69-
regix__report__render["render"]
7069
regix__report___render_rich["_render_rich"]
70+
regix__report__render["render"]
7171
end
7272
subgraph regix__smells
73-
regix__smells___check_stub_regression["_check_stub_regression"]
73+
regix__smells___count_hollow_signals["_count_hollow_signals"]
7474
regix__smells___avg_func_length["_avg_func_length"]
75-
regix__smells___func_length["_func_length"]
7675
regix__smells___largest_function["_largest_function"]
77-
regix__smells___check_no_delegation["_check_no_delegation"]
78-
regix__smells___count_hollow_signals["_count_hollow_signals"]
7976
regix__smells___check_god_function["_check_god_function"]
8077
regix__smells__detect_smells["detect_smells"]
81-
regix__smells___function_count_drop["_function_count_drop"]
8278
regix__smells___check_symbol_smells["_check_symbol_smells"]
79+
regix__smells___func_length["_func_length"]
80+
regix__smells___check_stub_regression["_check_stub_regression"]
81+
regix__smells___check_no_delegation["_check_no_delegation"]
82+
regix__smells___function_count_drop["_function_count_drop"]
8383
regix__smells___was_already_hollow["_was_already_hollow"]
8484
regix__smells___check_hallucination_proxy["_check_hallucination_proxy"]
8585
end
8686
subgraph regix__snapshot
8787
regix__snapshot___merge_symbols["_merge_symbols"]
88+
regix__snapshot___collect_files["_collect_files"]
8889
regix__snapshot__capture["capture"]
8990
regix__snapshot___filter_sources["_filter_sources"]
90-
regix__snapshot___collect_files["_collect_files"]
9191
end
9292
subgraph scripts__check_regression
93-
scripts__check_regression__load_json_file["load_json_file"]
9493
scripts__check_regression__check_regression["check_regression"]
94+
scripts__check_regression__load_json_file["load_json_file"]
9595
end
96+
regix__gates__check_gates --> regix__gates___passes
9697
scripts__check_regression__check_regression --> scripts__check_regression__load_json_file
9798
scripts__check_regression__check_regression --> regix__benchmark__BenchmarkReporter__print
98-
regix__gates__check_gates --> regix__gates___passes
9999
regix__compare___compare_symbol_metrics --> regix__compare___compute_delta
100100
regix__compare__compare --> regix__smells__detect_smells
101101
regix__git__resolve_ref --> regix__git___run_git
@@ -111,6 +111,9 @@ flowchart LR
111111
regix__history__build_history --> regix__snapshot__capture
112112
regix__history__build_history --> regix__history___compute_trends
113113
regix__history__build_history --> regix__history___aggregate_snapshot_metrics
114+
regix__Regix____init__ --> regix__config__RegressionConfig__from_file
115+
regix__Regix__snapshot --> regix__snapshot__capture
116+
regix__Regix__history --> regix__history__build_history
114117
regix__cli___load_config --> regix__config__RegressionConfig__from_file
115118
regix__cli__history --> regix__cli___load_config
116119
regix__cli__snapshot --> regix__cli___load_config
@@ -121,9 +124,6 @@ flowchart LR
121124
regix__cli__gates --> regix__snapshot__capture
122125
regix__cli__gates --> regix__gates__check_gates
123126
regix__cli__status --> regix__cli___load_config
124-
regix__Regix____init__ --> regix__config__RegressionConfig__from_file
125-
regix__Regix__snapshot --> regix__snapshot__capture
126-
regix__Regix__history --> regix__history__build_history
127127
regix__snapshot__capture --> regix__snapshot___merge_symbols
128128
regix__snapshot__capture --> regix__git__resolve_ref
129129
regix__snapshot__capture --> regix__backends__get_backend

project/calls.png

-6.33 KB
Loading

project/compact_flow.mmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ flowchart TD
1717
scripts__check_regression -->|3| regix__benchmark
1818
regix__snapshot -->|3| regix__git
1919
regix__benchmark -->|3| regix__snapshot
20+
regix__Regix -->|2| regix__config
2021
regix__cli -->|2| regix__config
2122
regix__cli -->|2| regix__report
2223
regix__cli -->|2| regix__backends
23-
regix__Regix -->|2| regix__config
2424
regix__compare -->|1| regix__smells
2525
regix__history -->|1| regix__git
2626
regix__history -->|1| regix__snapshot
27-
regix__cli -->|1| regix__history
28-
regix__cli -->|1| regix__gates
2927
regix__Regix -->|1| regix__snapshot
3028
regix__Regix -->|1| regix__history
29+
regix__cli -->|1| regix__history
30+
regix__cli -->|1| regix__gates
3131
regix__snapshot -->|1| regix__backends
3232
regix__benchmark -->|1| regix__backends
3333
regix__benchmark -->|1| regix__gates

project/context.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@
9090
- **Functions**: 3
9191
- **File**: `report.py`
9292

93-
### regix.backends.docstring_backend
93+
### regix.backends.architecture_backend
9494
- **Functions**: 3
9595
- **Classes**: 1
96-
- **File**: `docstring_backend.py`
96+
- **File**: `architecture_backend.py`
9797

98-
### regix.backends.architecture_backend
98+
### regix.backends.docstring_backend
9999
- **Functions**: 3
100100
- **Classes**: 1
101-
- **File**: `architecture_backend.py`
101+
- **File**: `docstring_backend.py`
102102

103103
### regix.backends.radon_backend
104104
- **Functions**: 3
@@ -322,22 +322,22 @@ snapshot [regix.cli]
322322
- **Key Methods**: regix.backends.structure_backend.StructureBackend.is_available, regix.backends.structure_backend.StructureBackend.version, regix.backends.structure_backend.StructureBackend.collect, regix.backends.structure_backend.StructureBackend._collect_functions
323323
- **Inherits**: BackendBase
324324

325-
### regix.models.GateResult
326-
> Aggregate gate evaluation result.
325+
### regix.backends.architecture_backend.ArchitectureBackend
326+
> Computes per-function structural metrics via AST for smell detection.
327327
- **Methods**: 3
328-
- **Key Methods**: regix.models.GateResult.all_passed, regix.models.GateResult.errors, regix.models.GateResult.warnings
328+
- **Key Methods**: regix.backends.architecture_backend.ArchitectureBackend.is_available, regix.backends.architecture_backend.ArchitectureBackend.version, regix.backends.architecture_backend.ArchitectureBackend.collect
329+
- **Inherits**: BackendBase
329330

330331
### regix.backends.docstring_backend.DocstringBackend
331332
> Measure docstring coverage using the ``ast`` module.
332333
- **Methods**: 3
333334
- **Key Methods**: regix.backends.docstring_backend.DocstringBackend.is_available, regix.backends.docstring_backend.DocstringBackend.version, regix.backends.docstring_backend.DocstringBackend.collect
334335
- **Inherits**: BackendBase
335336

336-
### regix.backends.architecture_backend.ArchitectureBackend
337-
> Computes per-function structural metrics via AST for smell detection.
337+
### regix.models.GateResult
338+
> Aggregate gate evaluation result.
338339
- **Methods**: 3
339-
- **Key Methods**: regix.backends.architecture_backend.ArchitectureBackend.is_available, regix.backends.architecture_backend.ArchitectureBackend.version, regix.backends.architecture_backend.ArchitectureBackend.collect
340-
- **Inherits**: BackendBase
340+
- **Key Methods**: regix.models.GateResult.all_passed, regix.models.GateResult.errors, regix.models.GateResult.warnings
341341

342342
### regix.backends.radon_backend.RadonBackend
343343
> Maintainability index and cyclomatic complexity via ``radon``.

project/evolution.toon.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# code2llm/evolution | 163 func | 23f | 2026-04-01
1+
# code2llm/evolution | 163 func | 23f | 2026-04-02
22

33
NEXT[6] (ranked by impact):
44
[1] !! SPLIT regix/benchmark.py

project/flow.mmd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ flowchart TD
2424
regix__git__get_changed_files["get_changed_files"]
2525
regix__git__checkout_temporary["checkout_temporary"]
2626
regix__git__read_tree_sources["read_tree_sources"]
27-
regix__Regix__snapshot["snapshot"]
28-
regix__Regix__compare["compare"]
29-
regix__Regix__compare_local["compare_local"]
30-
regix__Regix__history["history"]
31-
regix__snapshot__capture{{capture CC=17}}
32-
regix__cache__lookup["lookup"]
27+
regix__config__GateThresholds__get["get"]
28+
regix__config__RegressionConfig__cc_max["cc_max"]
29+
regix__config__RegressionConfig__mi_min["mi_min"]
30+
regix__config__RegressionConfig__coverage_min["coverage_min"]
31+
regix__config__RegressionConfig__length_max["length_max"]
32+
regix__config__RegressionConfig__docstring_min["docstring_min"]
3333
...["+91 more"]
3434
end
3535

36-
class regix__compare__compare,regix__git__is_clean,regix__git__get_dirty_files,regix__git__get_changed_files,regix__git__checkout_temporary,regix__cli___load_config,regix__cli__compare,regix__cli__history,regix__cli__snapshot,regix__cli__diff entry
36+
class regix__compare__compare,regix__git__is_clean,regix__git__get_dirty_files,regix__git__get_changed_files,regix__git__checkout_temporary,regix__config__GateThresholds__get,regix__config__RegressionConfig__cc_max,regix__config__RegressionConfig__mi_min,regix__config__RegressionConfig__coverage_min,regix__config__RegressionConfig__length_max entry

project/flow.png

-136 Bytes
Loading

0 commit comments

Comments
 (0)