nairon-bench 0.3.14 → 0.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +38 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -15226,21 +15226,28 @@ function aggregateRecommendations(frustrations) {
15226
15226
  for (const f3 of frustrations) {
15227
15227
  const key = f3.recommendedFix.tool;
15228
15228
  if (!byTool[key]) {
15229
- byTool[key] = { count: 0, timeSaved: 0, costSaved: 0, fix: f3.recommendedFix };
15229
+ byTool[key] = { count: 0, timeSaved: 0, costSaved: 0, fix: f3.recommendedFix, frustrations: [] };
15230
15230
  }
15231
15231
  byTool[key].count++;
15232
15232
  byTool[key].timeSaved += f3.estimatedTimeWastedMinutes * (f3.recommendedFix.estimatedImprovementPercent / 100);
15233
15233
  byTool[key].costSaved += f3.estimatedCostWasted * (f3.recommendedFix.estimatedImprovementPercent / 100);
15234
+ byTool[key].frustrations.push(f3);
15234
15235
  }
15235
15236
  const recommendations = [];
15236
15237
  for (const [tool, data] of Object.entries(byTool)) {
15238
+ const preventedFrustrations = data.frustrations.sort((a2, b2) => b2.estimatedTimeWastedMinutes - a2.estimatedTimeWastedMinutes).slice(0, 3).map((f3) => ({
15239
+ patternType: f3.patternDescription,
15240
+ promptSnippet: f3.exactPrompt.slice(0, 80) + (f3.exactPrompt.length > 80 ? "..." : ""),
15241
+ timeWasted: f3.estimatedTimeWastedMinutes
15242
+ }));
15237
15243
  recommendations.push({
15238
15244
  tool,
15239
15245
  description: data.fix.description,
15240
15246
  installCommand: data.fix.installCommand,
15241
15247
  wouldHavePreventedCount: data.count,
15242
15248
  estimatedTimeSavedMinutes: Math.round(data.timeSaved),
15243
- estimatedCostSaved: Math.round(data.costSaved * 100) / 100
15249
+ estimatedCostSaved: Math.round(data.costSaved * 100) / 100,
15250
+ preventedFrustrations
15244
15251
  });
15245
15252
  }
15246
15253
  recommendations.sort((a2, b2) => b2.estimatedTimeSavedMinutes - a2.estimatedTimeSavedMinutes);
@@ -15280,13 +15287,24 @@ function formatFrustrationSummary(summary) {
15280
15287
  }
15281
15288
  }
15282
15289
  if (summary.recommendations.length > 0) {
15283
- lines.push(` ${colors2.bold(colors2.primary("Recommended Fixes:"))}`);
15290
+ lines.push(` ${colors2.bold(colors2.primary("Contextual Recommendations:"))}`);
15291
+ lines.push("");
15292
+ const totalTimeSavings = summary.recommendations.reduce((a2, r3) => a2 + r3.estimatedTimeSavedMinutes, 0);
15293
+ const totalCostSavings = summary.recommendations.reduce((a2, r3) => a2 + r3.estimatedCostSaved, 0);
15294
+ lines.push(` ${colors2.dim("Total potential savings:")} ${colors2.success(`~${totalTimeSavings} min`)} | ${colors2.success(`$${totalCostSavings.toFixed(2)}`)}`);
15284
15295
  lines.push("");
15285
- for (const rec of summary.recommendations.slice(0, 3)) {
15286
- lines.push(` ${colors2.success("+")} ${colors2.bold(rec.tool)}`);
15287
- lines.push(` Would have prevented ${rec.wouldHavePreventedCount} issue${rec.wouldHavePreventedCount > 1 ? "s" : ""}`);
15288
- lines.push(` Est. time saved: ${colors2.success(`~${rec.estimatedTimeSavedMinutes} min`)}`);
15289
- lines.push(` ${colors2.dim("$")} ${colors2.primary(rec.installCommand)}`);
15296
+ for (let i3 = 0;i3 < Math.min(3, summary.recommendations.length); i3++) {
15297
+ const rec = summary.recommendations[i3];
15298
+ lines.push(` ${colors2.success(`${i3 + 1}.`)} ${colors2.bold(rec.tool)}`);
15299
+ lines.push(` ${rec.description}`);
15300
+ lines.push(` ${colors2.dim("Prevented:")} ${rec.wouldHavePreventedCount} issue${rec.wouldHavePreventedCount > 1 ? "s" : ""} ${colors2.dim("|")} ${colors2.success(`~${rec.estimatedTimeSavedMinutes} min saved`)}`);
15301
+ if (rec.preventedFrustrations.length > 0) {
15302
+ lines.push(` ${colors2.dim("Would have fixed:")}`);
15303
+ for (const pf of rec.preventedFrustrations.slice(0, 2)) {
15304
+ lines.push(` ${colors2.dim("•")} ${pf.patternType} ${colors2.dim(`(${pf.timeWasted} min)`)}`);
15305
+ }
15306
+ }
15307
+ lines.push(` ${colors2.dim("Install:")} ${colors2.primary(rec.installCommand)}`);
15290
15308
  lines.push("");
15291
15309
  }
15292
15310
  }
@@ -23142,6 +23160,16 @@ var BOLD = "\x1B[1m";
23142
23160
  var RESET = "\x1B[0m";
23143
23161
  var MAGENTA = "\x1B[35m";
23144
23162
  var CHANGELOG = [
23163
+ {
23164
+ version: "0.3.15",
23165
+ date: "2026-02-14",
23166
+ title: "Contextual Recommendations",
23167
+ highlights: [
23168
+ "Recommendations now linked to specific frustrations they prevent",
23169
+ "Total time and cost savings summary",
23170
+ "See exactly which issues each tool would have fixed"
23171
+ ]
23172
+ },
23145
23173
  {
23146
23174
  version: "0.3.14",
23147
23175
  date: "2026-02-14",
@@ -23560,7 +23588,7 @@ function showFullChangelog() {
23560
23588
  // package.json
23561
23589
  var package_default = {
23562
23590
  name: "nairon-bench",
23563
- version: "0.3.14",
23591
+ version: "0.3.15",
23564
23592
  description: "AI workflow benchmarking CLI",
23565
23593
  type: "module",
23566
23594
  bin: {
@@ -26085,7 +26113,7 @@ function formatBytes(bytes) {
26085
26113
  // package.json
26086
26114
  var package_default2 = {
26087
26115
  name: "nairon-bench",
26088
- version: "0.3.14",
26116
+ version: "0.3.15",
26089
26117
  description: "AI workflow benchmarking CLI",
26090
26118
  type: "module",
26091
26119
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nairon-bench",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "description": "AI workflow benchmarking CLI",
5
5
  "type": "module",
6
6
  "bin": {