@rely-ai/caliber 1.29.4 → 1.30.0-dev.1774189509
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 +45 -4
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -2381,7 +2381,16 @@ For command sections, use code blocks with one command per line.
|
|
|
2381
2381
|
|
|
2382
2382
|
- Each skill content: max 150 lines. Focus on patterns and examples, not exhaustive docs.
|
|
2383
2383
|
- Cursor rules: max 5 .mdc files.
|
|
2384
|
-
- If the project is large, prioritize depth on the 3-4 most critical tools over breadth across everything
|
|
2384
|
+
- If the project is large, prioritize depth on the 3-4 most critical tools over breadth across everything.
|
|
2385
|
+
|
|
2386
|
+
CONVENTIONS SECTION PRIORITY \u2014 this is the highest-value section for agent performance:
|
|
2387
|
+
The Conventions section determines whether agents choose correct, project-consistent solutions vs technically clever but fragile ones. Prioritize:
|
|
2388
|
+
1. Error handling patterns \u2014 does the project use try/except, Result types, or assertions? Show the actual pattern with a code example.
|
|
2389
|
+
2. Backward compatibility approach \u2014 does the project prefer duck typing (try/except TypeError) over introspection (inspect.signature)? Defensive patterns over clever ones?
|
|
2390
|
+
3. Testing infrastructure \u2014 test runner, key fixtures, how to add a new test. Agents that understand the test infra write tests that pass.
|
|
2391
|
+
4. "Prefer X over Y" guidelines \u2014 for common trade-offs in this codebase (e.g. "prefer composition over inheritance", "prefer simple try/except over type checking").
|
|
2392
|
+
5. Anti-patterns \u2014 2-3 specific things NOT to do in this codebase. These prevent agents from choosing overengineered solutions.
|
|
2393
|
+
Keep this section tight \u2014 bullet points, not prose. Each line should be a decision rule an agent can act on.`;
|
|
2385
2394
|
var GENERATION_SYSTEM_PROMPT = `${ROLE_AND_CONTEXT}
|
|
2386
2395
|
|
|
2387
2396
|
${CONFIG_FILE_TYPES}
|
|
@@ -2500,7 +2509,8 @@ Structure:
|
|
|
2500
2509
|
- Have a validation gate: "Verify X before proceeding to the next step"
|
|
2501
2510
|
- Specify dependencies: "This step uses the output from Step N"
|
|
2502
2511
|
4. "## Examples" \u2014 at least one example showing: User says \u2192 Actions taken \u2192 Result. The example should mirror how existing code in the project is structured.
|
|
2503
|
-
5. "##
|
|
2512
|
+
5. "## Anti-patterns" (required) \u2014 2-3 specific approaches to AVOID, with the correct alternative. Focus on cases where the "clever" solution breaks things. Example: "Do NOT use inspect.signature() to check function parameters \u2014 use try/except TypeError instead. The introspection approach breaks with decorated functions and functools.partial."
|
|
2513
|
+
6. "## Common Issues" (required) \u2014 specific error messages and their fixes. Not "check your config" but "If you see 'Connection refused on port 5432': 1. Verify postgres is running: docker ps | grep postgres 2. Check .env has correct DATABASE_URL"
|
|
2504
2514
|
|
|
2505
2515
|
Rules:
|
|
2506
2516
|
- Max 150 lines. Focus on actionable instructions, not documentation prose.
|
|
@@ -4264,11 +4274,38 @@ function appendLearningsBlock(content) {
|
|
|
4264
4274
|
function getCursorLearningsRule() {
|
|
4265
4275
|
return { filename: CURSOR_LEARNINGS_FILENAME, content: CURSOR_LEARNINGS_CONTENT };
|
|
4266
4276
|
}
|
|
4277
|
+
var SKILLS_HEADING = "## Available Skills";
|
|
4278
|
+
function truncateDescription(description) {
|
|
4279
|
+
const match = description.match(/^[^.]*\.\s/);
|
|
4280
|
+
if (match) return match[0].trim();
|
|
4281
|
+
if (description.length > 80) return description.slice(0, 77) + "...";
|
|
4282
|
+
return description;
|
|
4283
|
+
}
|
|
4284
|
+
function appendSkillListing(content, skills, pathPrefix) {
|
|
4285
|
+
if (skills.length === 0) return content;
|
|
4286
|
+
if (content.includes(SKILLS_HEADING)) return content;
|
|
4287
|
+
const lines = [
|
|
4288
|
+
"",
|
|
4289
|
+
SKILLS_HEADING,
|
|
4290
|
+
"",
|
|
4291
|
+
"The following skill files are available in this repo. Read them when working on related areas:",
|
|
4292
|
+
""
|
|
4293
|
+
];
|
|
4294
|
+
for (const skill of skills) {
|
|
4295
|
+
const shortDesc = truncateDescription(skill.description);
|
|
4296
|
+
lines.push(`- \`${pathPrefix}${skill.name}/SKILL.md\` \u2014 ${shortDesc}`);
|
|
4297
|
+
}
|
|
4298
|
+
return content.trimEnd() + "\n" + lines.join("\n") + "\n";
|
|
4299
|
+
}
|
|
4267
4300
|
|
|
4268
4301
|
// src/writers/claude/index.ts
|
|
4269
4302
|
function writeClaudeConfig(config) {
|
|
4270
4303
|
const written = [];
|
|
4271
|
-
|
|
4304
|
+
let claudeMd = config.claudeMd;
|
|
4305
|
+
if (config.skills?.length) {
|
|
4306
|
+
claudeMd = appendSkillListing(claudeMd, config.skills, ".claude/skills/");
|
|
4307
|
+
}
|
|
4308
|
+
fs10.writeFileSync("CLAUDE.md", appendLearningsBlock(appendPreCommitBlock(claudeMd)));
|
|
4272
4309
|
written.push("CLAUDE.md");
|
|
4273
4310
|
if (config.skills?.length) {
|
|
4274
4311
|
for (const skill of config.skills) {
|
|
@@ -4361,7 +4398,11 @@ import fs12 from "fs";
|
|
|
4361
4398
|
import path12 from "path";
|
|
4362
4399
|
function writeCodexConfig(config) {
|
|
4363
4400
|
const written = [];
|
|
4364
|
-
|
|
4401
|
+
let agentsMd = config.agentsMd;
|
|
4402
|
+
if (config.skills?.length) {
|
|
4403
|
+
agentsMd = appendSkillListing(agentsMd, config.skills, ".agents/skills/");
|
|
4404
|
+
}
|
|
4405
|
+
fs12.writeFileSync("AGENTS.md", appendLearningsBlock(appendPreCommitBlock(agentsMd)));
|
|
4365
4406
|
written.push("AGENTS.md");
|
|
4366
4407
|
if (config.skills?.length) {
|
|
4367
4408
|
for (const skill of config.skills) {
|
package/package.json
CHANGED