rafcode 1.2.0 → 2.0.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 (398) hide show
  1. package/CLAUDE.md +118 -22
  2. package/RAF/aaaabt-verbose-chronicle/decisions.md +25 -0
  3. package/RAF/aaaabt-verbose-chronicle/input.md +3 -0
  4. package/RAF/aaaabt-verbose-chronicle/outcomes/01-amend-iteration-references.md +25 -0
  5. package/RAF/aaaabt-verbose-chronicle/outcomes/02-verbose-task-name-display.md +31 -0
  6. package/RAF/aaaabt-verbose-chronicle/outcomes/03-verbose-streaming-fix.md +48 -0
  7. package/RAF/aaaabt-verbose-chronicle/outcomes/04-commit-verification-before-halt.md +56 -0
  8. package/RAF/aaaabt-verbose-chronicle/plans/01-amend-iteration-references.md +35 -0
  9. package/RAF/aaaabt-verbose-chronicle/plans/02-verbose-task-name-display.md +38 -0
  10. package/RAF/aaaabt-verbose-chronicle/plans/03-verbose-streaming-fix.md +45 -0
  11. package/RAF/aaaabt-verbose-chronicle/plans/04-commit-verification-before-halt.md +62 -0
  12. package/RAF/aaaacu-worktree-weaver/decisions.md +88 -0
  13. package/RAF/aaaacu-worktree-weaver/input.md +27 -0
  14. package/RAF/aaaacu-worktree-weaver/outcomes/01-git-worktree-utilities.md +41 -0
  15. package/RAF/aaaacu-worktree-weaver/outcomes/02-worktree-plan-command.md +44 -0
  16. package/RAF/aaaacu-worktree-weaver/outcomes/03-worktree-do-command.md +58 -0
  17. package/RAF/aaaacu-worktree-weaver/outcomes/04-auto-merge-and-cleanup.md +40 -0
  18. package/RAF/aaaacu-worktree-weaver/outcomes/05-worktree-tests.md +43 -0
  19. package/RAF/aaaacu-worktree-weaver/outcomes/06-update-documentation.md +33 -0
  20. package/RAF/aaaacu-worktree-weaver/plans/01-git-worktree-utilities.md +51 -0
  21. package/RAF/aaaacu-worktree-weaver/plans/02-worktree-plan-command.md +93 -0
  22. package/RAF/aaaacu-worktree-weaver/plans/03-worktree-do-command.md +81 -0
  23. package/RAF/aaaacu-worktree-weaver/plans/04-auto-merge-and-cleanup.md +51 -0
  24. package/RAF/aaaacu-worktree-weaver/plans/05-worktree-tests.md +52 -0
  25. package/RAF/aaaacu-worktree-weaver/plans/06-update-documentation.md +55 -0
  26. package/RAF/aaaacv-trim-the-fat/decisions.md +34 -0
  27. package/RAF/aaaacv-trim-the-fat/input.md +5 -0
  28. package/RAF/aaaacv-trim-the-fat/outcomes/01-add-worktree-support-to-status.md +43 -0
  29. package/RAF/aaaacv-trim-the-fat/outcomes/02-remove-multi-project-from-do.md +50 -0
  30. package/RAF/aaaacv-trim-the-fat/outcomes/03-commit-artifacts-on-amend.md +35 -0
  31. package/RAF/aaaacv-trim-the-fat/outcomes/04-worktree-aware-exit-messages.md +36 -0
  32. package/RAF/aaaacv-trim-the-fat/plans/01-add-worktree-support-to-status.md +43 -0
  33. package/RAF/aaaacv-trim-the-fat/plans/02-remove-multi-project-from-do.md +44 -0
  34. package/RAF/aaaacv-trim-the-fat/plans/03-commit-artifacts-on-amend.md +38 -0
  35. package/RAF/aaaacv-trim-the-fat/plans/04-worktree-aware-exit-messages.md +38 -0
  36. package/RAF/aaaacw-prune-cycle/decisions.md +25 -0
  37. package/RAF/aaaacw-prune-cycle/input.md +5 -0
  38. package/RAF/aaaacw-prune-cycle/outcomes/01-create-worktree-from-branch.md +32 -0
  39. package/RAF/aaaacw-prune-cycle/outcomes/02-cleanup-worktree-on-success.md +33 -0
  40. package/RAF/aaaacw-prune-cycle/outcomes/03-amend-recreate-worktree.md +40 -0
  41. package/RAF/aaaacw-prune-cycle/plans/01-create-worktree-from-branch.md +31 -0
  42. package/RAF/aaaacw-prune-cycle/plans/02-cleanup-worktree-on-success.md +38 -0
  43. package/RAF/aaaacw-prune-cycle/plans/03-amend-recreate-worktree.md +50 -0
  44. package/RAF/aaaacx-epoch-shift/decisions.md +25 -0
  45. package/RAF/aaaacx-epoch-shift/input.md +1 -0
  46. package/RAF/aaaacx-epoch-shift/outcomes/01-epoch-id-generation.md +34 -0
  47. package/RAF/aaaacx-epoch-shift/outcomes/02-update-pattern-matching.md +32 -0
  48. package/RAF/aaaacx-epoch-shift/outcomes/03-update-tests.md +59 -0
  49. package/RAF/aaaacx-epoch-shift/outcomes/04-update-documentation.md +30 -0
  50. package/RAF/aaaacx-epoch-shift/plans/01-epoch-id-generation.md +40 -0
  51. package/RAF/aaaacx-epoch-shift/plans/02-update-pattern-matching.md +60 -0
  52. package/RAF/aaaacx-epoch-shift/plans/03-update-tests.md +48 -0
  53. package/RAF/aaaacx-epoch-shift/plans/04-update-documentation.md +44 -0
  54. package/RAF/ahmpro-merge-guardian/decisions.md +25 -0
  55. package/RAF/ahmpro-merge-guardian/input.md +4 -0
  56. package/RAF/ahmpro-merge-guardian/outcomes/001-fix-amend-worktree-commit.md +45 -0
  57. package/RAF/ahmpro-merge-guardian/outcomes/002-base36-task-ids.md +55 -0
  58. package/RAF/ahmpro-merge-guardian/outcomes/003-worktree-pr-creation.md +41 -0
  59. package/RAF/ahmpro-merge-guardian/outcomes/004-post-execution-picker.md +53 -0
  60. package/RAF/ahmpro-merge-guardian/plans/001-fix-amend-worktree-commit.md +39 -0
  61. package/RAF/ahmpro-merge-guardian/plans/002-base36-task-ids.md +43 -0
  62. package/RAF/ahmpro-merge-guardian/plans/003-worktree-pr-creation.md +43 -0
  63. package/RAF/ahmpro-merge-guardian/plans/004-post-execution-picker.md +51 -0
  64. package/RAF/ahnbcu-letterjam/decisions.md +13 -0
  65. package/RAF/ahnbcu-letterjam/input.md +3 -0
  66. package/RAF/ahnbcu-letterjam/outcomes/01-base26-encoding.md +42 -0
  67. package/RAF/ahnbcu-letterjam/outcomes/02-update-tests.md +38 -0
  68. package/RAF/ahnbcu-letterjam/outcomes/03-migrate-command.md +51 -0
  69. package/RAF/ahnbcu-letterjam/outcomes/04-update-documentation.md +29 -0
  70. package/RAF/ahnbcu-letterjam/plans/01-base26-encoding.md +36 -0
  71. package/RAF/ahnbcu-letterjam/plans/02-update-tests.md +37 -0
  72. package/RAF/ahnbcu-letterjam/plans/03-migrate-command.md +49 -0
  73. package/RAF/ahnbcu-letterjam/plans/04-update-documentation.md +39 -0
  74. package/RAF/ahnwrk-worktree-weaver/decisions.md +19 -0
  75. package/RAF/ahnwrk-worktree-weaver/input.md +4 -0
  76. package/RAF/ahnwrk-worktree-weaver/outcomes/01-remove-co-authored-by.md +20 -0
  77. package/RAF/ahnwrk-worktree-weaver/outcomes/02-update-task-status-format.md +21 -0
  78. package/RAF/ahnwrk-worktree-weaver/outcomes/03-worktree-auto-discovery.md +34 -0
  79. package/RAF/ahnwrk-worktree-weaver/outcomes/04-fix-pr-description.md +30 -0
  80. package/RAF/ahnwrk-worktree-weaver/plans/01-remove-co-authored-by.md +26 -0
  81. package/RAF/ahnwrk-worktree-weaver/plans/02-update-task-status-format.md +27 -0
  82. package/RAF/ahnwrk-worktree-weaver/plans/03-worktree-auto-discovery.md +37 -0
  83. package/RAF/ahnwrk-worktree-weaver/plans/04-fix-pr-description.md +50 -0
  84. package/README.md +56 -10
  85. package/dist/commands/do.d.ts +15 -0
  86. package/dist/commands/do.d.ts.map +1 -1
  87. package/dist/commands/do.js +400 -131
  88. package/dist/commands/do.js.map +1 -1
  89. package/dist/commands/migrate.d.ts +14 -0
  90. package/dist/commands/migrate.d.ts.map +1 -0
  91. package/dist/commands/migrate.js +228 -0
  92. package/dist/commands/migrate.js.map +1 -0
  93. package/dist/commands/plan.d.ts.map +1 -1
  94. package/dist/commands/plan.js +237 -40
  95. package/dist/commands/plan.js.map +1 -1
  96. package/dist/commands/status.d.ts.map +1 -1
  97. package/dist/commands/status.js +221 -47
  98. package/dist/commands/status.js.map +1 -1
  99. package/dist/core/claude-runner.d.ts +52 -1
  100. package/dist/core/claude-runner.d.ts.map +1 -1
  101. package/dist/core/claude-runner.js +195 -17
  102. package/dist/core/claude-runner.js.map +1 -1
  103. package/dist/core/git.d.ts +29 -5
  104. package/dist/core/git.d.ts.map +1 -1
  105. package/dist/core/git.js +95 -18
  106. package/dist/core/git.js.map +1 -1
  107. package/dist/core/project-manager.d.ts.map +1 -1
  108. package/dist/core/project-manager.js +2 -2
  109. package/dist/core/project-manager.js.map +1 -1
  110. package/dist/core/pull-request.d.ts +84 -0
  111. package/dist/core/pull-request.d.ts.map +1 -0
  112. package/dist/core/pull-request.js +414 -0
  113. package/dist/core/pull-request.js.map +1 -0
  114. package/dist/core/state-derivation.d.ts +3 -3
  115. package/dist/core/state-derivation.d.ts.map +1 -1
  116. package/dist/core/state-derivation.js +18 -14
  117. package/dist/core/state-derivation.js.map +1 -1
  118. package/dist/core/worktree.d.ts +120 -0
  119. package/dist/core/worktree.d.ts.map +1 -0
  120. package/dist/core/worktree.js +322 -0
  121. package/dist/core/worktree.js.map +1 -0
  122. package/dist/index.js +2 -0
  123. package/dist/index.js.map +1 -1
  124. package/dist/parsers/stream-renderer.d.ts +42 -0
  125. package/dist/parsers/stream-renderer.d.ts.map +1 -0
  126. package/dist/parsers/stream-renderer.js +100 -0
  127. package/dist/parsers/stream-renderer.js.map +1 -0
  128. package/dist/prompts/amend.d.ts +1 -0
  129. package/dist/prompts/amend.d.ts.map +1 -1
  130. package/dist/prompts/amend.js +25 -10
  131. package/dist/prompts/amend.js.map +1 -1
  132. package/dist/prompts/execution.js +5 -5
  133. package/dist/prompts/execution.js.map +1 -1
  134. package/dist/prompts/planning.d.ts +1 -0
  135. package/dist/prompts/planning.d.ts.map +1 -1
  136. package/dist/prompts/planning.js +11 -10
  137. package/dist/prompts/planning.js.map +1 -1
  138. package/dist/types/config.d.ts +5 -0
  139. package/dist/types/config.d.ts.map +1 -1
  140. package/dist/ui/project-picker.d.ts +34 -3
  141. package/dist/ui/project-picker.d.ts.map +1 -1
  142. package/dist/ui/project-picker.js +78 -10
  143. package/dist/ui/project-picker.js.map +1 -1
  144. package/dist/utils/paths.d.ts +38 -43
  145. package/dist/utils/paths.d.ts.map +1 -1
  146. package/dist/utils/paths.js +123 -193
  147. package/dist/utils/paths.js.map +1 -1
  148. package/dist/utils/terminal-symbols.d.ts +2 -2
  149. package/dist/utils/terminal-symbols.js +3 -3
  150. package/dist/utils/terminal-symbols.js.map +1 -1
  151. package/dist/utils/validation.d.ts.map +1 -1
  152. package/dist/utils/validation.js +2 -8
  153. package/dist/utils/validation.js.map +1 -1
  154. package/package.json +1 -1
  155. package/src/commands/do.ts +471 -142
  156. package/src/commands/migrate.ts +269 -0
  157. package/src/commands/plan.ts +264 -40
  158. package/src/commands/status.ts +252 -45
  159. package/src/core/claude-runner.ts +270 -17
  160. package/src/core/git.ts +99 -19
  161. package/src/core/project-manager.ts +2 -1
  162. package/src/core/pull-request.ts +480 -0
  163. package/src/core/state-derivation.ts +18 -14
  164. package/src/core/worktree.ts +357 -0
  165. package/src/index.ts +2 -0
  166. package/src/parsers/stream-renderer.ts +139 -0
  167. package/src/prompts/amend.ts +27 -9
  168. package/src/prompts/execution.ts +5 -5
  169. package/src/prompts/planning.ts +12 -10
  170. package/src/types/config.ts +6 -0
  171. package/src/ui/project-picker.ts +110 -10
  172. package/src/utils/paths.ts +129 -214
  173. package/src/utils/terminal-symbols.ts +3 -3
  174. package/src/utils/validation.ts +2 -9
  175. package/tests/unit/amend-prompt.test.ts +85 -0
  176. package/tests/unit/claude-runner.test.ts +567 -1
  177. package/tests/unit/commit-planning-artifacts-worktree.test.ts +327 -0
  178. package/tests/unit/commit-planning-artifacts.test.ts +303 -35
  179. package/tests/unit/dependency-integration.test.ts +95 -95
  180. package/tests/unit/do-blocked-tasks.test.ts +53 -53
  181. package/tests/unit/do-command.test.ts +39 -132
  182. package/tests/unit/do-rerun.test.ts +65 -65
  183. package/tests/unit/do-worktree-cleanup.test.ts +151 -0
  184. package/tests/unit/execution-prompt.test.ts +71 -60
  185. package/tests/unit/failure-history.test.ts +19 -19
  186. package/tests/unit/git-commit-helpers.test.ts +103 -0
  187. package/tests/unit/git-stash.test.ts +4 -4
  188. package/tests/unit/migrate-command.test.ts +197 -0
  189. package/tests/unit/outcome-content.test.ts +20 -20
  190. package/tests/unit/paths.test.ts +269 -467
  191. package/tests/unit/plan-amend-worktree-recreate.test.ts +246 -0
  192. package/tests/unit/plan-command.test.ts +144 -93
  193. package/tests/unit/planning-prompt.test.ts +41 -4
  194. package/tests/unit/post-execution-picker.test.ts +251 -0
  195. package/tests/unit/project-manager.test.ts +20 -8
  196. package/tests/unit/project-picker.test.ts +425 -42
  197. package/tests/unit/pull-request.test.ts +852 -0
  198. package/tests/unit/state-derivation.test.ts +138 -137
  199. package/tests/unit/status-command.test.ts +344 -76
  200. package/tests/unit/stream-renderer.test.ts +286 -0
  201. package/tests/unit/terminal-symbols.test.ts +4 -4
  202. package/tests/unit/worktree-integration.test.ts +405 -0
  203. package/tests/unit/worktree.test.ts +523 -0
  204. package/tests/unit/do-multiproject.test.ts +0 -270
  205. /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/input.md +0 -0
  206. /package/RAF/{001-raf-task-improvements/outcomes/001-add-decisions-folder.md → aaaaab-raf-task-improvements/outcomes/01-add-decisions-folder.md} +0 -0
  207. /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
  208. /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
  209. /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
  210. /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
  211. /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
  212. /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
  213. /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
  214. /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/outcomes/SUMMARY.md +0 -0
  215. /package/RAF/{001-raf-task-improvements/plans/001-add-decisions-folder.md → aaaaab-raf-task-improvements/plans/01-add-decisions-folder.md} +0 -0
  216. /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
  217. /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
  218. /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
  219. /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
  220. /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
  221. /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
  222. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/decisions/DECISIONS.md +0 -0
  223. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/input.md +0 -0
  224. /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
  225. /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
  226. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/outcomes/SUMMARY.md +0 -0
  227. /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
  228. /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
  229. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/decisions/DECISIONS.md +0 -0
  230. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/input.md +0 -0
  231. /package/RAF/{003-multi-project-execution/outcomes/001-remove-state-json.md → aaaaad-multi-project-execution/outcomes/01-remove-state-json.md} +0 -0
  232. /package/RAF/{003-multi-project-execution/outcomes/002-update-raf-status.md → aaaaad-multi-project-execution/outcomes/02-update-raf-status.md} +0 -0
  233. /package/RAF/{003-multi-project-execution/outcomes/003-simplify-git-logic.md → aaaaad-multi-project-execution/outcomes/03-simplify-git-logic.md} +0 -0
  234. /package/RAF/{003-multi-project-execution/outcomes/004-auto-commit-planning.md → aaaaad-multi-project-execution/outcomes/04-auto-commit-planning.md} +0 -0
  235. /package/RAF/{003-multi-project-execution/outcomes/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/outcomes/05-rerun-failed-tasks.md} +0 -0
  236. /package/RAF/{003-multi-project-execution/outcomes/006-multi-project-execution.md → aaaaad-multi-project-execution/outcomes/06-multi-project-execution.md} +0 -0
  237. /package/RAF/{003-multi-project-execution/outcomes/007-verify-timeout.md → aaaaad-multi-project-execution/outcomes/07-verify-timeout.md} +0 -0
  238. /package/RAF/{003-multi-project-execution/outcomes/008-move-decisions-file.md → aaaaad-multi-project-execution/outcomes/08-move-decisions-file.md} +0 -0
  239. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/outcomes/SUMMARY.md +0 -0
  240. /package/RAF/{003-multi-project-execution/plans/001-remove-state-json.md → aaaaad-multi-project-execution/plans/01-remove-state-json.md} +0 -0
  241. /package/RAF/{003-multi-project-execution/plans/002-update-raf-status.md → aaaaad-multi-project-execution/plans/02-update-raf-status.md} +0 -0
  242. /package/RAF/{003-multi-project-execution/plans/003-simplify-git-logic.md → aaaaad-multi-project-execution/plans/03-simplify-git-logic.md} +0 -0
  243. /package/RAF/{003-multi-project-execution/plans/004-auto-commit-planning.md → aaaaad-multi-project-execution/plans/04-auto-commit-planning.md} +0 -0
  244. /package/RAF/{003-multi-project-execution/plans/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/plans/05-rerun-failed-tasks.md} +0 -0
  245. /package/RAF/{003-multi-project-execution/plans/006-multi-project-execution.md → aaaaad-multi-project-execution/plans/06-multi-project-execution.md} +0 -0
  246. /package/RAF/{003-multi-project-execution/plans/007-verify-timeout.md → aaaaad-multi-project-execution/plans/07-verify-timeout.md} +0 -0
  247. /package/RAF/{003-multi-project-execution/plans/008-move-decisions-file.md → aaaaad-multi-project-execution/plans/08-move-decisions-file.md} +0 -0
  248. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/decisions.md +0 -0
  249. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/input.md +0 -0
  250. /package/RAF/{004-task-naming-optimization/outcomes/001-remove-summary-file.md → aaaaae-task-naming-optimization/outcomes/01-remove-summary-file.md} +0 -0
  251. /package/RAF/{004-task-naming-optimization/outcomes/002-base36-project-numbering.md → aaaaae-task-naming-optimization/outcomes/02-base36-project-numbering.md} +0 -0
  252. /package/RAF/{004-task-naming-optimization/outcomes/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/outcomes/03-improve-haiku-prompt.md} +0 -0
  253. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/outcomes/SUMMARY.md +0 -0
  254. /package/RAF/{004-task-naming-optimization/plans/001-remove-summary-file.md → aaaaae-task-naming-optimization/plans/01-remove-summary-file.md} +0 -0
  255. /package/RAF/{004-task-naming-optimization/plans/002-base36-project-numbering.md → aaaaae-task-naming-optimization/plans/02-base36-project-numbering.md} +0 -0
  256. /package/RAF/{004-task-naming-optimization/plans/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/plans/03-improve-haiku-prompt.md} +0 -0
  257. /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/decisions.md +0 -0
  258. /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/input.md +0 -0
  259. /package/RAF/{005-task-naming-improvements/outcomes/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/outcomes/01-enhance-identifier-resolution.md} +0 -0
  260. /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
  261. /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
  262. /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
  263. /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
  264. /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
  265. /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
  266. /package/RAF/{005-task-naming-improvements/outcomes/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/outcomes/08-fix-timeout-label.md} +0 -0
  267. /package/RAF/{005-task-naming-improvements/plans/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/plans/01-enhance-identifier-resolution.md} +0 -0
  268. /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
  269. /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
  270. /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
  271. /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
  272. /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
  273. /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
  274. /package/RAF/{005-task-naming-improvements/plans/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/plans/08-fix-timeout-label.md} +0 -0
  275. /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/decisions.md +0 -0
  276. /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/input.md +0 -0
  277. /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
  278. /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
  279. /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
  280. /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
  281. /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
  282. /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
  283. /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
  284. /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
  285. /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/decisions.md +0 -0
  286. /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/input.md +0 -0
  287. /package/RAF/{007-improve-outcome-format/outcomes/001-update-execution-prompt.md → aaaaah-improve-outcome-format/outcomes/01-update-execution-prompt.md} +0 -0
  288. /package/RAF/{007-improve-outcome-format/outcomes/002-update-state-derivation.md → aaaaah-improve-outcome-format/outcomes/02-update-state-derivation.md} +0 -0
  289. /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
  290. /package/RAF/{007-improve-outcome-format/outcomes/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/outcomes/04-implement-failure-analysis.md} +0 -0
  291. /package/RAF/{007-improve-outcome-format/outcomes/005-update-documentation.md → aaaaah-improve-outcome-format/outcomes/05-update-documentation.md} +0 -0
  292. /package/RAF/{007-improve-outcome-format/plans/001-update-execution-prompt.md → aaaaah-improve-outcome-format/plans/01-update-execution-prompt.md} +0 -0
  293. /package/RAF/{007-improve-outcome-format/plans/002-update-state-derivation.md → aaaaah-improve-outcome-format/plans/02-update-state-derivation.md} +0 -0
  294. /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
  295. /package/RAF/{007-improve-outcome-format/plans/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/plans/04-implement-failure-analysis.md} +0 -0
  296. /package/RAF/{007-improve-outcome-format/plans/005-update-documentation.md → aaaaah-improve-outcome-format/plans/05-update-documentation.md} +0 -0
  297. /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/decisions.md +0 -0
  298. /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/input.md +0 -0
  299. /package/RAF/{008-beautiful-do/outcomes/001-terminal-symbols.md → aaaaai-beautiful-do/outcomes/01-terminal-symbols.md} +0 -0
  300. /package/RAF/{008-beautiful-do/outcomes/002-refactor-do-output.md → aaaaai-beautiful-do/outcomes/02-refactor-do-output.md} +0 -0
  301. /package/RAF/{008-beautiful-do/outcomes/003-refactor-status-output.md → aaaaai-beautiful-do/outcomes/03-refactor-status-output.md} +0 -0
  302. /package/RAF/{008-beautiful-do/outcomes/004-simplify-logger.md → aaaaai-beautiful-do/outcomes/04-simplify-logger.md} +0 -0
  303. /package/RAF/{008-beautiful-do/outcomes/005-add-tests.md → aaaaai-beautiful-do/outcomes/05-add-tests.md} +0 -0
  304. /package/RAF/{008-beautiful-do/plans/001-terminal-symbols.md → aaaaai-beautiful-do/plans/01-terminal-symbols.md} +0 -0
  305. /package/RAF/{008-beautiful-do/plans/002-refactor-do-output.md → aaaaai-beautiful-do/plans/02-refactor-do-output.md} +0 -0
  306. /package/RAF/{008-beautiful-do/plans/003-refactor-status-output.md → aaaaai-beautiful-do/plans/03-refactor-status-output.md} +0 -0
  307. /package/RAF/{008-beautiful-do/plans/004-simplify-logger.md → aaaaai-beautiful-do/plans/04-simplify-logger.md} +0 -0
  308. /package/RAF/{008-beautiful-do/plans/005-add-tests.md → aaaaai-beautiful-do/plans/05-add-tests.md} +0 -0
  309. /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/decisions.md +0 -0
  310. /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/input.md +0 -0
  311. /package/RAF/{009-system-promt-ammend/outcomes/001-model-override.md → aaaaaj-system-promt-ammend/outcomes/01-model-override.md} +0 -0
  312. /package/RAF/{009-system-promt-ammend/outcomes/002-system-prompt-append.md → aaaaaj-system-promt-ammend/outcomes/02-system-prompt-append.md} +0 -0
  313. /package/RAF/{009-system-promt-ammend/outcomes/003-retry-context.md → aaaaaj-system-promt-ammend/outcomes/03-retry-context.md} +0 -0
  314. /package/RAF/{009-system-promt-ammend/plans/001-model-override.md → aaaaaj-system-promt-ammend/plans/01-model-override.md} +0 -0
  315. /package/RAF/{009-system-promt-ammend/plans/002-system-prompt-append.md → aaaaaj-system-promt-ammend/plans/02-system-prompt-append.md} +0 -0
  316. /package/RAF/{009-system-promt-ammend/plans/003-retry-context.md → aaaaaj-system-promt-ammend/plans/03-retry-context.md} +0 -0
  317. /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/decisions.md +0 -0
  318. /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/input.md +0 -0
  319. /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
  320. /package/RAF/{010-outcome-marker-fallback/outcomes/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/outcomes/02-creative-project-naming.md} +0 -0
  321. /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
  322. /package/RAF/{010-outcome-marker-fallback/plans/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/plans/02-creative-project-naming.md} +0 -0
  323. /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/decisions.md +0 -0
  324. /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/input.md +0 -0
  325. /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
  326. /package/RAF/{011-do-task-in-commit/outcomes/002-update-tests.md → aaaabl-do-task-in-commit/outcomes/02-update-tests.md} +0 -0
  327. /package/RAF/{011-do-task-in-commit/outcomes/003-update-documentation.md → aaaabl-do-task-in-commit/outcomes/03-update-documentation.md} +0 -0
  328. /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
  329. /package/RAF/{011-do-task-in-commit/plans/002-update-tests.md → aaaabl-do-task-in-commit/plans/02-update-tests.md} +0 -0
  330. /package/RAF/{011-do-task-in-commit/plans/003-update-documentation.md → aaaabl-do-task-in-commit/plans/03-update-documentation.md} +0 -0
  331. /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/decisions.md +0 -0
  332. /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/input.md +0 -0
  333. /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
  334. /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
  335. /package/RAF/{012-name-picker-buffet/outcomes/003-raf-status-truncation.md → aaaabm-name-picker-buffet/outcomes/03-raf-status-truncation.md} +0 -0
  336. /package/RAF/{012-name-picker-buffet/outcomes/004-failure-reason-details.md → aaaabm-name-picker-buffet/outcomes/04-failure-reason-details.md} +0 -0
  337. /package/RAF/{012-name-picker-buffet/outcomes/005-remove-raf-commits.md → aaaabm-name-picker-buffet/outcomes/05-remove-raf-commits.md} +0 -0
  338. /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
  339. /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
  340. /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
  341. /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
  342. /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
  343. /package/RAF/{012-name-picker-buffet/plans/003-raf-status-truncation.md → aaaabm-name-picker-buffet/plans/03-raf-status-truncation.md} +0 -0
  344. /package/RAF/{012-name-picker-buffet/plans/004-failure-reason-details.md → aaaabm-name-picker-buffet/plans/04-failure-reason-details.md} +0 -0
  345. /package/RAF/{012-name-picker-buffet/plans/005-remove-raf-commits.md → aaaabm-name-picker-buffet/plans/05-remove-raf-commits.md} +0 -0
  346. /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
  347. /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
  348. /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
  349. /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/decisions.md +0 -0
  350. /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/input.md +0 -0
  351. /package/RAF/{013-dependencies-watchdog/outcomes/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/outcomes/01-define-dependency-syntax.md} +0 -0
  352. /package/RAF/{013-dependencies-watchdog/outcomes/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/outcomes/02-update-planning-prompts.md} +0 -0
  353. /package/RAF/{013-dependencies-watchdog/outcomes/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/outcomes/03-parse-dependencies-update-state.md} +0 -0
  354. /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
  355. /package/RAF/{013-dependencies-watchdog/outcomes/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/outcomes/05-update-execution-prompts.md} +0 -0
  356. /package/RAF/{013-dependencies-watchdog/outcomes/006-add-tests.md → aaaabn-dependencies-watchdog/outcomes/06-add-tests.md} +0 -0
  357. /package/RAF/{013-dependencies-watchdog/outcomes/007-add-act-alias.md → aaaabn-dependencies-watchdog/outcomes/07-add-act-alias.md} +0 -0
  358. /package/RAF/{013-dependencies-watchdog/outcomes/008-add-exit-message.md → aaaabn-dependencies-watchdog/outcomes/08-add-exit-message.md} +0 -0
  359. /package/RAF/{013-dependencies-watchdog/plans/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/plans/01-define-dependency-syntax.md} +0 -0
  360. /package/RAF/{013-dependencies-watchdog/plans/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/plans/02-update-planning-prompts.md} +0 -0
  361. /package/RAF/{013-dependencies-watchdog/plans/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/plans/03-parse-dependencies-update-state.md} +0 -0
  362. /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
  363. /package/RAF/{013-dependencies-watchdog/plans/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/plans/05-update-execution-prompts.md} +0 -0
  364. /package/RAF/{013-dependencies-watchdog/plans/006-add-tests.md → aaaabn-dependencies-watchdog/plans/06-add-tests.md} +0 -0
  365. /package/RAF/{013-dependencies-watchdog/plans/007-add-act-alias.md → aaaabn-dependencies-watchdog/plans/07-add-act-alias.md} +0 -0
  366. /package/RAF/{013-dependencies-watchdog/plans/008-add-exit-message.md → aaaabn-dependencies-watchdog/plans/08-add-exit-message.md} +0 -0
  367. /package/RAF/{014-watchdog → aaaabo-watchdog}/decisions.md +0 -0
  368. /package/RAF/{014-watchdog → aaaabo-watchdog}/input.md +0 -0
  369. /package/RAF/{014-watchdog/outcomes/001-amend-flag-position.md → aaaabo-watchdog/outcomes/01-amend-flag-position.md} +0 -0
  370. /package/RAF/{014-watchdog/outcomes/002-details-only-on-failure.md → aaaabo-watchdog/outcomes/02-details-only-on-failure.md} +0 -0
  371. /package/RAF/{014-watchdog/plans/001-amend-flag-position.md → aaaabo-watchdog/plans/01-amend-flag-position.md} +0 -0
  372. /package/RAF/{014-watchdog/plans/002-details-only-on-failure.md → aaaabo-watchdog/plans/02-details-only-on-failure.md} +0 -0
  373. /package/RAF/{015-name-lottery → aaaabp-name-lottery}/decisions.md +0 -0
  374. /package/RAF/{015-name-lottery → aaaabp-name-lottery}/input.md +0 -0
  375. /package/RAF/{015-name-lottery/outcomes/001-auto-pick-project-name.md → aaaabp-name-lottery/outcomes/01-auto-pick-project-name.md} +0 -0
  376. /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
  377. /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
  378. /package/RAF/{015-name-lottery/plans/001-auto-pick-project-name.md → aaaabp-name-lottery/plans/01-auto-pick-project-name.md} +0 -0
  379. /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
  380. /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
  381. /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/decisions.md +0 -0
  382. /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/input.md +0 -0
  383. /package/RAF/{016-planning-scalpel/outcomes/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/outcomes/01-update-git-commit-instructions.md} +0 -0
  384. /package/RAF/{016-planning-scalpel/plans/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/plans/01-update-git-commit-instructions.md} +0 -0
  385. /package/RAF/{017-decision-vault → aaaabr-decision-vault}/decisions.md +0 -0
  386. /package/RAF/{017-decision-vault → aaaabr-decision-vault}/input.md +0 -0
  387. /package/RAF/{017-decision-vault/outcomes/001-create-git-commit-utility.md → aaaabr-decision-vault/outcomes/01-create-git-commit-utility.md} +0 -0
  388. /package/RAF/{017-decision-vault/outcomes/002-integrate-commit-into-plan.md → aaaabr-decision-vault/outcomes/02-integrate-commit-into-plan.md} +0 -0
  389. /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
  390. /package/RAF/{017-decision-vault/plans/001-create-git-commit-utility.md → aaaabr-decision-vault/plans/01-create-git-commit-utility.md} +0 -0
  391. /package/RAF/{017-decision-vault/plans/002-integrate-commit-into-plan.md → aaaabr-decision-vault/plans/02-integrate-commit-into-plan.md} +0 -0
  392. /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
  393. /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/decisions.md +0 -0
  394. /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/input.md +0 -0
  395. /package/RAF/{018-workflow-forge/outcomes/001-add-task-number-progress.md → aaaabs-workflow-forge/outcomes/01-add-task-number-progress.md} +0 -0
  396. /package/RAF/{018-workflow-forge/outcomes/002-update-plan-do-prompts.md → aaaabs-workflow-forge/outcomes/02-update-plan-do-prompts.md} +0 -0
  397. /package/RAF/{018-workflow-forge/plans/001-add-task-number-progress.md → aaaabs-workflow-forge/plans/01-add-task-number-progress.md} +0 -0
  398. /package/RAF/{018-workflow-forge/plans/002-update-plan-do-prompts.md → aaaabs-workflow-forge/plans/02-update-plan-do-prompts.md} +0 -0
