@bovinphang/frontend-craft 2.8.0 → 2.9.0

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.
Files changed (195) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +378 -339
  4. package/CHANGELOG.zh-CN.md +377 -338
  5. package/CONTRIBUTING.md +371 -361
  6. package/CONTRIBUTING.zh-CN.md +371 -361
  7. package/README.md +545 -493
  8. package/README.openclaw.md +359 -320
  9. package/README.openclaw.zh-CN.md +359 -320
  10. package/README.zh-CN.md +545 -493
  11. package/agents/fec-code-reviewer.md +24 -3
  12. package/agents/fec-debugger.md +1 -1
  13. package/agents/fec-doc-updater.md +1 -1
  14. package/agents/fec-e2e-runner.md +1 -1
  15. package/agents/fec-figma-implementer.md +1 -1
  16. package/agents/fec-performance-optimizer.md +1 -1
  17. package/agents/fec-refactor-cleaner.md +4 -1
  18. package/agents/fec-refactoring-expert.md +81 -0
  19. package/agents/fec-security-reviewer.md +17 -1
  20. package/agents/fec-test-planner.md +1 -1
  21. package/agents/fec-typescript-reviewer.md +24 -8
  22. package/agents/fec-ui-checker.md +11 -11
  23. package/commands/fec-debug.md +1 -1
  24. package/commands/fec-refactor-plan.md +17 -0
  25. package/commands/fec-refactor.md +18 -0
  26. package/commands/fec-review.md +40 -10
  27. package/commands/fec-scaffold.md +1 -1
  28. package/commands/fec-smell.md +17 -0
  29. package/commands/fec-tdd.md +6 -2
  30. package/dist/bin/frontend-craft.js +190 -38
  31. package/dist/hooks/fec-run-tests.js +5 -1
  32. package/dist/hooks/fec-session-start.js +1 -1
  33. package/docs/example-prompts.md +157 -140
  34. package/docs/ja-JP/README.md +534 -493
  35. package/docs/ko-KR/README.md +534 -493
  36. package/docs/project-structure.md +151 -131
  37. package/docs/refactoring/README.md +50 -0
  38. package/docs/refactoring/catalog.md +105 -0
  39. package/docs/refactoring/smell-refactoring-matrix.md +41 -0
  40. package/docs/review-and-diagram-workflows.md +39 -0
  41. package/docs/runtimes/antigravity.md +18 -10
  42. package/docs/runtimes/augment.md +18 -10
  43. package/docs/runtimes/claude.md +191 -177
  44. package/docs/runtimes/claude.zh-CN.md +189 -175
  45. package/docs/runtimes/cline.md +18 -10
  46. package/docs/runtimes/codebuddy.md +18 -10
  47. package/docs/runtimes/codex.md +18 -10
  48. package/docs/runtimes/compatibility.md +27 -0
  49. package/docs/runtimes/copilot.md +18 -10
  50. package/docs/runtimes/cursor.md +18 -10
  51. package/docs/runtimes/gemini.md +18 -10
  52. package/docs/runtimes/kilo.md +18 -10
  53. package/docs/runtimes/openclaw.md +18 -10
  54. package/docs/runtimes/opencode.md +18 -10
  55. package/docs/runtimes/qoder.md +18 -19
  56. package/docs/runtimes/trae.md +18 -10
  57. package/docs/runtimes/windsurf.md +18 -10
  58. package/docs/superpowers/plans/2026-09-26-content-integrity.md +145 -0
  59. package/docs/superpowers/plans/2026-09-26-diagram-quality.md +170 -0
  60. package/docs/superpowers/specs/2026-09-26-diagram-quality-design.md +77 -0
  61. package/docs/superpowers/specs/2026-09-26-project-optimization-design.md +95 -0
  62. package/docs/zh-CN/example-prompts.md +157 -140
  63. package/docs/zh-CN/project-structure.md +148 -128
  64. package/docs/zh-CN/review-and-diagram-workflows.md +39 -0
  65. package/docs/zh-TW/README.md +534 -493
  66. package/localized/zh-CN/agents/fec-code-reviewer.md +22 -3
  67. package/localized/zh-CN/agents/fec-refactor-cleaner.md +3 -0
  68. package/localized/zh-CN/agents/fec-refactoring-expert.md +53 -0
  69. package/localized/zh-CN/agents/fec-security-reviewer.md +16 -0
  70. package/localized/zh-CN/agents/fec-typescript-reviewer.md +23 -7
  71. package/localized/zh-CN/commands/fec-refactor-plan.md +15 -0
  72. package/localized/zh-CN/commands/fec-refactor.md +14 -0
  73. package/localized/zh-CN/commands/fec-review.md +40 -9
  74. package/localized/zh-CN/commands/fec-smell.md +13 -0
  75. package/localized/zh-CN/commands/fec-tdd.md +4 -0
  76. package/localized/zh-CN/skills/eval_queries.json +244 -0
  77. package/localized/zh-CN/skills/fec-code-review/SKILL.md +20 -1
  78. package/localized/zh-CN/skills/fec-code-review/references/report-template.md +11 -1
  79. package/localized/zh-CN/skills/fec-code-smells/SKILL.md +33 -0
  80. package/localized/zh-CN/skills/fec-code-smells/references/detection-guide.md +25 -0
  81. package/localized/zh-CN/skills/fec-code-smells/references/smell-catalog.md +817 -0
  82. package/localized/zh-CN/skills/fec-code-smells/references/smell-to-refactoring-map.md +265 -0
  83. package/localized/zh-CN/skills/fec-image-generation/SKILL.md +31 -1
  84. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/README.md +14 -0
  85. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/architecture.json +121 -0
  86. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/invalid-explicit.json +41 -0
  87. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/sequence.json +53 -0
  88. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/sequence.mmd +21 -0
  89. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/workflow.json +98 -0
  90. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/workflow.mmd +7 -0
  91. package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +10 -3
  92. package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +8 -1
  93. package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +9 -2
  94. package/localized/zh-CN/skills/fec-image-generation/scripts/diagram-browser.mjs +90 -0
  95. package/localized/zh-CN/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
  96. package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +48 -80
  97. package/localized/zh-CN/skills/fec-image-generation/scripts/mermaid-render.mjs +64 -0
  98. package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +35 -4
  99. package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +193 -53
  100. package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +3 -0
  101. package/localized/zh-CN/skills/fec-refactoring/SKILL.md +83 -0
  102. package/localized/zh-CN/skills/fec-refactoring/references/principles.md +43 -0
  103. package/localized/zh-CN/skills/fec-refactoring/references/refactoring-vs-feature-change.md +25 -0
  104. package/localized/zh-CN/skills/fec-refactoring/references/when-to-refactor.md +17 -0
  105. package/localized/zh-CN/skills/fec-refactoring/references/workflow.md +59 -0
  106. package/localized/zh-CN/skills/fec-refactoring-api/SKILL.md +25 -0
  107. package/localized/zh-CN/skills/fec-refactoring-api/references/api-refactorings.md +496 -0
  108. package/localized/zh-CN/skills/fec-refactoring-catalog/SKILL.md +21 -0
  109. package/localized/zh-CN/skills/fec-refactoring-catalog/references/catalog-index.md +99 -0
  110. package/localized/zh-CN/skills/fec-refactoring-catalog/references/composition-guide.md +49 -0
  111. package/localized/zh-CN/skills/fec-refactoring-catalog/references/selection-guide.md +41 -0
  112. package/localized/zh-CN/skills/fec-refactoring-control/SKILL.md +25 -0
  113. package/localized/zh-CN/skills/fec-refactoring-control/references/conditional-refactorings.md +299 -0
  114. package/localized/zh-CN/skills/fec-refactoring-data/SKILL.md +25 -0
  115. package/localized/zh-CN/skills/fec-refactoring-data/references/data-refactorings.md +248 -0
  116. package/localized/zh-CN/skills/fec-refactoring-encapsulation/SKILL.md +25 -0
  117. package/localized/zh-CN/skills/fec-refactoring-encapsulation/references/encapsulation-refactorings.md +452 -0
  118. package/localized/zh-CN/skills/fec-refactoring-functions/SKILL.md +25 -0
  119. package/localized/zh-CN/skills/fec-refactoring-functions/references/function-refactorings.md +567 -0
  120. package/localized/zh-CN/skills/fec-refactoring-inheritance/SKILL.md +25 -0
  121. package/localized/zh-CN/skills/fec-refactoring-inheritance/references/inheritance-refactorings.md +550 -0
  122. package/localized/zh-CN/skills/fec-refactoring-move-features/SKILL.md +25 -0
  123. package/localized/zh-CN/skills/fec-refactoring-move-features/references/moving-refactorings.md +453 -0
  124. package/localized/zh-CN/skills/fec-refactoring-validation/SKILL.md +52 -0
  125. package/localized/zh-CN/skills/fec-refactoring-validation/references/behavior-preservation.md +15 -0
  126. package/localized/zh-CN/skills/fec-refactoring-validation/references/refactoring-test-checklist.md +25 -0
  127. package/localized/zh-CN/skills/fec-security-review/SKILL.md +16 -0
  128. package/localized/zh-CN/skills/fec-security-review/references/report-template.md +10 -0
  129. package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +3 -0
  130. package/localized/zh-CN/skills/metadata.json +408 -50
  131. package/localized/zh-CN/skills/relations.json +271 -3
  132. package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +1 -0
  133. package/openclaw.plugin.json +2 -3
  134. package/package.json +27 -17
  135. package/skills/eval_queries.json +244 -0
  136. package/skills/fec-code-review/SKILL.md +20 -1
  137. package/skills/fec-code-review/references/report-template.md +11 -1
  138. package/skills/fec-code-smells/SKILL.md +33 -0
  139. package/skills/fec-code-smells/references/detection-guide.md +25 -0
  140. package/skills/fec-code-smells/references/smell-catalog.md +861 -0
  141. package/skills/fec-code-smells/references/smell-to-refactoring-map.md +265 -0
  142. package/skills/fec-data-fetching/SKILL.md +1 -1
  143. package/skills/fec-image-generation/SKILL.md +31 -1
  144. package/skills/fec-image-generation/assets/quality-examples/README.md +14 -0
  145. package/skills/fec-image-generation/assets/quality-examples/architecture.json +121 -0
  146. package/skills/fec-image-generation/assets/quality-examples/invalid-explicit.json +41 -0
  147. package/skills/fec-image-generation/assets/quality-examples/sequence.json +53 -0
  148. package/skills/fec-image-generation/assets/quality-examples/sequence.mmd +21 -0
  149. package/skills/fec-image-generation/assets/quality-examples/workflow.json +98 -0
  150. package/skills/fec-image-generation/assets/quality-examples/workflow.mmd +7 -0
  151. package/skills/fec-image-generation/references/diagram-workflows.md +10 -3
  152. package/skills/fec-image-generation/references/html-technical-diagrams.md +8 -1
  153. package/skills/fec-image-generation/references/png-qa-autofix.md +9 -2
  154. package/skills/fec-image-generation/scripts/diagram-browser.mjs +90 -0
  155. package/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
  156. package/skills/fec-image-generation/scripts/export-diagram.mjs +48 -80
  157. package/skills/fec-image-generation/scripts/mermaid-render.mjs +64 -0
  158. package/skills/fec-image-generation/scripts/png-qa.mjs +35 -4
  159. package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +193 -53
  160. package/skills/fec-legacy-web-standard/SKILL.md +1 -1
  161. package/skills/fec-refactor-clean/SKILL.md +3 -0
  162. package/skills/fec-refactoring/SKILL.md +83 -0
  163. package/skills/fec-refactoring/references/principles.md +60 -0
  164. package/skills/fec-refactoring/references/refactoring-vs-feature-change.md +27 -0
  165. package/skills/fec-refactoring/references/when-to-refactor.md +31 -0
  166. package/skills/fec-refactoring/references/workflow.md +90 -0
  167. package/skills/fec-refactoring-api/SKILL.md +25 -0
  168. package/skills/fec-refactoring-api/references/api-refactorings.md +496 -0
  169. package/skills/fec-refactoring-catalog/SKILL.md +28 -0
  170. package/skills/fec-refactoring-catalog/references/catalog-index.md +99 -0
  171. package/skills/fec-refactoring-catalog/references/composition-guide.md +49 -0
  172. package/skills/fec-refactoring-catalog/references/selection-guide.md +47 -0
  173. package/skills/fec-refactoring-control/SKILL.md +25 -0
  174. package/skills/fec-refactoring-control/references/conditional-refactorings.md +299 -0
  175. package/skills/fec-refactoring-data/SKILL.md +25 -0
  176. package/skills/fec-refactoring-data/references/data-refactorings.md +248 -0
  177. package/skills/fec-refactoring-encapsulation/SKILL.md +25 -0
  178. package/skills/fec-refactoring-encapsulation/references/encapsulation-refactorings.md +452 -0
  179. package/skills/fec-refactoring-functions/SKILL.md +25 -0
  180. package/skills/fec-refactoring-functions/references/function-refactorings.md +567 -0
  181. package/skills/fec-refactoring-inheritance/SKILL.md +25 -0
  182. package/skills/fec-refactoring-inheritance/references/inheritance-refactorings.md +550 -0
  183. package/skills/fec-refactoring-move-features/SKILL.md +25 -0
  184. package/skills/fec-refactoring-move-features/references/moving-refactorings.md +453 -0
  185. package/skills/fec-refactoring-validation/SKILL.md +59 -0
  186. package/skills/fec-refactoring-validation/references/behavior-preservation.md +53 -0
  187. package/skills/fec-refactoring-validation/references/refactoring-test-checklist.md +42 -0
  188. package/skills/fec-security-review/SKILL.md +16 -0
  189. package/skills/fec-security-review/references/report-template.md +10 -0
  190. package/skills/fec-tdd-workflow/SKILL.md +5 -1
  191. package/skills/metadata.json +434 -71
  192. package/skills/relations.json +264 -0
  193. package/templates/shared/rules/fec-agent-workflow.md +1 -0
  194. package/docs/superpowers/plans/2026-05-29-fec-debug.md +0 -491
  195. package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +0 -340
