@rely-ai/caliber 1.20.0-dev.1773690306 → 1.20.0-dev.1773690658

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/bin.js +63 -14
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -5331,12 +5331,12 @@ var AGENT_DISPLAY_NAMES = {
5331
5331
  codex: "Codex"
5332
5332
  };
5333
5333
  var CATEGORY_LABELS = {
5334
- existence: "FILES & SETUP",
5335
- quality: "QUALITY",
5336
- grounding: "GROUNDING",
5337
- accuracy: "ACCURACY",
5338
- freshness: "FRESHNESS & SAFETY",
5339
- bonus: "BONUS"
5334
+ existence: { icon: "\u{1F4C1}", label: "FILES & SETUP" },
5335
+ quality: { icon: "\u26A1", label: "QUALITY" },
5336
+ grounding: { icon: "\u{1F3AF}", label: "GROUNDING" },
5337
+ accuracy: { icon: "\u{1F50D}", label: "ACCURACY" },
5338
+ freshness: { icon: "\u{1F6E1}\uFE0F", label: "FRESHNESS & SAFETY" },
5339
+ bonus: { icon: "\u2B50", label: "BONUS" }
5340
5340
  };
5341
5341
  var CATEGORY_ORDER = ["existence", "quality", "grounding", "accuracy", "freshness", "bonus"];
5342
5342
  function gradeColor(grade) {
@@ -5355,20 +5355,51 @@ function gradeColor(grade) {
5355
5355
  return chalk6.white;
5356
5356
  }
5357
5357
  }
5358
+ var GRADIENT_COLORS = ["#ef4444", "#f97316", "#eab308", "#22c55e"];
5358
5359
  function progressBar(score, max, width = 40) {
5359
5360
  const filled = Math.round(score / max * width);
5360
5361
  const empty = width - filled;
5361
- const bar = chalk6.hex("#f97316")("\u2593".repeat(filled)) + chalk6.gray("\u2591".repeat(empty));
5362
+ let bar = "";
5363
+ for (let i = 0; i < filled; i++) {
5364
+ const position = i / (width - 1);
5365
+ const colorIndex = Math.min(
5366
+ GRADIENT_COLORS.length - 1,
5367
+ Math.floor(position * GRADIENT_COLORS.length)
5368
+ );
5369
+ bar += chalk6.hex(GRADIENT_COLORS[colorIndex])("\u2593");
5370
+ }
5371
+ bar += chalk6.gray("\u2591".repeat(empty));
5362
5372
  return bar;
5363
5373
  }
5364
5374
  function formatCheck(check) {
5365
- const icon = check.passed ? chalk6.green("\u2713") : check.earnedPoints < 0 ? chalk6.red("\u2717") : chalk6.gray("\u2717");
5366
- const points = check.passed ? chalk6.green(`+${check.earnedPoints}`.padStart(4)) : check.earnedPoints < 0 ? chalk6.red(`${check.earnedPoints}`.padStart(4)) : chalk6.gray(" \u2014");
5367
- const name = check.passed ? chalk6.white(check.name) : chalk6.gray(check.name);
5375
+ const isPartial = !check.passed && check.earnedPoints > 0;
5376
+ const isNegative = check.earnedPoints < 0;
5377
+ const lostPoints = check.maxPoints - check.earnedPoints;
5378
+ const icon = check.passed ? chalk6.green("\u2713") : isPartial ? chalk6.yellow("~") : isNegative ? chalk6.red("\u2717") : chalk6.gray("\u2717");
5379
+ let points;
5380
+ if (check.passed) {
5381
+ points = chalk6.green(`+${check.earnedPoints}`.padStart(4));
5382
+ } else if (isNegative) {
5383
+ points = chalk6.red(`${check.earnedPoints}`.padStart(4));
5384
+ } else if (isPartial) {
5385
+ points = chalk6.yellow(`${check.earnedPoints}/${check.maxPoints}`.padStart(5));
5386
+ } else {
5387
+ points = chalk6.gray(`0/${check.maxPoints}`.padStart(5));
5388
+ }
5389
+ const name = check.passed ? chalk6.white(check.name) : isNegative ? chalk6.red(check.name) : isPartial ? chalk6.white(check.name) : chalk6.gray(check.name);
5368
5390
  const detail = check.detail ? chalk6.gray(` (${check.detail})`) : "";
5369
- const suggestion = !check.passed && check.suggestion ? chalk6.gray(`
5370
- \u2192 ${check.suggestion}`) : "";
5371
- return ` ${icon} ${name.padEnd(38)}${points}${detail}${suggestion}`;
5391
+ let suggestion = "";
5392
+ if (!check.passed && check.suggestion) {
5393
+ const suggColor = isNegative ? chalk6.red : chalk6.yellow;
5394
+ suggestion = suggColor(`
5395
+ \u2192 ${check.suggestion}`);
5396
+ }
5397
+ let recovery = "";
5398
+ if (isPartial && lostPoints > 0) {
5399
+ recovery = chalk6.yellow(`
5400
+ \u2191 Fix this for +${lostPoints} more points`);
5401
+ }
5402
+ return ` ${icon} ${name.padEnd(38)}${points}${detail}${suggestion}${recovery}`;
5372
5403
  }
