rafcode 1.3.2 → 2.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 (417) hide show
  1. package/.claude/settings.local.json +3 -1
  2. package/CLAUDE.md +118 -22
  3. package/RAF/aaaacu-worktree-weaver/decisions.md +88 -0
  4. package/RAF/aaaacu-worktree-weaver/input.md +27 -0
  5. package/RAF/aaaacu-worktree-weaver/outcomes/01-git-worktree-utilities.md +41 -0
  6. package/RAF/aaaacu-worktree-weaver/outcomes/02-worktree-plan-command.md +44 -0
  7. package/RAF/aaaacu-worktree-weaver/outcomes/03-worktree-do-command.md +58 -0
  8. package/RAF/aaaacu-worktree-weaver/outcomes/04-auto-merge-and-cleanup.md +40 -0
  9. package/RAF/aaaacu-worktree-weaver/outcomes/05-worktree-tests.md +43 -0
  10. package/RAF/aaaacu-worktree-weaver/outcomes/06-update-documentation.md +33 -0
  11. package/RAF/aaaacu-worktree-weaver/plans/01-git-worktree-utilities.md +51 -0
  12. package/RAF/aaaacu-worktree-weaver/plans/02-worktree-plan-command.md +93 -0
  13. package/RAF/aaaacu-worktree-weaver/plans/03-worktree-do-command.md +81 -0
  14. package/RAF/aaaacu-worktree-weaver/plans/04-auto-merge-and-cleanup.md +51 -0
  15. package/RAF/aaaacu-worktree-weaver/plans/05-worktree-tests.md +52 -0
  16. package/RAF/aaaacu-worktree-weaver/plans/06-update-documentation.md +55 -0
  17. package/RAF/aaaacv-trim-the-fat/decisions.md +34 -0
  18. package/RAF/aaaacv-trim-the-fat/input.md +5 -0
  19. package/RAF/aaaacv-trim-the-fat/outcomes/01-add-worktree-support-to-status.md +43 -0
  20. package/RAF/aaaacv-trim-the-fat/outcomes/02-remove-multi-project-from-do.md +50 -0
  21. package/RAF/aaaacv-trim-the-fat/outcomes/03-commit-artifacts-on-amend.md +35 -0
  22. package/RAF/aaaacv-trim-the-fat/outcomes/04-worktree-aware-exit-messages.md +36 -0
  23. package/RAF/aaaacv-trim-the-fat/plans/01-add-worktree-support-to-status.md +43 -0
  24. package/RAF/aaaacv-trim-the-fat/plans/02-remove-multi-project-from-do.md +44 -0
  25. package/RAF/aaaacv-trim-the-fat/plans/03-commit-artifacts-on-amend.md +38 -0
  26. package/RAF/aaaacv-trim-the-fat/plans/04-worktree-aware-exit-messages.md +38 -0
  27. package/RAF/aaaacw-prune-cycle/decisions.md +25 -0
  28. package/RAF/aaaacw-prune-cycle/input.md +5 -0
  29. package/RAF/aaaacw-prune-cycle/outcomes/01-create-worktree-from-branch.md +32 -0
  30. package/RAF/aaaacw-prune-cycle/outcomes/02-cleanup-worktree-on-success.md +33 -0
  31. package/RAF/aaaacw-prune-cycle/outcomes/03-amend-recreate-worktree.md +40 -0
  32. package/RAF/aaaacw-prune-cycle/plans/01-create-worktree-from-branch.md +31 -0
  33. package/RAF/aaaacw-prune-cycle/plans/02-cleanup-worktree-on-success.md +38 -0
  34. package/RAF/aaaacw-prune-cycle/plans/03-amend-recreate-worktree.md +50 -0
  35. package/RAF/aaaacx-epoch-shift/decisions.md +25 -0
  36. package/RAF/aaaacx-epoch-shift/input.md +1 -0
  37. package/RAF/aaaacx-epoch-shift/outcomes/01-epoch-id-generation.md +34 -0
  38. package/RAF/aaaacx-epoch-shift/outcomes/02-update-pattern-matching.md +32 -0
  39. package/RAF/aaaacx-epoch-shift/outcomes/03-update-tests.md +59 -0
  40. package/RAF/aaaacx-epoch-shift/outcomes/04-update-documentation.md +30 -0
  41. package/RAF/aaaacx-epoch-shift/plans/01-epoch-id-generation.md +40 -0
  42. package/RAF/aaaacx-epoch-shift/plans/02-update-pattern-matching.md +60 -0
  43. package/RAF/aaaacx-epoch-shift/plans/03-update-tests.md +48 -0
  44. package/RAF/aaaacx-epoch-shift/plans/04-update-documentation.md +44 -0
  45. package/RAF/ahmpro-merge-guardian/decisions.md +25 -0
  46. package/RAF/ahmpro-merge-guardian/input.md +4 -0
  47. package/RAF/ahmpro-merge-guardian/outcomes/001-fix-amend-worktree-commit.md +45 -0
  48. package/RAF/ahmpro-merge-guardian/outcomes/002-base36-task-ids.md +55 -0
  49. package/RAF/ahmpro-merge-guardian/outcomes/003-worktree-pr-creation.md +41 -0
  50. package/RAF/ahmpro-merge-guardian/outcomes/004-post-execution-picker.md +53 -0
  51. package/RAF/ahmpro-merge-guardian/plans/001-fix-amend-worktree-commit.md +39 -0
  52. package/RAF/ahmpro-merge-guardian/plans/002-base36-task-ids.md +43 -0
  53. package/RAF/ahmpro-merge-guardian/plans/003-worktree-pr-creation.md +43 -0
  54. package/RAF/ahmpro-merge-guardian/plans/004-post-execution-picker.md +51 -0
  55. package/RAF/ahnbcu-letterjam/decisions.md +13 -0
  56. package/RAF/ahnbcu-letterjam/input.md +3 -0
  57. package/RAF/ahnbcu-letterjam/outcomes/01-base26-encoding.md +42 -0
  58. package/RAF/ahnbcu-letterjam/outcomes/02-update-tests.md +38 -0
  59. package/RAF/ahnbcu-letterjam/outcomes/03-migrate-command.md +51 -0
  60. package/RAF/ahnbcu-letterjam/outcomes/04-update-documentation.md +29 -0
  61. package/RAF/ahnbcu-letterjam/plans/01-base26-encoding.md +36 -0
  62. package/RAF/ahnbcu-letterjam/plans/02-update-tests.md +37 -0
  63. package/RAF/ahnbcu-letterjam/plans/03-migrate-command.md +49 -0
  64. package/RAF/ahnbcu-letterjam/plans/04-update-documentation.md +39 -0
  65. package/RAF/ahnwrk-worktree-weaver/decisions.md +19 -0
  66. package/RAF/ahnwrk-worktree-weaver/input.md +4 -0
  67. package/RAF/ahnwrk-worktree-weaver/outcomes/01-remove-co-authored-by.md +20 -0
  68. package/RAF/ahnwrk-worktree-weaver/outcomes/02-update-task-status-format.md +21 -0
  69. package/RAF/ahnwrk-worktree-weaver/outcomes/03-worktree-auto-discovery.md +34 -0
  70. package/RAF/ahnwrk-worktree-weaver/outcomes/04-fix-pr-description.md +30 -0
  71. package/RAF/ahnwrk-worktree-weaver/plans/01-remove-co-authored-by.md +26 -0
  72. package/RAF/ahnwrk-worktree-weaver/plans/02-update-task-status-format.md +27 -0
  73. package/RAF/ahnwrk-worktree-weaver/plans/03-worktree-auto-discovery.md +37 -0
  74. package/RAF/ahnwrk-worktree-weaver/plans/04-fix-pr-description.md +50 -0
  75. package/RAF/ahrren-turbo-finder/decisions.md +19 -0
  76. package/RAF/ahrren-turbo-finder/input.md +2 -0
  77. package/RAF/ahrren-turbo-finder/outcomes/01-worktree-auto-detect.md +40 -0
  78. package/RAF/ahrren-turbo-finder/outcomes/02-medium-effort-do.md +34 -0
  79. package/RAF/ahrren-turbo-finder/plans/01-worktree-auto-detect.md +44 -0
  80. package/RAF/ahrren-turbo-finder/plans/02-medium-effort-do.md +39 -0
  81. package/RAF/ahrtxf-session-sentinel/decisions.md +19 -0
  82. package/RAF/ahrtxf-session-sentinel/input.md +1 -0
  83. package/RAF/ahrtxf-session-sentinel/outcomes/01-capture-session-id.md +37 -0
  84. package/RAF/ahrtxf-session-sentinel/outcomes/02-resume-flag.md +45 -0
  85. package/RAF/ahrtxf-session-sentinel/plans/01-capture-session-id.md +41 -0
  86. package/RAF/ahrtxf-session-sentinel/plans/02-resume-flag.md +51 -0
  87. package/README.md +56 -10
  88. package/dist/commands/do.d.ts +15 -0
  89. package/dist/commands/do.d.ts.map +1 -1
  90. package/dist/commands/do.js +431 -129
  91. package/dist/commands/do.js.map +1 -1
  92. package/dist/commands/migrate.d.ts +14 -0
  93. package/dist/commands/migrate.d.ts.map +1 -0
  94. package/dist/commands/migrate.js +228 -0
  95. package/dist/commands/migrate.js.map +1 -0
  96. package/dist/commands/plan.d.ts.map +1 -1
  97. package/dist/commands/plan.js +237 -40
  98. package/dist/commands/plan.js.map +1 -1
  99. package/dist/commands/status.d.ts.map +1 -1
  100. package/dist/commands/status.js +221 -47
  101. package/dist/commands/status.js.map +1 -1
  102. package/dist/core/claude-runner.d.ts +21 -2
  103. package/dist/core/claude-runner.d.ts.map +1 -1
  104. package/dist/core/claude-runner.js +199 -29
  105. package/dist/core/claude-runner.js.map +1 -1
  106. package/dist/core/git.d.ts +15 -6
  107. package/dist/core/git.d.ts.map +1 -1
  108. package/dist/core/git.js +53 -20
  109. package/dist/core/git.js.map +1 -1
  110. package/dist/core/project-manager.d.ts.map +1 -1
  111. package/dist/core/project-manager.js +2 -2
  112. package/dist/core/project-manager.js.map +1 -1
  113. package/dist/core/pull-request.d.ts +84 -0
  114. package/dist/core/pull-request.d.ts.map +1 -0
  115. package/dist/core/pull-request.js +414 -0
  116. package/dist/core/pull-request.js.map +1 -0
  117. package/dist/core/shutdown-handler.d.ts.map +1 -1
  118. package/dist/core/shutdown-handler.js +4 -0
  119. package/dist/core/shutdown-handler.js.map +1 -1
  120. package/dist/core/state-derivation.d.ts +3 -3
  121. package/dist/core/state-derivation.d.ts.map +1 -1
  122. package/dist/core/state-derivation.js +18 -14
  123. package/dist/core/state-derivation.js.map +1 -1
  124. package/dist/core/worktree.d.ts +138 -0
  125. package/dist/core/worktree.d.ts.map +1 -0
  126. package/dist/core/worktree.js +383 -0
  127. package/dist/core/worktree.js.map +1 -0
  128. package/dist/index.js +2 -0
  129. package/dist/index.js.map +1 -1
  130. package/dist/parsers/stream-renderer.d.ts +3 -0
  131. package/dist/parsers/stream-renderer.d.ts.map +1 -1
  132. package/dist/parsers/stream-renderer.js +1 -1
  133. package/dist/parsers/stream-renderer.js.map +1 -1
  134. package/dist/prompts/amend.d.ts +1 -0
  135. package/dist/prompts/amend.d.ts.map +1 -1
  136. package/dist/prompts/amend.js +14 -10
  137. package/dist/prompts/amend.js.map +1 -1
  138. package/dist/prompts/execution.d.ts.map +1 -1
  139. package/dist/prompts/execution.js +4 -2
  140. package/dist/prompts/execution.js.map +1 -1
  141. package/dist/prompts/planning.d.ts +1 -0
  142. package/dist/prompts/planning.d.ts.map +1 -1
  143. package/dist/prompts/planning.js +9 -8
  144. package/dist/prompts/planning.js.map +1 -1
  145. package/dist/types/config.d.ts +6 -0
  146. package/dist/types/config.d.ts.map +1 -1
  147. package/dist/ui/project-picker.d.ts +34 -3
  148. package/dist/ui/project-picker.d.ts.map +1 -1
  149. package/dist/ui/project-picker.js +78 -10
  150. package/dist/ui/project-picker.js.map +1 -1
  151. package/dist/utils/paths.d.ts +38 -43
  152. package/dist/utils/paths.d.ts.map +1 -1
  153. package/dist/utils/paths.js +123 -193
  154. package/dist/utils/paths.js.map +1 -1
  155. package/dist/utils/terminal-symbols.d.ts +2 -2
  156. package/dist/utils/terminal-symbols.js +3 -3
  157. package/dist/utils/terminal-symbols.js.map +1 -1
  158. package/dist/utils/validation.d.ts.map +1 -1
  159. package/dist/utils/validation.js +2 -8
  160. package/dist/utils/validation.js.map +1 -1
  161. package/package.json +1 -1
  162. package/src/commands/do.ts +505 -139
  163. package/src/commands/migrate.ts +269 -0
  164. package/src/commands/plan.ts +264 -40
  165. package/src/commands/status.ts +252 -45
  166. package/src/core/claude-runner.ts +246 -33
  167. package/src/core/git.ts +57 -21
  168. package/src/core/project-manager.ts +2 -1
  169. package/src/core/pull-request.ts +480 -0
  170. package/src/core/shutdown-handler.ts +5 -0
  171. package/src/core/state-derivation.ts +18 -14
  172. package/src/core/worktree.ts +434 -0
  173. package/src/index.ts +2 -0
  174. package/src/parsers/stream-renderer.ts +4 -1
  175. package/src/prompts/amend.ts +15 -9
  176. package/src/prompts/execution.ts +4 -2
  177. package/src/prompts/planning.ts +10 -8
  178. package/src/types/config.ts +7 -0
  179. package/src/ui/project-picker.ts +110 -10
  180. package/src/utils/paths.ts +129 -214
  181. package/src/utils/terminal-symbols.ts +3 -3
  182. package/src/utils/validation.ts +2 -9
  183. package/tests/unit/amend-prompt.test.ts +85 -0
  184. package/tests/unit/claude-runner-interactive.test.ts +24 -0
  185. package/tests/unit/claude-runner.test.ts +518 -64
  186. package/tests/unit/commit-planning-artifacts-worktree.test.ts +327 -0
  187. package/tests/unit/commit-planning-artifacts.test.ts +303 -35
  188. package/tests/unit/dependency-integration.test.ts +95 -95
  189. package/tests/unit/do-blocked-tasks.test.ts +53 -53
  190. package/tests/unit/do-command.test.ts +39 -132
  191. package/tests/unit/do-rerun.test.ts +65 -65
  192. package/tests/unit/do-worktree-cleanup.test.ts +151 -0
  193. package/tests/unit/execution-prompt.test.ts +71 -60
  194. package/tests/unit/failure-history.test.ts +19 -19
  195. package/tests/unit/git-commit-helpers.test.ts +5 -5
  196. package/tests/unit/git-stash.test.ts +4 -4
  197. package/tests/unit/migrate-command.test.ts +197 -0
  198. package/tests/unit/outcome-content.test.ts +20 -20
  199. package/tests/unit/paths.test.ts +269 -467
  200. package/tests/unit/plan-amend-worktree-recreate.test.ts +246 -0
  201. package/tests/unit/plan-command.test.ts +103 -103
  202. package/tests/unit/planning-prompt.test.ts +41 -4
  203. package/tests/unit/post-execution-picker.test.ts +252 -0
  204. package/tests/unit/project-manager.test.ts +20 -8
  205. package/tests/unit/project-picker.test.ts +425 -42
  206. package/tests/unit/pull-request.test.ts +852 -0
  207. package/tests/unit/state-derivation.test.ts +138 -137
  208. package/tests/unit/status-command.test.ts +344 -76
  209. package/tests/unit/stream-renderer.test.ts +30 -0
  210. package/tests/unit/terminal-symbols.test.ts +4 -4
  211. package/tests/unit/worktree-integration.test.ts +405 -0
  212. package/tests/unit/worktree.test.ts +625 -0
  213. package/tests/unit/do-multiproject.test.ts +0 -270
  214. /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/input.md +0 -0
  215. /package/RAF/{001-raf-task-improvements/outcomes/001-add-decisions-folder.md → aaaaab-raf-task-improvements/outcomes/01-add-decisions-folder.md} +0 -0
  216. /package/RAF/{001-raf-task-improvements/outcomes/002-fix-write-error-on-shutdown.md → aaaaab-raf-task-improvements/outcomes/02-fix-write-error-on-shutdown.md} +0 -0
  217. /package/RAF/{001-raf-task-improvements/outcomes/003-stash-changes-on-failure.md → aaaaab-raf-task-improvements/outcomes/03-stash-changes-on-failure.md} +0 -0
  218. /package/RAF/{001-raf-task-improvements/outcomes/004-add-project-name-to-commits.md → aaaaab-raf-task-improvements/outcomes/04-add-project-name-to-commits.md} +0 -0
  219. /package/RAF/{001-raf-task-improvements/outcomes/005-add-running-time-display.md → aaaaab-raf-task-improvements/outcomes/05-add-running-time-display.md} +0 -0
  220. /package/RAF/{001-raf-task-improvements/outcomes/006-add-task-name-to-logs.md → aaaaab-raf-task-improvements/outcomes/06-add-task-name-to-logs.md} +0 -0
  221. /package/RAF/{001-raf-task-improvements/outcomes/007-show-model-at-task-start.md → aaaaab-raf-task-improvements/outcomes/07-show-model-at-task-start.md} +0 -0
  222. /package/RAF/{001-raf-task-improvements/outcomes/009-remove-editor-placeholder-text.md → aaaaab-raf-task-improvements/outcomes/09-remove-editor-placeholder-text.md} +0 -0
  223. /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/outcomes/SUMMARY.md +0 -0
  224. /package/RAF/{001-raf-task-improvements/plans/001-add-decisions-folder.md → aaaaab-raf-task-improvements/plans/01-add-decisions-folder.md} +0 -0
  225. /package/RAF/{001-raf-task-improvements/plans/002-fix-write-error-on-shutdown.md → aaaaab-raf-task-improvements/plans/02-fix-write-error-on-shutdown.md} +0 -0
  226. /package/RAF/{001-raf-task-improvements/plans/003-stash-changes-on-failure.md → aaaaab-raf-task-improvements/plans/03-stash-changes-on-failure.md} +0 -0
  227. /package/RAF/{001-raf-task-improvements/plans/004-add-project-name-to-commits.md → aaaaab-raf-task-improvements/plans/04-add-project-name-to-commits.md} +0 -0
  228. /package/RAF/{001-raf-task-improvements/plans/005-add-running-time-display.md → aaaaab-raf-task-improvements/plans/05-add-running-time-display.md} +0 -0
  229. /package/RAF/{001-raf-task-improvements/plans/006-add-task-name-to-logs.md → aaaaab-raf-task-improvements/plans/06-add-task-name-to-logs.md} +0 -0
  230. /package/RAF/{001-raf-task-improvements/plans/009-remove-editor-placeholder-text.md → aaaaab-raf-task-improvements/plans/09-remove-editor-placeholder-text.md} +0 -0
  231. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/decisions/DECISIONS.md +0 -0
  232. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/input.md +0 -0
  233. /package/RAF/{002-raf-task-improvements-execution/outcomes/001-commit-show-model-at-task-start.md → aaaaac-raf-task-improvements-execution/outcomes/01-commit-show-model-at-task-start.md} +0 -0
  234. /package/RAF/{002-raf-task-improvements-execution/outcomes/002-delete-skipped-plan.md → aaaaac-raf-task-improvements-execution/outcomes/02-delete-skipped-plan.md} +0 -0
  235. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/outcomes/SUMMARY.md +0 -0
  236. /package/RAF/{002-raf-task-improvements-execution/plans/001-commit-show-model-at-task-start.md → aaaaac-raf-task-improvements-execution/plans/01-commit-show-model-at-task-start.md} +0 -0
  237. /package/RAF/{002-raf-task-improvements-execution/plans/002-delete-skipped-plan.md → aaaaac-raf-task-improvements-execution/plans/02-delete-skipped-plan.md} +0 -0
  238. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/decisions/DECISIONS.md +0 -0
  239. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/input.md +0 -0
  240. /package/RAF/{003-multi-project-execution/outcomes/001-remove-state-json.md → aaaaad-multi-project-execution/outcomes/01-remove-state-json.md} +0 -0
  241. /package/RAF/{003-multi-project-execution/outcomes/002-update-raf-status.md → aaaaad-multi-project-execution/outcomes/02-update-raf-status.md} +0 -0
  242. /package/RAF/{003-multi-project-execution/outcomes/003-simplify-git-logic.md → aaaaad-multi-project-execution/outcomes/03-simplify-git-logic.md} +0 -0
  243. /package/RAF/{003-multi-project-execution/outcomes/004-auto-commit-planning.md → aaaaad-multi-project-execution/outcomes/04-auto-commit-planning.md} +0 -0
  244. /package/RAF/{003-multi-project-execution/outcomes/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/outcomes/05-rerun-failed-tasks.md} +0 -0
  245. /package/RAF/{003-multi-project-execution/outcomes/006-multi-project-execution.md → aaaaad-multi-project-execution/outcomes/06-multi-project-execution.md} +0 -0
  246. /package/RAF/{003-multi-project-execution/outcomes/007-verify-timeout.md → aaaaad-multi-project-execution/outcomes/07-verify-timeout.md} +0 -0
  247. /package/RAF/{003-multi-project-execution/outcomes/008-move-decisions-file.md → aaaaad-multi-project-execution/outcomes/08-move-decisions-file.md} +0 -0
  248. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/outcomes/SUMMARY.md +0 -0
  249. /package/RAF/{003-multi-project-execution/plans/001-remove-state-json.md → aaaaad-multi-project-execution/plans/01-remove-state-json.md} +0 -0
  250. /package/RAF/{003-multi-project-execution/plans/002-update-raf-status.md → aaaaad-multi-project-execution/plans/02-update-raf-status.md} +0 -0
  251. /package/RAF/{003-multi-project-execution/plans/003-simplify-git-logic.md → aaaaad-multi-project-execution/plans/03-simplify-git-logic.md} +0 -0
  252. /package/RAF/{003-multi-project-execution/plans/004-auto-commit-planning.md → aaaaad-multi-project-execution/plans/04-auto-commit-planning.md} +0 -0
  253. /package/RAF/{003-multi-project-execution/plans/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/plans/05-rerun-failed-tasks.md} +0 -0
  254. /package/RAF/{003-multi-project-execution/plans/006-multi-project-execution.md → aaaaad-multi-project-execution/plans/06-multi-project-execution.md} +0 -0
  255. /package/RAF/{003-multi-project-execution/plans/007-verify-timeout.md → aaaaad-multi-project-execution/plans/07-verify-timeout.md} +0 -0
  256. /package/RAF/{003-multi-project-execution/plans/008-move-decisions-file.md → aaaaad-multi-project-execution/plans/08-move-decisions-file.md} +0 -0
  257. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/decisions.md +0 -0
  258. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/input.md +0 -0
  259. /package/RAF/{004-task-naming-optimization/outcomes/001-remove-summary-file.md → aaaaae-task-naming-optimization/outcomes/01-remove-summary-file.md} +0 -0
  260. /package/RAF/{004-task-naming-optimization/outcomes/002-base36-project-numbering.md → aaaaae-task-naming-optimization/outcomes/02-base36-project-numbering.md} +0 -0
  261. /package/RAF/{004-task-naming-optimization/outcomes/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/outcomes/03-improve-haiku-prompt.md} +0 -0
  262. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/outcomes/SUMMARY.md +0 -0
  263. /package/RAF/{004-task-naming-optimization/plans/001-remove-summary-file.md → aaaaae-task-naming-optimization/plans/01-remove-summary-file.md} +0 -0
  264. /package/RAF/{004-task-naming-optimization/plans/002-base36-project-numbering.md → aaaaae-task-naming-optimization/plans/02-base36-project-numbering.md} +0 -0
  265. /package/RAF/{004-task-naming-optimization/plans/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/plans/03-improve-haiku-prompt.md} +0 -0
  266. /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/decisions.md +0 -0
  267. /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/input.md +0 -0
  268. /package/RAF/{005-task-naming-improvements/outcomes/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/outcomes/01-enhance-identifier-resolution.md} +0 -0
  269. /package/RAF/{005-task-naming-improvements/outcomes/002-add-identifier-support-to-status.md → aaaaaf-task-naming-improvements/outcomes/02-add-identifier-support-to-status.md} +0 -0
  270. /package/RAF/{005-task-naming-improvements/outcomes/003-update-do-for-full-folder-names.md → aaaaaf-task-naming-improvements/outcomes/03-update-do-for-full-folder-names.md} +0 -0
  271. /package/RAF/{005-task-naming-improvements/outcomes/004-implement-amend-flag-for-plan.md → aaaaaf-task-naming-improvements/outcomes/04-implement-amend-flag-for-plan.md} +0 -0
  272. /package/RAF/{005-task-naming-improvements/outcomes/005-commit-outcomes-on-complete.md → aaaaaf-task-naming-improvements/outcomes/05-commit-outcomes-on-complete.md} +0 -0
  273. /package/RAF/{005-task-naming-improvements/outcomes/006-update-execution-prompt-commit-schema.md → aaaaaf-task-naming-improvements/outcomes/06-update-execution-prompt-commit-schema.md} +0 -0
  274. /package/RAF/{005-task-naming-improvements/outcomes/007-allow-pending-task-amendments.md → aaaaaf-task-naming-improvements/outcomes/07-allow-pending-task-amendments.md} +0 -0
  275. /package/RAF/{005-task-naming-improvements/outcomes/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/outcomes/08-fix-timeout-label.md} +0 -0
  276. /package/RAF/{005-task-naming-improvements/plans/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/plans/01-enhance-identifier-resolution.md} +0 -0
  277. /package/RAF/{005-task-naming-improvements/plans/002-add-identifier-support-to-status.md → aaaaaf-task-naming-improvements/plans/02-add-identifier-support-to-status.md} +0 -0
  278. /package/RAF/{005-task-naming-improvements/plans/003-update-do-for-full-folder-names.md → aaaaaf-task-naming-improvements/plans/03-update-do-for-full-folder-names.md} +0 -0
  279. /package/RAF/{005-task-naming-improvements/plans/004-implement-amend-flag-for-plan.md → aaaaaf-task-naming-improvements/plans/04-implement-amend-flag-for-plan.md} +0 -0
  280. /package/RAF/{005-task-naming-improvements/plans/005-commit-outcomes-on-complete.md → aaaaaf-task-naming-improvements/plans/05-commit-outcomes-on-complete.md} +0 -0
  281. /package/RAF/{005-task-naming-improvements/plans/006-update-execution-prompt-commit-schema.md → aaaaaf-task-naming-improvements/plans/06-update-execution-prompt-commit-schema.md} +0 -0
  282. /package/RAF/{005-task-naming-improvements/plans/007-allow-pending-task-amendments.md → aaaaaf-task-naming-improvements/plans/07-allow-pending-task-amendments.md} +0 -0
  283. /package/RAF/{005-task-naming-improvements/plans/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/plans/08-fix-timeout-label.md} +0 -0
  284. /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/decisions.md +0 -0
  285. /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/input.md +0 -0
  286. /package/RAF/{006-fix-double-summary-headers/outcomes/001-fix-double-summary-headers.md → aaaaag-fix-double-summary-headers/outcomes/01-fix-double-summary-headers.md} +0 -0
  287. /package/RAF/{006-fix-double-summary-headers/outcomes/002-update-readme-for-npm.md → aaaaag-fix-double-summary-headers/outcomes/02-update-readme-for-npm.md} +0 -0
  288. /package/RAF/{006-fix-double-summary-headers/outcomes/003-npm-publish-instructions.md → aaaaag-fix-double-summary-headers/outcomes/03-npm-publish-instructions.md} +0 -0
  289. /package/RAF/{006-fix-double-summary-headers/outcomes/004-flexible-project-lookup.md → aaaaag-fix-double-summary-headers/outcomes/04-flexible-project-lookup.md} +0 -0
  290. /package/RAF/{006-fix-double-summary-headers/plans/001-fix-double-summary-headers.md → aaaaag-fix-double-summary-headers/plans/01-fix-double-summary-headers.md} +0 -0
  291. /package/RAF/{006-fix-double-summary-headers/plans/002-update-readme-for-npm.md → aaaaag-fix-double-summary-headers/plans/02-update-readme-for-npm.md} +0 -0
  292. /package/RAF/{006-fix-double-summary-headers/plans/003-npm-publish-instructions.md → aaaaag-fix-double-summary-headers/plans/03-npm-publish-instructions.md} +0 -0
  293. /package/RAF/{006-fix-double-summary-headers/plans/004-flexible-project-lookup.md → aaaaag-fix-double-summary-headers/plans/04-flexible-project-lookup.md} +0 -0
  294. /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/decisions.md +0 -0
  295. /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/input.md +0 -0
  296. /package/RAF/{007-improve-outcome-format/outcomes/001-update-execution-prompt.md → aaaaah-improve-outcome-format/outcomes/01-update-execution-prompt.md} +0 -0
  297. /package/RAF/{007-improve-outcome-format/outcomes/002-update-state-derivation.md → aaaaah-improve-outcome-format/outcomes/02-update-state-derivation.md} +0 -0
  298. /package/RAF/{007-improve-outcome-format/outcomes/003-update-do-command-outcome-handling.md → aaaaah-improve-outcome-format/outcomes/03-update-do-command-outcome-handling.md} +0 -0
  299. /package/RAF/{007-improve-outcome-format/outcomes/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/outcomes/04-implement-failure-analysis.md} +0 -0
  300. /package/RAF/{007-improve-outcome-format/outcomes/005-update-documentation.md → aaaaah-improve-outcome-format/outcomes/05-update-documentation.md} +0 -0
  301. /package/RAF/{007-improve-outcome-format/plans/001-update-execution-prompt.md → aaaaah-improve-outcome-format/plans/01-update-execution-prompt.md} +0 -0
  302. /package/RAF/{007-improve-outcome-format/plans/002-update-state-derivation.md → aaaaah-improve-outcome-format/plans/02-update-state-derivation.md} +0 -0
  303. /package/RAF/{007-improve-outcome-format/plans/003-update-do-command-outcome-handling.md → aaaaah-improve-outcome-format/plans/03-update-do-command-outcome-handling.md} +0 -0
  304. /package/RAF/{007-improve-outcome-format/plans/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/plans/04-implement-failure-analysis.md} +0 -0
  305. /package/RAF/{007-improve-outcome-format/plans/005-update-documentation.md → aaaaah-improve-outcome-format/plans/05-update-documentation.md} +0 -0
  306. /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/decisions.md +0 -0
  307. /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/input.md +0 -0
  308. /package/RAF/{008-beautiful-do/outcomes/001-terminal-symbols.md → aaaaai-beautiful-do/outcomes/01-terminal-symbols.md} +0 -0
  309. /package/RAF/{008-beautiful-do/outcomes/002-refactor-do-output.md → aaaaai-beautiful-do/outcomes/02-refactor-do-output.md} +0 -0
  310. /package/RAF/{008-beautiful-do/outcomes/003-refactor-status-output.md → aaaaai-beautiful-do/outcomes/03-refactor-status-output.md} +0 -0
  311. /package/RAF/{008-beautiful-do/outcomes/004-simplify-logger.md → aaaaai-beautiful-do/outcomes/04-simplify-logger.md} +0 -0
  312. /package/RAF/{008-beautiful-do/outcomes/005-add-tests.md → aaaaai-beautiful-do/outcomes/05-add-tests.md} +0 -0
  313. /package/RAF/{008-beautiful-do/plans/001-terminal-symbols.md → aaaaai-beautiful-do/plans/01-terminal-symbols.md} +0 -0
  314. /package/RAF/{008-beautiful-do/plans/002-refactor-do-output.md → aaaaai-beautiful-do/plans/02-refactor-do-output.md} +0 -0
  315. /package/RAF/{008-beautiful-do/plans/003-refactor-status-output.md → aaaaai-beautiful-do/plans/03-refactor-status-output.md} +0 -0
  316. /package/RAF/{008-beautiful-do/plans/004-simplify-logger.md → aaaaai-beautiful-do/plans/04-simplify-logger.md} +0 -0
  317. /package/RAF/{008-beautiful-do/plans/005-add-tests.md → aaaaai-beautiful-do/plans/05-add-tests.md} +0 -0
  318. /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/decisions.md +0 -0
  319. /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/input.md +0 -0
  320. /package/RAF/{009-system-promt-ammend/outcomes/001-model-override.md → aaaaaj-system-promt-ammend/outcomes/01-model-override.md} +0 -0
  321. /package/RAF/{009-system-promt-ammend/outcomes/002-system-prompt-append.md → aaaaaj-system-promt-ammend/outcomes/02-system-prompt-append.md} +0 -0
  322. /package/RAF/{009-system-promt-ammend/outcomes/003-retry-context.md → aaaaaj-system-promt-ammend/outcomes/03-retry-context.md} +0 -0
  323. /package/RAF/{009-system-promt-ammend/plans/001-model-override.md → aaaaaj-system-promt-ammend/plans/01-model-override.md} +0 -0
  324. /package/RAF/{009-system-promt-ammend/plans/002-system-prompt-append.md → aaaaaj-system-promt-ammend/plans/02-system-prompt-append.md} +0 -0
  325. /package/RAF/{009-system-promt-ammend/plans/003-retry-context.md → aaaaaj-system-promt-ammend/plans/03-retry-context.md} +0 -0
  326. /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/decisions.md +0 -0
  327. /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/input.md +0 -0
  328. /package/RAF/{010-outcome-marker-fallback/outcomes/001-outcome-file-marker-fallback.md → aaaabk-outcome-marker-fallback/outcomes/01-outcome-file-marker-fallback.md} +0 -0
  329. /package/RAF/{010-outcome-marker-fallback/outcomes/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/outcomes/02-creative-project-naming.md} +0 -0
  330. /package/RAF/{010-outcome-marker-fallback/plans/001-outcome-file-marker-fallback.md → aaaabk-outcome-marker-fallback/plans/01-outcome-file-marker-fallback.md} +0 -0
  331. /package/RAF/{010-outcome-marker-fallback/plans/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/plans/02-creative-project-naming.md} +0 -0
  332. /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/decisions.md +0 -0
  333. /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/input.md +0 -0
  334. /package/RAF/{011-do-task-in-commit/outcomes/001-update-execution-prompt.md → aaaabl-do-task-in-commit/outcomes/01-update-execution-prompt.md} +0 -0
  335. /package/RAF/{011-do-task-in-commit/outcomes/002-update-tests.md → aaaabl-do-task-in-commit/outcomes/02-update-tests.md} +0 -0
  336. /package/RAF/{011-do-task-in-commit/outcomes/003-update-documentation.md → aaaabl-do-task-in-commit/outcomes/03-update-documentation.md} +0 -0
  337. /package/RAF/{011-do-task-in-commit/plans/001-update-execution-prompt.md → aaaabl-do-task-in-commit/plans/01-update-execution-prompt.md} +0 -0
  338. /package/RAF/{011-do-task-in-commit/plans/002-update-tests.md → aaaabl-do-task-in-commit/plans/02-update-tests.md} +0 -0
  339. /package/RAF/{011-do-task-in-commit/plans/003-update-documentation.md → aaaabl-do-task-in-commit/plans/03-update-documentation.md} +0 -0
  340. /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/decisions.md +0 -0
  341. /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/input.md +0 -0
  342. /package/RAF/{012-name-picker-buffet/outcomes/001-name-picker-for-raf-plan.md → aaaabm-name-picker-buffet/outcomes/01-name-picker-for-raf-plan.md} +0 -0
  343. /package/RAF/{012-name-picker-buffet/outcomes/002-interactive-project-picker-for-raf-do.md → aaaabm-name-picker-buffet/outcomes/02-interactive-project-picker-for-raf-do.md} +0 -0
  344. /package/RAF/{012-name-picker-buffet/outcomes/003-raf-status-truncation.md → aaaabm-name-picker-buffet/outcomes/03-raf-status-truncation.md} +0 -0
  345. /package/RAF/{012-name-picker-buffet/outcomes/004-failure-reason-details.md → aaaabm-name-picker-buffet/outcomes/04-failure-reason-details.md} +0 -0
  346. /package/RAF/{012-name-picker-buffet/outcomes/005-remove-raf-commits.md → aaaabm-name-picker-buffet/outcomes/05-remove-raf-commits.md} +0 -0
  347. /package/RAF/{012-name-picker-buffet/outcomes/006-update-execution-prompt-for-commits.md → aaaabm-name-picker-buffet/outcomes/06-update-execution-prompt-for-commits.md} +0 -0
  348. /package/RAF/{012-name-picker-buffet/outcomes/007-fix-plan-mode-user-prompt.md → aaaabm-name-picker-buffet/outcomes/07-fix-plan-mode-user-prompt.md} +0 -0
  349. /package/RAF/{012-name-picker-buffet/outcomes/008-add-auto-flag-for-plan-mode.md → aaaabm-name-picker-buffet/outcomes/08-add-auto-flag-for-plan-mode.md} +0 -0
  350. /package/RAF/{012-name-picker-buffet/plans/001-name-picker-for-raf-plan.md → aaaabm-name-picker-buffet/plans/01-name-picker-for-raf-plan.md} +0 -0
  351. /package/RAF/{012-name-picker-buffet/plans/002-interactive-project-picker-for-raf-do.md → aaaabm-name-picker-buffet/plans/02-interactive-project-picker-for-raf-do.md} +0 -0
  352. /package/RAF/{012-name-picker-buffet/plans/003-raf-status-truncation.md → aaaabm-name-picker-buffet/plans/03-raf-status-truncation.md} +0 -0
  353. /package/RAF/{012-name-picker-buffet/plans/004-failure-reason-details.md → aaaabm-name-picker-buffet/plans/04-failure-reason-details.md} +0 -0
  354. /package/RAF/{012-name-picker-buffet/plans/005-remove-raf-commits.md → aaaabm-name-picker-buffet/plans/05-remove-raf-commits.md} +0 -0
  355. /package/RAF/{012-name-picker-buffet/plans/006-update-execution-prompt-for-commits.md → aaaabm-name-picker-buffet/plans/06-update-execution-prompt-for-commits.md} +0 -0
  356. /package/RAF/{012-name-picker-buffet/plans/007-fix-plan-mode-user-prompt.md → aaaabm-name-picker-buffet/plans/07-fix-plan-mode-user-prompt.md} +0 -0
  357. /package/RAF/{012-name-picker-buffet/plans/008-add-auto-flag-for-plan-mode.md → aaaabm-name-picker-buffet/plans/08-add-auto-flag-for-plan-mode.md} +0 -0
  358. /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/decisions.md +0 -0
  359. /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/input.md +0 -0
  360. /package/RAF/{013-dependencies-watchdog/outcomes/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/outcomes/01-define-dependency-syntax.md} +0 -0
  361. /package/RAF/{013-dependencies-watchdog/outcomes/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/outcomes/02-update-planning-prompts.md} +0 -0
  362. /package/RAF/{013-dependencies-watchdog/outcomes/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/outcomes/03-parse-dependencies-update-state.md} +0 -0
  363. /package/RAF/{013-dependencies-watchdog/outcomes/004-implement-dependency-checking-in-do.md → aaaabn-dependencies-watchdog/outcomes/04-implement-dependency-checking-in-do.md} +0 -0
  364. /package/RAF/{013-dependencies-watchdog/outcomes/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/outcomes/05-update-execution-prompts.md} +0 -0
  365. /package/RAF/{013-dependencies-watchdog/outcomes/006-add-tests.md → aaaabn-dependencies-watchdog/outcomes/06-add-tests.md} +0 -0
  366. /package/RAF/{013-dependencies-watchdog/outcomes/007-add-act-alias.md → aaaabn-dependencies-watchdog/outcomes/07-add-act-alias.md} +0 -0
  367. /package/RAF/{013-dependencies-watchdog/outcomes/008-add-exit-message.md → aaaabn-dependencies-watchdog/outcomes/08-add-exit-message.md} +0 -0
  368. /package/RAF/{013-dependencies-watchdog/plans/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/plans/01-define-dependency-syntax.md} +0 -0
  369. /package/RAF/{013-dependencies-watchdog/plans/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/plans/02-update-planning-prompts.md} +0 -0
  370. /package/RAF/{013-dependencies-watchdog/plans/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/plans/03-parse-dependencies-update-state.md} +0 -0
  371. /package/RAF/{013-dependencies-watchdog/plans/004-implement-dependency-checking-in-do.md → aaaabn-dependencies-watchdog/plans/04-implement-dependency-checking-in-do.md} +0 -0
  372. /package/RAF/{013-dependencies-watchdog/plans/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/plans/05-update-execution-prompts.md} +0 -0
  373. /package/RAF/{013-dependencies-watchdog/plans/006-add-tests.md → aaaabn-dependencies-watchdog/plans/06-add-tests.md} +0 -0
  374. /package/RAF/{013-dependencies-watchdog/plans/007-add-act-alias.md → aaaabn-dependencies-watchdog/plans/07-add-act-alias.md} +0 -0
  375. /package/RAF/{013-dependencies-watchdog/plans/008-add-exit-message.md → aaaabn-dependencies-watchdog/plans/08-add-exit-message.md} +0 -0
  376. /package/RAF/{014-watchdog → aaaabo-watchdog}/decisions.md +0 -0
  377. /package/RAF/{014-watchdog → aaaabo-watchdog}/input.md +0 -0
  378. /package/RAF/{014-watchdog/outcomes/001-amend-flag-position.md → aaaabo-watchdog/outcomes/01-amend-flag-position.md} +0 -0
  379. /package/RAF/{014-watchdog/outcomes/002-details-only-on-failure.md → aaaabo-watchdog/outcomes/02-details-only-on-failure.md} +0 -0
  380. /package/RAF/{014-watchdog/plans/001-amend-flag-position.md → aaaabo-watchdog/plans/01-amend-flag-position.md} +0 -0
  381. /package/RAF/{014-watchdog/plans/002-details-only-on-failure.md → aaaabo-watchdog/plans/02-details-only-on-failure.md} +0 -0
  382. /package/RAF/{015-name-lottery → aaaabp-name-lottery}/decisions.md +0 -0
  383. /package/RAF/{015-name-lottery → aaaabp-name-lottery}/input.md +0 -0
  384. /package/RAF/{015-name-lottery/outcomes/001-auto-pick-project-name.md → aaaabp-name-lottery/outcomes/01-auto-pick-project-name.md} +0 -0
  385. /package/RAF/{015-name-lottery/outcomes/002-mention-plan-files-in-commit.md → aaaabp-name-lottery/outcomes/02-mention-plan-files-in-commit.md} +0 -0
  386. /package/RAF/{015-name-lottery/outcomes/003-fix-input-md-in-amend-flow.md → aaaabp-name-lottery/outcomes/03-fix-input-md-in-amend-flow.md} +0 -0
  387. /package/RAF/{015-name-lottery/plans/001-auto-pick-project-name.md → aaaabp-name-lottery/plans/01-auto-pick-project-name.md} +0 -0
  388. /package/RAF/{015-name-lottery/plans/002-mention-plan-files-in-commit.md → aaaabp-name-lottery/plans/02-mention-plan-files-in-commit.md} +0 -0
  389. /package/RAF/{015-name-lottery/plans/003-fix-input-md-in-amend-flow.md → aaaabp-name-lottery/plans/03-fix-input-md-in-amend-flow.md} +0 -0
  390. /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/decisions.md +0 -0
  391. /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/input.md +0 -0
  392. /package/RAF/{016-planning-scalpel/outcomes/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/outcomes/01-update-git-commit-instructions.md} +0 -0
  393. /package/RAF/{016-planning-scalpel/plans/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/plans/01-update-git-commit-instructions.md} +0 -0
  394. /package/RAF/{017-decision-vault → aaaabr-decision-vault}/decisions.md +0 -0
  395. /package/RAF/{017-decision-vault → aaaabr-decision-vault}/input.md +0 -0
  396. /package/RAF/{017-decision-vault/outcomes/001-create-git-commit-utility.md → aaaabr-decision-vault/outcomes/01-create-git-commit-utility.md} +0 -0
  397. /package/RAF/{017-decision-vault/outcomes/002-integrate-commit-into-plan.md → aaaabr-decision-vault/outcomes/02-integrate-commit-into-plan.md} +0 -0
  398. /package/RAF/{017-decision-vault/outcomes/003-add-tests-for-planning-commit.md → aaaabr-decision-vault/outcomes/03-add-tests-for-planning-commit.md} +0 -0
  399. /package/RAF/{017-decision-vault/plans/001-create-git-commit-utility.md → aaaabr-decision-vault/plans/01-create-git-commit-utility.md} +0 -0
  400. /package/RAF/{017-decision-vault/plans/002-integrate-commit-into-plan.md → aaaabr-decision-vault/plans/02-integrate-commit-into-plan.md} +0 -0
  401. /package/RAF/{017-decision-vault/plans/003-add-tests-for-planning-commit.md → aaaabr-decision-vault/plans/03-add-tests-for-planning-commit.md} +0 -0
  402. /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/decisions.md +0 -0
  403. /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/input.md +0 -0
  404. /package/RAF/{018-workflow-forge/outcomes/001-add-task-number-progress.md → aaaabs-workflow-forge/outcomes/01-add-task-number-progress.md} +0 -0
  405. /package/RAF/{018-workflow-forge/outcomes/002-update-plan-do-prompts.md → aaaabs-workflow-forge/outcomes/02-update-plan-do-prompts.md} +0 -0
  406. /package/RAF/{018-workflow-forge/plans/001-add-task-number-progress.md → aaaabs-workflow-forge/plans/01-add-task-number-progress.md} +0 -0
  407. /package/RAF/{018-workflow-forge/plans/002-update-plan-do-prompts.md → aaaabs-workflow-forge/plans/02-update-plan-do-prompts.md} +0 -0
  408. /package/RAF/{019-verbose-chronicle → aaaabt-verbose-chronicle}/decisions.md +0 -0
  409. /package/RAF/{019-verbose-chronicle → aaaabt-verbose-chronicle}/input.md +0 -0
  410. /package/RAF/{019-verbose-chronicle/outcomes/001-amend-iteration-references.md → aaaabt-verbose-chronicle/outcomes/01-amend-iteration-references.md} +0 -0
  411. /package/RAF/{019-verbose-chronicle/outcomes/002-verbose-task-name-display.md → aaaabt-verbose-chronicle/outcomes/02-verbose-task-name-display.md} +0 -0
  412. /package/RAF/{019-verbose-chronicle/outcomes/003-verbose-streaming-fix.md → aaaabt-verbose-chronicle/outcomes/03-verbose-streaming-fix.md} +0 -0
  413. /package/RAF/{019-verbose-chronicle/outcomes/004-commit-verification-before-halt.md → aaaabt-verbose-chronicle/outcomes/04-commit-verification-before-halt.md} +0 -0
  414. /package/RAF/{019-verbose-chronicle/plans/001-amend-iteration-references.md → aaaabt-verbose-chronicle/plans/01-amend-iteration-references.md} +0 -0
  415. /package/RAF/{019-verbose-chronicle/plans/002-verbose-task-name-display.md → aaaabt-verbose-chronicle/plans/02-verbose-task-name-display.md} +0 -0
  416. /package/RAF/{019-verbose-chronicle/plans/003-verbose-streaming-fix.md → aaaabt-verbose-chronicle/plans/03-verbose-streaming-fix.md} +0 -0
  417. /package/RAF/{019-verbose-chronicle/plans/004-commit-verification-before-halt.md → aaaabt-verbose-chronicle/plans/04-commit-verification-before-halt.md} +0 -0
