@locusai/cli 0.25.4 → 0.25.6
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/bin/locus.js +61 -2
- package/package.json +2 -2
package/bin/locus.js
CHANGED
|
@@ -92,6 +92,8 @@ var init_ai_models = __esm(() => {
|
|
|
92
92
|
"claude-haiku-4-5-20251001"
|
|
93
93
|
];
|
|
94
94
|
CODEX_MODELS = [
|
|
95
|
+
"gpt-5.4",
|
|
96
|
+
"gpt-5.4-pro",
|
|
95
97
|
"gpt-5.3-codex",
|
|
96
98
|
"gpt-5.3-codex-spark",
|
|
97
99
|
"gpt-5.2-codex",
|
|
@@ -8178,6 +8180,9 @@ import { join as join16 } from "node:path";
|
|
|
8178
8180
|
function buildExecutionPrompt(ctx) {
|
|
8179
8181
|
const sections = [];
|
|
8180
8182
|
sections.push(buildSystemContext(ctx.projectRoot));
|
|
8183
|
+
const skills = buildSkillsContext(ctx.projectRoot);
|
|
8184
|
+
if (skills)
|
|
8185
|
+
sections.push(skills);
|
|
8181
8186
|
sections.push(buildTaskContext(ctx.issue, ctx.issueComments));
|
|
8182
8187
|
if (ctx.sprintContext || ctx.sprintPosition) {
|
|
8183
8188
|
sections.push(buildSprintContext(ctx.sprintName, ctx.sprintPosition, ctx.sprintContext));
|
|
@@ -8193,6 +8198,9 @@ function buildExecutionPrompt(ctx) {
|
|
|
8193
8198
|
function buildFeedbackPrompt(ctx) {
|
|
8194
8199
|
const sections = [];
|
|
8195
8200
|
sections.push(buildSystemContext(ctx.projectRoot));
|
|
8201
|
+
const skills = buildSkillsContext(ctx.projectRoot);
|
|
8202
|
+
if (skills)
|
|
8203
|
+
sections.push(skills);
|
|
8196
8204
|
sections.push(buildTaskContext(ctx.issue));
|
|
8197
8205
|
sections.push(buildPRContext(ctx.prNumber, ctx.prDiff, ctx.prComments));
|
|
8198
8206
|
sections.push(buildFeedbackInstructions());
|
|
@@ -8397,6 +8405,55 @@ function buildFeedbackInstructions() {
|
|
|
8397
8405
|
6. When done, summarize what you changed in response to each comment.
|
|
8398
8406
|
</instructions>`;
|
|
8399
8407
|
}
|
|
8408
|
+
function buildSkillsContext(projectRoot) {
|
|
8409
|
+
const skillsDir = join16(projectRoot, CLAUDE_SKILLS_DIR);
|
|
8410
|
+
if (!existsSync16(skillsDir))
|
|
8411
|
+
return null;
|
|
8412
|
+
let dirs;
|
|
8413
|
+
try {
|
|
8414
|
+
dirs = readdirSync4(skillsDir, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name);
|
|
8415
|
+
} catch {
|
|
8416
|
+
return null;
|
|
8417
|
+
}
|
|
8418
|
+
if (dirs.length === 0)
|
|
8419
|
+
return null;
|
|
8420
|
+
const entries = [];
|
|
8421
|
+
for (const dir of dirs) {
|
|
8422
|
+
const skillPath = join16(skillsDir, dir, "SKILL.md");
|
|
8423
|
+
const content = readFileSafe(skillPath);
|
|
8424
|
+
if (!content)
|
|
8425
|
+
continue;
|
|
8426
|
+
const fm = parseFrontmatter(content);
|
|
8427
|
+
const name = fm.name || dir;
|
|
8428
|
+
const description = fm.description || "";
|
|
8429
|
+
entries.push(`- **${name}**: ${description}`);
|
|
8430
|
+
}
|
|
8431
|
+
if (entries.length === 0)
|
|
8432
|
+
return null;
|
|
8433
|
+
return `<installed-skills>
|
|
8434
|
+
The following skills are installed in this project. If a skill is relevant to the current task, read its full instructions from \`.claude/skills/<name>/SKILL.md\` before starting work.
|
|
8435
|
+
|
|
8436
|
+
${entries.join(`
|
|
8437
|
+
`)}
|
|
8438
|
+
</installed-skills>`;
|
|
8439
|
+
}
|
|
8440
|
+
function parseFrontmatter(content) {
|
|
8441
|
+
const result = {};
|
|
8442
|
+
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
8443
|
+
if (!match)
|
|
8444
|
+
return result;
|
|
8445
|
+
for (const line of match[1].split(`
|
|
8446
|
+
`)) {
|
|
8447
|
+
const idx = line.indexOf(":");
|
|
8448
|
+
if (idx === -1)
|
|
8449
|
+
continue;
|
|
8450
|
+
const key = line.slice(0, idx).trim();
|
|
8451
|
+
const val = line.slice(idx + 1).trim();
|
|
8452
|
+
if (key && val)
|
|
8453
|
+
result[key] = val;
|
|
8454
|
+
}
|
|
8455
|
+
return result;
|
|
8456
|
+
}
|
|
8400
8457
|
function readFileSafe(path) {
|
|
8401
8458
|
try {
|
|
8402
8459
|
if (!existsSync16(path))
|
|
@@ -14371,12 +14428,14 @@ async function convertToPlan(projectRoot, name) {
|
|
|
14371
14428
|
await runPlanConversion(projectRoot, result.info.name);
|
|
14372
14429
|
}
|
|
14373
14430
|
async function runPlanConversion(projectRoot, artifactName) {
|
|
14374
|
-
const {
|
|
14431
|
+
const { planCommand: planCommand2 } = await Promise.resolve().then(() => (init_plan(), exports_plan));
|
|
14375
14432
|
process.stderr.write(`
|
|
14376
14433
|
${bold2("Converting artifact to plan:")} ${cyan2(artifactName)}
|
|
14377
14434
|
|
|
14378
14435
|
`);
|
|
14379
|
-
await
|
|
14436
|
+
await planCommand2(projectRoot, [
|
|
14437
|
+
`Create a plan according to ${artifactName}`
|
|
14438
|
+
]);
|
|
14380
14439
|
}
|
|
14381
14440
|
var init_artifacts = __esm(() => {
|
|
14382
14441
|
init_terminal();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/cli",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.6",
|
|
4
4
|
"description": "GitHub-native AI engineering assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@locusai/sdk": "^0.25.
|
|
39
|
+
"@locusai/sdk": "^0.25.6",
|
|
40
40
|
"@types/bun": "latest",
|
|
41
41
|
"typescript": "^5.8.3"
|
|
42
42
|
},
|