@rely-ai/caliber 1.1.2 → 1.1.3

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 +31 -7
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -4356,11 +4356,27 @@ async function initCommand(options) {
4356
4356
  const baselineScore = computeLocalScore(process.cwd(), targetAgent);
4357
4357
  displayScoreSummary(baselineScore);
4358
4358
  const hasExistingConfig = !!(fingerprint.existingConfigs.claudeMd || fingerprint.existingConfigs.claudeSettings || fingerprint.existingConfigs.claudeSkills?.length || fingerprint.existingConfigs.cursorrules || fingerprint.existingConfigs.cursorRules?.length);
4359
+ const NON_LLM_CHECKS = /* @__PURE__ */ new Set(["hooks_configured", "agents_md_exists", "permissions_configured", "mcp_servers"]);
4359
4360
  if (hasExistingConfig && baselineScore.score === 100) {
4360
4361
  console.log(chalk5.bold.green(" Your setup is already optimal \u2014 nothing to change.\n"));
4361
4362
  console.log(chalk5.dim(" Run ") + chalk5.hex("#83D1EB")("caliber onboard --force") + chalk5.dim(" to regenerate anyway.\n"));
4362
4363
  if (!options.force) return;
4363
4364
  }
4365
+ const allFailingChecks = baselineScore.checks.filter((c) => !c.passed && c.maxPoints > 0);
4366
+ const llmFixableChecks = allFailingChecks.filter((c) => !NON_LLM_CHECKS.has(c.id));
4367
+ if (hasExistingConfig && llmFixableChecks.length === 0 && allFailingChecks.length > 0 && !options.force) {
4368
+ console.log(chalk5.bold.green("\n Your config is fully optimized for LLM generation.\n"));
4369
+ console.log(chalk5.dim(" Remaining items need CLI actions:\n"));
4370
+ for (const check of allFailingChecks) {
4371
+ console.log(chalk5.dim(` \u2022 ${check.name}`));
4372
+ if (check.suggestion) {
4373
+ console.log(` ${chalk5.hex("#83D1EB")(check.suggestion)}`);
4374
+ }
4375
+ }
4376
+ console.log("");
4377
+ console.log(chalk5.dim(" Run ") + chalk5.hex("#83D1EB")("caliber onboard --force") + chalk5.dim(" to regenerate anyway.\n"));
4378
+ return;
4379
+ }
4364
4380
  const isEmpty = fingerprint.fileTree.length < 3;
4365
4381
  if (isEmpty) {
4366
4382
  fingerprint.description = await promptInput3("What will you build in this project?");
@@ -4369,7 +4385,7 @@ async function initCommand(options) {
4369
4385
  let passingChecks;
4370
4386
  let currentScore;
4371
4387
  if (hasExistingConfig && baselineScore.score >= 95 && !options.force) {
4372
- failingChecks = baselineScore.checks.filter((c) => !c.passed && c.maxPoints > 0).map((c) => ({ name: c.name, suggestion: c.suggestion }));
4388
+ failingChecks = llmFixableChecks.map((c) => ({ name: c.name, suggestion: c.suggestion }));
4373
4389
  passingChecks = baselineScore.checks.filter((c) => c.passed).map((c) => ({ name: c.name }));
4374
4390
  currentScore = baselineScore.score;
4375
4391
  if (failingChecks.length > 0) {
@@ -4450,14 +4466,22 @@ async function initCommand(options) {
4450
4466
  console.log(title.bold(" Step 4/5 \u2014 Review and apply\n"));
4451
4467
  const setupFiles = collectSetupFiles(generatedSetup);
4452
4468
  const staged = stageFiles(setupFiles, process.cwd());
4453
- console.log(chalk5.dim(` ${chalk5.green(`${staged.newFiles} new`)} / ${chalk5.yellow(`${staged.modifiedFiles} modified`)} file${staged.newFiles + staged.modifiedFiles !== 1 ? "s" : ""}
4469
+ const totalChanges = staged.newFiles + staged.modifiedFiles;
4470
+ console.log(chalk5.dim(` ${chalk5.green(`${staged.newFiles} new`)} / ${chalk5.yellow(`${staged.modifiedFiles} modified`)} file${totalChanges !== 1 ? "s" : ""}
4454
4471
  `));
4455
- const wantsReview = await promptWantsReview();
4456
- if (wantsReview) {
4457
- const reviewMethod = await promptReviewMethod();
4458
- await openReview(reviewMethod, staged.stagedFiles);
4472
+ let action;
4473
+ if (totalChanges === 0) {
4474
+ console.log(chalk5.dim(" No changes needed \u2014 your configs are already up to date.\n"));
4475
+ cleanupStaging();
4476
+ action = "accept";
4477
+ } else {
4478
+ const wantsReview = await promptWantsReview();
4479
+ if (wantsReview) {
4480
+ const reviewMethod = await promptReviewMethod();
4481
+ await openReview(reviewMethod, staged.stagedFiles);
4482
+ }
4483
+ action = await promptReviewAction();
4459
4484
  }
4460
- let action = await promptReviewAction();
4461
4485
  while (action === "refine") {
4462
4486
  generatedSetup = await refineLoop(generatedSetup, targetAgent, sessionHistory);
4463
4487
  if (!generatedSetup) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rely-ai/caliber",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
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": {