@@ -0,0 +1,434 @@
1
+ import { execSync } from 'node:child_process';
2
+ import * as fs from 'node:fs';
3
+ import * as os from 'node:os';
4
+ import * as path from 'node:path';
5
+ import { logger } from '../utils/logger.js';
6
+ import { extractProjectNumber, extractProjectName, isBase26Prefix, decodeBase26 } from '../utils/paths.js';
7
+
8
+ export interface WorktreeCreateResult {
9
+ success: boolean;
10
+ worktreePath: string;
11
+ branch: string;
12
+ error?: string;
13
+ }
14
+
15
+ export interface WorktreeMergeResult {
16
+ success: boolean;
17
+ merged: boolean;
18
+ fastForward: boolean;
19
+ error?: string;
20
+ }
21
+
22
+ export interface WorktreeValidation {
23
+ exists: boolean;
24
+ isValidWorktree: boolean;
25
+ hasProjectFolder: boolean;
26
+ hasPlans: boolean;
27
+ projectPath: string | null;
28
+ }
29
+
30
+ /**
31
+ * Get the git toplevel directory (repo root).
32
+ * Returns null if not in a git repo.
33
+ */
34
+ export function getRepoRoot(): string | null {
35
+ try {
36
+ return execSync('git rev-parse --show-toplevel', { encoding: 'utf-8', stdio: 'pipe' }).trim() || null;
37
+ } catch {
38
+ return null;
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Get the basename of the repo root directory.
44
+ * E.g., "/Users/me/projects/myapp" -> "myapp"
45
+ * Returns null if not in a git repo.
46
+ */
47
+ export function getRepoBasename(): string | null {
48
+ const root = getRepoRoot();
49
+ if (!root) {
50
+ return null;
51
+ }
52
+ return path.basename(root);
53
+ }
54
+
55
+ /**
56
+ * Get the current branch name.
57
+ * Returns null if not in a git repo or in detached HEAD state.
58
+ */
59
+ export function getCurrentBranch(): string | null {
60
+ try {
61
+ const branch = execSync('git branch --show-current', { encoding: 'utf-8', stdio: 'pipe' }).trim();
62
+ return branch || null;
63
+ } catch {
64
+ return null;
65
+ }
66
+ }
67
+
68
+ /**
69
+ * Compute the worktree path for a project.
70
+ * Returns `~/.raf/worktrees/<repo-basename>/<project-id>`.
71
+ *
72
+ * @param repoBasename - The basename of the repo root directory
73
+ * @param projectId - The full project folder name (e.g., "020-worktree-weaver")
74
+ */
75
+ export function computeWorktreePath(repoBasename: string, projectId: string): string {
76
+ return path.join(os.homedir(), '.raf', 'worktrees', repoBasename, projectId);
77
+ }
78
+
79
+ /**
80
+ * Compute the worktree base directory for a repo.
81
+ * Returns `~/.raf/worktrees/<repo-basename>/`.
82
+ *
83
+ * @param repoBasename - The basename of the repo root directory
84
+ */
85
+ export function computeWorktreeBaseDir(repoBasename: string): string {
86
+ return path.join(os.homedir(), '.raf', 'worktrees', repoBasename);
87
+ }
88
+
89
+ /**
90
+ * Get the project path inside a worktree.
91
+ * The project folder is at the same relative path from repo root as in the main repo.
92
+ *
93
+ * @param worktreePath - The worktree root directory
94
+ * @param projectRelativePath - The relative path from repo root to the project folder (e.g., "RAF/020-worktree-weaver")
95
+ */
96
+ export function getWorktreeProjectPath(worktreePath: string, projectRelativePath: string): string {
97
+ return path.join(worktreePath, projectRelativePath);
98
+ }
99
+
100
+ /**
101
+ * Create a git worktree at the computed path with a new branch.
102
+ *
103
+ * @param repoBasename - The basename of the repo root directory
104
+ * @param projectId - The full project folder name (used as both directory name and branch name)
105
+ */
106
+ export function createWorktree(repoBasename: string, projectId: string): WorktreeCreateResult {
107
+ const worktreePath = computeWorktreePath(repoBasename, projectId);
108
+ const branch = projectId;
109
+
110
+ // Ensure parent directory exists
111
+ const baseDir = computeWorktreeBaseDir(repoBasename);
112
+ try {
113
+ fs.mkdirSync(baseDir, { recursive: true });
114
+ } catch (error) {
115
+ return {
116
+ success: false,
117
+ worktreePath,
118
+ branch,
119
+ error: `Failed to create parent directory ${baseDir}: ${error}`,
120
+ };
121
+ }
122
+
123
+ try {
124
+ execSync(`git worktree add "${worktreePath}" -b "${branch}"`, {
125
+ encoding: 'utf-8',
126
+ stdio: 'pipe',
127
+ });
128
+ return { success: true, worktreePath, branch };
129
+ } catch (error) {
130
+ const msg = error instanceof Error ? error.message : String(error);
131
+ return {
132
+ success: false,
133
+ worktreePath,
134
+ branch,
135
+ error: `Failed to create worktree: ${msg}`,
136
+ };
137
+ }
138
+ }
139
+
140
+ /**
141
+ * Validate that a worktree exists, is a valid git worktree, and contains the expected project content.
142
+ *
143
+ * @param worktreePath - The worktree root directory
144
+ * @param projectRelativePath - The relative path from repo root to the project folder
145
+ */
146
+ export function validateWorktree(worktreePath: string, projectRelativePath: string): WorktreeValidation {
147
+ const result: WorktreeValidation = {
148
+ exists: false,
149
+ isValidWorktree: false,
150
+ hasProjectFolder: false,
151
+ hasPlans: false,
152
+ projectPath: null,
153
+ };
154
+
155
+ // Check directory exists
156
+ if (!fs.existsSync(worktreePath)) {
157
+ return result;
158
+ }
159
+ result.exists = true;
160
+
161
+ // Check it appears in git worktree list
162
+ try {
163
+ const listOutput = execSync('git worktree list --porcelain', { encoding: 'utf-8', stdio: 'pipe' });
164
+ const normalizedWorktreePath = path.resolve(worktreePath);
165
+ const isListed = listOutput.split('\n').some(line => {
166
+ if (line.startsWith('worktree ')) {
167
+ const listedPath = path.resolve(line.slice('worktree '.length).trim());
168
+ return listedPath === normalizedWorktreePath;
169
+ }
170
+ return false;
171
+ });
172
+ result.isValidWorktree = isListed;
173
+ } catch {
174
+ return result;
175
+ }
176
+
177
+ // Check project folder exists in worktree
178
+ const projectPath = getWorktreeProjectPath(worktreePath, projectRelativePath);
179
+ if (fs.existsSync(projectPath)) {
180
+ result.hasProjectFolder = true;
181
+ result.projectPath = projectPath;
182
+
183
+ // Check for plans directory
184
+ const plansDir = path.join(projectPath, 'plans');
185
+ if (fs.existsSync(plansDir)) {
186
+ result.hasPlans = true;
187
+ }
188
+ }
189
+
190
+ return result;
191
+ }
192
+
193
+ /**
194
+ * Merge a worktree branch into the current branch.
195
+ * Attempts fast-forward first; falls back to merge commit.
196
+ * On conflicts, aborts merge and returns failure.
197
+ *
198
+ * MUST be called from the original repo (not the worktree).
199
+ *
200
+ * @param branch - The branch name to merge (typically the project folder name)
201
+ * @param originalBranch - The branch to merge into (the branch that was active when worktree was created)
202
+ */
203
+ export function mergeWorktreeBranch(branch: string, originalBranch: string): WorktreeMergeResult {
204
+ // Switch to the original branch
205
+ try {
206
+ execSync(`git checkout "${originalBranch}"`, { encoding: 'utf-8', stdio: 'pipe' });
207
+ } catch (error) {
208
+ const msg = error instanceof Error ? error.message : String(error);
209
+ return {
210
+ success: false,
211
+ merged: false,
212
+ fastForward: false,
213
+ error: `Failed to checkout ${originalBranch}: ${msg}`,
214
+ };
215
+ }
216
+
217
+ // Try fast-forward merge first
218
+ try {
219
+ execSync(`git merge --ff-only "${branch}"`, { encoding: 'utf-8', stdio: 'pipe' });
220
+ return { success: true, merged: true, fastForward: true };
221
+ } catch {
222
+ // Fast-forward not possible, try regular merge
223
+ }
224
+
225
+ // Try regular merge
226
+ try {
227
+ execSync(`git merge "${branch}"`, { encoding: 'utf-8', stdio: 'pipe' });
228
+ return { success: true, merged: true, fastForward: false };
229
+ } catch {
230
+ // Merge conflicts - abort
231
+ try {
232
+ execSync('git merge --abort', { encoding: 'utf-8', stdio: 'pipe' });
233
+ } catch {
234
+ logger.warn('Failed to abort merge - repo may be in an inconsistent state');
235
+ }
236
+
237
+ return {
238
+ success: false,
239
+ merged: false,
240
+ fastForward: false,
241
+ error: `Merge conflicts detected. Please merge branch "${branch}" into "${originalBranch}" manually.`,
242
+ };
243
+ }
244
+ }
245
+
246
+ /**
247
+ * Remove a single worktree.
248
+ * Used for failed-plan cleanup and post-completion cleanup.
249
+ * The git branch is preserved — only the worktree directory is removed.
250
+ *
251
+ * @param worktreePath - The worktree directory to remove
252
+ * @returns true if removal succeeded, false otherwise
253
+ */
254
+ export function removeWorktree(worktreePath: string): { success: boolean; error?: string } {
255
+ try {
256
+ execSync(`git worktree remove "${worktreePath}"`, { encoding: 'utf-8', stdio: 'pipe' });
257
+ return { success: true };
258
+ } catch (error) {
259
+ const msg = error instanceof Error ? error.message : String(error);
260
+ return {
261
+ success: false,
262
+ error: `Failed to remove worktree at ${worktreePath}: ${msg}`,
263
+ };
264
+ }
265
+ }
266
+
267
+ /**
268
+ * Check if a local branch exists.
269
+ *
270
+ * @param branchName - The branch name to check
271
+ * @returns true if the branch exists locally
272
+ */
273
+ export function branchExists(branchName: string): boolean {
274
+ try {
275
+ const output = execSync(`git branch --list "${branchName}"`, { encoding: 'utf-8', stdio: 'pipe' }).trim();
276
+ return output.length > 0;
277
+ } catch {
278
+ return false;
279
+ }
280
+ }
281
+
282
+ /**
283
+ * Create a git worktree at the computed path from an existing branch.
284
+ * Unlike `createWorktree()`, this does NOT create a new branch — it attaches
285
+ * to a branch that already exists locally.
286
+ *
287
+ * @param repoBasename - The basename of the repo root directory
288
+ * @param projectId - The full project folder name (used as both directory name and branch name)
289
+ */
290
+ export function createWorktreeFromBranch(repoBasename: string, projectId: string): WorktreeCreateResult {
291
+ const worktreePath = computeWorktreePath(repoBasename, projectId);
292
+ const branch = projectId;
293
+
294
+ // Check branch exists
295
+ if (!branchExists(branch)) {
296
+ return {
297
+ success: false,
298
+ worktreePath,
299
+ branch,
300
+ error: `Branch "${branch}" does not exist locally`,
301
+ };
302
+ }
303
+
304
+ // Ensure parent directory exists
305
+ const baseDir = computeWorktreeBaseDir(repoBasename);
306
+ try {
307
+ fs.mkdirSync(baseDir, { recursive: true });
308
+ } catch (error) {
309
+ return {
310
+ success: false,
311
+ worktreePath,
312
+ branch,
313
+ error: `Failed to create parent directory ${baseDir}: ${error}`,
314
+ };
315
+ }
316
+
317
+ try {
318
+ execSync(`git worktree add "${worktreePath}" "${branch}"`, {
319
+ encoding: 'utf-8',
320
+ stdio: 'pipe',
321
+ });
322
+ return { success: true, worktreePath, branch };
323
+ } catch (error) {
324
+ const msg = error instanceof Error ? error.message : String(error);
325
+ return {
326
+ success: false,
327
+ worktreePath,
328
+ branch,
329
+ error: `Failed to create worktree: ${msg}`,
330
+ };
331
+ }
332
+ }
333
+
334
+ /**
335
+ * List all worktree project directories for the current repo.
336
+ * Scans `~/.raf/worktrees/<repo-basename>/` and returns the list of project folder names.
337
+ *
338
+ * @param repoBasename - The basename of the repo root directory
339
+ * @returns Sorted array of project folder names (e.g., ['020-worktree-weaver', '021-another-feature'])
340
+ */
341
+ export function listWorktreeProjects(repoBasename: string): string[] {
342
+ const baseDir = computeWorktreeBaseDir(repoBasename);
343
+
344
+ if (!fs.existsSync(baseDir)) {
345
+ return [];
346
+ }
347
+
348
+ try {
349
+ const entries = fs.readdirSync(baseDir, { withFileTypes: true });
350
+ const projects = entries
351
+ .filter(entry => entry.isDirectory())
352
+ .map(entry => entry.name)
353
+ .sort();
354
+ return projects;
355
+ } catch {
356
+ return [];
357
+ }
358
+ }
359
+
360
+ export interface WorktreeProjectResolution {
361
+ /** The worktree project folder name (e.g., "ahrren-turbo-finder") */
362
+ folder: string;
363
+ /** The worktree root path (e.g., ~/.raf/worktrees/RAF/ahrren-turbo-finder) */
364
+ worktreeRoot: string;
365
+ }
366
+
367
+ /**
368
+ * Resolve a project identifier against worktree folder names.
369
+ * Uses the same matching strategy as `resolveProjectIdentifierWithDetails`:
370
+ * 1. Full folder name match (exact, case-insensitive)
371
+ * 2. Base26 prefix match (6-char ID)
372
+ * 3. Project name match (the portion after the prefix)
373
+ *
374
+ * @param repoBasename - The basename of the current git repo
375
+ * @param identifier - The project identifier to resolve
376
+ * @returns The matched worktree project info or null if not found
377
+ */
378
+ export function resolveWorktreeProjectByIdentifier(
379
+ repoBasename: string,
380
+ identifier: string,
381
+ ): WorktreeProjectResolution | null {
382
+ const wtProjectDirs = listWorktreeProjects(repoBasename);
383
+ if (wtProjectDirs.length === 0) return null;
384
+
385
+ const lowerIdentifier = identifier.toLowerCase();
386
+
387
+ // 1. Full folder name match (exact, case-insensitive)
388
+ for (const dir of wtProjectDirs) {
389
+ if (dir.toLowerCase() === lowerIdentifier) {
390
+ return {
391
+ folder: dir,
392
+ worktreeRoot: computeWorktreePath(repoBasename, dir),
393
+ };
394
+ }
395
+ }
396
+
397
+ // 2. Base26 prefix match
398
+ if (isBase26Prefix(identifier)) {
399
+ const targetNumber = decodeBase26(identifier);
400
+ if (targetNumber !== null) {
401
+ for (const dir of wtProjectDirs) {
402
+ const prefix = extractProjectNumber(dir);
403
+ if (prefix) {
404
+ const dirNumber = decodeBase26(prefix);
405
+ if (dirNumber === targetNumber) {
406
+ return {
407
+ folder: dir,
408
+ worktreeRoot: computeWorktreePath(repoBasename, dir),
409
+ };
410
+ }
411
+ }
412
+ }
413
+ }
414
+ }
415
+
416
+ // 3. Project name match (case-insensitive)
417
+ const nameMatches: string[] = [];
418
+ for (const dir of wtProjectDirs) {
419
+ const name = extractProjectName(dir);
420
+ if (name && name.toLowerCase() === lowerIdentifier) {
421
+ nameMatches.push(dir);
422
+ }
423
+ }
424
+
425
+ if (nameMatches.length === 1) {
426
+ return {
427
+ folder: nameMatches[0]!,
428
+ worktreeRoot: computeWorktreePath(repoBasename, nameMatches[0]!),
429
+ };
430
+ }
431
+
432
+ // Ambiguous or no match
433
+ return null;
434
+ }
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ import { Command } from 'commander';
4
4
  import { createPlanCommand } from './commands/plan.js';
5
5
  import { createDoCommand } from './commands/do.js';
6
6
  import { createStatusCommand } from './commands/status.js';
7
+ import { createMigrateCommand } from './commands/migrate.js';
7
8
  import { getVersion } from './utils/version.js';
8
9
 
9
10
  const program = new Command();
@@ -16,5 +17,6 @@ program
16
17
  program.addCommand(createPlanCommand());
17
18
  program.addCommand(createDoCommand());
18
19
  program.addCommand(createStatusCommand());
20
+ program.addCommand(createMigrateCommand());
19
21
 
20
22
  program.parse();
@@ -11,6 +11,7 @@
11
11
  export interface StreamEvent {
12
12
  type: string;
13
13
  subtype?: string;
14
+ session_id?: string;
14
15
  message?: {
15
16
  content?: ContentBlock[];
16
17
  };
@@ -72,6 +73,8 @@ export interface RenderResult {
72
73
  display: string;
73
74
  /** Text content to accumulate for output parsing (completion markers, etc.) */
74
75
  textContent: string;
76
+ /** Session ID extracted from system init event, if present */
77
+ sessionId?: string;
75
78
  }
76
79
 
77
80
  /**
@@ -93,7 +96,7 @@ export function renderStreamEvent(line: string): RenderResult {
93
96
 
94
97
  switch (event.type) {
95
98
  case 'system':
96
- return { display: '', textContent: '' };
99
+ return { display: '', textContent: '', sessionId: event.session_id };
97
100
 
98
101
  case 'assistant':
99
102
  return renderAssistant(event);
@@ -1,10 +1,12 @@
1
1
  import { DerivedTask } from '../core/state-derivation.js';
2
+ import { encodeTaskId } from '../utils/paths.js';
2
3
 
3
4
  export interface AmendPromptParams {
4
5
  projectPath: string;
5
6
  existingTasks: Array<DerivedTask & { taskName: string }>;
6
7
  nextTaskNumber: number;
7
8
  newTaskDescription: string;
9
+ worktreeMode?: boolean;
8
10
  }
9
11
 
10
12
  export interface AmendPromptResult {
@@ -23,7 +25,9 @@ export function getAmendPrompt(params: AmendPromptParams): AmendPromptResult {
23
25
  existingTasks,
24
26
  nextTaskNumber,
25
27
  newTaskDescription,
28
+ worktreeMode,
26
29
  } = params;
30
+ const worktreeFlag = worktreeMode ? ' --worktree' : '';
27
31
 
28
32
  const existingTasksSummary = existingTasks
29
33
  .map((task) => {
@@ -63,7 +67,7 @@ You are in AMENDMENT MODE. This means:
63
67
  - You MAY modify [MODIFIABLE] tasks (pending/failed) if the user requests changes
64
68
  - NEVER modify [PROTECTED] tasks (completed) - their outcomes depend on the original plan
65
69
  - DO NOT renumber existing tasks
66
- - You can create NEW tasks starting from number ${nextTaskNumber.toString().padStart(3, '0')}
70
+ - You can create NEW tasks starting from number ${encodeTaskId(nextTaskNumber)}
67
71
 
68
72
  ## Project Location
69
73
 
@@ -101,7 +105,7 @@ Read the user's description of new tasks and identify what needs to be added. Co
101
105
  **Identifying Follow-up Tasks**: When a new task is a follow-up, fix, or iteration of a previously completed task, you MUST reference the previous task's outcome in the new plan's Context section. This gives the executing agent full context about what was done before.
102
106
 
103
107
  Use this format in the Context section:
104
- \`This is a follow-up to task NNN. See outcome: {projectPath}/outcomes/NNN-task-name.md\`
108
+ \`This is a follow-up to task NN. See outcome: {projectPath}/outcomes/NN-task-name.md\`
105
109
 
106
110
  The outcome file paths for completed tasks are listed above in the Existing Tasks section.
107
111
 
@@ -127,8 +131,8 @@ Use this format:
127
131
  ### Step 4: Create New Plan Files
128
132
 
129
133
  After interviewing the user about all NEW tasks, create plan files starting from the next available number:
130
- - ${projectPath}/plans/${nextTaskNumber.toString().padStart(3, '0')}-task-name.md
131
- - ${projectPath}/plans/${(nextTaskNumber + 1).toString().padStart(3, '0')}-task-name.md
134
+ - ${projectPath}/plans/${encodeTaskId(nextTaskNumber)}-task-name.md
135
+ - ${projectPath}/plans/${encodeTaskId(nextTaskNumber + 1)}-task-name.md
132
136
  - etc.
133
137
 
134
138
  Each plan file should follow this structure:
@@ -142,11 +146,11 @@ Each plan file should follow this structure:
142
146
  ## Context
143
147
  [Why this task is needed, how it fits into the larger project]
144
148
  [Reference relevant existing tasks if applicable]
145
- [For follow-up/fix tasks: "This is a follow-up to task NNN. See outcome: {projectPath}/outcomes/NNN-task-name.md"]
149
+ [For follow-up/fix tasks: "This is a follow-up to task NN. See outcome: {projectPath}/outcomes/NN-task-name.md"]
146
150
 
147
151
  ## Dependencies
148
152
  [Optional section - omit if task has no dependencies]
149
- [Comma-separated list of task IDs this task depends on, e.g., "001, 002"]
153
+ [Comma-separated list of task IDs this task depends on, e.g., "01, 02"]
150
154
  [If a dependency fails, this task will be automatically blocked]
151
155
 
152
156
  ## Requirements
@@ -181,7 +185,9 @@ After creating all new plan files:
181
185
  2. Display this exit message to the user:
182
186
 
183
187
  \`\`\`
184
- Planning complete! Press Ctrl-C twice to exit to exit this session
188
+ Planning complete! To exit this session and run your tasks:
189
+ 1. Press Ctrl-C twice to exit
190
+ 2. Then run: raf do <project>${worktreeFlag}
185
191
  \`\`\`
186
192
 
187
193
  ## Important Rules
@@ -189,10 +195,10 @@ Planning complete! Press Ctrl-C twice to exit to exit this session
189
195
  1. NEVER modify COMPLETED task plans - they are [PROTECTED] because their outcomes depend on the original plan
190
196
  2. You MAY modify non-completed task plans (pending/failed) if the user requests changes - they are [MODIFIABLE]
191
197
  3. ALWAYS interview the user before creating or modifying plans
192
- 4. New tasks start from number ${nextTaskNumber.toString().padStart(3, '0')}
198
+ 4. New tasks start from number ${encodeTaskId(nextTaskNumber)}
193
199
  5. Use descriptive, kebab-case names for plan files
194
200
  6. Each plan should be self-contained with all context needed
195
- 7. Specify task dependencies using the ## Dependencies section with task IDs only (e.g., "001, 002")
201
+ 7. Specify task dependencies using the ## Dependencies section with task IDs only (e.g., "01, 02")
196
202
  8. Tasks without dependencies should omit the Dependencies section entirely
197
203
  9. Be specific - vague plans lead to poor execution
198
204
 
@@ -83,8 +83,8 @@ ${previousOutcomes.map((o) => `### Task ${o.taskId}\n${o.content}`).join('\n\n')
83
83
  `;
84
84
  }
85
85
 
86
- // Zero-pad task number to 3 digits
87
- const paddedTaskNumber = taskNumber.toString().padStart(3, '0');
86
+ // Encode task number to 2-char base36
87
+ const paddedTaskNumber = taskNumber.toString(36).padStart(2, '0');
88
88
 
89
89
  const commitInstructions = autoCommit
90
90
  ? `
@@ -98,6 +98,8 @@ After successfully completing the task:
98
98
  2. Commit with message: "RAF[${projectNumber}:${paddedTaskNumber}] <description>"
99
99
  - Write a concise description of what was accomplished
100
100
  - Focus on the actual change, not the task name
101
+ - The commit message must be a SINGLE LINE — no body, no trailers
102
+ - Do NOT add Co-Authored-By or any other trailers to the commit message
101
103
 
102
104
  **IMPORTANT - On Failure**: If the task fails, do NOT commit. Just write the outcome file with the \`<promise>FAILED</promise>\` marker and stop. Uncommitted changes will be preserved for debugging.
103
105
  `
@@ -1,6 +1,7 @@
1
1
  export interface PlanningPromptParams {
2
2
  projectPath: string;
3
3
  inputContent: string;
4
+ worktreeMode?: boolean;
4
5
  }
5
6
 
6
7
  export interface PlanningPromptResult {
@@ -14,7 +15,8 @@ export interface PlanningPromptResult {
14
15
  * - userMessage: Reference to input.md file (via positional argument, triggers Claude to start)
15
16
  */
16
17
  export function getPlanningPrompt(params: PlanningPromptParams): PlanningPromptResult {
17
- const { projectPath } = params;
18
+ const { projectPath, worktreeMode } = params;
19
+ const worktreeFlag = worktreeMode ? ' --worktree' : '';
18
20
 
19
21
  const systemPrompt = `You are a project planning assistant for RAF (Ralph's Automation Framework). Your task is to analyze the user's project description and create detailed task plans.
20
22
 
@@ -74,8 +76,8 @@ This file serves as documentation of design choices made during planning. Append
74
76
  ### Step 3: Create Plan Files
75
77
 
76
78
  After interviewing the user about all tasks, create plan files in the plans folder:
77
- - ${projectPath}/plans/001-task-name.md
78
- - ${projectPath}/plans/002-task-name.md
79
+ - ${projectPath}/plans/01-task-name.md
80
+ - ${projectPath}/plans/02-task-name.md
79
81
  - etc.
80
82
 
81
83
  Each plan file should follow this structure:
@@ -91,7 +93,7 @@ Each plan file should follow this structure:
91
93
 
92
94
  ## Dependencies
93
95
  [Optional section - omit if task has no dependencies]
94
- [Comma-separated list of task IDs this task depends on, e.g., "001, 002"]
96
+ [Comma-separated list of task IDs this task depends on, e.g., "01, 02"]
95
97
  [If a dependency fails, this task will be automatically blocked]
96
98
 
97
99
  ## Requirements
@@ -128,12 +130,12 @@ For each task, analyze which other tasks must complete successfully before it ca
128
130
  **Dependency format examples:**
129
131
  \`\`\`markdown
130
132
  ## Dependencies
131
- 001
133
+ 01
132
134
  \`\`\`
133
135
  or for multiple dependencies:
134
136
  \`\`\`markdown
135
137
  ## Dependencies
136
- 001, 002
138
+ 01, 02
137
139
  \`\`\`
138
140
 
139
141
  **Rules for dependencies:**
@@ -151,13 +153,13 @@ After creating all plan files:
151
153
  \`\`\`
152
154
  Planning complete! To exit this session and run your tasks:
153
155
  1. Press Ctrl-C twice to exit
154
- 2. Then run: raf do <project>
156
+ 2. Then run: raf do <project>${worktreeFlag}
155
157
  \`\`\`
156
158
 
157
159
  ## Important Rules
158
160
 
159
161
  1. ALWAYS interview the user before creating plans
160
- 2. Create plans in numbered order (001, 002, 003, etc.) reflecting logical execution order
162
+ 2. Create plans in numbered order (01, 02, 03, etc.) reflecting logical execution order
161
163
  3. Use descriptive, kebab-case names for plan files
162
164
  4. Each plan should be self-contained with all context needed
163
165
  5. Infer dependencies automatically - analyze task relationships, don't ask the user about dependencies
@@ -28,8 +28,15 @@ export interface DoCommandOptions {
28
28
  force?: boolean;
29
29
  model?: ClaudeModelName;
30
30
  sonnet?: boolean;
31
+ worktree?: boolean;
32
+ resume?: string;
31
33
  }
32
34
 
33
35
  export interface StatusCommandOptions {
34
36
  json?: boolean;
35
37
  }
38
+
39
+ export interface MigrateCommandOptions {
40
+ dryRun?: boolean;
41
+ worktree?: boolean;
42
+ }