@aiready/cli 0.9.41 → 0.9.43
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-20260228-003433.json +7939 -0
- package/.aiready/aiready-report-20260228-003613.json +771 -0
- package/.turbo/turbo-build.log +9 -9
- package/.turbo/turbo-lint.log +5 -0
- package/.turbo/turbo-test.log +4 -4
- package/dist/chunk-LLJMKNBI.mjs +243 -0
- package/dist/cli.js +20 -6
- package/dist/cli.mjs +9 -1
- package/dist/index.js +12 -6
- package/dist/index.mjs +1 -1
- package/package.json +12 -12
- package/src/commands/ai-signal-clarity.ts +2 -2
- package/src/commands/consistency.ts +1 -1
- package/src/commands/context.ts +1 -1
- package/src/commands/scan.ts +12 -0
- package/src/index.ts +6 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/cli@0.9.
|
|
3
|
+
> @aiready/cli@0.9.43 build /Users/pengcao/projects/aiready/packages/cli
|
|
4
4
|
> tsup src/index.ts src/cli.ts --format cjs,esm
|
|
5
5
|
|
|
6
6
|
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
@@ -9,12 +9,8 @@
|
|
|
9
9
|
[34mCLI[39m Target: es2020
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m138.00 B[39m
|
|
13
|
-
[32mESM[39m [1mdist/cli.mjs [22m[32m70.01 KB[39m
|
|
14
|
-
[32mESM[39m [1mdist/chunk-HLBKROD3.mjs [22m[32m7.85 KB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in 84ms
|
|
16
12
|
|
|
17
|
-
[90m[[
|
|
13
|
+
[90m[[90m12:55:45 AM[90m][39m [43m[30m WARN [39m[49m [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1m"import.meta" is not available with the "cjs" output format and will be empty[0m [empty-import-meta]
|
|
18
14
|
|
|
19
15
|
src/cli.ts:23:31:
|
|
20
16
|
[37m 23 │ return dirname(fileURLToPath([32mimport.meta[37m.url));
|
|
@@ -24,6 +20,10 @@
|
|
|
24
20
|
|
|
25
21
|
|
|
26
22
|
|
|
27
|
-
[32mCJS[39m [1mdist/index.js [22m[32m9.
|
|
28
|
-
[32mCJS[39m [1mdist/cli.js [22m[32m80.
|
|
29
|
-
[32mCJS[39m ⚡️ Build success in
|
|
23
|
+
[32mCJS[39m [1mdist/index.js [22m[32m9.42 KB[39m
|
|
24
|
+
[32mCJS[39m [1mdist/cli.js [22m[32m80.79 KB[39m
|
|
25
|
+
[32mCJS[39m ⚡️ Build success in 100ms
|
|
26
|
+
[32mESM[39m [1mdist/cli.mjs [22m[32m70.25 KB[39m
|
|
27
|
+
[32mESM[39m [1mdist/chunk-LLJMKNBI.mjs [22m[32m8.07 KB[39m
|
|
28
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m138.00 B[39m
|
|
29
|
+
[32mESM[39m ⚡️ Build success in 104ms
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/cli@0.9.
|
|
3
|
+
> @aiready/cli@0.9.43 test /Users/pengcao/projects/aiready/packages/cli
|
|
4
4
|
> vitest run
|
|
5
5
|
|
|
6
6
|
[?25l
|
|
7
7
|
[1m[46m RUN [49m[22m [36mv4.0.18 [39m[90m/Users/pengcao/projects/aiready/packages/cli[39m
|
|
8
8
|
|
|
9
|
+
[32m✓[39m src/__tests__/cli.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
9
10
|
[32m✓[39m dist/__tests__/cli.test.js [2m([22m[2m3 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
10
|
-
[32m✓[39m src/__tests__/cli.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
11
11
|
|
|
12
12
|
[2m Test Files [22m [1m[32m2 passed[39m[22m[90m (2)[39m
|
|
13
13
|
[2m Tests [22m [1m[32m6 passed[39m[22m[90m (6)[39m
|
|
14
|
-
[2m Start at [22m
|
|
15
|
-
[2m Duration [22m
|
|
14
|
+
[2m Start at [22m 00:56:33
|
|
15
|
+
[2m Duration [22m 7.83s[2m (transform 2.63s, setup 0ms, import 12.42s, tests 12ms, environment 0ms)[22m
|
|
16
16
|
|
|
17
17
|
[?25h
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
// src/index.ts
|
|
9
|
+
import { analyzePatterns } from "@aiready/pattern-detect";
|
|
10
|
+
import { analyzeContext } from "@aiready/context-analyzer";
|
|
11
|
+
import { analyzeConsistency } from "@aiready/consistency";
|
|
12
|
+
var severityOrder = {
|
|
13
|
+
critical: 4,
|
|
14
|
+
major: 3,
|
|
15
|
+
minor: 2,
|
|
16
|
+
info: 1
|
|
17
|
+
};
|
|
18
|
+
function sortBySeverity(results) {
|
|
19
|
+
return results.map((file) => {
|
|
20
|
+
const sortedIssues = [...file.issues].sort((a, b) => {
|
|
21
|
+
const severityDiff = (severityOrder[b.severity] || 0) - (severityOrder[a.severity] || 0);
|
|
22
|
+
if (severityDiff !== 0) return severityDiff;
|
|
23
|
+
return (a.location?.line || 0) - (b.location?.line || 0);
|
|
24
|
+
});
|
|
25
|
+
return { ...file, issues: sortedIssues };
|
|
26
|
+
}).sort((a, b) => {
|
|
27
|
+
const aMaxSeverity = Math.max(
|
|
28
|
+
...a.issues.map((i) => severityOrder[i.severity] || 0),
|
|
29
|
+
0
|
|
30
|
+
);
|
|
31
|
+
const bMaxSeverity = Math.max(
|
|
32
|
+
...b.issues.map((i) => severityOrder[i.severity] || 0),
|
|
33
|
+
0
|
|
34
|
+
);
|
|
35
|
+
if (aMaxSeverity !== bMaxSeverity) {
|
|
36
|
+
return bMaxSeverity - aMaxSeverity;
|
|
37
|
+
}
|
|
38
|
+
if (a.issues.length !== b.issues.length) {
|
|
39
|
+
return b.issues.length - a.issues.length;
|
|
40
|
+
}
|
|
41
|
+
return a.fileName.localeCompare(b.fileName);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
async function analyzeUnified(options) {
|
|
45
|
+
const startTime = Date.now();
|
|
46
|
+
const tools = options.tools || ["patterns", "context", "consistency"];
|
|
47
|
+
const result = {
|
|
48
|
+
summary: {
|
|
49
|
+
totalIssues: 0,
|
|
50
|
+
toolsRun: tools,
|
|
51
|
+
executionTime: 0
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
if (tools.includes("patterns")) {
|
|
55
|
+
const patternResult = await analyzePatterns(options);
|
|
56
|
+
if (options.progressCallback) {
|
|
57
|
+
options.progressCallback({ tool: "patterns", data: patternResult });
|
|
58
|
+
}
|
|
59
|
+
result.patterns = sortBySeverity(patternResult.results);
|
|
60
|
+
result.duplicates = patternResult.duplicates;
|
|
61
|
+
result.summary.totalIssues += patternResult.results.reduce(
|
|
62
|
+
(sum, file) => sum + file.issues.length,
|
|
63
|
+
0
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
if (tools.includes("context")) {
|
|
67
|
+
const contextResults = await analyzeContext(options);
|
|
68
|
+
if (options.progressCallback) {
|
|
69
|
+
options.progressCallback({ tool: "context", data: contextResults });
|
|
70
|
+
}
|
|
71
|
+
result.context = contextResults.sort((a, b) => {
|
|
72
|
+
const severityDiff = (severityOrder[b.severity] || 0) - (severityOrder[a.severity] || 0);
|
|
73
|
+
if (severityDiff !== 0) return severityDiff;
|
|
74
|
+
if (a.tokenCost !== b.tokenCost) return b.tokenCost - a.tokenCost;
|
|
75
|
+
return b.fragmentationScore - a.fragmentationScore;
|
|
76
|
+
});
|
|
77
|
+
result.summary.totalIssues += result.context?.length || 0;
|
|
78
|
+
}
|
|
79
|
+
if (tools.includes("consistency")) {
|
|
80
|
+
const consistencyOptions = {
|
|
81
|
+
rootDir: options.rootDir,
|
|
82
|
+
include: options.include,
|
|
83
|
+
exclude: options.exclude,
|
|
84
|
+
...options.consistency || {}
|
|
85
|
+
};
|
|
86
|
+
const report = await analyzeConsistency(consistencyOptions);
|
|
87
|
+
if (options.progressCallback) {
|
|
88
|
+
options.progressCallback({ tool: "consistency", data: report });
|
|
89
|
+
}
|
|
90
|
+
if (report.results) {
|
|
91
|
+
report.results = sortBySeverity(report.results);
|
|
92
|
+
}
|
|
93
|
+
result.consistency = report;
|
|
94
|
+
result.summary.totalIssues += report.summary.totalIssues;
|
|
95
|
+
}
|
|
96
|
+
if (tools.includes("doc-drift")) {
|
|
97
|
+
const { analyzeDocDrift } = await import("@aiready/doc-drift");
|
|
98
|
+
const report = await analyzeDocDrift({
|
|
99
|
+
rootDir: options.rootDir,
|
|
100
|
+
include: options.include,
|
|
101
|
+
exclude: options.exclude,
|
|
102
|
+
onProgress: options.onProgress
|
|
103
|
+
});
|
|
104
|
+
if (options.progressCallback) {
|
|
105
|
+
options.progressCallback({ tool: "doc-drift", data: report });
|
|
106
|
+
}
|
|
107
|
+
result.docDrift = report;
|
|
108
|
+
result.summary.totalIssues += report.issues?.length || 0;
|
|
109
|
+
}
|
|
110
|
+
if (tools.includes("deps-health")) {
|
|
111
|
+
const { analyzeDeps } = await import("@aiready/deps");
|
|
112
|
+
const report = await analyzeDeps({
|
|
113
|
+
rootDir: options.rootDir,
|
|
114
|
+
include: options.include,
|
|
115
|
+
exclude: options.exclude,
|
|
116
|
+
onProgress: options.onProgress
|
|
117
|
+
});
|
|
118
|
+
if (options.progressCallback) {
|
|
119
|
+
options.progressCallback({ tool: "deps-health", data: report });
|
|
120
|
+
}
|
|
121
|
+
result.deps = report;
|
|
122
|
+
result.summary.totalIssues += report.issues?.length || 0;
|
|
123
|
+
}
|
|
124
|
+
if (tools.includes("aiSignalClarity")) {
|
|
125
|
+
const { analyzeAiSignalClarity } = await import("@aiready/ai-signal-clarity");
|
|
126
|
+
const report = await analyzeAiSignalClarity({
|
|
127
|
+
rootDir: options.rootDir,
|
|
128
|
+
include: options.include,
|
|
129
|
+
exclude: options.exclude,
|
|
130
|
+
onProgress: options.onProgress
|
|
131
|
+
});
|
|
132
|
+
if (options.progressCallback) {
|
|
133
|
+
options.progressCallback({ tool: "aiSignalClarity", data: report });
|
|
134
|
+
}
|
|
135
|
+
result.aiSignalClarity = report;
|
|
136
|
+
result.summary.totalIssues += report.results?.reduce(
|
|
137
|
+
(sum, r) => sum + (r.issues?.length || 0),
|
|
138
|
+
0
|
|
139
|
+
) || 0;
|
|
140
|
+
}
|
|
141
|
+
if (tools.includes("grounding")) {
|
|
142
|
+
const { analyzeAgentGrounding } = await import("@aiready/agent-grounding");
|
|
143
|
+
const report = await analyzeAgentGrounding({
|
|
144
|
+
rootDir: options.rootDir,
|
|
145
|
+
include: options.include,
|
|
146
|
+
exclude: options.exclude,
|
|
147
|
+
onProgress: options.onProgress
|
|
148
|
+
});
|
|
149
|
+
if (options.progressCallback) {
|
|
150
|
+
options.progressCallback({ tool: "grounding", data: report });
|
|
151
|
+
}
|
|
152
|
+
result.grounding = report;
|
|
153
|
+
result.summary.totalIssues += report.issues?.length || 0;
|
|
154
|
+
}
|
|
155
|
+
if (tools.includes("testability")) {
|
|
156
|
+
const { analyzeTestability } = await import("@aiready/testability");
|
|
157
|
+
const report = await analyzeTestability({
|
|
158
|
+
rootDir: options.rootDir,
|
|
159
|
+
include: options.include,
|
|
160
|
+
exclude: options.exclude,
|
|
161
|
+
onProgress: options.onProgress
|
|
162
|
+
});
|
|
163
|
+
if (options.progressCallback) {
|
|
164
|
+
options.progressCallback({ tool: "testability", data: report });
|
|
165
|
+
}
|
|
166
|
+
result.testability = report;
|
|
167
|
+
result.summary.totalIssues += report.issues?.length || 0;
|
|
168
|
+
}
|
|
169
|
+
if (tools.includes("changeAmplification")) {
|
|
170
|
+
const { analyzeChangeAmplification } = await import("@aiready/change-amplification");
|
|
171
|
+
const report = await analyzeChangeAmplification({
|
|
172
|
+
rootDir: options.rootDir,
|
|
173
|
+
include: options.include,
|
|
174
|
+
exclude: options.exclude,
|
|
175
|
+
onProgress: options.onProgress
|
|
176
|
+
});
|
|
177
|
+
if (options.progressCallback) {
|
|
178
|
+
options.progressCallback({ tool: "changeAmplification", data: report });
|
|
179
|
+
}
|
|
180
|
+
result.changeAmplification = report;
|
|
181
|
+
result.summary.totalIssues += report.summary?.totalIssues || 0;
|
|
182
|
+
}
|
|
183
|
+
result.summary.executionTime = Date.now() - startTime;
|
|
184
|
+
return result;
|
|
185
|
+
}
|
|
186
|
+
function generateUnifiedSummary(result) {
|
|
187
|
+
const { summary } = result;
|
|
188
|
+
let output = `\u{1F680} AIReady Analysis Complete
|
|
189
|
+
|
|
190
|
+
`;
|
|
191
|
+
output += `\u{1F4CA} Summary:
|
|
192
|
+
`;
|
|
193
|
+
output += ` Tools run: ${summary.toolsRun.join(", ")}
|
|
194
|
+
`;
|
|
195
|
+
output += ` Total issues found: ${summary.totalIssues}
|
|
196
|
+
`;
|
|
197
|
+
output += ` Execution time: ${(summary.executionTime / 1e3).toFixed(2)}s
|
|
198
|
+
|
|
199
|
+
`;
|
|
200
|
+
if (result.patterns) {
|
|
201
|
+
output += `\u{1F50D} Pattern Analysis: ${result.patterns.length} issues
|
|
202
|
+
`;
|
|
203
|
+
}
|
|
204
|
+
if (result.context) {
|
|
205
|
+
output += `\u{1F9E0} Context Analysis: ${result.context.length} issues
|
|
206
|
+
`;
|
|
207
|
+
}
|
|
208
|
+
if (result.consistency) {
|
|
209
|
+
output += `\u{1F3F7}\uFE0F Consistency Analysis: ${result.consistency.summary.totalIssues} issues
|
|
210
|
+
`;
|
|
211
|
+
}
|
|
212
|
+
if (result.docDrift) {
|
|
213
|
+
output += `\u{1F4DD} Doc Drift Analysis: ${result.docDrift.issues?.length || 0} issues
|
|
214
|
+
`;
|
|
215
|
+
}
|
|
216
|
+
if (result.deps) {
|
|
217
|
+
output += `\u{1F4E6} Dependency Health: ${result.deps.issues?.length || 0} issues
|
|
218
|
+
`;
|
|
219
|
+
}
|
|
220
|
+
if (result.aiSignalClarity) {
|
|
221
|
+
output += `\u{1F9E0} AI Signal Clarity: ${result.aiSignalClarity.summary?.totalSignals || 0} signals
|
|
222
|
+
`;
|
|
223
|
+
}
|
|
224
|
+
if (result.grounding) {
|
|
225
|
+
output += `\u{1F9ED} Agent Grounding: ${result.grounding.issues?.length || 0} issues
|
|
226
|
+
`;
|
|
227
|
+
}
|
|
228
|
+
if (result.testability) {
|
|
229
|
+
output += `\u{1F9EA} Testability Index: ${result.testability.issues?.length || 0} issues
|
|
230
|
+
`;
|
|
231
|
+
}
|
|
232
|
+
if (result.changeAmplification) {
|
|
233
|
+
output += `\u{1F4A5} Change Amplification: ${result.changeAmplification.summary?.totalIssues || 0} cascading risks
|
|
234
|
+
`;
|
|
235
|
+
}
|
|
236
|
+
return output;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export {
|
|
240
|
+
__require,
|
|
241
|
+
analyzeUnified,
|
|
242
|
+
generateUnifiedSummary
|
|
243
|
+
};
|
package/dist/cli.js
CHANGED
|
@@ -128,7 +128,8 @@ async function analyzeUnified(options) {
|
|
|
128
128
|
const report = await analyzeDocDrift({
|
|
129
129
|
rootDir: options.rootDir,
|
|
130
130
|
include: options.include,
|
|
131
|
-
exclude: options.exclude
|
|
131
|
+
exclude: options.exclude,
|
|
132
|
+
onProgress: options.onProgress
|
|
132
133
|
});
|
|
133
134
|
if (options.progressCallback) {
|
|
134
135
|
options.progressCallback({ tool: "doc-drift", data: report });
|
|
@@ -141,7 +142,8 @@ async function analyzeUnified(options) {
|
|
|
141
142
|
const report = await analyzeDeps({
|
|
142
143
|
rootDir: options.rootDir,
|
|
143
144
|
include: options.include,
|
|
144
|
-
exclude: options.exclude
|
|
145
|
+
exclude: options.exclude,
|
|
146
|
+
onProgress: options.onProgress
|
|
145
147
|
});
|
|
146
148
|
if (options.progressCallback) {
|
|
147
149
|
options.progressCallback({ tool: "deps-health", data: report });
|
|
@@ -154,7 +156,8 @@ async function analyzeUnified(options) {
|
|
|
154
156
|
const report = await analyzeAiSignalClarity({
|
|
155
157
|
rootDir: options.rootDir,
|
|
156
158
|
include: options.include,
|
|
157
|
-
exclude: options.exclude
|
|
159
|
+
exclude: options.exclude,
|
|
160
|
+
onProgress: options.onProgress
|
|
158
161
|
});
|
|
159
162
|
if (options.progressCallback) {
|
|
160
163
|
options.progressCallback({ tool: "aiSignalClarity", data: report });
|
|
@@ -170,7 +173,8 @@ async function analyzeUnified(options) {
|
|
|
170
173
|
const report = await analyzeAgentGrounding({
|
|
171
174
|
rootDir: options.rootDir,
|
|
172
175
|
include: options.include,
|
|
173
|
-
exclude: options.exclude
|
|
176
|
+
exclude: options.exclude,
|
|
177
|
+
onProgress: options.onProgress
|
|
174
178
|
});
|
|
175
179
|
if (options.progressCallback) {
|
|
176
180
|
options.progressCallback({ tool: "grounding", data: report });
|
|
@@ -183,7 +187,8 @@ async function analyzeUnified(options) {
|
|
|
183
187
|
const report = await analyzeTestability({
|
|
184
188
|
rootDir: options.rootDir,
|
|
185
189
|
include: options.include,
|
|
186
|
-
exclude: options.exclude
|
|
190
|
+
exclude: options.exclude,
|
|
191
|
+
onProgress: options.onProgress
|
|
187
192
|
});
|
|
188
193
|
if (options.progressCallback) {
|
|
189
194
|
options.progressCallback({ tool: "testability", data: report });
|
|
@@ -196,7 +201,8 @@ async function analyzeUnified(options) {
|
|
|
196
201
|
const report = await analyzeChangeAmplification({
|
|
197
202
|
rootDir: options.rootDir,
|
|
198
203
|
include: options.include,
|
|
199
|
-
exclude: options.exclude
|
|
204
|
+
exclude: options.exclude,
|
|
205
|
+
onProgress: options.onProgress
|
|
200
206
|
});
|
|
201
207
|
if (options.progressCallback) {
|
|
202
208
|
options.progressCallback({ tool: "changeAmplification", data: report });
|
|
@@ -669,6 +675,14 @@ async function scanAction(directory, options) {
|
|
|
669
675
|
const results = await analyzeUnified({
|
|
670
676
|
...finalOptions,
|
|
671
677
|
progressCallback,
|
|
678
|
+
onProgress: (processed, total, message) => {
|
|
679
|
+
process.stdout.write(
|
|
680
|
+
`\r\x1B[K [${processed}/${total}] ${message}...`
|
|
681
|
+
);
|
|
682
|
+
if (processed === total) {
|
|
683
|
+
process.stdout.write("\n");
|
|
684
|
+
}
|
|
685
|
+
},
|
|
672
686
|
suppressToolConfig: true
|
|
673
687
|
});
|
|
674
688
|
console.log(import_chalk2.default.cyan("\n=== AIReady Run Summary ==="));
|
package/dist/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
__require,
|
|
4
4
|
analyzeUnified
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LLJMKNBI.mjs";
|
|
6
6
|
|
|
7
7
|
// src/cli.ts
|
|
8
8
|
import { Command } from "commander";
|
|
@@ -489,6 +489,14 @@ async function scanAction(directory, options) {
|
|
|
489
489
|
const results = await analyzeUnified({
|
|
490
490
|
...finalOptions,
|
|
491
491
|
progressCallback,
|
|
492
|
+
onProgress: (processed, total, message) => {
|
|
493
|
+
process.stdout.write(
|
|
494
|
+
`\r\x1B[K [${processed}/${total}] ${message}...`
|
|
495
|
+
);
|
|
496
|
+
if (processed === total) {
|
|
497
|
+
process.stdout.write("\n");
|
|
498
|
+
}
|
|
499
|
+
},
|
|
492
500
|
suppressToolConfig: true
|
|
493
501
|
});
|
|
494
502
|
console.log(chalk2.cyan("\n=== AIReady Run Summary ==="));
|
package/dist/index.js
CHANGED
|
@@ -126,7 +126,8 @@ async function analyzeUnified(options) {
|
|
|
126
126
|
const report = await analyzeDocDrift({
|
|
127
127
|
rootDir: options.rootDir,
|
|
128
128
|
include: options.include,
|
|
129
|
-
exclude: options.exclude
|
|
129
|
+
exclude: options.exclude,
|
|
130
|
+
onProgress: options.onProgress
|
|
130
131
|
});
|
|
131
132
|
if (options.progressCallback) {
|
|
132
133
|
options.progressCallback({ tool: "doc-drift", data: report });
|
|
@@ -139,7 +140,8 @@ async function analyzeUnified(options) {
|
|
|
139
140
|
const report = await analyzeDeps({
|
|
140
141
|
rootDir: options.rootDir,
|
|
141
142
|
include: options.include,
|
|
142
|
-
exclude: options.exclude
|
|
143
|
+
exclude: options.exclude,
|
|
144
|
+
onProgress: options.onProgress
|
|
143
145
|
});
|
|
144
146
|
if (options.progressCallback) {
|
|
145
147
|
options.progressCallback({ tool: "deps-health", data: report });
|
|
@@ -152,7 +154,8 @@ async function analyzeUnified(options) {
|
|
|
152
154
|
const report = await analyzeAiSignalClarity({
|
|
153
155
|
rootDir: options.rootDir,
|
|
154
156
|
include: options.include,
|
|
155
|
-
exclude: options.exclude
|
|
157
|
+
exclude: options.exclude,
|
|
158
|
+
onProgress: options.onProgress
|
|
156
159
|
});
|
|
157
160
|
if (options.progressCallback) {
|
|
158
161
|
options.progressCallback({ tool: "aiSignalClarity", data: report });
|
|
@@ -168,7 +171,8 @@ async function analyzeUnified(options) {
|
|
|
168
171
|
const report = await analyzeAgentGrounding({
|
|
169
172
|
rootDir: options.rootDir,
|
|
170
173
|
include: options.include,
|
|
171
|
-
exclude: options.exclude
|
|
174
|
+
exclude: options.exclude,
|
|
175
|
+
onProgress: options.onProgress
|
|
172
176
|
});
|
|
173
177
|
if (options.progressCallback) {
|
|
174
178
|
options.progressCallback({ tool: "grounding", data: report });
|
|
@@ -181,7 +185,8 @@ async function analyzeUnified(options) {
|
|
|
181
185
|
const report = await analyzeTestability({
|
|
182
186
|
rootDir: options.rootDir,
|
|
183
187
|
include: options.include,
|
|
184
|
-
exclude: options.exclude
|
|
188
|
+
exclude: options.exclude,
|
|
189
|
+
onProgress: options.onProgress
|
|
185
190
|
});
|
|
186
191
|
if (options.progressCallback) {
|
|
187
192
|
options.progressCallback({ tool: "testability", data: report });
|
|
@@ -194,7 +199,8 @@ async function analyzeUnified(options) {
|
|
|
194
199
|
const report = await analyzeChangeAmplification({
|
|
195
200
|
rootDir: options.rootDir,
|
|
196
201
|
include: options.include,
|
|
197
|
-
exclude: options.exclude
|
|
202
|
+
exclude: options.exclude,
|
|
203
|
+
onProgress: options.onProgress
|
|
198
204
|
});
|
|
199
205
|
if (options.progressCallback) {
|
|
200
206
|
options.progressCallback({ tool: "changeAmplification", data: report });
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.43",
|
|
4
4
|
"description": "Unified CLI for AIReady analysis tools",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "^5.3.0",
|
|
13
13
|
"commander": "^14.0.0",
|
|
14
|
-
"@aiready/
|
|
15
|
-
"@aiready/
|
|
16
|
-
"@aiready/
|
|
17
|
-
"@aiready/
|
|
18
|
-
"@aiready/
|
|
19
|
-
"@aiready/
|
|
20
|
-
"@aiready/
|
|
21
|
-
"@aiready/
|
|
22
|
-
"@aiready/
|
|
23
|
-
"@aiready/
|
|
24
|
-
"@aiready/
|
|
14
|
+
"@aiready/core": "0.9.35",
|
|
15
|
+
"@aiready/ai-signal-clarity": "0.1.8",
|
|
16
|
+
"@aiready/agent-grounding": "0.1.8",
|
|
17
|
+
"@aiready/pattern-detect": "0.11.34",
|
|
18
|
+
"@aiready/testability": "0.1.8",
|
|
19
|
+
"@aiready/context-analyzer": "0.9.38",
|
|
20
|
+
"@aiready/visualizer": "0.1.40",
|
|
21
|
+
"@aiready/consistency": "0.8.34",
|
|
22
|
+
"@aiready/deps": "0.1.8",
|
|
23
|
+
"@aiready/change-amplification": "0.1.8",
|
|
24
|
+
"@aiready/doc-drift": "0.1.8"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^24.0.0",
|
|
@@ -10,7 +10,7 @@ export async function aiSignalClarityAction(
|
|
|
10
10
|
directory: string,
|
|
11
11
|
options: any
|
|
12
12
|
): Promise<ToolScoringOutput | undefined> {
|
|
13
|
-
const { analyzeAiSignalClarity,
|
|
13
|
+
const { analyzeAiSignalClarity, calculateAiSignalClarityScore } =
|
|
14
14
|
await import('@aiready/ai-signal-clarity');
|
|
15
15
|
|
|
16
16
|
const config = await loadConfig(directory);
|
|
@@ -25,7 +25,7 @@ export async function aiSignalClarityAction(
|
|
|
25
25
|
exclude: options.exclude,
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
const scoring =
|
|
28
|
+
const scoring = calculateAiSignalClarityScore(report);
|
|
29
29
|
|
|
30
30
|
if (options.output === 'json') {
|
|
31
31
|
return scoring;
|
package/src/commands/context.ts
CHANGED
package/src/commands/scan.ts
CHANGED
|
@@ -424,9 +424,21 @@ export async function scanAction(directory: string, options: ScanOptions) {
|
|
|
424
424
|
const results = await analyzeUnified({
|
|
425
425
|
...finalOptions,
|
|
426
426
|
progressCallback,
|
|
427
|
+
onProgress: (processed: number, total: number, message: string) => {
|
|
428
|
+
// Clear line and print progress
|
|
429
|
+
process.stdout.write(
|
|
430
|
+
`\r\x1b[K [${processed}/${total}] ${message}...`
|
|
431
|
+
);
|
|
432
|
+
if (processed === total) {
|
|
433
|
+
process.stdout.write('\n'); // Move to next line when done
|
|
434
|
+
}
|
|
435
|
+
},
|
|
427
436
|
suppressToolConfig: true,
|
|
428
437
|
});
|
|
429
438
|
|
|
439
|
+
// Determine if we need to print a trailing newline because the last tool didn't finish normally or had 0 files
|
|
440
|
+
// But progressCallback already outputs `\n--- TOOL RESULTS ---` so it's fine.
|
|
441
|
+
|
|
430
442
|
// Summarize tools and results to console
|
|
431
443
|
console.log(chalk.cyan('\n=== AIReady Run Summary ==='));
|
|
432
444
|
console.log(
|
package/src/index.ts
CHANGED
|
@@ -169,6 +169,7 @@ export async function analyzeUnified(
|
|
|
169
169
|
rootDir: options.rootDir,
|
|
170
170
|
include: options.include,
|
|
171
171
|
exclude: options.exclude,
|
|
172
|
+
onProgress: options.onProgress,
|
|
172
173
|
});
|
|
173
174
|
if (options.progressCallback) {
|
|
174
175
|
options.progressCallback({ tool: 'doc-drift', data: report });
|
|
@@ -184,6 +185,7 @@ export async function analyzeUnified(
|
|
|
184
185
|
rootDir: options.rootDir,
|
|
185
186
|
include: options.include,
|
|
186
187
|
exclude: options.exclude,
|
|
188
|
+
onProgress: options.onProgress,
|
|
187
189
|
});
|
|
188
190
|
if (options.progressCallback) {
|
|
189
191
|
options.progressCallback({ tool: 'deps-health', data: report });
|
|
@@ -200,6 +202,7 @@ export async function analyzeUnified(
|
|
|
200
202
|
rootDir: options.rootDir,
|
|
201
203
|
include: options.include,
|
|
202
204
|
exclude: options.exclude,
|
|
205
|
+
onProgress: options.onProgress,
|
|
203
206
|
});
|
|
204
207
|
if (options.progressCallback) {
|
|
205
208
|
options.progressCallback({ tool: 'aiSignalClarity', data: report });
|
|
@@ -219,6 +222,7 @@ export async function analyzeUnified(
|
|
|
219
222
|
rootDir: options.rootDir,
|
|
220
223
|
include: options.include,
|
|
221
224
|
exclude: options.exclude,
|
|
225
|
+
onProgress: options.onProgress,
|
|
222
226
|
});
|
|
223
227
|
if (options.progressCallback) {
|
|
224
228
|
options.progressCallback({ tool: 'grounding', data: report });
|
|
@@ -234,6 +238,7 @@ export async function analyzeUnified(
|
|
|
234
238
|
rootDir: options.rootDir,
|
|
235
239
|
include: options.include,
|
|
236
240
|
exclude: options.exclude,
|
|
241
|
+
onProgress: options.onProgress,
|
|
237
242
|
});
|
|
238
243
|
if (options.progressCallback) {
|
|
239
244
|
options.progressCallback({ tool: 'testability', data: report });
|
|
@@ -250,6 +255,7 @@ export async function analyzeUnified(
|
|
|
250
255
|
rootDir: options.rootDir,
|
|
251
256
|
include: options.include,
|
|
252
257
|
exclude: options.exclude,
|
|
258
|
+
onProgress: options.onProgress,
|
|
253
259
|
});
|
|
254
260
|
if (options.progressCallback) {
|
|
255
261
|
options.progressCallback({ tool: 'changeAmplification', data: report });
|