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
@@ -1,27 +1,33 @@
1
1
  export declare const RAF_DIR = "RAF";
2
+ /** RAF epoch: 2026-01-01T00:00:00Z */
3
+ export declare const RAF_EPOCH = 1767225600;
4
+ /** Regex pattern for matching base36 task IDs (2-char: 00-zz) */
5
+ export declare const TASK_ID_PATTERN = "[0-9a-z]{2}";
2
6
  /**
3
- * Encode a project number >= 1000 to a 3-character base36 string.
4
- * The encoding offsets by 1000, so:
5
- * - 1000 -> 'a00'
6
- * - 1001 -> 'a01'
7
- * - 1035 -> 'a0z'
8
- * - 1036 -> 'a10'
9
- * - etc.
10
- *
11
- * First character uses a-z (10-35 in base36, letters only).
12
- * Second and third characters use 0-9a-z (0-35 in base36).
7
+ * Encode a task number (0-based or 1-based) to a 2-character zero-padded base36 string.
8
+ * E.g., 1 -> "01", 10 -> "0a", 36 -> "10", 1295 -> "zz"
9
+ */
10
+ export declare function encodeTaskId(num: number): string;
11
+ /**
12
+ * Decode a 2-character base36 task ID string back to a number.
13
+ * E.g., "01" -> 1, "0a" -> 10, "10" -> 36
14
+ * Returns null if invalid format.
13
15
  */
14
- export declare function encodeBase36(num: number): string;
16
+ export declare function decodeTaskId(str: string): number | null;
15
17
  /**
16
- * Decode a 3-character base36 string to a project number.
17
- * Returns the decoded number >= 1000, or null if invalid format.
18
+ * Encode a non-negative integer to a 6-character 'a'-padded base26 string (a-z alphabet).
19
+ * E.g., 0 "aaaaaa", 1 → "aaaaab", 25 "aaaaaz", 26 → "aaaaba"
18
20
  */
19
- export declare function decodeBase36(str: string): number | null;
21
+ export declare function encodeBase26(num: number): string;
20
22
  /**
21
- * Check if a string is a valid base36 project prefix.
22
- * Valid format: starts with a-z, followed by two base36 chars (0-9, a-z).
23
+ * Decode a 6-character base26 string (a-z alphabet) back to a non-negative integer.
24
+ * Returns the decoded number, or null if invalid format.
23
25
  */
24
- export declare function isBase36Prefix(str: string): boolean;
26
+ export declare function decodeBase26(str: string): number | null;
27
+ /**
28
+ * Check if a string is a valid 6-character base26 project prefix (a-z only).
29
+ */
30
+ export declare function isBase26Prefix(str: string): boolean;
25
31
  export declare function getRafDir(): string;
26
32
  export declare function ensureRafDir(): string;
27
33
  export declare function getNextProjectNumber(rafDir: string): number;
@@ -29,29 +35,25 @@ export declare function formatProjectNumber(num: number): string;
29
35
  export declare function getProjectDir(rafDir: string, projectName: string): string | null;
30
36
  /**
31
37
  * Extract project number prefix from a project path.
32
- * Supports both numeric (001-999) and base36 (a00-zzz) formats.
33
- * E.g., "/Users/foo/RAF/001-my-project" -> "001"
34
- * E.g., "/Users/foo/RAF/a00-my-project" -> "a00"
35
- * Returns the prefix string (e.g., "001" or "a00") or null if not found.
38
+ * E.g., "/Users/foo/RAF/abcdef-my-project" -> "abcdef"
39
+ * Returns the 6-char base26 prefix string or null if not found.
36
40
  */
37
41
  export declare function extractProjectNumber(projectPath: string): string | null;
38
42
  /**
39
43
  * Parse a project prefix string to its numeric value.
40
- * Handles both numeric (001-999) and base36 (a00-zzz) formats.
44
+ * Accepts a 6-character base26 string (a-z only).
41
45
  * Returns the numeric project number or null if invalid.
42
46
  */
43
47
  export declare function parseProjectPrefix(prefix: string): number | null;