@@ -0,0 +1,861 @@
1
+ # Code Smell Catalog
2
+
3
+ This catalog distills the supplied Chapter 3 taxonomy into evidence-oriented frontend diagnostics. Standard names and IDs are stable; explanations are project-native summaries.
4
+
5
+ ## SMELL-MYSTERIOUS-NAME — Mysterious Name
6
+
7
+ ### Diagnostic Meaning
8
+ A name does not reveal the element’s purpose or usage.
9
+
10
+ ### Strong Signals
11
+ - names require tracing implementation before intent is clear.
12
+ - renames are repeatedly discussed because current vocabulary is unstable.
13
+
14
+ ### Weak Signals
15
+ - a reader needs repeated navigation to understand the intent.
16
+ - changes around the area have historically been error-prone.
17
+
18
+ ### False Positives
19
+ - abbreviations are mandated domain terms understood by the team.
20
+
21
+ ### Required Evidence
22
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
23
+
24
+ ### Likely Impact
25
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
26
+
27
+ ### Candidate Refactorings
28
+ - `RF-CHANGE-FUNCTION-DECLARATION`
29
+ - `RF-RENAME-VARIABLE`
30
+ - `RF-RENAME-FIELD`
31
+
32
+ ### Related Smells
33
+ - `SMELL-SPECULATIVE-GENERALITY`
34
+ - `SMELL-ALTERNATIVE-CLASSES-DIFFERENT-INTERFACES`
35
+ - `SMELL-COMMENTS`
36
+
37
+ ### Frontend Manifestations
38
+ Functions, hooks, stores, props, events, and DTO fields whose names hide business intent.
39
+
40
+ ## SMELL-DUPLICATED-CODE — Duplicated Code
41
+
42
+ ### Diagnostic Meaning
43
+ The same or near-identical structure appears in multiple places and must evolve together.
44
+
45
+ ### Strong Signals
46
+ - equivalent expressions or branches appear in multiple functions.
47
+ - a change requires editing several copies of the same rule.
48
+
49
+ ### Weak Signals
50
+ - a reader needs repeated navigation to understand the intent.
51
+ - changes around the area have historically been error-prone.
52
+
53
+ ### False Positives
54
+ - similar-looking code has materially different business reasons to change.
55
+
56
+ ### Required Evidence
57
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
58
+
59
+ ### Likely Impact
60
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
61
+
62
+ ### Candidate Refactorings
63
+ - `RF-EXTRACT-FUNCTION`
64
+ - `RF-SLIDE-STATEMENTS`
65
+ - `RF-PULL-UP-METHOD`
66
+
67
+ ### Related Smells
68
+ - `SMELL-LONG-FUNCTION`
69
+ - `SMELL-MUTABLE-DATA`
70
+ - `SMELL-DIVERGENT-CHANGE`
71
+
72
+ ### Frontend Manifestations
73
+ Repeated handlers, validators, formatters, selectors, or component branches that encode one rule.
74
+
75
+ ## SMELL-LONG-FUNCTION — Long Function
76
+
77
+ ### Diagnostic Meaning
78
+ A function mixes enough intentions that its purpose is difficult to see without reading implementation detail.
79
+
80
+ ### Strong Signals
81
+ - comments divide the body into conceptual sections.
82
+ - validation, data shaping, effects, and state updates are interleaved.
83
+
84
+ ### Weak Signals
85
+ - a reader needs repeated navigation to understand the intent.
86
+ - changes around the area have historically been error-prone.
87
+
88
+ ### False Positives
89
+ - LOC alone does not prove the smell; a cohesive algorithm may legitimately be long.
90
+
91
+ ### Required Evidence
92
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
93
+
94
+ ### Likely Impact
95
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
96
+
97
+ ### Candidate Refactorings
98
+ - `RF-EXTRACT-FUNCTION`
99
+ - `RF-REPLACE-TEMP-WITH-QUERY`
100
+ - `RF-INTRODUCE-PARAMETER-OBJECT`
101
+ - `RF-PRESERVE-WHOLE-OBJECT`
102
+ - `RF-REPLACE-FUNCTION-WITH-COMMAND`
103
+ - `RF-DECOMPOSE-CONDITIONAL`
104
+ - `RF-REPLACE-CONDITIONAL-WITH-POLYMORPHISM`
105
+ - `RF-SPLIT-LOOP`
106
+
107
+ ### Related Smells
108
+ - `SMELL-DUPLICATED-CODE`
109
+ - `SMELL-LONG-PARAMETER-LIST`
110
+ - `SMELL-MUTABLE-DATA`
111
+
112
+ ### Frontend Manifestations
113
+ Large event handlers, submit flows, hooks/composables, effects, loaders, and data adapters with multiple responsibilities.
114
+
115
+ ## SMELL-LONG-PARAMETER-LIST — Long Parameter List
116
+
117
+ ### Diagnostic Meaning
118
+ A function receives many separate values whose relationships or origins are hard to understand.
119
+
120
+ ### Strong Signals
121
+ - several parameters are always passed together.
122
+ - callers unpack many fields from one object only to pass them separately.
123
+ - a flag parameter selects behavior.
124
+
125
+ ### Weak Signals
126
+ - a reader needs repeated navigation to understand the intent.
127
+ - changes around the area have historically been error-prone.
128
+
129
+ ### False Positives
130
+ - many independent values are genuinely required at a narrow boundary and an object would hide rather than clarify them.
131
+
132
+ ### Required Evidence
133
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
134
+
135
+ ### Likely Impact
136
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
137
+
138
+ ### Candidate Refactorings
139
+ - `RF-REPLACE-PARAMETER-WITH-QUERY`
140
+ - `RF-PRESERVE-WHOLE-OBJECT`
141
+ - `RF-INTRODUCE-PARAMETER-OBJECT`
142
+ - `RF-REMOVE-FLAG-ARGUMENT`
143
+ - `RF-COMBINE-FUNCTIONS-INTO-CLASS`
144
+
145
+ ### Related Smells
146
+ - `SMELL-LONG-FUNCTION`
147
+ - `SMELL-MUTABLE-DATA`
148
+ - `SMELL-SHOTGUN-SURGERY`
149
+
150
+ ### Frontend Manifestations
151
+ Hooks, helpers, services, callbacks, and component utilities with recurring options or context fragments.
152
+
153
+ ## SMELL-GLOBAL-DATA — Global Data
154
+
155
+ ### Diagnostic Meaning
156
+ Widely reachable data can be read or modified without a controlled access boundary.
157
+
158
+ ### Strong Signals
159
+ - mutation can originate from unrelated modules.
160
+ - the source of a state change is difficult to trace.
161
+
162
+ ### Weak Signals
163
+ - a reader needs repeated navigation to understand the intent.
164
+ - changes around the area have historically been error-prone.
165
+
166
+ ### False Positives
167
+ - immutable configuration fixed after startup has lower risk, though encapsulation can still clarify ownership.
168
+
169
+ ### Required Evidence
170
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
171
+
172
+ ### Likely Impact
173
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
174
+
175
+ ### Candidate Refactorings
176
+ - `RF-ENCAPSULATE-VARIABLE`
177
+
178
+ ### Related Smells
179
+ - `SMELL-MUTABLE-DATA`
180
+
181
+ ### Frontend Manifestations
182
+ Module singletons, window globals, mutable config objects, ad-hoc caches, or shared stores with unrestricted mutation.
183
+
184
+ ## SMELL-MUTABLE-DATA — Mutable Data
185
+
186
+ ### Diagnostic Meaning
187
+ State changes are difficult to reason about because values can be altered from multiple places or reused for different meanings.
188
+
189
+ ### Strong Signals
190
+ - the same variable is reassigned for distinct purposes.
191
+ - queries also mutate state.
192
+ - derived values are stored and manually synchronized.
193
+
194
+ ### Weak Signals
195
+ - a reader needs repeated navigation to understand the intent.
196
+ - changes around the area have historically been error-prone.
197
+
198
+ ### False Positives
199
+ - controlled local mutation inside a clear algorithm is not automatically problematic.
200
+
201
+ ### Required Evidence
202
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
203
+
204
+ ### Likely Impact
205
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
206
+
207
+ ### Candidate Refactorings
208
+ - `RF-ENCAPSULATE-VARIABLE`
209
+ - `RF-SPLIT-VARIABLE`
210
+ - `RF-SLIDE-STATEMENTS`
211
+ - `RF-EXTRACT-FUNCTION`
212
+ - `RF-SEPARATE-QUERY-FROM-MODIFIER`
213
+ - `RF-REMOVE-SETTING-METHOD`
214
+ - `RF-REPLACE-DERIVED-VARIABLE-WITH-QUERY`
215
+ - `RF-COMBINE-FUNCTIONS-INTO-CLASS`
216
+ - `RF-COMBINE-FUNCTIONS-INTO-TRANSFORM`
217
+ - `RF-CHANGE-REFERENCE-TO-VALUE`
218
+
219
+ ### Related Smells
220
+ - `SMELL-DUPLICATED-CODE`
221
+ - `SMELL-LONG-FUNCTION`
222
+ - `SMELL-LONG-PARAMETER-LIST`
223
+
224
+ ### Frontend Manifestations
225
+ Shared React/Vue state, mutable module caches, form models, and derived state that can drift from its source.
226
+
227
+ ## SMELL-DIVERGENT-CHANGE — Divergent Change
228
+
229
+ ### Diagnostic Meaning
230
+ One module changes for several unrelated reasons or contexts.
231
+
232
+ ### Strong Signals
233
+ - different feature requests repeatedly touch disjoint regions of the same module.
234
+ - one component owns unrelated data access, business rules, presentation, and integration concerns.
235
+
236
+ ### Weak Signals
237
+ - a reader needs repeated navigation to understand the intent.
238
+ - changes around the area have historically been error-prone.
239
+
240
+ ### False Positives
241
+ - a small cohesive module may legitimately respond to several closely related changes.
242
+
243
+ ### Required Evidence
244
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
245
+
246
+ ### Likely Impact
247
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
248
+
249
+ ### Candidate Refactorings
250
+ - `RF-SPLIT-PHASE`
251
+ - `RF-MOVE-FUNCTION`
252
+ - `RF-EXTRACT-FUNCTION`
253
+ - `RF-EXTRACT-CLASS`
254
+
255
+ ### Related Smells
256
+ - `SMELL-DUPLICATED-CODE`
257
+ - `SMELL-LONG-FUNCTION`
258
+ - `SMELL-MUTABLE-DATA`
259
+
260
+ ### Frontend Manifestations
261
+ God components or services that mix transport, domain policy, formatting, and UI concerns.
262
+
263
+ ## SMELL-SHOTGUN-SURGERY — Shotgun Surgery
264
+
265
+ ### Diagnostic Meaning
266
+ One conceptual change requires many small edits scattered across the codebase.
267
+
268
+ ### Strong Signals
269
+ - one business rule is duplicated across components, hooks, stores, and services.
270
+ - adding a variant requires editing many registries or conditionals.
271
+
272
+ ### Weak Signals
273
+ - a reader needs repeated navigation to understand the intent.
274
+ - changes around the area have historically been error-prone.
275
+
276
+ ### False Positives
277
+ - cross-cutting requirements such as telemetry may intentionally span boundaries when centralized infrastructure is not appropriate.
278
+
279
+ ### Required Evidence
280
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
281
+
282
+ ### Likely Impact
283
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
284
+
285
+ ### Candidate Refactorings
286
+ - `RF-MOVE-FUNCTION`
287
+ - `RF-MOVE-FIELD`
288
+ - `RF-COMBINE-FUNCTIONS-INTO-CLASS`
289
+ - `RF-COMBINE-FUNCTIONS-INTO-TRANSFORM`
290
+ - `RF-SPLIT-PHASE`
291
+ - `RF-INLINE-FUNCTION`
292
+ - `RF-INLINE-CLASS`
293
+
294
+ ### Related Smells
295
+ - `SMELL-LONG-PARAMETER-LIST`
296
+ - `SMELL-MUTABLE-DATA`
297
+ - `SMELL-DIVERGENT-CHANGE`
298
+
299
+ ### Frontend Manifestations
300
+ A feature change scattered across UI, selectors, API adapters, route config, and duplicated helpers.
301
+
302
+ ## SMELL-FEATURE-ENVY — Feature Envy
303
+
304
+ ### Diagnostic Meaning
305
+ A function interacts more strongly with another module’s data or behavior than with its own.
306
+
307
+ ### Strong Signals
308
+ - most values used by a calculation come from another owner.
309
+ - a helper repeatedly navigates another module’s internals.
310
+
311
+ ### Weak Signals
312
+ - a reader needs repeated navigation to understand the intent.
313
+ - changes around the area have historically been error-prone.
314
+
315
+ ### False Positives
316
+ - orchestration functions legitimately coordinate several owners and should not be moved wholesale.
317
+
318
+ ### Required Evidence
319
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
320
+
321
+ ### Likely Impact
322
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
323
+
324
+ ### Candidate Refactorings
325
+ - `RF-MOVE-FUNCTION`
326
+ - `RF-EXTRACT-FUNCTION`
327
+
328
+ ### Related Smells
329
+ - `SMELL-DUPLICATED-CODE`
330
+ - `SMELL-LONG-FUNCTION`
331
+ - `SMELL-MUTABLE-DATA`
332
+
333
+ ### Frontend Manifestations
334
+ Selectors or helpers placed near a component but dominated by store/domain data owned elsewhere.
335
+
336
+ ## SMELL-DATA-CLUMPS — Data Clumps
337
+
338
+ ### Diagnostic Meaning
339
+ The same group of data items repeatedly travels together across fields or parameters.
340
+
341
+ ### Strong Signals
342
+ - removing one value makes the remaining group lose meaning.
343
+ - the same field cluster appears in multiple signatures.
344
+
345
+ ### Weak Signals
346
+ - a reader needs repeated navigation to understand the intent.
347
+ - changes around the area have historically been error-prone.
348
+
349
+ ### False Positives
350
+ - a temporary one-off transport shape may not justify a domain abstraction.
351
+
352
+ ### Required Evidence
353
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
354
+
355
+ ### Likely Impact
356
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
357
+
358
+ ### Candidate Refactorings
359
+ - `RF-EXTRACT-CLASS`
360
+ - `RF-INTRODUCE-PARAMETER-OBJECT`
361
+ - `RF-PRESERVE-WHOLE-OBJECT`
362
+
363
+ ### Related Smells
364
+ - `SMELL-LONG-FUNCTION`
365
+ - `SMELL-LONG-PARAMETER-LIST`
366
+ - `SMELL-DIVERGENT-CHANGE`
367
+
368
+ ### Frontend Manifestations
369
+ Repeated date-range, pagination, address, upload, or request option groups in props and APIs.
370
+
371
+ ## SMELL-PRIMITIVE-OBSESSION — Primitive Obsession
372
+
373
+ ### Diagnostic Meaning
374
+ Domain concepts with rules or invariants are represented only as generic strings, numbers, or booleans.
375
+
376
+ ### Strong Signals
377
+ - validation/formatting for the same primitive repeats in several places.
378
+ - conditional logic interprets magic strings or numbers.
379
+
380
+ ### Weak Signals
381
+ - a reader needs repeated navigation to understand the intent.
382
+ - changes around the area have historically been error-prone.
383
+
384
+ ### False Positives
385
+ - a primitive with no domain behavior or invariant does not need a wrapper.
386
+
387
+ ### Required Evidence
388
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
389
+
390
+ ### Likely Impact
391
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
392
+
393
+ ### Candidate Refactorings
394
+ - `RF-REPLACE-PRIMITIVE-WITH-OBJECT`
395
+ - `RF-REPLACE-TYPE-CODE-WITH-SUBCLASSES`
396
+ - `RF-REPLACE-CONDITIONAL-WITH-POLYMORPHISM`
397
+ - `RF-EXTRACT-CLASS`
398
+ - `RF-INTRODUCE-PARAMETER-OBJECT`
399
+
400
+ ### Related Smells
401
+ - `SMELL-LONG-FUNCTION`
402
+ - `SMELL-LONG-PARAMETER-LIST`
403
+ - `SMELL-DIVERGENT-CHANGE`
404
+
405
+ ### Frontend Manifestations
406
+ Money, email addresses, IDs, ranges, units, statuses, and mode strings with repeated parsing or validation.
407
+
408
+ ## SMELL-REPEATED-SWITCHES — Repeated Switches
409
+
410
+ ### Diagnostic Meaning
411
+ The same type/variant distinction is repeated in several conditionals and must stay synchronized.
412
+
413
+ ### Strong Signals
414
+ - adding one variant requires modifying several switches/if chains.
415
+ - branch-specific behavior is distributed by the same discriminator.
416
+
417
+ ### Weak Signals
418
+ - a reader needs repeated navigation to understand the intent.
419
+ - changes around the area have historically been error-prone.
420
+
421
+ ### False Positives
422
+ - One switch does not prove Repeated Switches; a centralized exhaustive dispatcher can be appropriate.
423
+
424
+ ### Required Evidence
425
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
426
+
427
+ ### Likely Impact
428
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
429
+
430
+ ### Candidate Refactorings
431
+ - `RF-REPLACE-CONDITIONAL-WITH-POLYMORPHISM`
432
+
433
+ ### Related Smells
434
+ - `SMELL-LONG-FUNCTION`
435
+ - `SMELL-PRIMITIVE-OBSESSION`
436
+
437
+ ### Frontend Manifestations
438
+ Repeated status/type dispatch across render logic, validation, serialization, and actions.
439
+
440
+ ## SMELL-LOOPS — Loops
441
+
442
+ ### Diagnostic Meaning
443
+ An imperative loop hides a simple transformation pipeline that could communicate intent more directly.
444
+
445
+ ### Strong Signals
446
+ - the loop is mainly filter/map/collect style transformation.
447
+ - multiple bookkeeping variables obscure the element-level operation.
448
+
449
+ ### Weak Signals
450
+ - a reader needs repeated navigation to understand the intent.
451
+ - changes around the area have historically been error-prone.
452
+
453
+ ### False Positives
454
+ - performance-critical, early-exit, stateful, or async loops may be clearer as loops.
455
+
456
+ ### Required Evidence
457
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
458
+
459
+ ### Likely Impact
460
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
461
+
462
+ ### Candidate Refactorings
463
+ - `RF-REPLACE-LOOP-WITH-PIPELINE`
464
+
465
+ ### Related Smells
466
+ - Diagnose neighboring smells independently; do not infer them from this smell alone.
467
+
468
+ ### Frontend Manifestations
469
+ Array normalization or view-model construction that is easier to express as filter/map/reduce style operations.
470
+
471
+ ## SMELL-LAZY-ELEMENT — Lazy Element
472
+
473
+ ### Diagnostic Meaning
474
+ An abstraction no longer earns its indirection because it adds little meaning, behavior, or change isolation.
475
+
476
+ ### Strong Signals
477
+ - a wrapper merely mirrors another function or module.
478
+ - an extracted class has collapsed to trivial delegation.
479
+
480
+ ### Weak Signals
481
+ - a reader needs repeated navigation to understand the intent.
482
+ - changes around the area have historically been error-prone.
483
+
484
+ ### False Positives
485
+ - a tiny named function can still be valuable when its name expresses intent or provides a stable seam.
486
+
487
+ ### Required Evidence
488
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
489
+
490
+ ### Likely Impact
491
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
492
+
493
+ ### Candidate Refactorings
494
+ - `RF-INLINE-FUNCTION`
495
+ - `RF-INLINE-CLASS`
496
+ - `RF-COLLAPSE-HIERARCHY`
497
+
498
+ ### Related Smells
499
+ - `SMELL-SHOTGUN-SURGERY`
500
+ - `SMELL-SPECULATIVE-GENERALITY`
501
+ - `SMELL-MIDDLE-MAN`
502
+
503
+ ### Frontend Manifestations
504
+ Pass-through hooks, wrappers, components, services, or classes that no longer own meaningful policy.
505
+
506
+ ## SMELL-SPECULATIVE-GENERALITY — Speculative Generality
507
+
508
+ ### Diagnostic Meaning
509
+ Unused abstractions or extension points exist mainly for hypothetical future needs.
510
+
511
+ ### Strong Signals
512
+ - unused hooks, parameters, subclasses, or extension interfaces increase navigation cost.
513
+ - an abstraction exists only for tests or imagined variants.
514
+
515
+ ### Weak Signals
516
+ - a reader needs repeated navigation to understand the intent.
517
+ - changes around the area have historically been error-prone.
518
+
519
+ ### False Positives
520
+ - known near-term compatibility requirements with evidence can justify an extension point.
521
+
522
+ ### Required Evidence
523
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
524
+
525
+ ### Likely Impact
526
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
527
+
528
+ ### Candidate Refactorings
529
+ - `RF-COLLAPSE-HIERARCHY`
530
+ - `RF-INLINE-FUNCTION`
531
+ - `RF-INLINE-CLASS`
532
+ - `RF-CHANGE-FUNCTION-DECLARATION`
533
+ - `RF-REMOVE-DEAD-CODE`
534
+
535
+ ### Related Smells
536
+ - `SMELL-MYSTERIOUS-NAME`
537
+ - `SMELL-SHOTGUN-SURGERY`
538
+ - `SMELL-LAZY-ELEMENT`
539
+
540
+ ### Frontend Manifestations
541
+ Generic component APIs, unused slots/callbacks, premature plugin systems, or future-proof flags with no consumers.
542
+
543
+ ## SMELL-TEMPORARY-FIELD — Temporary Field
544
+
545
+ ### Diagnostic Meaning
546
+ A field is meaningful only during a special phase or condition, leaving the object partly invalid at other times.
547
+
548
+ ### Strong Signals
549
+ - several fields are populated and read only within one workflow.
550
+ - many null checks exist because fields are absent outside a special case.
551
+
552
+ ### Weak Signals
553
+ - a reader needs repeated navigation to understand the intent.
554
+ - changes around the area have historically been error-prone.
555
+
556
+ ### False Positives
557
+ - optional fields in a deliberately modeled partial/async state are not automatically a smell.
558
+
559
+ ### Required Evidence
560
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
561
+
562
+ ### Likely Impact
563
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
564
+
565
+ ### Candidate Refactorings
566
+ - `RF-EXTRACT-CLASS`
567
+ - `RF-MOVE-FUNCTION`
568
+ - `RF-INTRODUCE-SPECIAL-CASE`
569
+
570
+ ### Related Smells
571
+ - `SMELL-DIVERGENT-CHANGE`
572
+ - `SMELL-SHOTGUN-SURGERY`
573
+ - `SMELL-FEATURE-ENVY`
574
+
575
+ ### Frontend Manifestations
576
+ Component/service state containing transient workflow-only values that belong to a dedicated model or phase.
577
+
578
+ ## SMELL-MESSAGE-CHAINS — Message Chains
579
+
580
+ ### Diagnostic Meaning
581
+ Clients depend on a navigation path through several objects to reach the data or behavior they need.
582
+
583
+ ### Strong Signals
584
+ - many callers repeat nested property/accessor navigation.
585
+ - a relationship change forces callers to update traversal paths.
586
+
587
+ ### Weak Signals
588
+ - a reader needs repeated navigation to understand the intent.
589
+ - changes around the area have historically been error-prone.
590
+
591
+ ### False Positives
592
+ - A function/array pipeline is not automatically Message Chains; fluent APIs can be intentionally cohesive.
593
+
594
+ ### Required Evidence
595
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
596
+
597
+ ### Likely Impact
598
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
599
+
600
+ ### Candidate Refactorings
601
+ - `RF-HIDE-DELEGATE`
602
+ - `RF-EXTRACT-FUNCTION`
603
+ - `RF-MOVE-FUNCTION`
604
+
605
+ ### Related Smells
606
+ - `SMELL-DUPLICATED-CODE`
607
+ - `SMELL-LONG-FUNCTION`
608
+ - `SMELL-MUTABLE-DATA`
609
+
610
+ ### Frontend Manifestations
611
+ Deep DTO/store access such as session.user.organization.policy scattered through UI code.
612
+
613
+ ## SMELL-MIDDLE-MAN — Middle Man
614
+
615
+ ### Diagnostic Meaning
616
+ An abstraction delegates most of its interface without adding meaningful policy or protection.
617
+
618
+ ### Strong Signals
619
+ - a wrapper exposes many one-line pass-through methods.
620
+ - callers must traverse an extra layer that adds no stable boundary.
621
+
622
+ ### Weak Signals
623
+ - a reader needs repeated navigation to understand the intent.
624
+ - changes around the area have historically been error-prone.
625
+
626
+ ### False Positives
627
+ - React/Vue declarative composition is not automatically Middle Man; wrappers can own accessibility, styling, or compatibility policy.
628
+
629
+ ### Required Evidence
630
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
631
+
632
+ ### Likely Impact
633
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
634
+
635
+ ### Candidate Refactorings
636
+ - `RF-REMOVE-MIDDLE-MAN`
637
+ - `RF-INLINE-FUNCTION`
638
+ - `RF-REPLACE-SUPERCLASS-WITH-DELEGATE`
639
+ - `RF-REPLACE-SUBCLASS-WITH-DELEGATE`
640
+
641
+ ### Related Smells
642
+ - `SMELL-SHOTGUN-SURGERY`
643
+ - `SMELL-LAZY-ELEMENT`
644
+ - `SMELL-SPECULATIVE-GENERALITY`
645
+
646
+ ### Frontend Manifestations
647
+ Proxy services, hooks, or wrapper components whose only job is forwarding to another owner.
648
+
649
+ ## SMELL-INSIDER-TRADING — Insider Trading
650
+
651
+ ### Diagnostic Meaning
652
+ Modules exchange too much internal data or knowledge, weakening their boundaries.
653
+
654
+ ### Strong Signals
655
+ - two modules repeatedly reach into each other’s internals.
656
+ - private representation details leak across boundaries.
657
+
658
+ ### Weak Signals
659
+ - a reader needs repeated navigation to understand the intent.
660
+ - changes around the area have historically been error-prone.
661
+
662
+ ### False Positives
663
+ - explicit narrow collaboration is normal when responsibilities genuinely span modules.
664
+
665
+ ### Required Evidence
666
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
667
+
668
+ ### Likely Impact
669
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
670
+
671
+ ### Candidate Refactorings
672
+ - `RF-MOVE-FUNCTION`
673
+ - `RF-MOVE-FIELD`
674
+ - `RF-HIDE-DELEGATE`
675
+ - `RF-REPLACE-SUBCLASS-WITH-DELEGATE`
676
+ - `RF-REPLACE-SUPERCLASS-WITH-DELEGATE`
677
+
678
+ ### Related Smells
679
+ - `SMELL-DIVERGENT-CHANGE`
680
+ - `SMELL-SHOTGUN-SURGERY`
681
+ - `SMELL-FEATURE-ENVY`
682
+
683
+ ### Frontend Manifestations
684
+ Components, stores, and services coupled through internal fields rather than deliberate contracts.
685
+
686
+ ## SMELL-LARGE-CLASS — Large Class
687
+
688
+ ### Diagnostic Meaning
689
+ A class or equivalent module owns too many fields and responsibilities, encouraging duplication and unrelated change.
690
+
691
+ ### Strong Signals
692
+ - clusters of fields and methods form distinct concepts.
693
+ - different subsets of state are used by different operations.
694
+
695
+ ### Weak Signals
696
+ - a reader needs repeated navigation to understand the intent.
697
+ - changes around the area have historically been error-prone.
698
+
699
+ ### False Positives
700
+ - LOC alone does not prove Large Class; cohesive data structures or generated adapters may be large.
701
+
702
+ ### Required Evidence
703
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
704
+
705
+ ### Likely Impact
706
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
707
+
708
+ ### Candidate Refactorings
709
+ - `RF-EXTRACT-CLASS`
710
+ - `RF-EXTRACT-SUPERCLASS`
711
+ - `RF-REPLACE-TYPE-CODE-WITH-SUBCLASSES`
712
+
713
+ ### Related Smells
714
+ - `SMELL-DIVERGENT-CHANGE`
715
+ - `SMELL-DATA-CLUMPS`
716
+ - `SMELL-PRIMITIVE-OBSESSION`
717
+
718
+ ### Frontend Manifestations
719
+ Oversized stores, services, class components, controllers, or modules with several independent responsibility clusters.
720
+
721
+ ## SMELL-ALTERNATIVE-CLASSES-DIFFERENT-INTERFACES — Alternative Classes with Different Interfaces
722
+
723
+ ### Diagnostic Meaning
724
+ Two interchangeable concepts provide similar behavior through incompatible interfaces.
725
+
726
+ ### Strong Signals
727
+ - callers require adapters or conditionals just to switch implementations.
728
+ - equivalent operations have inconsistent names/signatures.
729
+
730
+ ### Weak Signals
731
+ - a reader needs repeated navigation to understand the intent.
732
+ - changes around the area have historically been error-prone.
733
+
734
+ ### False Positives
735
+ - different interfaces are appropriate when the concepts are not actually substitutable.
736
+
737
+ ### Required Evidence
738
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
739
+
740
+ ### Likely Impact
741
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
742
+
743
+ ### Candidate Refactorings
744
+ - `RF-CHANGE-FUNCTION-DECLARATION`
745
+ - `RF-MOVE-FUNCTION`
746
+ - `RF-EXTRACT-SUPERCLASS`
747
+
748
+ ### Related Smells
749
+ - `SMELL-MYSTERIOUS-NAME`
750
+ - `SMELL-DIVERGENT-CHANGE`
751
+ - `SMELL-SHOTGUN-SURGERY`
752
+
753
+ ### Frontend Manifestations
754
+ Alternative API clients, storage adapters, editors, or providers that should satisfy one frontend contract.
755
+
756
+ ## SMELL-DATA-CLASS — Data Class
757
+
758
+ ### Diagnostic Meaning
759
+ A data holder is manipulated in detail by other modules while behavior that belongs with the data lives elsewhere.
760
+
761
+ ### Strong Signals
762
+ - clients repeatedly read/write fields and perform the same calculations.
763
+ - mutable fields expose invariants that callers must maintain.
764
+
765
+ ### Weak Signals
766
+ - a reader needs repeated navigation to understand the intent.
767
+ - changes around the area have historically been error-prone.
768
+
769
+ ### False Positives
770
+ - Immutable DTOs, API responses, and intermediate transform records may legitimately remain data-only.
771
+
772
+ ### Required Evidence
773
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
774
+
775
+ ### Likely Impact
776
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
777
+
778
+ ### Candidate Refactorings
779
+ - `RF-ENCAPSULATE-RECORD`
780
+ - `RF-REMOVE-SETTING-METHOD`
781
+ - `RF-MOVE-FUNCTION`
782
+ - `RF-EXTRACT-FUNCTION`
783
+ - `RF-SPLIT-PHASE`
784
+
785
+ ### Related Smells
786
+ - `SMELL-DUPLICATED-CODE`
787
+ - `SMELL-LONG-FUNCTION`
788
+ - `SMELL-MUTABLE-DATA`
789
+
790
+ ### Frontend Manifestations
791
+ Mutable form/domain models whose rules live in consumers; immutable transfer/view-model records are common exceptions.
792
+
793
+ ## SMELL-REFUSED-BEQUEST — Refused Bequest
794
+
795
+ ### Diagnostic Meaning
796
+ A subtype inherits data or behavior that does not fit its real substitutability or responsibility.
797
+
798
+ ### Strong Signals
799
+ - subclasses override inherited behavior to disable it.
800
+ - consumers cannot safely treat subtype as the parent contract.
801
+
802
+ ### Weak Signals
803
+ - a reader needs repeated navigation to understand the intent.
804
+ - changes around the area have historically been error-prone.
805
+
806
+ ### False Positives
807
+ - a subtype need not use every parent helper; unused inherited members alone do not prove the smell.
808
+
809
+ ### Required Evidence
810
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
811
+
812
+ ### Likely Impact
813
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
814
+
815
+ ### Candidate Refactorings
816
+ - `RF-PUSH-DOWN-METHOD`
817
+ - `RF-PUSH-DOWN-FIELD`
818
+ - `RF-REPLACE-SUBCLASS-WITH-DELEGATE`
819
+ - `RF-REPLACE-SUPERCLASS-WITH-DELEGATE`
820
+
821
+ ### Related Smells
822
+ - `SMELL-MIDDLE-MAN`
823
+ - `SMELL-INSIDER-TRADING`
824
+
825
+ ### Frontend Manifestations
826
+ Legacy class hierarchies in SDKs, editors, models, or class components where inheritance encodes the wrong relationship.
827
+
828
+ ## SMELL-COMMENTS — Comments
829
+
830
+ ### Diagnostic Meaning
831
+ Comments are used to explain confusing structure that code could express more directly; comments themselves are not defects.
832
+
833
+ ### Strong Signals
834
+ - a long comment explains a block’s purpose because the block has no meaningful abstraction.
835
+ - comments describe preconditions that code never checks.
836
+
837
+ ### Weak Signals
838
+ - a reader needs repeated navigation to understand the intent.
839
+ - changes around the area have historically been error-prone.
840
+
841
+ ### False Positives
842
+ - Comments are not defects by themselves; rationale, constraints, and non-obvious decisions can be valuable.
843
+
844
+ ### Required Evidence
845
+ - Cite concrete files/symbols and show the repeated dependency, change pattern, or structural burden; metrics alone are insufficient.
846
+
847
+ ### Likely Impact
848
+ - Increased comprehension cost, change coupling, or regression risk when the affected structure evolves.
849
+
850
+ ### Candidate Refactorings
851
+ - `RF-EXTRACT-FUNCTION`
852
+ - `RF-CHANGE-FUNCTION-DECLARATION`
853
+ - `RF-INTRODUCE-ASSERTION`
854
+
855
+ ### Related Smells
856
+ - `SMELL-MYSTERIOUS-NAME`
857
+ - `SMELL-DUPLICATED-CODE`
858
+ - `SMELL-LONG-FUNCTION`
859
+
860
+ ### Frontend Manifestations
861
+ Comments around dense handlers or conditionals can reveal missing names, extracted functions, or explicit invariants.