@rely-ai/caliber 0.4.1 → 0.4.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/dist/bin.js +15 -5
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1546,9 +1546,9 @@ function isTransientError2(error) {
|
|
|
1546
1546
|
const msg = error.message.toLowerCase();
|
|
1547
1547
|
return TRANSIENT_ERRORS.some((e) => msg.includes(e.toLowerCase()));
|
|
1548
1548
|
}
|
|
1549
|
-
async function generateSetup(fingerprint, targetAgent, prompt, callbacks, failingChecks, currentScore) {
|
|
1549
|
+
async function generateSetup(fingerprint, targetAgent, prompt, callbacks, failingChecks, currentScore, passingChecks) {
|
|
1550
1550
|
const provider = getProvider();
|
|
1551
|
-
const userMessage = buildGeneratePrompt(fingerprint, targetAgent, prompt, failingChecks, currentScore);
|
|
1551
|
+
const userMessage = buildGeneratePrompt(fingerprint, targetAgent, prompt, failingChecks, currentScore, passingChecks);
|
|
1552
1552
|
let attempt = 0;
|
|
1553
1553
|
const attemptGeneration = async () => {
|
|
1554
1554
|
attempt++;
|
|
@@ -1658,7 +1658,7 @@ function truncate(text, maxChars) {
|
|
|
1658
1658
|
return text.slice(0, maxChars) + `
|
|
1659
1659
|
... (truncated at ${maxChars} chars)`;
|
|
1660
1660
|
}
|
|
1661
|
-
function buildGeneratePrompt(fingerprint, targetAgent, prompt, failingChecks, currentScore) {
|
|
1661
|
+
function buildGeneratePrompt(fingerprint, targetAgent, prompt, failingChecks, currentScore, passingChecks) {
|
|
1662
1662
|
const parts = [];
|
|
1663
1663
|
const existing = fingerprint.existingConfigs;
|
|
1664
1664
|
const hasExistingConfigs = !!(existing.claudeMd || existing.claudeSettings || existing.claudeSkills?.length || existing.readmeMd || existing.cursorrules || existing.cursorRules?.length);
|
|
@@ -1670,8 +1670,15 @@ The existing config is already high quality. ONLY fix these specific failing che
|
|
|
1670
1670
|
for (const check of failingChecks) {
|
|
1671
1671
|
parts.push(`- ${check.name}${check.suggestion ? `: ${check.suggestion}` : ""}`);
|
|
1672
1672
|
}
|
|
1673
|
+
if (passingChecks && passingChecks.length > 0) {
|
|
1674
|
+
parts.push(`
|
|
1675
|
+
These checks are currently PASSING \u2014 do NOT break them:`);
|
|
1676
|
+
for (const check of passingChecks) {
|
|
1677
|
+
parts.push(`- ${check.name}`);
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1673
1680
|
parts.push(`
|
|
1674
|
-
IMPORTANT: Return the existing CLAUDE.md and skills with MINIMAL changes \u2014 only the edits needed to fix the above checks. Do NOT rewrite, restructure, rephrase, or make cosmetic changes. Preserve the existing content as-is except for targeted fixes.`);
|
|
1681
|
+
IMPORTANT: Return the existing CLAUDE.md and skills with MINIMAL changes \u2014 only the edits needed to fix the above checks. Do NOT rewrite, restructure, rephrase, or make cosmetic changes. Preserve the existing content as-is except for targeted fixes. If a skill file is not related to a failing check, return it EXACTLY as-is, character for character.`);
|
|
1675
1682
|
} else if (hasExistingConfigs) {
|
|
1676
1683
|
parts.push(`Audit and improve the existing coding agent configuration for target: ${targetAgent}`);
|
|
1677
1684
|
} else {
|
|
@@ -3805,9 +3812,11 @@ async function initCommand(options) {
|
|
|
3805
3812
|
fingerprint.description = await promptInput2("What will you build in this project?");
|
|
3806
3813
|
}
|
|
3807
3814
|
let failingChecks;
|
|
3815
|
+
let passingChecks;
|
|
3808
3816
|
let currentScore;
|
|
3809
3817
|
if (hasExistingConfig && baselineScore.score >= 95 && !options.force) {
|
|
3810
3818
|
failingChecks = baselineScore.checks.filter((c) => !c.passed && c.maxPoints > 0).map((c) => ({ name: c.name, suggestion: c.suggestion }));
|
|
3819
|
+
passingChecks = baselineScore.checks.filter((c) => c.passed).map((c) => ({ name: c.name }));
|
|
3811
3820
|
currentScore = baselineScore.score;
|
|
3812
3821
|
if (failingChecks.length > 0) {
|
|
3813
3822
|
console.log(chalk4.hex("#6366f1").bold(" Step 3/4 \u2014 Targeted fixes\n"));
|
|
@@ -3851,7 +3860,8 @@ async function initCommand(options) {
|
|
|
3851
3860
|
}
|
|
3852
3861
|
},
|
|
3853
3862
|
failingChecks,
|
|
3854
|
-
currentScore
|
|
3863
|
+
currentScore,
|
|
3864
|
+
passingChecks
|
|
3855
3865
|
);
|
|
3856
3866
|
if (!generatedSetup) {
|
|
3857
3867
|
generatedSetup = result.setup;
|
package/package.json
CHANGED