ralphctl 0.4.1 → 0.4.3

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 (36) hide show
  1. package/README.md +13 -11
  2. package/dist/{add-CIM72NE3.mjs → add-MG26JWBP.mjs} +6 -6
  3. package/dist/{add-GX7P7XTT.mjs → add-ZZYL4BSF.mjs} +5 -4
  4. package/dist/chunk-2FT37OZX.mjs +1071 -0
  5. package/dist/{chunk-CTP2A436.mjs → chunk-D2HWXEHH.mjs} +9 -2
  6. package/dist/{chunk-JOQO4HMM.mjs → chunk-EGUFQNRB.mjs} +10 -10
  7. package/dist/{chunk-3HJNVQ7N.mjs → chunk-LCY32RW4.mjs} +621 -976
  8. package/dist/{chunk-NUYQK5MN.mjs → chunk-LDSG7G2T.mjs} +1 -1
  9. package/dist/{chunk-7JLZQICD.mjs → chunk-MDE6KPJQ.mjs} +6 -6
  10. package/dist/{chunk-3QBEBKMZ.mjs → chunk-Q4AVHUZL.mjs} +7 -7
  11. package/dist/{chunk-YCDUVPRT.mjs → chunk-RQGD5WS6.mjs} +4 -72
  12. package/dist/{chunk-D2YGPLIV.mjs → chunk-TDBEEHTS.mjs} +213 -8
  13. package/dist/{chunk-SM4GGZSU.mjs → chunk-WOMGKKZY.mjs} +152 -179
  14. package/dist/{chunk-FKMKOWLA.mjs → chunk-WZTY77GY.mjs} +75 -1
  15. package/dist/cli.mjs +68 -19
  16. package/dist/{create-7WFSCMP4.mjs → create-PQK6KKRD.mjs} +5 -5
  17. package/dist/{handle-BBAZJ44Y.mjs → handle-SYVCFI6Y.mjs} +1 -1
  18. package/dist/{mount-2N6H5CWA.mjs → mount-2ANLHHQE.mjs} +556 -318
  19. package/dist/{project-2IE7VWDB.mjs → project-JF47ZWMF.mjs} +2 -2
  20. package/dist/prompts/check-script-discover.md +69 -0
  21. package/dist/prompts/ideate-auto.md +26 -1
  22. package/dist/prompts/ideate.md +5 -1
  23. package/dist/prompts/plan-auto.md +30 -2
  24. package/dist/prompts/plan-common-examples.md +82 -0
  25. package/dist/prompts/plan-common.md +26 -78
  26. package/dist/prompts/plan-interactive.md +6 -2
  27. package/dist/prompts/repo-onboard.md +111 -0
  28. package/dist/prompts/sprint-feedback.md +6 -2
  29. package/dist/prompts/task-evaluation.md +25 -10
  30. package/dist/prompts/task-execution.md +13 -13
  31. package/dist/prompts/ticket-refine.md +4 -0
  32. package/dist/prompts/validation-checklist.md +4 -0
  33. package/dist/{resolver-EOE5WUMV.mjs → resolver-PG2DZEBX.mjs} +3 -3
  34. package/dist/{sprint-OGOFEJJH.mjs → sprint-54DOSIJK.mjs} +3 -3
  35. package/dist/{start-IUDCXIEA.mjs → start-2SZTBKGF.mjs} +7 -5
  36. package/package.json +6 -6
@@ -195,6 +195,7 @@ var TaskStatusSchema = z.enum(["todo", "in_progress", "done"]);
195
195
  var RequirementStatusSchema = z.enum(["pending", "approved"]);
196
196
  var EvaluationStatusSchema = z.enum(["passed", "failed", "malformed", "plateau"]);
197
197
  var IdSchema = z.string().min(1);
