rafcode 1.3.2 → 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 (391) hide show
  1. package/CLAUDE.md +118 -22
  2. package/RAF/aaaacu-worktree-weaver/decisions.md +88 -0
  3. package/RAF/aaaacu-worktree-weaver/input.md +27 -0
  4. package/RAF/aaaacu-worktree-weaver/outcomes/01-git-worktree-utilities.md +41 -0
  5. package/RAF/aaaacu-worktree-weaver/outcomes/02-worktree-plan-command.md +44 -0
  6. package/RAF/aaaacu-worktree-weaver/outcomes/03-worktree-do-command.md +58 -0
  7. package/RAF/aaaacu-worktree-weaver/outcomes/04-auto-merge-and-cleanup.md +40 -0
  8. package/RAF/aaaacu-worktree-weaver/outcomes/05-worktree-tests.md +43 -0
  9. package/RAF/aaaacu-worktree-weaver/outcomes/06-update-documentation.md +33 -0
  10. package/RAF/aaaacu-worktree-weaver/plans/01-git-worktree-utilities.md +51 -0
  11. package/RAF/aaaacu-worktree-weaver/plans/02-worktree-plan-command.md +93 -0
  12. package/RAF/aaaacu-worktree-weaver/plans/03-worktree-do-command.md +81 -0
  13. package/RAF/aaaacu-worktree-weaver/plans/04-auto-merge-and-cleanup.md +51 -0
  14. package/RAF/aaaacu-worktree-weaver/plans/05-worktree-tests.md +52 -0
  15. package/RAF/aaaacu-worktree-weaver/plans/06-update-documentation.md +55 -0
  16. package/RAF/aaaacv-trim-the-fat/decisions.md +34 -0
  17. package/RAF/aaaacv-trim-the-fat/input.md +5 -0
  18. package/RAF/aaaacv-trim-the-fat/outcomes/01-add-worktree-support-to-status.md +43 -0
  19. package/RAF/aaaacv-trim-the-fat/outcomes/02-remove-multi-project-from-do.md +50 -0
  20. package/RAF/aaaacv-trim-the-fat/outcomes/03-commit-artifacts-on-amend.md +35 -0
  21. package/RAF/aaaacv-trim-the-fat/outcomes/04-worktree-aware-exit-messages.md +36 -0
  22. package/RAF/aaaacv-trim-the-fat/plans/01-add-worktree-support-to-status.md +43 -0
  23. package/RAF/aaaacv-trim-the-fat/plans/02-remove-multi-project-from-do.md +44 -0
  24. package/RAF/aaaacv-trim-the-fat/plans/03-commit-artifacts-on-amend.md +38 -0
  25. package/RAF/aaaacv-trim-the-fat/plans/04-worktree-aware-exit-messages.md +38 -0
  26. package/RAF/aaaacw-prune-cycle/decisions.md +25 -0
  27. package/RAF/aaaacw-prune-cycle/input.md +5 -0
  28. package/RAF/aaaacw-prune-cycle/outcomes/01-create-worktree-from-branch.md +32 -0
  29. package/RAF/aaaacw-prune-cycle/outcomes/02-cleanup-worktree-on-success.md +33 -0
  30. package/RAF/aaaacw-prune-cycle/outcomes/03-amend-recreate-worktree.md +40 -0
  31. package/RAF/aaaacw-prune-cycle/plans/01-create-worktree-from-branch.md +31 -0
  32. package/RAF/aaaacw-prune-cycle/plans/02-cleanup-worktree-on-success.md +38 -0
  33. package/RAF/aaaacw-prune-cycle/plans/03-amend-recreate-worktree.md +50 -0
  34. package/RAF/aaaacx-epoch-shift/decisions.md +25 -0
  35. package/RAF/aaaacx-epoch-shift/input.md +1 -0
  36. package/RAF/aaaacx-epoch-shift/outcomes/01-epoch-id-generation.md +34 -0
  37. package/RAF/aaaacx-epoch-shift/outcomes/02-update-pattern-matching.md +32 -0
  38. package/RAF/aaaacx-epoch-shift/outcomes/03-update-tests.md +59 -0
  39. package/RAF/aaaacx-epoch-shift/outcomes/04-update-documentation.md +30 -0
  40. package/RAF/aaaacx-epoch-shift/plans/01-epoch-id-generation.md +40 -0
  41. package/RAF/aaaacx-epoch-shift/plans/02-update-pattern-matching.md +60 -0
  42. package/RAF/aaaacx-epoch-shift/plans/03-update-tests.md +48 -0
  43. package/RAF/aaaacx-epoch-shift/plans/04-update-documentation.md +44 -0
  44. package/RAF/ahmpro-merge-guardian/decisions.md +25 -0
  45. package/RAF/ahmpro-merge-guardian/input.md +4 -0
  46. package/RAF/ahmpro-merge-guardian/outcomes/001-fix-amend-worktree-commit.md +45 -0
  47. package/RAF/ahmpro-merge-guardian/outcomes/002-base36-task-ids.md +55 -0
  48. package/RAF/ahmpro-merge-guardian/outcomes/003-worktree-pr-creation.md +41 -0
  49. package/RAF/ahmpro-merge-guardian/outcomes/004-post-execution-picker.md +53 -0
  50. package/RAF/ahmpro-merge-guardian/plans/001-fix-amend-worktree-commit.md +39 -0
  51. package/RAF/ahmpro-merge-guardian/plans/002-base36-task-ids.md +43 -0
  52. package/RAF/ahmpro-merge-guardian/plans/003-worktree-pr-creation.md +43 -0
  53. package/RAF/ahmpro-merge-guardian/plans/004-post-execution-picker.md +51 -0
  54. package/RAF/ahnbcu-letterjam/decisions.md +13 -0
  55. package/RAF/ahnbcu-letterjam/input.md +3 -0
  56. package/RAF/ahnbcu-letterjam/outcomes/01-base26-encoding.md +42 -0
  57. package/RAF/ahnbcu-letterjam/outcomes/02-update-tests.md +38 -0
  58. package/RAF/ahnbcu-letterjam/outcomes/03-migrate-command.md +51 -0
  59. package/RAF/ahnbcu-letterjam/outcomes/04-update-documentation.md +29 -0
  60. package/RAF/ahnbcu-letterjam/plans/01-base26-encoding.md +36 -0
  61. package/RAF/ahnbcu-letterjam/plans/02-update-tests.md +37 -0
  62. package/RAF/ahnbcu-letterjam/plans/03-migrate-command.md +49 -0
  63. package/RAF/ahnbcu-letterjam/plans/04-update-documentation.md +39 -0
  64. package/RAF/ahnwrk-worktree-weaver/decisions.md +19 -0
  65. package/RAF/ahnwrk-worktree-weaver/input.md +4 -0
  66. package/RAF/ahnwrk-worktree-weaver/outcomes/01-remove-co-authored-by.md +20 -0
  67. package/RAF/ahnwrk-worktree-weaver/outcomes/02-update-task-status-format.md +21 -0
  68. package/RAF/ahnwrk-worktree-weaver/outcomes/03-worktree-auto-discovery.md +34 -0
  69. package/RAF/ahnwrk-worktree-weaver/outcomes/04-fix-pr-description.md +30 -0
  70. package/RAF/ahnwrk-worktree-weaver/plans/01-remove-co-authored-by.md +26 -0
  71. package/RAF/ahnwrk-worktree-weaver/plans/02-update-task-status-format.md +27 -0
  72. package/RAF/ahnwrk-worktree-weaver/plans/03-worktree-auto-discovery.md +37 -0
  73. package/RAF/ahnwrk-worktree-weaver/plans/04-fix-pr-description.md +50 -0
  74. package/README.md +56 -10
  75. package/dist/commands/do.d.ts +15 -0
  76. package/dist/commands/do.d.ts.map +1 -1
  77. package/dist/commands/do.js +384 -123
  78. package/dist/commands/do.js.map +1 -1
  79. package/dist/commands/migrate.d.ts +14 -0
  80. package/dist/commands/migrate.d.ts.map +1 -0
  81. package/dist/commands/migrate.js +228 -0
  82. package/dist/commands/migrate.js.map +1 -0
  83. package/dist/commands/plan.d.ts.map +1 -1
  84. package/dist/commands/plan.js +237 -40
  85. package/dist/commands/plan.js.map +1 -1
  86. package/dist/commands/status.d.ts.map +1 -1
  87. package/dist/commands/status.js +221 -47
  88. package/dist/commands/status.js.map +1 -1
  89. package/dist/core/claude-runner.d.ts +2 -2
  90. package/dist/core/claude-runner.d.ts.map +1 -1
  91. package/dist/core/git.d.ts +15 -6
  92. package/dist/core/git.d.ts.map +1 -1
  93. package/dist/core/git.js +53 -20
  94. package/dist/core/git.js.map +1 -1
  95. package/dist/core/project-manager.d.ts.map +1 -1
  96. package/dist/core/project-manager.js +2 -2
  97. package/dist/core/project-manager.js.map +1 -1
  98. package/dist/core/pull-request.d.ts +84 -0
  99. package/dist/core/pull-request.d.ts.map +1 -0
  100. package/dist/core/pull-request.js +414 -0
  101. package/dist/core/pull-request.js.map +1 -0
  102. package/dist/core/state-derivation.d.ts +3 -3
  103. package/dist/core/state-derivation.d.ts.map +1 -1
  104. package/dist/core/state-derivation.js +18 -14
  105. package/dist/core/state-derivation.js.map +1 -1
  106. package/dist/core/worktree.d.ts +120 -0
  107. package/dist/core/worktree.d.ts.map +1 -0
  108. package/dist/core/worktree.js +322 -0
  109. package/dist/core/worktree.js.map +1 -0
  110. package/dist/index.js +2 -0
  111. package/dist/index.js.map +1 -1
  112. package/dist/prompts/amend.d.ts +1 -0
  113. package/dist/prompts/amend.d.ts.map +1 -1
  114. package/dist/prompts/amend.js +14 -10
  115. package/dist/prompts/amend.js.map +1 -1
  116. package/dist/prompts/execution.d.ts.map +1 -1
  117. package/dist/prompts/execution.js +4 -2
  118. package/dist/prompts/execution.js.map +1 -1
  119. package/dist/prompts/planning.d.ts +1 -0
  120. package/dist/prompts/planning.d.ts.map +1 -1
  121. package/dist/prompts/planning.js +9 -8
  122. package/dist/prompts/planning.js.map +1 -1
  123. package/dist/types/config.d.ts +5 -0
  124. package/dist/types/config.d.ts.map +1 -1
  125. package/dist/ui/project-picker.d.ts +34 -3
  126. package/dist/ui/project-picker.d.ts.map +1 -1
  127. package/dist/ui/project-picker.js +78 -10
  128. package/dist/ui/project-picker.js.map +1 -1
  129. package/dist/utils/paths.d.ts +38 -43
  130. package/dist/utils/paths.d.ts.map +1 -1
  131. package/dist/utils/paths.js +123 -193
  132. package/dist/utils/paths.js.map +1 -1
  133. package/dist/utils/terminal-symbols.d.ts +2 -2
  134. package/dist/utils/terminal-symbols.js +3 -3
  135. package/dist/utils/terminal-symbols.js.map +1 -1
  136. package/dist/utils/validation.d.ts.map +1 -1
  137. package/dist/utils/validation.js +2 -8
  138. package/dist/utils/validation.js.map +1 -1
  139. package/package.json +1 -1
  140. package/src/commands/do.ts +454 -134
  141. package/src/commands/migrate.ts +269 -0
  142. package/src/commands/plan.ts +264 -40
  143. package/src/commands/status.ts +252 -45
  144. package/src/core/claude-runner.ts +2 -2
  145. package/src/core/git.ts +57 -21
  146. package/src/core/project-manager.ts +2 -1
  147. package/src/core/pull-request.ts +480 -0
  148. package/src/core/state-derivation.ts +18 -14
  149. package/src/core/worktree.ts +357 -0
  150. package/src/index.ts +2 -0
  151. package/src/prompts/amend.ts +15 -9
  152. package/src/prompts/execution.ts +4 -2
  153. package/src/prompts/planning.ts +10 -8
  154. package/src/types/config.ts +6 -0
  155. package/src/ui/project-picker.ts +110 -10
  156. package/src/utils/paths.ts +129 -214
  157. package/src/utils/terminal-symbols.ts +3 -3
  158. package/src/utils/validation.ts +2 -9
  159. package/tests/unit/amend-prompt.test.ts +85 -0
  160. package/tests/unit/claude-runner.test.ts +9 -9
  161. package/tests/unit/commit-planning-artifacts-worktree.test.ts +327 -0
  162. package/tests/unit/commit-planning-artifacts.test.ts +303 -35
  163. package/tests/unit/dependency-integration.test.ts +95 -95
  164. package/tests/unit/do-blocked-tasks.test.ts +53 -53
  165. package/tests/unit/do-command.test.ts +39 -132
  166. package/tests/unit/do-rerun.test.ts +65 -65
  167. package/tests/unit/do-worktree-cleanup.test.ts +151 -0
  168. package/tests/unit/execution-prompt.test.ts +71 -60
  169. package/tests/unit/failure-history.test.ts +19 -19
  170. package/tests/unit/git-commit-helpers.test.ts +5 -5
  171. package/tests/unit/git-stash.test.ts +4 -4
  172. package/tests/unit/migrate-command.test.ts +197 -0
  173. package/tests/unit/outcome-content.test.ts +20 -20
  174. package/tests/unit/paths.test.ts +269 -467
  175. package/tests/unit/plan-amend-worktree-recreate.test.ts +246 -0
  176. package/tests/unit/plan-command.test.ts +103 -103
  177. package/tests/unit/planning-prompt.test.ts +41 -4
  178. package/tests/unit/post-execution-picker.test.ts +251 -0
  179. package/tests/unit/project-manager.test.ts +20 -8
  180. package/tests/unit/project-picker.test.ts +425 -42
  181. package/tests/unit/pull-request.test.ts +852 -0
  182. package/tests/unit/state-derivation.test.ts +138 -137
  183. package/tests/unit/status-command.test.ts +344 -76
  184. package/tests/unit/terminal-symbols.test.ts +4 -4
  185. package/tests/unit/worktree-integration.test.ts +405 -0
  186. package/tests/unit/worktree.test.ts +523 -0
  187. package/tests/unit/do-multiproject.test.ts +0 -270
  188. /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/input.md +0 -0
  189. /package/RAF/{001-raf-task-improvements/outcomes/001-add-decisions-folder.md → aaaaab-raf-task-improvements/outcomes/01-add-decisions-folder.md} +0 -0
  190. /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
  191. /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
  192. /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
  193. /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
  194. /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
  195. /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
  196. /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
  197. /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/outcomes/SUMMARY.md +0 -0
  198. /package/RAF/{001-raf-task-improvements/plans/001-add-decisions-folder.md → aaaaab-raf-task-improvements/plans/01-add-decisions-folder.md} +0 -0
  199. /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
  200. /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
  201. /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
  202. /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
  203. /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
  204. /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
  205. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/decisions/DECISIONS.md +0 -0
  206. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/input.md +0 -0
  207. /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
  208. /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
  209. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/outcomes/SUMMARY.md +0 -0
  210. /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
  211. /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
  212. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/decisions/DECISIONS.md +0 -0
  213. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/input.md +0 -0
  214. /package/RAF/{003-multi-project-execution/outcomes/001-remove-state-json.md → aaaaad-multi-project-execution/outcomes/01-remove-state-json.md} +0 -0
  215. /package/RAF/{003-multi-project-execution/outcomes/002-update-raf-status.md → aaaaad-multi-project-execution/outcomes/02-update-raf-status.md} +0 -0
  216. /package/RAF/{003-multi-project-execution/outcomes/003-simplify-git-logic.md → aaaaad-multi-project-execution/outcomes/03-simplify-git-logic.md} +0 -0
  217. /package/RAF/{003-multi-project-execution/outcomes/004-auto-commit-planning.md → aaaaad-multi-project-execution/outcomes/04-auto-commit-planning.md} +0 -0
  218. /package/RAF/{003-multi-project-execution/outcomes/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/outcomes/05-rerun-failed-tasks.md} +0 -0
  219. /package/RAF/{003-multi-project-execution/outcomes/006-multi-project-execution.md → aaaaad-multi-project-execution/outcomes/06-multi-project-execution.md} +0 -0
  220. /package/RAF/{003-multi-project-execution/outcomes/007-verify-timeout.md → aaaaad-multi-project-execution/outcomes/07-verify-timeout.md} +0 -0
  221. /package/RAF/{003-multi-project-execution/outcomes/008-move-decisions-file.md → aaaaad-multi-project-execution/outcomes/08-move-decisions-file.md} +0 -0
  222. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/outcomes/SUMMARY.md +0 -0
  223. /package/RAF/{003-multi-project-execution/plans/001-remove-state-json.md → aaaaad-multi-project-execution/plans/01-remove-state-json.md} +0 -0
  224. /package/RAF/{003-multi-project-execution/plans/002-update-raf-status.md → aaaaad-multi-project-execution/plans/02-update-raf-status.md} +0 -0
  225. /package/RAF/{003-multi-project-execution/plans/003-simplify-git-logic.md → aaaaad-multi-project-execution/plans/03-simplify-git-logic.md} +0 -0
  226. /package/RAF/{003-multi-project-execution/plans/004-auto-commit-planning.md → aaaaad-multi-project-execution/plans/04-auto-commit-planning.md} +0 -0
  227. /package/RAF/{003-multi-project-execution/plans/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/plans/05-rerun-failed-tasks.md} +0 -0
  228. /package/RAF/{003-multi-project-execution/plans/006-multi-project-execution.md → aaaaad-multi-project-execution/plans/06-multi-project-execution.md} +0 -0
  229. /package/RAF/{003-multi-project-execution/plans/007-verify-timeout.md → aaaaad-multi-project-execution/plans/07-verify-timeout.md} +0 -0
  230. /package/RAF/{003-multi-project-execution/plans/008-move-decisions-file.md → aaaaad-multi-project-execution/plans/08-move-decisions-file.md} +0 -0
  231. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/decisions.md +0 -0
  232. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/input.md +0 -0
  233. /package/RAF/{004-task-naming-optimization/outcomes/001-remove-summary-file.md → aaaaae-task-naming-optimization/outcomes/01-remove-summary-file.md} +0 -0
  234. /package/RAF/{004-task-naming-optimization/outcomes/002-base36-project-numbering.md → aaaaae-task-naming-optimization/outcomes/02-base36-project-numbering.md} +0 -0
  235. /package/RAF/{004-task-naming-optimization/outcomes/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/outcomes/03-improve-haiku-prompt.md} +0 -0
  236. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/outcomes/SUMMARY.md +0 -0
  237. /package/RAF/{004-task-naming-optimization/plans/001-remove-summary-file.md → aaaaae-task-naming-optimization/plans/01-remove-summary-file.md} +0 -0
  238. /package/RAF/{004-task-naming-optimization/plans/002-base36-project-numbering.md → aaaaae-task-naming-optimization/plans/02-base36-project-numbering.md} +0 -0
  239. /package/RAF/{004-task-naming-optimization/plans/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/plans/03-improve-haiku-prompt.md} +0 -0
  240. /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/decisions.md +0 -0
  241. /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/input.md +0 -0
  242. /package/RAF/{005-task-naming-improvements/outcomes/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/outcomes/01-enhance-identifier-resolution.md} +0 -0
  243. /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
  244. /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
  245. /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
  246. /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
  247. /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
  248. /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
  249. /package/RAF/{005-task-naming-improvements/outcomes/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/outcomes/08-fix-timeout-label.md} +0 -0
  250. /package/RAF/{005-task-naming-improvements/plans/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/plans/01-enhance-identifier-resolution.md} +0 -0
  251. /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
  252. /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
  253. /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
  254. /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
  255. /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
  256. /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
  257. /package/RAF/{005-task-naming-improvements/plans/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/plans/08-fix-timeout-label.md} +0 -0
  258. /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/decisions.md +0 -0
  259. /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/input.md +0 -0
  260. /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
  261. /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
  262. /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
  263. /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
  264. /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
  265. /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
  266. /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
  267. /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
  268. /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/decisions.md +0 -0
  269. /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/input.md +0 -0
  270. /package/RAF/{007-improve-outcome-format/outcomes/001-update-execution-prompt.md → aaaaah-improve-outcome-format/outcomes/01-update-execution-prompt.md} +0 -0
  271. /package/RAF/{007-improve-outcome-format/outcomes/002-update-state-derivation.md → aaaaah-improve-outcome-format/outcomes/02-update-state-derivation.md} +0 -0
  272. /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
  273. /package/RAF/{007-improve-outcome-format/outcomes/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/outcomes/04-implement-failure-analysis.md} +0 -0
  274. /package/RAF/{007-improve-outcome-format/outcomes/005-update-documentation.md → aaaaah-improve-outcome-format/outcomes/05-update-documentation.md} +0 -0
  275. /package/RAF/{007-improve-outcome-format/plans/001-update-execution-prompt.md → aaaaah-improve-outcome-format/plans/01-update-execution-prompt.md} +0 -0
  276. /package/RAF/{007-improve-outcome-format/plans/002-update-state-derivation.md → aaaaah-improve-outcome-format/plans/02-update-state-derivation.md} +0 -0
  277. /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
  278. /package/RAF/{007-improve-outcome-format/plans/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/plans/04-implement-failure-analysis.md} +0 -0
  279. /package/RAF/{007-improve-outcome-format/plans/005-update-documentation.md → aaaaah-improve-outcome-format/plans/05-update-documentation.md} +0 -0
  280. /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/decisions.md +0 -0
  281. /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/input.md +0 -0
  282. /package/RAF/{008-beautiful-do/outcomes/001-terminal-symbols.md → aaaaai-beautiful-do/outcomes/01-terminal-symbols.md} +0 -0
  283. /package/RAF/{008-beautiful-do/outcomes/002-refactor-do-output.md → aaaaai-beautiful-do/outcomes/02-refactor-do-output.md} +0 -0
  284. /package/RAF/{008-beautiful-do/outcomes/003-refactor-status-output.md → aaaaai-beautiful-do/outcomes/03-refactor-status-output.md} +0 -0
  285. /package/RAF/{008-beautiful-do/outcomes/004-simplify-logger.md → aaaaai-beautiful-do/outcomes/04-simplify-logger.md} +0 -0
  286. /package/RAF/{008-beautiful-do/outcomes/005-add-tests.md → aaaaai-beautiful-do/outcomes/05-add-tests.md} +0 -0
  287. /package/RAF/{008-beautiful-do/plans/001-terminal-symbols.md → aaaaai-beautiful-do/plans/01-terminal-symbols.md} +0 -0
  288. /package/RAF/{008-beautiful-do/plans/002-refactor-do-output.md → aaaaai-beautiful-do/plans/02-refactor-do-output.md} +0 -0
  289. /package/RAF/{008-beautiful-do/plans/003-refactor-status-output.md → aaaaai-beautiful-do/plans/03-refactor-status-output.md} +0 -0
  290. /package/RAF/{008-beautiful-do/plans/004-simplify-logger.md → aaaaai-beautiful-do/plans/04-simplify-logger.md} +0 -0
  291. /package/RAF/{008-beautiful-do/plans/005-add-tests.md → aaaaai-beautiful-do/plans/05-add-tests.md} +0 -0
  292. /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/decisions.md +0 -0
  293. /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/input.md +0 -0
  294. /package/RAF/{009-system-promt-ammend/outcomes/001-model-override.md → aaaaaj-system-promt-ammend/outcomes/01-model-override.md} +0 -0
  295. /package/RAF/{009-system-promt-ammend/outcomes/002-system-prompt-append.md → aaaaaj-system-promt-ammend/outcomes/02-system-prompt-append.md} +0 -0
  296. /package/RAF/{009-system-promt-ammend/outcomes/003-retry-context.md → aaaaaj-system-promt-ammend/outcomes/03-retry-context.md} +0 -0
  297. /package/RAF/{009-system-promt-ammend/plans/001-model-override.md → aaaaaj-system-promt-ammend/plans/01-model-override.md} +0 -0
  298. /package/RAF/{009-system-promt-ammend/plans/002-system-prompt-append.md → aaaaaj-system-promt-ammend/plans/02-system-prompt-append.md} +0 -0
  299. /package/RAF/{009-system-promt-ammend/plans/003-retry-context.md → aaaaaj-system-promt-ammend/plans/03-retry-context.md} +0 -0
  300. /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/decisions.md +0 -0
  301. /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/input.md +0 -0
  302. /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
  303. /package/RAF/{010-outcome-marker-fallback/outcomes/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/outcomes/02-creative-project-naming.md} +0 -0
  304. /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
  305. /package/RAF/{010-outcome-marker-fallback/plans/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/plans/02-creative-project-naming.md} +0 -0
  306. /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/decisions.md +0 -0
  307. /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/input.md +0 -0
  308. /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
  309. /package/RAF/{011-do-task-in-commit/outcomes/002-update-tests.md → aaaabl-do-task-in-commit/outcomes/02-update-tests.md} +0 -0
  310. /package/RAF/{011-do-task-in-commit/outcomes/003-update-documentation.md → aaaabl-do-task-in-commit/outcomes/03-update-documentation.md} +0 -0
  311. /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
  312. /package/RAF/{011-do-task-in-commit/plans/002-update-tests.md → aaaabl-do-task-in-commit/plans/02-update-tests.md} +0 -0
  313. /package/RAF/{011-do-task-in-commit/plans/003-update-documentation.md → aaaabl-do-task-in-commit/plans/03-update-documentation.md} +0 -0
  314. /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/decisions.md +0 -0
  315. /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/input.md +0 -0
  316. /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
  317. /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
  318. /package/RAF/{012-name-picker-buffet/outcomes/003-raf-status-truncation.md → aaaabm-name-picker-buffet/outcomes/03-raf-status-truncation.md} +0 -0
  319. /package/RAF/{012-name-picker-buffet/outcomes/004-failure-reason-details.md → aaaabm-name-picker-buffet/outcomes/04-failure-reason-details.md} +0 -0
  320. /package/RAF/{012-name-picker-buffet/outcomes/005-remove-raf-commits.md → aaaabm-name-picker-buffet/outcomes/05-remove-raf-commits.md} +0 -0
  321. /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
  322. /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
  323. /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
  324. /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
  325. /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
  326. /package/RAF/{012-name-picker-buffet/plans/003-raf-status-truncation.md → aaaabm-name-picker-buffet/plans/03-raf-status-truncation.md} +0 -0
  327. /package/RAF/{012-name-picker-buffet/plans/004-failure-reason-details.md → aaaabm-name-picker-buffet/plans/04-failure-reason-details.md} +0 -0
  328. /package/RAF/{012-name-picker-buffet/plans/005-remove-raf-commits.md → aaaabm-name-picker-buffet/plans/05-remove-raf-commits.md} +0 -0
  329. /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
  330. /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
  331. /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
  332. /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/decisions.md +0 -0
  333. /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/input.md +0 -0
  334. /package/RAF/{013-dependencies-watchdog/outcomes/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/outcomes/01-define-dependency-syntax.md} +0 -0
  335. /package/RAF/{013-dependencies-watchdog/outcomes/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/outcomes/02-update-planning-prompts.md} +0 -0
  336. /package/RAF/{013-dependencies-watchdog/outcomes/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/outcomes/03-parse-dependencies-update-state.md} +0 -0
  337. /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
  338. /package/RAF/{013-dependencies-watchdog/outcomes/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/outcomes/05-update-execution-prompts.md} +0 -0
  339. /package/RAF/{013-dependencies-watchdog/outcomes/006-add-tests.md → aaaabn-dependencies-watchdog/outcomes/06-add-tests.md} +0 -0
  340. /package/RAF/{013-dependencies-watchdog/outcomes/007-add-act-alias.md → aaaabn-dependencies-watchdog/outcomes/07-add-act-alias.md} +0 -0
  341. /package/RAF/{013-dependencies-watchdog/outcomes/008-add-exit-message.md → aaaabn-dependencies-watchdog/outcomes/08-add-exit-message.md} +0 -0
  342. /package/RAF/{013-dependencies-watchdog/plans/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/plans/01-define-dependency-syntax.md} +0 -0
  343. /package/RAF/{013-dependencies-watchdog/plans/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/plans/02-update-planning-prompts.md} +0 -0
  344. /package/RAF/{013-dependencies-watchdog/plans/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/plans/03-parse-dependencies-update-state.md} +0 -0
  345. /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
  346. /package/RAF/{013-dependencies-watchdog/plans/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/plans/05-update-execution-prompts.md} +0 -0
  347. /package/RAF/{013-dependencies-watchdog/plans/006-add-tests.md → aaaabn-dependencies-watchdog/plans/06-add-tests.md} +0 -0
  348. /package/RAF/{013-dependencies-watchdog/plans/007-add-act-alias.md → aaaabn-dependencies-watchdog/plans/07-add-act-alias.md} +0 -0
  349. /package/RAF/{013-dependencies-watchdog/plans/008-add-exit-message.md → aaaabn-dependencies-watchdog/plans/08-add-exit-message.md} +0 -0
  350. /package/RAF/{014-watchdog → aaaabo-watchdog}/decisions.md +0 -0
  351. /package/RAF/{014-watchdog → aaaabo-watchdog}/input.md +0 -0
  352. /package/RAF/{014-watchdog/outcomes/001-amend-flag-position.md → aaaabo-watchdog/outcomes/01-amend-flag-position.md} +0 -0
  353. /package/RAF/{014-watchdog/outcomes/002-details-only-on-failure.md → aaaabo-watchdog/outcomes/02-details-only-on-failure.md} +0 -0
  354. /package/RAF/{014-watchdog/plans/001-amend-flag-position.md → aaaabo-watchdog/plans/01-amend-flag-position.md} +0 -0
  355. /package/RAF/{014-watchdog/plans/002-details-only-on-failure.md → aaaabo-watchdog/plans/02-details-only-on-failure.md} +0 -0
  356. /package/RAF/{015-name-lottery → aaaabp-name-lottery}/decisions.md +0 -0
  357. /package/RAF/{015-name-lottery → aaaabp-name-lottery}/input.md +0 -0
  358. /package/RAF/{015-name-lottery/outcomes/001-auto-pick-project-name.md → aaaabp-name-lottery/outcomes/01-auto-pick-project-name.md} +0 -0
  359. /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
  360. /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
  361. /package/RAF/{015-name-lottery/plans/001-auto-pick-project-name.md → aaaabp-name-lottery/plans/01-auto-pick-project-name.md} +0 -0
  362. /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
  363. /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
  364. /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/decisions.md +0 -0
  365. /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/input.md +0 -0
  366. /package/RAF/{016-planning-scalpel/outcomes/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/outcomes/01-update-git-commit-instructions.md} +0 -0
  367. /package/RAF/{016-planning-scalpel/plans/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/plans/01-update-git-commit-instructions.md} +0 -0
  368. /package/RAF/{017-decision-vault → aaaabr-decision-vault}/decisions.md +0 -0
  369. /package/RAF/{017-decision-vault → aaaabr-decision-vault}/input.md +0 -0
  370. /package/RAF/{017-decision-vault/outcomes/001-create-git-commit-utility.md → aaaabr-decision-vault/outcomes/01-create-git-commit-utility.md} +0 -0
  371. /package/RAF/{017-decision-vault/outcomes/002-integrate-commit-into-plan.md → aaaabr-decision-vault/outcomes/02-integrate-commit-into-plan.md} +0 -0
  372. /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
  373. /package/RAF/{017-decision-vault/plans/001-create-git-commit-utility.md → aaaabr-decision-vault/plans/01-create-git-commit-utility.md} +0 -0
  374. /package/RAF/{017-decision-vault/plans/002-integrate-commit-into-plan.md → aaaabr-decision-vault/plans/02-integrate-commit-into-plan.md} +0 -0
  375. /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
  376. /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/decisions.md +0 -0
  377. /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/input.md +0 -0
  378. /package/RAF/{018-workflow-forge/outcomes/001-add-task-number-progress.md → aaaabs-workflow-forge/outcomes/01-add-task-number-progress.md} +0 -0
  379. /package/RAF/{018-workflow-forge/outcomes/002-update-plan-do-prompts.md → aaaabs-workflow-forge/outcomes/02-update-plan-do-prompts.md} +0 -0
  380. /package/RAF/{018-workflow-forge/plans/001-add-task-number-progress.md → aaaabs-workflow-forge/plans/01-add-task-number-progress.md} +0 -0
  381. /package/RAF/{018-workflow-forge/plans/002-update-plan-do-prompts.md → aaaabs-workflow-forge/plans/02-update-plan-do-prompts.md} +0 -0
  382. /package/RAF/{019-verbose-chronicle → aaaabt-verbose-chronicle}/decisions.md +0 -0
  383. /package/RAF/{019-verbose-chronicle → aaaabt-verbose-chronicle}/input.md +0 -0
  384. /package/RAF/{019-verbose-chronicle/outcomes/001-amend-iteration-references.md → aaaabt-verbose-chronicle/outcomes/01-amend-iteration-references.md} +0 -0
  385. /package/RAF/{019-verbose-chronicle/outcomes/002-verbose-task-name-display.md → aaaabt-verbose-chronicle/outcomes/02-verbose-task-name-display.md} +0 -0
  386. /package/RAF/{019-verbose-chronicle/outcomes/003-verbose-streaming-fix.md → aaaabt-verbose-chronicle/outcomes/03-verbose-streaming-fix.md} +0 -0
  387. /package/RAF/{019-verbose-chronicle/outcomes/004-commit-verification-before-halt.md → aaaabt-verbose-chronicle/outcomes/04-commit-verification-before-halt.md} +0 -0
  388. /package/RAF/{019-verbose-chronicle/plans/001-amend-iteration-references.md → aaaabt-verbose-chronicle/plans/01-amend-iteration-references.md} +0 -0
  389. /package/RAF/{019-verbose-chronicle/plans/002-verbose-task-name-display.md → aaaabt-verbose-chronicle/plans/02-verbose-task-name-display.md} +0 -0
  390. /package/RAF/{019-verbose-chronicle/plans/003-verbose-streaming-fix.md → aaaabt-verbose-chronicle/plans/03-verbose-streaming-fix.md} +0 -0
  391. /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,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>
