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,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.
@@ -0,0 +1,60 @@
1
+ # Task: Update All Pattern Matching and Resolution for 6-Char IDs
2
+
3
+ ## Objective
4
+ Update every regex pattern, folder matching function, and identifier resolution function across the codebase to recognize the new 6-character base36 project ID format.
5
+
6
+ ## Context
7
+ After task 001 changes the ID generation, the rest of the codebase still has regex patterns like `/^(\d{2,3})-/` and `/^([a-z][0-9a-z]{2})-/` that match the old format. These must all be updated to match the new 6-char alphanumeric format (e.g., `00j3k1-project-name`). This is a clean break, so old patterns should be removed entirely.
8
+
9
+ ## Dependencies
10
+ 001
11
+
12
+ ## Requirements
13
+ - New project folder pattern: `/^([0-9a-z]{6})-(.+)$/` (6 lowercase alphanumeric chars, hyphen, name)
14
+ - Update all functions in `src/utils/paths.ts` that parse folder names:
15
+ - `extractProjectNumber()` — match 6-char prefix
16
+ - `extractProjectName()` — match 6-char prefix, return name after hyphen
17
+ - `extractTaskNameFromPlanFile()` — this uses task IDs (3-digit like `001`), leave as-is since task numbering within a project hasn't changed
18
+ - `parseProjectPrefix()` — parse 6-char base36 string
19
+ - `getProjectDir()` — match 6-char prefix pattern
20
+ - `listProjects()` — match 6-char prefix pattern
21
+ - `parseProjectFolder()` — match 6-char prefix pattern
22
+ - `resolveProjectIdentifierWithDetails()` — update the full folder pattern regex, update identifier detection (no more separate numeric vs base36 paths — all IDs are 6-char base36)
23
+ - Update `src/core/state-derivation.ts`:
24
+ - `discoverProjects()` — currently only matches `/^(\d{2,3})-/`, must match new 6-char format
25
+ - `parseDependencies()` — this is about task IDs (like `001`), not project IDs, so leave as-is
26
+ - Outcome file matching in `deriveProjectState()` — these use task IDs (`/^(\d{2,3})-/` for tasks), leave as-is
27
+ - Plan file matching in `deriveProjectState()` — same, task IDs, leave as-is
28
+ - Update `src/core/project-manager.ts`:
29
+ - `readOutcomes()` — uses `/^(\d{2,3})-/` to match task outcomes, this is task ID format, leave as-is
30
+ - Update `src/utils/validation.ts`:
31
+ - `validateProjectExists()` — update folder matching patterns
32
+ - Update `src/commands/plan.ts`:
33
+ - Any regex matching existing plan files (line ~582: `/^(\d{2,3})-/`) — this is for task files, leave as-is
34
+ - Update `src/commands/status.ts` and `src/commands/do.ts` — these use `extractProjectNumber()` and `extractProjectName()` which will be updated via paths.ts, but check for any inline regex patterns
35
+ - Update identifier resolution to support:
36
+ - Full 6-char ID: `00j3k1` → look up by decoded number
37
+ - Full folder name: `00j3k1-epoch-shift` → exact match
38
+ - Project name: `epoch-shift` → name match (case-insensitive)
39
+ - Remove old numeric-only (`3`, `003`) and old 3-char base36 (`a00`) resolution paths
40
+
41
+ ## Implementation Steps
42
+ 1. Update all regex patterns in `src/utils/paths.ts` from old numeric/base36 dual patterns to single 6-char pattern
43
+ 2. Simplify `resolveProjectIdentifierWithDetails()` — all IDs are now 6-char base36, so the numeric vs base36 branching can be unified
44
+ 3. Update `discoverProjects()` in `src/core/state-derivation.ts` to match 6-char prefix
45
+ 4. Update `validateProjectExists()` in `src/utils/validation.ts`
46
+ 5. Verify that task-level patterns (3-digit IDs like `001`) are untouched
47
+ 6. Verify commands (`do.ts`, `status.ts`, `plan.ts`) work with updated utility functions
48
+
49
+ ## Acceptance Criteria
50
+ - [ ] All project folder patterns match `[0-9a-z]{6}-name` format
51
+ - [ ] Task-level patterns (`001`, `002`) remain unchanged
52
+ - [ ] `resolveProjectIdentifierWithDetails()` resolves 6-char IDs and project names
53
+ - [ ] `discoverProjects()` finds projects with new ID format
54
+ - [ ] `validateProjectExists()` works with new format
55
+ - [ ] No old numeric-only or 3-char base36 patterns remain for project IDs
56
+ - [ ] TypeScript compiles with no errors
57
+
58
+ ## Notes
59
+ - Be careful to distinguish between PROJECT IDs (changing to 6-char) and TASK IDs within a project (staying as 3-digit `001`, `002`, etc.). Only project-level patterns change.
60
+ - The `number` field in project interfaces remains a `number` type — it just holds a larger value now (the shifted timestamp).
@@ -0,0 +1,48 @@
1
+ # Task: Update Tests for New Epoch-Based ID System
2
+
3
+ ## Objective
4
+ Rewrite all unit tests affected by the project ID format change to test the new 6-character base36 epoch-based ID system.
5
+
6
+ ## Context
7
+ The test suite in `tests/unit/paths.test.ts` (~741 lines) extensively tests the old sequential numbering and base36 encoding. After tasks 001 and 002 change the production code, these tests will all fail. Other test files (`status-command.test.ts`, `plan-command.test.ts`, `do-command.test.ts`) may also have hardcoded project folder names in old format.
8
+
9
+ ## Dependencies
10
+ 001, 002
11
+
12
+ ## Requirements
13
+ - Rewrite `tests/unit/paths.test.ts` to cover:
14
+ - `encodeBase36()` — now encodes any non-negative integer to 6-char zero-padded base36
15
+ - `decodeBase36()` — inverse of encode
16
+ - `getNextProjectNumber()` — generates from current timestamp, handles collisions
17
+ - `formatProjectNumber()` — produces 6-char strings
18
+ - `extractProjectNumber()` — extracts 6-char prefix from folder names
19
+ - `extractProjectName()` — extracts name portion after 6-char prefix
20
+ - `parseProjectPrefix()` — parses 6-char base36 strings
21
+ - `resolveProjectIdentifierWithDetails()` — test all resolution paths (6-char ID, folder name, project name)
22
+ - `listProjects()` — lists projects with new format
23
+ - `discoverProjects()` — discovers projects with new format
24
+ - Update any test fixtures that use old folder names (e.g., `001-test-project` → `00abcd-test-project`)
25
+ - Test collision handling in `getNextProjectNumber()` — mock `Date.now()` and pre-create folders
26
+ - Test edge cases: zero timestamp (epoch start), very large timestamps, invalid format strings
27
+ - Update tests in other test files (`status-command.test.ts`, `plan-command.test.ts`, `do-command.test.ts`) that reference project folder names with old format
28
+
29
+ ## Implementation Steps
30
+ 1. Read existing test files to understand current test structure and patterns
31
+ 2. Rewrite `tests/unit/paths.test.ts` for the new ID system
32
+ 3. Update project folder references in `tests/unit/status-command.test.ts`
33
+ 4. Update project folder references in `tests/unit/plan-command.test.ts`
34
+ 5. Update project folder references in `tests/unit/do-command.test.ts`
35
+ 6. Run all tests and fix any remaining failures
36
+
37
+ ## Acceptance Criteria
38
+ - [ ] All tests in `paths.test.ts` rewritten and passing
39
+ - [ ] Tests cover encode/decode round-trip
40
+ - [ ] Tests cover collision handling
41
+ - [ ] Tests cover identifier resolution (6-char ID, full folder, name)
42
+ - [ ] Tests in other files updated with new folder format
43
+ - [ ] `npm test` passes with all tests green
44
+ - [ ] No references to old folder format (e.g., `001-`, `a00-`) remain in test files for project IDs (task IDs like `001-task.md` within plans/outcomes are fine)
45
+
46
+ ## Notes
47
+ - For time-dependent tests, mock `Date.now()` to return predictable values. E.g., `Date.now = jest.fn(() => (1767225600 + 12345) * 1000)` → ID should be `encodeBase36(12345)` = `"0009ix"`.
48
+ - Remember task IDs within projects still use the `001`, `002` format — only project-level IDs changed.
@@ -0,0 +1,44 @@
1
+ # Task: Update Documentation for New ID System
2
+
3
+ ## Objective
4
+ Update CLAUDE.md and README.md to reflect the new epoch-based project ID format.
5
+
6
+ ## Context
7
+ After the code changes, the documentation still references the old sequential numbering system (001-999 numeric, a00-zzz base36). All references need to be updated to describe the new 6-character base36 epoch-based IDs.
8
+
9
+ ## Dependencies
10
+ 001, 002
11
+
12
+ ## Requirements
13
+ - Update `CLAUDE.md`:
14
+ - Project Naming Convention section: describe new epoch-based scheme
15
+ - Remove references to NNN (001-999) sequential format
16
+ - Remove references to old base36 (a00-zzz) format
17
+ - Update "Supports 46,000+ projects" — new system supports 69 years of unique IDs
18
+ - Update Project Identifier Resolution section: 6-char ID, project name, full folder name
19
+ - Update example folder names (e.g., `001-fix-bug` → `00abcd-fix-bug`)
20
+ - Update git commit format examples: `RAF[00abcd:001]`
21
+ - Update worktree branch name examples
22
+ - Update RAF Project Structure section with new folder format
23
+ - Update `README.md`:
24
+ - Update any user-facing references to project ID format
25
+ - Update example commands and output
26
+
27
+ ## Implementation Steps
28
+ 1. Read current CLAUDE.md and identify all sections referencing the old ID format
29
+ 2. Update each section with the new 6-char base36 epoch-based format
30
+ 3. Read current README.md and update relevant sections
31
+ 4. Ensure consistency between CLAUDE.md and README.md
32
+
33
+ ## Acceptance Criteria
34
+ - [ ] No references to old sequential numbering (001-999) for project IDs in docs
35
+ - [ ] No references to old base36 format (a00-zzz) for project IDs in docs
36
+ - [ ] New epoch-based scheme clearly documented
37
+ - [ ] Examples use realistic 6-char IDs
38
+ - [ ] Git commit format examples updated
39
+ - [ ] Project resolution formats documented
40
+ - [ ] Task IDs within projects still shown as 001, 002 format (unchanged)
41
+
42
+ ## Notes
43
+ - Be careful to distinguish between project IDs (changing) and task IDs (staying as 001, 002). Don't accidentally change task ID documentation.
44
+ - The prompts in `src/prompts/` also reference project structure — the amend prompt mentions `NNN` for task references which is about task IDs, not project IDs. The planning prompt shows `001-task-name.md` which is also task format. These should NOT be changed.
@@ -0,0 +1,25 @@
1
+ # Project Decisions
2
+
3
+ ## Amend commit bug: does it fail only with --worktree or also without?
4
+ Worktree only. The bug only happens when using --amend --worktree.
5
+
6
+ ## Amend commit bug: suspected root cause?
7
+ Needs investigation. Not sure of root cause — the task should investigate the full amend+worktree flow to find the bug.
8
+
9
+ ## Task ID format change: breaking change or backward compatible?
10
+ Breaking change. Update everything to new format, no backward compat needed.
11
+
12
+ ## PR creation: what content should the PR body contain?
13
+ Input.md, key decisions, and outcomes summary combined.
14
+
15
+ ## PR creation: how should the PR body be generated?
16
+ Use Claude (Haiku) to generate a clean PR description from input + decisions + outcomes.
17
+
18
+ ## PR target branch: auto-detect or let user pick?
19
+ Auto-detect base. Automatically use the branch the worktree was forked from (usually main).
20
+
21
+ ## Post-execution picker: when should it appear?
22
+ Remove --merge flag entirely. Always show picker BEFORE worktree tasks execute.
23
+
24
+ ## Post-execution picker: flow after task completion?
25
+ Pre-pick + auto. Pick before execution, auto-perform after success, skip on failure.
@@ -0,0 +1,4 @@
1
+ - [ ] if i do amend - input.md and decision.md updates don't get commited. investigate and fix (prev attempt to fix in commit c94558940d232fabcf8023c92867891de3a0dbcc)
2
+ - [ ] make task id two decimal places (01, 02, 03..., a0, a1) same encoding
3
+ - [ ] use gh to create a PR from worktree if possible
4
+ - [ ] add picker for raf do --worktree to chose between --merge or --pr or leave branch options