You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/architecture.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ This document covers project purpose, canonical ownership, runtime flow, and non
39
39
-`Clever.TokenMap.Metrics` stays below app/infrastructure orchestration and above core models; UI consumes metric abstractions through core contracts.
40
40
- File metrics flow as raw file metrics, then chained derived file metrics, then directory rollup; raw parser objects stay inside the metrics layer.
41
41
- Infrastructure may enrich a snapshot with one optional repo-wide git history pass before per-file metrics so product metrics can consume cached per-file git artifacts without per-file repository walks.
42
-
-`Structural Risk` is the product-facing intrinsic quality score; it summarizes file scale, callable burden, and how concentrated that burden is inside the file.
43
-
-`Refactor Priority` is the product-facing composite score for refactoring urgency; it layers recent change and co-change pressure on top of Structural Risk instead of exposing git signals as separate public metrics.
42
+
-`Structural Risk` is the internal intrinsic quality score; it summarizes file scale, callable burden, and how concentrated that burden is inside the file, and it serves as the base for explainability.
43
+
-`Refactor Priority` is the single product-facing quality score for refactoring urgency; it layers recent change and co-change pressure on top of Structural Risk instead of exposing a second public quality metric.
"code_lines"=>"Code volume in the file. Larger files tend to accumulate more moving parts before method-level risk is considered.",
171
+
"total_callable_burden_points"=>"Sum of per-callable burden after soft thresholds for method length, cyclomatic complexity, nesting depth, and parameter count.",
172
+
"top_callable_burden_points"=>"Burden of the single heaviest callable. This catches one dominant method even when the rest of the file looks moderate.",
173
+
"affected_callable_ratio"=>"Share of callables that exceed the soft thresholds. Higher ratios mean the problem is spread across the file rather than isolated.",
174
+
"top_three_callable_burden_share"=>"Share of callable burden concentrated in the top three callables. High concentration means a small number of methods dominate the risk.",
175
+
_ =>"Structural input that feeds the intrinsic refactor-risk base score.",
176
+
};
177
+
178
+
privatestaticstringGetGitDescription(stringkey)=>
179
+
keyswitch
180
+
{
181
+
"churn_lines_90d"=>"Recently rewritten line volume. Frequent rewrites raise urgency, but only as a bounded uplift on top of the structural base.",
182
+
"touch_count_90d"=>"Number of recent commits that touched this file. Repeated touches suggest ongoing friction around the code.",
183
+
"author_count_90d"=>"Number of recent contributors touching the file. More contributors usually increase coordination pressure around risky code.",
184
+
"strong_cochanged_file_count_90d"=>"Files that repeatedly change together with this one. This indicates a tighter blast radius when the file moves.",
185
+
"unique_cochanged_file_count_90d"=>"Breadth of different files that changed alongside this one across the recent history window.",
186
+
"avg_cochange_set_size_90d"=>"Typical width of change sets that include this file. Wider sets suggest changes tend to propagate.",
187
+
_ =>"Git-derived pressure that can amplify urgency without dominating the structural base.",
0 commit comments