ralphctl 0.1.4 → 0.2.1

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.
Files changed (28) hide show
  1. package/README.md +23 -14
  2. package/dist/{add-7LBVENXM.mjs → add-SEDQ3VK7.mjs} +4 -4
  3. package/dist/{add-DVEYDCTR.mjs → add-TGJTRHIF.mjs} +3 -3
  4. package/dist/{chunk-M7JV6MKD.mjs → chunk-AXNZMHFQ.mjs} +384 -96
  5. package/dist/{chunk-LFDW6MWF.mjs → chunk-KPTPKLXY.mjs} +16 -3
  6. package/dist/{chunk-PDI6HBZ7.mjs → chunk-LG6B7QVO.mjs} +1 -1
  7. package/dist/{chunk-YIB7QYU4.mjs → chunk-Q3VWJARJ.mjs} +2 -2
  8. package/dist/{chunk-F2MMCTB5.mjs → chunk-XPDI4SYI.mjs} +5 -4
  9. package/dist/{chunk-DZ6HHTM5.mjs → chunk-XQHEKKDN.mjs} +1 -1
  10. package/dist/{chunk-W3TY22IS.mjs → chunk-ZDEVRTGY.mjs} +10 -3
  11. package/dist/cli.mjs +174 -65
  12. package/dist/{create-MQ4OHZAX.mjs → create-DJHCP7LN.mjs} +3 -3
  13. package/dist/{handle-K2AZLTKU.mjs → handle-CCTBNAJZ.mjs} +1 -1
  14. package/dist/{project-Q4LKML42.mjs → project-ZYGNPVGL.mjs} +2 -2
  15. package/dist/prompts/ideate-auto.md +3 -2
  16. package/dist/prompts/ideate.md +2 -2
  17. package/dist/prompts/plan-auto.md +11 -8
  18. package/dist/prompts/plan-common.md +13 -8
  19. package/dist/prompts/plan-interactive.md +11 -10
  20. package/dist/prompts/task-evaluation.md +54 -0
  21. package/dist/prompts/task-execution.md +7 -5
  22. package/dist/{resolver-NH34HTB6.mjs → resolver-L52KR4GY.mjs} +2 -2
  23. package/dist/{sprint-UHYXSEBJ.mjs → sprint-LUXAV3Q3.mjs} +2 -2
  24. package/dist/{wizard-MCDDXLGE.mjs → wizard-TFJXEYD2.mjs} +6 -6
  25. package/package.json +17 -14
  26. package/schemas/config.schema.json +10 -0
  27. package/schemas/projects.schema.json +5 -0
  28. package/schemas/tasks.schema.json +9 -0