@@ -0,0 +1,51 @@
1
+ # Task: Auto-merge on Project Completion
2
+
3
+ ## Objective
4
+ When `--merge` flag is present on `raf do --worktree`, automatically merge the project branch into the original branch after all tasks complete successfully.
5
+
6
+ ## Context
7
+ After worktree execution completes, the user may want to merge the project branch back into the branch from which `raf` was originally called. This is controlled by the `--merge` flag (only valid with `--worktree`). The worktree itself is NOT cleaned up or removed after merge — it stays in place.
8
+
9
+ ## Dependencies
10
+ 003
11
+
12
+ ## Requirements
13
+ - Add `--merge` boolean flag to the do command in Commander.js
14
+ - `--merge` is only valid when `--worktree` is also present — error if `--merge` is used without `--worktree`
15
+ - After all tasks complete (project state is "completed") and `--merge` is set, attempt auto-merge:
16
+ 1. Switch back to the original branch (the branch that was active when `raf do --worktree` was invoked)
17
+ 2. Attempt merge using the merge utility from task 001 (tries ff first, falls back to merge-commit)
18
+ 3. On success: log success message with merge details
19
+ 4. On conflict: `git merge --abort` is called by the utility, log a warning with the branch name so the user can merge manually
20
+ - Record the original branch name at the start of `raf do --worktree` execution (before switching to worktree)
21
+ - The merge must happen from the ORIGINAL repo's working directory, not from inside the worktree
22
+ - If the project is NOT fully completed (has failures), skip the merge entirely — just show a message about the worktree branch
23
+ - The merge should also work for partially completed projects that were continued with `--force` and are now fully complete
24
+ - Do NOT remove or clean up the worktree after merge — the worktree stays in place
25
+
26
+ ## Implementation Steps
27
+ 1. Add `--merge` option to the Commander command definition in `src/commands/do.ts`
28
+ 2. Validate that `--merge` is only used with `--worktree`, error otherwise
29
+ 3. In the `do` command's worktree flow, record the current branch name before execution starts
30
+ 4. After the task execution loop completes, check if `--merge` is set and the project is fully completed
31
+ 5. If completed with `--merge`: call the merge utility from task 001 (passing original branch, project branch, and paths)
32
+ 6. Handle merge result: success -> log success, conflict -> log warning with manual merge instructions
33
+ 7. If project has failures: just note that the worktree branch is available for inspection
34
+ 8. No worktree cleanup or removal after merge
35
+
36
+ ## Acceptance Criteria
37
+ - [ ] `--merge` flag is added to the do command
38
+ - [ ] `--merge` without `--worktree` shows an error
39
+ - [ ] On full project completion with `--merge`, merge is attempted
40
+ - [ ] Successful merge logs a clear success message
41
+ - [ ] Merge conflicts trigger `git merge --abort` and show warning with branch name and manual merge instructions
42
+ - [ ] Incomplete projects (failures) skip merge and mention the branch
43
+ - [ ] Original branch is correctly recorded and restored
44
+ - [ ] Worktree is NOT removed or cleaned up after merge
45
+ - [ ] Without `--merge`, no merge is attempted even if project completes
46
+
47
+ ## Notes
48
+ - The merge happens in the original repo directory, not the worktree — this is important because `git merge` needs to be on the target branch
49
+ - The current branch at invocation time should be captured early (before any worktree operations change context)
50
+ - Consider the case where the user's original branch has moved forward (other commits) while the worktree was being worked on — if ff fails, a merge-commit is created; only conflicts cause failure
51
+ - Reference the worktree utility functions from task 001 for merge operations
@@ -0,0 +1,52 @@
1
+ # Task: Add Tests for Worktree Functionality
2
+
3
+ ## Objective
4
+ Add comprehensive tests covering the worktree utilities and the integration of `--worktree` and `--merge` flags into plan and do commands.
5
+
6
+ ## Context
7
+ RAF uses Jest with ts-jest ESM preset. Existing tests are in `__tests__/` directories. The worktree functionality involves git operations that need careful testing with real temporary git repos.
8
+
9
+ ## Dependencies
10
+ 001, 002, 003, 004
11
+
12
+ ## Requirements
13
+ - Unit tests for all worktree utility functions in `src/core/worktree.ts`:
14
+ - Path computation (given repo name and project folder, verify correct worktree path)
15
+ - Worktree creation (use a temporary git repo)
16
+ - Worktree validation (existing vs non-existing)
17
+ - Merge (fast-forward success, merge-commit fallback, and conflict/abort cases)
18
+ - Removal (for failed-plan cleanup scenario only)
19
+ - Integration-level tests for command behavior:
20
+ - `raf do --worktree` with multiple projects should error
21
+ - `raf do --worktree` with no worktree should error with helpful message
22
+ - `raf do --merge` without `--worktree` should error
23
+ - Test edge cases:
24
+ - Worktree path computation when repo has special characters in name
25
+ - Merge when original branch has diverged (merge-commit should be created)
26
+ - Merge with conflicts (should abort and return failure)
27
+ - Use temporary directories and real git repos for git operation tests (create temp dir, `git init`, add commits, etc.)
28
+ - Follow existing test patterns in the project
29
+
30
+ ## Implementation Steps
31
+ 1. Create `src/core/__tests__/worktree.test.ts` for unit tests of utility functions
32
+ 2. Write tests for path computation (pure function, no git needed)
33
+ 3. Write tests for worktree creation/validation/merge/removal using temporary git repos
34
+ 4. Create test helpers for setting up temporary git repos with commits
35
+ 5. Write tests for CLI validation (--worktree and --merge flag behavior)
36
+ 6. Ensure all tests clean up their temporary directories
37
+
38
+ ## Acceptance Criteria
39
+ - [ ] All worktree utility functions have unit tests
40
+ - [ ] Path computation tested with various repo and project names
41
+ - [ ] Worktree creation tested with real temporary git repo
42
+ - [ ] Merge tested for ff success, merge-commit fallback, and conflict/abort
43
+ - [ ] Removal tested for failed-plan cleanup scenario
44
+ - [ ] CLI validation tests for error cases (--merge without --worktree, etc.)
45
+ - [ ] All tests pass with `npm test`
46
+ - [ ] Tests clean up temporary files/directories
47
+
48
+ ## Notes
49
+ - Creating temporary git repos for testing: use `fs.mkdtempSync` + `execSync('git init')` + add a commit
50
+ - For worktree tests, the base repo needs at least one commit before `git worktree add` will work
51
+ - Be careful with `process.cwd()` in tests - some utilities may depend on it. Consider mocking or using `chdir` carefully
52
+ - Reference existing test files in the project for patterns and conventions
@@ -0,0 +1,55 @@
1
+ # Task: Update Documentation for Worktree Support
2
+
3
+ ## Objective
4
+ Document the `--worktree` and `--merge` flags and worktree workflow in both CLAUDE.md (internal developer docs) and README.md (user-facing docs).
5
+
6
+ ## Context
7
+ The worktree feature adds a new workflow to RAF. Users need to know how to use it, and developers maintaining RAF need to understand the architecture. Both docs files need updates.
8
+
9
+ ## Dependencies
10
+ 002, 003, 004
11
+
12
+ ## Requirements
13
+
14
+ ### README.md updates:
15
+ - Add `--worktree` to the Features section (brief mention of isolated branch execution)
16
+ - Add worktree usage examples to the Commands section for both `raf plan` and `raf do`
17
+ - Add `--worktree` and `--merge` rows to the Command Reference tables for both plan and do
18
+ - Add a new "Worktree Mode" section (after the existing "Project Structure" section) explaining:
19
+ - What worktree mode does and why you'd use it (isolated branch for parallel work)
20
+ - The basic workflow: `raf plan my-feature --worktree` -> `raf do my-feature --worktree --merge`
21
+ - Where worktree directories are created (`~/.raf/worktrees/<repo>/<project>`)
22
+ - Merge behavior with `--merge` flag (ff preferred, merge-commit fallback, conflict abort)
23
+ - What happens on failure (branch preserved, user can merge manually)
24
+ - Worktrees persist after completion — no automatic cleanup
25
+
26
+ ### CLAUDE.md updates:
27
+ - Add a new "Worktree Mode" subsection under "Architectural Decisions" explaining:
28
+ - Worktree path convention: `~/.raf/worktrees/<repo-basename>/<project-id>`
29
+ - Branch naming: full project folder name (e.g., `020-my-feature`)
30
+ - How worktree mode detection works (--worktree flag required on both plan and do)
31
+ - The lifecycle: create worktree -> plan in worktree -> execute in worktree -> optionally merge with `--merge`
32
+ - Merge strategy: ff preferred, merge-commit fallback, abort on conflicts
33
+ - Worktrees are NOT cleaned up after completion or merge
34
+ - Single project limitation (no multi-project with --worktree)
35
+ - `--merge` only valid with `--worktree`
36
+ - Add `--worktree` and `--merge` to the plan and do command descriptions if they exist in CLAUDE.md
37
+
38
+ ## Implementation Steps
39
+ 1. Read both README.md and CLAUDE.md to understand current structure
40
+ 2. Add worktree content to README.md in the appropriate sections
41
+ 3. Add worktree architectural decision to CLAUDE.md
42
+ 4. Ensure the documentation is consistent with the actual implementation
43
+
44
+ ## Acceptance Criteria
45
+ - [ ] README.md has `--worktree` and `--merge` in Features, Commands, and Command Reference
46
+ - [ ] README.md has a "Worktree Mode" section with workflow explanation
47
+ - [ ] CLAUDE.md has a "Worktree Mode" architectural decision section
48
+ - [ ] Documentation mentions that worktrees persist (no auto-cleanup)
49
+ - [ ] Documentation matches the implemented behavior
50
+ - [ ] No existing documentation is broken or contradicted
51
+
52
+ ## Notes
53
+ - Keep documentation concise - match the existing style of both files
54
+ - Focus on the user workflow in README.md and the technical architecture in CLAUDE.md
55
+ - The worktree path example should use concrete values so it's easy to understand
@@ -0,0 +1,34 @@
1
+ # Project Decisions
2
+
3
+ ## Should we remove raf status or modify it?
4
+ Don't remove status. Add automatic worktree discovery — no flag needed.
5
+
6
+ ## Should raf status need a --worktree flag?
7
+ No. Always look for worktree projects automatically (if in a git repo).
8
+
9
+ ## Should raf status show only worktree projects or both main and worktree?
10
+ Both combined. If a project exists in both main repo and worktree, don't duplicate in list mode — only show additional worktree projects and mark them.
11
+
12
+ ## How should worktree-only projects be marked in the status list?
13
+ Indented under a "Worktrees:" header at the bottom of the list.
14
+
15
+ ## How should single-project view work when project exists in both main and worktree?
16
+ Show both states separately ONLY if they differ. For example, after an amend, the main repo might show 5/5 tasks done while the worktree shows 5/7 (not fully completed). List both with clear labels (Main: / Worktree:). If states are identical, show just the normal view with no worktree label.
17
+
18
+ ## Should worktree projects always appear in status output?
19
+ Only if they differ from their main repo counterpart (more tasks, different statuses). If identical, skip them. Worktree-only projects (no main counterpart) are always shown.
20
+
21
+ ## For raf plan --amend syntax change — keep -a alias?
22
+ Keep -a alias. However, this task was SKIPPED — Commander.js treats both orderings identically so no code change needed.
23
+
24
+ ## For removing multi-project support from raf do — what should the arg look like?
25
+ Single project argument only: `raf do <project>` with exactly one identifier.
26
+
27
+ ## For amend commit — should plan files be included?
28
+ Yes. Commit input.md, decisions.md, AND any new/modified plan files.
29
+
30
+ ## Should amend commit message be distinct from new plan commit?
31
+ Yes. Use `RAF[NNN] Amend: project-name` for amendments (vs `RAF[NNN] Plan: project-name` for new plans).
32
+
33
+ ## Should planning/amend exit messages be worktree-aware?
34
+ Yes. When running in worktree mode, the exit message should show `raf do <project> --worktree` instead of `raf do <project>`. Both planning and amend prompts need this.
@@ -0,0 +1,5 @@
1
+ - [ ] remove "raf status"
2
+ - [ ] support only "raf plan project --amend" syntax (remove support for "raf plan --amend project syntax). update docs (readme and claude.md)
3
+ - [ ] remove multi project support for raf do
4
+ - [ ] even if plan was not created in amend (but updated) RAF should still commit input and decisions and updated plan files
5
+
@@ -0,0 +1,43 @@
1
+ # Outcome: Add Automatic Worktree Discovery to raf status
2
+
3
+ ## Summary
4
+
5
+ Added automatic worktree project discovery to `raf status`. When inside a git repo, the status command now discovers and displays worktree projects from `~/.raf/worktrees/<repo>/` alongside main repo projects, with no flag required.
6
+
7
+ ## Key Changes
8
+
9
+ ### `src/commands/status.ts`
10
+ - Added `getWorktreeContext()` to resolve repo basename and RAF relative path
11
+ - Added `discoverWorktreeProjectStates()` to scan worktree directories and derive project state
12
+ - Added `projectStatesDiffer()` to compare main vs worktree project states (by task count and statuses)
13
+ - **List mode** (`raf status`): Shows main repo projects normally, then appends a `Worktrees:` section listing worktree projects that differ from their main repo counterpart. Identical projects are hidden. Worktree-only projects always shown.
14
+ - **Single project mode** (`raf status <project>`): Shows both "Main:" and "Worktree:" progress bars when states differ. Shows only one view when identical or when project exists in only one location.
15
+ - **JSON output**: List mode wraps in `{ projects: [...], worktrees: [...] }`. Single project mode adds `worktree` field when worktree data exists.
16
+ - Gracefully handles non-git-repo case (skips worktree discovery silently)
17
+
18
+ ### `tests/unit/status-command.test.ts`
19
+ - Added 10 new tests covering:
20
+ - Project state comparison (identical states, differing task counts, differing statuses)
21
+ - Worktree project discovery patterns
22
+ - Filtering worktree-only vs counterpart projects
23
+ - Stats computation for worktree projects
24
+
25
+ ### `README.md`
26
+ - Updated `raf status` section to mention automatic worktree discovery
27
+
28
+ ### `CLAUDE.md`
29
+ - Added worktree discovery details to the Worktree Mode section
30
+
31
+ ## Acceptance Criteria Verification
32
+
33
+ - [x] `raf status` lists main repo projects normally, then worktree projects that differ under a `Worktrees:` header
34
+ - [x] Worktree projects identical to their main repo counterpart are not shown
35
+ - [x] `raf status <project>` shows both main repo and worktree state only when they differ
36
+ - [x] `raf status <project>` shows just worktree state when project only exists in worktree
37
+ - [x] `--json` includes worktree project data
38
+ - [x] Non-git-repo environments work fine (worktree section just doesn't appear)
39
+ - [x] README.md and CLAUDE.md updated
40
+ - [x] Tests cover the new functionality (10 new tests, all passing)
41
+ - [x] All existing tests pass (1 pre-existing failure in planning-prompt.test.ts unrelated to changes)
42
+
43
+ <promise>COMPLETE</promise>
@@ -0,0 +1,50 @@
1
+ # Outcome: Remove Multi-Project Support from raf do
2
+
3
+ ## Summary
4
+
5
+ Simplified `raf do` to accept only a single project identifier, removing the multi-project execution feature. The command argument changed from `[projects...]` (variadic) to `[project]` (single optional). All multi-project logic was removed.
6
+
7
+ ## Key Changes
8
+
9
+ ### `src/commands/do.ts`
10
+ - Changed `.argument('[projects...]', ...)` to `.argument('[project]', ...)`
11
+ - Changed action handler signature from `(projects: string[], ...)` to `(project: string | undefined, ...)`
12
+ - Rewrote `runDoCommand()` to work with a single optional identifier:
13
+ - No array iteration, deduplication (`seenPaths`), or error accumulation
14
+ - Direct project resolution instead of loop
15
+ - Simplified merge check: `result.success` instead of `results.every(r => r.success)`
16
+ - Removed `printMultiProjectSummary()` function entirely
17
+ - Removed `isMultiProject` flag and multi-project verbose logging
18
+ - Removed verbose model logging for multi-project (`if (verbose && model && resolvedProjects.length > 1)`)
19
+ - Removed worktree guard for multiple projects (no longer needed)
20
+ - Removed unused `SYMBOLS` import
21
+
22
+ ### `tests/unit/do-multiproject.test.ts`
23
+ - Deleted entirely
24
+
25
+ ### `tests/unit/do-command.test.ts`
26
+ - Removed "Multiple Projects with Full Folder Names" describe block
27
+ - Removed "Mixed Formats" describe block (tested multi-identifier resolution)
28
+ - Kept all single-project, backward compatibility, and error handling tests
29
+
30
+ ### `README.md`
31
+ - Removed `raf do 3 4 5` example from usage
32
+ - Changed command reference from `raf do [projects...]` to `raf do [project]`
33
+ - Removed `--worktree supports a single project at a time (no multi-project)` line
34
+
35
+ ### `CLAUDE.md`
36
+ - Removed `### Multi-Project Execution` section from architectural decisions
37
+ - Removed `--worktree supports single project only (no multi-project)` line from worktree section
38
+
39
+ ## Acceptance Criteria Verification
40
+
41
+ - [x] `raf do 3` works for a single project
42
+ - [x] `raf do` (no args) still shows interactive picker
43
+ - [x] `raf do --worktree` still shows worktree picker
44
+ - [x] `raf do 3 4` — Commander.js with `[project]` ignores extra args
45
+ - [x] `printMultiProjectSummary` and multi-project loop removed
46
+ - [x] `do-multiproject.test.ts` removed
47
+ - [x] README.md and CLAUDE.md updated (no multi-project references)
48
+ - [x] All remaining tests pass (843 pass, 1 pre-existing failure in planning-prompt.test.ts unrelated)
49
+
50
+ <promise>COMPLETE</promise>
@@ -0,0 +1,35 @@
1
+ # Outcome: Commit Planning Artifacts (Including Plan Files) on Amend
2
+
3
+ ## Summary
4
+
5
+ Extended `commitPlanningArtifacts()` to support amending by accepting additional file paths and an `isAmend` flag. The amend flow in `plan.ts` now passes new plan file paths to the commit function, and uses a distinct `Amend:` commit message prefix. Also fixed a bug where `isGitRepo()` was not receiving the `cwd` option for worktree support.
6
+
7
+ ## Key Changes
8
+
9
+ ### `src/core/git.ts`
10
+ - Extended `commitPlanningArtifacts()` options to include `additionalFiles?: string[]` and `isAmend?: boolean`
11
+ - When `isAmend` is true, commit message uses `RAF[NNN] Amend: project-name` instead of `RAF[NNN] Plan: project-name`
12
+ - Additional files are staged alongside `input.md` and `decisions.md`
13
+ - Fixed bug: `isGitRepo()` now receives `execCwd` parameter for correct worktree support (was called without `cwd` previously)
14
+
15
+ ### `src/commands/plan.ts`
16
+ - Updated `runAmendCommand()` to build full paths for new plan files (`newPlanPaths = newPlanFiles.map(f => path.join(plansDir, f))`)
17
+ - Passes `additionalFiles` and `isAmend: true` to `commitPlanningArtifacts()`
18
+ - Normal `raf plan` flow unchanged — still only commits input + decisions with "Plan:" prefix
19
+
20
+ ### `tests/unit/commit-planning-artifacts.test.ts`
21
+ - Added test: "should use 'Amend:' prefix when isAmend is true"
22
+ - Added test: "should stage additional files when provided"
23
+ - Added test: "should pass cwd to isGitRepo for worktree support"
24
+ - All 11 tests pass (8 existing + 3 new)
25
+
26
+ ## Acceptance Criteria Verification
27
+
28
+ - [x] `raf plan --amend` commits input.md, decisions.md, and new plan files together
29
+ - [x] Amend commits use message format `RAF[NNN] Amend: project-name`
30
+ - [x] Normal `raf plan` still uses `RAF[NNN] Plan: project-name` and only commits input + decisions
31
+ - [x] Worktree mode works correctly (cwd passed through)
32
+ - [x] Tests cover the amend commit scenario (3 new tests)
33
+ - [x] All existing tests pass (846 pass, 1 pre-existing failure in planning-prompt.test.ts unrelated)
34
+
35
+ <promise>COMPLETE</promise>
@@ -0,0 +1,36 @@
1
+ # Outcome: Make Planning and Amend Exit Messages Worktree-Aware
2
+
3
+ ## Summary
4
+
5
+ Made the exit messages in both planning and amend prompts worktree-aware. When planning or amending in worktree mode, the exit message now shows `raf do <project> --worktree` instead of `raf do <project>`. Also improved the amend prompt's exit message to include the `raf do` command (previously it only said "Press Ctrl-C twice to exit").
6
+
7
+ ## Key Changes
8
+
9
+ ### `src/prompts/planning.ts`
10
+ - Added `worktreeMode?: boolean` to `PlanningPromptParams` interface
11
+ - Updated `getPlanningPrompt()` to conditionally append ` --worktree` to the `raf do <project>` exit message
12
+
13
+ ### `src/prompts/amend.ts`
14
+ - Added `worktreeMode?: boolean` to `AmendPromptParams` interface
15
+ - Updated `getAmendPrompt()` exit message from "Press Ctrl-C twice to exit" to include `raf do <project>` command with conditional `--worktree` flag
16
+
17
+ ### `src/commands/plan.ts`
18
+ - Passed `worktreeMode` to `getPlanningPrompt()` in `runPlanCommand()`
19
+ - Passed `worktreeMode` to `getAmendPrompt()` in `runAmendCommand()`
20
+
21
+ ### `tests/unit/planning-prompt.test.ts`
22
+ - Added 3 new tests: worktreeMode false, undefined, and true variations
23
+
24
+ ### `tests/unit/amend-prompt.test.ts` (new file)
25
+ - Added 7 tests covering basic prompt functionality and worktree mode variations
26
+
27
+ ## Acceptance Criteria Verification
28
+
29
+ - [x] Planning in worktree mode shows `raf do <project> --worktree` in exit message
30
+ - [x] Planning in normal mode still shows `raf do <project>` in exit message
31
+ - [x] Amend in worktree mode shows `raf do <project> --worktree` in exit message
32
+ - [x] Amend in normal mode shows exit message without `--worktree`
33
+ - [x] Tests cover both worktree and non-worktree variations (6 new tests)
34
+ - [x] All existing tests pass (856 pass, 1 pre-existing failure in planning-prompt.test.ts unrelated)
35
+
36
+ <promise>COMPLETE</promise>
@@ -0,0 +1,43 @@
1
+ # Task: Add Automatic Worktree Discovery to raf status
2
+
3
+ ## Objective
4
+ Make `raf status` always discover and display worktree projects alongside main repo projects — no flag required.
5
+
6
+ ## Context
7
+ Currently `raf status` only discovers and displays projects from the main RAF directory. Projects that exist only in worktrees (`~/.raf/worktrees/<repo>/<project>/`) are invisible to the status command. This makes it hard to track worktree project progress without running `raf do --worktree`. Worktree discovery should be automatic — if a git repo is detected and worktree projects exist, they should appear.
8
+
9
+ ## Requirements
10
+ - **No new flag** — worktree discovery happens automatically when the current directory is inside a git repo
11
+ - **List mode** (`raf status`): Show main repo projects as normal, then append a `Worktrees:` section at the bottom listing worktree projects that DIFFER from their main repo counterpart (indented). A worktree project "differs" if it has more tasks (amend added new ones) or different task statuses. If the worktree state is identical to main repo, skip it. Worktree-only projects (no main repo counterpart) are always shown.
12
+ - **Single project mode** (`raf status <project>`): Show the project from BOTH main repo and worktree only when they differ. This is common after `--amend` — e.g., main repo shows 5/5 tasks completed (original plan), while worktree shows 5/7 (amended with 2 new tasks not yet executed). Display both states, clearly labeled (e.g., "Main:" and "Worktree:"). If the states are identical, show just the main view without any worktree label. If the project only exists in worktree, show just that one.
13
+ - Both modes should support the existing `--json` flag (include worktree data in JSON output)
14
+ - Gracefully handle non-git-repo case: if `getRepoBasename()` returns null, skip worktree discovery silently
15
+ - Use existing worktree utilities: `getRepoBasename()`, `listWorktreeProjects()`, `computeWorktreePath()`, `computeWorktreeBaseDir()` from `src/core/worktree.ts`
16
+ - Use existing state derivation: `deriveProjectState()`, `getDerivedStats()` from `src/core/state-derivation.ts`
17
+ - Follow existing patterns in `src/commands/do.ts` for worktree project resolution (searching worktree directories, resolving identifiers within them)
18
+
19
+ ## Implementation Steps
20
+ 1. In `runStatusCommand()` in `src/commands/status.ts`, after the main repo logic, attempt worktree discovery using `getRepoBasename()` and `listWorktreeProjects()`. If not in a git repo, skip silently.
21
+ 2. For list mode: discover worktree projects, filter out any that already appear in main repo projects (match by folder name), then display remaining under a `Worktrees:` header with indentation. Derive state for each worktree project to show progress bars.
22
+ 3. For single-project mode: resolve the project identifier in both main repo and worktrees. If found in both, show two progress displays labeled "Main:" and "Worktree:". If found in only one, show just that.
23
+ 4. Update the `--json` output to include worktree project data when worktree projects are discovered
24
+ 5. Update tests in `tests/unit/status-command.test.ts` to cover worktree discovery for both list and single-project modes
25
+ 6. Update README.md `raf status` section to mention that worktree projects are shown automatically
26
+ 7. Update CLAUDE.md to mention automatic worktree discovery in the status command
27
+
28
+ ## Acceptance Criteria
29
+ - [ ] `raf status` lists main repo projects normally, then worktree projects that differ under a `Worktrees:` header
30
+ - [ ] Worktree projects identical to their main repo counterpart are not shown
31
+ - [ ] `raf status <project>` shows both main repo and worktree state only when they differ
32
+ - [ ] `raf status <project>` shows just worktree state when project only exists in worktree
33
+ - [ ] `--json` includes worktree project data
34
+ - [ ] Non-git-repo environments work fine (worktree section just doesn't appear)
35
+ - [ ] README.md and CLAUDE.md updated
36
+ - [ ] Tests cover the new functionality
37
+ - [ ] All existing tests pass
38
+
39
+ ## Notes
40
+ - The worktree project resolution pattern already exists in `do.ts` — reuse that logic (or extract shared utility if the duplication is significant)
41
+ - `listWorktreeProjects()` returns folder names like `['020-my-feature', '021-another']` — use `extractProjectNumber()` and `extractProjectName()` to display them consistently with main repo projects
42
+ - Worktree projects need their RAF relative path computed (from repo root to RAF dir) to find the project folder inside the worktree, same as `do.ts` does
43
+ - No changes needed to `StatusCommandOptions` type or command definition — this is automatic behavior, not a flag
@@ -0,0 +1,44 @@
1
+ # Task: Remove Multi-Project Support from raf do
2
+
3
+ ## Objective
4
+ Simplify `raf do` to accept only a single project identifier, removing the multi-project execution feature.
5
+
6
+ ## Context
7
+ Multi-project support (`raf do 3 4 5`) adds complexity with deduplication, sequential execution, multi-project summaries, and per-project error handling. This simplification reduces code surface area. The single-project interactive picker (`raf do` with no args) and worktree mode remain unchanged.
8
+
9
+ ## Requirements
10
+ - Change the command argument from `[projects...]` (variadic) to `[project]` (single optional)
11
+ - Remove all multi-project execution logic: the `isMultiProject` flag, the results accumulation loop, and the `printMultiProjectSummary()` function
12
+ - Remove the verbose log for multi-project model name (`if (verbose && model && resolvedProjects.length > 1)`)
13
+ - Remove the worktree guard for multiple projects (`if (worktreeMode && projectIdentifiers.length > 1)`) since it's no longer possible
14
+ - Simplify the standard-mode resolution loop (no need for `seenPaths` deduplication or building a `resolvedProjects` array — just resolve one project)
15
+ - Keep all existing single-project behavior: interactive picker, worktree auto-discovery, `--merge`, `--force`, etc.
16
+ - Remove the `do-multiproject.test.ts` test file entirely
17
+ - Update `do-command.test.ts` if it references multi-project behavior
18
+ - Update README.md: remove `raf do 3 4 5` example and `[projects...]` in command reference
19
+ - Update CLAUDE.md: remove `### Multi-Project Execution` section from architectural decisions
20
+
21
+ ## Implementation Steps
22
+ 1. Change the `.argument()` in `createDoCommand()` from `'[projects...]'` to `'[project]'`
23
+ 2. Update the action handler signature to receive `project: string | undefined` instead of `projects: string[]`
24
+ 3. Refactor `runDoCommand()` to work with a single optional identifier: no array iteration, no deduplication, no multi-project summary
25
+ 4. Remove `printMultiProjectSummary()` function
26
+ 5. Remove or simplify the `ProjectExecutionResult` interface and results accumulation if they become unnecessary
27
+ 6. Remove `tests/unit/do-multiproject.test.ts`
28
+ 7. Update any other test files that reference multi-project behavior
29
+ 8. Update README.md and CLAUDE.md docs
30
+
31
+ ## Acceptance Criteria
32
+ - [ ] `raf do 3` works for a single project
33
+ - [ ] `raf do` (no args) still shows interactive picker
34
+ - [ ] `raf do --worktree` still shows worktree picker
35
+ - [ ] `raf do 3 4` produces an error (too many arguments) or ignores extra args
36
+ - [ ] `printMultiProjectSummary` and multi-project loop removed
37
+ - [ ] `do-multiproject.test.ts` removed
38
+ - [ ] README.md and CLAUDE.md updated (no multi-project references)
39
+ - [ ] All remaining tests pass
40
+
41
+ ## Notes
42
+ - Commander.js with `[project]` (non-variadic) will only capture the first argument — extra arguments are typically ignored. Consider adding explicit validation or letting Commander handle it.
43
+ - The `ProjectExecutionResult` type and `executeSingleProject()` function can stay — they're used for the single-project case too. Just remove the array accumulation pattern around them.
44
+ - The `--merge` logic depends on `results.every(r => r.success)` — simplify this to just check the single result.
@@ -0,0 +1,38 @@
1
+ # Task: Commit Planning Artifacts (Including Plan Files) on Amend
2
+
3
+ ## Objective
4
+ Ensure that `raf plan --amend` commits input.md, decisions.md, AND plan files — not just input and decisions — using a distinct "Amend" commit message.
5
+
6
+ ## Dependencies
7
+ 002
8
+
9
+ ## Context
10
+ Currently `commitPlanningArtifacts()` in `src/core/git.ts` only stages and commits `input.md` and `decisions.md`. For new plans (`raf plan`), this is fine because Claude commits plan files during execution. But for amendments, the new/updated plan files created during the amend session are never committed by RAF. Additionally, the commit message should distinguish amendments from new plans.
11
+
12
+ ## Requirements
13
+ - Modify `commitPlanningArtifacts()` (or create a new function) to optionally accept plan file paths to include in the commit
14
+ - The amend flow in `src/commands/plan.ts` (`runAmendCommand()`) should pass the new/modified plan files to the commit function
15
+ - Use commit message format `RAF[NNN] Amend: project-name` for amendments (vs existing `RAF[NNN] Plan: project-name` for new plans)
16
+ - The normal `raf plan` flow should continue to use the existing behavior (commit only input + decisions with "Plan:" message)
17
+ - Support worktree mode (pass `cwd` option through)
18
+ - Plan files are in the `plans/` subdirectory of the project path; the amend flow already detects new plan files by checking if their task number >= `nextTaskNumber`
19
+
20
+ ## Implementation Steps
21
+ 1. Extend `commitPlanningArtifacts()` in `src/core/git.ts` to accept optional additional file paths and an optional commit message override (or an `isAmend` flag that changes the message format)
22
+ 2. In `runAmendCommand()` in `src/commands/plan.ts`, after detecting new plan files, build their full paths and pass them to `commitPlanningArtifacts()` along with the amend flag
23
+ 3. The git add command should stage `input.md`, `decisions.md`, and all plan files (new and existing, since existing ones won't have changes and won't affect the commit)
24
+ 4. Update the existing tests in `tests/unit/commit-planning-artifacts.test.ts` to cover the new parameters
25
+ 5. Add tests for the amend commit message format
26
+
27
+ ## Acceptance Criteria
28
+ - [ ] `raf plan --amend` commits input.md, decisions.md, and new plan files together
29
+ - [ ] Amend commits use message format `RAF[NNN] Amend: project-name`
30
+ - [ ] Normal `raf plan` still uses `RAF[NNN] Plan: project-name` and only commits input + decisions
31
+ - [ ] Worktree mode works correctly (cwd passed through)
32
+ - [ ] Tests cover the amend commit scenario
33
+ - [ ] All existing tests pass
34
+
35
+ ## Notes
36
+ - The amend flow in `plan.ts` already computes `newPlanFiles` (lines 547-553) — these are just filenames like `004-new-task.md`. Build full paths as `path.join(plansDir, filename)`.
37
+ - Consider staging the entire `plans/` directory with a glob rather than individual files — simpler and captures any modifications to existing plans too. But be careful not to stage unrelated files.
38
+ - `commitPlanningArtifacts()` currently checks `isGitRepo()` without cwd — this should also be fixed to use the cwd option for worktree support (existing bug).
@@ -0,0 +1,38 @@
1
+ # Task: Make Planning and Amend Exit Messages Worktree-Aware
2
+
3
+ ## Objective
4
+ When planning or amending in worktree mode, the exit message shown to the user should include `--worktree` in the `raf do` command.
5
+
6
+ ## Context
7
+ Currently the planning prompt (`src/prompts/planning.ts`) shows `raf do <project>` as the exit message, and the amend prompt (`src/prompts/amend.ts`) shows a generic "Press Ctrl-C twice to exit" with no `raf do` hint. Neither is aware of worktree mode. When the user planned with `--worktree`, the follow-up `raf do` command also needs `--worktree`, so the exit message should reflect that.
8
+
9
+ ## Dependencies
10
+ 002
11
+
12
+ ## Requirements
13
+ - Add a `worktreeMode` (boolean) parameter to both `PlanningPromptParams` and `AmendPromptParams` interfaces
14
+ - When `worktreeMode` is true, the exit message in the planning prompt should show `raf do <project> --worktree` instead of `raf do <project>`
15
+ - When `worktreeMode` is true, the exit message in the amend prompt should also include `raf do <project> --worktree`
16
+ - Pass the `worktreeMode` value through from `runPlanCommand()` and `runAmendCommand()` in `src/commands/plan.ts` when calling `getPlanningPrompt()` and `getAmendPrompt()`
17
+ - Update any existing tests for planning and amend prompts to cover the worktree variation
18
+
19
+ ## Implementation Steps
20
+ 1. Add `worktreeMode?: boolean` to `PlanningPromptParams` in `src/prompts/planning.ts`
21
+ 2. Update the exit message template in `getPlanningPrompt()` to conditionally include `--worktree`
22
+ 3. Add `worktreeMode?: boolean` to `AmendPromptParams` in `src/prompts/amend.ts`
23
+ 4. Update the exit message in `getAmendPrompt()` to include `raf do <project> --worktree` when in worktree mode
24
+ 5. Pass `worktreeMode` from `runPlanCommand()` and `runAmendCommand()` in `src/commands/plan.ts` to the prompt functions
25
+ 6. Update tests for both prompts to verify the worktree-aware exit messages
26
+
27
+ ## Acceptance Criteria
28
+ - [ ] Planning in worktree mode shows `raf do <project> --worktree` in exit message
29
+ - [ ] Planning in normal mode still shows `raf do <project>` in exit message
30
+ - [ ] Amend in worktree mode shows `raf do <project> --worktree` in exit message
31
+ - [ ] Amend in normal mode shows exit message without `--worktree`
32
+ - [ ] Tests cover both worktree and non-worktree variations
33
+ - [ ] All existing tests pass
34
+
35
+ ## Notes
36
+ - The planning prompt's exit message is at approximately line 154 of `src/prompts/planning.ts`
37
+ - The amend prompt's exit message is at approximately line 184 of `src/prompts/amend.ts` — it currently says "Press Ctrl-C twice to exit" without mentioning `raf do` at all; add the `raf do` command there too
38
+ - The `plan.ts` command already has `worktreeMode` as a local variable in both `runPlanCommand()` and `runAmendCommand()`, so it's trivial to pass through
@@ -0,0 +1,25 @@
1
+ # Project Decisions
2
+
3
+ ## When should worktrees be cleaned up after execution?
4
+ Success only - Clean worktree only when all tasks complete successfully. Keep on failure for inspection.
5
+
6
+ ## When cleaning up the worktree, should the git branch also be deleted, or kept for potential future amend?
7
+ Keep branch - Only remove the worktree directory. Keep the git branch so amend can find it later.
8
+
9
+ ## For `raf plan --amend --worktree`: when the worktree doesn't exist but a branch matching the project name is found, should RAF automatically recreate the worktree or prompt the user first?
10
+ Auto-recreate silently - Automatically create a new worktree from the existing branch and continue. Just log an info message.
11
+
12
+ ## For `raf do --worktree`: same scenario - worktree was cleaned up but branch exists. Should `raf do` also auto-recreate?
13
+ Keep current behaviour of raf do - no auto-recreate. Only amend should recreate worktrees.
14
+
15
+ ## Should `createWorktreeFromBranch()` be a new function or extend existing `createWorktree()`?
16
+ New function - Add a separate `createWorktreeFromBranch()` function. Keeps create-new and create-from-existing as distinct operations.
17
+
18
+ ## Should the worktree cleanup happen immediately after all tasks finish or after the merge step?
19
+ After tasks only - Always cleanup right after tasks finish, before merge. Merge operates on the branch, not the worktree directory.
20
+
21
+ ## Should the 'branch not found' fallback be a new task or part of task 003?
22
+ Modify task 003 - Add the 'branch not found → create fresh worktree' fallback directly into the existing task 003 plan.
23
+
24
+ ## When neither worktree nor branch exists during amend, what should happen?
25
+ Create fresh worktree + copy project folder from main repo into it, then continue the amend flow.
@@ -0,0 +1,5 @@
1
+ - [ ] clean worktrees on execution completion. in case of plan --amend - look for a git branch what matches project name (raf creates it during plan) and create new git worktree from it and then continue amend flow from there
2
+
3
+ ---
4
+
5
+ if branch not exist - copy use the same flow as "raf do"
@@ -0,0 +1,32 @@
1
+ # Outcome: Add createWorktreeFromBranch utility
2
+
3
+ ## Summary
4
+
5
+ Added two new functions to `src/core/worktree.ts`:
6
+
7
+ 1. **`branchExists(branchName)`** - Checks if a local git branch exists using `git branch --list`
8
+ 2. **`createWorktreeFromBranch(repoBasename, projectId)`** - Creates a git worktree from an existing branch (using `git worktree add <path> <branch>` without the `-b` flag)
9
+
10
+ ## Key Changes
11
+
12
+ ### Files Modified
13
+ - `src/core/worktree.ts` - Added `branchExists()` and `createWorktreeFromBranch()` functions
14
+ - `tests/unit/worktree.test.ts` - Added 7 new test cases covering both functions
15
+
16
+ ### Implementation Details
17
+ - `createWorktreeFromBranch()` reuses existing `computeWorktreePath()` and `computeWorktreeBaseDir()` helpers
18
+ - Returns `WorktreeCreateResult` (same interface as `createWorktree()`)
19
+ - Validates branch existence before attempting worktree creation
20
+ - Handles error cases: branch not found, parent directory creation failure, git command failure
21
+ - Existing `createWorktree()` is unchanged
22
+
23
+ ### Test Coverage
24
+ - `branchExists`: existing branch, non-existing branch, git failure
25
+ - `createWorktreeFromBranch`: success path, branch-not-found, parent dir failure, worktree-already-exists
26
+
27
+ ## Verification
28
+ - TypeScript compiles without errors
29
+ - All 43 worktree tests pass (36 existing + 7 new)
30
+ - 1 pre-existing failure in `planning-prompt.test.ts` (unrelated)
31
+
32
+ <promise>COMPLETE</promise>