@aiready/cli 0.13.0 ā 0.13.2
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 +17 -17
- package/CONTRIBUTING.md +1 -1
- package/README.md +7 -1
- package/dist/cli.js +48 -4
- package/dist/cli.mjs +49 -4
- package/docs/SPOKE_GUIDE.md +184 -0
- package/package.json +6 -6
- package/src/.aiready/aiready-report-20260311-010454.json +34448 -0
- package/src/.aiready/aiready-report-20260311-193858.json +34448 -0
- package/src/cli.ts +2 -1
- package/src/commands/scan.ts +61 -2
package/src/cli.ts
CHANGED
|
@@ -95,7 +95,7 @@ program
|
|
|
95
95
|
)
|
|
96
96
|
.option(
|
|
97
97
|
'--profile <type>',
|
|
98
|
-
'Scan profile to use (agentic, cost, security, onboarding)'
|
|
98
|
+
'Scan profile to use (agentic, cost, logic, ui, security, onboarding)'
|
|
99
99
|
)
|
|
100
100
|
.option(
|
|
101
101
|
'--compare-to <path>',
|
|
@@ -105,6 +105,7 @@ program
|
|
|
105
105
|
.option('--exclude <patterns>', 'File patterns to exclude (comma-separated)')
|
|
106
106
|
.option('-o, --output <format>', 'Output format: console, json', 'console')
|
|
107
107
|
.option('--output-file <path>', 'Output file path (for json)')
|
|
108
|
+
.option('--score', 'Calculate and display AI Readiness Score (0-100)')
|
|
108
109
|
.option(
|
|
109
110
|
'--no-score',
|
|
110
111
|
'Disable calculating AI Readiness Score (enabled by default)'
|
package/src/commands/scan.ts
CHANGED
|
@@ -98,6 +98,24 @@ export async function scanAction(directory: string, options: ScanOptions) {
|
|
|
98
98
|
case 'cost':
|
|
99
99
|
profileTools = [ToolName.PatternDetect, ToolName.ContextAnalyzer];
|
|
100
100
|
break;
|
|
101
|
+
case 'logic':
|
|
102
|
+
profileTools = [
|
|
103
|
+
ToolName.TestabilityIndex,
|
|
104
|
+
ToolName.NamingConsistency,
|
|
105
|
+
ToolName.ContextAnalyzer,
|
|
106
|
+
ToolName.PatternDetect,
|
|
107
|
+
ToolName.ChangeAmplification,
|
|
108
|
+
];
|
|
109
|
+
break;
|
|
110
|
+
case 'ui':
|
|
111
|
+
profileTools = [
|
|
112
|
+
ToolName.NamingConsistency,
|
|
113
|
+
ToolName.ContextAnalyzer,
|
|
114
|
+
ToolName.PatternDetect,
|
|
115
|
+
ToolName.DocDrift,
|
|
116
|
+
ToolName.AiSignalClarity,
|
|
117
|
+
];
|
|
118
|
+
break;
|
|
101
119
|
case 'security':
|
|
102
120
|
profileTools = [
|
|
103
121
|
ToolName.NamingConsistency,
|
|
@@ -182,6 +200,10 @@ export async function scanAction(directory: string, options: ScanOptions) {
|
|
|
182
200
|
}
|
|
183
201
|
};
|
|
184
202
|
|
|
203
|
+
// Determine scoring profile for project-type-aware weighting
|
|
204
|
+
const scoringProfile =
|
|
205
|
+
options.profile || baseOptions.scoring?.profile || 'default';
|
|
206
|
+
|
|
185
207
|
const results = await analyzeUnified({
|
|
186
208
|
...finalOptions,
|
|
187
209
|
progressCallback,
|
|
@@ -199,10 +221,18 @@ export async function scanAction(directory: string, options: ScanOptions) {
|
|
|
199
221
|
|
|
200
222
|
let scoringResult: ScoringResult | undefined;
|
|
201
223
|
if (options.score || finalOptions.scoring?.showBreakdown) {
|
|
202
|
-
|
|
224
|
+
// Pass the profile to scoreUnified
|
|
225
|
+
scoringResult = await scoreUnified(results, {
|
|
226
|
+
...finalOptions,
|
|
227
|
+
scoring: {
|
|
228
|
+
...finalOptions.scoring,
|
|
229
|
+
profile: scoringProfile,
|
|
230
|
+
},
|
|
231
|
+
});
|
|
203
232
|
|
|
204
233
|
console.log(chalk.bold('\nš AI Readiness Overall Score'));
|
|
205
234
|
console.log(` ${formatScore(scoringResult)}`);
|
|
235
|
+
console.log(chalk.dim(` (Scoring Profile: ${scoringProfile})`));
|
|
206
236
|
|
|
207
237
|
// Trend comparison logic
|
|
208
238
|
if (options.compareTo) {
|
|
@@ -313,8 +343,37 @@ export async function scanAction(directory: string, options: ScanOptions) {
|
|
|
313
343
|
console.log(chalk.bold('\nTool breakdown:'));
|
|
314
344
|
scoringResult.breakdown.forEach((tool) => {
|
|
315
345
|
const rating = getRating(tool.score);
|
|
316
|
-
|
|
346
|
+
const emoji = getRatingDisplay(rating).emoji;
|
|
347
|
+
console.log(
|
|
348
|
+
` - ${tool.toolName}: ${tool.score}/100 (${rating}) ${emoji}`
|
|
349
|
+
);
|
|
317
350
|
});
|
|
351
|
+
|
|
352
|
+
// Top Actionable Recommendations
|
|
353
|
+
const allRecs = scoringResult.breakdown
|
|
354
|
+
.flatMap((t) =>
|
|
355
|
+
(t.recommendations || []).map((r) => ({ ...r, tool: t.toolName }))
|
|
356
|
+
)
|
|
357
|
+
.sort((a, b) => b.estimatedImpact - a.estimatedImpact)
|
|
358
|
+
.slice(0, 3);
|
|
359
|
+
|
|
360
|
+
if (allRecs.length > 0) {
|
|
361
|
+
console.log(chalk.bold('\nšÆ Top Actionable Recommendations:'));
|
|
362
|
+
allRecs.forEach((rec, i) => {
|
|
363
|
+
const priorityIcon =
|
|
364
|
+
rec.priority === 'high'
|
|
365
|
+
? 'š“'
|
|
366
|
+
: rec.priority === 'medium'
|
|
367
|
+
? 'š”'
|
|
368
|
+
: 'šµ';
|
|
369
|
+
console.log(
|
|
370
|
+
` ${i + 1}. ${priorityIcon} ${chalk.bold(rec.action)}`
|
|
371
|
+
);
|
|
372
|
+
console.log(
|
|
373
|
+
` Impact: ${chalk.green(`+${rec.estimatedImpact} points`)} to ${rec.tool}`
|
|
374
|
+
);
|
|
375
|
+
});
|
|
376
|
+
}
|
|
318
377
|
}
|
|
319
378
|
}
|
|
320
379
|
|