5373
5404
  function displayScore(result) {
5374
5405
  const gc = gradeColor(result.grade);
@@ -5385,14 +5416,32 @@ function displayScore(result) {
5385
5416
  for (const category of CATEGORY_ORDER) {
5386
5417
  const summary = result.categories[category];
5387
5418
  const categoryChecks = result.checks.filter((c) => c.category === category);
5419
+ const { icon, label } = CATEGORY_LABELS[category];
5420
+ const gap = summary.max - summary.earned;
5421
+ const gapLabel = gap > 0 ? chalk6.yellow(` (-${gap} available)`) : "";
5388
5422
  console.log(
5389
- chalk6.gray(` ${CATEGORY_LABELS[category]}`) + chalk6.gray(" ".repeat(Math.max(1, 45 - CATEGORY_LABELS[category].length))) + chalk6.white(`${summary.earned}`) + chalk6.gray(` / ${summary.max}`)
5423
+ chalk6.gray(` ${icon} ${label}`) + chalk6.gray(" ".repeat(Math.max(1, 43 - label.length))) + chalk6.white(`${summary.earned}`) + chalk6.gray(` / ${summary.max}`) + gapLabel
5390
5424
  );
5391
5425
  for (const check of categoryChecks) {
5392
5426
  console.log(formatCheck(check));
5393
5427
  }
5394
5428
  console.log("");
5395
5429
  }
5430
+ formatTopImprovements(result.checks);
5431
+ }
5432
+ function formatTopImprovements(checks) {
5433
+ const improvable = checks.filter((c) => c.earnedPoints < c.maxPoints).map((c) => ({ name: c.name, potential: c.maxPoints - c.earnedPoints })).sort((a, b) => b.potential - a.potential).slice(0, 5);
5434
+ if (improvable.length === 0) return;
5435
+ console.log(chalk6.gray(" \u2500 TOP IMPROVEMENTS \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
5436
+ console.log("");
5437
+ for (let i = 0; i < improvable.length; i++) {
5438
+ const item = improvable[i];
5439
+ const num = chalk6.gray(`${i + 1}.`);
5440
+ const label = chalk6.white(item.name.padEnd(42));
5441
+ const pts = chalk6.yellow(`+${item.potential} pts`);
5442
+ console.log(` ${num} ${label}${pts}`);
5443
+ }
5444
+ console.log("");
5396
5445
  }
5397
5446
  function displayScoreSummary(result) {
5398
5447
  const gc = gradeColor(result.grade);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rely-ai/caliber",
3
- "version": "1.20.0-dev.1773690306",
3
+ "version": "1.20.0-dev.1773690658",
4
4
  "description": "Analyze your codebase and generate optimized AI agent configs (CLAUDE.md, .cursorrules, skills) — no API key needed",
5
5
  "type": "module",
6
6
  "bin": {