@locusai/cli 0.17.9 → 0.17.10
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 +11 -8
- package/package.json +1 -1
package/bin/locus.js
CHANGED
|
@@ -7709,7 +7709,7 @@ ${bold("locus plan")} — AI-powered sprint planning
|
|
|
7709
7709
|
|
|
7710
7710
|
${bold("Usage:")}
|
|
7711
7711
|
locus plan "<directive>" ${dim("# AI creates a plan file")}
|
|
7712
|
-
locus plan approve <id>
|
|
7712
|
+
locus plan approve <id> [--sprint <name>] ${dim("# Create GitHub issues from saved plan")}
|
|
7713
7713
|
locus plan list ${dim("# List saved plans")}
|
|
7714
7714
|
locus plan show <id> ${dim("# Show a saved plan")}
|
|
7715
7715
|
locus plan --from-issues --sprint <name> ${dim("# Organize existing issues")}
|
|
@@ -7723,6 +7723,7 @@ ${bold("Examples:")}
|
|
|
7723
7723
|
locus plan "Build user authentication with OAuth"
|
|
7724
7724
|
locus plan "Improve API performance" --sprint "Sprint 3"
|
|
7725
7725
|
locus plan approve abc123
|
|
7726
|
+
locus plan approve abc123 --sprint "Sprint 3"
|
|
7726
7727
|
locus plan list
|
|
7727
7728
|
locus plan --from-issues --sprint "Sprint 2"
|
|
7728
7729
|
|
|
@@ -7771,7 +7772,8 @@ async function planCommand(projectRoot, args, flags = {}) {
|
|
|
7771
7772
|
return handleShowPlan(projectRoot, args[1]);
|
|
7772
7773
|
}
|
|
7773
7774
|
if (args[0] === "approve") {
|
|
7774
|
-
|
|
7775
|
+
const approveArgs = parsePlanArgs(args.slice(2));
|
|
7776
|
+
return handleApprovePlan(projectRoot, args[1], { ...flags, dryRun: flags.dryRun || approveArgs.dryRun }, approveArgs.sprintName);
|
|
7775
7777
|
}
|
|
7776
7778
|
const parsedArgs = parsePlanArgs(args);
|
|
7777
7779
|
if (parsedArgs.error) {
|
|
@@ -7870,11 +7872,11 @@ ${bold("Plan:")} ${cyan(plan.directive)}
|
|
|
7870
7872
|
}
|
|
7871
7873
|
process.stderr.write(`
|
|
7872
7874
|
`);
|
|
7873
|
-
process.stderr.write(` Approve: ${bold(`locus plan approve ${plan.id.slice(0, 8)}`)}
|
|
7875
|
+
process.stderr.write(` Approve: ${bold(`locus plan approve ${plan.id.slice(0, 8)}`)} ${dim("(--sprint <name> to assign to a sprint)")}
|
|
7874
7876
|
|
|
7875
7877
|
`);
|
|
7876
7878
|
}
|
|
7877
|
-
async function handleApprovePlan(projectRoot, id, flags) {
|
|
7879
|
+
async function handleApprovePlan(projectRoot, id, flags, sprintOverride) {
|
|
7878
7880
|
if (!id) {
|
|
7879
7881
|
process.stderr.write(`${red("✗")} Please provide a plan ID.
|
|
7880
7882
|
`);
|
|
@@ -7898,11 +7900,12 @@ async function handleApprovePlan(projectRoot, id, flags) {
|
|
|
7898
7900
|
return;
|
|
7899
7901
|
}
|
|
7900
7902
|
const config = loadConfig(projectRoot);
|
|
7903
|
+
const sprintName = sprintOverride ?? plan.sprint ?? undefined;
|
|
7901
7904
|
process.stderr.write(`
|
|
7902
|
-
${bold("Approving plan:")}
|
|
7905
|
+
${bold("Approving plan:")}
|
|
7903
7906
|
`);
|
|
7904
|
-
if (
|
|
7905
|
-
process.stderr.write(` ${dim(`Sprint: ${
|
|
7907
|
+
if (sprintName) {
|
|
7908
|
+
process.stderr.write(` ${dim(`Sprint: ${sprintName}`)}
|
|
7906
7909
|
`);
|
|
7907
7910
|
}
|
|
7908
7911
|
process.stderr.write(`
|
|
@@ -7921,7 +7924,7 @@ ${bold("Approving plan:")} ${cyan(plan.directive)}
|
|
|
7921
7924
|
`);
|
|
7922
7925
|
return;
|
|
7923
7926
|
}
|
|
7924
|
-
await createPlannedIssues(projectRoot, config, plan.issues,
|
|
7927
|
+
await createPlannedIssues(projectRoot, config, plan.issues, sprintName);
|
|
7925
7928
|
}
|
|
7926
7929
|
async function handleAIPlan(projectRoot, config, directive, sprintName, flags) {
|
|
7927
7930
|
const id = generateId();
|