ralphctl 0.4.2 → 0.4.4
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/README.md +13 -11
- package/dist/{add-CIM72NE3.mjs → add-DVPVHENV.mjs} +7 -7
- package/dist/{add-GX7P7XTT.mjs → add-YVXM34RP.mjs} +6 -5
- package/dist/{chunk-GL7MKLLS.mjs → chunk-ACRMBVEE.mjs} +458 -181
- package/dist/{chunk-NUYQK5MN.mjs → chunk-BSB4EDGR.mjs} +2 -2
- package/dist/{chunk-YCDUVPRT.mjs → chunk-CBMFRQ4Y.mjs} +5 -73
- package/dist/{chunk-3QBEBKMZ.mjs → chunk-FNAAA32W.mjs} +7 -7
- package/dist/{chunk-JOQO4HMM.mjs → chunk-GQ2WFKBN.mjs} +11 -11
- package/dist/{chunk-TKPTT2UG.mjs → chunk-OFILN7QL.mjs} +798 -1023
- package/dist/{chunk-7JLZQICD.mjs → chunk-OGEXYSFS.mjs} +7 -7
- package/dist/{chunk-D2YGPLIV.mjs → chunk-PYZEQ2VK.mjs} +214 -9
- package/dist/{chunk-57UWLHRH.mjs → chunk-VAZ3LJBI.mjs} +12 -1
- package/dist/{chunk-CTP2A436.mjs → chunk-WDMLPXOD.mjs} +11 -4
- package/dist/{chunk-FKMKOWLA.mjs → chunk-XN2UIHBY.mjs} +84 -3
- package/dist/chunk-ZLWSPLWI.mjs +1117 -0
- package/dist/cli.mjs +72 -21
- package/dist/create-Z635FQKO.mjs +15 -0
- package/dist/{handle-BBAZJ44Y.mjs → handle-23EFF3BE.mjs} +1 -1
- package/dist/{mount-ISHZM36X.mjs → mount-VEV3TESX.mjs} +1702 -1202
- package/dist/{project-2IE7VWDB.mjs → project-DQHF4ISP.mjs} +3 -3
- package/dist/prompts/check-script-discover.md +69 -0
- package/dist/prompts/repo-onboard.md +111 -0
- package/dist/prompts/sprint-feedback.md +4 -0
- package/dist/prompts/task-evaluation.md +44 -2
- package/dist/prompts/task-execution.md +5 -0
- package/dist/{resolver-EOE5WUMV.mjs → resolver-OVPYVW6Q.mjs} +4 -4
- package/dist/{sprint-OGOFEJJH.mjs → sprint-4E26AB5F.mjs} +4 -4
- package/dist/start-2WH4BTDB.mjs +19 -0
- package/package.json +6 -6
- package/dist/create-7WFSCMP4.mjs +0 -15
- package/dist/start-76JKJQIH.mjs +0 -17
package/dist/cli.mjs
CHANGED
|
@@ -41,35 +41,39 @@ import {
|
|
|
41
41
|
ticketRefineCommand,
|
|
42
42
|
ticketRemoveCommand,
|
|
43
43
|
ticketShowCommand
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-ACRMBVEE.mjs";
|
|
45
45
|
import {
|
|
46
46
|
projectAddCommand
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-PYZEQ2VK.mjs";
|
|
48
48
|
import {
|
|
49
49
|
sprintCreateCommand
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-FNAAA32W.mjs";
|
|
51
51
|
import {
|
|
52
52
|
ticketAddCommand
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import "./chunk-NUYQK5MN.mjs";
|
|
53
|
+
} from "./chunk-OGEXYSFS.mjs";
|
|
55
54
|
import {
|
|
55
|
+
createOnboardPipeline,
|
|
56
|
+
executePipeline,
|
|
56
57
|
getTasks,
|
|
57
58
|
sprintStartCommand
|
|
58
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-OFILN7QL.mjs";
|
|
60
|
+
import "./chunk-ZLWSPLWI.mjs";
|
|
59
61
|
import {
|
|
60
62
|
truncate
|
|
61
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-GQ2WFKBN.mjs";
|
|
62
64
|
import {
|
|
63
|
-
EXIT_ERROR
|
|
65
|
+
EXIT_ERROR,
|
|
66
|
+
exitWithCode
|
|
64
67
|
} from "./chunk-CFUVE2BP.mjs";
|
|
65
68
|
import {
|
|
69
|
+
getSharedDeps,
|
|
66
70
|
setSharedDeps
|
|
67
71
|
} from "./chunk-747KW2RW.mjs";
|
|
72
|
+
import "./chunk-BSB4EDGR.mjs";
|
|
68
73
|
import {
|
|
69
74
|
getCurrentSprintOrThrow,
|
|
70
|
-
getSprint
|
|
71
|
-
|
|
72
|
-
} from "./chunk-YCDUVPRT.mjs";
|
|
75
|
+
getSprint
|
|
76
|
+
} from "./chunk-CBMFRQ4Y.mjs";
|
|
73
77
|
import {
|
|
74
78
|
colors,
|
|
75
79
|
error,
|
|
@@ -78,9 +82,10 @@ import {
|
|
|
78
82
|
log,
|
|
79
83
|
printBanner,
|
|
80
84
|
printHeader,
|
|
85
|
+
setCurrentSprint,
|
|
81
86
|
showError,
|
|
82
87
|
showSuccess
|
|
83
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-XN2UIHBY.mjs";
|
|
84
89
|
import {
|
|
85
90
|
ensureError,
|
|
86
91
|
wrapAsync
|
|
@@ -88,14 +93,50 @@ import {
|
|
|
88
93
|
import {
|
|
89
94
|
ensureDir,
|
|
90
95
|
getDataDir
|
|
91
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-WDMLPXOD.mjs";
|
|
92
97
|
import {
|
|
93
98
|
DomainError
|
|
94
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-VAZ3LJBI.mjs";
|
|
95
100
|
|
|
96
101
|
// src/application/entrypoint.ts
|
|
97
102
|
import { Command } from "commander";
|
|
98
103
|
|
|
104
|
+
// src/integration/cli/commands/project/onboard.ts
|
|
105
|
+
async function projectOnboardCommand(options) {
|
|
106
|
+
const shared = getSharedDeps();
|
|
107
|
+
const pipeline = createOnboardPipeline(shared, options);
|
|
108
|
+
const initialContext = {
|
|
109
|
+
sprintId: "",
|
|
110
|
+
projectName: options.project
|
|
111
|
+
};
|
|
112
|
+
const result = await executePipeline(pipeline, initialContext);
|
|
113
|
+
if (!result.ok) {
|
|
114
|
+
showError(`Onboarding failed: ${result.error.message}`);
|
|
115
|
+
exitWithCode(EXIT_ERROR);
|
|
116
|
+
}
|
|
117
|
+
const ctx = result.value.context;
|
|
118
|
+
if (options.dryRun) {
|
|
119
|
+
shared.logger.info("Dry run \u2014 no files written.");
|
|
120
|
+
if (ctx.agentsMdDraft) {
|
|
121
|
+
shared.logger.info(
|
|
122
|
+
`Project context file draft (${String(ctx.agentsMdDraft.split("\n").length)} lines) ready for review.`
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (ctx.alreadyCurrent) {
|
|
128
|
+
shared.logger.info("Already up to date \u2014 no changes needed.");
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const fields = [];
|
|
132
|
+
if (ctx.writtenPath) fields.push(["Project context file", ctx.writtenPath]);
|
|
133
|
+
if (ctx.checkScriptFinal) fields.push(["Check script", ctx.checkScriptFinal]);
|
|
134
|
+
if (ctx.driftWarnings && ctx.driftWarnings.length > 0) {
|
|
135
|
+
fields.push(["Warnings", ctx.driftWarnings.join("; ")]);
|
|
136
|
+
}
|
|
137
|
+
showSuccess("Repository onboarded", fields);
|
|
138
|
+
}
|
|
139
|
+
|
|
99
140
|
// src/integration/cli/commands/project/register.ts
|
|
100
141
|
function registerProjectCommands(program2) {
|
|
101
142
|
const project = program2.command("project").description("Manage projects");
|
|
@@ -123,6 +164,14 @@ Examples:
|
|
|
123
164
|
}
|
|
124
165
|
);
|
|
125
166
|
project.command("list").description("List all projects").action(projectListCommand);
|
|
167
|
+
project.command("onboard <project-name>").description("AI-assisted per-repo onboarding (project context file + check script)").option("--repo <name>", "Target repository (required when project has multiple repos)").option("--dry-run", "Generate the proposal but do not write files").option("--auto", "Skip interactive review; accept the AI proposal as-is").action(async (projectName, opts) => {
|
|
168
|
+
await projectOnboardCommand({
|
|
169
|
+
project: projectName,
|
|
170
|
+
repo: opts.repo,
|
|
171
|
+
dryRun: opts.dryRun === true,
|
|
172
|
+
auto: opts.auto === true
|
|
173
|
+
});
|
|
174
|
+
});
|
|
126
175
|
project.command("show [name]").description("Show project details").action(async (name) => {
|
|
127
176
|
await projectShowCommand(name ? [name] : []);
|
|
128
177
|
});
|
|
@@ -333,7 +382,7 @@ Examples:
|
|
|
333
382
|
if (opts?.export) args.push("--export");
|
|
334
383
|
await sprintInsightsCommand(args);
|
|
335
384
|
});
|
|
336
|
-
sprint.command("start [id]").description("Run automated implementation loop").option("-s, --session", "Interactive AI session (collaborate with your AI provider)").option("-t, --step", "Step through tasks with approval between each").option("-c, --count <n>", "Limit to N tasks").option("--no-commit", "Skip automatic git commit after each task completes").option("--concurrency <n>", "Max parallel tasks (default: auto based on unique repos)").option("--max-retries <n>", "Max rate-limit retries per task (default: 5)").option("--fail-fast", "Stop launching new tasks on first failure").option("-f, --force", "Skip precondition checks (e.g., unplanned tickets)").option("--refresh-check", "Force re-run check scripts even if they already ran this sprint").option("-b, --branch", "Create sprint branch (ralphctl/<sprint-id>) in all repos").option("--branch-name <name>", "Use a custom branch name for sprint execution").option("--max-budget-usd <amount>", "Max USD budget per AI task (Claude only)").option("--fallback-model <model>", "Fallback model when primary is overloaded (Claude only)").option("--max-turns <number>", "Max agentic turns per task (Claude only, default: 200)").addHelpText(
|
|
385
|
+
sprint.command("start [id]").description("Run automated implementation loop").option("-s, --session", "Interactive AI session (collaborate with your AI provider)").option("-t, --step", "Step through tasks with approval between each").option("-c, --count <n>", "Limit to N tasks").option("--no-commit", "Skip automatic git commit after each task completes").option("--concurrency <n>", "Max parallel tasks (default: auto based on unique repos)").option("--max-retries <n>", "Max rate-limit retries per task (default: 5)").option("--fail-fast", "Stop launching new tasks on first failure").option("-f, --force", "Skip precondition checks (e.g., unplanned tickets)").option("--refresh-check", "Force re-run check scripts even if they already ran this sprint").option("-b, --branch", "Create sprint branch (ralphctl/<sprint-id>) in all repos").option("--branch-name <name>", "Use a custom branch name for sprint execution").option("--resume-dirty", "Resume with uncommitted changes intact (skips prompt)").option("--reset-on-resume", "Hard-reset working tree to HEAD before resuming (destructive; skips prompt)").option("--max-budget-usd <amount>", "Max USD budget per AI task (Claude only)").option("--fallback-model <model>", "Fallback model when primary is overloaded (Claude only)").option("--max-turns <number>", "Max agentic turns per task (Claude only, default: 200)").addHelpText(
|
|
337
386
|
"after",
|
|
338
387
|
`
|
|
339
388
|
Exit Codes:
|
|
@@ -369,6 +418,8 @@ Branch Management:
|
|
|
369
418
|
if (opts?.refreshCheck) args.push("--refresh-check");
|
|
370
419
|
if (opts?.branch) args.push("--branch");
|
|
371
420
|
if (opts?.branchName) args.push("--branch-name", opts.branchName);
|
|
421
|
+
if (opts?.resumeDirty) args.push("--resume-dirty");
|
|
422
|
+
if (opts?.resetOnResume) args.push("--reset-on-resume");
|
|
372
423
|
if (opts?.maxBudgetUsd) args.push("--max-budget-usd", opts.maxBudgetUsd);
|
|
373
424
|
if (opts?.fallbackModel) args.push("--fallback-model", opts.fallbackModel);
|
|
374
425
|
if (opts?.maxTurns) args.push("--max-turns", opts.maxTurns);
|
|
@@ -698,14 +749,14 @@ function isQuietCommand(argv) {
|
|
|
698
749
|
}
|
|
699
750
|
async function main() {
|
|
700
751
|
if (process.env["COMP_CWORD"] && process.env["COMP_POINT"] && process.env["COMP_LINE"]) {
|
|
701
|
-
const { handleCompletionRequest } = await import("./handle-
|
|
752
|
+
const { handleCompletionRequest } = await import("./handle-23EFF3BE.mjs");
|
|
702
753
|
if (await handleCompletionRequest(program)) return;
|
|
703
754
|
}
|
|
704
755
|
const argv = process.argv;
|
|
705
756
|
const isBare = argv.length <= 2;
|
|
706
757
|
const isInteractive = argv[2] === "interactive";
|
|
707
758
|
if (isBare || isInteractive) {
|
|
708
|
-
const { mountInkApp } = await import("./mount-
|
|
759
|
+
const { mountInkApp } = await import("./mount-VEV3TESX.mjs");
|
|
709
760
|
const { fallback } = await mountInkApp({ initialView: "repl" });
|
|
710
761
|
if (!fallback) return;
|
|
711
762
|
printBanner();
|
|
@@ -716,14 +767,14 @@ async function main() {
|
|
|
716
767
|
return;
|
|
717
768
|
}
|
|
718
769
|
if (argv[2] === "sprint" && argv[3] === "start") {
|
|
719
|
-
const { parseSprintStartArgs } = await import("./start-
|
|
770
|
+
const { parseSprintStartArgs } = await import("./start-2WH4BTDB.mjs");
|
|
720
771
|
const parsed = parseSprintStartArgs(argv.slice(4));
|
|
721
772
|
if (parsed.ok) {
|
|
722
|
-
const { mountInkApp } = await import("./mount-
|
|
723
|
-
const { getSharedDeps } = await import("./bootstrap-FMHG6DRY.mjs");
|
|
773
|
+
const { mountInkApp } = await import("./mount-VEV3TESX.mjs");
|
|
774
|
+
const { getSharedDeps: getSharedDeps2 } = await import("./bootstrap-FMHG6DRY.mjs");
|
|
724
775
|
let sprintId;
|
|
725
776
|
try {
|
|
726
|
-
sprintId = await
|
|
777
|
+
sprintId = await getSharedDeps2().persistence.resolveSprintId(parsed.value.sprintId);
|
|
727
778
|
} catch {
|
|
728
779
|
sprintId = void 0;
|
|
729
780
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
sprintCreateCommand
|
|
4
|
+
} from "./chunk-FNAAA32W.mjs";
|
|
5
|
+
import "./chunk-CFUVE2BP.mjs";
|
|
6
|
+
import "./chunk-747KW2RW.mjs";
|
|
7
|
+
import "./chunk-BSB4EDGR.mjs";
|
|
8
|
+
import "./chunk-CBMFRQ4Y.mjs";
|
|
9
|
+
import "./chunk-XN2UIHBY.mjs";
|
|
10
|
+
import "./chunk-IWXBJD2D.mjs";
|
|
11
|
+
import "./chunk-WDMLPXOD.mjs";
|
|
12
|
+
import "./chunk-VAZ3LJBI.mjs";
|
|
13
|
+
export {
|
|
14
|
+
sprintCreateCommand
|
|
15
|
+
};
|
|
@@ -7,7 +7,7 @@ async function handleCompletionRequest(program) {
|
|
|
7
7
|
return false;
|
|
8
8
|
}
|
|
9
9
|
const tabtab = (await import("tabtab")).default;
|
|
10
|
-
const { resolveCompletions } = await import("./resolver-
|
|
10
|
+
const { resolveCompletions } = await import("./resolver-OVPYVW6Q.mjs");
|
|
11
11
|
const tabEnv = tabtab.parseEnv(env);
|
|
12
12
|
const completions = await resolveCompletions(program, {
|
|
13
13
|
line: tabEnv.line,
|