@@ -0,0 +1,33 @@
1
+ # Outcome: Clean up worktree after successful execution
2
+
3
+ ## Summary
4
+
5
+ Added automatic worktree cleanup to `raf do --worktree` when all tasks complete successfully. The worktree directory is removed but the git branch is preserved for future `raf plan --amend --worktree` operations.
6
+
7
+ ## Key Changes
8
+
9
+ ### Files Modified
10
+ - `src/commands/do.ts` - Added worktree cleanup logic after `executeSingleProject()` returns, before the `--merge` step. Imported `removeWorktree` from worktree module.
11
+ - `src/core/worktree.ts` - Updated `removeWorktree()` JSDoc to reflect its use for both failed-plan cleanup and post-completion cleanup.
12
+ - `CLAUDE.md` - Updated worktree lifecycle documentation to reflect automatic cleanup on success.
13
+ - `tests/unit/do-worktree-cleanup.test.ts` - New test file with 8 tests covering cleanup behavior.
14
+
15
+ ### Implementation Details
16
+ - Cleanup condition: `worktreeMode && worktreeRoot && result.success`
17
+ - On success: calls `removeWorktree(worktreeRoot)` and logs "Cleaned up worktree: <path>"
18
+ - On cleanup failure: logs a warning via `logger.warn()` but does NOT exit with error
19
+ - On task failure: worktree is kept for inspection (cleanup not triggered)
20
+ - Cleanup happens BEFORE the `--merge` step — merge operates on the branch name, not the worktree directory
21
+
22
+ ### Test Coverage
23
+ - `removeWorktree preserves branch`: verifies only `git worktree remove` is called, no branch deletion
24
+ - `cleanup decision logic` (4 tests): verifies cleanup conditions (worktreeMode, worktreeRoot, result.success)
25
+ - `cleanup failure handling` (2 tests): verifies error/success result from removeWorktree
26
+ - `merge after cleanup`: verifies merge uses branch name, not worktree directory path
27
+
28
+ ## Verification
29
+ - TypeScript compiles without errors
30
+ - All 879 tests pass (871 existing + 8 new), 1 pre-existing failure in `planning-prompt.test.ts` (unrelated)
31
+ - No regressions introduced
32
+
33
+ <promise>COMPLETE</promise>
@@ -0,0 +1,40 @@
1
+ # Outcome: Auto-recreate worktree from existing branch in amend flow
2
+
3
+ ## Summary
4
+
5
+ Modified `runAmendCommand()` in `src/commands/plan.ts` to auto-recreate worktrees when `raf plan --amend --worktree` is run and the worktree directory doesn't exist (e.g., after automatic cleanup on successful execution). Two fallback paths are supported:
6
+
7
+ 1. **Branch exists** (common after cleanup): Recreates worktree from the existing branch using `createWorktreeFromBranch()`
8
+ 2. **No branch exists**: Creates a fresh worktree with `createWorktree()` and copies project files from the main repo using `fs.cpSync()`
9
+
10
+ ## Key Changes
11
+
12
+ ### Files Modified
13
+ - `src/commands/plan.ts` — Replaced the hard error when no worktree is found with a two-tier fallback: resolve project from main repo, check for existing branch, recreate or create fresh worktree. Also removed the early exit when the worktree base directory doesn't exist (now gracefully skips the search and falls through to the fallback).
14
+ - `CLAUDE.md` — Updated worktree lifecycle documentation to mention recreate-on-amend scenarios and new utility functions.
15
+ - `tests/unit/plan-amend-worktree-recreate.test.ts` — New test file with 11 tests covering: decision logic, branch recreation, fresh creation, file copy, error handling, and existing-flow preservation.
16
+
17
+ ### Implementation Details
18
+ - When worktree search finds no match, resolves the project from the main repo using `resolveProjectIdentifierWithDetails(rafDir, identifier)`
19
+ - Extracts folder name via `path.basename()` (folder name = branch name)
20
+ - Uses `branchExists()` (from task 001) to decide which path
21
+ - `createWorktreeFromBranch()` (from task 001) recreates from existing branch — project files are already on the branch
22
+ - `createWorktree()` creates a fresh worktree, then `fs.cpSync()` copies the project folder from main repo
23
+ - Both paths set `matchedWorktreeDir` and `matchedProjectPath` so the rest of the amend flow continues seamlessly
24
+ - Info messages logged: "Recreated worktree from branch: <name>" or "Created fresh worktree and copied project files: <name>"
25
+ - Error if project not found in main repo or worktrees: "Project not found in any worktree or main repo: <identifier>"
26
+
27
+ ### Test Coverage
28
+ - Decision logic: branch exists → createWorktreeFromBranch, branch doesn't exist → createWorktree
29
+ - Branch recreation: success path, branch-not-found error
30
+ - Fresh worktree: success with -b flag
31
+ - File copy: all project files (input.md, decisions.md, plans/, outcomes/) copied correctly with preserved structure
32
+ - Error handling: project not found, createWorktreeFromBranch failure, createWorktree failure
33
+ - Existing flow: worktree search match skips recreation
34
+
35
+ ## Verification
36
+ - TypeScript compiles without errors
37
+ - All 882 tests pass (871 existing + 11 new), 1 pre-existing failure in `planning-prompt.test.ts` (unrelated)
38
+ - No regressions introduced
39
+
40
+ <promise>COMPLETE</promise>
@@ -0,0 +1,31 @@
1
+ # Task: Add createWorktreeFromBranch utility
2
+
3
+ ## Objective
4
+ Add a new `createWorktreeFromBranch()` function to `src/core/worktree.ts` that creates a git worktree from an existing branch, and a `branchExists()` helper to check if a branch exists locally.
5
+
6
+ ## Context
7
+ Currently `createWorktree()` always creates a new branch (`git worktree add -b`). The new amend flow needs to recreate a worktree from an existing branch after the worktree was cleaned up post-execution. This is a prerequisite for both the cleanup feature (branch must survive worktree removal) and the amend recreation feature.
8
+
9
+ ## Requirements
10
+ - Add `branchExists(branchName: string): boolean` function that checks if a local branch exists
11
+ - Add `createWorktreeFromBranch(repoBasename: string, projectId: string): WorktreeCreateResult` that uses `git worktree add <path> <existing-branch>` (no `-b` flag) to attach a worktree to an existing branch
12
+ - Reuse the same `WorktreeCreateResult` interface and `computeWorktreePath` logic
13
+ - Handle error cases: branch doesn't exist, worktree path already exists, git command failure
14
+ - Add unit tests covering success path, branch-not-found, and worktree-already-exists scenarios
15
+
16
+ ## Implementation Steps
17
+ 1. Add `branchExists()` helper using `git branch --list <name>`
18
+ 2. Add `createWorktreeFromBranch()` function - same structure as `createWorktree()` but uses `git worktree add <path> <branch>` without the `-b` flag
19
+ 3. Export both new functions
20
+ 4. Add tests in the worktree test file
21
+
22
+ ## Acceptance Criteria
23
+ - [ ] `branchExists()` correctly detects existing and non-existing branches
24
+ - [ ] `createWorktreeFromBranch()` creates a worktree attached to an existing branch
25
+ - [ ] Returns appropriate error when branch doesn't exist
26
+ - [ ] All new and existing tests pass
27
+ - [ ] TypeScript compiles without errors
28
+
29
+ ## Notes
30
+ - The existing `createWorktree()` function should remain unchanged - it's used by `raf plan --worktree` for new projects
31
+ - The branch name matches the project folder name (e.g., `022-prune-cycle`)
@@ -0,0 +1,38 @@
1
+ # Task: Clean up worktree after successful execution
2
+
3
+ ## Objective
4
+ Add automatic worktree cleanup to `raf do --worktree` when all tasks complete successfully, preserving the git branch for future amend operations.
5
+
6
+ ## Context
7
+ Currently worktrees persist indefinitely after execution. Since the git branch contains all committed work, the worktree directory is redundant after successful completion. Cleaning it up reduces clutter in `~/.raf/worktrees/`. The branch is intentionally kept so `raf plan --amend --worktree` can recreate the worktree later.
8
+
9
+ ## Dependencies
10
+ 001
11
+
12
+ ## Requirements
13
+ - After `executeSingleProject()` returns successfully in worktree mode, remove the worktree using `removeWorktree()`
14
+ - Cleanup happens immediately after tasks finish, BEFORE the `--merge` step (merge operates on the branch, not the worktree directory)
15
+ - Only clean up on success (all tasks completed). Keep worktree on failure for inspection
16
+ - Do NOT delete the git branch - only remove the worktree directory
17
+ - Log a message when cleanup happens (e.g., "Cleaned up worktree: <path>")
18
+ - If cleanup fails, log a warning but don't fail the overall command
19
+
20
+ ## Implementation Steps
21
+ 1. In `src/commands/do.ts`, after `executeSingleProject()` returns, check if worktree mode is active and result is successful
22
+ 2. Call `removeWorktree(worktreeRoot)` to clean up the directory
23
+ 3. Log appropriate success/warning messages
24
+ 4. Continue to the merge step (which uses the branch, not the worktree directory)
25
+ 5. Add/update tests for the do command's cleanup behavior
26
+
27
+ ## Acceptance Criteria
28
+ - [ ] Worktree directory is removed after successful execution with `--worktree`
29
+ - [ ] Git branch is preserved after worktree cleanup
30
+ - [ ] Worktree is NOT cleaned up on failure
31
+ - [ ] `--merge` still works after worktree cleanup (operates on branch)
32
+ - [ ] Cleanup failure produces a warning, not an error exit
33
+ - [ ] All tests pass
34
+
35
+ ## Notes
36
+ - The `removeWorktree()` function already exists in `src/core/worktree.ts`
37
+ - The merge step in `do.ts` already uses the branch name (`path.basename(worktreeRoot)`), not the worktree directory itself, so merge should work after cleanup
38
+ - Consider that `raf status` auto-discovers worktree directories - after cleanup, the project will no longer appear in the worktrees section of status output (this is expected)
@@ -0,0 +1,50 @@
1
+ # Task: Auto-recreate worktree from existing branch in amend flow
2
+
3
+ ## Objective
4
+ When `raf plan --amend --worktree` is run and the worktree directory doesn't exist, automatically recreate it — either from an existing branch or by creating a fresh worktree and copying project files from the main repo.
5
+
6
+ ## Context
7
+ After task 002, worktrees are cleaned up on successful execution but branches are preserved. When a user wants to amend a completed worktree project, the amend command needs to detect this situation and recreate the worktree. Currently, amend in worktree mode searches existing worktree directories and fails if none is found. There are two fallback scenarios to handle:
8
+ 1. Branch exists → recreate worktree from that branch (most common after cleanup)
9
+ 2. Neither branch nor worktree exists → create a fresh worktree with a new branch and copy the project files from the main repo
10
+
11
+ ## Dependencies
12
+ 001, 002
13
+
14
+ ## Requirements
15
+ - In `runAmendCommand()` when `worktreeMode` is true, after the existing worktree search fails to find the project:
16
+ 1. Resolve the project identifier from the main repo to get the project folder name
17
+ 2. Check if a branch matching that folder name exists using `branchExists()`
18
+ 3. **If branch exists**: call `createWorktreeFromBranch()` to recreate the worktree. Log an info message like "Recreated worktree from branch: <branch>"
19
+ 4. **If branch does NOT exist**: call the regular `createWorktree()` to create a fresh worktree with a new branch, then copy the project folder (`RAF/<project>/`) from the main repo into the new worktree. Log an info message about creating a fresh worktree.
20
+ 5. Continue the amend flow with the recreated/new worktree path
21
+ - The recreated worktree (from branch) should already contain the project files since they're on the branch
22
+ - The fresh worktree (no branch) needs the project files copied over from the main repo
23
+ - Both paths should seamlessly continue into the normal amend planning flow
24
+
25
+ ## Implementation Steps
26
+ 1. In `src/commands/plan.ts`, modify the `runAmendCommand()` worktree resolution logic
27
+ 2. After the existing worktree search loop finds no match, add a two-tier fallback:
28
+ - First, check for existing branch with `branchExists(folderName)`
29
+ - If branch found: call `createWorktreeFromBranch(repoBasename, folderName)`
30
+ - If no branch: call `createWorktree(repoBasename, folderName)`, then copy the `RAF/<project>/` directory from the main repo into the new worktree
31
+ 3. Set `worktreePath` and resolve `projectPath` inside the new worktree
32
+ 4. Import the new functions from `worktree.ts`
33
+ 5. Add tests covering: branch found and worktree recreated, no branch found and fresh worktree created with project files copied, neither scenario errors
34
+
35
+ ## Acceptance Criteria
36
+ - [ ] `raf plan --amend --worktree <project>` works when worktree was cleaned up but branch exists
37
+ - [ ] `raf plan --amend --worktree <project>` works when neither worktree nor branch exists — creates fresh worktree and copies project files
38
+ - [ ] Recreated worktree (from branch) contains the project files from the branch
39
+ - [ ] Fresh worktree (no branch) contains project files copied from the main repo
40
+ - [ ] Info messages are logged about which path was taken (recreate from branch vs. fresh worktree)
41
+ - [ ] Existing amend flow (worktree still exists) continues to work unchanged
42
+ - [ ] All tests pass
43
+
44
+ ## Notes
45
+ - The project folder name IS the branch name (e.g., `022-prune-cycle`)
46
+ - The main repo may or may not have the project folder — worktree-only projects exist only on the branch
47
+ - For the "no branch" fallback, the project MUST exist in the main repo (otherwise there's nothing to copy) — if it doesn't, show an error
48
+ - After `createWorktreeFromBranch()`, the worktree should have all the files from the branch including `RAF/<project>/plans/`, `outcomes/`, etc.
49
+ - After `createWorktree()` + copy, the new worktree will have the project files but on a fresh branch based on the current HEAD
50
+ - Update CLAUDE.md documentation about the worktree lifecycle to mention both recreate-on-amend scenarios
@@ -0,0 +1,25 @@
1
+ # Project Decisions
2
+
3
+ ## Should the base36 timestamp ID be fixed-width or variable-length?
4
+ Fixed-width, 6 characters. This covers ~69 years from the shifted epoch (36^6 = 2,176,782,336 seconds).
5
+
6
+ ## How should collisions be handled if two projects are created within the same second?
7
+ Increment by 1 — if timestamp ID already exists, increment until a free slot is found.
8
+
9
+ ## Should existing projects using the old sequential numbering still be recognized?
10
+ Clean break. Only support the new timestamp-based format going forward.
11
+
12
+ ## Unix time precision?
13
+ Seconds.
14
+
15
+ ## What is the shifted epoch?
16
+ Exactly Jan 1, 2026 00:00:00 UTC (unix timestamp 1,767,225,600). All project IDs are base36(floor(current_unix_seconds) - 1,767,225,600), zero-padded to 6 chars.
17
+
18
+ ## What about git commit and branch naming format?
19
+ Same pattern with new ID. Commits: `RAF[00j3k1:001] description`. Branches: `00j3k1-epoch-shift`.
20
+
21
+ ## How should identifier resolution work?
22
+ Support both the 6-char base36 ID and project name substring matching (similar to current system, minus old sequential format).
23
+
24
+ ## Sort order?
25
+ Sort by ID, which naturally equals chronological (creation time) order.
@@ -0,0 +1 @@
1
+ - [ ] switch project id number generation to base36 encoding (starting with 0) of unix time (but make "unix" start from 01-01-2026 or unix time - 56 years)
@@ -0,0 +1,34 @@
1
+ # Outcome: Replace Core ID Generation with Epoch-Based Base36
2
+
3
+ ## Summary
4
+
5
+ Replaced the sequential project numbering system (001-999 numeric, then a00-zzz base36) with epoch-based timestamp IDs. Each project ID is now the base36 encoding of `(current_unix_seconds - 1767225600)`, zero-padded to 6 characters.
6
+
7
+ ## Key Changes
8
+
9
+ ### `src/utils/paths.ts`
10
+ - Added `RAF_EPOCH` constant (1767225600 = 2026-01-01T00:00:00Z)
11
+ - Rewrote `encodeBase36()`: now accepts any non-negative integer, produces 6-char zero-padded base36 string using native `Number.toString(36)`
12
+ - Rewrote `decodeBase36()`: validates 6-char format, uses `parseInt(str, 36)`
13
+ - Rewrote `isBase36Prefix()`: validates 6-char `[0-9a-z]` format
14
+ - Rewrote `getNextProjectNumber()`: generates timestamp-based ID with collision avoidance (increment until free slot found)
15
+ - Simplified `formatProjectNumber()`: delegates to `encodeBase36()`
16
+ - Updated all regex patterns from `\d{2,3}` / `[a-z][0-9a-z]{2}` to `[0-9a-z]{6}` in: `getProjectDir`, `extractProjectNumber`, `extractProjectName`, `listProjects`, `parseProjectFolder`, `resolveProjectIdentifierWithDetails`
17
+ - Simplified `parseProjectPrefix()`: only accepts 6-char base36
18
+ - Fixed `resolveProjectIdentifierWithDetails()` to fall through from number matching to name matching when a 6-char identifier doesn't match any project by number (prevents e.g. "second" being mistaken for a base36 prefix)
19
+ - Removed old constants: `BASE36_START`, `MAX_NUMERIC`
20
+
21
+ ### `src/core/state-derivation.ts`
22
+ - Updated `discoverProjects()` to use new 6-char base36 prefix pattern
23
+ - Added `decodeBase36` import
24
+
25
+ ### `tests/unit/paths.test.ts`
26
+ - Completely rewritten to test the new epoch-based ID system
27
+ - 66 tests, all passing
28
+
29
+ ## Notes
30
+ - This is a clean break from old IDs - no backward compatibility
31
+ - Other test files in the project still use old-format directories (e.g., `001-first`) for their own test scenarios. These will need updating in a subsequent task that updates the remaining callers/patterns.
32
+ - The `number` field in `ProjectInfo`, `DiscoveredProject`, etc. now holds the shifted timestamp value (a large integer) rather than a small sequential number. This still sorts correctly by creation time.
33
+
34
+ <promise>COMPLETE</promise>
@@ -0,0 +1,32 @@
1
+ # Outcome: Update All Pattern Matching and Resolution for 6-Char IDs
2
+
3
+ ## Summary
4
+
5
+ Updated all remaining project ID patterns across the codebase to use the new 6-character base36 format. Task 001 had already updated `paths.ts` and `state-derivation.ts`; this task updated the remaining callers.
6
+
7
+ ## Key Changes
8
+
9
+ ### `src/utils/validation.ts`
10
+ - Rewrote `validateProjectExists()`: replaced dual regex patterns (`/^\d{2,3}-/` and `/^[a-z][0-9a-z]{2}-/`) with single 6-char base36 pattern `/^[0-9a-z]{6}-(.+)$/i`
11
+
12
+ ### `src/commands/status.ts`
13
+ - Updated project number display in `listAllProjects()`: replaced `String(project.number).padStart(3, '0')` with `formatProjectNumber(project.number)` to show base36 IDs
14
+ - Added `formatProjectNumber` import from paths.ts
15
+ - Updated CLI argument help text to show new format examples (`00j3k1` instead of `001`)
16
+
17
+ ### `src/commands/do.ts`
18
+ - Updated CLI argument help text to show new format examples (`00j3k1` instead of `001`)
19
+
20
+ ## Verification
21
+
22
+ - TypeScript compiles with no errors (`npm run lint` passes)
23
+ - All remaining `\d{2,3}` patterns in source code are for task-level IDs (3-digit like `001`), not project IDs — confirmed correct
24
+ - No old numeric-only or 3-char base36 project patterns remain in source code
25
+ - Test failures exist but are expected — test files still use old-format fixtures (e.g., `001-first`) and will be updated in Task 003
26
+
27
+ ## Notes
28
+ - The `paths.ts`, `state-derivation.ts`, and `project-picker.ts` files were already updated by Task 001
29
+ - Task-level patterns (`\d{2,3}`) in `state-derivation.ts`, `project-manager.ts`, `plan.ts`, and `execution.ts` are intentionally unchanged — task numbering within a project remains 3-digit
30
+ - The `project-manager.ts:readOutcomes()` uses `\d{2,3}` for task file matching, which is correct
31
+
32
+ <promise>COMPLETE</promise>
@@ -0,0 +1,59 @@
1
+ # Outcome: Update All Tests for 6-Char Base36 Project IDs
2
+
3
+ ## Summary
4
+
5
+ Updated all test files affected by the project ID format change from sequential 3-char prefixes (e.g., `001-project`, `a01-project`) to epoch-based 6-char base36 prefixes (e.g., `000001-project`, `00a001-project`). All 842 tests across 41 suites pass.
6
+
7
+ ## Key Changes
8
+
9
+ ### `tests/unit/status-command.test.ts`
10
+ - Updated all project folder names from 3-char to 6-char prefixes (e.g., `003-numeric-project` → `000003-numeric-project`)
11
+ - Changed `createProject` helper to use `encodeBase36(number)` instead of `padStart(3, '0')`
12
+ - Updated test identifiers from `'3'`, `'003'`, `'a00'` to `'000003'`, `'00a001'`, etc.
13
+ - Added `encodeBase36` import from paths.ts
14
+ - Added negative test for old-format folder rejection
15
+
16
+ ### `tests/unit/plan-command.test.ts`
17
+ - Updated all project folder names from 3-char to 6-char prefixes
18
+ - Changed resolution test identifiers from `'3'`, `'a01'`, `'1'` to `'000003'`, `'00a001'`, `'000001'`
19
+
20
+ ### `tests/unit/do-command.test.ts`
21
+ - Updated all project folder names from 3-char to 6-char prefixes
22
+ - Removed obsolete "Backward Compatibility" section that tested old 3-char and numeric identifiers
23
+ - Tests now verify 6-char base36 prefix resolution, full folder name resolution, and name resolution
24
+
25
+ ### `tests/unit/project-picker.test.ts`
26
+ - Updated all mock data paths from `001-*`, `002-*` to `000001-*`, `000002-*`
27
+ - Updated format expectations from `'001 fix-auth-bug (2/5 tasks)'` to `'000001 fix-auth-bug (2/5 tasks)'`
28
+ - Updated `mockSelect` return values accordingly
29
+
30
+ ### `tests/unit/project-manager.test.ts`
31
+ - Changed tests to use regex matching for epoch-based IDs (e.g., `/^[0-9a-z]{6}-first$/`) instead of exact matches
32
+ - Uses `toBeGreaterThanOrEqual` comparisons for epoch-based ID values
33
+ - Added imports for `encodeBase36` and `RAF_EPOCH`
34
+
35
+ ### `tests/unit/state-derivation.test.ts`
36
+ - Updated `discoverProjects` tests from `001-first-project` to `000001-first-project`
37
+ - Added `001-too-short` as an intentionally ignored directory (validates 3-char prefixes are rejected)
38
+
39
+ ### `tests/unit/planning-prompt.test.ts`
40
+ - Fixed pre-existing bug: changed assertion from `'3-8 distinct'` to `'identify distinct'` to match actual prompt text
41
+
42
+ ### `tests/unit/commit-planning-artifacts.test.ts`
43
+ - Updated `017-decision-vault` → `000017-decision-vault`
44
+ - Updated `a01-my-feature` → `00a001-my-feature`
45
+ - Updated regex patterns `RAF\[017\]` → `RAF\[000017\]` and `RAF\[a01\]` → `RAF\[00a001\]`
46
+
47
+ ## Files Not Changed (Verified Correct)
48
+
49
+ The following test files use 3-char prefixes but were verified to be correct:
50
+ - `do-blocked-tasks.test.ts`, `do-rerun.test.ts`, `dependency-integration.test.ts` — use `001-test-project` as arbitrary temp directory names not parsed by project resolution; inner references are task-level IDs (3-digit, intentionally unchanged)
51
+ - `worktree.test.ts`, `worktree-integration.test.ts`, `plan-amend-worktree-recreate.test.ts`, `do-worktree-cleanup.test.ts` — use names as branch names/worktree paths, not parsed by project ID resolution
52
+
53
+ ## Verification
54
+
55
+ - All 842 tests pass across 41 test suites
56
+ - TypeScript compiles with no errors
57
+ - No old-format project ID references remain in test files (only task-level 3-digit IDs, temp directory names, and intentional negative test cases)
58
+
59
+ <promise>COMPLETE</promise>
@@ -0,0 +1,30 @@
1
+ # Outcome: Update Documentation for New ID System
2
+
3
+ ## Summary
4
+
5
+ Updated CLAUDE.md and README.md to reflect the new epoch-based 6-character base36 project ID format, replacing all references to the old sequential numbering system.
6
+
7
+ ## Key Changes
8
+
9
+ ### `CLAUDE.md`
10
+ - **RAF Project Structure**: Updated folder example from `NNN-project-name/` (e.g., `001-fix-bug or a00-feature`) to `00j3k1-project-name/` with 6-char epoch-based base36 ID
11
+ - **Project Naming Convention**: Replaced old format description (`NNN` 001-999, then `XXX` a00-zzz, "46,000+ projects") with epoch-based scheme (`XXXXXX` 6-char base36, generated from Unix timestamp minus RAF_EPOCH, unique by timestamp, sorts chronologically)
12
+ - **Project Identifier Resolution**: Simplified from 4 formats (numeric, base36, name, folder) to 3 formats (base36 ID, name, full folder name) with updated examples
13
+ - **Git Commit Schema**: Updated examples from `RAF[005:001]`, `RAF[a01:003]` to `RAF[00j3k1:001]`, `RAF[00k5m2:003]`
14
+ - **Worktree Mode**: Updated worktree path and branch name examples from `020-my-feature` to `00j3k1-my-feature`
15
+
16
+ ### `README.md`
17
+ - Updated `raf plan --amend` example from `3` to `00j3k1`
18
+ - Updated `raf do` example from `3` (project #3) to `00j3k1` (by project ID)
19
+ - Updated `raf status` example from `3` (project #3) to `00j3k1`
20
+ - Updated Project Structure section: folder examples from `001-auth-system/`, `002-dashboard/` to `00j3k1-auth-system/`, `00k5m2-dashboard/`; description changed from "numbered project directories" to "project directories identified by epoch-based base36 IDs"
21
+ - Updated worktree branch name example from `020-my-feature` to `00j3k1-my-feature`
22
+
23
+ ## Verification
24
+
25
+ - No references to old sequential numbering (001-999) for project IDs remain in docs
26
+ - No references to old base36 format (a00-zzz) for project IDs remain in docs
27
+ - Task-level IDs (001, 002, etc.) correctly preserved throughout both files
28
+ - All examples use consistent 6-char base36 IDs
29
+
30
+ <promise>COMPLETE</promise>
@@ -0,0 +1,40 @@
1
+ # Task: Replace Core ID Generation with Epoch-Based Base36
2
+
3
+ ## Objective
4
+ Replace the sequential project numbering system with timestamp-based IDs using base36 encoding of shifted unix time.
5
+
6
+ ## Context
7
+ Currently RAF uses sequential numbering (001-999 numeric, then a00-zzz base36). This task replaces that with a new scheme: each project ID is the base36 encoding of `(current_unix_seconds - RAF_EPOCH)`, zero-padded to 6 characters. The RAF epoch is 2026-01-01T00:00:00Z (unix timestamp 1767225600). This is a clean break — no backward compatibility with old IDs.
8
+
9
+ ## Requirements
10
+ - Define the RAF epoch constant: 1767225600 (2026-01-01T00:00:00Z)
11
+ - ID width: 6 characters, zero-padded (covers ~69 years)
12
+ - Encoding: standard base36 (digits 0-9, letters a-z) of the shifted timestamp in seconds
13
+ - `getNextProjectNumber()` → replace with a function that generates an ID from `Math.floor(Date.now()/1000) - RAF_EPOCH`
14
+ - Collision handling: if a folder with that ID already exists in the RAF dir, increment by 1 until a free slot is found
15
+ - Replace `encodeBase36()` / `decodeBase36()` with simple base36 encode/decode operating on any non-negative integer, outputting 6-char zero-padded strings
16
+ - Replace `formatProjectNumber()` to use the new encoding
17
+ - Remove the old constants `BASE36_START`, `MAX_NUMERIC`, and the old `isBase36Prefix()` check
18
+ - The function should still accept a `rafDir` parameter to scan for collisions
19
+ - Keep the function signatures compatible where possible or update all callers
20
+
21
+ ## Implementation Steps
22
+ 1. Replace the old base36 constants and encoding functions in `src/utils/paths.ts` with the new epoch-based system
23
+ 2. Rewrite `getNextProjectNumber()` to generate timestamp-based IDs with collision avoidance
24
+ 3. Rewrite `formatProjectNumber()` to produce 6-char zero-padded base36 strings
25
+ 4. Update `isBase36Prefix()` to validate 6-char base36 strings (the new format)
26
+ 5. Update callers in `src/core/project-manager.ts` and `src/commands/plan.ts` (both call `getNextProjectNumber()` and `formatProjectNumber()`)
27
+
28
+ ## Acceptance Criteria
29
+ - [ ] New epoch constant defined
30
+ - [ ] `encodeBase36(n)` converts any non-negative integer to a 6-char zero-padded base36 string
31
+ - [ ] `decodeBase36(str)` converts a 6-char base36 string back to an integer
32
+ - [ ] ID generation uses `floor(Date.now()/1000) - 1767225600`
33
+ - [ ] Collision detection increments ID when folder already exists
34
+ - [ ] Old sequential numbering code fully removed
35
+ - [ ] All callers updated
36
+ - [ ] TypeScript compiles with no errors
37
+
38
+ ## Notes
39
+ - The `number` field in `ProjectInfo`, `DiscoveredProject`, etc. will now hold the shifted timestamp value (a large integer like 3456000) rather than a small sequential number. This is fine — it still sorts correctly by creation time.
40
+ - Consider whether `getNextProjectNumber` should return a number or a string. Currently returns number, which works since the timestamp fits in JS number range easily.