rafcode 1.3.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/.claude/settings.local.json +3 -1
  2. package/CLAUDE.md +118 -22
  3. package/RAF/aaaacu-worktree-weaver/decisions.md +88 -0
  4. package/RAF/aaaacu-worktree-weaver/input.md +27 -0
  5. package/RAF/aaaacu-worktree-weaver/outcomes/01-git-worktree-utilities.md +41 -0
  6. package/RAF/aaaacu-worktree-weaver/outcomes/02-worktree-plan-command.md +44 -0
  7. package/RAF/aaaacu-worktree-weaver/outcomes/03-worktree-do-command.md +58 -0
  8. package/RAF/aaaacu-worktree-weaver/outcomes/04-auto-merge-and-cleanup.md +40 -0
  9. package/RAF/aaaacu-worktree-weaver/outcomes/05-worktree-tests.md +43 -0
  10. package/RAF/aaaacu-worktree-weaver/outcomes/06-update-documentation.md +33 -0
  11. package/RAF/aaaacu-worktree-weaver/plans/01-git-worktree-utilities.md +51 -0
  12. package/RAF/aaaacu-worktree-weaver/plans/02-worktree-plan-command.md +93 -0
  13. package/RAF/aaaacu-worktree-weaver/plans/03-worktree-do-command.md +81 -0
  14. package/RAF/aaaacu-worktree-weaver/plans/04-auto-merge-and-cleanup.md +51 -0
  15. package/RAF/aaaacu-worktree-weaver/plans/05-worktree-tests.md +52 -0
  16. package/RAF/aaaacu-worktree-weaver/plans/06-update-documentation.md +55 -0
  17. package/RAF/aaaacv-trim-the-fat/decisions.md +34 -0
  18. package/RAF/aaaacv-trim-the-fat/input.md +5 -0
  19. package/RAF/aaaacv-trim-the-fat/outcomes/01-add-worktree-support-to-status.md +43 -0
  20. package/RAF/aaaacv-trim-the-fat/outcomes/02-remove-multi-project-from-do.md +50 -0
  21. package/RAF/aaaacv-trim-the-fat/outcomes/03-commit-artifacts-on-amend.md +35 -0
  22. package/RAF/aaaacv-trim-the-fat/outcomes/04-worktree-aware-exit-messages.md +36 -0
  23. package/RAF/aaaacv-trim-the-fat/plans/01-add-worktree-support-to-status.md +43 -0
  24. package/RAF/aaaacv-trim-the-fat/plans/02-remove-multi-project-from-do.md +44 -0
  25. package/RAF/aaaacv-trim-the-fat/plans/03-commit-artifacts-on-amend.md +38 -0
  26. package/RAF/aaaacv-trim-the-fat/plans/04-worktree-aware-exit-messages.md +38 -0
  27. package/RAF/aaaacw-prune-cycle/decisions.md +25 -0
  28. package/RAF/aaaacw-prune-cycle/input.md +5 -0
  29. package/RAF/aaaacw-prune-cycle/outcomes/01-create-worktree-from-branch.md +32 -0
  30. package/RAF/aaaacw-prune-cycle/outcomes/02-cleanup-worktree-on-success.md +33 -0
  31. package/RAF/aaaacw-prune-cycle/outcomes/03-amend-recreate-worktree.md +40 -0
  32. package/RAF/aaaacw-prune-cycle/plans/01-create-worktree-from-branch.md +31 -0
  33. package/RAF/aaaacw-prune-cycle/plans/02-cleanup-worktree-on-success.md +38 -0
  34. package/RAF/aaaacw-prune-cycle/plans/03-amend-recreate-worktree.md +50 -0
  35. package/RAF/aaaacx-epoch-shift/decisions.md +25 -0
  36. package/RAF/aaaacx-epoch-shift/input.md +1 -0
  37. package/RAF/aaaacx-epoch-shift/outcomes/01-epoch-id-generation.md +34 -0
  38. package/RAF/aaaacx-epoch-shift/outcomes/02-update-pattern-matching.md +32 -0
  39. package/RAF/aaaacx-epoch-shift/outcomes/03-update-tests.md +59 -0
  40. package/RAF/aaaacx-epoch-shift/outcomes/04-update-documentation.md +30 -0
  41. package/RAF/aaaacx-epoch-shift/plans/01-epoch-id-generation.md +40 -0
  42. package/RAF/aaaacx-epoch-shift/plans/02-update-pattern-matching.md +60 -0
  43. package/RAF/aaaacx-epoch-shift/plans/03-update-tests.md +48 -0
  44. package/RAF/aaaacx-epoch-shift/plans/04-update-documentation.md +44 -0
  45. package/RAF/ahmpro-merge-guardian/decisions.md +25 -0
  46. package/RAF/ahmpro-merge-guardian/input.md +4 -0
  47. package/RAF/ahmpro-merge-guardian/outcomes/001-fix-amend-worktree-commit.md +45 -0
  48. package/RAF/ahmpro-merge-guardian/outcomes/002-base36-task-ids.md +55 -0
  49. package/RAF/ahmpro-merge-guardian/outcomes/003-worktree-pr-creation.md +41 -0
  50. package/RAF/ahmpro-merge-guardian/outcomes/004-post-execution-picker.md +53 -0
  51. package/RAF/ahmpro-merge-guardian/plans/001-fix-amend-worktree-commit.md +39 -0
  52. package/RAF/ahmpro-merge-guardian/plans/002-base36-task-ids.md +43 -0
  53. package/RAF/ahmpro-merge-guardian/plans/003-worktree-pr-creation.md +43 -0
  54. package/RAF/ahmpro-merge-guardian/plans/004-post-execution-picker.md +51 -0
  55. package/RAF/ahnbcu-letterjam/decisions.md +13 -0
  56. package/RAF/ahnbcu-letterjam/input.md +3 -0
  57. package/RAF/ahnbcu-letterjam/outcomes/01-base26-encoding.md +42 -0
  58. package/RAF/ahnbcu-letterjam/outcomes/02-update-tests.md +38 -0
  59. package/RAF/ahnbcu-letterjam/outcomes/03-migrate-command.md +51 -0
  60. package/RAF/ahnbcu-letterjam/outcomes/04-update-documentation.md +29 -0
  61. package/RAF/ahnbcu-letterjam/plans/01-base26-encoding.md +36 -0
  62. package/RAF/ahnbcu-letterjam/plans/02-update-tests.md +37 -0
  63. package/RAF/ahnbcu-letterjam/plans/03-migrate-command.md +49 -0
  64. package/RAF/ahnbcu-letterjam/plans/04-update-documentation.md +39 -0
  65. package/RAF/ahnwrk-worktree-weaver/decisions.md +19 -0
  66. package/RAF/ahnwrk-worktree-weaver/input.md +4 -0
  67. package/RAF/ahnwrk-worktree-weaver/outcomes/01-remove-co-authored-by.md +20 -0
  68. package/RAF/ahnwrk-worktree-weaver/outcomes/02-update-task-status-format.md +21 -0
  69. package/RAF/ahnwrk-worktree-weaver/outcomes/03-worktree-auto-discovery.md +34 -0
  70. package/RAF/ahnwrk-worktree-weaver/outcomes/04-fix-pr-description.md +30 -0
  71. package/RAF/ahnwrk-worktree-weaver/plans/01-remove-co-authored-by.md +26 -0
  72. package/RAF/ahnwrk-worktree-weaver/plans/02-update-task-status-format.md +27 -0
  73. package/RAF/ahnwrk-worktree-weaver/plans/03-worktree-auto-discovery.md +37 -0
  74. package/RAF/ahnwrk-worktree-weaver/plans/04-fix-pr-description.md +50 -0
  75. package/RAF/ahrren-turbo-finder/decisions.md +19 -0
  76. package/RAF/ahrren-turbo-finder/input.md +2 -0
  77. package/RAF/ahrren-turbo-finder/outcomes/01-worktree-auto-detect.md +40 -0
  78. package/RAF/ahrren-turbo-finder/outcomes/02-medium-effort-do.md +34 -0
  79. package/RAF/ahrren-turbo-finder/plans/01-worktree-auto-detect.md +44 -0
  80. package/RAF/ahrren-turbo-finder/plans/02-medium-effort-do.md +39 -0
  81. package/RAF/ahrtxf-session-sentinel/decisions.md +19 -0
  82. package/RAF/ahrtxf-session-sentinel/input.md +1 -0
  83. package/RAF/ahrtxf-session-sentinel/outcomes/01-capture-session-id.md +37 -0
  84. package/RAF/ahrtxf-session-sentinel/outcomes/02-resume-flag.md +45 -0
  85. package/RAF/ahrtxf-session-sentinel/plans/01-capture-session-id.md +41 -0
  86. package/RAF/ahrtxf-session-sentinel/plans/02-resume-flag.md +51 -0
  87. package/README.md +56 -10
  88. package/dist/commands/do.d.ts +15 -0
  89. package/dist/commands/do.d.ts.map +1 -1
  90. package/dist/commands/do.js +431 -129
  91. package/dist/commands/do.js.map +1 -1
  92. package/dist/commands/migrate.d.ts +14 -0
  93. package/dist/commands/migrate.d.ts.map +1 -0
  94. package/dist/commands/migrate.js +228 -0
  95. package/dist/commands/migrate.js.map +1 -0
  96. package/dist/commands/plan.d.ts.map +1 -1
  97. package/dist/commands/plan.js +237 -40
  98. package/dist/commands/plan.js.map +1 -1
  99. package/dist/commands/status.d.ts.map +1 -1
  100. package/dist/commands/status.js +221 -47
  101. package/dist/commands/status.js.map +1 -1
  102. package/dist/core/claude-runner.d.ts +21 -2
  103. package/dist/core/claude-runner.d.ts.map +1 -1
  104. package/dist/core/claude-runner.js +199 -29
  105. package/dist/core/claude-runner.js.map +1 -1
  106. package/dist/core/git.d.ts +15 -6
  107. package/dist/core/git.d.ts.map +1 -1
  108. package/dist/core/git.js +53 -20
  109. package/dist/core/git.js.map +1 -1
  110. package/dist/core/project-manager.d.ts.map +1 -1
  111. package/dist/core/project-manager.js +2 -2
  112. package/dist/core/project-manager.js.map +1 -1
  113. package/dist/core/pull-request.d.ts +84 -0
  114. package/dist/core/pull-request.d.ts.map +1 -0
  115. package/dist/core/pull-request.js +414 -0
  116. package/dist/core/pull-request.js.map +1 -0
  117. package/dist/core/shutdown-handler.d.ts.map +1 -1
  118. package/dist/core/shutdown-handler.js +4 -0
  119. package/dist/core/shutdown-handler.js.map +1 -1
  120. package/dist/core/state-derivation.d.ts +3 -3
  121. package/dist/core/state-derivation.d.ts.map +1 -1
  122. package/dist/core/state-derivation.js +18 -14
  123. package/dist/core/state-derivation.js.map +1 -1
  124. package/dist/core/worktree.d.ts +138 -0
  125. package/dist/core/worktree.d.ts.map +1 -0
  126. package/dist/core/worktree.js +383 -0
  127. package/dist/core/worktree.js.map +1 -0
  128. package/dist/index.js +2 -0
  129. package/dist/index.js.map +1 -1
  130. package/dist/parsers/stream-renderer.d.ts +3 -0
  131. package/dist/parsers/stream-renderer.d.ts.map +1 -1
  132. package/dist/parsers/stream-renderer.js +1 -1
  133. package/dist/parsers/stream-renderer.js.map +1 -1
  134. package/dist/prompts/amend.d.ts +1 -0
  135. package/dist/prompts/amend.d.ts.map +1 -1
  136. package/dist/prompts/amend.js +14 -10
  137. package/dist/prompts/amend.js.map +1 -1
  138. package/dist/prompts/execution.d.ts.map +1 -1
  139. package/dist/prompts/execution.js +4 -2
  140. package/dist/prompts/execution.js.map +1 -1
  141. package/dist/prompts/planning.d.ts +1 -0
  142. package/dist/prompts/planning.d.ts.map +1 -1
  143. package/dist/prompts/planning.js +9 -8
  144. package/dist/prompts/planning.js.map +1 -1
  145. package/dist/types/config.d.ts +6 -0
  146. package/dist/types/config.d.ts.map +1 -1
  147. package/dist/ui/project-picker.d.ts +34 -3
  148. package/dist/ui/project-picker.d.ts.map +1 -1
  149. package/dist/ui/project-picker.js +78 -10
  150. package/dist/ui/project-picker.js.map +1 -1
  151. package/dist/utils/paths.d.ts +38 -43
  152. package/dist/utils/paths.d.ts.map +1 -1
  153. package/dist/utils/paths.js +123 -193
  154. package/dist/utils/paths.js.map +1 -1
  155. package/dist/utils/terminal-symbols.d.ts +2 -2
  156. package/dist/utils/terminal-symbols.js +3 -3
  157. package/dist/utils/terminal-symbols.js.map +1 -1
  158. package/dist/utils/validation.d.ts.map +1 -1
  159. package/dist/utils/validation.js +2 -8
  160. package/dist/utils/validation.js.map +1 -1
  161. package/package.json +1 -1
  162. package/src/commands/do.ts +505 -139
  163. package/src/commands/migrate.ts +269 -0
  164. package/src/commands/plan.ts +264 -40
  165. package/src/commands/status.ts +252 -45
  166. package/src/core/claude-runner.ts +246 -33
  167. package/src/core/git.ts +57 -21
  168. package/src/core/project-manager.ts +2 -1
  169. package/src/core/pull-request.ts +480 -0
  170. package/src/core/shutdown-handler.ts +5 -0
  171. package/src/core/state-derivation.ts +18 -14
  172. package/src/core/worktree.ts +434 -0
  173. package/src/index.ts +2 -0
  174. package/src/parsers/stream-renderer.ts +4 -1
  175. package/src/prompts/amend.ts +15 -9
  176. package/src/prompts/execution.ts +4 -2
  177. package/src/prompts/planning.ts +10 -8
  178. package/src/types/config.ts +7 -0
  179. package/src/ui/project-picker.ts +110 -10
  180. package/src/utils/paths.ts +129 -214
  181. package/src/utils/terminal-symbols.ts +3 -3
  182. package/src/utils/validation.ts +2 -9
  183. package/tests/unit/amend-prompt.test.ts +85 -0
  184. package/tests/unit/claude-runner-interactive.test.ts +24 -0
  185. package/tests/unit/claude-runner.test.ts +518 -64
  186. package/tests/unit/commit-planning-artifacts-worktree.test.ts +327 -0
  187. package/tests/unit/commit-planning-artifacts.test.ts +303 -35
  188. package/tests/unit/dependency-integration.test.ts +95 -95
  189. package/tests/unit/do-blocked-tasks.test.ts +53 -53
  190. package/tests/unit/do-command.test.ts +39 -132
  191. package/tests/unit/do-rerun.test.ts +65 -65
  192. package/tests/unit/do-worktree-cleanup.test.ts +151 -0
  193. package/tests/unit/execution-prompt.test.ts +71 -60
  194. package/tests/unit/failure-history.test.ts +19 -19
  195. package/tests/unit/git-commit-helpers.test.ts +5 -5
  196. package/tests/unit/git-stash.test.ts +4 -4
  197. package/tests/unit/migrate-command.test.ts +197 -0
  198. package/tests/unit/outcome-content.test.ts +20 -20
  199. package/tests/unit/paths.test.ts +269 -467
  200. package/tests/unit/plan-amend-worktree-recreate.test.ts +246 -0
  201. package/tests/unit/plan-command.test.ts +103 -103
  202. package/tests/unit/planning-prompt.test.ts +41 -4
  203. package/tests/unit/post-execution-picker.test.ts +252 -0
  204. package/tests/unit/project-manager.test.ts +20 -8
  205. package/tests/unit/project-picker.test.ts +425 -42
  206. package/tests/unit/pull-request.test.ts +852 -0
  207. package/tests/unit/state-derivation.test.ts +138 -137
  208. package/tests/unit/status-command.test.ts +344 -76
  209. package/tests/unit/stream-renderer.test.ts +30 -0
  210. package/tests/unit/terminal-symbols.test.ts +4 -4
  211. package/tests/unit/worktree-integration.test.ts +405 -0
  212. package/tests/unit/worktree.test.ts +625 -0
  213. package/tests/unit/do-multiproject.test.ts +0 -270
  214. /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/input.md +0 -0
  215. /package/RAF/{001-raf-task-improvements/outcomes/001-add-decisions-folder.md → aaaaab-raf-task-improvements/outcomes/01-add-decisions-folder.md} +0 -0
  216. /package/RAF/{001-raf-task-improvements/outcomes/002-fix-write-error-on-shutdown.md → aaaaab-raf-task-improvements/outcomes/02-fix-write-error-on-shutdown.md} +0 -0
  217. /package/RAF/{001-raf-task-improvements/outcomes/003-stash-changes-on-failure.md → aaaaab-raf-task-improvements/outcomes/03-stash-changes-on-failure.md} +0 -0
  218. /package/RAF/{001-raf-task-improvements/outcomes/004-add-project-name-to-commits.md → aaaaab-raf-task-improvements/outcomes/04-add-project-name-to-commits.md} +0 -0
  219. /package/RAF/{001-raf-task-improvements/outcomes/005-add-running-time-display.md → aaaaab-raf-task-improvements/outcomes/05-add-running-time-display.md} +0 -0
  220. /package/RAF/{001-raf-task-improvements/outcomes/006-add-task-name-to-logs.md → aaaaab-raf-task-improvements/outcomes/06-add-task-name-to-logs.md} +0 -0
  221. /package/RAF/{001-raf-task-improvements/outcomes/007-show-model-at-task-start.md → aaaaab-raf-task-improvements/outcomes/07-show-model-at-task-start.md} +0 -0
  222. /package/RAF/{001-raf-task-improvements/outcomes/009-remove-editor-placeholder-text.md → aaaaab-raf-task-improvements/outcomes/09-remove-editor-placeholder-text.md} +0 -0
  223. /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/outcomes/SUMMARY.md +0 -0
  224. /package/RAF/{001-raf-task-improvements/plans/001-add-decisions-folder.md → aaaaab-raf-task-improvements/plans/01-add-decisions-folder.md} +0 -0
  225. /package/RAF/{001-raf-task-improvements/plans/002-fix-write-error-on-shutdown.md → aaaaab-raf-task-improvements/plans/02-fix-write-error-on-shutdown.md} +0 -0
  226. /package/RAF/{001-raf-task-improvements/plans/003-stash-changes-on-failure.md → aaaaab-raf-task-improvements/plans/03-stash-changes-on-failure.md} +0 -0
  227. /package/RAF/{001-raf-task-improvements/plans/004-add-project-name-to-commits.md → aaaaab-raf-task-improvements/plans/04-add-project-name-to-commits.md} +0 -0
  228. /package/RAF/{001-raf-task-improvements/plans/005-add-running-time-display.md → aaaaab-raf-task-improvements/plans/05-add-running-time-display.md} +0 -0
  229. /package/RAF/{001-raf-task-improvements/plans/006-add-task-name-to-logs.md → aaaaab-raf-task-improvements/plans/06-add-task-name-to-logs.md} +0 -0
  230. /package/RAF/{001-raf-task-improvements/plans/009-remove-editor-placeholder-text.md → aaaaab-raf-task-improvements/plans/09-remove-editor-placeholder-text.md} +0 -0
  231. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/decisions/DECISIONS.md +0 -0
  232. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/input.md +0 -0
  233. /package/RAF/{002-raf-task-improvements-execution/outcomes/001-commit-show-model-at-task-start.md → aaaaac-raf-task-improvements-execution/outcomes/01-commit-show-model-at-task-start.md} +0 -0
  234. /package/RAF/{002-raf-task-improvements-execution/outcomes/002-delete-skipped-plan.md → aaaaac-raf-task-improvements-execution/outcomes/02-delete-skipped-plan.md} +0 -0
  235. /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/outcomes/SUMMARY.md +0 -0
  236. /package/RAF/{002-raf-task-improvements-execution/plans/001-commit-show-model-at-task-start.md → aaaaac-raf-task-improvements-execution/plans/01-commit-show-model-at-task-start.md} +0 -0
  237. /package/RAF/{002-raf-task-improvements-execution/plans/002-delete-skipped-plan.md → aaaaac-raf-task-improvements-execution/plans/02-delete-skipped-plan.md} +0 -0
  238. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/decisions/DECISIONS.md +0 -0
  239. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/input.md +0 -0
  240. /package/RAF/{003-multi-project-execution/outcomes/001-remove-state-json.md → aaaaad-multi-project-execution/outcomes/01-remove-state-json.md} +0 -0
  241. /package/RAF/{003-multi-project-execution/outcomes/002-update-raf-status.md → aaaaad-multi-project-execution/outcomes/02-update-raf-status.md} +0 -0
  242. /package/RAF/{003-multi-project-execution/outcomes/003-simplify-git-logic.md → aaaaad-multi-project-execution/outcomes/03-simplify-git-logic.md} +0 -0
  243. /package/RAF/{003-multi-project-execution/outcomes/004-auto-commit-planning.md → aaaaad-multi-project-execution/outcomes/04-auto-commit-planning.md} +0 -0
  244. /package/RAF/{003-multi-project-execution/outcomes/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/outcomes/05-rerun-failed-tasks.md} +0 -0
  245. /package/RAF/{003-multi-project-execution/outcomes/006-multi-project-execution.md → aaaaad-multi-project-execution/outcomes/06-multi-project-execution.md} +0 -0
  246. /package/RAF/{003-multi-project-execution/outcomes/007-verify-timeout.md → aaaaad-multi-project-execution/outcomes/07-verify-timeout.md} +0 -0
  247. /package/RAF/{003-multi-project-execution/outcomes/008-move-decisions-file.md → aaaaad-multi-project-execution/outcomes/08-move-decisions-file.md} +0 -0
  248. /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/outcomes/SUMMARY.md +0 -0
  249. /package/RAF/{003-multi-project-execution/plans/001-remove-state-json.md → aaaaad-multi-project-execution/plans/01-remove-state-json.md} +0 -0
  250. /package/RAF/{003-multi-project-execution/plans/002-update-raf-status.md → aaaaad-multi-project-execution/plans/02-update-raf-status.md} +0 -0
  251. /package/RAF/{003-multi-project-execution/plans/003-simplify-git-logic.md → aaaaad-multi-project-execution/plans/03-simplify-git-logic.md} +0 -0
  252. /package/RAF/{003-multi-project-execution/plans/004-auto-commit-planning.md → aaaaad-multi-project-execution/plans/04-auto-commit-planning.md} +0 -0
  253. /package/RAF/{003-multi-project-execution/plans/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/plans/05-rerun-failed-tasks.md} +0 -0
  254. /package/RAF/{003-multi-project-execution/plans/006-multi-project-execution.md → aaaaad-multi-project-execution/plans/06-multi-project-execution.md} +0 -0
  255. /package/RAF/{003-multi-project-execution/plans/007-verify-timeout.md → aaaaad-multi-project-execution/plans/07-verify-timeout.md} +0 -0
  256. /package/RAF/{003-multi-project-execution/plans/008-move-decisions-file.md → aaaaad-multi-project-execution/plans/08-move-decisions-file.md} +0 -0
  257. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/decisions.md +0 -0
  258. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/input.md +0 -0
  259. /package/RAF/{004-task-naming-optimization/outcomes/001-remove-summary-file.md → aaaaae-task-naming-optimization/outcomes/01-remove-summary-file.md} +0 -0
  260. /package/RAF/{004-task-naming-optimization/outcomes/002-base36-project-numbering.md → aaaaae-task-naming-optimization/outcomes/02-base36-project-numbering.md} +0 -0
  261. /package/RAF/{004-task-naming-optimization/outcomes/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/outcomes/03-improve-haiku-prompt.md} +0 -0
  262. /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/outcomes/SUMMARY.md +0 -0
  263. /package/RAF/{004-task-naming-optimization/plans/001-remove-summary-file.md → aaaaae-task-naming-optimization/plans/01-remove-summary-file.md} +0 -0
  264. /package/RAF/{004-task-naming-optimization/plans/002-base36-project-numbering.md → aaaaae-task-naming-optimization/plans/02-base36-project-numbering.md} +0 -0
  265. /package/RAF/{004-task-naming-optimization/plans/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/plans/03-improve-haiku-prompt.md} +0 -0
  266. /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/decisions.md +0 -0
  267. /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/input.md +0 -0
  268. /package/RAF/{005-task-naming-improvements/outcomes/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/outcomes/01-enhance-identifier-resolution.md} +0 -0
  269. /package/RAF/{005-task-naming-improvements/outcomes/002-add-identifier-support-to-status.md → aaaaaf-task-naming-improvements/outcomes/02-add-identifier-support-to-status.md} +0 -0
  270. /package/RAF/{005-task-naming-improvements/outcomes/003-update-do-for-full-folder-names.md → aaaaaf-task-naming-improvements/outcomes/03-update-do-for-full-folder-names.md} +0 -0
  271. /package/RAF/{005-task-naming-improvements/outcomes/004-implement-amend-flag-for-plan.md → aaaaaf-task-naming-improvements/outcomes/04-implement-amend-flag-for-plan.md} +0 -0
  272. /package/RAF/{005-task-naming-improvements/outcomes/005-commit-outcomes-on-complete.md → aaaaaf-task-naming-improvements/outcomes/05-commit-outcomes-on-complete.md} +0 -0
  273. /package/RAF/{005-task-naming-improvements/outcomes/006-update-execution-prompt-commit-schema.md → aaaaaf-task-naming-improvements/outcomes/06-update-execution-prompt-commit-schema.md} +0 -0
  274. /package/RAF/{005-task-naming-improvements/outcomes/007-allow-pending-task-amendments.md → aaaaaf-task-naming-improvements/outcomes/07-allow-pending-task-amendments.md} +0 -0
  275. /package/RAF/{005-task-naming-improvements/outcomes/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/outcomes/08-fix-timeout-label.md} +0 -0
  276. /package/RAF/{005-task-naming-improvements/plans/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/plans/01-enhance-identifier-resolution.md} +0 -0
  277. /package/RAF/{005-task-naming-improvements/plans/002-add-identifier-support-to-status.md → aaaaaf-task-naming-improvements/plans/02-add-identifier-support-to-status.md} +0 -0
  278. /package/RAF/{005-task-naming-improvements/plans/003-update-do-for-full-folder-names.md → aaaaaf-task-naming-improvements/plans/03-update-do-for-full-folder-names.md} +0 -0
  279. /package/RAF/{005-task-naming-improvements/plans/004-implement-amend-flag-for-plan.md → aaaaaf-task-naming-improvements/plans/04-implement-amend-flag-for-plan.md} +0 -0
  280. /package/RAF/{005-task-naming-improvements/plans/005-commit-outcomes-on-complete.md → aaaaaf-task-naming-improvements/plans/05-commit-outcomes-on-complete.md} +0 -0
  281. /package/RAF/{005-task-naming-improvements/plans/006-update-execution-prompt-commit-schema.md → aaaaaf-task-naming-improvements/plans/06-update-execution-prompt-commit-schema.md} +0 -0
  282. /package/RAF/{005-task-naming-improvements/plans/007-allow-pending-task-amendments.md → aaaaaf-task-naming-improvements/plans/07-allow-pending-task-amendments.md} +0 -0
  283. /package/RAF/{005-task-naming-improvements/plans/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/plans/08-fix-timeout-label.md} +0 -0
  284. /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/decisions.md +0 -0
  285. /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/input.md +0 -0
  286. /package/RAF/{006-fix-double-summary-headers/outcomes/001-fix-double-summary-headers.md → aaaaag-fix-double-summary-headers/outcomes/01-fix-double-summary-headers.md} +0 -0
  287. /package/RAF/{006-fix-double-summary-headers/outcomes/002-update-readme-for-npm.md → aaaaag-fix-double-summary-headers/outcomes/02-update-readme-for-npm.md} +0 -0
  288. /package/RAF/{006-fix-double-summary-headers/outcomes/003-npm-publish-instructions.md → aaaaag-fix-double-summary-headers/outcomes/03-npm-publish-instructions.md} +0 -0
  289. /package/RAF/{006-fix-double-summary-headers/outcomes/004-flexible-project-lookup.md → aaaaag-fix-double-summary-headers/outcomes/04-flexible-project-lookup.md} +0 -0
  290. /package/RAF/{006-fix-double-summary-headers/plans/001-fix-double-summary-headers.md → aaaaag-fix-double-summary-headers/plans/01-fix-double-summary-headers.md} +0 -0
  291. /package/RAF/{006-fix-double-summary-headers/plans/002-update-readme-for-npm.md → aaaaag-fix-double-summary-headers/plans/02-update-readme-for-npm.md} +0 -0
  292. /package/RAF/{006-fix-double-summary-headers/plans/003-npm-publish-instructions.md → aaaaag-fix-double-summary-headers/plans/03-npm-publish-instructions.md} +0 -0
  293. /package/RAF/{006-fix-double-summary-headers/plans/004-flexible-project-lookup.md → aaaaag-fix-double-summary-headers/plans/04-flexible-project-lookup.md} +0 -0
  294. /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/decisions.md +0 -0
  295. /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/input.md +0 -0
  296. /package/RAF/{007-improve-outcome-format/outcomes/001-update-execution-prompt.md → aaaaah-improve-outcome-format/outcomes/01-update-execution-prompt.md} +0 -0
  297. /package/RAF/{007-improve-outcome-format/outcomes/002-update-state-derivation.md → aaaaah-improve-outcome-format/outcomes/02-update-state-derivation.md} +0 -0
  298. /package/RAF/{007-improve-outcome-format/outcomes/003-update-do-command-outcome-handling.md → aaaaah-improve-outcome-format/outcomes/03-update-do-command-outcome-handling.md} +0 -0
  299. /package/RAF/{007-improve-outcome-format/outcomes/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/outcomes/04-implement-failure-analysis.md} +0 -0
  300. /package/RAF/{007-improve-outcome-format/outcomes/005-update-documentation.md → aaaaah-improve-outcome-format/outcomes/05-update-documentation.md} +0 -0
  301. /package/RAF/{007-improve-outcome-format/plans/001-update-execution-prompt.md → aaaaah-improve-outcome-format/plans/01-update-execution-prompt.md} +0 -0
  302. /package/RAF/{007-improve-outcome-format/plans/002-update-state-derivation.md → aaaaah-improve-outcome-format/plans/02-update-state-derivation.md} +0 -0
  303. /package/RAF/{007-improve-outcome-format/plans/003-update-do-command-outcome-handling.md → aaaaah-improve-outcome-format/plans/03-update-do-command-outcome-handling.md} +0 -0
  304. /package/RAF/{007-improve-outcome-format/plans/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/plans/04-implement-failure-analysis.md} +0 -0
  305. /package/RAF/{007-improve-outcome-format/plans/005-update-documentation.md → aaaaah-improve-outcome-format/plans/05-update-documentation.md} +0 -0
  306. /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/decisions.md +0 -0
  307. /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/input.md +0 -0
  308. /package/RAF/{008-beautiful-do/outcomes/001-terminal-symbols.md → aaaaai-beautiful-do/outcomes/01-terminal-symbols.md} +0 -0
  309. /package/RAF/{008-beautiful-do/outcomes/002-refactor-do-output.md → aaaaai-beautiful-do/outcomes/02-refactor-do-output.md} +0 -0
  310. /package/RAF/{008-beautiful-do/outcomes/003-refactor-status-output.md → aaaaai-beautiful-do/outcomes/03-refactor-status-output.md} +0 -0
  311. /package/RAF/{008-beautiful-do/outcomes/004-simplify-logger.md → aaaaai-beautiful-do/outcomes/04-simplify-logger.md} +0 -0
  312. /package/RAF/{008-beautiful-do/outcomes/005-add-tests.md → aaaaai-beautiful-do/outcomes/05-add-tests.md} +0 -0
  313. /package/RAF/{008-beautiful-do/plans/001-terminal-symbols.md → aaaaai-beautiful-do/plans/01-terminal-symbols.md} +0 -0
  314. /package/RAF/{008-beautiful-do/plans/002-refactor-do-output.md → aaaaai-beautiful-do/plans/02-refactor-do-output.md} +0 -0
  315. /package/RAF/{008-beautiful-do/plans/003-refactor-status-output.md → aaaaai-beautiful-do/plans/03-refactor-status-output.md} +0 -0
  316. /package/RAF/{008-beautiful-do/plans/004-simplify-logger.md → aaaaai-beautiful-do/plans/04-simplify-logger.md} +0 -0
  317. /package/RAF/{008-beautiful-do/plans/005-add-tests.md → aaaaai-beautiful-do/plans/05-add-tests.md} +0 -0
  318. /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/decisions.md +0 -0
  319. /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/input.md +0 -0
  320. /package/RAF/{009-system-promt-ammend/outcomes/001-model-override.md → aaaaaj-system-promt-ammend/outcomes/01-model-override.md} +0 -0
  321. /package/RAF/{009-system-promt-ammend/outcomes/002-system-prompt-append.md → aaaaaj-system-promt-ammend/outcomes/02-system-prompt-append.md} +0 -0
  322. /package/RAF/{009-system-promt-ammend/outcomes/003-retry-context.md → aaaaaj-system-promt-ammend/outcomes/03-retry-context.md} +0 -0
  323. /package/RAF/{009-system-promt-ammend/plans/001-model-override.md → aaaaaj-system-promt-ammend/plans/01-model-override.md} +0 -0
  324. /package/RAF/{009-system-promt-ammend/plans/002-system-prompt-append.md → aaaaaj-system-promt-ammend/plans/02-system-prompt-append.md} +0 -0
  325. /package/RAF/{009-system-promt-ammend/plans/003-retry-context.md → aaaaaj-system-promt-ammend/plans/03-retry-context.md} +0 -0
  326. /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/decisions.md +0 -0
  327. /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/input.md +0 -0
  328. /package/RAF/{010-outcome-marker-fallback/outcomes/001-outcome-file-marker-fallback.md → aaaabk-outcome-marker-fallback/outcomes/01-outcome-file-marker-fallback.md} +0 -0
  329. /package/RAF/{010-outcome-marker-fallback/outcomes/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/outcomes/02-creative-project-naming.md} +0 -0
  330. /package/RAF/{010-outcome-marker-fallback/plans/001-outcome-file-marker-fallback.md → aaaabk-outcome-marker-fallback/plans/01-outcome-file-marker-fallback.md} +0 -0
  331. /package/RAF/{010-outcome-marker-fallback/plans/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/plans/02-creative-project-naming.md} +0 -0
  332. /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/decisions.md +0 -0
  333. /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/input.md +0 -0
  334. /package/RAF/{011-do-task-in-commit/outcomes/001-update-execution-prompt.md → aaaabl-do-task-in-commit/outcomes/01-update-execution-prompt.md} +0 -0
  335. /package/RAF/{011-do-task-in-commit/outcomes/002-update-tests.md → aaaabl-do-task-in-commit/outcomes/02-update-tests.md} +0 -0
  336. /package/RAF/{011-do-task-in-commit/outcomes/003-update-documentation.md → aaaabl-do-task-in-commit/outcomes/03-update-documentation.md} +0 -0
  337. /package/RAF/{011-do-task-in-commit/plans/001-update-execution-prompt.md → aaaabl-do-task-in-commit/plans/01-update-execution-prompt.md} +0 -0
  338. /package/RAF/{011-do-task-in-commit/plans/002-update-tests.md → aaaabl-do-task-in-commit/plans/02-update-tests.md} +0 -0
  339. /package/RAF/{011-do-task-in-commit/plans/003-update-documentation.md → aaaabl-do-task-in-commit/plans/03-update-documentation.md} +0 -0
  340. /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/decisions.md +0 -0
  341. /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/input.md +0 -0
  342. /package/RAF/{012-name-picker-buffet/outcomes/001-name-picker-for-raf-plan.md → aaaabm-name-picker-buffet/outcomes/01-name-picker-for-raf-plan.md} +0 -0
  343. /package/RAF/{012-name-picker-buffet/outcomes/002-interactive-project-picker-for-raf-do.md → aaaabm-name-picker-buffet/outcomes/02-interactive-project-picker-for-raf-do.md} +0 -0
  344. /package/RAF/{012-name-picker-buffet/outcomes/003-raf-status-truncation.md → aaaabm-name-picker-buffet/outcomes/03-raf-status-truncation.md} +0 -0
  345. /package/RAF/{012-name-picker-buffet/outcomes/004-failure-reason-details.md → aaaabm-name-picker-buffet/outcomes/04-failure-reason-details.md} +0 -0
  346. /package/RAF/{012-name-picker-buffet/outcomes/005-remove-raf-commits.md → aaaabm-name-picker-buffet/outcomes/05-remove-raf-commits.md} +0 -0
  347. /package/RAF/{012-name-picker-buffet/outcomes/006-update-execution-prompt-for-commits.md → aaaabm-name-picker-buffet/outcomes/06-update-execution-prompt-for-commits.md} +0 -0
  348. /package/RAF/{012-name-picker-buffet/outcomes/007-fix-plan-mode-user-prompt.md → aaaabm-name-picker-buffet/outcomes/07-fix-plan-mode-user-prompt.md} +0 -0
  349. /package/RAF/{012-name-picker-buffet/outcomes/008-add-auto-flag-for-plan-mode.md → aaaabm-name-picker-buffet/outcomes/08-add-auto-flag-for-plan-mode.md} +0 -0
  350. /package/RAF/{012-name-picker-buffet/plans/001-name-picker-for-raf-plan.md → aaaabm-name-picker-buffet/plans/01-name-picker-for-raf-plan.md} +0 -0
  351. /package/RAF/{012-name-picker-buffet/plans/002-interactive-project-picker-for-raf-do.md → aaaabm-name-picker-buffet/plans/02-interactive-project-picker-for-raf-do.md} +0 -0
  352. /package/RAF/{012-name-picker-buffet/plans/003-raf-status-truncation.md → aaaabm-name-picker-buffet/plans/03-raf-status-truncation.md} +0 -0
  353. /package/RAF/{012-name-picker-buffet/plans/004-failure-reason-details.md → aaaabm-name-picker-buffet/plans/04-failure-reason-details.md} +0 -0
  354. /package/RAF/{012-name-picker-buffet/plans/005-remove-raf-commits.md → aaaabm-name-picker-buffet/plans/05-remove-raf-commits.md} +0 -0
  355. /package/RAF/{012-name-picker-buffet/plans/006-update-execution-prompt-for-commits.md → aaaabm-name-picker-buffet/plans/06-update-execution-prompt-for-commits.md} +0 -0
  356. /package/RAF/{012-name-picker-buffet/plans/007-fix-plan-mode-user-prompt.md → aaaabm-name-picker-buffet/plans/07-fix-plan-mode-user-prompt.md} +0 -0
  357. /package/RAF/{012-name-picker-buffet/plans/008-add-auto-flag-for-plan-mode.md → aaaabm-name-picker-buffet/plans/08-add-auto-flag-for-plan-mode.md} +0 -0
  358. /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/decisions.md +0 -0
  359. /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/input.md +0 -0
  360. /package/RAF/{013-dependencies-watchdog/outcomes/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/outcomes/01-define-dependency-syntax.md} +0 -0
  361. /package/RAF/{013-dependencies-watchdog/outcomes/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/outcomes/02-update-planning-prompts.md} +0 -0
  362. /package/RAF/{013-dependencies-watchdog/outcomes/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/outcomes/03-parse-dependencies-update-state.md} +0 -0
  363. /package/RAF/{013-dependencies-watchdog/outcomes/004-implement-dependency-checking-in-do.md → aaaabn-dependencies-watchdog/outcomes/04-implement-dependency-checking-in-do.md} +0 -0
  364. /package/RAF/{013-dependencies-watchdog/outcomes/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/outcomes/05-update-execution-prompts.md} +0 -0
  365. /package/RAF/{013-dependencies-watchdog/outcomes/006-add-tests.md → aaaabn-dependencies-watchdog/outcomes/06-add-tests.md} +0 -0
  366. /package/RAF/{013-dependencies-watchdog/outcomes/007-add-act-alias.md → aaaabn-dependencies-watchdog/outcomes/07-add-act-alias.md} +0 -0
  367. /package/RAF/{013-dependencies-watchdog/outcomes/008-add-exit-message.md → aaaabn-dependencies-watchdog/outcomes/08-add-exit-message.md} +0 -0
  368. /package/RAF/{013-dependencies-watchdog/plans/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/plans/01-define-dependency-syntax.md} +0 -0
  369. /package/RAF/{013-dependencies-watchdog/plans/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/plans/02-update-planning-prompts.md} +0 -0
  370. /package/RAF/{013-dependencies-watchdog/plans/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/plans/03-parse-dependencies-update-state.md} +0 -0
  371. /package/RAF/{013-dependencies-watchdog/plans/004-implement-dependency-checking-in-do.md → aaaabn-dependencies-watchdog/plans/04-implement-dependency-checking-in-do.md} +0 -0
  372. /package/RAF/{013-dependencies-watchdog/plans/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/plans/05-update-execution-prompts.md} +0 -0
  373. /package/RAF/{013-dependencies-watchdog/plans/006-add-tests.md → aaaabn-dependencies-watchdog/plans/06-add-tests.md} +0 -0
  374. /package/RAF/{013-dependencies-watchdog/plans/007-add-act-alias.md → aaaabn-dependencies-watchdog/plans/07-add-act-alias.md} +0 -0
  375. /package/RAF/{013-dependencies-watchdog/plans/008-add-exit-message.md → aaaabn-dependencies-watchdog/plans/08-add-exit-message.md} +0 -0
  376. /package/RAF/{014-watchdog → aaaabo-watchdog}/decisions.md +0 -0
  377. /package/RAF/{014-watchdog → aaaabo-watchdog}/input.md +0 -0
  378. /package/RAF/{014-watchdog/outcomes/001-amend-flag-position.md → aaaabo-watchdog/outcomes/01-amend-flag-position.md} +0 -0
  379. /package/RAF/{014-watchdog/outcomes/002-details-only-on-failure.md → aaaabo-watchdog/outcomes/02-details-only-on-failure.md} +0 -0
  380. /package/RAF/{014-watchdog/plans/001-amend-flag-position.md → aaaabo-watchdog/plans/01-amend-flag-position.md} +0 -0
  381. /package/RAF/{014-watchdog/plans/002-details-only-on-failure.md → aaaabo-watchdog/plans/02-details-only-on-failure.md} +0 -0
  382. /package/RAF/{015-name-lottery → aaaabp-name-lottery}/decisions.md +0 -0
  383. /package/RAF/{015-name-lottery → aaaabp-name-lottery}/input.md +0 -0
  384. /package/RAF/{015-name-lottery/outcomes/001-auto-pick-project-name.md → aaaabp-name-lottery/outcomes/01-auto-pick-project-name.md} +0 -0
  385. /package/RAF/{015-name-lottery/outcomes/002-mention-plan-files-in-commit.md → aaaabp-name-lottery/outcomes/02-mention-plan-files-in-commit.md} +0 -0
  386. /package/RAF/{015-name-lottery/outcomes/003-fix-input-md-in-amend-flow.md → aaaabp-name-lottery/outcomes/03-fix-input-md-in-amend-flow.md} +0 -0
  387. /package/RAF/{015-name-lottery/plans/001-auto-pick-project-name.md → aaaabp-name-lottery/plans/01-auto-pick-project-name.md} +0 -0
  388. /package/RAF/{015-name-lottery/plans/002-mention-plan-files-in-commit.md → aaaabp-name-lottery/plans/02-mention-plan-files-in-commit.md} +0 -0
  389. /package/RAF/{015-name-lottery/plans/003-fix-input-md-in-amend-flow.md → aaaabp-name-lottery/plans/03-fix-input-md-in-amend-flow.md} +0 -0
  390. /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/decisions.md +0 -0
  391. /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/input.md +0 -0
  392. /package/RAF/{016-planning-scalpel/outcomes/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/outcomes/01-update-git-commit-instructions.md} +0 -0
  393. /package/RAF/{016-planning-scalpel/plans/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/plans/01-update-git-commit-instructions.md} +0 -0
  394. /package/RAF/{017-decision-vault → aaaabr-decision-vault}/decisions.md +0 -0
  395. /package/RAF/{017-decision-vault → aaaabr-decision-vault}/input.md +0 -0
  396. /package/RAF/{017-decision-vault/outcomes/001-create-git-commit-utility.md → aaaabr-decision-vault/outcomes/01-create-git-commit-utility.md} +0 -0
  397. /package/RAF/{017-decision-vault/outcomes/002-integrate-commit-into-plan.md → aaaabr-decision-vault/outcomes/02-integrate-commit-into-plan.md} +0 -0
  398. /package/RAF/{017-decision-vault/outcomes/003-add-tests-for-planning-commit.md → aaaabr-decision-vault/outcomes/03-add-tests-for-planning-commit.md} +0 -0
  399. /package/RAF/{017-decision-vault/plans/001-create-git-commit-utility.md → aaaabr-decision-vault/plans/01-create-git-commit-utility.md} +0 -0
  400. /package/RAF/{017-decision-vault/plans/002-integrate-commit-into-plan.md → aaaabr-decision-vault/plans/02-integrate-commit-into-plan.md} +0 -0
  401. /package/RAF/{017-decision-vault/plans/003-add-tests-for-planning-commit.md → aaaabr-decision-vault/plans/03-add-tests-for-planning-commit.md} +0 -0
  402. /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/decisions.md +0 -0
  403. /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/input.md +0 -0
  404. /package/RAF/{018-workflow-forge/outcomes/001-add-task-number-progress.md → aaaabs-workflow-forge/outcomes/01-add-task-number-progress.md} +0 -0
  405. /package/RAF/{018-workflow-forge/outcomes/002-update-plan-do-prompts.md → aaaabs-workflow-forge/outcomes/02-update-plan-do-prompts.md} +0 -0
  406. /package/RAF/{018-workflow-forge/plans/001-add-task-number-progress.md → aaaabs-workflow-forge/plans/01-add-task-number-progress.md} +0 -0
  407. /package/RAF/{018-workflow-forge/plans/002-update-plan-do-prompts.md → aaaabs-workflow-forge/plans/02-update-plan-do-prompts.md} +0 -0
  408. /package/RAF/{019-verbose-chronicle → aaaabt-verbose-chronicle}/decisions.md +0 -0
  409. /package/RAF/{019-verbose-chronicle → aaaabt-verbose-chronicle}/input.md +0 -0
  410. /package/RAF/{019-verbose-chronicle/outcomes/001-amend-iteration-references.md → aaaabt-verbose-chronicle/outcomes/01-amend-iteration-references.md} +0 -0
  411. /package/RAF/{019-verbose-chronicle/outcomes/002-verbose-task-name-display.md → aaaabt-verbose-chronicle/outcomes/02-verbose-task-name-display.md} +0 -0
  412. /package/RAF/{019-verbose-chronicle/outcomes/003-verbose-streaming-fix.md → aaaabt-verbose-chronicle/outcomes/03-verbose-streaming-fix.md} +0 -0
  413. /package/RAF/{019-verbose-chronicle/outcomes/004-commit-verification-before-halt.md → aaaabt-verbose-chronicle/outcomes/04-commit-verification-before-halt.md} +0 -0
  414. /package/RAF/{019-verbose-chronicle/plans/001-amend-iteration-references.md → aaaabt-verbose-chronicle/plans/01-amend-iteration-references.md} +0 -0
  415. /package/RAF/{019-verbose-chronicle/plans/002-verbose-task-name-display.md → aaaabt-verbose-chronicle/plans/02-verbose-task-name-display.md} +0 -0
  416. /package/RAF/{019-verbose-chronicle/plans/003-verbose-streaming-fix.md → aaaabt-verbose-chronicle/plans/03-verbose-streaming-fix.md} +0 -0
  417. /package/RAF/{019-verbose-chronicle/plans/004-commit-verification-before-halt.md → aaaabt-verbose-chronicle/plans/04-commit-verification-before-halt.md} +0 -0
