@aiready/cli 0.12.0 → 0.12.1
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/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-test.log +37 -10
- package/dist/chunk-LTUQDJPO.mjs +229 -0
- package/dist/cli.js +44 -5
- package/dist/cli.mjs +8 -4
- package/dist/index.js +37 -2
- package/dist/index.mjs +1 -1
- package/package.json +12 -12
- package/src/.aiready/aiready-report-20260307-094831.json +50609 -0
- package/src/.aiready/aiready-report-20260307-100539.json +50609 -0
- package/src/.aiready/aiready-report-20260307-103508.json +51329 -0
- package/src/commands/scan.ts +11 -3
- package/src/index.ts +38 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/cli@0.
|
|
3
|
+
> @aiready/cli@0.12.0 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
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
|
|
13
|
-
[
|
|
13
|
+
[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] [90m10:34:27 am[39m
|
|
14
14
|
|
|
15
15
|
src/cli.ts:25:31:
|
|
16
16
|
[37m 25 │ return dirname(fileURLToPath([32mimport.meta[37m.url));
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
[32mCJS[39m [1mdist/cli.js [22m[32m66.96 KB[39m
|
|
24
|
+
[32mCJS[39m [1mdist/index.js [22m[32m8.21 KB[39m
|
|
25
|
+
[32mCJS[39m ⚡️ Build success in 87ms
|
|
23
26
|
[32mESM[39m [1mdist/index.mjs [22m[32m170.00 B[39m
|
|
24
|
-
[32mESM[39m [1mdist/cli.mjs [22m[32m56.
|
|
25
|
-
[32mESM[39m [1mdist/chunk-
|
|
26
|
-
[32mESM[39m ⚡️ Build success in
|
|
27
|
-
[32mCJS[39m [1mdist/index.js [22m[32m6.76 KB[39m
|
|
28
|
-
[32mCJS[39m [1mdist/cli.js [22m[32m65.35 KB[39m
|
|
29
|
-
[32mCJS[39m ⚡️ Build success in 29ms
|
|
27
|
+
[32mESM[39m [1mdist/cli.mjs [22m[32m56.79 KB[39m
|
|
28
|
+
[32mESM[39m [1mdist/chunk-LTUQDJPO.mjs [22m[32m7.08 KB[39m
|
|
29
|
+
[32mESM[39m ⚡️ Build success in 87ms
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,28 +1,55 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/cli@0.
|
|
3
|
+
> @aiready/cli@0.12.0 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
|
+
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
10
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: pattern-detect (patterns, duplicates, duplication)
|
|
11
|
+
|
|
12
|
+
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
13
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: context-analyzer (context, fragmentation, budget)
|
|
14
|
+
|
|
15
|
+
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
16
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: naming-consistency (consistency, naming, standards)
|
|
17
|
+
|
|
18
|
+
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
19
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: ai-signal-clarity (ai-signal, clarity, hallucination)
|
|
20
|
+
|
|
21
|
+
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
22
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: agent-grounding (agent-grounding, grounding, navigation)
|
|
23
|
+
|
|
24
|
+
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
25
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: testability-index (testability, tests, verification)
|
|
26
|
+
|
|
27
|
+
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
28
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: doc-drift (doc-drift, docs, jsdoc)
|
|
29
|
+
|
|
30
|
+
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
31
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: dependency-health (deps, deps-health, packages)
|
|
32
|
+
|
|
33
|
+
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
34
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: change-amplification (change-amp, change-amplification, coupling)
|
|
35
|
+
|
|
9
36
|
[90mstdout[2m | src/__tests__/cli.test.ts[2m > [22m[2mCLI Unified Analysis[2m > [22m[2mshould run unified analysis with both tools
|
|
10
|
-
[22m[39m[ToolRegistry#0.
|
|
11
|
-
[ToolRegistry#0.
|
|
37
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: pattern-detect (patterns)
|
|
38
|
+
[ToolRegistry#0.43273800284035346] Registering tool: context-analyzer (context)
|
|
12
39
|
|
|
13
40
|
[90mstdout[2m | src/__tests__/cli.test.ts[2m > [22m[2mCLI Unified Analysis[2m > [22m[2mshould run analysis with only patterns tool
|
|
14
|
-
[22m[39m[ToolRegistry#0.
|
|
15
|
-
[ToolRegistry#0.
|
|
41
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: pattern-detect (patterns)
|
|
42
|
+
[ToolRegistry#0.43273800284035346] Registering tool: context-analyzer (context)
|
|
16
43
|
|
|
17
44
|
[90mstdout[2m | src/__tests__/cli.test.ts[2m > [22m[2mCLI Unified Analysis[2m > [22m[2mshould run analysis with only context tool
|
|
18
|
-
[22m[39m[ToolRegistry#0.
|
|
19
|
-
[ToolRegistry#0.
|
|
45
|
+
[22m[39m[ToolRegistry#0.43273800284035346] Registering tool: pattern-detect (patterns)
|
|
46
|
+
[ToolRegistry#0.43273800284035346] Registering tool: context-analyzer (context)
|
|
20
47
|
|
|
21
|
-
[32m✓[39m src/__tests__/cli.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
48
|
+
[32m✓[39m src/__tests__/cli.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
22
49
|
|
|
23
50
|
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
24
51
|
[2m Tests [22m [1m[32m3 passed[39m[22m[90m (3)[39m
|
|
25
|
-
[2m Start at [22m
|
|
26
|
-
[2m Duration [22m
|
|
52
|
+
[2m Start at [22m 10:34:45
|
|
53
|
+
[2m Duration [22m 536ms[2m (transform 205ms, setup 0ms, import 411ms, tests 3ms, environment 0ms)[22m
|
|
27
54
|
|
|
28
55
|
[?25h
|
|
@@ -0,0 +1,229 @@
|
|
|
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 {
|
|
10
|
+
ToolRegistry,
|
|
11
|
+
ToolName,
|
|
12
|
+
calculateOverallScore,
|
|
13
|
+
calculateTokenBudget
|
|
14
|
+
} from "@aiready/core";
|
|
15
|
+
import "@aiready/pattern-detect";
|
|
16
|
+
import "@aiready/context-analyzer";
|
|
17
|
+
import "@aiready/consistency";
|
|
18
|
+
import "@aiready/ai-signal-clarity";
|
|
19
|
+
import "@aiready/agent-grounding";
|
|
20
|
+
import "@aiready/testability";
|
|
21
|
+
import "@aiready/doc-drift";
|
|
22
|
+
import "@aiready/deps";
|
|
23
|
+
import "@aiready/change-amplification";
|
|
24
|
+
var TOOL_PACKAGE_MAP = {
|
|
25
|
+
[ToolName.PatternDetect]: "@aiready/pattern-detect",
|
|
26
|
+
[ToolName.ContextAnalyzer]: "@aiready/context-analyzer",
|
|
27
|
+
[ToolName.NamingConsistency]: "@aiready/consistency",
|
|
28
|
+
[ToolName.AiSignalClarity]: "@aiready/ai-signal-clarity",
|
|
29
|
+
[ToolName.AgentGrounding]: "@aiready/agent-grounding",
|
|
30
|
+
[ToolName.TestabilityIndex]: "@aiready/testability",
|
|
31
|
+
[ToolName.DocDrift]: "@aiready/doc-drift",
|
|
32
|
+
[ToolName.DependencyHealth]: "@aiready/deps",
|
|
33
|
+
[ToolName.ChangeAmplification]: "@aiready/change-amplification",
|
|
34
|
+
// Aliases handled by registry
|
|
35
|
+
patterns: "@aiready/pattern-detect",
|
|
36
|
+
duplicates: "@aiready/pattern-detect",
|
|
37
|
+
context: "@aiready/context-analyzer",
|
|
38
|
+
fragmentation: "@aiready/context-analyzer",
|
|
39
|
+
consistency: "@aiready/consistency",
|
|
40
|
+
"naming-consistency": "@aiready/consistency",
|
|
41
|
+
"ai-signal": "@aiready/ai-signal-clarity",
|
|
42
|
+
"ai-signal-clarity": "@aiready/ai-signal-clarity",
|
|
43
|
+
grounding: "@aiready/agent-grounding",
|
|
44
|
+
"agent-grounding": "@aiready/agent-grounding",
|
|
45
|
+
testability: "@aiready/testability",
|
|
46
|
+
"testability-index": "@aiready/testability",
|
|
47
|
+
"doc-drift": "@aiready/doc-drift",
|
|
48
|
+
"deps-health": "@aiready/deps",
|
|
49
|
+
"dependency-health": "@aiready/deps",
|
|
50
|
+
"change-amp": "@aiready/change-amplification",
|
|
51
|
+
"change-amplification": "@aiready/change-amplification"
|
|
52
|
+
};
|
|
53
|
+
async function analyzeUnified(options) {
|
|
54
|
+
const startTime = Date.now();
|
|
55
|
+
const requestedTools = options.tools || [
|
|
56
|
+
"patterns",
|
|
57
|
+
"context",
|
|
58
|
+
"consistency"
|
|
59
|
+
];
|
|
60
|
+
const result = {
|
|
61
|
+
summary: {
|
|
62
|
+
totalIssues: 0,
|
|
63
|
+
toolsRun: [],
|
|
64
|
+
executionTime: 0
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
for (const toolName of requestedTools) {
|
|
68
|
+
let provider = ToolRegistry.find(toolName);
|
|
69
|
+
if (!provider) {
|
|
70
|
+
const packageName = TOOL_PACKAGE_MAP[toolName] || (toolName.startsWith("@aiready/") ? toolName : `@aiready/${toolName}`);
|
|
71
|
+
try {
|
|
72
|
+
await import(packageName);
|
|
73
|
+
provider = ToolRegistry.find(toolName);
|
|
74
|
+
if (provider) {
|
|
75
|
+
console.log(
|
|
76
|
+
`\u2705 Successfully loaded tool provider: ${toolName} from ${packageName}`
|
|
77
|
+
);
|
|
78
|
+
} else {
|
|
79
|
+
console.log(
|
|
80
|
+
`\u26A0\uFE0F Loaded ${packageName} but provider ${toolName} still not found in registry.`
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
} catch (err) {
|
|
84
|
+
console.log(
|
|
85
|
+
`\u274C Failed to dynamically load tool ${toolName} (${packageName}):`,
|
|
86
|
+
err.message
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (!provider) {
|
|
91
|
+
console.warn(
|
|
92
|
+
`\u26A0\uFE0F Warning: Tool provider for '${toolName}' not found. Skipping.`
|
|
93
|
+
);
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
try {
|
|
97
|
+
const output = await provider.analyze({
|
|
98
|
+
...options,
|
|
99
|
+
onProgress: (processed, total, message) => {
|
|
100
|
+
if (options.progressCallback) {
|
|
101
|
+
options.progressCallback({
|
|
102
|
+
tool: provider.id,
|
|
103
|
+
processed,
|
|
104
|
+
total,
|
|
105
|
+
message
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
if (options.progressCallback) {
|
|
111
|
+
options.progressCallback({ tool: provider.id, data: output });
|
|
112
|
+
}
|
|
113
|
+
result[provider.id] = output;
|
|
114
|
+
result.summary.toolsRun.push(provider.id);
|
|
115
|
+
const issueCount = output.results.reduce(
|
|
116
|
+
(sum, file) => sum + (file.issues?.length || 0),
|
|
117
|
+
0
|
|
118
|
+
);
|
|
119
|
+
result.summary.totalIssues += issueCount;
|
|
120
|
+
if (provider.alias && Array.isArray(provider.alias)) {
|
|
121
|
+
for (const alias of provider.alias) {
|
|
122
|
+
if (!result[alias]) {
|
|
123
|
+
result[alias] = output;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const camelCaseId = provider.id.replace(
|
|
128
|
+
/-([a-z])/g,
|
|
129
|
+
(g) => g[1].toUpperCase()
|
|
130
|
+
);
|
|
131
|
+
if (camelCaseId !== provider.id && !result[camelCaseId]) {
|
|
132
|
+
result[camelCaseId] = output;
|
|
133
|
+
}
|
|
134
|
+
} catch (err) {
|
|
135
|
+
console.error(`\u274C Error running tool '${provider.id}':`, err);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
result.summary.executionTime = Date.now() - startTime;
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
async function scoreUnified(results, options) {
|
|
142
|
+
const toolScores = /* @__PURE__ */ new Map();
|
|
143
|
+
for (const toolId of results.summary.toolsRun) {
|
|
144
|
+
const provider = ToolRegistry.get(toolId);
|
|
145
|
+
if (!provider) continue;
|
|
146
|
+
const output = results[toolId];
|
|
147
|
+
if (!output) continue;
|
|
148
|
+
try {
|
|
149
|
+
const toolScore = provider.score(output, options);
|
|
150
|
+
if (!toolScore.tokenBudget) {
|
|
151
|
+
if (toolId === ToolName.PatternDetect && output.duplicates) {
|
|
152
|
+
const wastedTokens = output.duplicates.reduce(
|
|
153
|
+
(sum, d) => sum + (d.tokenCost || 0),
|
|
154
|
+
0
|
|
155
|
+
);
|
|
156
|
+
toolScore.tokenBudget = calculateTokenBudget({
|
|
157
|
+
totalContextTokens: wastedTokens * 2,
|
|
158
|
+
wastedTokens: {
|
|
159
|
+
duplication: wastedTokens,
|
|
160
|
+
fragmentation: 0,
|
|
161
|
+
chattiness: 0
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
} else if (toolId === ToolName.ContextAnalyzer && output.summary) {
|
|
165
|
+
toolScore.tokenBudget = calculateTokenBudget({
|
|
166
|
+
totalContextTokens: output.summary.totalTokens,
|
|
167
|
+
wastedTokens: {
|
|
168
|
+
duplication: 0,
|
|
169
|
+
fragmentation: output.summary.totalPotentialSavings || 0,
|
|
170
|
+
chattiness: 0
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
toolScores.set(toolId, toolScore);
|
|
176
|
+
} catch (err) {
|
|
177
|
+
console.error(`\u274C Error scoring tool '${toolId}':`, err);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (toolScores.size === 0) {
|
|
181
|
+
return {
|
|
182
|
+
overall: 0,
|
|
183
|
+
rating: "Critical",
|
|
184
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
185
|
+
toolsUsed: [],
|
|
186
|
+
breakdown: [],
|
|
187
|
+
calculation: {
|
|
188
|
+
formula: "0 / 0 = 0",
|
|
189
|
+
weights: {},
|
|
190
|
+
normalized: "0 / 0 = 0"
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
return calculateOverallScore(toolScores, options, void 0);
|
|
195
|
+
}
|
|
196
|
+
function generateUnifiedSummary(result) {
|
|
197
|
+
const { summary } = result;
|
|
198
|
+
let output = `\u{1F680} AIReady Analysis Complete
|
|
199
|
+
|
|
200
|
+
`;
|
|
201
|
+
output += `\u{1F4CA} Summary:
|
|
202
|
+
`;
|
|
203
|
+
output += ` Tools run: ${summary.toolsRun.join(", ")}
|
|
204
|
+
`;
|
|
205
|
+
output += ` Total issues found: ${summary.totalIssues}
|
|
206
|
+
`;
|
|
207
|
+
output += ` Execution time: ${(summary.executionTime / 1e3).toFixed(2)}s
|
|
208
|
+
|
|
209
|
+
`;
|
|
210
|
+
for (const provider of ToolRegistry.getAll()) {
|
|
211
|
+
const toolResult = result[provider.id];
|
|
212
|
+
if (toolResult) {
|
|
213
|
+
const issueCount = toolResult.results.reduce(
|
|
214
|
+
(sum, r) => sum + (r.issues?.length || 0),
|
|
215
|
+
0
|
|
216
|
+
);
|
|
217
|
+
output += `\u2022 ${provider.id}: ${issueCount} issues
|
|
218
|
+
`;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return output;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export {
|
|
225
|
+
__require,
|
|
226
|
+
analyzeUnified,
|
|
227
|
+
scoreUnified,
|
|
228
|
+
generateUnifiedSummary
|
|
229
|
+
};
|
package/dist/cli.js
CHANGED
|
@@ -37,6 +37,15 @@ var import_core3 = require("@aiready/core");
|
|
|
37
37
|
|
|
38
38
|
// src/index.ts
|
|
39
39
|
var import_core = require("@aiready/core");
|
|
40
|
+
var import_pattern_detect = require("@aiready/pattern-detect");
|
|
41
|
+
var import_context_analyzer = require("@aiready/context-analyzer");
|
|
42
|
+
var import_consistency = require("@aiready/consistency");
|
|
43
|
+
var import_ai_signal_clarity = require("@aiready/ai-signal-clarity");
|
|
44
|
+
var import_agent_grounding = require("@aiready/agent-grounding");
|
|
45
|
+
var import_testability = require("@aiready/testability");
|
|
46
|
+
var import_doc_drift = require("@aiready/doc-drift");
|
|
47
|
+
var import_deps = require("@aiready/deps");
|
|
48
|
+
var import_change_amplification = require("@aiready/change-amplification");
|
|
40
49
|
var TOOL_PACKAGE_MAP = {
|
|
41
50
|
[import_core.ToolName.PatternDetect]: "@aiready/pattern-detect",
|
|
42
51
|
[import_core.ToolName.ContextAnalyzer]: "@aiready/context-analyzer",
|
|
@@ -49,8 +58,22 @@ var TOOL_PACKAGE_MAP = {
|
|
|
49
58
|
[import_core.ToolName.ChangeAmplification]: "@aiready/change-amplification",
|
|
50
59
|
// Aliases handled by registry
|
|
51
60
|
patterns: "@aiready/pattern-detect",
|
|
61
|
+
duplicates: "@aiready/pattern-detect",
|
|
52
62
|
context: "@aiready/context-analyzer",
|
|
53
|
-
|
|
63
|
+
fragmentation: "@aiready/context-analyzer",
|
|
64
|
+
consistency: "@aiready/consistency",
|
|
65
|
+
"naming-consistency": "@aiready/consistency",
|
|
66
|
+
"ai-signal": "@aiready/ai-signal-clarity",
|
|
67
|
+
"ai-signal-clarity": "@aiready/ai-signal-clarity",
|
|
68
|
+
grounding: "@aiready/agent-grounding",
|
|
69
|
+
"agent-grounding": "@aiready/agent-grounding",
|
|
70
|
+
testability: "@aiready/testability",
|
|
71
|
+
"testability-index": "@aiready/testability",
|
|
72
|
+
"doc-drift": "@aiready/doc-drift",
|
|
73
|
+
"deps-health": "@aiready/deps",
|
|
74
|
+
"dependency-health": "@aiready/deps",
|
|
75
|
+
"change-amp": "@aiready/change-amplification",
|
|
76
|
+
"change-amplification": "@aiready/change-amplification"
|
|
54
77
|
};
|
|
55
78
|
async function analyzeUnified(options) {
|
|
56
79
|
const startTime = Date.now();
|
|
@@ -96,7 +119,19 @@ async function analyzeUnified(options) {
|
|
|
96
119
|
continue;
|
|
97
120
|
}
|
|
98
121
|
try {
|
|
99
|
-
const output = await provider.analyze(
|
|
122
|
+
const output = await provider.analyze({
|
|
123
|
+
...options,
|
|
124
|
+
onProgress: (processed, total, message) => {
|
|
125
|
+
if (options.progressCallback) {
|
|
126
|
+
options.progressCallback({
|
|
127
|
+
tool: provider.id,
|
|
128
|
+
processed,
|
|
129
|
+
total,
|
|
130
|
+
message
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
});
|
|
100
135
|
if (options.progressCallback) {
|
|
101
136
|
options.progressCallback({ tool: provider.id, data: output });
|
|
102
137
|
}
|
|
@@ -495,10 +530,14 @@ async function scanAction(directory, options) {
|
|
|
495
530
|
(finalOptions.tools || []).join(", ")
|
|
496
531
|
);
|
|
497
532
|
const progressCallback = (event) => {
|
|
498
|
-
|
|
499
|
-
|
|
533
|
+
if (event.message) {
|
|
534
|
+
process.stdout.write(`\r\x1B[K [${event.tool}] ${event.message}`);
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
process.stdout.write("\n");
|
|
538
|
+
console.log(import_chalk3.default.cyan(`--- ${event.tool.toUpperCase()} RESULTS ---`));
|
|
500
539
|
const res = event.data;
|
|
501
|
-
if (res.summary) {
|
|
540
|
+
if (res && res.summary) {
|
|
502
541
|
if (res.summary.totalIssues !== void 0)
|
|
503
542
|
console.log(` Issues found: ${import_chalk3.default.bold(res.summary.totalIssues)}`);
|
|
504
543
|
if (res.summary.score !== void 0)
|
package/dist/cli.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
__require,
|
|
4
4
|
analyzeUnified,
|
|
5
5
|
scoreUnified
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LTUQDJPO.mjs";
|
|
7
7
|
|
|
8
8
|
// src/cli.ts
|
|
9
9
|
import { Command } from "commander";
|
|
@@ -341,10 +341,14 @@ async function scanAction(directory, options) {
|
|
|
341
341
|
(finalOptions.tools || []).join(", ")
|
|
342
342
|
);
|
|
343
343
|
const progressCallback = (event) => {
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
if (event.message) {
|
|
345
|
+
process.stdout.write(`\r\x1B[K [${event.tool}] ${event.message}`);
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
process.stdout.write("\n");
|
|
349
|
+
console.log(chalk3.cyan(`--- ${event.tool.toUpperCase()} RESULTS ---`));
|
|
346
350
|
const res = event.data;
|
|
347
|
-
if (res.summary) {
|
|
351
|
+
if (res && res.summary) {
|
|
348
352
|
if (res.summary.totalIssues !== void 0)
|
|
349
353
|
console.log(` Issues found: ${chalk3.bold(res.summary.totalIssues)}`);
|
|
350
354
|
if (res.summary.score !== void 0)
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,15 @@ __export(index_exports, {
|
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(index_exports);
|
|
28
28
|
var import_core = require("@aiready/core");
|
|
29
|
+
var import_pattern_detect = require("@aiready/pattern-detect");
|
|
30
|
+
var import_context_analyzer = require("@aiready/context-analyzer");
|
|
31
|
+
var import_consistency = require("@aiready/consistency");
|
|
32
|
+
var import_ai_signal_clarity = require("@aiready/ai-signal-clarity");
|
|
33
|
+
var import_agent_grounding = require("@aiready/agent-grounding");
|
|
34
|
+
var import_testability = require("@aiready/testability");
|
|
35
|
+
var import_doc_drift = require("@aiready/doc-drift");
|
|
36
|
+
var import_deps = require("@aiready/deps");
|
|
37
|
+
var import_change_amplification = require("@aiready/change-amplification");
|
|
29
38
|
var TOOL_PACKAGE_MAP = {
|
|
30
39
|
[import_core.ToolName.PatternDetect]: "@aiready/pattern-detect",
|
|
31
40
|
[import_core.ToolName.ContextAnalyzer]: "@aiready/context-analyzer",
|
|
@@ -38,8 +47,22 @@ var TOOL_PACKAGE_MAP = {
|
|
|
38
47
|
[import_core.ToolName.ChangeAmplification]: "@aiready/change-amplification",
|
|
39
48
|
// Aliases handled by registry
|
|
40
49
|
patterns: "@aiready/pattern-detect",
|
|
50
|
+
duplicates: "@aiready/pattern-detect",
|
|
41
51
|
context: "@aiready/context-analyzer",
|
|
42
|
-
|
|
52
|
+
fragmentation: "@aiready/context-analyzer",
|
|
53
|
+
consistency: "@aiready/consistency",
|
|
54
|
+
"naming-consistency": "@aiready/consistency",
|
|
55
|
+
"ai-signal": "@aiready/ai-signal-clarity",
|
|
56
|
+
"ai-signal-clarity": "@aiready/ai-signal-clarity",
|
|
57
|
+
grounding: "@aiready/agent-grounding",
|
|
58
|
+
"agent-grounding": "@aiready/agent-grounding",
|
|
59
|
+
testability: "@aiready/testability",
|
|
60
|
+
"testability-index": "@aiready/testability",
|
|
61
|
+
"doc-drift": "@aiready/doc-drift",
|
|
62
|
+
"deps-health": "@aiready/deps",
|
|
63
|
+
"dependency-health": "@aiready/deps",
|
|
64
|
+
"change-amp": "@aiready/change-amplification",
|
|
65
|
+
"change-amplification": "@aiready/change-amplification"
|
|
43
66
|
};
|
|
44
67
|
async function analyzeUnified(options) {
|
|
45
68
|
const startTime = Date.now();
|
|
@@ -85,7 +108,19 @@ async function analyzeUnified(options) {
|
|
|
85
108
|
continue;
|
|
86
109
|
}
|
|
87
110
|
try {
|
|
88
|
-
const output = await provider.analyze(
|
|
111
|
+
const output = await provider.analyze({
|
|
112
|
+
...options,
|
|
113
|
+
onProgress: (processed, total, message) => {
|
|
114
|
+
if (options.progressCallback) {
|
|
115
|
+
options.progressCallback({
|
|
116
|
+
tool: provider.id,
|
|
117
|
+
processed,
|
|
118
|
+
total,
|
|
119
|
+
message
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
});
|
|
89
124
|
if (options.progressCallback) {
|
|
90
125
|
options.progressCallback({ tool: provider.id, data: output });
|
|
91
126
|
}
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
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/agent-grounding": "0.11.
|
|
15
|
-
"@aiready/
|
|
16
|
-
"@aiready/
|
|
17
|
-
"@aiready/
|
|
18
|
-
"@aiready/core": "0.21.
|
|
19
|
-
"@aiready/
|
|
20
|
-
"@aiready/pattern-detect": "0.14.
|
|
21
|
-
"@aiready/
|
|
22
|
-
"@aiready/
|
|
23
|
-
"@aiready/
|
|
24
|
-
"@aiready/
|
|
14
|
+
"@aiready/agent-grounding": "0.11.1",
|
|
15
|
+
"@aiready/consistency": "0.18.1",
|
|
16
|
+
"@aiready/context-analyzer": "0.19.1",
|
|
17
|
+
"@aiready/deps": "0.11.1",
|
|
18
|
+
"@aiready/core": "0.21.1",
|
|
19
|
+
"@aiready/testability": "0.4.1",
|
|
20
|
+
"@aiready/pattern-detect": "0.14.1",
|
|
21
|
+
"@aiready/visualizer": "0.4.1",
|
|
22
|
+
"@aiready/change-amplification": "0.11.1",
|
|
23
|
+
"@aiready/ai-signal-clarity": "0.11.1",
|
|
24
|
+
"@aiready/doc-drift": "0.11.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^24.0.0",
|