@@ -21,7 +21,7 @@ import {
21
21
  readValidatedJson,
22
22
  removeDir,
23
23
  writeValidatedJson
24
- } from "./chunk-W3TY22IS.mjs";
24
+ } from "./chunk-ZDEVRTGY.mjs";
25
25
  import {
26
26
  LockError,
27
27
  NoCurrentSprintError,
@@ -34,6 +34,7 @@ import {
34
34
  } from "./chunk-QBXHAXHI.mjs";
35
35
 
36
36
  // src/store/config.ts
37
+ var DEFAULT_EVALUATION_ITERATIONS = 1;
37
38
  var DEFAULT_CONFIG = {
38
39
  currentSprint: null,
39
40
  aiProvider: null,
@@ -76,6 +77,15 @@ async function setEditor(editor) {
76
77
  config.editor = editor;
77
78
  await saveConfig(config);
78
79
  }
80
+ async function getEvaluationIterations() {
81
+ const config = await getConfig();
82
+ return config.evaluationIterations ?? DEFAULT_EVALUATION_ITERATIONS;
83
+ }
84
+ async function setEvaluationIterations(iterations) {
85
+ const config = await getConfig();
86
+ config.evaluationIterations = iterations;
87
+ await saveConfig(config);
88
+ }
79
89
 
80
90
  // src/utils/ids.ts
81
91
  import { randomBytes } from "crypto";
@@ -466,14 +476,14 @@ async function deleteSprint(sprintId) {
466
476
  async function getCurrentSprintOrThrow() {
467
477
  const currentSprintId = await getCurrentSprint();
468
478
  if (!currentSprintId) {
469
- throw new Error('No current sprint. Use "ralphctl sprint create" to create one.');
479
+ throw new NoCurrentSprintError();
470
480
  }
471
481
  return getSprint(currentSprintId);
472
482
  }
473
483
  async function getActiveSprintOrThrow() {
474
484
  const activeSprint = await findActiveSprint();
475
485
  if (!activeSprint) {
476
- throw new Error('No active sprint. Use "ralphctl sprint start" to start a draft sprint.');
486
+ throw new NoCurrentSprintError();
477
487
  }
478
488
  return activeSprint;
479
489
  }
@@ -489,6 +499,7 @@ async function resolveSprintId(sprintId) {
489
499
  }
490
500
 
491
501
  export {
502
+ DEFAULT_EVALUATION_ITERATIONS,
492
503
  getConfig,
493
504
  getCurrentSprint,
494
505
  setCurrentSprint,
@@ -496,6 +507,8 @@ export {
496
507
  setAiProvider,
497
508
  getEditor,
498
509
  setEditor,
510
+ getEvaluationIterations,
511
+ setEvaluationIterations,
499
512
  generateUuid8,
500
513
  withFileLock,
501
514
  logProgress,
@@ -7,7 +7,7 @@ import {
7
7
  readValidatedJson,
8
8
  validateProjectPath,
9
9
  writeValidatedJson
10
- } from "./chunk-W3TY22IS.mjs";
10
+ } from "./chunk-ZDEVRTGY.mjs";
11
11
  import {
12
12
  ParseError,
13
13
  ProjectExistsError,
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-7TG3EAQ2.mjs";
9
9
  import {
10
10
  createProject
11
- } from "./chunk-PDI6HBZ7.mjs";
11
+ } from "./chunk-LG6B7QVO.mjs";
12
12
  import {
13
13
  ensureError,
14
14
  wrapAsync
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  expandTilde,
18
18
  validateProjectPath
19
- } from "./chunk-W3TY22IS.mjs";
19
+ } from "./chunk-ZDEVRTGY.mjs";
20
20
  import {
21
21
  IOError,
22
22
  ProjectExistsError
@@ -6,14 +6,14 @@ import {
6
6
  import {
7
7
  listProjects,
8
8
  projectExists
9
- } from "./chunk-PDI6HBZ7.mjs";
9
+ } from "./chunk-LG6B7QVO.mjs";
10
10
  import {
11
11
  assertSprintStatus,
12
12
  generateUuid8,
13
13
  getEditor,
14
14
  resolveSprintId,
15
15
  setEditor
16
- } from "./chunk-LFDW6MWF.mjs";
16
+ } from "./chunk-KPTPKLXY.mjs";
17
17
  import {
18
18
  ensureError,
19
19
  unwrapOrThrow,
@@ -24,10 +24,11 @@ import {
24
24
  getSprintFilePath,
25
25
  readValidatedJson,
26
26
  writeValidatedJson
27
- } from "./chunk-W3TY22IS.mjs";
27
+ } from "./chunk-ZDEVRTGY.mjs";
28
28
  import {
29
29
  IOError,
30
30
  IssueFetchError,
31
+ ProjectNotFoundError,
31
32
  SprintStatusError,
32
33
  TicketNotFoundError
33
34
  } from "./chunk-EDJX7TT6.mjs";
@@ -128,7 +129,7 @@ async function addTicket(input2, sprintId) {
128
129
  const sprint = await getSprintData(sprintId);
129
130
  assertSprintStatus(sprint, ["draft"], "add tickets");
130
131
  if (!await projectExists(input2.projectName)) {
131
- throw new Error(`Project '${input2.projectName}' does not exist. Add it first with 'ralphctl project add'.`);
132
+ throw new ProjectNotFoundError(input2.projectName);
132
133
  }
133
134
  const ticket = {
134
135
  id: generateUuid8(),
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createSprint,
4
4
  setCurrentSprint
5
- } from "./chunk-LFDW6MWF.mjs";
5
+ } from "./chunk-KPTPKLXY.mjs";
6
6
  import {
7
7
  emoji,
8
8
  field,
@@ -201,8 +201,10 @@ var RepositorySchema = z.object({
201
201
  // Auto-derived from basename(path)
202
202
  path: z.string().min(1),
203
203
  // Absolute path
204
- checkScript: z.string().optional()
204
+ checkScript: z.string().optional(),
205
205
  // e.g., "pnpm install && pnpm typecheck && pnpm lint && pnpm test"
206
+ checkTimeout: z.number().positive().optional()
207
+ // Per-repo timeout in ms (overrides RALPHCTL_SETUP_TIMEOUT_MS)
206
208
  });
207
209
  var ProjectSchema = z.object({
208
210
  name: z.string().min(1).regex(/^[a-z0-9-]+$/, "Project name must be a slug (lowercase, numbers, hyphens only)"),
@@ -240,8 +242,12 @@ var TaskSchema = z.object({
240
242
  // Single path for execution
241
243
  verified: z.boolean().default(false),
242
244
  // Whether verification passed
243
- verificationOutput: z.string().optional()
245
+ verificationOutput: z.string().optional(),
244
246
  // Output from verification run
247
+ evaluated: z.boolean().default(false),
248
+ // Whether evaluation passed
249
+ evaluationOutput: z.string().optional()
250
+ // Output from evaluation run
245
251
  });
246
252
  var TasksSchema = z.array(TaskSchema);
247
253
  var ImportTaskSchema = z.object({
@@ -281,7 +287,8 @@ var AiProviderSchema = z.enum(["claude", "copilot"]);
281
287
  var ConfigSchema = z.object({
282
288
  currentSprint: z.string().nullable().default(null),
283
289
  aiProvider: AiProviderSchema.nullable().default(null),
284
- editor: z.string().nullable().default(null)
290
+ editor: z.string().nullable().default(null),
291
+ evaluationIterations: z.number().int().min(0).optional()
285
292
  });
286
293
 
287
294
  export {