@@ -0,0 +1,34 @@
1
+ # Outcome: Set medium reasoning effort for `raf do` execution
2
+
3
+ ## Summary
4
+
5
+ Configured `raf do` to spawn Claude CLI processes with `CLAUDE_CODE_EFFORT_LEVEL=medium` environment variable, reducing reasoning overhead during automated task execution while preserving default (high) effort for interactive planning sessions.
6
+
7
+ ## Key Changes
8
+
9
+ ### `src/core/claude-runner.ts`
10
+ - Added optional `effortLevel` field (`'low' | 'medium' | 'high'`) to `ClaudeRunnerOptions` interface
11
+ - In `run()`: when `effortLevel` is set, spreads `process.env` with `CLAUDE_CODE_EFFORT_LEVEL` override; otherwise passes `process.env` directly
12
+ - In `runVerbose()`: same env injection logic as `run()`
13
+ - `runInteractive()` is unchanged — uses `process.env` as-is (no effort override for planning sessions)
14
+
15
+ ### `src/commands/do.ts`
16
+ - Passes `effortLevel: 'medium'` in both `claudeRunner.run()` and `claudeRunner.runVerbose()` calls during task execution
17
+
18
+ ### `tests/unit/claude-runner.test.ts`
19
+ - Added 6 tests in new `effort level` describe block:
20
+ - Verifies `CLAUDE_CODE_EFFORT_LEVEL` is set in env for `run()` when effortLevel provided
21
+ - Verifies `CLAUDE_CODE_EFFORT_LEVEL` is set in env for `runVerbose()` when effortLevel provided
22
+ - Verifies env is `process.env` directly (no override) when effortLevel not provided in `run()`
23
+ - Verifies env is `process.env` directly (no override) when effortLevel not provided in `runVerbose()`
24
+ - Verifies all three levels (low, medium, high) work correctly
25
+ - Verifies other env vars (e.g., PATH) are preserved when effortLevel is set
26
+
27
+ ### `tests/unit/claude-runner-interactive.test.ts`
28
+ - Added 1 test verifying `runInteractive()` does NOT set `CLAUDE_CODE_EFFORT_LEVEL` in its env
29
+
30
+ ## Test Results
31
+
32
+ All 45 test suites pass (978 tests total, 0 failures).
33
+
34
+ <promise>COMPLETE</promise>
@@ -0,0 +1,44 @@
1
+ # Task: Auto-detect worktree projects in `raf do`
2
+
3
+ ## Objective
4
+ Make `raf do <name>` and `raf do <id>` automatically find and run worktree projects without requiring the `--worktree` flag.
5
+
6
+ ## Context
7
+ Currently, `raf do <identifier>` without `--worktree` only searches the main repo's RAF directory. If a project lives exclusively in a worktree (or the user simply omits the flag), the command fails with "project not found". The worktree folder name matches the project folder name (e.g., `~/.raf/worktrees/<repo>/ahrren-turbo-finder/`), so resolution can leverage this naming convention.
8
+
9
+ When a worktree project is auto-detected, the full worktree flow should activate — including the post-execution action picker (merge/PR/leave), worktree cwd, and cleanup behavior — exactly as if `--worktree` had been passed.
10
+
11
+ ## Requirements
12
+ - When `raf do <name>` (e.g., `turbo-finder`) doesn't find the project in the main repo, fall back to searching worktree directories
13
+ - When `raf do <id>` (e.g., `ahrren`) doesn't find the project in the main repo, fall back to searching worktree directories
14
+ - When `raf do <full-folder>` (e.g., `ahrren-turbo-finder`) doesn't find the project in the main repo, fall back to searching worktree directories
15
+ - Use the worktree folder naming convention: worktree folders at `~/.raf/worktrees/<repo-basename>/<project-folder>/` where `<project-folder>` matches the project folder name format (`XXXXXX-name`)
16
+ - Match identifiers against worktree folder names using the same resolution logic as `resolveProjectIdentifierWithDetails` (full name, base26 ID, or project name)
17
+ - When a worktree project is auto-detected, enable the full worktree mode: set `worktreeMode = true`, `worktreeRoot`, `originalBranch`, and trigger the post-execution action picker
18
+ - If project exists in both main repo and worktree, prefer the worktree version (consistent with existing picker deduplication behavior)
19
+
20
+ ## Implementation Steps
21
+ 1. In `runDoCommand()` in `src/commands/do.ts`, modify the non-worktree resolution path (currently around line 305) to add a worktree fallback
22
+ 2. After `resolveProjectIdentifierWithDetails(rafDir, projectIdentifier)` fails (returns no path), check if the current directory is a git repo
23
+ 3. If in a git repo, use `listWorktreeProjects(repoBasename)` to get worktree project folders
24
+ 4. For each worktree folder, attempt to match the identifier using the same resolution strategy: full folder name match, base26 prefix match, or name-portion match
25
+ 5. If a match is found, set `worktreeMode = true`, compute `worktreeRoot`, record `originalBranch`, and proceed through the existing worktree validation and execution flow
26
+ 6. Consider also checking worktrees FIRST (before main repo) or in parallel, to match the picker behavior where worktree versions take priority over main repo versions
27
+ 7. Add unit tests for the new auto-detection logic
28
+ 8. Add integration-level tests verifying the full flow (identifier → worktree detection → worktree mode enabled)
29
+
30
+ ## Acceptance Criteria
31
+ - [ ] `raf do turbo-finder` finds and runs a worktree project named `ahrren-turbo-finder`
32
+ - [ ] `raf do ahrren` finds and runs a worktree project with ID `ahrren`
33
+ - [ ] `raf do ahrren-turbo-finder` finds and runs the worktree project by full folder name
34
+ - [ ] Auto-detected worktree projects trigger the post-execution action picker (merge/PR/leave)
35
+ - [ ] Auto-detected worktree projects execute with the worktree as cwd
36
+ - [ ] If project exists in both main and worktree, worktree version is preferred
37
+ - [ ] Existing `--worktree` flag behavior is unchanged
38
+ - [ ] All existing tests pass
39
+ - [ ] New tests cover the auto-detection scenarios
40
+
41
+ ## Notes
42
+ - The existing worktree resolution code (lines 240-304 in `do.ts`) already handles the case where `--worktree` is passed. The new code should reuse as much of that logic as possible rather than duplicating it.
43
+ - `listWorktreeProjects()` from `src/core/worktree.ts` returns sorted folder names. Resolution against these can use string matching without needing filesystem reads into each worktree's RAF dir.
44
+ - Be careful with the `projectFolderName` variable scoping — it's currently declared inside the worktree block and needs to be accessible when auto-detection sets worktree mode.
@@ -0,0 +1,39 @@
1
+ # Task: Set medium reasoning effort for `raf do` execution
2
+
3
+ ## Objective
4
+ Configure `raf do` to spawn Claude CLI processes with `CLAUDE_CODE_EFFORT_LEVEL=medium` to reduce reasoning overhead during task execution.
5
+
6
+ ## Dependencies
7
+ 01
8
+
9
+ ## Context
10
+ By default, Claude Opus uses "high" effort level which allocates more thinking tokens. For automated task execution via `raf do`, medium effort provides a good balance of speed, cost, and capability. The `CLAUDE_CODE_EFFORT_LEVEL` environment variable is the supported mechanism for controlling this in the Claude Code CLI.
11
+
12
+ RAF's `ClaudeRunner` already passes `process.env` to spawned processes (lines 296, 400, 512 in `claude-runner.ts`). The change needs to inject `CLAUDE_CODE_EFFORT_LEVEL=medium` into the environment for non-interactive (task execution) runs, while leaving interactive planning sessions (`raf plan`) at default effort.
13
+
14
+ ## Requirements
15
+ - Set `CLAUDE_CODE_EFFORT_LEVEL=medium` in the environment when spawning Claude processes for `raf do` task execution
16
+ - Do NOT affect `raf plan` (interactive planning sessions should keep default/high effort)
17
+ - Do NOT affect failure analysis (which uses Haiku via `ClaudeRunner`)
18
+ - The effort level should be configurable through `ClaudeRunnerOptions` or `ClaudeRunnerConfig` so it's not hardcoded deep in the runner
19
+ - Pass the env var by spreading it into the `env` object passed to `spawn()` and `pty.spawn()`
20
+
21
+ ## Implementation Steps
22
+ 1. Add an optional `effortLevel` field to `ClaudeRunnerOptions` or `ClaudeRunnerConfig` in `src/core/claude-runner.ts`
23
+ 2. In the `run()` and `runVerbose()` methods, merge `CLAUDE_CODE_EFFORT_LEVEL` into the environment when `effortLevel` is set
24
+ 3. In `src/commands/do.ts`, pass `effortLevel: 'medium'` when constructing or calling `ClaudeRunner` for task execution
25
+ 4. Ensure the interactive `runInteractive()` method does NOT apply the effort override (planning should stay at default)
26
+ 5. Add tests verifying the env var is passed correctly
27
+ 6. Add tests verifying that planning mode does not get the env var
28
+
29
+ ## Acceptance Criteria
30
+ - [ ] `raf do` spawns Claude with `CLAUDE_CODE_EFFORT_LEVEL=medium` in the environment
31
+ - [ ] `raf plan` does NOT set `CLAUDE_CODE_EFFORT_LEVEL` (uses default behavior)
32
+ - [ ] The effort level is configurable (not hardcoded in the spawn call)
33
+ - [ ] Existing tests pass
34
+ - [ ] New tests verify the env var injection
35
+
36
+ ## Notes
37
+ - The three spawn points in `claude-runner.ts` are: `pty.spawn()` at line 291 (interactive), `spawn()` at line 390 (non-interactive), and `spawn()` at line 499 (verbose). Only the non-interactive and verbose spawns should get the effort override.
38
+ - The env var `CLAUDE_CODE_EFFORT_LEVEL` is confirmed as the correct name per official docs at code.claude.com/docs/en/model-config. Note: there is a known UI bug (GitHub issue #23604) where the `/model` UI always shows "High effort" regardless of the env var, but the env var is believed to still affect actual API requests.
39
+ - An alternative approach (if the env var turns out to be truly broken) would be to write `"effortLevel": "medium"` to a `.claude/settings.json` in the working directory before spawning Claude. This is a fallback, not the primary approach.
@@ -0,0 +1,19 @@
1
+ # Project Decisions
2
+
3
+ ## What's the main use case for logging the session ID?
4
+ Resume interrupted sessions. Capture session ID so RAF can attempt to resume interrupted Claude sessions using `claude --resume <id>`, and also allow manual inspection. Add `raf do <project> --resume <session-id>` flag for resuming after Ctrl+C interruption.
5
+
6
+ ## Should the session ID be captured in all execution modes?
7
+ Verbose + non-interactive. Both modes that run tasks should capture session ID. Interactive planning mode can be skipped.
8
+
9
+ ## When a session is interrupted, should the session ID be displayed to the user?
10
+ Print to terminal. Display session ID in terminal output on interruption so user can copy it for `--resume`.
11
+
12
+ ## For `raf do --resume`, should it resume the exact interrupted task or restart from scratch?
13
+ Resume exact task. Pass `--resume` to Claude CLI for the specific interrupted task, continuing from where Claude left off mid-task. Add metadata (task ID) to support this. Format could be `--resume <task-id>:<session-id>` or assume it's the last unfinished task.
14
+
15
+ ## How should non-interactive mode get access to the session ID?
16
+ Always use `--output-format stream-json` for both verbose and non-interactive modes. Parse the init event to capture session_id. Only render/display the stream output when `--verbose` flag is passed. This gives us session IDs universally without changing user-visible behavior.
17
+
18
+ ## When resuming, should RAF pass the original task's system prompt again?
19
+ Rely on session state. Trust that Claude's `--resume` restores the full context including the original prompt. Don't re-send system prompt or task context.
@@ -0,0 +1 @@
1
+ check if it's possible to log claude session id if session got interrupted
@@ -0,0 +1,37 @@
1
+ # Outcome: Capture Session ID from Claude CLI Output
2
+
3
+ ## Summary
4
+
5
+ Implemented session ID extraction from Claude CLI's `system.init` NDJSON event in both `run()` and `runVerbose()` methods. The session ID is now captured, returned in `RunResult`, and printed to the terminal on interruption.
6
+
7
+ ## Key Changes
8
+
9
+ ### `src/parsers/stream-renderer.ts`
10
+ - Added `session_id` field to `StreamEvent` interface
11
+ - Added `sessionId` field to `RenderResult` interface
12
+ - Modified `renderStreamEvent()` to extract and return `session_id` from system init events
13
+
14
+ ### `src/core/claude-runner.ts`
15
+ - Added `sessionId?: string` field to `RunResult` interface
16
+ - Added `_sessionId` private field and public `sessionId` getter to `ClaudeRunner` class
17
+ - Refactored `run()` to use `--output-format stream-json --verbose` with silent NDJSON parsing (no stdout display), enabling session ID extraction
18
+ - Updated `runVerbose()` to capture `sessionId` from stream events
19
+ - Both methods return `sessionId` in `RunResult`
20
+ - Session ID is printed via `logger.info()` on timeout and context overflow in both methods
21
+
22
+ ### `src/core/shutdown-handler.ts`
23
+ - Added session ID logging in `handleShutdown()` — prints `Session ID: <id>` when a Claude session is interrupted via Ctrl+C/SIGTERM
24
+
25
+ ### `tests/unit/stream-renderer.test.ts`
26
+ - Added 3 new tests: session_id extraction, undefined for missing session_id, undefined for non-system events
27
+
28
+ ### `tests/unit/claude-runner.test.ts`
29
+ - Updated existing `run()` tests to emit NDJSON events (since `run()` now uses stream-json format)
30
+ - Updated flag assertion: `run()` now includes `--output-format stream-json --verbose`
31
+ - Added 5 new tests: sessionId extraction in run(), runVerbose(), undefined when missing, getter exposure, deduplication
32
+
33
+ ## Test Results
34
+
35
+ All 986 tests pass (45 test suites). No regressions introduced.
36
+
37
+ <promise>COMPLETE</promise>
@@ -0,0 +1,45 @@
1
+ # Outcome: Add --resume Flag to raf do Command
2
+
3
+ ## Summary
4
+
5
+ Added `--resume <session-id>` option to `raf do` that resumes an interrupted Claude session for a specific task. When used, Claude is spawned with `--resume` flag only (no prompt/model/system-prompt flags), and completion monitoring works identically to normal execution.
6
+
7
+ ## Key Changes
8
+
9
+ ### `src/types/config.ts`
10
+ - Added `resume?: string` field to `DoCommandOptions` interface
11
+
12
+ ### `src/commands/do.ts`
13
+ - Added `-r, --resume <session-id>` option to the `do` command definition
14
+ - Added `resumeSessionId` to `SingleProjectOptions` interface
15
+ - In the task execution loop: when `activeResumeSessionId` is set, calls `runResume()` instead of `run()`/`runVerbose()` for the first attempt
16
+ - Clears `activeResumeSessionId` after the first task completes, so subsequent tasks use normal execution
17
+ - Prints clear user-facing message: `Resuming task <id> with session <session-id>` in both verbose and minimal modes
18
+
19
+ ### `src/core/claude-runner.ts`
20
+ - Added `runResume(sessionId, options)` method that spawns Claude with:
21
+ - `--resume <session-id>` — restores the interrupted session
22
+ - `--dangerously-skip-permissions` — required for non-interactive operation
23
+ - `--output-format stream-json --verbose` — enables NDJSON event parsing
24
+ - Does NOT pass `--model`, `--append-system-prompt`, or `-p` (Claude restores these from session state)
25
+ - Same completion detection, timeout handling, context overflow detection, and session ID extraction as existing methods
26
+
27
+ ### `tests/unit/claude-runner.test.ts`
28
+ - Added 11 new tests in `runResume()` describe block:
29
+ - Spawns with `--resume` flag and session ID
30
+ - Does NOT include `--model`, `--append-system-prompt`, or `-p` flags
31
+ - Includes `--dangerously-skip-permissions` flag
32
+ - Includes `--output-format stream-json` and `--verbose` flags
33
+ - Collects output from NDJSON events
34
+ - Handles timeout correctly
35
+ - Detects completion markers
36
+ - Extracts session ID from resumed session
37
+ - Passes cwd to spawn (worktree support)
38
+ - Detects context overflow
39
+ - Sets CLAUDE_CODE_EFFORT_LEVEL env var when provided
40
+
41
+ ## Test Results
42
+
43
+ All 997 tests pass (45 test suites). No regressions introduced.
44
+
45
+ <promise>COMPLETE</promise>
@@ -0,0 +1,41 @@
1
+ # Task: Capture Session ID from Claude CLI Output
2
+
3
+ ## Objective
4
+ Extract and store the Claude session ID from stream-json output in both verbose and non-interactive execution modes.
5
+
6
+ ## Context
7
+ Claude CLI emits a `session_id` in its `system.init` NDJSON event when using `--output-format stream-json`. RAF currently discards this event entirely. We need to capture and surface this ID so it can be used for session resumption and debugging.
8
+
9
+ ## Requirements
10
+ - Unify both `run()` (non-interactive) and `runVerbose()` methods to use `--output-format stream-json` so that the system init event is always available
11
+ - In non-verbose mode, parse NDJSON events silently (extract textContent for output accumulation and detect completion markers) without rendering anything to stdout
12
+ - In verbose mode, continue rendering stream events to stdout as before
13
+ - Extract `session_id` from the `system.init` event (first event in the stream)
14
+ - Add `sessionId?: string` field to the `RunResult` type returned by both `run()` and `runVerbose()`
15
+ - Modify `renderStreamEvent()` in `stream-renderer.ts` to return the session_id when it encounters a system init event, rather than discarding it
16
+ - When a session is interrupted (Ctrl+C, timeout, context overflow), print the session ID to terminal: `Session ID: <id>` so the user can copy it
17
+ - Add tests for the session ID extraction from system init events
18
+ - Add tests verifying session ID is included in RunResult
19
+
20
+ ## Implementation Steps
21
+ 1. Update the `RunResult` type to include an optional `sessionId` field
22
+ 2. Modify `renderStreamEvent()` to extract and return `session_id` from system init events (add a new field to the return type, e.g. `sessionId?: string`)
23
+ 3. Refactor `run()` to use `--output-format stream-json` internally, parsing NDJSON lines the same way `runVerbose()` does, but without writing display output to stdout
24
+ 4. In both `run()` and `runVerbose()`, capture the session_id from the first system init event and include it in the returned `RunResult`
25
+ 5. In the shutdown handler and timeout/overflow paths, print the captured session ID to the terminal before exiting
26
+ 6. Write unit tests for session ID extraction from stream events
27
+ 7. Write integration-style tests verifying RunResult includes sessionId
28
+
29
+ ## Acceptance Criteria
30
+ - [ ] `run()` uses stream-json format internally and parses events silently
31
+ - [ ] `runVerbose()` continues to display stream events as before
32
+ - [ ] Both methods return `sessionId` in `RunResult` when available
33
+ - [ ] On interruption (Ctrl+C, timeout, overflow), session ID is printed to terminal
34
+ - [ ] Existing tests continue to pass
35
+ - [ ] New tests cover session ID extraction
36
+
37
+ ## Notes
38
+ - The system init event format is: `{ type: 'system', subtype: 'init', session_id: string, tools: string[], model: string }`
39
+ - Currently `stream-renderer.ts` line 96 returns `{ display: '', textContent: '' }` for all system events — this is where extraction should happen
40
+ - The `run()` method currently uses plain text output with `child_process.spawn` — it needs to switch to stream-json parsing similar to `runVerbose()`. Consider extracting shared NDJSON parsing logic to avoid duplication.
41
+ - Be careful: `run()` has its own completion marker detection and timeout logic that must continue to work with the new stream-json parsing
@@ -0,0 +1,51 @@
1
+ # Task: Add --resume Flag to raf do Command
2
+
3
+ ## Objective
4
+ Add a `--resume` option to `raf do` that resumes an interrupted Claude session for a specific task.
5
+
6
+ ## Context
7
+ After task 01 captures the session ID and displays it on interruption, users need a way to actually resume the interrupted session. This task adds `raf do <project> --resume <session-id>` which passes Claude CLI's `--resume` flag to continue a session from where it left off.
8
+
9
+ ## Dependencies
10
+ 01
11
+
12
+ ## Requirements
13
+ - Add `--resume <session-id>` option to the `raf do` command in Commander.js
14
+ - When `--resume` is provided, RAF should:
15
+ 1. Identify the task to resume — find the first task that is in-progress (has no outcome file, or has a partial/missing completion marker)
16
+ 2. Skip the normal task execution flow and instead spawn Claude with `--resume <session-id>` flag
17
+ 3. Do NOT pass `-p` (prompt), `--append-system-prompt`, or `--model` flags — rely on Claude's session state to restore these
18
+ 4. DO pass `--dangerously-skip-permissions` as it's required for non-interactive operation
19
+ 5. Still use `--output-format stream-json` so we can capture the new session's events and detect completion
20
+ 6. Continue monitoring for completion markers and outcome file as usual
21
+ - After the resumed session completes, normal post-task flow should apply (outcome validation, commit verification, next task, etc.)
22
+ - If `--resume` is used with `--worktree`, ensure the CWD is set to the worktree path
23
+ - Print a clear message indicating which task is being resumed: `Resuming task <id> with session <session-id>`
24
+ - Add a new method to `ClaudeRunner` (e.g. `runResume(sessionId, options)`) that spawns Claude with the `--resume` flag
25
+ - Cover the new flag and resume method with tests
26
+
27
+ ## Implementation Steps
28
+ 1. Add `--resume <session-id>` option to the `do` command definition in `src/commands/do.ts`
29
+ 2. Add a `runResume()` method to `ClaudeRunner` that spawns Claude with `--resume <session-id> --dangerously-skip-permissions --output-format stream-json` and the same completion monitoring as existing methods
30
+ 3. In the task execution loop, when `--resume` is provided:
31
+ - Determine the current task (first task without a valid outcome)
32
+ - Call `runResume()` instead of the normal `run()`/`runVerbose()` method
33
+ - After the resumed task completes, clear the `--resume` flag so subsequent tasks use normal execution
34
+ 4. Handle edge cases: invalid session ID format, all tasks already complete, resumed session fails
35
+ 5. Write tests for the new `runResume()` method
36
+ 6. Write tests for the `--resume` flag integration in the do command
37
+
38
+ ## Acceptance Criteria
39
+ - [ ] `raf do <project> --resume <session-id>` resumes the interrupted session
40
+ - [ ] Claude is spawned with `--resume` flag and without prompt/model/system-prompt flags
41
+ - [ ] Completion monitoring works the same as normal execution
42
+ - [ ] After resumed task completes, subsequent tasks run normally
43
+ - [ ] Works with `--worktree` mode
44
+ - [ ] Clear user-facing message on resume start
45
+ - [ ] Tests cover resume path
46
+
47
+ ## Notes
48
+ - Claude CLI's `--resume` flag restores the full session context including the system prompt, so we must NOT pass those flags again (they may conflict or be rejected)
49
+ - The `--resume` flag only applies to a single task — after it completes (or fails), remaining tasks use normal execution
50
+ - Consider what happens if the user provides a session ID for a task that already completed — should gracefully handle this
51
+ - Check Claude CLI docs/help to verify exact `--resume` flag syntax: `claude --resume <session-id>`
package/README.md CHANGED
@@ -51,6 +51,7 @@ That's it! RAF will guide you through breaking down your task and then execute i
51
51
  - **Resume Support**: Continue from where you left off after interruption
52
52
  - **Git Integration**: Automatic commits after each completed task
53
53
  - **Task Dependencies**: Tasks can depend on other tasks, with automatic blocking on failure
54
+ - **Worktree Mode**: Isolate planning and execution in a git worktree branch with `--worktree`
54
55
 
55
56
  ## Commands
56
57
 
@@ -61,7 +62,8 @@ Opens your `$EDITOR` to write a project description, then Claude will interview
61
62
  ```bash
62
63
  raf plan # Create a new project
63
64
  raf plan my-feature # Create with a specific name
64
- raf plan --amend 3 # Add tasks to existing project #3
65
+ raf plan --amend abcdef # Add tasks to existing project
66
+ raf plan --worktree # Plan in an isolated git worktree
65
67
  ```
66
68
 
67
69
  ### `raf do`
@@ -70,20 +72,31 @@ Execute project tasks. Without arguments, shows a picker to select a pending pro
70
72
 
71
73
  ```bash
72
74
  raf do # Interactive picker
73
- raf do 3 # Execute project #3
75
+ raf do abcdef # Execute by project ID
74
76
  raf do my-project # Execute by name
75
- raf do 3 4 5 # Execute multiple projects
77
+ raf do --worktree # Pick and execute a worktree project
78
+ raf do my-feature -w --merge # Execute in worktree, merge on success
76
79
  ```
77
80
 
78
81
  Note: In non-verbose mode, the completion summary reflects the tasks executed in that run (the remaining tasks at start), so the elapsed time maps to those tasks.
79
82
 
80
83
  ### `raf status`
81
84
 
82
- Check project status.
85
+ Check project status. Worktree projects are discovered automatically when inside a git repo — no flag needed.
83
86
 
84
87
  ```bash
85
- raf status # List all projects
86
- raf status 3 # Show details for project #3
88
+ raf status # List all projects (includes worktree projects that differ)
89
+ raf status abcdef # Show details for a project (shows both main and worktree if they differ)
90
+ ```
91
+
92
+ ### `raf migrate-project-ids-base26`
93
+
94
+ Rename legacy project folders (3-char base36 or 6-char base36 with digits) to the current 6-char base26 format.
95
+
96
+ ```bash
97
+ raf migrate-project-ids-base26 # Migrate project folders in ./RAF/
98
+ raf migrate-project-ids-base26 --dry-run # Preview renames without executing
99
+ raf migrate-project-ids-base26 --worktree # Migrate worktree project folders
87
100
  ```
88
101
 
89
102
  ## Status Symbols
@@ -98,20 +111,43 @@ raf status 3 # Show details for project #3
98
111
 
99
112
  ## Project Structure
100
113
 
101
- RAF creates a `./RAF/` folder with numbered project directories:
114
+ RAF creates a `./RAF/` folder with project directories identified by epoch-based base26 IDs (a-z only):
102
115
 
103
116
  ```
104
117
  ./RAF/
105
- ├── 001-auth-system/
118
+ ├── abcdef-auth-system/
106
119
  │ ├── input.md # Your original intent (raw prompt)
107
120
  │ ├── decisions.md # Design decisions from planning
108
121
  │ ├── plans/ # Generated task plans
109
122
  │ ├── outcomes/ # Execution results
110
123
  │ └── logs/ # Debug logs (on failure)
111
- └── 002-dashboard/
124
+ └── abaaba-dashboard/
112
125
  └── ...
113
126
  ```
114
127
 
128
+ ## Worktree Mode
129
+
130
+ Worktree mode runs planning and execution in an isolated git worktree, keeping your main branch clean while RAF works on a separate branch.
131
+
132
+ ### Basic workflow
133
+
134
+ ```bash
135
+ # Plan in a worktree (creates branch and worktree directory)
136
+ raf plan my-feature --worktree
137
+
138
+ # Execute tasks in the worktree, merge back on success
139
+ raf do my-feature --worktree --merge
140
+ ```
141
+
142
+ ### How it works
143
+
144
+ - `--worktree` creates a git worktree at `~/.raf/worktrees/<repo>/<project>/` with a new branch named after the project folder (e.g., `abcdef-my-feature`)
145
+ - All planning artifacts, code changes, and commits happen in the worktree branch
146
+ - `--merge` on `raf do` merges the branch back after all tasks succeed (fast-forward preferred, merge commit as fallback)
147
+ - On merge conflicts, the merge is aborted and you get instructions for manual resolution
148
+ - If tasks fail, the worktree branch is preserved for inspection
149
+ - Worktrees persist after completion — clean them up manually with `git worktree remove` when done
150
+
115
151
  ## Command Reference
116
152
 
117
153
  ### `raf plan [projectName]`
@@ -120,8 +156,9 @@ RAF creates a `./RAF/` folder with numbered project directories:
120
156
  |--------|-------------|
121
157
  | `--amend <id>` | Add tasks to existing project |
122
158
  | `-y, --auto` | Skip permission prompts (runs in dangerous mode) |
159
+ | `-w, --worktree` | Create a git worktree for isolated planning |
123
160
 
124
- ### `raf do [projects...]`
161
+ ### `raf do [project]`
125
162
 
126
163
  | Option | Description |
127
164
  |--------|-------------|
@@ -130,9 +167,18 @@ RAF creates a `./RAF/` folder with numbered project directories:
130
167
  | `-d, --debug` | Save all logs and show debug output |
131
168
  | `-m, --model <name>` | Claude model (sonnet, haiku, opus) |
132
169
  | `--sonnet` | Shorthand for `--model sonnet` |
170
+ | `-w, --worktree` | Execute tasks in a git worktree |
171
+ | `--merge` | Merge worktree branch after successful completion (requires `--worktree`) |
133
172
 
134
173
  Alias: `raf act`
135
174
 
175
+ ### `raf migrate-project-ids-base26`
176
+
177
+ | Option | Description |
178
+ |--------|-------------|
179
+ | `--dry-run` | Preview renames without executing |
180
+ | `-w, --worktree` | Migrate worktree project folders |
181
+
136
182
  > **Note:** `raf do` and `raf plan -y` run Claude with `--dangerously-skip-permissions` for fully automated execution without interactive prompts.
137
183
 
138
184
  ### `raf status [identifier]`
@@ -1,4 +1,11 @@
1
1
  import { Command } from 'commander';
2
+ /**
3
+ * Post-execution action chosen by the user before task execution begins.
4
+ * - 'merge': merge the worktree branch into the original branch
5
+ * - 'pr': push the branch and create a GitHub PR
6
+ * - 'leave': do nothing, keep the branch as-is
7
+ */
8
+ export type PostExecutionAction = 'merge' | 'pr' | 'leave';
2
9
  /**
3
10
  * Format failure history for console output.
4
11
  * Shows attempts that failed before eventual success or final failure.
@@ -9,4 +16,12 @@ export declare function formatRetryHistoryForConsole(taskId: string, taskName: s
9
16
  reason: string;
10
17
  }>, finalAttempt: number, success: boolean): string;
11
18
  export declare function createDoCommand(): Command;
19
+ /**
20
+ * Show an interactive picker for the post-execution action in worktree mode.
21
+ * Presented before task execution so the user declares intent upfront.
22
+ *
23
+ * If "Create PR" is chosen, runs preflight checks immediately. If preflight fails,
24
+ * warns the user and falls back to re-prompting.
25
+ */
26
+ export declare function pickPostExecutionAction(worktreeRoot: string): Promise<PostExecutionAction>;
12
27
  //# sourceMappingURL=do.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"do.d.ts","sourceRoot":"","sources":["../../src/commands/do.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkCpC;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,EAC1D,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,OAAO,GACf,MAAM,CAkBR;AA0BD,wBAAgB,eAAe,IAAI,OAAO,CAgBzC"}
1
+ {"version":3,"file":"do.d.ts","sourceRoot":"","sources":["../../src/commands/do.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiDpC;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,EAC1D,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,OAAO,GACf,MAAM,CAkBR;AA0BD,wBAAgB,eAAe,IAAI,OAAO,CAkBzC;AAsSD;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAuBhG"}