@aiready/context-analyzer 0.21.5 → 0.21.7
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.
- package/.aiready/aiready-report-20260314-222254.json +39216 -0
- package/.aiready/aiready-report-20260314-223947.json +3413 -0
- package/.aiready/aiready-report-20260314-224112.json +3413 -0
- package/.aiready/aiready-report-20260314-224302.json +2973 -0
- package/.aiready/aiready-report-20260314-224939.json +3092 -0
- package/.aiready/aiready-report-20260314-225154.json +3092 -0
- package/.turbo/turbo-build.log +26 -24
- package/.turbo/turbo-lint.log +5 -6
- package/.turbo/turbo-test.log +41 -119
- package/dist/__tests__/analyzer.test.js +55 -14
- package/dist/__tests__/analyzer.test.js.map +1 -1
- package/dist/__tests__/cluster-detector.test.d.ts +2 -0
- package/dist/__tests__/cluster-detector.test.d.ts.map +1 -0
- package/dist/__tests__/cluster-detector.test.js +121 -0
- package/dist/__tests__/cluster-detector.test.js.map +1 -0
- package/dist/__tests__/contract.test.d.ts +2 -0
- package/dist/__tests__/contract.test.d.ts.map +1 -0
- package/dist/__tests__/contract.test.js +59 -0
- package/dist/__tests__/contract.test.js.map +1 -0
- package/dist/__tests__/enhanced-cohesion.test.js +12 -2
- package/dist/__tests__/enhanced-cohesion.test.js.map +1 -1
- package/dist/__tests__/file-classification.test.d.ts +2 -0
- package/dist/__tests__/file-classification.test.d.ts.map +1 -0
- package/dist/__tests__/file-classification.test.js +749 -0
- package/dist/__tests__/file-classification.test.js.map +1 -0
- package/dist/__tests__/fragmentation-advanced.test.js +2 -8
- package/dist/__tests__/fragmentation-advanced.test.js.map +1 -1
- package/dist/__tests__/fragmentation-coupling.test.js +2 -2
- package/dist/__tests__/fragmentation-coupling.test.js.map +1 -1
- package/dist/__tests__/fragmentation-log.test.js +3 -7
- package/dist/__tests__/fragmentation-log.test.js.map +1 -1
- package/dist/__tests__/provider.test.d.ts +2 -0
- package/dist/__tests__/provider.test.d.ts.map +1 -0
- package/dist/__tests__/provider.test.js +72 -0
- package/dist/__tests__/provider.test.js.map +1 -0
- package/dist/__tests__/remediation.test.d.ts +2 -0
- package/dist/__tests__/remediation.test.d.ts.map +1 -0
- package/dist/__tests__/remediation.test.js +61 -0
- package/dist/__tests__/remediation.test.js.map +1 -0
- package/dist/__tests__/scoring.test.js +196 -16
- package/dist/__tests__/scoring.test.js.map +1 -1
- package/dist/__tests__/structural-cohesion.test.js +8 -2
- package/dist/__tests__/structural-cohesion.test.js.map +1 -1
- package/dist/analyzer.d.ts +31 -94
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +260 -678
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzers/python-context.d.ts.map +1 -1
- package/dist/analyzers/python-context.js +10 -8
- package/dist/analyzers/python-context.js.map +1 -1
- package/dist/ast-utils.d.ts +16 -0
- package/dist/ast-utils.d.ts.map +1 -0
- package/dist/ast-utils.js +81 -0
- package/dist/ast-utils.js.map +1 -0
- package/dist/chunk-2HE27YEV.mjs +1739 -0
- package/dist/chunk-64U3PNO3.mjs +94 -0
- package/dist/chunk-CDIVYADN.mjs +2110 -0
- package/dist/chunk-D25B5LZR.mjs +1739 -0
- package/dist/chunk-D3SIHB2V.mjs +2118 -0
- package/dist/chunk-FNPSK3CG.mjs +1760 -0
- package/dist/chunk-GXTGOLZT.mjs +92 -0
- package/dist/chunk-KDUUZQBK.mjs +1692 -0
- package/dist/chunk-KWIS5FQP.mjs +1739 -0
- package/dist/chunk-LERPI33Y.mjs +2060 -0
- package/dist/chunk-MZP3G7TF.mjs +2118 -0
- package/dist/chunk-NOHK5DLU.mjs +2173 -0
- package/dist/chunk-ORLC5Y4J.mjs +1787 -0
- package/dist/chunk-OTCQL7DY.mjs +2045 -0
- package/dist/chunk-RRB2C34Q.mjs +1738 -0
- package/dist/chunk-SFK6XTJE.mjs +2110 -0
- package/dist/chunk-U5R2FTCR.mjs +1803 -0
- package/dist/chunk-UU4HZ7ZT.mjs +1849 -0
- package/dist/chunk-WKOZOHOU.mjs +2060 -0
- package/dist/chunk-XIXAWCMS.mjs +1760 -0
- package/dist/chunk-XTAXUNQN.mjs +1742 -0
- package/dist/classifier.d.ts +114 -0
- package/dist/classifier.d.ts.map +1 -0
- package/dist/classifier.js +439 -0
- package/dist/classifier.js.map +1 -0
- package/dist/cli.js +681 -1170
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +63 -533
- package/dist/cluster-detector.d.ts +8 -0
- package/dist/cluster-detector.d.ts.map +1 -0
- package/dist/cluster-detector.js +70 -0
- package/dist/cluster-detector.js.map +1 -0
- package/dist/defaults.d.ts +7 -0
- package/dist/defaults.d.ts.map +1 -0
- package/dist/defaults.js +54 -0
- package/dist/defaults.js.map +1 -0
- package/dist/graph-builder.d.ts +33 -0
- package/dist/graph-builder.d.ts.map +1 -0
- package/dist/graph-builder.js +225 -0
- package/dist/graph-builder.js.map +1 -0
- package/dist/index.d.mts +93 -106
- package/dist/index.d.ts +93 -106
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +932 -745
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +262 -28
- package/dist/metrics.d.ts +34 -0
- package/dist/metrics.d.ts.map +1 -0
- package/dist/metrics.js +170 -0
- package/dist/metrics.js.map +1 -0
- package/dist/provider.d.ts +6 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +48 -0
- package/dist/provider.js.map +1 -0
- package/dist/python-context-3GZKN3LR.mjs +162 -0
- package/dist/python-context-O2EN3M6Z.mjs +162 -0
- package/dist/remediation.d.ts +25 -0
- package/dist/remediation.d.ts.map +1 -0
- package/dist/remediation.js +98 -0
- package/dist/remediation.js.map +1 -0
- package/dist/scoring.d.ts +3 -7
- package/dist/scoring.d.ts.map +1 -1
- package/dist/scoring.js +57 -48
- package/dist/scoring.js.map +1 -1
- package/dist/semantic-analysis.d.ts +12 -23
- package/dist/semantic-analysis.d.ts.map +1 -1
- package/dist/semantic-analysis.js +172 -110
- package/dist/semantic-analysis.js.map +1 -1
- package/dist/summary.d.ts +6 -0
- package/dist/summary.d.ts.map +1 -0
- package/dist/summary.js +92 -0
- package/dist/summary.js.map +1 -0
- package/dist/types.d.ts +9 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/output-formatter.d.ts +14 -0
- package/dist/utils/output-formatter.d.ts.map +1 -0
- package/dist/utils/output-formatter.js +338 -0
- package/dist/utils/output-formatter.js.map +1 -0
- package/package.json +2 -2
- package/src/__tests__/analyzer.test.ts +1 -1
- package/src/__tests__/auto-detection.test.ts +1 -1
- package/src/__tests__/contract.test.ts +1 -1
- package/src/__tests__/enhanced-cohesion.test.ts +1 -1
- package/src/__tests__/file-classification.test.ts +1 -1
- package/src/__tests__/fragmentation-advanced.test.ts +1 -1
- package/src/__tests__/fragmentation-coupling.test.ts +1 -1
- package/src/__tests__/fragmentation-log.test.ts +1 -1
- package/src/__tests__/provider.test.ts +1 -1
- package/src/__tests__/structural-cohesion.test.ts +1 -1
- package/src/analyzer.ts +112 -317
- package/src/analyzers/python-context.ts +7 -76
- package/src/ast-utils.ts +2 -2
- package/src/classifier.ts +13 -328
- package/src/cli-action.ts +110 -0
- package/src/cli.ts +3 -701
- package/src/cluster-detector.ts +28 -1
- package/src/defaults.ts +3 -0
- package/src/graph-builder.ts +10 -91
- package/src/heuristics.ts +216 -0
- package/src/index.ts +6 -0
- package/src/issue-analyzer.ts +158 -0
- package/src/metrics.ts +9 -0
- package/src/scoring.ts +3 -5
- package/src/semantic-analysis.ts +8 -14
- package/src/summary.ts +62 -106
- package/src/types.ts +52 -20
- package/src/utils/dependency-graph-utils.ts +126 -0
- package/src/utils/output-formatter.ts +411 -0
- package/src/utils/string-utils.ts +21 -0
|
@@ -0,0 +1,3413 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": {
|
|
3
|
+
"totalIssues": 28,
|
|
4
|
+
"criticalIssues": 28,
|
|
5
|
+
"majorIssues": 0,
|
|
6
|
+
"totalFiles": 17,
|
|
7
|
+
"toolsRun": ["context-analyzer"],
|
|
8
|
+
"executionTime": 131,
|
|
9
|
+
"config": {
|
|
10
|
+
"scan": {
|
|
11
|
+
"tools": ["context"]
|
|
12
|
+
},
|
|
13
|
+
"tools": {
|
|
14
|
+
"context-analyzer": {}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"toolConfigs": {
|
|
18
|
+
"context-analyzer": {}
|
|
19
|
+
},
|
|
20
|
+
"businessImpact": {
|
|
21
|
+
"estimatedMonthlyWaste": 3129,
|
|
22
|
+
"potentialSavings": 3129,
|
|
23
|
+
"productivityHours": 112
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"context-analyzer": {
|
|
27
|
+
"results": [
|
|
28
|
+
{
|
|
29
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
30
|
+
"issues": [
|
|
31
|
+
{
|
|
32
|
+
"type": "context-fragmentation",
|
|
33
|
+
"severity": "critical",
|
|
34
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
35
|
+
"location": {
|
|
36
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
37
|
+
"line": 1
|
|
38
|
+
},
|
|
39
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "context-fragmentation",
|
|
43
|
+
"severity": "critical",
|
|
44
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
45
|
+
"location": {
|
|
46
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
47
|
+
"line": 1
|
|
48
|
+
},
|
|
49
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "context-fragmentation",
|
|
53
|
+
"severity": "critical",
|
|
54
|
+
"message": "Context budget 23,417 tokens is 50% over limit",
|
|
55
|
+
"location": {
|
|
56
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
57
|
+
"line": 1
|
|
58
|
+
},
|
|
59
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"metrics": {
|
|
63
|
+
"tokenCost": 2862,
|
|
64
|
+
"complexityScore": 9
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
69
|
+
"issues": [
|
|
70
|
+
{
|
|
71
|
+
"type": "context-fragmentation",
|
|
72
|
+
"severity": "critical",
|
|
73
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
74
|
+
"location": {
|
|
75
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
76
|
+
"line": 1
|
|
77
|
+
},
|
|
78
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "context-fragmentation",
|
|
82
|
+
"severity": "critical",
|
|
83
|
+
"message": "Context budget 23,172 tokens is 50% over limit",
|
|
84
|
+
"location": {
|
|
85
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
86
|
+
"line": 1
|
|
87
|
+
},
|
|
88
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"metrics": {
|
|
92
|
+
"tokenCost": 3192,
|
|
93
|
+
"complexityScore": 5
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
98
|
+
"issues": [
|
|
99
|
+
{
|
|
100
|
+
"type": "context-fragmentation",
|
|
101
|
+
"severity": "critical",
|
|
102
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
103
|
+
"location": {
|
|
104
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
105
|
+
"line": 1
|
|
106
|
+
},
|
|
107
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "context-fragmentation",
|
|
111
|
+
"severity": "critical",
|
|
112
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
113
|
+
"location": {
|
|
114
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
115
|
+
"line": 1
|
|
116
|
+
},
|
|
117
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "context-fragmentation",
|
|
121
|
+
"severity": "critical",
|
|
122
|
+
"message": "Context budget 21,737 tokens is 50% over limit",
|
|
123
|
+
"location": {
|
|
124
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
125
|
+
"line": 1
|
|
126
|
+
},
|
|
127
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"metrics": {
|
|
131
|
+
"tokenCost": 1182,
|
|
132
|
+
"complexityScore": 9
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
137
|
+
"issues": [
|
|
138
|
+
{
|
|
139
|
+
"type": "context-fragmentation",
|
|
140
|
+
"severity": "critical",
|
|
141
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
142
|
+
"location": {
|
|
143
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
144
|
+
"line": 1
|
|
145
|
+
},
|
|
146
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "context-fragmentation",
|
|
150
|
+
"severity": "critical",
|
|
151
|
+
"message": "Import depth 6 exceeds recommended maximum 5",
|
|
152
|
+
"location": {
|
|
153
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
154
|
+
"line": 1
|
|
155
|
+
},
|
|
156
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"type": "context-fragmentation",
|
|
160
|
+
"severity": "critical",
|
|
161
|
+
"message": "Context budget 20,979 tokens is 50% over limit",
|
|
162
|
+
"location": {
|
|
163
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
164
|
+
"line": 1
|
|
165
|
+
},
|
|
166
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"metrics": {
|
|
170
|
+
"tokenCost": 999,
|
|
171
|
+
"complexityScore": 6
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
176
|
+
"issues": [
|
|
177
|
+
{
|
|
178
|
+
"type": "context-fragmentation",
|
|
179
|
+
"severity": "critical",
|
|
180
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
181
|
+
"location": {
|
|
182
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
183
|
+
"line": 1
|
|
184
|
+
},
|
|
185
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"type": "context-fragmentation",
|
|
189
|
+
"severity": "critical",
|
|
190
|
+
"message": "Import depth 8 exceeds limit by 50%",
|
|
191
|
+
"location": {
|
|
192
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
193
|
+
"line": 1
|
|
194
|
+
},
|
|
195
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"type": "context-fragmentation",
|
|
199
|
+
"severity": "critical",
|
|
200
|
+
"message": "Context budget 20,555 tokens is 50% over limit",
|
|
201
|
+
"location": {
|
|
202
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
203
|
+
"line": 1
|
|
204
|
+
},
|
|
205
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"metrics": {
|
|
209
|
+
"tokenCost": 109,
|
|
210
|
+
"complexityScore": 8
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
215
|
+
"issues": [
|
|
216
|
+
{
|
|
217
|
+
"type": "context-fragmentation",
|
|
218
|
+
"severity": "critical",
|
|
219
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
220
|
+
"location": {
|
|
221
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
222
|
+
"line": 1
|
|
223
|
+
},
|
|
224
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"type": "context-fragmentation",
|
|
228
|
+
"severity": "critical",
|
|
229
|
+
"message": "Import depth 7 exceeds recommended maximum 5",
|
|
230
|
+
"location": {
|
|
231
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
232
|
+
"line": 1
|
|
233
|
+
},
|
|
234
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"type": "context-fragmentation",
|
|
238
|
+
"severity": "critical",
|
|
239
|
+
"message": "Context budget 20,446 tokens is 50% over limit",
|
|
240
|
+
"location": {
|
|
241
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
242
|
+
"line": 1
|
|
243
|
+
},
|
|
244
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
"metrics": {
|
|
248
|
+
"tokenCost": 466,
|
|
249
|
+
"complexityScore": 7
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
254
|
+
"issues": [
|
|
255
|
+
{
|
|
256
|
+
"type": "context-fragmentation",
|
|
257
|
+
"severity": "critical",
|
|
258
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
259
|
+
"location": {
|
|
260
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
261
|
+
"line": 1
|
|
262
|
+
},
|
|
263
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"metrics": {
|
|
267
|
+
"tokenCost": 711,
|
|
268
|
+
"complexityScore": 4
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
273
|
+
"issues": [
|
|
274
|
+
{
|
|
275
|
+
"type": "context-fragmentation",
|
|
276
|
+
"severity": "critical",
|
|
277
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
278
|
+
"location": {
|
|
279
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
280
|
+
"line": 1
|
|
281
|
+
},
|
|
282
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"metrics": {
|
|
286
|
+
"tokenCost": 1854,
|
|
287
|
+
"complexityScore": 3
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
292
|
+
"issues": [
|
|
293
|
+
{
|
|
294
|
+
"type": "context-fragmentation",
|
|
295
|
+
"severity": "critical",
|
|
296
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
297
|
+
"location": {
|
|
298
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
299
|
+
"line": 1
|
|
300
|
+
},
|
|
301
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
"metrics": {
|
|
305
|
+
"tokenCost": 1534,
|
|
306
|
+
"complexityScore": 3
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
311
|
+
"issues": [
|
|
312
|
+
{
|
|
313
|
+
"type": "context-fragmentation",
|
|
314
|
+
"severity": "critical",
|
|
315
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
316
|
+
"location": {
|
|
317
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
318
|
+
"line": 1
|
|
319
|
+
},
|
|
320
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
"metrics": {
|
|
324
|
+
"tokenCost": 3968,
|
|
325
|
+
"complexityScore": 1
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
330
|
+
"issues": [
|
|
331
|
+
{
|
|
332
|
+
"type": "context-fragmentation",
|
|
333
|
+
"severity": "critical",
|
|
334
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
335
|
+
"location": {
|
|
336
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
337
|
+
"line": 1
|
|
338
|
+
},
|
|
339
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
"metrics": {
|
|
343
|
+
"tokenCost": 743,
|
|
344
|
+
"complexityScore": 2
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
349
|
+
"issues": [
|
|
350
|
+
{
|
|
351
|
+
"type": "context-fragmentation",
|
|
352
|
+
"severity": "critical",
|
|
353
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
354
|
+
"location": {
|
|
355
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
356
|
+
"line": 1
|
|
357
|
+
},
|
|
358
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
"metrics": {
|
|
362
|
+
"tokenCost": 2512,
|
|
363
|
+
"complexityScore": 1
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
368
|
+
"issues": [
|
|
369
|
+
{
|
|
370
|
+
"type": "context-fragmentation",
|
|
371
|
+
"severity": "critical",
|
|
372
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
373
|
+
"location": {
|
|
374
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
375
|
+
"line": 1
|
|
376
|
+
},
|
|
377
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"metrics": {
|
|
381
|
+
"tokenCost": 1442,
|
|
382
|
+
"complexityScore": 1
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
387
|
+
"issues": [
|
|
388
|
+
{
|
|
389
|
+
"type": "context-fragmentation",
|
|
390
|
+
"severity": "critical",
|
|
391
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
392
|
+
"location": {
|
|
393
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
394
|
+
"line": 1
|
|
395
|
+
},
|
|
396
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
"metrics": {
|
|
400
|
+
"tokenCost": 1099,
|
|
401
|
+
"complexityScore": 1
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
406
|
+
"issues": [
|
|
407
|
+
{
|
|
408
|
+
"type": "context-fragmentation",
|
|
409
|
+
"severity": "critical",
|
|
410
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
411
|
+
"location": {
|
|
412
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
413
|
+
"line": 1
|
|
414
|
+
},
|
|
415
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
416
|
+
}
|
|
417
|
+
],
|
|
418
|
+
"metrics": {
|
|
419
|
+
"tokenCost": 2063,
|
|
420
|
+
"complexityScore": 0
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
425
|
+
"issues": [
|
|
426
|
+
{
|
|
427
|
+
"type": "context-fragmentation",
|
|
428
|
+
"severity": "critical",
|
|
429
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
430
|
+
"location": {
|
|
431
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
432
|
+
"line": 1
|
|
433
|
+
},
|
|
434
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
435
|
+
}
|
|
436
|
+
],
|
|
437
|
+
"metrics": {
|
|
438
|
+
"tokenCost": 378,
|
|
439
|
+
"complexityScore": 1
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
444
|
+
"issues": [
|
|
445
|
+
{
|
|
446
|
+
"type": "context-fragmentation",
|
|
447
|
+
"severity": "critical",
|
|
448
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
449
|
+
"location": {
|
|
450
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
451
|
+
"line": 1
|
|
452
|
+
},
|
|
453
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
454
|
+
}
|
|
455
|
+
],
|
|
456
|
+
"metrics": {
|
|
457
|
+
"tokenCost": 1548,
|
|
458
|
+
"complexityScore": 0
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
"summary": {
|
|
463
|
+
"totalFiles": 17,
|
|
464
|
+
"criticalIssues": 17,
|
|
465
|
+
"majorIssues": 0,
|
|
466
|
+
"totalTokens": 26662,
|
|
467
|
+
"avgContextBudget": 10347.117647058823,
|
|
468
|
+
"maxContextBudget": 23417,
|
|
469
|
+
"avgImportDepth": 3.588235294117647,
|
|
470
|
+
"maxImportDepth": 9,
|
|
471
|
+
"deepFiles": [
|
|
472
|
+
{
|
|
473
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
474
|
+
"depth": 9
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
478
|
+
"depth": 9
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
482
|
+
"depth": 6
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
486
|
+
"depth": 8
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
490
|
+
"depth": 7
|
|
491
|
+
}
|
|
492
|
+
],
|
|
493
|
+
"avgFragmentation": 0.6866729882994713,
|
|
494
|
+
"fragmentedModules": [
|
|
495
|
+
{
|
|
496
|
+
"domain": "/Users",
|
|
497
|
+
"files": [
|
|
498
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
499
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
500
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
501
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
502
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
503
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
504
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
505
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
506
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
507
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
508
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
509
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
510
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
511
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
512
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
513
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
514
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts"
|
|
515
|
+
],
|
|
516
|
+
"fragmentationScore": 0.6866729882994713,
|
|
517
|
+
"totalTokens": 26662,
|
|
518
|
+
"avgCohesion": 0.9305882352941175,
|
|
519
|
+
"suggestedStructure": {
|
|
520
|
+
"targetFiles": 9,
|
|
521
|
+
"consolidationPlan": [
|
|
522
|
+
"Consolidate 17 files in /Users into fewer modules"
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
],
|
|
527
|
+
"avgCohesion": 0.9305882352941175,
|
|
528
|
+
"lowCohesionFiles": [],
|
|
529
|
+
"minorIssues": 0,
|
|
530
|
+
"totalPotentialSavings": 113223,
|
|
531
|
+
"topExpensiveFiles": [
|
|
532
|
+
{
|
|
533
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
534
|
+
"contextBudget": 23417,
|
|
535
|
+
"severity": "critical"
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
539
|
+
"contextBudget": 23172,
|
|
540
|
+
"severity": "critical"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
544
|
+
"contextBudget": 21737,
|
|
545
|
+
"severity": "critical"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
549
|
+
"contextBudget": 20979,
|
|
550
|
+
"severity": "critical"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
554
|
+
"contextBudget": 20555,
|
|
555
|
+
"severity": "critical"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
559
|
+
"contextBudget": 20446,
|
|
560
|
+
"severity": "critical"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
564
|
+
"contextBudget": 7048,
|
|
565
|
+
"severity": "critical"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
569
|
+
"contextBudget": 6657,
|
|
570
|
+
"severity": "critical"
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
574
|
+
"contextBudget": 6337,
|
|
575
|
+
"severity": "critical"
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
579
|
+
"contextBudget": 5516,
|
|
580
|
+
"severity": "critical"
|
|
581
|
+
}
|
|
582
|
+
],
|
|
583
|
+
"config": {
|
|
584
|
+
"rootDir": "/Users/pengcao/projects/aiready/packages/context-analyzer"
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
"metadata": {
|
|
588
|
+
"toolName": "context-analyzer",
|
|
589
|
+
"version": "0.17.5",
|
|
590
|
+
"timestamp": "2026-03-14T11:39:47.195Z",
|
|
591
|
+
"config": {}
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
"context": {
|
|
595
|
+
"results": [
|
|
596
|
+
{
|
|
597
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
598
|
+
"issues": [
|
|
599
|
+
{
|
|
600
|
+
"type": "context-fragmentation",
|
|
601
|
+
"severity": "critical",
|
|
602
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
603
|
+
"location": {
|
|
604
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
605
|
+
"line": 1
|
|
606
|
+
},
|
|
607
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"type": "context-fragmentation",
|
|
611
|
+
"severity": "critical",
|
|
612
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
613
|
+
"location": {
|
|
614
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
615
|
+
"line": 1
|
|
616
|
+
},
|
|
617
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"type": "context-fragmentation",
|
|
621
|
+
"severity": "critical",
|
|
622
|
+
"message": "Context budget 23,417 tokens is 50% over limit",
|
|
623
|
+
"location": {
|
|
624
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
625
|
+
"line": 1
|
|
626
|
+
},
|
|
627
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
628
|
+
}
|
|
629
|
+
],
|
|
630
|
+
"metrics": {
|
|
631
|
+
"tokenCost": 2862,
|
|
632
|
+
"complexityScore": 9
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
637
|
+
"issues": [
|
|
638
|
+
{
|
|
639
|
+
"type": "context-fragmentation",
|
|
640
|
+
"severity": "critical",
|
|
641
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
642
|
+
"location": {
|
|
643
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
644
|
+
"line": 1
|
|
645
|
+
},
|
|
646
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"type": "context-fragmentation",
|
|
650
|
+
"severity": "critical",
|
|
651
|
+
"message": "Context budget 23,172 tokens is 50% over limit",
|
|
652
|
+
"location": {
|
|
653
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
654
|
+
"line": 1
|
|
655
|
+
},
|
|
656
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
657
|
+
}
|
|
658
|
+
],
|
|
659
|
+
"metrics": {
|
|
660
|
+
"tokenCost": 3192,
|
|
661
|
+
"complexityScore": 5
|
|
662
|
+
}
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
666
|
+
"issues": [
|
|
667
|
+
{
|
|
668
|
+
"type": "context-fragmentation",
|
|
669
|
+
"severity": "critical",
|
|
670
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
671
|
+
"location": {
|
|
672
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
673
|
+
"line": 1
|
|
674
|
+
},
|
|
675
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"type": "context-fragmentation",
|
|
679
|
+
"severity": "critical",
|
|
680
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
681
|
+
"location": {
|
|
682
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
683
|
+
"line": 1
|
|
684
|
+
},
|
|
685
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"type": "context-fragmentation",
|
|
689
|
+
"severity": "critical",
|
|
690
|
+
"message": "Context budget 21,737 tokens is 50% over limit",
|
|
691
|
+
"location": {
|
|
692
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
693
|
+
"line": 1
|
|
694
|
+
},
|
|
695
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
696
|
+
}
|
|
697
|
+
],
|
|
698
|
+
"metrics": {
|
|
699
|
+
"tokenCost": 1182,
|
|
700
|
+
"complexityScore": 9
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
705
|
+
"issues": [
|
|
706
|
+
{
|
|
707
|
+
"type": "context-fragmentation",
|
|
708
|
+
"severity": "critical",
|
|
709
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
710
|
+
"location": {
|
|
711
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
712
|
+
"line": 1
|
|
713
|
+
},
|
|
714
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"type": "context-fragmentation",
|
|
718
|
+
"severity": "critical",
|
|
719
|
+
"message": "Import depth 6 exceeds recommended maximum 5",
|
|
720
|
+
"location": {
|
|
721
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
722
|
+
"line": 1
|
|
723
|
+
},
|
|
724
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"type": "context-fragmentation",
|
|
728
|
+
"severity": "critical",
|
|
729
|
+
"message": "Context budget 20,979 tokens is 50% over limit",
|
|
730
|
+
"location": {
|
|
731
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
732
|
+
"line": 1
|
|
733
|
+
},
|
|
734
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
735
|
+
}
|
|
736
|
+
],
|
|
737
|
+
"metrics": {
|
|
738
|
+
"tokenCost": 999,
|
|
739
|
+
"complexityScore": 6
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
744
|
+
"issues": [
|
|
745
|
+
{
|
|
746
|
+
"type": "context-fragmentation",
|
|
747
|
+
"severity": "critical",
|
|
748
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
749
|
+
"location": {
|
|
750
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
751
|
+
"line": 1
|
|
752
|
+
},
|
|
753
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"type": "context-fragmentation",
|
|
757
|
+
"severity": "critical",
|
|
758
|
+
"message": "Import depth 8 exceeds limit by 50%",
|
|
759
|
+
"location": {
|
|
760
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
761
|
+
"line": 1
|
|
762
|
+
},
|
|
763
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"type": "context-fragmentation",
|
|
767
|
+
"severity": "critical",
|
|
768
|
+
"message": "Context budget 20,555 tokens is 50% over limit",
|
|
769
|
+
"location": {
|
|
770
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
771
|
+
"line": 1
|
|
772
|
+
},
|
|
773
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
774
|
+
}
|
|
775
|
+
],
|
|
776
|
+
"metrics": {
|
|
777
|
+
"tokenCost": 109,
|
|
778
|
+
"complexityScore": 8
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
783
|
+
"issues": [
|
|
784
|
+
{
|
|
785
|
+
"type": "context-fragmentation",
|
|
786
|
+
"severity": "critical",
|
|
787
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
788
|
+
"location": {
|
|
789
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
790
|
+
"line": 1
|
|
791
|
+
},
|
|
792
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"type": "context-fragmentation",
|
|
796
|
+
"severity": "critical",
|
|
797
|
+
"message": "Import depth 7 exceeds recommended maximum 5",
|
|
798
|
+
"location": {
|
|
799
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
800
|
+
"line": 1
|
|
801
|
+
},
|
|
802
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"type": "context-fragmentation",
|
|
806
|
+
"severity": "critical",
|
|
807
|
+
"message": "Context budget 20,446 tokens is 50% over limit",
|
|
808
|
+
"location": {
|
|
809
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
810
|
+
"line": 1
|
|
811
|
+
},
|
|
812
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
813
|
+
}
|
|
814
|
+
],
|
|
815
|
+
"metrics": {
|
|
816
|
+
"tokenCost": 466,
|
|
817
|
+
"complexityScore": 7
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
822
|
+
"issues": [
|
|
823
|
+
{
|
|
824
|
+
"type": "context-fragmentation",
|
|
825
|
+
"severity": "critical",
|
|
826
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
827
|
+
"location": {
|
|
828
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
829
|
+
"line": 1
|
|
830
|
+
},
|
|
831
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
832
|
+
}
|
|
833
|
+
],
|
|
834
|
+
"metrics": {
|
|
835
|
+
"tokenCost": 711,
|
|
836
|
+
"complexityScore": 4
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
841
|
+
"issues": [
|
|
842
|
+
{
|
|
843
|
+
"type": "context-fragmentation",
|
|
844
|
+
"severity": "critical",
|
|
845
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
846
|
+
"location": {
|
|
847
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
848
|
+
"line": 1
|
|
849
|
+
},
|
|
850
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
851
|
+
}
|
|
852
|
+
],
|
|
853
|
+
"metrics": {
|
|
854
|
+
"tokenCost": 1854,
|
|
855
|
+
"complexityScore": 3
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
860
|
+
"issues": [
|
|
861
|
+
{
|
|
862
|
+
"type": "context-fragmentation",
|
|
863
|
+
"severity": "critical",
|
|
864
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
865
|
+
"location": {
|
|
866
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
867
|
+
"line": 1
|
|
868
|
+
},
|
|
869
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
870
|
+
}
|
|
871
|
+
],
|
|
872
|
+
"metrics": {
|
|
873
|
+
"tokenCost": 1534,
|
|
874
|
+
"complexityScore": 3
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
879
|
+
"issues": [
|
|
880
|
+
{
|
|
881
|
+
"type": "context-fragmentation",
|
|
882
|
+
"severity": "critical",
|
|
883
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
884
|
+
"location": {
|
|
885
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
886
|
+
"line": 1
|
|
887
|
+
},
|
|
888
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
889
|
+
}
|
|
890
|
+
],
|
|
891
|
+
"metrics": {
|
|
892
|
+
"tokenCost": 3968,
|
|
893
|
+
"complexityScore": 1
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
898
|
+
"issues": [
|
|
899
|
+
{
|
|
900
|
+
"type": "context-fragmentation",
|
|
901
|
+
"severity": "critical",
|
|
902
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
903
|
+
"location": {
|
|
904
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
905
|
+
"line": 1
|
|
906
|
+
},
|
|
907
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
908
|
+
}
|
|
909
|
+
],
|
|
910
|
+
"metrics": {
|
|
911
|
+
"tokenCost": 743,
|
|
912
|
+
"complexityScore": 2
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
917
|
+
"issues": [
|
|
918
|
+
{
|
|
919
|
+
"type": "context-fragmentation",
|
|
920
|
+
"severity": "critical",
|
|
921
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
922
|
+
"location": {
|
|
923
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
924
|
+
"line": 1
|
|
925
|
+
},
|
|
926
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
927
|
+
}
|
|
928
|
+
],
|
|
929
|
+
"metrics": {
|
|
930
|
+
"tokenCost": 2512,
|
|
931
|
+
"complexityScore": 1
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
936
|
+
"issues": [
|
|
937
|
+
{
|
|
938
|
+
"type": "context-fragmentation",
|
|
939
|
+
"severity": "critical",
|
|
940
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
941
|
+
"location": {
|
|
942
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
943
|
+
"line": 1
|
|
944
|
+
},
|
|
945
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
946
|
+
}
|
|
947
|
+
],
|
|
948
|
+
"metrics": {
|
|
949
|
+
"tokenCost": 1442,
|
|
950
|
+
"complexityScore": 1
|
|
951
|
+
}
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
955
|
+
"issues": [
|
|
956
|
+
{
|
|
957
|
+
"type": "context-fragmentation",
|
|
958
|
+
"severity": "critical",
|
|
959
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
960
|
+
"location": {
|
|
961
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
962
|
+
"line": 1
|
|
963
|
+
},
|
|
964
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
965
|
+
}
|
|
966
|
+
],
|
|
967
|
+
"metrics": {
|
|
968
|
+
"tokenCost": 1099,
|
|
969
|
+
"complexityScore": 1
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
974
|
+
"issues": [
|
|
975
|
+
{
|
|
976
|
+
"type": "context-fragmentation",
|
|
977
|
+
"severity": "critical",
|
|
978
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
979
|
+
"location": {
|
|
980
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
981
|
+
"line": 1
|
|
982
|
+
},
|
|
983
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
984
|
+
}
|
|
985
|
+
],
|
|
986
|
+
"metrics": {
|
|
987
|
+
"tokenCost": 2063,
|
|
988
|
+
"complexityScore": 0
|
|
989
|
+
}
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
993
|
+
"issues": [
|
|
994
|
+
{
|
|
995
|
+
"type": "context-fragmentation",
|
|
996
|
+
"severity": "critical",
|
|
997
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
998
|
+
"location": {
|
|
999
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
1000
|
+
"line": 1
|
|
1001
|
+
},
|
|
1002
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1003
|
+
}
|
|
1004
|
+
],
|
|
1005
|
+
"metrics": {
|
|
1006
|
+
"tokenCost": 378,
|
|
1007
|
+
"complexityScore": 1
|
|
1008
|
+
}
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
1012
|
+
"issues": [
|
|
1013
|
+
{
|
|
1014
|
+
"type": "context-fragmentation",
|
|
1015
|
+
"severity": "critical",
|
|
1016
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1017
|
+
"location": {
|
|
1018
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
1019
|
+
"line": 1
|
|
1020
|
+
},
|
|
1021
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1022
|
+
}
|
|
1023
|
+
],
|
|
1024
|
+
"metrics": {
|
|
1025
|
+
"tokenCost": 1548,
|
|
1026
|
+
"complexityScore": 0
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
],
|
|
1030
|
+
"summary": {
|
|
1031
|
+
"totalFiles": 17,
|
|
1032
|
+
"criticalIssues": 17,
|
|
1033
|
+
"majorIssues": 0,
|
|
1034
|
+
"totalTokens": 26662,
|
|
1035
|
+
"avgContextBudget": 10347.117647058823,
|
|
1036
|
+
"maxContextBudget": 23417,
|
|
1037
|
+
"avgImportDepth": 3.588235294117647,
|
|
1038
|
+
"maxImportDepth": 9,
|
|
1039
|
+
"deepFiles": [
|
|
1040
|
+
{
|
|
1041
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1042
|
+
"depth": 9
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1046
|
+
"depth": 9
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1050
|
+
"depth": 6
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1054
|
+
"depth": 8
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1058
|
+
"depth": 7
|
|
1059
|
+
}
|
|
1060
|
+
],
|
|
1061
|
+
"avgFragmentation": 0.6866729882994713,
|
|
1062
|
+
"fragmentedModules": [
|
|
1063
|
+
{
|
|
1064
|
+
"domain": "/Users",
|
|
1065
|
+
"files": [
|
|
1066
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1067
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
1068
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1069
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1070
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1071
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1072
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
1073
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
1074
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
1075
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
1076
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
1077
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
1078
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
1079
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
1080
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
1081
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
1082
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts"
|
|
1083
|
+
],
|
|
1084
|
+
"fragmentationScore": 0.6866729882994713,
|
|
1085
|
+
"totalTokens": 26662,
|
|
1086
|
+
"avgCohesion": 0.9305882352941175,
|
|
1087
|
+
"suggestedStructure": {
|
|
1088
|
+
"targetFiles": 9,
|
|
1089
|
+
"consolidationPlan": [
|
|
1090
|
+
"Consolidate 17 files in /Users into fewer modules"
|
|
1091
|
+
]
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
],
|
|
1095
|
+
"avgCohesion": 0.9305882352941175,
|
|
1096
|
+
"lowCohesionFiles": [],
|
|
1097
|
+
"minorIssues": 0,
|
|
1098
|
+
"totalPotentialSavings": 113223,
|
|
1099
|
+
"topExpensiveFiles": [
|
|
1100
|
+
{
|
|
1101
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1102
|
+
"contextBudget": 23417,
|
|
1103
|
+
"severity": "critical"
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
1107
|
+
"contextBudget": 23172,
|
|
1108
|
+
"severity": "critical"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1112
|
+
"contextBudget": 21737,
|
|
1113
|
+
"severity": "critical"
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1117
|
+
"contextBudget": 20979,
|
|
1118
|
+
"severity": "critical"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1122
|
+
"contextBudget": 20555,
|
|
1123
|
+
"severity": "critical"
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1127
|
+
"contextBudget": 20446,
|
|
1128
|
+
"severity": "critical"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
1132
|
+
"contextBudget": 7048,
|
|
1133
|
+
"severity": "critical"
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
1137
|
+
"contextBudget": 6657,
|
|
1138
|
+
"severity": "critical"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
1142
|
+
"contextBudget": 6337,
|
|
1143
|
+
"severity": "critical"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
1147
|
+
"contextBudget": 5516,
|
|
1148
|
+
"severity": "critical"
|
|
1149
|
+
}
|
|
1150
|
+
],
|
|
1151
|
+
"config": {
|
|
1152
|
+
"rootDir": "/Users/pengcao/projects/aiready/packages/context-analyzer"
|
|
1153
|
+
}
|
|
1154
|
+
},
|
|
1155
|
+
"metadata": {
|
|
1156
|
+
"toolName": "context-analyzer",
|
|
1157
|
+
"version": "0.17.5",
|
|
1158
|
+
"timestamp": "2026-03-14T11:39:47.195Z",
|
|
1159
|
+
"config": {}
|
|
1160
|
+
}
|
|
1161
|
+
},
|
|
1162
|
+
"fragmentation": {
|
|
1163
|
+
"results": [
|
|
1164
|
+
{
|
|
1165
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1166
|
+
"issues": [
|
|
1167
|
+
{
|
|
1168
|
+
"type": "context-fragmentation",
|
|
1169
|
+
"severity": "critical",
|
|
1170
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1171
|
+
"location": {
|
|
1172
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1173
|
+
"line": 1
|
|
1174
|
+
},
|
|
1175
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
"type": "context-fragmentation",
|
|
1179
|
+
"severity": "critical",
|
|
1180
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
1181
|
+
"location": {
|
|
1182
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1183
|
+
"line": 1
|
|
1184
|
+
},
|
|
1185
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
"type": "context-fragmentation",
|
|
1189
|
+
"severity": "critical",
|
|
1190
|
+
"message": "Context budget 23,417 tokens is 50% over limit",
|
|
1191
|
+
"location": {
|
|
1192
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1193
|
+
"line": 1
|
|
1194
|
+
},
|
|
1195
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1196
|
+
}
|
|
1197
|
+
],
|
|
1198
|
+
"metrics": {
|
|
1199
|
+
"tokenCost": 2862,
|
|
1200
|
+
"complexityScore": 9
|
|
1201
|
+
}
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
1205
|
+
"issues": [
|
|
1206
|
+
{
|
|
1207
|
+
"type": "context-fragmentation",
|
|
1208
|
+
"severity": "critical",
|
|
1209
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1210
|
+
"location": {
|
|
1211
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
1212
|
+
"line": 1
|
|
1213
|
+
},
|
|
1214
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"type": "context-fragmentation",
|
|
1218
|
+
"severity": "critical",
|
|
1219
|
+
"message": "Context budget 23,172 tokens is 50% over limit",
|
|
1220
|
+
"location": {
|
|
1221
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
1222
|
+
"line": 1
|
|
1223
|
+
},
|
|
1224
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1225
|
+
}
|
|
1226
|
+
],
|
|
1227
|
+
"metrics": {
|
|
1228
|
+
"tokenCost": 3192,
|
|
1229
|
+
"complexityScore": 5
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1234
|
+
"issues": [
|
|
1235
|
+
{
|
|
1236
|
+
"type": "context-fragmentation",
|
|
1237
|
+
"severity": "critical",
|
|
1238
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1239
|
+
"location": {
|
|
1240
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1241
|
+
"line": 1
|
|
1242
|
+
},
|
|
1243
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
"type": "context-fragmentation",
|
|
1247
|
+
"severity": "critical",
|
|
1248
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
1249
|
+
"location": {
|
|
1250
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1251
|
+
"line": 1
|
|
1252
|
+
},
|
|
1253
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"type": "context-fragmentation",
|
|
1257
|
+
"severity": "critical",
|
|
1258
|
+
"message": "Context budget 21,737 tokens is 50% over limit",
|
|
1259
|
+
"location": {
|
|
1260
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1261
|
+
"line": 1
|
|
1262
|
+
},
|
|
1263
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1264
|
+
}
|
|
1265
|
+
],
|
|
1266
|
+
"metrics": {
|
|
1267
|
+
"tokenCost": 1182,
|
|
1268
|
+
"complexityScore": 9
|
|
1269
|
+
}
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1273
|
+
"issues": [
|
|
1274
|
+
{
|
|
1275
|
+
"type": "context-fragmentation",
|
|
1276
|
+
"severity": "critical",
|
|
1277
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1278
|
+
"location": {
|
|
1279
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1280
|
+
"line": 1
|
|
1281
|
+
},
|
|
1282
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
"type": "context-fragmentation",
|
|
1286
|
+
"severity": "critical",
|
|
1287
|
+
"message": "Import depth 6 exceeds recommended maximum 5",
|
|
1288
|
+
"location": {
|
|
1289
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1290
|
+
"line": 1
|
|
1291
|
+
},
|
|
1292
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"type": "context-fragmentation",
|
|
1296
|
+
"severity": "critical",
|
|
1297
|
+
"message": "Context budget 20,979 tokens is 50% over limit",
|
|
1298
|
+
"location": {
|
|
1299
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1300
|
+
"line": 1
|
|
1301
|
+
},
|
|
1302
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1303
|
+
}
|
|
1304
|
+
],
|
|
1305
|
+
"metrics": {
|
|
1306
|
+
"tokenCost": 999,
|
|
1307
|
+
"complexityScore": 6
|
|
1308
|
+
}
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1312
|
+
"issues": [
|
|
1313
|
+
{
|
|
1314
|
+
"type": "context-fragmentation",
|
|
1315
|
+
"severity": "critical",
|
|
1316
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1317
|
+
"location": {
|
|
1318
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1319
|
+
"line": 1
|
|
1320
|
+
},
|
|
1321
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
"type": "context-fragmentation",
|
|
1325
|
+
"severity": "critical",
|
|
1326
|
+
"message": "Import depth 8 exceeds limit by 50%",
|
|
1327
|
+
"location": {
|
|
1328
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1329
|
+
"line": 1
|
|
1330
|
+
},
|
|
1331
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
"type": "context-fragmentation",
|
|
1335
|
+
"severity": "critical",
|
|
1336
|
+
"message": "Context budget 20,555 tokens is 50% over limit",
|
|
1337
|
+
"location": {
|
|
1338
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1339
|
+
"line": 1
|
|
1340
|
+
},
|
|
1341
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1342
|
+
}
|
|
1343
|
+
],
|
|
1344
|
+
"metrics": {
|
|
1345
|
+
"tokenCost": 109,
|
|
1346
|
+
"complexityScore": 8
|
|
1347
|
+
}
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1351
|
+
"issues": [
|
|
1352
|
+
{
|
|
1353
|
+
"type": "context-fragmentation",
|
|
1354
|
+
"severity": "critical",
|
|
1355
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1356
|
+
"location": {
|
|
1357
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1358
|
+
"line": 1
|
|
1359
|
+
},
|
|
1360
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"type": "context-fragmentation",
|
|
1364
|
+
"severity": "critical",
|
|
1365
|
+
"message": "Import depth 7 exceeds recommended maximum 5",
|
|
1366
|
+
"location": {
|
|
1367
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1368
|
+
"line": 1
|
|
1369
|
+
},
|
|
1370
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
"type": "context-fragmentation",
|
|
1374
|
+
"severity": "critical",
|
|
1375
|
+
"message": "Context budget 20,446 tokens is 50% over limit",
|
|
1376
|
+
"location": {
|
|
1377
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1378
|
+
"line": 1
|
|
1379
|
+
},
|
|
1380
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1381
|
+
}
|
|
1382
|
+
],
|
|
1383
|
+
"metrics": {
|
|
1384
|
+
"tokenCost": 466,
|
|
1385
|
+
"complexityScore": 7
|
|
1386
|
+
}
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
1390
|
+
"issues": [
|
|
1391
|
+
{
|
|
1392
|
+
"type": "context-fragmentation",
|
|
1393
|
+
"severity": "critical",
|
|
1394
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1395
|
+
"location": {
|
|
1396
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
1397
|
+
"line": 1
|
|
1398
|
+
},
|
|
1399
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1400
|
+
}
|
|
1401
|
+
],
|
|
1402
|
+
"metrics": {
|
|
1403
|
+
"tokenCost": 711,
|
|
1404
|
+
"complexityScore": 4
|
|
1405
|
+
}
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
1409
|
+
"issues": [
|
|
1410
|
+
{
|
|
1411
|
+
"type": "context-fragmentation",
|
|
1412
|
+
"severity": "critical",
|
|
1413
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1414
|
+
"location": {
|
|
1415
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
1416
|
+
"line": 1
|
|
1417
|
+
},
|
|
1418
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1419
|
+
}
|
|
1420
|
+
],
|
|
1421
|
+
"metrics": {
|
|
1422
|
+
"tokenCost": 1854,
|
|
1423
|
+
"complexityScore": 3
|
|
1424
|
+
}
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
1428
|
+
"issues": [
|
|
1429
|
+
{
|
|
1430
|
+
"type": "context-fragmentation",
|
|
1431
|
+
"severity": "critical",
|
|
1432
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1433
|
+
"location": {
|
|
1434
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
1435
|
+
"line": 1
|
|
1436
|
+
},
|
|
1437
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1438
|
+
}
|
|
1439
|
+
],
|
|
1440
|
+
"metrics": {
|
|
1441
|
+
"tokenCost": 1534,
|
|
1442
|
+
"complexityScore": 3
|
|
1443
|
+
}
|
|
1444
|
+
},
|
|
1445
|
+
{
|
|
1446
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
1447
|
+
"issues": [
|
|
1448
|
+
{
|
|
1449
|
+
"type": "context-fragmentation",
|
|
1450
|
+
"severity": "critical",
|
|
1451
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1452
|
+
"location": {
|
|
1453
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
1454
|
+
"line": 1
|
|
1455
|
+
},
|
|
1456
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1457
|
+
}
|
|
1458
|
+
],
|
|
1459
|
+
"metrics": {
|
|
1460
|
+
"tokenCost": 3968,
|
|
1461
|
+
"complexityScore": 1
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
1466
|
+
"issues": [
|
|
1467
|
+
{
|
|
1468
|
+
"type": "context-fragmentation",
|
|
1469
|
+
"severity": "critical",
|
|
1470
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1471
|
+
"location": {
|
|
1472
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
1473
|
+
"line": 1
|
|
1474
|
+
},
|
|
1475
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1476
|
+
}
|
|
1477
|
+
],
|
|
1478
|
+
"metrics": {
|
|
1479
|
+
"tokenCost": 743,
|
|
1480
|
+
"complexityScore": 2
|
|
1481
|
+
}
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
1485
|
+
"issues": [
|
|
1486
|
+
{
|
|
1487
|
+
"type": "context-fragmentation",
|
|
1488
|
+
"severity": "critical",
|
|
1489
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1490
|
+
"location": {
|
|
1491
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
1492
|
+
"line": 1
|
|
1493
|
+
},
|
|
1494
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1495
|
+
}
|
|
1496
|
+
],
|
|
1497
|
+
"metrics": {
|
|
1498
|
+
"tokenCost": 2512,
|
|
1499
|
+
"complexityScore": 1
|
|
1500
|
+
}
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
1504
|
+
"issues": [
|
|
1505
|
+
{
|
|
1506
|
+
"type": "context-fragmentation",
|
|
1507
|
+
"severity": "critical",
|
|
1508
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1509
|
+
"location": {
|
|
1510
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
1511
|
+
"line": 1
|
|
1512
|
+
},
|
|
1513
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1514
|
+
}
|
|
1515
|
+
],
|
|
1516
|
+
"metrics": {
|
|
1517
|
+
"tokenCost": 1442,
|
|
1518
|
+
"complexityScore": 1
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
1523
|
+
"issues": [
|
|
1524
|
+
{
|
|
1525
|
+
"type": "context-fragmentation",
|
|
1526
|
+
"severity": "critical",
|
|
1527
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1528
|
+
"location": {
|
|
1529
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
1530
|
+
"line": 1
|
|
1531
|
+
},
|
|
1532
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1533
|
+
}
|
|
1534
|
+
],
|
|
1535
|
+
"metrics": {
|
|
1536
|
+
"tokenCost": 1099,
|
|
1537
|
+
"complexityScore": 1
|
|
1538
|
+
}
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
1542
|
+
"issues": [
|
|
1543
|
+
{
|
|
1544
|
+
"type": "context-fragmentation",
|
|
1545
|
+
"severity": "critical",
|
|
1546
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1547
|
+
"location": {
|
|
1548
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
1549
|
+
"line": 1
|
|
1550
|
+
},
|
|
1551
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1552
|
+
}
|
|
1553
|
+
],
|
|
1554
|
+
"metrics": {
|
|
1555
|
+
"tokenCost": 2063,
|
|
1556
|
+
"complexityScore": 0
|
|
1557
|
+
}
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
1561
|
+
"issues": [
|
|
1562
|
+
{
|
|
1563
|
+
"type": "context-fragmentation",
|
|
1564
|
+
"severity": "critical",
|
|
1565
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1566
|
+
"location": {
|
|
1567
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
1568
|
+
"line": 1
|
|
1569
|
+
},
|
|
1570
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1571
|
+
}
|
|
1572
|
+
],
|
|
1573
|
+
"metrics": {
|
|
1574
|
+
"tokenCost": 378,
|
|
1575
|
+
"complexityScore": 1
|
|
1576
|
+
}
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
1580
|
+
"issues": [
|
|
1581
|
+
{
|
|
1582
|
+
"type": "context-fragmentation",
|
|
1583
|
+
"severity": "critical",
|
|
1584
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1585
|
+
"location": {
|
|
1586
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
1587
|
+
"line": 1
|
|
1588
|
+
},
|
|
1589
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1590
|
+
}
|
|
1591
|
+
],
|
|
1592
|
+
"metrics": {
|
|
1593
|
+
"tokenCost": 1548,
|
|
1594
|
+
"complexityScore": 0
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
],
|
|
1598
|
+
"summary": {
|
|
1599
|
+
"totalFiles": 17,
|
|
1600
|
+
"criticalIssues": 17,
|
|
1601
|
+
"majorIssues": 0,
|
|
1602
|
+
"totalTokens": 26662,
|
|
1603
|
+
"avgContextBudget": 10347.117647058823,
|
|
1604
|
+
"maxContextBudget": 23417,
|
|
1605
|
+
"avgImportDepth": 3.588235294117647,
|
|
1606
|
+
"maxImportDepth": 9,
|
|
1607
|
+
"deepFiles": [
|
|
1608
|
+
{
|
|
1609
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1610
|
+
"depth": 9
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1614
|
+
"depth": 9
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1618
|
+
"depth": 6
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1622
|
+
"depth": 8
|
|
1623
|
+
},
|
|
1624
|
+
{
|
|
1625
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1626
|
+
"depth": 7
|
|
1627
|
+
}
|
|
1628
|
+
],
|
|
1629
|
+
"avgFragmentation": 0.6866729882994713,
|
|
1630
|
+
"fragmentedModules": [
|
|
1631
|
+
{
|
|
1632
|
+
"domain": "/Users",
|
|
1633
|
+
"files": [
|
|
1634
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1635
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
1636
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1637
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1638
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1639
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1640
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
1641
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
1642
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
1643
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
1644
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
1645
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
1646
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
1647
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
1648
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
1649
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
1650
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts"
|
|
1651
|
+
],
|
|
1652
|
+
"fragmentationScore": 0.6866729882994713,
|
|
1653
|
+
"totalTokens": 26662,
|
|
1654
|
+
"avgCohesion": 0.9305882352941175,
|
|
1655
|
+
"suggestedStructure": {
|
|
1656
|
+
"targetFiles": 9,
|
|
1657
|
+
"consolidationPlan": [
|
|
1658
|
+
"Consolidate 17 files in /Users into fewer modules"
|
|
1659
|
+
]
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
],
|
|
1663
|
+
"avgCohesion": 0.9305882352941175,
|
|
1664
|
+
"lowCohesionFiles": [],
|
|
1665
|
+
"minorIssues": 0,
|
|
1666
|
+
"totalPotentialSavings": 113223,
|
|
1667
|
+
"topExpensiveFiles": [
|
|
1668
|
+
{
|
|
1669
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1670
|
+
"contextBudget": 23417,
|
|
1671
|
+
"severity": "critical"
|
|
1672
|
+
},
|
|
1673
|
+
{
|
|
1674
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
1675
|
+
"contextBudget": 23172,
|
|
1676
|
+
"severity": "critical"
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1680
|
+
"contextBudget": 21737,
|
|
1681
|
+
"severity": "critical"
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1685
|
+
"contextBudget": 20979,
|
|
1686
|
+
"severity": "critical"
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1690
|
+
"contextBudget": 20555,
|
|
1691
|
+
"severity": "critical"
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1695
|
+
"contextBudget": 20446,
|
|
1696
|
+
"severity": "critical"
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
1700
|
+
"contextBudget": 7048,
|
|
1701
|
+
"severity": "critical"
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
1705
|
+
"contextBudget": 6657,
|
|
1706
|
+
"severity": "critical"
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
1710
|
+
"contextBudget": 6337,
|
|
1711
|
+
"severity": "critical"
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
1715
|
+
"contextBudget": 5516,
|
|
1716
|
+
"severity": "critical"
|
|
1717
|
+
}
|
|
1718
|
+
],
|
|
1719
|
+
"config": {
|
|
1720
|
+
"rootDir": "/Users/pengcao/projects/aiready/packages/context-analyzer"
|
|
1721
|
+
}
|
|
1722
|
+
},
|
|
1723
|
+
"metadata": {
|
|
1724
|
+
"toolName": "context-analyzer",
|
|
1725
|
+
"version": "0.17.5",
|
|
1726
|
+
"timestamp": "2026-03-14T11:39:47.195Z",
|
|
1727
|
+
"config": {}
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1730
|
+
"budget": {
|
|
1731
|
+
"results": [
|
|
1732
|
+
{
|
|
1733
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1734
|
+
"issues": [
|
|
1735
|
+
{
|
|
1736
|
+
"type": "context-fragmentation",
|
|
1737
|
+
"severity": "critical",
|
|
1738
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1739
|
+
"location": {
|
|
1740
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1741
|
+
"line": 1
|
|
1742
|
+
},
|
|
1743
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
"type": "context-fragmentation",
|
|
1747
|
+
"severity": "critical",
|
|
1748
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
1749
|
+
"location": {
|
|
1750
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1751
|
+
"line": 1
|
|
1752
|
+
},
|
|
1753
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"type": "context-fragmentation",
|
|
1757
|
+
"severity": "critical",
|
|
1758
|
+
"message": "Context budget 23,417 tokens is 50% over limit",
|
|
1759
|
+
"location": {
|
|
1760
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
1761
|
+
"line": 1
|
|
1762
|
+
},
|
|
1763
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1764
|
+
}
|
|
1765
|
+
],
|
|
1766
|
+
"metrics": {
|
|
1767
|
+
"tokenCost": 2862,
|
|
1768
|
+
"complexityScore": 9
|
|
1769
|
+
}
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
1773
|
+
"issues": [
|
|
1774
|
+
{
|
|
1775
|
+
"type": "context-fragmentation",
|
|
1776
|
+
"severity": "critical",
|
|
1777
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1778
|
+
"location": {
|
|
1779
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
1780
|
+
"line": 1
|
|
1781
|
+
},
|
|
1782
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
"type": "context-fragmentation",
|
|
1786
|
+
"severity": "critical",
|
|
1787
|
+
"message": "Context budget 23,172 tokens is 50% over limit",
|
|
1788
|
+
"location": {
|
|
1789
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
1790
|
+
"line": 1
|
|
1791
|
+
},
|
|
1792
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1793
|
+
}
|
|
1794
|
+
],
|
|
1795
|
+
"metrics": {
|
|
1796
|
+
"tokenCost": 3192,
|
|
1797
|
+
"complexityScore": 5
|
|
1798
|
+
}
|
|
1799
|
+
},
|
|
1800
|
+
{
|
|
1801
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1802
|
+
"issues": [
|
|
1803
|
+
{
|
|
1804
|
+
"type": "context-fragmentation",
|
|
1805
|
+
"severity": "critical",
|
|
1806
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1807
|
+
"location": {
|
|
1808
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1809
|
+
"line": 1
|
|
1810
|
+
},
|
|
1811
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1812
|
+
},
|
|
1813
|
+
{
|
|
1814
|
+
"type": "context-fragmentation",
|
|
1815
|
+
"severity": "critical",
|
|
1816
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
1817
|
+
"location": {
|
|
1818
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1819
|
+
"line": 1
|
|
1820
|
+
},
|
|
1821
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
"type": "context-fragmentation",
|
|
1825
|
+
"severity": "critical",
|
|
1826
|
+
"message": "Context budget 21,737 tokens is 50% over limit",
|
|
1827
|
+
"location": {
|
|
1828
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
1829
|
+
"line": 1
|
|
1830
|
+
},
|
|
1831
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1832
|
+
}
|
|
1833
|
+
],
|
|
1834
|
+
"metrics": {
|
|
1835
|
+
"tokenCost": 1182,
|
|
1836
|
+
"complexityScore": 9
|
|
1837
|
+
}
|
|
1838
|
+
},
|
|
1839
|
+
{
|
|
1840
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1841
|
+
"issues": [
|
|
1842
|
+
{
|
|
1843
|
+
"type": "context-fragmentation",
|
|
1844
|
+
"severity": "critical",
|
|
1845
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1846
|
+
"location": {
|
|
1847
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1848
|
+
"line": 1
|
|
1849
|
+
},
|
|
1850
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
"type": "context-fragmentation",
|
|
1854
|
+
"severity": "critical",
|
|
1855
|
+
"message": "Import depth 6 exceeds recommended maximum 5",
|
|
1856
|
+
"location": {
|
|
1857
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1858
|
+
"line": 1
|
|
1859
|
+
},
|
|
1860
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
"type": "context-fragmentation",
|
|
1864
|
+
"severity": "critical",
|
|
1865
|
+
"message": "Context budget 20,979 tokens is 50% over limit",
|
|
1866
|
+
"location": {
|
|
1867
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
1868
|
+
"line": 1
|
|
1869
|
+
},
|
|
1870
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1871
|
+
}
|
|
1872
|
+
],
|
|
1873
|
+
"metrics": {
|
|
1874
|
+
"tokenCost": 999,
|
|
1875
|
+
"complexityScore": 6
|
|
1876
|
+
}
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1880
|
+
"issues": [
|
|
1881
|
+
{
|
|
1882
|
+
"type": "context-fragmentation",
|
|
1883
|
+
"severity": "critical",
|
|
1884
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1885
|
+
"location": {
|
|
1886
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1887
|
+
"line": 1
|
|
1888
|
+
},
|
|
1889
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
"type": "context-fragmentation",
|
|
1893
|
+
"severity": "critical",
|
|
1894
|
+
"message": "Import depth 8 exceeds limit by 50%",
|
|
1895
|
+
"location": {
|
|
1896
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1897
|
+
"line": 1
|
|
1898
|
+
},
|
|
1899
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1900
|
+
},
|
|
1901
|
+
{
|
|
1902
|
+
"type": "context-fragmentation",
|
|
1903
|
+
"severity": "critical",
|
|
1904
|
+
"message": "Context budget 20,555 tokens is 50% over limit",
|
|
1905
|
+
"location": {
|
|
1906
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
1907
|
+
"line": 1
|
|
1908
|
+
},
|
|
1909
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1910
|
+
}
|
|
1911
|
+
],
|
|
1912
|
+
"metrics": {
|
|
1913
|
+
"tokenCost": 109,
|
|
1914
|
+
"complexityScore": 8
|
|
1915
|
+
}
|
|
1916
|
+
},
|
|
1917
|
+
{
|
|
1918
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1919
|
+
"issues": [
|
|
1920
|
+
{
|
|
1921
|
+
"type": "context-fragmentation",
|
|
1922
|
+
"severity": "critical",
|
|
1923
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1924
|
+
"location": {
|
|
1925
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1926
|
+
"line": 1
|
|
1927
|
+
},
|
|
1928
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
"type": "context-fragmentation",
|
|
1932
|
+
"severity": "critical",
|
|
1933
|
+
"message": "Import depth 7 exceeds recommended maximum 5",
|
|
1934
|
+
"location": {
|
|
1935
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1936
|
+
"line": 1
|
|
1937
|
+
},
|
|
1938
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1939
|
+
},
|
|
1940
|
+
{
|
|
1941
|
+
"type": "context-fragmentation",
|
|
1942
|
+
"severity": "critical",
|
|
1943
|
+
"message": "Context budget 20,446 tokens is 50% over limit",
|
|
1944
|
+
"location": {
|
|
1945
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
1946
|
+
"line": 1
|
|
1947
|
+
},
|
|
1948
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1949
|
+
}
|
|
1950
|
+
],
|
|
1951
|
+
"metrics": {
|
|
1952
|
+
"tokenCost": 466,
|
|
1953
|
+
"complexityScore": 7
|
|
1954
|
+
}
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
1958
|
+
"issues": [
|
|
1959
|
+
{
|
|
1960
|
+
"type": "context-fragmentation",
|
|
1961
|
+
"severity": "critical",
|
|
1962
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1963
|
+
"location": {
|
|
1964
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
1965
|
+
"line": 1
|
|
1966
|
+
},
|
|
1967
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1968
|
+
}
|
|
1969
|
+
],
|
|
1970
|
+
"metrics": {
|
|
1971
|
+
"tokenCost": 711,
|
|
1972
|
+
"complexityScore": 4
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
{
|
|
1976
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
1977
|
+
"issues": [
|
|
1978
|
+
{
|
|
1979
|
+
"type": "context-fragmentation",
|
|
1980
|
+
"severity": "critical",
|
|
1981
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
1982
|
+
"location": {
|
|
1983
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
1984
|
+
"line": 1
|
|
1985
|
+
},
|
|
1986
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
1987
|
+
}
|
|
1988
|
+
],
|
|
1989
|
+
"metrics": {
|
|
1990
|
+
"tokenCost": 1854,
|
|
1991
|
+
"complexityScore": 3
|
|
1992
|
+
}
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
1996
|
+
"issues": [
|
|
1997
|
+
{
|
|
1998
|
+
"type": "context-fragmentation",
|
|
1999
|
+
"severity": "critical",
|
|
2000
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2001
|
+
"location": {
|
|
2002
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
2003
|
+
"line": 1
|
|
2004
|
+
},
|
|
2005
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2006
|
+
}
|
|
2007
|
+
],
|
|
2008
|
+
"metrics": {
|
|
2009
|
+
"tokenCost": 1534,
|
|
2010
|
+
"complexityScore": 3
|
|
2011
|
+
}
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
2015
|
+
"issues": [
|
|
2016
|
+
{
|
|
2017
|
+
"type": "context-fragmentation",
|
|
2018
|
+
"severity": "critical",
|
|
2019
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2020
|
+
"location": {
|
|
2021
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
2022
|
+
"line": 1
|
|
2023
|
+
},
|
|
2024
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2025
|
+
}
|
|
2026
|
+
],
|
|
2027
|
+
"metrics": {
|
|
2028
|
+
"tokenCost": 3968,
|
|
2029
|
+
"complexityScore": 1
|
|
2030
|
+
}
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
2034
|
+
"issues": [
|
|
2035
|
+
{
|
|
2036
|
+
"type": "context-fragmentation",
|
|
2037
|
+
"severity": "critical",
|
|
2038
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2039
|
+
"location": {
|
|
2040
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
2041
|
+
"line": 1
|
|
2042
|
+
},
|
|
2043
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2044
|
+
}
|
|
2045
|
+
],
|
|
2046
|
+
"metrics": {
|
|
2047
|
+
"tokenCost": 743,
|
|
2048
|
+
"complexityScore": 2
|
|
2049
|
+
}
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
2053
|
+
"issues": [
|
|
2054
|
+
{
|
|
2055
|
+
"type": "context-fragmentation",
|
|
2056
|
+
"severity": "critical",
|
|
2057
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2058
|
+
"location": {
|
|
2059
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
2060
|
+
"line": 1
|
|
2061
|
+
},
|
|
2062
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2063
|
+
}
|
|
2064
|
+
],
|
|
2065
|
+
"metrics": {
|
|
2066
|
+
"tokenCost": 2512,
|
|
2067
|
+
"complexityScore": 1
|
|
2068
|
+
}
|
|
2069
|
+
},
|
|
2070
|
+
{
|
|
2071
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
2072
|
+
"issues": [
|
|
2073
|
+
{
|
|
2074
|
+
"type": "context-fragmentation",
|
|
2075
|
+
"severity": "critical",
|
|
2076
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2077
|
+
"location": {
|
|
2078
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
2079
|
+
"line": 1
|
|
2080
|
+
},
|
|
2081
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2082
|
+
}
|
|
2083
|
+
],
|
|
2084
|
+
"metrics": {
|
|
2085
|
+
"tokenCost": 1442,
|
|
2086
|
+
"complexityScore": 1
|
|
2087
|
+
}
|
|
2088
|
+
},
|
|
2089
|
+
{
|
|
2090
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
2091
|
+
"issues": [
|
|
2092
|
+
{
|
|
2093
|
+
"type": "context-fragmentation",
|
|
2094
|
+
"severity": "critical",
|
|
2095
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2096
|
+
"location": {
|
|
2097
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
2098
|
+
"line": 1
|
|
2099
|
+
},
|
|
2100
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2101
|
+
}
|
|
2102
|
+
],
|
|
2103
|
+
"metrics": {
|
|
2104
|
+
"tokenCost": 1099,
|
|
2105
|
+
"complexityScore": 1
|
|
2106
|
+
}
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
2110
|
+
"issues": [
|
|
2111
|
+
{
|
|
2112
|
+
"type": "context-fragmentation",
|
|
2113
|
+
"severity": "critical",
|
|
2114
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2115
|
+
"location": {
|
|
2116
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
2117
|
+
"line": 1
|
|
2118
|
+
},
|
|
2119
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2120
|
+
}
|
|
2121
|
+
],
|
|
2122
|
+
"metrics": {
|
|
2123
|
+
"tokenCost": 2063,
|
|
2124
|
+
"complexityScore": 0
|
|
2125
|
+
}
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
2129
|
+
"issues": [
|
|
2130
|
+
{
|
|
2131
|
+
"type": "context-fragmentation",
|
|
2132
|
+
"severity": "critical",
|
|
2133
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2134
|
+
"location": {
|
|
2135
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
2136
|
+
"line": 1
|
|
2137
|
+
},
|
|
2138
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2139
|
+
}
|
|
2140
|
+
],
|
|
2141
|
+
"metrics": {
|
|
2142
|
+
"tokenCost": 378,
|
|
2143
|
+
"complexityScore": 1
|
|
2144
|
+
}
|
|
2145
|
+
},
|
|
2146
|
+
{
|
|
2147
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
2148
|
+
"issues": [
|
|
2149
|
+
{
|
|
2150
|
+
"type": "context-fragmentation",
|
|
2151
|
+
"severity": "critical",
|
|
2152
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2153
|
+
"location": {
|
|
2154
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
2155
|
+
"line": 1
|
|
2156
|
+
},
|
|
2157
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2158
|
+
}
|
|
2159
|
+
],
|
|
2160
|
+
"metrics": {
|
|
2161
|
+
"tokenCost": 1548,
|
|
2162
|
+
"complexityScore": 0
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
],
|
|
2166
|
+
"summary": {
|
|
2167
|
+
"totalFiles": 17,
|
|
2168
|
+
"criticalIssues": 17,
|
|
2169
|
+
"majorIssues": 0,
|
|
2170
|
+
"totalTokens": 26662,
|
|
2171
|
+
"avgContextBudget": 10347.117647058823,
|
|
2172
|
+
"maxContextBudget": 23417,
|
|
2173
|
+
"avgImportDepth": 3.588235294117647,
|
|
2174
|
+
"maxImportDepth": 9,
|
|
2175
|
+
"deepFiles": [
|
|
2176
|
+
{
|
|
2177
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2178
|
+
"depth": 9
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2182
|
+
"depth": 9
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2186
|
+
"depth": 6
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
2190
|
+
"depth": 8
|
|
2191
|
+
},
|
|
2192
|
+
{
|
|
2193
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
2194
|
+
"depth": 7
|
|
2195
|
+
}
|
|
2196
|
+
],
|
|
2197
|
+
"avgFragmentation": 0.6866729882994713,
|
|
2198
|
+
"fragmentedModules": [
|
|
2199
|
+
{
|
|
2200
|
+
"domain": "/Users",
|
|
2201
|
+
"files": [
|
|
2202
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2203
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
2204
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2205
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2206
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
2207
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
2208
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
2209
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
2210
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
2211
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
2212
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
2213
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
2214
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
2215
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
2216
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
2217
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
2218
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts"
|
|
2219
|
+
],
|
|
2220
|
+
"fragmentationScore": 0.6866729882994713,
|
|
2221
|
+
"totalTokens": 26662,
|
|
2222
|
+
"avgCohesion": 0.9305882352941175,
|
|
2223
|
+
"suggestedStructure": {
|
|
2224
|
+
"targetFiles": 9,
|
|
2225
|
+
"consolidationPlan": [
|
|
2226
|
+
"Consolidate 17 files in /Users into fewer modules"
|
|
2227
|
+
]
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
],
|
|
2231
|
+
"avgCohesion": 0.9305882352941175,
|
|
2232
|
+
"lowCohesionFiles": [],
|
|
2233
|
+
"minorIssues": 0,
|
|
2234
|
+
"totalPotentialSavings": 113223,
|
|
2235
|
+
"topExpensiveFiles": [
|
|
2236
|
+
{
|
|
2237
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2238
|
+
"contextBudget": 23417,
|
|
2239
|
+
"severity": "critical"
|
|
2240
|
+
},
|
|
2241
|
+
{
|
|
2242
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
2243
|
+
"contextBudget": 23172,
|
|
2244
|
+
"severity": "critical"
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2248
|
+
"contextBudget": 21737,
|
|
2249
|
+
"severity": "critical"
|
|
2250
|
+
},
|
|
2251
|
+
{
|
|
2252
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2253
|
+
"contextBudget": 20979,
|
|
2254
|
+
"severity": "critical"
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
2258
|
+
"contextBudget": 20555,
|
|
2259
|
+
"severity": "critical"
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
2263
|
+
"contextBudget": 20446,
|
|
2264
|
+
"severity": "critical"
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
2268
|
+
"contextBudget": 7048,
|
|
2269
|
+
"severity": "critical"
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
2273
|
+
"contextBudget": 6657,
|
|
2274
|
+
"severity": "critical"
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
2278
|
+
"contextBudget": 6337,
|
|
2279
|
+
"severity": "critical"
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
2283
|
+
"contextBudget": 5516,
|
|
2284
|
+
"severity": "critical"
|
|
2285
|
+
}
|
|
2286
|
+
],
|
|
2287
|
+
"config": {
|
|
2288
|
+
"rootDir": "/Users/pengcao/projects/aiready/packages/context-analyzer"
|
|
2289
|
+
}
|
|
2290
|
+
},
|
|
2291
|
+
"metadata": {
|
|
2292
|
+
"toolName": "context-analyzer",
|
|
2293
|
+
"version": "0.17.5",
|
|
2294
|
+
"timestamp": "2026-03-14T11:39:47.195Z",
|
|
2295
|
+
"config": {}
|
|
2296
|
+
}
|
|
2297
|
+
},
|
|
2298
|
+
"contextAnalyzer": {
|
|
2299
|
+
"results": [
|
|
2300
|
+
{
|
|
2301
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2302
|
+
"issues": [
|
|
2303
|
+
{
|
|
2304
|
+
"type": "context-fragmentation",
|
|
2305
|
+
"severity": "critical",
|
|
2306
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2307
|
+
"location": {
|
|
2308
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2309
|
+
"line": 1
|
|
2310
|
+
},
|
|
2311
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
"type": "context-fragmentation",
|
|
2315
|
+
"severity": "critical",
|
|
2316
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
2317
|
+
"location": {
|
|
2318
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2319
|
+
"line": 1
|
|
2320
|
+
},
|
|
2321
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2322
|
+
},
|
|
2323
|
+
{
|
|
2324
|
+
"type": "context-fragmentation",
|
|
2325
|
+
"severity": "critical",
|
|
2326
|
+
"message": "Context budget 23,417 tokens is 50% over limit",
|
|
2327
|
+
"location": {
|
|
2328
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2329
|
+
"line": 1
|
|
2330
|
+
},
|
|
2331
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2332
|
+
}
|
|
2333
|
+
],
|
|
2334
|
+
"metrics": {
|
|
2335
|
+
"tokenCost": 2862,
|
|
2336
|
+
"complexityScore": 9
|
|
2337
|
+
}
|
|
2338
|
+
},
|
|
2339
|
+
{
|
|
2340
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
2341
|
+
"issues": [
|
|
2342
|
+
{
|
|
2343
|
+
"type": "context-fragmentation",
|
|
2344
|
+
"severity": "critical",
|
|
2345
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2346
|
+
"location": {
|
|
2347
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
2348
|
+
"line": 1
|
|
2349
|
+
},
|
|
2350
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
"type": "context-fragmentation",
|
|
2354
|
+
"severity": "critical",
|
|
2355
|
+
"message": "Context budget 23,172 tokens is 50% over limit",
|
|
2356
|
+
"location": {
|
|
2357
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
2358
|
+
"line": 1
|
|
2359
|
+
},
|
|
2360
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2361
|
+
}
|
|
2362
|
+
],
|
|
2363
|
+
"metrics": {
|
|
2364
|
+
"tokenCost": 3192,
|
|
2365
|
+
"complexityScore": 5
|
|
2366
|
+
}
|
|
2367
|
+
},
|
|
2368
|
+
{
|
|
2369
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2370
|
+
"issues": [
|
|
2371
|
+
{
|
|
2372
|
+
"type": "context-fragmentation",
|
|
2373
|
+
"severity": "critical",
|
|
2374
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2375
|
+
"location": {
|
|
2376
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2377
|
+
"line": 1
|
|
2378
|
+
},
|
|
2379
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
"type": "context-fragmentation",
|
|
2383
|
+
"severity": "critical",
|
|
2384
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
2385
|
+
"location": {
|
|
2386
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2387
|
+
"line": 1
|
|
2388
|
+
},
|
|
2389
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2390
|
+
},
|
|
2391
|
+
{
|
|
2392
|
+
"type": "context-fragmentation",
|
|
2393
|
+
"severity": "critical",
|
|
2394
|
+
"message": "Context budget 21,737 tokens is 50% over limit",
|
|
2395
|
+
"location": {
|
|
2396
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2397
|
+
"line": 1
|
|
2398
|
+
},
|
|
2399
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2400
|
+
}
|
|
2401
|
+
],
|
|
2402
|
+
"metrics": {
|
|
2403
|
+
"tokenCost": 1182,
|
|
2404
|
+
"complexityScore": 9
|
|
2405
|
+
}
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2409
|
+
"issues": [
|
|
2410
|
+
{
|
|
2411
|
+
"type": "context-fragmentation",
|
|
2412
|
+
"severity": "critical",
|
|
2413
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2414
|
+
"location": {
|
|
2415
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2416
|
+
"line": 1
|
|
2417
|
+
},
|
|
2418
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2419
|
+
},
|
|
2420
|
+
{
|
|
2421
|
+
"type": "context-fragmentation",
|
|
2422
|
+
"severity": "critical",
|
|
2423
|
+
"message": "Import depth 6 exceeds recommended maximum 5",
|
|
2424
|
+
"location": {
|
|
2425
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2426
|
+
"line": 1
|
|
2427
|
+
},
|
|
2428
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
"type": "context-fragmentation",
|
|
2432
|
+
"severity": "critical",
|
|
2433
|
+
"message": "Context budget 20,979 tokens is 50% over limit",
|
|
2434
|
+
"location": {
|
|
2435
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2436
|
+
"line": 1
|
|
2437
|
+
},
|
|
2438
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2439
|
+
}
|
|
2440
|
+
],
|
|
2441
|
+
"metrics": {
|
|
2442
|
+
"tokenCost": 999,
|
|
2443
|
+
"complexityScore": 6
|
|
2444
|
+
}
|
|
2445
|
+
},
|
|
2446
|
+
{
|
|
2447
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
2448
|
+
"issues": [
|
|
2449
|
+
{
|
|
2450
|
+
"type": "context-fragmentation",
|
|
2451
|
+
"severity": "critical",
|
|
2452
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2453
|
+
"location": {
|
|
2454
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
2455
|
+
"line": 1
|
|
2456
|
+
},
|
|
2457
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2458
|
+
},
|
|
2459
|
+
{
|
|
2460
|
+
"type": "context-fragmentation",
|
|
2461
|
+
"severity": "critical",
|
|
2462
|
+
"message": "Import depth 8 exceeds limit by 50%",
|
|
2463
|
+
"location": {
|
|
2464
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
2465
|
+
"line": 1
|
|
2466
|
+
},
|
|
2467
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2468
|
+
},
|
|
2469
|
+
{
|
|
2470
|
+
"type": "context-fragmentation",
|
|
2471
|
+
"severity": "critical",
|
|
2472
|
+
"message": "Context budget 20,555 tokens is 50% over limit",
|
|
2473
|
+
"location": {
|
|
2474
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
2475
|
+
"line": 1
|
|
2476
|
+
},
|
|
2477
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2478
|
+
}
|
|
2479
|
+
],
|
|
2480
|
+
"metrics": {
|
|
2481
|
+
"tokenCost": 109,
|
|
2482
|
+
"complexityScore": 8
|
|
2483
|
+
}
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
2487
|
+
"issues": [
|
|
2488
|
+
{
|
|
2489
|
+
"type": "context-fragmentation",
|
|
2490
|
+
"severity": "critical",
|
|
2491
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2492
|
+
"location": {
|
|
2493
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
2494
|
+
"line": 1
|
|
2495
|
+
},
|
|
2496
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
"type": "context-fragmentation",
|
|
2500
|
+
"severity": "critical",
|
|
2501
|
+
"message": "Import depth 7 exceeds recommended maximum 5",
|
|
2502
|
+
"location": {
|
|
2503
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
2504
|
+
"line": 1
|
|
2505
|
+
},
|
|
2506
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2507
|
+
},
|
|
2508
|
+
{
|
|
2509
|
+
"type": "context-fragmentation",
|
|
2510
|
+
"severity": "critical",
|
|
2511
|
+
"message": "Context budget 20,446 tokens is 50% over limit",
|
|
2512
|
+
"location": {
|
|
2513
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
2514
|
+
"line": 1
|
|
2515
|
+
},
|
|
2516
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2517
|
+
}
|
|
2518
|
+
],
|
|
2519
|
+
"metrics": {
|
|
2520
|
+
"tokenCost": 466,
|
|
2521
|
+
"complexityScore": 7
|
|
2522
|
+
}
|
|
2523
|
+
},
|
|
2524
|
+
{
|
|
2525
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
2526
|
+
"issues": [
|
|
2527
|
+
{
|
|
2528
|
+
"type": "context-fragmentation",
|
|
2529
|
+
"severity": "critical",
|
|
2530
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2531
|
+
"location": {
|
|
2532
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
2533
|
+
"line": 1
|
|
2534
|
+
},
|
|
2535
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2536
|
+
}
|
|
2537
|
+
],
|
|
2538
|
+
"metrics": {
|
|
2539
|
+
"tokenCost": 711,
|
|
2540
|
+
"complexityScore": 4
|
|
2541
|
+
}
|
|
2542
|
+
},
|
|
2543
|
+
{
|
|
2544
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
2545
|
+
"issues": [
|
|
2546
|
+
{
|
|
2547
|
+
"type": "context-fragmentation",
|
|
2548
|
+
"severity": "critical",
|
|
2549
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2550
|
+
"location": {
|
|
2551
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
2552
|
+
"line": 1
|
|
2553
|
+
},
|
|
2554
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2555
|
+
}
|
|
2556
|
+
],
|
|
2557
|
+
"metrics": {
|
|
2558
|
+
"tokenCost": 1854,
|
|
2559
|
+
"complexityScore": 3
|
|
2560
|
+
}
|
|
2561
|
+
},
|
|
2562
|
+
{
|
|
2563
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
2564
|
+
"issues": [
|
|
2565
|
+
{
|
|
2566
|
+
"type": "context-fragmentation",
|
|
2567
|
+
"severity": "critical",
|
|
2568
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2569
|
+
"location": {
|
|
2570
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
2571
|
+
"line": 1
|
|
2572
|
+
},
|
|
2573
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2574
|
+
}
|
|
2575
|
+
],
|
|
2576
|
+
"metrics": {
|
|
2577
|
+
"tokenCost": 1534,
|
|
2578
|
+
"complexityScore": 3
|
|
2579
|
+
}
|
|
2580
|
+
},
|
|
2581
|
+
{
|
|
2582
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
2583
|
+
"issues": [
|
|
2584
|
+
{
|
|
2585
|
+
"type": "context-fragmentation",
|
|
2586
|
+
"severity": "critical",
|
|
2587
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2588
|
+
"location": {
|
|
2589
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
2590
|
+
"line": 1
|
|
2591
|
+
},
|
|
2592
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2593
|
+
}
|
|
2594
|
+
],
|
|
2595
|
+
"metrics": {
|
|
2596
|
+
"tokenCost": 3968,
|
|
2597
|
+
"complexityScore": 1
|
|
2598
|
+
}
|
|
2599
|
+
},
|
|
2600
|
+
{
|
|
2601
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
2602
|
+
"issues": [
|
|
2603
|
+
{
|
|
2604
|
+
"type": "context-fragmentation",
|
|
2605
|
+
"severity": "critical",
|
|
2606
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2607
|
+
"location": {
|
|
2608
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
2609
|
+
"line": 1
|
|
2610
|
+
},
|
|
2611
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2612
|
+
}
|
|
2613
|
+
],
|
|
2614
|
+
"metrics": {
|
|
2615
|
+
"tokenCost": 743,
|
|
2616
|
+
"complexityScore": 2
|
|
2617
|
+
}
|
|
2618
|
+
},
|
|
2619
|
+
{
|
|
2620
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
2621
|
+
"issues": [
|
|
2622
|
+
{
|
|
2623
|
+
"type": "context-fragmentation",
|
|
2624
|
+
"severity": "critical",
|
|
2625
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2626
|
+
"location": {
|
|
2627
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
2628
|
+
"line": 1
|
|
2629
|
+
},
|
|
2630
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2631
|
+
}
|
|
2632
|
+
],
|
|
2633
|
+
"metrics": {
|
|
2634
|
+
"tokenCost": 2512,
|
|
2635
|
+
"complexityScore": 1
|
|
2636
|
+
}
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
2640
|
+
"issues": [
|
|
2641
|
+
{
|
|
2642
|
+
"type": "context-fragmentation",
|
|
2643
|
+
"severity": "critical",
|
|
2644
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2645
|
+
"location": {
|
|
2646
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
2647
|
+
"line": 1
|
|
2648
|
+
},
|
|
2649
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2650
|
+
}
|
|
2651
|
+
],
|
|
2652
|
+
"metrics": {
|
|
2653
|
+
"tokenCost": 1442,
|
|
2654
|
+
"complexityScore": 1
|
|
2655
|
+
}
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
2659
|
+
"issues": [
|
|
2660
|
+
{
|
|
2661
|
+
"type": "context-fragmentation",
|
|
2662
|
+
"severity": "critical",
|
|
2663
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2664
|
+
"location": {
|
|
2665
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
2666
|
+
"line": 1
|
|
2667
|
+
},
|
|
2668
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2669
|
+
}
|
|
2670
|
+
],
|
|
2671
|
+
"metrics": {
|
|
2672
|
+
"tokenCost": 1099,
|
|
2673
|
+
"complexityScore": 1
|
|
2674
|
+
}
|
|
2675
|
+
},
|
|
2676
|
+
{
|
|
2677
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
2678
|
+
"issues": [
|
|
2679
|
+
{
|
|
2680
|
+
"type": "context-fragmentation",
|
|
2681
|
+
"severity": "critical",
|
|
2682
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2683
|
+
"location": {
|
|
2684
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
2685
|
+
"line": 1
|
|
2686
|
+
},
|
|
2687
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2688
|
+
}
|
|
2689
|
+
],
|
|
2690
|
+
"metrics": {
|
|
2691
|
+
"tokenCost": 2063,
|
|
2692
|
+
"complexityScore": 0
|
|
2693
|
+
}
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
2697
|
+
"issues": [
|
|
2698
|
+
{
|
|
2699
|
+
"type": "context-fragmentation",
|
|
2700
|
+
"severity": "critical",
|
|
2701
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2702
|
+
"location": {
|
|
2703
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
2704
|
+
"line": 1
|
|
2705
|
+
},
|
|
2706
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2707
|
+
}
|
|
2708
|
+
],
|
|
2709
|
+
"metrics": {
|
|
2710
|
+
"tokenCost": 378,
|
|
2711
|
+
"complexityScore": 1
|
|
2712
|
+
}
|
|
2713
|
+
},
|
|
2714
|
+
{
|
|
2715
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
2716
|
+
"issues": [
|
|
2717
|
+
{
|
|
2718
|
+
"type": "context-fragmentation",
|
|
2719
|
+
"severity": "critical",
|
|
2720
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2721
|
+
"location": {
|
|
2722
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
2723
|
+
"line": 1
|
|
2724
|
+
},
|
|
2725
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2726
|
+
}
|
|
2727
|
+
],
|
|
2728
|
+
"metrics": {
|
|
2729
|
+
"tokenCost": 1548,
|
|
2730
|
+
"complexityScore": 0
|
|
2731
|
+
}
|
|
2732
|
+
}
|
|
2733
|
+
],
|
|
2734
|
+
"summary": {
|
|
2735
|
+
"totalFiles": 17,
|
|
2736
|
+
"criticalIssues": 17,
|
|
2737
|
+
"majorIssues": 0,
|
|
2738
|
+
"totalTokens": 26662,
|
|
2739
|
+
"avgContextBudget": 10347.117647058823,
|
|
2740
|
+
"maxContextBudget": 23417,
|
|
2741
|
+
"avgImportDepth": 3.588235294117647,
|
|
2742
|
+
"maxImportDepth": 9,
|
|
2743
|
+
"deepFiles": [
|
|
2744
|
+
{
|
|
2745
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2746
|
+
"depth": 9
|
|
2747
|
+
},
|
|
2748
|
+
{
|
|
2749
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2750
|
+
"depth": 9
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2754
|
+
"depth": 6
|
|
2755
|
+
},
|
|
2756
|
+
{
|
|
2757
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
2758
|
+
"depth": 8
|
|
2759
|
+
},
|
|
2760
|
+
{
|
|
2761
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
2762
|
+
"depth": 7
|
|
2763
|
+
}
|
|
2764
|
+
],
|
|
2765
|
+
"avgFragmentation": 0.6866729882994713,
|
|
2766
|
+
"fragmentedModules": [
|
|
2767
|
+
{
|
|
2768
|
+
"domain": "/Users",
|
|
2769
|
+
"files": [
|
|
2770
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2771
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
2772
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2773
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2774
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
2775
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
2776
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
2777
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
2778
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
2779
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
2780
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
2781
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
2782
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
2783
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
2784
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
2785
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
2786
|
+
"/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts"
|
|
2787
|
+
],
|
|
2788
|
+
"fragmentationScore": 0.6866729882994713,
|
|
2789
|
+
"totalTokens": 26662,
|
|
2790
|
+
"avgCohesion": 0.9305882352941175,
|
|
2791
|
+
"suggestedStructure": {
|
|
2792
|
+
"targetFiles": 9,
|
|
2793
|
+
"consolidationPlan": [
|
|
2794
|
+
"Consolidate 17 files in /Users into fewer modules"
|
|
2795
|
+
]
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
],
|
|
2799
|
+
"avgCohesion": 0.9305882352941175,
|
|
2800
|
+
"lowCohesionFiles": [],
|
|
2801
|
+
"minorIssues": 0,
|
|
2802
|
+
"totalPotentialSavings": 113223,
|
|
2803
|
+
"topExpensiveFiles": [
|
|
2804
|
+
{
|
|
2805
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2806
|
+
"contextBudget": 23417,
|
|
2807
|
+
"severity": "critical"
|
|
2808
|
+
},
|
|
2809
|
+
{
|
|
2810
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
2811
|
+
"contextBudget": 23172,
|
|
2812
|
+
"severity": "critical"
|
|
2813
|
+
},
|
|
2814
|
+
{
|
|
2815
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2816
|
+
"contextBudget": 21737,
|
|
2817
|
+
"severity": "critical"
|
|
2818
|
+
},
|
|
2819
|
+
{
|
|
2820
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2821
|
+
"contextBudget": 20979,
|
|
2822
|
+
"severity": "critical"
|
|
2823
|
+
},
|
|
2824
|
+
{
|
|
2825
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
2826
|
+
"contextBudget": 20555,
|
|
2827
|
+
"severity": "critical"
|
|
2828
|
+
},
|
|
2829
|
+
{
|
|
2830
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
2831
|
+
"contextBudget": 20446,
|
|
2832
|
+
"severity": "critical"
|
|
2833
|
+
},
|
|
2834
|
+
{
|
|
2835
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
2836
|
+
"contextBudget": 7048,
|
|
2837
|
+
"severity": "critical"
|
|
2838
|
+
},
|
|
2839
|
+
{
|
|
2840
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
2841
|
+
"contextBudget": 6657,
|
|
2842
|
+
"severity": "critical"
|
|
2843
|
+
},
|
|
2844
|
+
{
|
|
2845
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
2846
|
+
"contextBudget": 6337,
|
|
2847
|
+
"severity": "critical"
|
|
2848
|
+
},
|
|
2849
|
+
{
|
|
2850
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
2851
|
+
"contextBudget": 5516,
|
|
2852
|
+
"severity": "critical"
|
|
2853
|
+
}
|
|
2854
|
+
],
|
|
2855
|
+
"config": {
|
|
2856
|
+
"rootDir": "/Users/pengcao/projects/aiready/packages/context-analyzer"
|
|
2857
|
+
}
|
|
2858
|
+
},
|
|
2859
|
+
"metadata": {
|
|
2860
|
+
"toolName": "context-analyzer",
|
|
2861
|
+
"version": "0.17.5",
|
|
2862
|
+
"timestamp": "2026-03-14T11:39:47.195Z",
|
|
2863
|
+
"config": {}
|
|
2864
|
+
}
|
|
2865
|
+
},
|
|
2866
|
+
"results": [
|
|
2867
|
+
{
|
|
2868
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2869
|
+
"issues": [
|
|
2870
|
+
{
|
|
2871
|
+
"type": "context-fragmentation",
|
|
2872
|
+
"severity": "critical",
|
|
2873
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2874
|
+
"location": {
|
|
2875
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2876
|
+
"line": 1
|
|
2877
|
+
},
|
|
2878
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2879
|
+
},
|
|
2880
|
+
{
|
|
2881
|
+
"type": "context-fragmentation",
|
|
2882
|
+
"severity": "critical",
|
|
2883
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
2884
|
+
"location": {
|
|
2885
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2886
|
+
"line": 1
|
|
2887
|
+
},
|
|
2888
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2889
|
+
},
|
|
2890
|
+
{
|
|
2891
|
+
"type": "context-fragmentation",
|
|
2892
|
+
"severity": "critical",
|
|
2893
|
+
"message": "Context budget 23,417 tokens is 50% over limit",
|
|
2894
|
+
"location": {
|
|
2895
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/utils/output-formatter.ts",
|
|
2896
|
+
"line": 1
|
|
2897
|
+
},
|
|
2898
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2899
|
+
}
|
|
2900
|
+
],
|
|
2901
|
+
"metrics": {
|
|
2902
|
+
"tokenCost": 2862,
|
|
2903
|
+
"complexityScore": 9
|
|
2904
|
+
}
|
|
2905
|
+
},
|
|
2906
|
+
{
|
|
2907
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
2908
|
+
"issues": [
|
|
2909
|
+
{
|
|
2910
|
+
"type": "context-fragmentation",
|
|
2911
|
+
"severity": "critical",
|
|
2912
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2913
|
+
"location": {
|
|
2914
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
2915
|
+
"line": 1
|
|
2916
|
+
},
|
|
2917
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2918
|
+
},
|
|
2919
|
+
{
|
|
2920
|
+
"type": "context-fragmentation",
|
|
2921
|
+
"severity": "critical",
|
|
2922
|
+
"message": "Context budget 23,172 tokens is 50% over limit",
|
|
2923
|
+
"location": {
|
|
2924
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzer.ts",
|
|
2925
|
+
"line": 1
|
|
2926
|
+
},
|
|
2927
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2928
|
+
}
|
|
2929
|
+
],
|
|
2930
|
+
"metrics": {
|
|
2931
|
+
"tokenCost": 3192,
|
|
2932
|
+
"complexityScore": 5
|
|
2933
|
+
}
|
|
2934
|
+
},
|
|
2935
|
+
{
|
|
2936
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2937
|
+
"issues": [
|
|
2938
|
+
{
|
|
2939
|
+
"type": "context-fragmentation",
|
|
2940
|
+
"severity": "critical",
|
|
2941
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2942
|
+
"location": {
|
|
2943
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2944
|
+
"line": 1
|
|
2945
|
+
},
|
|
2946
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2947
|
+
},
|
|
2948
|
+
{
|
|
2949
|
+
"type": "context-fragmentation",
|
|
2950
|
+
"severity": "critical",
|
|
2951
|
+
"message": "Import depth 9 exceeds limit by 50%",
|
|
2952
|
+
"location": {
|
|
2953
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2954
|
+
"line": 1
|
|
2955
|
+
},
|
|
2956
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
"type": "context-fragmentation",
|
|
2960
|
+
"severity": "critical",
|
|
2961
|
+
"message": "Context budget 21,737 tokens is 50% over limit",
|
|
2962
|
+
"location": {
|
|
2963
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cli.ts",
|
|
2964
|
+
"line": 1
|
|
2965
|
+
},
|
|
2966
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2967
|
+
}
|
|
2968
|
+
],
|
|
2969
|
+
"metrics": {
|
|
2970
|
+
"tokenCost": 1182,
|
|
2971
|
+
"complexityScore": 9
|
|
2972
|
+
}
|
|
2973
|
+
},
|
|
2974
|
+
{
|
|
2975
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2976
|
+
"issues": [
|
|
2977
|
+
{
|
|
2978
|
+
"type": "context-fragmentation",
|
|
2979
|
+
"severity": "critical",
|
|
2980
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
2981
|
+
"location": {
|
|
2982
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2983
|
+
"line": 1
|
|
2984
|
+
},
|
|
2985
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2986
|
+
},
|
|
2987
|
+
{
|
|
2988
|
+
"type": "context-fragmentation",
|
|
2989
|
+
"severity": "critical",
|
|
2990
|
+
"message": "Import depth 6 exceeds recommended maximum 5",
|
|
2991
|
+
"location": {
|
|
2992
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
2993
|
+
"line": 1
|
|
2994
|
+
},
|
|
2995
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
2996
|
+
},
|
|
2997
|
+
{
|
|
2998
|
+
"type": "context-fragmentation",
|
|
2999
|
+
"severity": "critical",
|
|
3000
|
+
"message": "Context budget 20,979 tokens is 50% over limit",
|
|
3001
|
+
"location": {
|
|
3002
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/summary.ts",
|
|
3003
|
+
"line": 1
|
|
3004
|
+
},
|
|
3005
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3006
|
+
}
|
|
3007
|
+
],
|
|
3008
|
+
"metrics": {
|
|
3009
|
+
"tokenCost": 999,
|
|
3010
|
+
"complexityScore": 6
|
|
3011
|
+
}
|
|
3012
|
+
},
|
|
3013
|
+
{
|
|
3014
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
3015
|
+
"issues": [
|
|
3016
|
+
{
|
|
3017
|
+
"type": "context-fragmentation",
|
|
3018
|
+
"severity": "critical",
|
|
3019
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3020
|
+
"location": {
|
|
3021
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
3022
|
+
"line": 1
|
|
3023
|
+
},
|
|
3024
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3025
|
+
},
|
|
3026
|
+
{
|
|
3027
|
+
"type": "context-fragmentation",
|
|
3028
|
+
"severity": "critical",
|
|
3029
|
+
"message": "Import depth 8 exceeds limit by 50%",
|
|
3030
|
+
"location": {
|
|
3031
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
3032
|
+
"line": 1
|
|
3033
|
+
},
|
|
3034
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3035
|
+
},
|
|
3036
|
+
{
|
|
3037
|
+
"type": "context-fragmentation",
|
|
3038
|
+
"severity": "critical",
|
|
3039
|
+
"message": "Context budget 20,555 tokens is 50% over limit",
|
|
3040
|
+
"location": {
|
|
3041
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/index.ts",
|
|
3042
|
+
"line": 1
|
|
3043
|
+
},
|
|
3044
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3045
|
+
}
|
|
3046
|
+
],
|
|
3047
|
+
"metrics": {
|
|
3048
|
+
"tokenCost": 109,
|
|
3049
|
+
"complexityScore": 8
|
|
3050
|
+
}
|
|
3051
|
+
},
|
|
3052
|
+
{
|
|
3053
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
3054
|
+
"issues": [
|
|
3055
|
+
{
|
|
3056
|
+
"type": "context-fragmentation",
|
|
3057
|
+
"severity": "critical",
|
|
3058
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3059
|
+
"location": {
|
|
3060
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
3061
|
+
"line": 1
|
|
3062
|
+
},
|
|
3063
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3064
|
+
},
|
|
3065
|
+
{
|
|
3066
|
+
"type": "context-fragmentation",
|
|
3067
|
+
"severity": "critical",
|
|
3068
|
+
"message": "Import depth 7 exceeds recommended maximum 5",
|
|
3069
|
+
"location": {
|
|
3070
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
3071
|
+
"line": 1
|
|
3072
|
+
},
|
|
3073
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3074
|
+
},
|
|
3075
|
+
{
|
|
3076
|
+
"type": "context-fragmentation",
|
|
3077
|
+
"severity": "critical",
|
|
3078
|
+
"message": "Context budget 20,446 tokens is 50% over limit",
|
|
3079
|
+
"location": {
|
|
3080
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/provider.ts",
|
|
3081
|
+
"line": 1
|
|
3082
|
+
},
|
|
3083
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3084
|
+
}
|
|
3085
|
+
],
|
|
3086
|
+
"metrics": {
|
|
3087
|
+
"tokenCost": 466,
|
|
3088
|
+
"complexityScore": 7
|
|
3089
|
+
}
|
|
3090
|
+
},
|
|
3091
|
+
{
|
|
3092
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
3093
|
+
"issues": [
|
|
3094
|
+
{
|
|
3095
|
+
"type": "context-fragmentation",
|
|
3096
|
+
"severity": "critical",
|
|
3097
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3098
|
+
"location": {
|
|
3099
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/cluster-detector.ts",
|
|
3100
|
+
"line": 1
|
|
3101
|
+
},
|
|
3102
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3103
|
+
}
|
|
3104
|
+
],
|
|
3105
|
+
"metrics": {
|
|
3106
|
+
"tokenCost": 711,
|
|
3107
|
+
"complexityScore": 4
|
|
3108
|
+
}
|
|
3109
|
+
},
|
|
3110
|
+
{
|
|
3111
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
3112
|
+
"issues": [
|
|
3113
|
+
{
|
|
3114
|
+
"type": "context-fragmentation",
|
|
3115
|
+
"severity": "critical",
|
|
3116
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3117
|
+
"location": {
|
|
3118
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/graph-builder.ts",
|
|
3119
|
+
"line": 1
|
|
3120
|
+
},
|
|
3121
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3122
|
+
}
|
|
3123
|
+
],
|
|
3124
|
+
"metrics": {
|
|
3125
|
+
"tokenCost": 1854,
|
|
3126
|
+
"complexityScore": 3
|
|
3127
|
+
}
|
|
3128
|
+
},
|
|
3129
|
+
{
|
|
3130
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
3131
|
+
"issues": [
|
|
3132
|
+
{
|
|
3133
|
+
"type": "context-fragmentation",
|
|
3134
|
+
"severity": "critical",
|
|
3135
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3136
|
+
"location": {
|
|
3137
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/metrics.ts",
|
|
3138
|
+
"line": 1
|
|
3139
|
+
},
|
|
3140
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3141
|
+
}
|
|
3142
|
+
],
|
|
3143
|
+
"metrics": {
|
|
3144
|
+
"tokenCost": 1534,
|
|
3145
|
+
"complexityScore": 3
|
|
3146
|
+
}
|
|
3147
|
+
},
|
|
3148
|
+
{
|
|
3149
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
3150
|
+
"issues": [
|
|
3151
|
+
{
|
|
3152
|
+
"type": "context-fragmentation",
|
|
3153
|
+
"severity": "critical",
|
|
3154
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3155
|
+
"location": {
|
|
3156
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/classifier.ts",
|
|
3157
|
+
"line": 1
|
|
3158
|
+
},
|
|
3159
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3160
|
+
}
|
|
3161
|
+
],
|
|
3162
|
+
"metrics": {
|
|
3163
|
+
"tokenCost": 3968,
|
|
3164
|
+
"complexityScore": 1
|
|
3165
|
+
}
|
|
3166
|
+
},
|
|
3167
|
+
{
|
|
3168
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
3169
|
+
"issues": [
|
|
3170
|
+
{
|
|
3171
|
+
"type": "context-fragmentation",
|
|
3172
|
+
"severity": "critical",
|
|
3173
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3174
|
+
"location": {
|
|
3175
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/ast-utils.ts",
|
|
3176
|
+
"line": 1
|
|
3177
|
+
},
|
|
3178
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3179
|
+
}
|
|
3180
|
+
],
|
|
3181
|
+
"metrics": {
|
|
3182
|
+
"tokenCost": 743,
|
|
3183
|
+
"complexityScore": 2
|
|
3184
|
+
}
|
|
3185
|
+
},
|
|
3186
|
+
{
|
|
3187
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
3188
|
+
"issues": [
|
|
3189
|
+
{
|
|
3190
|
+
"type": "context-fragmentation",
|
|
3191
|
+
"severity": "critical",
|
|
3192
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3193
|
+
"location": {
|
|
3194
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/semantic-analysis.ts",
|
|
3195
|
+
"line": 1
|
|
3196
|
+
},
|
|
3197
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3198
|
+
}
|
|
3199
|
+
],
|
|
3200
|
+
"metrics": {
|
|
3201
|
+
"tokenCost": 2512,
|
|
3202
|
+
"complexityScore": 1
|
|
3203
|
+
}
|
|
3204
|
+
},
|
|
3205
|
+
{
|
|
3206
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
3207
|
+
"issues": [
|
|
3208
|
+
{
|
|
3209
|
+
"type": "context-fragmentation",
|
|
3210
|
+
"severity": "critical",
|
|
3211
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3212
|
+
"location": {
|
|
3213
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/scoring.ts",
|
|
3214
|
+
"line": 1
|
|
3215
|
+
},
|
|
3216
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3217
|
+
}
|
|
3218
|
+
],
|
|
3219
|
+
"metrics": {
|
|
3220
|
+
"tokenCost": 1442,
|
|
3221
|
+
"complexityScore": 1
|
|
3222
|
+
}
|
|
3223
|
+
},
|
|
3224
|
+
{
|
|
3225
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
3226
|
+
"issues": [
|
|
3227
|
+
{
|
|
3228
|
+
"type": "context-fragmentation",
|
|
3229
|
+
"severity": "critical",
|
|
3230
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3231
|
+
"location": {
|
|
3232
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/remediation.ts",
|
|
3233
|
+
"line": 1
|
|
3234
|
+
},
|
|
3235
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3236
|
+
}
|
|
3237
|
+
],
|
|
3238
|
+
"metrics": {
|
|
3239
|
+
"tokenCost": 1099,
|
|
3240
|
+
"complexityScore": 1
|
|
3241
|
+
}
|
|
3242
|
+
},
|
|
3243
|
+
{
|
|
3244
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
3245
|
+
"issues": [
|
|
3246
|
+
{
|
|
3247
|
+
"type": "context-fragmentation",
|
|
3248
|
+
"severity": "critical",
|
|
3249
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3250
|
+
"location": {
|
|
3251
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts",
|
|
3252
|
+
"line": 1
|
|
3253
|
+
},
|
|
3254
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3255
|
+
}
|
|
3256
|
+
],
|
|
3257
|
+
"metrics": {
|
|
3258
|
+
"tokenCost": 2063,
|
|
3259
|
+
"complexityScore": 0
|
|
3260
|
+
}
|
|
3261
|
+
},
|
|
3262
|
+
{
|
|
3263
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
3264
|
+
"issues": [
|
|
3265
|
+
{
|
|
3266
|
+
"type": "context-fragmentation",
|
|
3267
|
+
"severity": "critical",
|
|
3268
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3269
|
+
"location": {
|
|
3270
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/defaults.ts",
|
|
3271
|
+
"line": 1
|
|
3272
|
+
},
|
|
3273
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3274
|
+
}
|
|
3275
|
+
],
|
|
3276
|
+
"metrics": {
|
|
3277
|
+
"tokenCost": 378,
|
|
3278
|
+
"complexityScore": 1
|
|
3279
|
+
}
|
|
3280
|
+
},
|
|
3281
|
+
{
|
|
3282
|
+
"fileName": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
3283
|
+
"issues": [
|
|
3284
|
+
{
|
|
3285
|
+
"type": "context-fragmentation",
|
|
3286
|
+
"severity": "critical",
|
|
3287
|
+
"message": "Part of 1 circular dependency chain(s)",
|
|
3288
|
+
"location": {
|
|
3289
|
+
"file": "/Users/pengcao/projects/aiready/packages/context-analyzer/src/types.ts",
|
|
3290
|
+
"line": 1
|
|
3291
|
+
},
|
|
3292
|
+
"suggestion": "Break circular dependencies by extracting interfaces or using dependency injection"
|
|
3293
|
+
}
|
|
3294
|
+
],
|
|
3295
|
+
"metrics": {
|
|
3296
|
+
"tokenCost": 1548,
|
|
3297
|
+
"complexityScore": 0
|
|
3298
|
+
}
|
|
3299
|
+
}
|
|
3300
|
+
],
|
|
3301
|
+
"scoring": {
|
|
3302
|
+
"overall": 39,
|
|
3303
|
+
"rating": "Critical",
|
|
3304
|
+
"timestamp": "2026-03-14T11:39:47.198Z",
|
|
3305
|
+
"toolsUsed": ["context-analyzer"],
|
|
3306
|
+
"breakdown": [
|
|
3307
|
+
{
|
|
3308
|
+
"toolName": "context-analyzer",
|
|
3309
|
+
"score": 39,
|
|
3310
|
+
"rawMetrics": {
|
|
3311
|
+
"avgContextBudget": 10347,
|
|
3312
|
+
"maxContextBudget": 23417,
|
|
3313
|
+
"avgImportDepth": 3.6,
|
|
3314
|
+
"maxImportDepth": 9,
|
|
3315
|
+
"avgFragmentation": 0.69,
|
|
3316
|
+
"criticalIssues": 17,
|
|
3317
|
+
"majorIssues": 0,
|
|
3318
|
+
"estimatedMonthlyCost": {
|
|
3319
|
+
"total": 8707.09,
|
|
3320
|
+
"range": [6530.32, 10883.87],
|
|
3321
|
+
"confidence": 0.7
|
|
3322
|
+
},
|
|
3323
|
+
"estimatedDeveloperHours": 68
|
|
3324
|
+
},
|
|
3325
|
+
"factors": [
|
|
3326
|
+
{
|
|
3327
|
+
"name": "Context Budget",
|
|
3328
|
+
"impact": -4,
|
|
3329
|
+
"description": "Avg 10347 tokens per file (acceptable)"
|
|
3330
|
+
},
|
|
3331
|
+
{
|
|
3332
|
+
"name": "Import Depth",
|
|
3333
|
+
"impact": 0,
|
|
3334
|
+
"description": "Avg 3.6 levels (excellent)"
|
|
3335
|
+
},
|
|
3336
|
+
{
|
|
3337
|
+
"name": "Fragmentation",
|
|
3338
|
+
"impact": -5,
|
|
3339
|
+
"description": "69% fragmentation (high)"
|
|
3340
|
+
},
|
|
3341
|
+
{
|
|
3342
|
+
"name": "Critical Issues",
|
|
3343
|
+
"impact": -20,
|
|
3344
|
+
"description": "17 critical context issues"
|
|
3345
|
+
},
|
|
3346
|
+
{
|
|
3347
|
+
"name": "Extreme File Detected",
|
|
3348
|
+
"impact": -17,
|
|
3349
|
+
"description": "One file requires 23417 tokens (very high)"
|
|
3350
|
+
}
|
|
3351
|
+
],
|
|
3352
|
+
"recommendations": [
|
|
3353
|
+
{
|
|
3354
|
+
"action": "Consolidate related code into cohesive modules",
|
|
3355
|
+
"estimatedImpact": 7,
|
|
3356
|
+
"priority": "medium"
|
|
3357
|
+
},
|
|
3358
|
+
{
|
|
3359
|
+
"action": "Split large file (23417 tokens) into smaller modules",
|
|
3360
|
+
"estimatedImpact": 8,
|
|
3361
|
+
"priority": "high"
|
|
3362
|
+
}
|
|
3363
|
+
],
|
|
3364
|
+
"tokenBudget": {
|
|
3365
|
+
"totalContextTokens": 26662,
|
|
3366
|
+
"estimatedResponseTokens": 5332,
|
|
3367
|
+
"wastedTokens": {
|
|
3368
|
+
"total": 113223,
|
|
3369
|
+
"bySource": {
|
|
3370
|
+
"duplication": 0,
|
|
3371
|
+
"fragmentation": 113223,
|
|
3372
|
+
"chattiness": 0
|
|
3373
|
+
}
|
|
3374
|
+
},
|
|
3375
|
+
"efficiencyRatio": 0,
|
|
3376
|
+
"potentialRetrievableTokens": 90578
|
|
3377
|
+
}
|
|
3378
|
+
}
|
|
3379
|
+
],
|
|
3380
|
+
"calculation": {
|
|
3381
|
+
"formula": "[(39 × 19)] / 19 = 39",
|
|
3382
|
+
"weights": {
|
|
3383
|
+
"context-analyzer": 19
|
|
3384
|
+
},
|
|
3385
|
+
"normalized": "[(39 × 19)] / 19 = 39"
|
|
3386
|
+
},
|
|
3387
|
+
"tokenBudget": {
|
|
3388
|
+
"totalContextTokens": 26662,
|
|
3389
|
+
"estimatedResponseTokens": 5332,
|
|
3390
|
+
"wastedTokens": {
|
|
3391
|
+
"total": 115889,
|
|
3392
|
+
"bySource": {
|
|
3393
|
+
"duplication": 0,
|
|
3394
|
+
"fragmentation": 113223,
|
|
3395
|
+
"chattiness": 2666
|
|
3396
|
+
}
|
|
3397
|
+
},
|
|
3398
|
+
"efficiencyRatio": 0,
|
|
3399
|
+
"potentialRetrievableTokens": 92711
|
|
3400
|
+
},
|
|
3401
|
+
"businessROI": {
|
|
3402
|
+
"monthlySavings": 3129,
|
|
3403
|
+
"productivityGainHours": 112,
|
|
3404
|
+
"annualValue": 138348
|
|
3405
|
+
}
|
|
3406
|
+
},
|
|
3407
|
+
"repository": {
|
|
3408
|
+
"url": "https://github.com/caopengau/aiready.git",
|
|
3409
|
+
"branch": "main",
|
|
3410
|
+
"commit": "3be4936e1c8aa50d6324b014ca8fcf791c6dcfaf",
|
|
3411
|
+
"author": "caopengau@gmail.com"
|
|
3412
|
+
}
|
|
3413
|
+
}
|