ralphctl 0.1.0

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 (118) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/LICENSE +21 -0
  3. package/README.md +189 -0
  4. package/bin/ralphctl +13 -0
  5. package/package.json +92 -0
  6. package/schemas/config.schema.json +20 -0
  7. package/schemas/ideate-output.schema.json +22 -0
  8. package/schemas/projects.schema.json +53 -0
  9. package/schemas/requirements-output.schema.json +24 -0
  10. package/schemas/sprint.schema.json +109 -0
  11. package/schemas/task-import.schema.json +49 -0
  12. package/schemas/tasks.schema.json +72 -0
  13. package/src/ai/executor.ts +973 -0
  14. package/src/ai/lifecycle.ts +45 -0
  15. package/src/ai/parser.ts +40 -0
  16. package/src/ai/permissions.ts +207 -0
  17. package/src/ai/process-manager.ts +248 -0
  18. package/src/ai/prompts/ideate-auto.md +144 -0
  19. package/src/ai/prompts/ideate.md +165 -0
  20. package/src/ai/prompts/index.ts +89 -0
  21. package/src/ai/prompts/plan-auto.md +131 -0
  22. package/src/ai/prompts/plan-common.md +157 -0
  23. package/src/ai/prompts/plan-interactive.md +190 -0
  24. package/src/ai/prompts/task-execution.md +159 -0
  25. package/src/ai/prompts/ticket-refine.md +230 -0
  26. package/src/ai/rate-limiter.ts +89 -0
  27. package/src/ai/runner.ts +478 -0
  28. package/src/ai/session.ts +319 -0
  29. package/src/ai/task-context.ts +270 -0
  30. package/src/cli-metadata.ts +7 -0
  31. package/src/cli.ts +65 -0
  32. package/src/commands/completion/index.ts +33 -0
  33. package/src/commands/config/config.ts +58 -0
  34. package/src/commands/config/index.ts +33 -0
  35. package/src/commands/dashboard/dashboard.ts +5 -0
  36. package/src/commands/dashboard/index.ts +6 -0
  37. package/src/commands/doctor/doctor.ts +271 -0
  38. package/src/commands/doctor/index.ts +25 -0
  39. package/src/commands/progress/index.ts +25 -0
  40. package/src/commands/progress/log.ts +64 -0
  41. package/src/commands/progress/show.ts +14 -0
  42. package/src/commands/project/add.ts +336 -0
  43. package/src/commands/project/index.ts +104 -0
  44. package/src/commands/project/list.ts +31 -0
  45. package/src/commands/project/remove.ts +43 -0
  46. package/src/commands/project/repo.ts +118 -0
  47. package/src/commands/project/show.ts +49 -0
  48. package/src/commands/sprint/close.ts +180 -0
  49. package/src/commands/sprint/context.ts +109 -0
  50. package/src/commands/sprint/create.ts +60 -0
  51. package/src/commands/sprint/current.ts +75 -0
  52. package/src/commands/sprint/delete.ts +72 -0
  53. package/src/commands/sprint/health.ts +229 -0
  54. package/src/commands/sprint/ideate.ts +496 -0
  55. package/src/commands/sprint/index.ts +226 -0
  56. package/src/commands/sprint/list.ts +86 -0
  57. package/src/commands/sprint/plan-utils.ts +207 -0
  58. package/src/commands/sprint/plan.ts +549 -0
  59. package/src/commands/sprint/refine.ts +359 -0
  60. package/src/commands/sprint/requirements.ts +58 -0
  61. package/src/commands/sprint/show.ts +140 -0
  62. package/src/commands/sprint/start.ts +119 -0
  63. package/src/commands/sprint/switch.ts +20 -0
  64. package/src/commands/task/add.ts +316 -0
  65. package/src/commands/task/import.ts +150 -0
  66. package/src/commands/task/index.ts +123 -0
  67. package/src/commands/task/list.ts +145 -0
  68. package/src/commands/task/next.ts +45 -0
  69. package/src/commands/task/remove.ts +47 -0
  70. package/src/commands/task/reorder.ts +45 -0
  71. package/src/commands/task/show.ts +111 -0
  72. package/src/commands/task/status.ts +99 -0
  73. package/src/commands/ticket/add.ts +265 -0
  74. package/src/commands/ticket/edit.ts +166 -0
  75. package/src/commands/ticket/index.ts +114 -0
  76. package/src/commands/ticket/list.ts +128 -0
  77. package/src/commands/ticket/refine-utils.ts +89 -0
  78. package/src/commands/ticket/refine.ts +268 -0
  79. package/src/commands/ticket/remove.ts +48 -0
  80. package/src/commands/ticket/show.ts +74 -0
  81. package/src/completion/handle.ts +30 -0
  82. package/src/completion/resolver.ts +241 -0
  83. package/src/interactive/dashboard.ts +268 -0
  84. package/src/interactive/escapable.ts +81 -0
  85. package/src/interactive/file-browser.ts +153 -0
  86. package/src/interactive/index.ts +429 -0
  87. package/src/interactive/menu.ts +403 -0
  88. package/src/interactive/selectors.ts +273 -0
  89. package/src/interactive/wizard.ts +221 -0
  90. package/src/providers/claude.ts +53 -0
  91. package/src/providers/copilot.ts +86 -0
  92. package/src/providers/index.ts +43 -0
  93. package/src/providers/types.ts +85 -0
  94. package/src/schemas/index.ts +130 -0
  95. package/src/store/config.ts +74 -0
  96. package/src/store/progress.ts +230 -0
  97. package/src/store/project.ts +276 -0
  98. package/src/store/sprint.ts +229 -0
  99. package/src/store/task.ts +443 -0
  100. package/src/store/ticket.ts +178 -0
  101. package/src/theme/index.ts +215 -0
  102. package/src/theme/ui.ts +872 -0
  103. package/src/utils/detect-scripts.ts +247 -0
  104. package/src/utils/editor-input.ts +41 -0
  105. package/src/utils/editor.ts +37 -0
  106. package/src/utils/exit-codes.ts +27 -0
  107. package/src/utils/file-lock.ts +135 -0
  108. package/src/utils/git.ts +185 -0
  109. package/src/utils/ids.ts +37 -0
  110. package/src/utils/issue-fetch.ts +244 -0
  111. package/src/utils/json-extract.ts +62 -0
  112. package/src/utils/multiline.ts +61 -0
  113. package/src/utils/path-selector.ts +236 -0
  114. package/src/utils/paths.ts +108 -0
  115. package/src/utils/provider.ts +34 -0
  116. package/src/utils/requirements-export.ts +63 -0
  117. package/src/utils/storage.ts +107 -0
  118. package/tsconfig.json +25 -0
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "task-import.schema.json",
4
+ "title": "Task Import",
5
+ "description": "Schema for importing tasks via ralphctl task import or scope plan",
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "required": ["name", "projectPath"],
10
+ "properties": {
11
+ "name": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "description": "Task name - concise, actionable description"
15
+ },
16
+ "description": {
17
+ "type": "string",
18
+ "description": "Detailed description of what the task accomplishes"
19
+ },
20
+ "steps": {
21
+ "type": "array",
22
+ "description": "Implementation steps - specific, actionable items",
23
+ "items": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "ticketId": {
28
+ "type": "string",
29
+ "description": "Reference to parent ticket ID (e.g., TICKET-001)"
30
+ },
31
+ "id": {
32
+ "type": "string",
33
+ "description": "Local ID for referencing this task in blockedBy (e.g., '1', 'auth-setup'). Converted to real ID on import."
34
+ },
35
+ "blockedBy": {
36
+ "type": "array",
37
+ "description": "IDs of tasks that must complete first. Reference tasks by their 'id' field.",
38
+ "items": {
39
+ "type": "string"
40
+ }
41
+ },
42
+ "projectPath": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "description": "Absolute path to the repository where this task should execute. Must be one of the project's paths."
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "tasks.schema.json",
4
+ "title": "Tasks",
5
+ "description": "Array of tasks in a sprint",
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "required": ["id", "name", "status", "order", "projectPath"],
10
+ "properties": {
11
+ "id": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "description": "Task ID (uuid8)"
15
+ },
16
+ "name": {
17
+ "type": "string",
18
+ "minLength": 1,
19
+ "description": "Task name"
20
+ },
21
+ "description": {
22
+ "type": "string",
23
+ "description": "Task description"
24
+ },
25
+ "steps": {
26
+ "type": "array",
27
+ "default": [],
28
+ "description": "Implementation steps",
29
+ "items": {
30
+ "type": "string"
31
+ }
32
+ },
33
+ "status": {
34
+ "type": "string",
35
+ "enum": ["todo", "in_progress", "done"],
36
+ "default": "todo",
37
+ "description": "Task status (kanban: todo → in_progress → done)"
38
+ },
39
+ "order": {
40
+ "type": "integer",
41
+ "minimum": 1,
42
+ "description": "Task priority order"
43
+ },
44
+ "ticketId": {
45
+ "type": "string",
46
+ "description": "Reference to parent ticket (internal ID)"
47
+ },
48
+ "blockedBy": {
49
+ "type": "array",
50
+ "default": [],
51
+ "description": "Task IDs that must complete before this task can start",
52
+ "items": {
53
+ "type": "string"
54
+ }
55
+ },
56
+ "projectPath": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "description": "Absolute path to the project directory for execution"
60
+ },
61
+ "verified": {
62
+ "type": "boolean",
63
+ "default": false,
64
+ "description": "Whether the task passed verification"
65
+ },
66
+ "verificationOutput": {
67
+ "type": "string",
68
+ "description": "Output from the verification run"
69
+ }
70
+ }
71
+ }
72
+ }