44
48
  /**
45
49
  * Extract project name from a project path (without number prefix).
46
- * Supports both numeric (001-999) and base36 (a00-zzz) formats.
47
- * E.g., "/Users/foo/RAF/001-my-project" -> "my-project"
48
- * E.g., "/Users/foo/RAF/a00-my-project" -> "my-project"
50
+ * E.g., "/Users/foo/RAF/abcdef-my-project" -> "my-project"
49
51
  * Returns the project name or null if not found.
50
52
  */
51
53
  export declare function extractProjectName(projectPath: string): string | null;
52
54
  /**
53
55
  * Extract task name from a plan filename (without number prefix and extension).
54
- * E.g., "002-fix-login-bug.md" -> "fix-login-bug"
56
+ * E.g., "02-fix-login-bug.md" -> "fix-login-bug"
55
57
  * Returns the task name or null if not found.
56
58
  */
57
59
  export declare function extractTaskNameFromPlanFile(planFilename: string): string | null;
@@ -86,14 +88,12 @@ export interface ProjectResolutionResult {
86
88
  * Resolve a project identifier with detailed result including ambiguity detection.
87
89
  *
88
90
  * Supported identifier formats (checked in this order):
89
- * 1. Full folder name (e.g., "001-fix-stuff", "a01-important-project")
91
+ * 1. Full folder name (e.g., "abcdef-fix-stuff")
90
92
  * - Must be an exact match to an existing folder
91
- * - Pattern: numeric prefix (2-3 digits) or base36 prefix, followed by hyphen and name
92
- * 2. Numeric ID (e.g., "003", "3", "1000")
93
- * - Looks up by project number
94
- * 3. Base36 prefix (e.g., "a00", "a01")
95
- * - Looks up by base36 project number (for projects >= 1000)
96
- * 4. Project name (e.g., "my-project", "fix-stuff")
93
+ * - Pattern: 6-char base26 prefix, followed by hyphen and name
94
+ * 2. Base26 prefix (e.g., "abcdef")
95
+ * - Looks up by decoded project number
96
+ * 3. Project name (e.g., "my-project", "fix-stuff")
97
97
  * - Looks up by the name portion of the folder (after the prefix)
98
98
  * - Case-insensitive matching
99
99
  * - Returns error if multiple projects have the same name
@@ -107,23 +107,18 @@ export declare function resolveProjectIdentifierWithDetails(rafDir: string, iden
107
107
  * Resolve a project identifier to a full project path.
108
108
  *
109
109
  * Supported identifier formats (checked in this order):
110
- * 1. Full folder name (e.g., "001-fix-stuff", "a01-important-project")
110
+ * 1. Full folder name (e.g., "abcdef-fix-stuff")
111
111
  * - Must be an exact match to an existing folder
112
- * - Pattern: numeric prefix (2-3 digits) or base36 prefix, followed by hyphen and name
113
- * 2. Numeric ID (e.g., "003", "3", "1000")
114
- * - Looks up by project number
115
- * 3. Base36 prefix (e.g., "a00", "a01")
116
- * - Looks up by base36 project number (for projects >= 1000)
117
- * 4. Project name (e.g., "my-project", "fix-stuff")
112
+ * - Pattern: 6-char base26 prefix, followed by hyphen and name
113
+ * 2. Base26 prefix (e.g., "abcdef")
114
+ * - Looks up by decoded project number
115
+ * 3. Project name (e.g., "my-project", "fix-stuff")
118
116
  * - Looks up by the name portion of the folder (after the prefix)
119
117
  * - Case-insensitive matching
120
118
  *
121
119
  * Note: For ambiguity detection (multiple projects with same name), use
122
120
  * resolveProjectIdentifierWithDetails instead.
123
121
  *
124
- * This function is designed to be extensible for future task-level references
125
- * like "001-project/002-task".
126
- *
127
122
  * @param rafDir - The RAF directory containing project folders
128
123
  * @param identifier - The identifier to resolve
129
124
  * @returns The full project path or null if not found (or ambiguous)
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,QAAQ,CAAC;AAO7B;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAyBhD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA6BvD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAKnD;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,YAAY,IAAI,MAAM,CAMrC;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAiC3D;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAwBhF;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgBvE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYhE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgBrE;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/E;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAqClG;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEhG;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,6DAA6D;IAC7D,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,sCAAsC;IACtC,KAAK,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC;IAClC,uDAAuD;IACvD,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjF;AAsCD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,uBAAuB,CA0EzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,MAAM,GAAG,IAAI,CAGf"}
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,QAAQ,CAAC;AAE7B,sCAAsC;AACtC,eAAO,MAAM,SAAS,aAAa,CAAC;AAWpC,iEAAiE;AACjE,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQhD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQvD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAWhD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAavD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAKnD;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,YAAY,IAAI,MAAM,CAMrC;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA8B3D;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAiBhF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOvE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKhE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOrE;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/E;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAyBlG;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEhG;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,6DAA6D;IAC7D,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,sCAAsC;IACtC,KAAK,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC;IAClC,uDAAuD;IACvD,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjF;AA0BD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,uBAAuB,CA8DzB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,MAAM,GAAG,IAAI,CAGf"}
@@ -1,80 +1,85 @@
1
1
  import * as fs from 'node:fs';
2
2
  import * as path from 'node:path';
3
3
  export const RAF_DIR = 'RAF';
4
- // Base36 constants
5
- const BASE36_CHARS = '0123456789abcdefghijklmnopqrstuvwxyz';
6
- const BASE36_START = 1000; // First base36 project number
7
- const MAX_NUMERIC = 999; // Last numeric project number
4
+ /** RAF epoch: 2026-01-01T00:00:00Z */
5
+ export const RAF_EPOCH = 1767225600;
6
+ /** ID width: 6 characters, 'a'-padded base26 */
7
+ const ID_WIDTH = 6;
8
+ /** Base26 alphabet: a=0, b=1, ..., z=25 */
9
+ const BASE26_ALPHABET = 'abcdefghijklmnopqrstuvwxyz';
10
+ /** Task ID width: 2 characters, zero-padded base36 */
11
+ const TASK_ID_WIDTH = 2;
12
+ /** Regex pattern for matching base36 task IDs (2-char: 00-zz) */
13
+ export const TASK_ID_PATTERN = '[0-9a-z]{2}';
8
14
  /**
9
- * Encode a project number >= 1000 to a 3-character base36 string.
10
- * The encoding offsets by 1000, so:
11
- * - 1000 -> 'a00'
12
- * - 1001 -> 'a01'
13
- * - 1035 -> 'a0z'
14
- * - 1036 -> 'a10'
15
- * - etc.
16
- *
17
- * First character uses a-z (10-35 in base36, letters only).
18
- * Second and third characters use 0-9a-z (0-35 in base36).
15
+ * Encode a task number (0-based or 1-based) to a 2-character zero-padded base36 string.
16
+ * E.g., 1 -> "01", 10 -> "0a", 36 -> "10", 1295 -> "zz"
19
17
  */
20
- export function encodeBase36(num) {
21
- if (num < BASE36_START) {
22
- throw new Error(`encodeBase36 only accepts numbers >= ${BASE36_START}, got ${num}`);
18
+ export function encodeTaskId(num) {
19
+ if (num < 0) {
20
+ throw new Error(`encodeTaskId only accepts non-negative integers, got ${num}`);
23
21
  }
24
- // Offset to get the base36 representation starting at 'a00' for 1000
25
- const offset = num - BASE36_START;
26
- // First character: 'a' + (offset / 36^2), uses only letters a-z
27
- // This gives us 26 possible first characters (a-z)
28
- const firstCharIndex = Math.floor(offset / (36 * 36));
29
- if (firstCharIndex >= 26) {
30
- throw new Error(`Project number ${num} exceeds maximum base36 capacity (max: ${BASE36_START + 26 * 36 * 36 - 1})`);
22
+ if (num > 36 * 36 - 1) {
23
+ throw new Error(`encodeTaskId: value ${num} exceeds max 2-char base36 (1295)`);
31
24
  }
32
- const firstChar = BASE36_CHARS[10 + firstCharIndex]; // Start from 'a' (index 10)
33
- // Second and third characters: remaining value in base36
34
- const remainder = offset % (36 * 36);
35
- const secondCharIndex = Math.floor(remainder / 36);
36
- const thirdCharIndex = remainder % 36;
37
- const secondChar = BASE36_CHARS[secondCharIndex];
38
- const thirdChar = BASE36_CHARS[thirdCharIndex];
39
- return `${firstChar}${secondChar}${thirdChar}`;
25
+ return num.toString(36).padStart(TASK_ID_WIDTH, '0');
40
26
  }
41
27
  /**
42
- * Decode a 3-character base36 string to a project number.
43
- * Returns the decoded number >= 1000, or null if invalid format.
28
+ * Decode a 2-character base36 task ID string back to a number.
29
+ * E.g., "01" -> 1, "0a" -> 10, "10" -> 36
30
+ * Returns null if invalid format.
44
31
  */
45
- export function decodeBase36(str) {
46
- if (str.length !== 3) {
32
+ export function decodeTaskId(str) {
33
+ if (str.length !== TASK_ID_WIDTH) {
47
34
  return null;
48
35
  }
49
- const lower = str.toLowerCase();
50
- const firstChar = lower.charAt(0);
51
- const secondChar = lower.charAt(1);
52
- const thirdChar = lower.charAt(2);
53
- // First character must be a letter (a-z)
54
- const firstIndex = BASE36_CHARS.indexOf(firstChar);
55
- if (firstIndex < 10 || firstIndex > 35) {
56
- return null; // Not a letter
36
+ if (!/^[0-9a-z]{2}$/.test(str.toLowerCase())) {
37
+ return null;
38
+ }
39
+ return parseInt(str.toLowerCase(), 36);
40
+ }
41
+ /**
42
+ * Encode a non-negative integer to a 6-character 'a'-padded base26 string (a-z alphabet).
43
+ * E.g., 0 "aaaaaa", 1 → "aaaaab", 25 → "aaaaaz", 26 → "aaaaba"
44
+ */
45
+ export function encodeBase26(num) {
46
+ if (num < 0) {
47
+ throw new Error(`encodeBase26 only accepts non-negative integers, got ${num}`);
57
48
  }
58
- // Second and third characters can be 0-9 or a-z
59
- const secondIndex = BASE36_CHARS.indexOf(secondChar);
60
- const thirdIndex = BASE36_CHARS.indexOf(thirdChar);
61
- if (secondIndex === -1 || thirdIndex === -1) {
49
+ let result = '';
50
+ let remaining = num;
51
+ for (let i = 0; i < ID_WIDTH; i++) {
52
+ result = BASE26_ALPHABET[remaining % 26] + result;
53
+ remaining = Math.floor(remaining / 26);
54
+ }
55
+ return result;
56
+ }
57
+ /**
58
+ * Decode a 6-character base26 string (a-z alphabet) back to a non-negative integer.
59
+ * Returns the decoded number, or null if invalid format.
60
+ */
61
+ export function decodeBase26(str) {
62
+ if (str.length !== ID_WIDTH) {
62
63
  return null;
63
64
  }
64
- // Calculate the offset from 1000
65
- const letterOffset = firstIndex - 10; // 'a' = 0, 'b' = 1, etc.
66
- const offset = letterOffset * 36 * 36 + secondIndex * 36 + thirdIndex;
67
- return BASE36_START + offset;
65
+ if (!/^[a-z]{6}$/.test(str.toLowerCase())) {
66
+ return null;
67
+ }
68
+ const lower = str.toLowerCase();
69
+ let result = 0;
70
+ for (let i = 0; i < ID_WIDTH; i++) {
71
+ result = result * 26 + (lower.charCodeAt(i) - 97); // 'a' = 97
72
+ }
73
+ return result;
68
74
  }
69
75
  /**
70
- * Check if a string is a valid base36 project prefix.
71
- * Valid format: starts with a-z, followed by two base36 chars (0-9, a-z).
76
+ * Check if a string is a valid 6-character base26 project prefix (a-z only).
72
77
  */
73
- export function isBase36Prefix(str) {
74
- if (str.length !== 3) {
78
+ export function isBase26Prefix(str) {
79
+ if (str.length !== ID_WIDTH) {
75
80
  return false;
76
81
  }
77
- return /^[a-z][0-9a-z]{2}$/.test(str.toLowerCase());
82
+ return /^[a-z]{6}$/.test(str.toLowerCase());
78
83
  }
79
84
  export function getRafDir() {
80
85
  return path.resolve(process.cwd(), RAF_DIR);
@@ -87,39 +92,33 @@ export function ensureRafDir() {
87
92
  return rafDir;
88
93
  }
89
94
  export function getNextProjectNumber(rafDir) {
95
+ const id = Math.floor(Date.now() / 1000) - RAF_EPOCH;
90
96
  if (!fs.existsSync(rafDir)) {
91
- return 1;
97
+ return id;
92
98
  }
99
+ // Collect existing IDs for collision detection
100
+ const existingIds = new Set();
93
101
  const entries = fs.readdirSync(rafDir, { withFileTypes: true });
94
- const numbers = [];
95
102
  for (const entry of entries) {
96
103
  if (entry.isDirectory()) {
97
- // Try numeric format first (2-3 digits)
98
- const numericMatch = entry.name.match(/^(\d{2,3})-/);
99
- if (numericMatch && numericMatch[1]) {
100
- numbers.push(parseInt(numericMatch[1], 10));
101
- continue;
102
- }
103
- // Try base36 format
104
- const base36Match = entry.name.match(/^([a-z][0-9a-z]{2})-/i);
105
- if (base36Match && base36Match[1]) {
106
- const decoded = decodeBase36(base36Match[1].toLowerCase());
104
+ const match = entry.name.match(/^([a-z]{6})-/i);
105
+ if (match && match[1]) {
106
+ const decoded = decodeBase26(match[1].toLowerCase());
107
107
  if (decoded !== null) {
108
- numbers.push(decoded);
108
+ existingIds.add(decoded);
109
109
  }
110
110
  }
111
111
  }
112
112
  }
113
- if (numbers.length === 0) {
114
- return 1;
113
+ // Increment until we find a free slot
114
+ let candidate = id;
115
+ while (existingIds.has(candidate)) {
116
+ candidate++;
115
117
  }
116
- return Math.max(...numbers) + 1;
118
+ return candidate;
117
119
  }
118
120
  export function formatProjectNumber(num) {
119
- if (num <= MAX_NUMERIC) {
120
- return num.toString().padStart(3, '0');
121
- }
122
- return encodeBase36(num);
121
+ return encodeBase26(num);
123
122
  }
124
123
  export function getProjectDir(rafDir, projectName) {
125
124
  if (!fs.existsSync(rafDir)) {
@@ -128,14 +127,8 @@ export function getProjectDir(rafDir, projectName) {
128
127
  const entries = fs.readdirSync(rafDir, { withFileTypes: true });
129
128
  for (const entry of entries) {
130
129
  if (entry.isDirectory()) {
131
- // Try numeric format first
132
- const numericMatch = entry.name.match(/^\d{2,3}-(.+)$/);
133
- if (numericMatch && numericMatch[1] === projectName) {
134
- return path.join(rafDir, entry.name);
135
- }
136
- // Try base36 format
137
- const base36Match = entry.name.match(/^[a-z][0-9a-z]{2}-(.+)$/i);
138
- if (base36Match && base36Match[1] === projectName) {
130
+ const match = entry.name.match(/^[a-z]{6}-(.+)$/i);
131
+ if (match && match[1] === projectName) {
139
132
  return path.join(rafDir, entry.name);
140
133
  }
141
134
  }
@@ -144,70 +137,49 @@ export function getProjectDir(rafDir, projectName) {
144
137
  }
145
138
  /**
146
139
  * Extract project number prefix from a project path.
147
- * Supports both numeric (001-999) and base36 (a00-zzz) formats.
148
- * E.g., "/Users/foo/RAF/001-my-project" -> "001"
149
- * E.g., "/Users/foo/RAF/a00-my-project" -> "a00"
150
- * Returns the prefix string (e.g., "001" or "a00") or null if not found.
140
+ * E.g., "/Users/foo/RAF/abcdef-my-project" -> "abcdef"
141
+ * Returns the 6-char base26 prefix string or null if not found.
151
142
  */
152
143
  export function extractProjectNumber(projectPath) {
153
144
  const folderName = path.basename(projectPath);
154
- // Try numeric format first (2-3 digits)
155
- const numericMatch = folderName.match(/^(\d{2,3})-/);
156
- if (numericMatch && numericMatch[1]) {
157
- return numericMatch[1];
158
- }
159
- // Try base36 format (letter followed by two alphanumeric chars)
160
- const base36Match = folderName.match(/^([a-z][0-9a-z]{2})-/i);
161
- if (base36Match && base36Match[1]) {
162
- return base36Match[1].toLowerCase();
145
+ const match = folderName.match(/^([a-z]{6})-/i);
146
+ if (match && match[1]) {
147
+ return match[1].toLowerCase();
163
148
  }
164
149
  return null;
165
150
  }
166
151
  /**
167
152
  * Parse a project prefix string to its numeric value.
168
- * Handles both numeric (001-999) and base36 (a00-zzz) formats.
153
+ * Accepts a 6-character base26 string (a-z only).
169
154
  * Returns the numeric project number or null if invalid.
170
155
  */
171
156
  export function parseProjectPrefix(prefix) {
172
- // Try numeric first
173
- if (/^\d{2,3}$/.test(prefix)) {
174
- return parseInt(prefix, 10);
175
- }
176
- // Try base36
177
- if (isBase36Prefix(prefix)) {
178
- return decodeBase36(prefix);
157
+ if (isBase26Prefix(prefix)) {
158
+ return decodeBase26(prefix);
179
159
  }
180
160
  return null;
181
161
  }
182
162
  /**
183
163
  * Extract project name from a project path (without number prefix).
184
- * Supports both numeric (001-999) and base36 (a00-zzz) formats.
185
- * E.g., "/Users/foo/RAF/001-my-project" -> "my-project"
186
- * E.g., "/Users/foo/RAF/a00-my-project" -> "my-project"
164
+ * E.g., "/Users/foo/RAF/abcdef-my-project" -> "my-project"
187
165
  * Returns the project name or null if not found.
188
166
  */
189
167
  export function extractProjectName(projectPath) {
190
168
  const folderName = path.basename(projectPath);
191
- // Try numeric format first
192
- const numericMatch = folderName.match(/^\d{2,3}-(.+)$/);
193
- if (numericMatch && numericMatch[1]) {
194
- return numericMatch[1];
195
- }
196
- // Try base36 format
197
- const base36Match = folderName.match(/^[a-z][0-9a-z]{2}-(.+)$/i);
198
- if (base36Match && base36Match[1]) {
199
- return base36Match[1];
169
+ const match = folderName.match(/^[a-z]{6}-(.+)$/i);
170
+ if (match && match[1]) {
171
+ return match[1];
200
172
  }
201
173
  return null;
202
174
  }
203
175
  /**
204
176
  * Extract task name from a plan filename (without number prefix and extension).
205
- * E.g., "002-fix-login-bug.md" -> "fix-login-bug"
177
+ * E.g., "02-fix-login-bug.md" -> "fix-login-bug"
206
178
  * Returns the task name or null if not found.
207
179
  */
208
180
  export function extractTaskNameFromPlanFile(planFilename) {
209
181
  const basename = path.basename(planFilename, '.md');
210
- const match = basename.match(/^\d{2,3}-(.+)$/);
182
+ const match = basename.match(/^[0-9a-z]{2}-(.+)$/);
211
183
  return match && match[1] ? match[1] : null;
212
184
  }
213
185
  export function listProjects(rafDir) {
@@ -218,24 +190,13 @@ export function listProjects(rafDir) {
218
190
  const projects = [];
219
191
  for (const entry of entries) {
220
192
  if (entry.isDirectory()) {
221
- // Try numeric format first
222
- const numericMatch = entry.name.match(/^(\d{2,3})-(.+)$/);
223
- if (numericMatch && numericMatch[1] && numericMatch[2]) {
224
- projects.push({
225
- number: parseInt(numericMatch[1], 10),
226
- name: numericMatch[2],
227
- path: path.join(rafDir, entry.name),
228
- });
229
- continue;
230
- }
231
- // Try base36 format
232
- const base36Match = entry.name.match(/^([a-z][0-9a-z]{2})-(.+)$/i);
233
- if (base36Match && base36Match[1] && base36Match[2]) {
234
- const decoded = decodeBase36(base36Match[1].toLowerCase());
193
+ const match = entry.name.match(/^([a-z]{6})-(.+)$/i);
194
+ if (match && match[1] && match[2]) {
195
+ const decoded = decodeBase26(match[1].toLowerCase());
235
196
  if (decoded !== null) {
236
197
  projects.push({
237
198
  number: decoded,
238
- name: base36Match[2],
199
+ name: match[2],
239
200
  path: path.join(rafDir, entry.name),
240
201
  });
241
202
  }
@@ -267,24 +228,13 @@ export function getInputPath(projectPath) {
267
228
  * Returns null if the folder name doesn't match expected project format.
268
229
  */
269
230
  function parseProjectFolder(rafDir, folderName) {
270
- // Try numeric format first
271
- const numericMatch = folderName.match(/^(\d{2,3})-(.+)$/);
272
- if (numericMatch && numericMatch[1] && numericMatch[2]) {
273
- return {
274
- number: parseInt(numericMatch[1], 10),
275
- name: numericMatch[2],
276
- path: path.join(rafDir, folderName),
277
- folder: folderName,
278
- };
279
- }
280
- // Try base36 format
281
- const base36Match = folderName.match(/^([a-z][0-9a-z]{2})-(.+)$/i);
282
- if (base36Match && base36Match[1] && base36Match[2]) {
283
- const decoded = decodeBase36(base36Match[1].toLowerCase());
231
+ const match = folderName.match(/^([a-z]{6})-(.+)$/i);
232
+ if (match && match[1] && match[2]) {
233
+ const decoded = decodeBase26(match[1].toLowerCase());
284
234
  if (decoded !== null) {
285
235
  return {
286
236
  number: decoded,
287
- name: base36Match[2],
237
+ name: match[2],
288
238
  path: path.join(rafDir, folderName),
289
239
  folder: folderName,
290
240
  };
@@ -296,14 +246,12 @@ function parseProjectFolder(rafDir, folderName) {
296
246
  * Resolve a project identifier with detailed result including ambiguity detection.
297
247
  *
298
248
  * Supported identifier formats (checked in this order):
299
- * 1. Full folder name (e.g., "001-fix-stuff", "a01-important-project")
249
+ * 1. Full folder name (e.g., "abcdef-fix-stuff")
300
250
  * - Must be an exact match to an existing folder
301
- * - Pattern: numeric prefix (2-3 digits) or base36 prefix, followed by hyphen and name
302
- * 2. Numeric ID (e.g., "003", "3", "1000")
303
- * - Looks up by project number
304
- * 3. Base36 prefix (e.g., "a00", "a01")
305
- * - Looks up by base36 project number (for projects >= 1000)
306
- * 4. Project name (e.g., "my-project", "fix-stuff")
251
+ * - Pattern: 6-char base26 prefix, followed by hyphen and name
252
+ * 2. Base26 prefix (e.g., "abcdef")
253
+ * - Looks up by decoded project number
254
+ * 3. Project name (e.g., "my-project", "fix-stuff")
307
255
  * - Looks up by the name portion of the folder (after the prefix)
308
256
  * - Case-insensitive matching
309
257
  * - Returns error if multiple projects have the same name
@@ -316,13 +264,11 @@ export function resolveProjectIdentifierWithDetails(rafDir, identifier) {
316
264
  if (!fs.existsSync(rafDir)) {
317
265
  return { path: null, error: 'not_found' };
318
266
  }
319
- // Pattern to match full folder names: NNN-name or XXX-name (base36)
320
- // Supports 2-3 digit numeric prefixes or 3-char base36 prefixes
321
- const fullFolderPattern = /^(\d{2,3}|[a-z][0-9a-z]{2})-(.+)$/i;
267
+ // Pattern to match full folder names: XXXXXX-name (6-char base26 prefix)
268
+ const fullFolderPattern = /^[a-z]{6}-(.+)$/i;
322
269
  const fullFolderMatch = identifier.match(fullFolderPattern);
323
270
  // Check if identifier is a full folder name (exact match required)
324
271
  if (fullFolderMatch) {
325
- // Check for exact case-insensitive match by listing directory
326
272
  const entries = fs.readdirSync(rafDir, { withFileTypes: true });
327
273
  for (const entry of entries) {
328
274
  if (entry.isDirectory() && entry.name.toLowerCase() === identifier.toLowerCase()) {
@@ -330,20 +276,13 @@ export function resolveProjectIdentifierWithDetails(rafDir, identifier) {
330
276
  }
331
277
  }
332
278
  // Full folder name format but doesn't exist as a folder.
333
- // Fall through to name-based matching - the entire identifier might be a project name
334
- // (e.g., "fix-double-summary-headers" looks like "fix-xxx" but is actually a name).
279
+ // Fall through to name-based matching.
335
280
  }
336
- // Check if it's a numeric identifier (e.g., "003", "3", "1000")
337
- const isNumeric = /^\d+$/.test(identifier);
338
- // Check if it's a base36 identifier (e.g., "a00", "a01")
339
- const isBase36 = isBase36Prefix(identifier);
340
- // Convert base36 to numeric for matching
281
+ // Check if it's a base26 identifier (e.g., "abcdef")
282
+ const isBase26 = isBase26Prefix(identifier);
341
283
  let targetNumber = null;
342
- if (isNumeric) {
343
- targetNumber = parseInt(identifier, 10);
344
- }
345
- else if (isBase36) {
346
- targetNumber = decodeBase36(identifier);
284
+ if (isBase26) {
285
+ targetNumber = decodeBase26(identifier);
347
286
  }
348
287
  const entries = fs.readdirSync(rafDir, { withFileTypes: true });
349
288
  const nameMatches = [];
@@ -351,17 +290,13 @@ export function resolveProjectIdentifierWithDetails(rafDir, identifier) {
351
290
  if (entry.isDirectory()) {
352
291
  const project = parseProjectFolder(rafDir, entry.name);
353
292
  if (project) {
354
- if (targetNumber !== null) {
355
- // Match by number (either numeric or base36 identifier)
356
- if (project.number === targetNumber) {
357
- return { path: project.path };
358
- }
293
+ if (targetNumber !== null && project.number === targetNumber) {
294
+ // Match by number (base26 identifier)
295
+ return { path: project.path };
359
296
  }
360
- else {
361
- // Match by name (case-insensitive)
362
- if (project.name.toLowerCase() === identifier.toLowerCase()) {
363
- nameMatches.push(project);
364
- }
297
+ // Also collect name matches (for fallback if number match fails)
298
+ if (project.name.toLowerCase() === identifier.toLowerCase()) {
299
+ nameMatches.push(project);
365
300
  }
366
301
  }
367
302
  }
@@ -384,23 +319,18 @@ export function resolveProjectIdentifierWithDetails(rafDir, identifier) {
384
319
  * Resolve a project identifier to a full project path.
385
320
  *
386
321
  * Supported identifier formats (checked in this order):
387
- * 1. Full folder name (e.g., "001-fix-stuff", "a01-important-project")
322
+ * 1. Full folder name (e.g., "abcdef-fix-stuff")
388
323
  * - Must be an exact match to an existing folder
389
- * - Pattern: numeric prefix (2-3 digits) or base36 prefix, followed by hyphen and name
390
- * 2. Numeric ID (e.g., "003", "3", "1000")
391
- * - Looks up by project number
392
- * 3. Base36 prefix (e.g., "a00", "a01")
393
- * - Looks up by base36 project number (for projects >= 1000)
394
- * 4. Project name (e.g., "my-project", "fix-stuff")
324
+ * - Pattern: 6-char base26 prefix, followed by hyphen and name
325
+ * 2. Base26 prefix (e.g., "abcdef")
326
+ * - Looks up by decoded project number
327
+ * 3. Project name (e.g., "my-project", "fix-stuff")
395
328
  * - Looks up by the name portion of the folder (after the prefix)
396
329
  * - Case-insensitive matching
397
330
  *
398
331
  * Note: For ambiguity detection (multiple projects with same name), use
399
332
  * resolveProjectIdentifierWithDetails instead.
400
333
  *
401
- * This function is designed to be extensible for future task-level references
402
- * like "001-project/002-task".
403
- *
404
334
  * @param rafDir - The RAF directory containing project folders
405
335
  * @param identifier - The identifier to resolve
406
336
  * @returns The full project path or null if not found (or ambiguous)