198
+ var CURRENT_ONBOARDING_VERSION = 1;
198
199
  var RepositorySchema = z.object({
199
200
  id: IdSchema,
200
201
  // UUID8, stable across renames
@@ -204,8 +205,12 @@ var RepositorySchema = z.object({
204
205
  // Absolute path
205
206
  checkScript: z.string().optional(),
206
207
  // e.g., "pnpm install && pnpm typecheck && pnpm lint && pnpm test"
207
- checkTimeout: z.number().positive().optional()
208
+ checkTimeout: z.number().positive().optional(),
208
209
  // Per-repo timeout in ms (overrides RALPHCTL_SETUP_TIMEOUT_MS)
210
+ // Stamped by `project onboard` on success. Absence means the repo was never
211
+ // onboarded; `doctor` surfaces a hint. A value < CURRENT_ONBOARDING_VERSION
212
+ // means the contract has drifted and re-onboarding is recommended.
213
+ onboardingVersion: z.number().int().nonnegative().optional()
209
214
  });
210
215
  var ProjectSchema = z.object({
211
216
  id: IdSchema,
@@ -290,7 +295,8 @@ var ConfigSchema = z.object({
290
295
  currentSprint: z.string().nullable().default(null),
291
296
  aiProvider: AiProviderSchema.nullable().default(null),
292
297
  editor: z.string().nullable().default(null),
293
- evaluationIterations: z.number().int().min(0).optional()
298
+ evaluationIterations: z.number().int().min(0).optional(),
299
+ aiCheckScriptDiscovery: z.boolean().optional()
294
300
  });
295
301
  function getRequirementsOutputJsonSchema() {
296
302
  return JSON.stringify(z.toJSONSchema(RefinedRequirementsSchema), null, 2);
@@ -342,6 +348,7 @@ export {
342
348
  SprintStatusSchema,
343
349
  TaskStatusSchema,
344
350
  RequirementStatusSchema,
351
+ CURRENT_ONBOARDING_VERSION,
345
352
  ProjectsSchema,
346
353
  TasksSchema,
347
354
  ImportTasksSchema,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  assertSprintStatus,
4
4
  resolveSprintId
5
- } from "./chunk-YCDUVPRT.mjs";
5
+ } from "./chunk-RQGD5WS6.mjs";
6
6
  import {
7
7
  unwrapOrThrow
8
8
  } from "./chunk-IWXBJD2D.mjs";
@@ -12,12 +12,19 @@ import {
12
12
  getSprintFilePath,
13
13
  readValidatedJson,
14
14
  writeValidatedJson
15
- } from "./chunk-CTP2A436.mjs";
15
+ } from "./chunk-D2HWXEHH.mjs";
16
16
  import {
17
17
  IssueFetchError,
18
18
  TicketNotFoundError
19
19
  } from "./chunk-57UWLHRH.mjs";
20
20
 
21
+ // src/domain/strings.ts
22
+ function truncate(str, max) {
23
+ if (str.length <= max) return str;
24
+ if (max <= 1) return "\u2026".slice(0, Math.max(0, max));
25
+ return str.slice(0, max - 1) + "\u2026";
26
+ }
27
+
21
28
  // src/integration/persistence/ticket.ts
22
29
  async function getSprintData(sprintId) {
23
30
  const id = await resolveSprintId(sprintId);
@@ -99,13 +106,6 @@ function formatTicketDisplay(ticket) {
99
106
  return `[${ticket.id}] ${ticket.title}`;
100
107
  }
101
108
 
102
- // src/domain/strings.ts
103
- function truncate(str, max) {
104
- if (str.length <= max) return str;
105
- if (max <= 1) return "\u2026".slice(0, Math.max(0, max));
106
- return str.slice(0, max - 1) + "\u2026";
107
- }
108
-
109
109
  // src/integration/external/issue-fetch.ts
110
110
  import { spawnSync } from "child_process";
111
111
  import { Result } from "typescript-result";
@@ -255,6 +255,7 @@ function formatIssueContext(data) {
255
255
  }
256
256
 
257
257
  export {
258
+ truncate,
258
259
  addTicket,
259
260
  updateTicket,
260
261
  removeTicket,
@@ -263,7 +264,6 @@ export {
263
264
  allRequirementsApproved,
264
265
  getPendingRequirements,
265
266
  formatTicketDisplay,
266
- truncate,
267
267
  fetchIssueFromUrl,
268
268
  formatIssueContext
269
269
  };