rafcode 2.5.1 → 3.2.1

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 (585) hide show
  1. package/.claude/settings.local.json +2 -1
  2. package/CLAUDE.md +7 -345
  3. package/RAF/{aaaabn-dependencies-watchdog/plans/02-update-planning-prompts.md → 13-dependencies-watchdog/plans/2-update-planning-prompts.md} +1 -1
  4. package/RAF/{aaaabn-dependencies-watchdog/plans/03-parse-dependencies-update-state.md → 13-dependencies-watchdog/plans/3-parse-dependencies-update-state.md} +1 -1
  5. package/RAF/{aaaabn-dependencies-watchdog/plans/04-implement-dependency-checking-in-do.md → 13-dependencies-watchdog/plans/4-implement-dependency-checking-in-do.md} +1 -1
  6. package/RAF/{aaaabn-dependencies-watchdog/plans/05-update-execution-prompts.md → 13-dependencies-watchdog/plans/5-update-execution-prompts.md} +1 -1
  7. package/RAF/{aaaabn-dependencies-watchdog/plans/06-add-tests.md → 13-dependencies-watchdog/plans/6-add-tests.md} +1 -1
  8. package/RAF/{aaaabr-decision-vault/plans/02-integrate-commit-into-plan.md → 17-decision-vault/plans/2-integrate-commit-into-plan.md} +1 -1
  9. package/RAF/{aaaabr-decision-vault/plans/03-add-tests-for-planning-commit.md → 17-decision-vault/plans/3-add-tests-for-planning-commit.md} +1 -1
  10. package/RAF/{aaaabt-verbose-chronicle/plans/04-commit-verification-before-halt.md → 19-verbose-chronicle/plans/4-commit-verification-before-halt.md} +1 -1
  11. package/RAF/{aaaacu-worktree-weaver/plans/02-worktree-plan-command.md → 20-worktree-weaver/plans/2-worktree-plan-command.md} +1 -1
  12. package/RAF/{aaaacu-worktree-weaver/plans/03-worktree-do-command.md → 20-worktree-weaver/plans/3-worktree-do-command.md} +1 -1
  13. package/RAF/{aaaacu-worktree-weaver/plans/04-auto-merge-and-cleanup.md → 20-worktree-weaver/plans/4-auto-merge-and-cleanup.md} +1 -1
  14. package/RAF/{aaaacu-worktree-weaver/plans/05-worktree-tests.md → 20-worktree-weaver/plans/5-worktree-tests.md} +1 -1
  15. package/RAF/{aaaacu-worktree-weaver/plans/06-update-documentation.md → 20-worktree-weaver/plans/6-update-documentation.md} +1 -1
  16. package/RAF/{aaaacv-trim-the-fat/plans/03-commit-artifacts-on-amend.md → 21-trim-the-fat/plans/3-commit-artifacts-on-amend.md} +1 -1
  17. package/RAF/{aaaacv-trim-the-fat/plans/04-worktree-aware-exit-messages.md → 21-trim-the-fat/plans/4-worktree-aware-exit-messages.md} +1 -1
  18. package/RAF/{aaaacw-prune-cycle/plans/02-cleanup-worktree-on-success.md → 22-prune-cycle/plans/2-cleanup-worktree-on-success.md} +1 -1
  19. package/RAF/{aaaacw-prune-cycle/plans/03-amend-recreate-worktree.md → 22-prune-cycle/plans/3-amend-recreate-worktree.md} +1 -1
  20. package/RAF/{aaaacx-epoch-shift/plans/02-update-pattern-matching.md → 23-epoch-shift/plans/2-update-pattern-matching.md} +1 -1
  21. package/RAF/{aaaacx-epoch-shift/plans/03-update-tests.md → 23-epoch-shift/plans/3-update-tests.md} +1 -1
  22. package/RAF/{aaaacx-epoch-shift/plans/04-update-documentation.md → 23-epoch-shift/plans/4-update-documentation.md} +1 -1
  23. package/RAF/{ahmpro-merge-guardian/plans/003-worktree-pr-creation.md → 24-merge-guardian/plans/3-worktree-pr-creation.md} +1 -1
  24. package/RAF/{ahmpro-merge-guardian/plans/004-post-execution-picker.md → 24-merge-guardian/plans/4-post-execution-picker.md} +1 -1
  25. package/RAF/{ahnbcu-letterjam/plans/02-update-tests.md → 25-letterjam/plans/2-update-tests.md} +1 -1
  26. package/RAF/{ahnbcu-letterjam/plans/03-migrate-command.md → 25-letterjam/plans/3-migrate-command.md} +1 -1
  27. package/RAF/{ahnbcu-letterjam/plans/04-update-documentation.md → 25-letterjam/plans/4-update-documentation.md} +1 -1
  28. package/RAF/{ahnwrk-worktree-weaver/plans/04-fix-pr-description.md → 26-worktree-weaver/plans/4-fix-pr-description.md} +1 -1
  29. package/RAF/{ahrren-turbo-finder/plans/02-medium-effort-do.md → 27-turbo-finder/plans/2-medium-effort-do.md} +1 -1
  30. package/RAF/{ahslfe-config-wizard/plans/02-refactor-codebase-to-use-config.md → 28-config-wizard/plans/2-refactor-codebase-to-use-config.md} +1 -1
  31. package/RAF/{ahslfe-config-wizard/plans/03-create-config-documentation.md → 28-config-wizard/plans/3-create-config-documentation.md} +1 -1
  32. package/RAF/{ahslfe-config-wizard/plans/04-implement-raf-config-command.md → 28-config-wizard/plans/4-implement-raf-config-command.md} +1 -1
  33. package/RAF/{ahslfe-config-wizard/plans/05-update-claude-md.md → 28-config-wizard/plans/5-update-claude-md.md} +1 -1
  34. package/RAF/{ahstvo-token-tracker/plans/03-unify-stream-json-execution.md → 29-token-tracker/plans/3-unify-stream-json-execution.md} +1 -1
  35. package/RAF/{ahstvo-token-tracker/plans/04-token-tracking-cost-calculation.md → 29-token-tracker/plans/4-token-tracking-cost-calculation.md} +1 -1
  36. package/RAF/{ahstvo-token-tracker/plans/05-token-cost-console-reporting.md → 29-token-tracker/plans/5-token-cost-console-reporting.md} +1 -1
  37. package/RAF/{ahstvo-token-tracker/plans/06-runtime-verbose-toggle.md → 29-token-tracker/plans/6-runtime-verbose-toggle.md} +1 -1
  38. package/RAF/{ahtahs-token-reaper/plans/02-accumulate-usage-in-retry-loop.md → 30-token-reaper/plans/2-accumulate-usage-in-retry-loop.md} +1 -1
  39. package/RAF/{ahtahs-token-reaper/plans/03-per-attempt-display-formatting.md → 30-token-reaper/plans/3-per-attempt-display-formatting.md} +1 -1
  40. package/RAF/{ahvrih-rate-forge/plans/03-rate-limit-estimation.md → 31-rate-forge/plans/3-rate-limit-estimation.md} +1 -1
  41. package/RAF/{ahvrih-rate-forge/plans/06-sync-readme-with-codebase.md → 31-rate-forge/plans/6-sync-readme-with-codebase.md} +1 -1
  42. package/RAF/{ahvrih-rate-forge/plans/08-plan-execution-metadata.md → 31-rate-forge/plans/8-plan-execution-metadata.md} +1 -1
  43. package/RAF/{ahwidh-quick-fix-gremlin/plans/06-sync-worktree-branch-before-execution.md → 32-quick-fix-gremlin/plans/6-sync-worktree-branch-before-execution.md} +1 -1
  44. package/RAF/{ahwqwq-model-whisperer/plans/03-add-plan-resume-flag.md → 33-model-whisperer/plans/3-add-plan-resume-flag.md} +1 -1
  45. package/RAF/{ahwvrz-legacy-sunset/plans/02-fix-resume-worktree-resolution.md → 34-legacy-sunset/plans/2-fix-resume-worktree-resolution.md} +1 -1
  46. package/RAF/{ahwzmc-echo-forge/plans/03-update-readme.md → 35-echo-forge/plans/3-update-readme.md} +1 -1
  47. package/RAF/37-flux-weave/decisions.md +22 -0
  48. package/RAF/37-flux-weave/input.md +4 -0
  49. package/RAF/37-flux-weave/outcomes/1-numeric-project-ids.md +32 -0
  50. package/RAF/37-flux-weave/outcomes/2-numeric-task-ids.md +34 -0
  51. package/RAF/37-flux-weave/outcomes/3-amend-commit-without-new-plans.md +23 -0
  52. package/RAF/37-flux-weave/outcomes/4-auto-detect-existing-project.md +30 -0
  53. package/RAF/37-flux-weave/plans/1-numeric-project-ids.md +75 -0
  54. package/RAF/37-flux-weave/plans/2-numeric-task-ids.md +65 -0
  55. package/RAF/37-flux-weave/plans/3-amend-commit-without-new-plans.md +54 -0
  56. package/RAF/37-flux-weave/plans/4-auto-detect-existing-project.md +52 -0
  57. package/RAF/38-dual-wielder/decisions.md +44 -0
  58. package/RAF/38-dual-wielder/input.md +13 -0
  59. package/RAF/38-dual-wielder/outcomes/1-config-schema-provider-types.md +47 -0
  60. package/RAF/38-dual-wielder/outcomes/2-abstract-cli-runner.md +33 -0
  61. package/RAF/38-dual-wielder/outcomes/3-implement-codex-runner.md +38 -0
  62. package/RAF/38-dual-wielder/outcomes/4-update-prompts-llm-agnostic.md +50 -0
  63. package/RAF/38-dual-wielder/outcomes/5-update-readme-docs.md +33 -0
  64. package/RAF/38-dual-wielder/outcomes/6-do-unified-project-scanning.md +25 -0
  65. package/RAF/38-dual-wielder/outcomes/7-fix-plan-amend-automode.md +28 -0
  66. package/RAF/38-dual-wielder/outcomes/8-e2e-test-codex-provider.md +139 -0
  67. package/RAF/38-dual-wielder/plans/1-config-schema-provider-types.md +90 -0
  68. package/RAF/38-dual-wielder/plans/2-abstract-cli-runner.md +76 -0
  69. package/RAF/38-dual-wielder/plans/3-implement-codex-runner.md +94 -0
  70. package/RAF/38-dual-wielder/plans/4-update-prompts-llm-agnostic.md +70 -0
  71. package/RAF/38-dual-wielder/plans/5-update-readme-docs.md +52 -0
  72. package/RAF/38-dual-wielder/plans/6-do-unified-project-scanning.md +40 -0
  73. package/RAF/38-dual-wielder/plans/7-fix-plan-amend-automode.md +51 -0
  74. package/RAF/38-dual-wielder/plans/8-e2e-test-codex-provider.md +95 -0
  75. package/RAF/39-pathless-rover/decisions.md +16 -0
  76. package/RAF/39-pathless-rover/input.md +2 -0
  77. package/RAF/39-pathless-rover/outcomes/1-fix-codex-stream-renderer.md +21 -0
  78. package/RAF/39-pathless-rover/outcomes/2-wire-provider-flag.md +28 -0
  79. package/RAF/39-pathless-rover/outcomes/3-remove-worktree-flag-do.md +41 -0
  80. package/RAF/39-pathless-rover/outcomes/4-remove-worktree-flag-plan-amend.md +30 -0
  81. package/RAF/39-pathless-rover/outcomes/5-update-prompts-and-docs.md +26 -0
  82. package/RAF/39-pathless-rover/plans/1-fix-codex-stream-renderer.md +43 -0
  83. package/RAF/39-pathless-rover/plans/2-wire-provider-flag.md +48 -0
  84. package/RAF/39-pathless-rover/plans/3-remove-worktree-flag-do.md +41 -0
  85. package/RAF/39-pathless-rover/plans/4-remove-worktree-flag-plan-amend.md +43 -0
  86. package/RAF/39-pathless-rover/plans/5-update-prompts-and-docs.md +31 -0
  87. package/RAF/40-numeric-order-fix/decisions.md +7 -0
  88. package/RAF/40-numeric-order-fix/input.md +19 -0
  89. package/RAF/40-numeric-order-fix/outcomes/1-fix-numeric-sort-order.md +18 -0
  90. package/RAF/40-numeric-order-fix/outcomes/2-add-npm-keywords.md +10 -0
  91. package/RAF/40-numeric-order-fix/plans/1-fix-numeric-sort-order.md +48 -0
  92. package/RAF/40-numeric-order-fix/plans/2-add-npm-keywords.md +23 -0
  93. package/README.md +62 -18
  94. package/dist/commands/config.js +7 -7
  95. package/dist/commands/config.js.map +1 -1
  96. package/dist/commands/do.d.ts.map +1 -1
  97. package/dist/commands/do.js +51 -230
  98. package/dist/commands/do.js.map +1 -1
  99. package/dist/commands/plan.d.ts.map +1 -1
  100. package/dist/commands/plan.js +96 -147
  101. package/dist/commands/plan.js.map +1 -1
  102. package/dist/commands/status.js +1 -1
  103. package/dist/commands/status.js.map +1 -1
  104. package/dist/core/claude-runner.d.ts +19 -116
  105. package/dist/core/claude-runner.d.ts.map +1 -1
  106. package/dist/core/claude-runner.js +20 -173
  107. package/dist/core/claude-runner.js.map +1 -1
  108. package/dist/core/codex-runner.d.ts +41 -0
  109. package/dist/core/codex-runner.d.ts.map +1 -0
  110. package/dist/core/codex-runner.js +271 -0
  111. package/dist/core/codex-runner.js.map +1 -0
  112. package/dist/core/completion-detector.d.ts +47 -0
  113. package/dist/core/completion-detector.d.ts.map +1 -0
  114. package/dist/core/completion-detector.js +143 -0
  115. package/dist/core/completion-detector.js.map +1 -0
  116. package/dist/core/failure-analyzer.d.ts +1 -1
  117. package/dist/core/failure-analyzer.js +10 -10
  118. package/dist/core/failure-analyzer.js.map +1 -1
  119. package/dist/core/project-manager.d.ts.map +1 -1
  120. package/dist/core/project-manager.js +2 -2
  121. package/dist/core/project-manager.js.map +1 -1
  122. package/dist/core/pull-request.d.ts +4 -4
  123. package/dist/core/pull-request.js +13 -13
  124. package/dist/core/pull-request.js.map +1 -1
  125. package/dist/core/runner-factory.d.ts +12 -0
  126. package/dist/core/runner-factory.d.ts.map +1 -0
  127. package/dist/core/runner-factory.js +30 -0
  128. package/dist/core/runner-factory.js.map +1 -0
  129. package/dist/core/runner-interface.d.ts +14 -0
  130. package/dist/core/runner-interface.d.ts.map +1 -0
  131. package/dist/core/runner-interface.js +2 -0
  132. package/dist/core/runner-interface.js.map +1 -0
  133. package/dist/core/runner-types.d.ts +73 -0
  134. package/dist/core/runner-types.d.ts.map +1 -0
  135. package/dist/core/runner-types.js +2 -0
  136. package/dist/core/runner-types.js.map +1 -0
  137. package/dist/core/shutdown-handler.d.ts +8 -4
  138. package/dist/core/shutdown-handler.d.ts.map +1 -1
  139. package/dist/core/shutdown-handler.js +14 -8
  140. package/dist/core/shutdown-handler.js.map +1 -1
  141. package/dist/core/state-derivation.d.ts +2 -2
  142. package/dist/core/state-derivation.d.ts.map +1 -1
  143. package/dist/core/state-derivation.js +12 -15
  144. package/dist/core/state-derivation.js.map +1 -1
  145. package/dist/core/worktree.d.ts +1 -1
  146. package/dist/core/worktree.d.ts.map +1 -1
  147. package/dist/core/worktree.js +14 -16
  148. package/dist/core/worktree.js.map +1 -1
  149. package/dist/index.js +1 -1
  150. package/dist/index.js.map +1 -1
  151. package/dist/parsers/codex-stream-renderer.d.ts +48 -0
  152. package/dist/parsers/codex-stream-renderer.d.ts.map +1 -0
  153. package/dist/parsers/codex-stream-renderer.js +158 -0
  154. package/dist/parsers/codex-stream-renderer.js.map +1 -0
  155. package/dist/parsers/output-parser.d.ts +2 -2
  156. package/dist/parsers/output-parser.js +2 -2
  157. package/dist/parsers/stream-renderer.d.ts +1 -1
  158. package/dist/parsers/stream-renderer.js +1 -1
  159. package/dist/prompts/amend.d.ts +1 -2
  160. package/dist/prompts/amend.d.ts.map +1 -1
  161. package/dist/prompts/amend.js +8 -9
  162. package/dist/prompts/amend.js.map +1 -1
  163. package/dist/prompts/execution.js +2 -2
  164. package/dist/prompts/execution.js.map +1 -1
  165. package/dist/prompts/planning.d.ts +1 -1
  166. package/dist/prompts/planning.d.ts.map +1 -1
  167. package/dist/prompts/planning.js +14 -15
  168. package/dist/prompts/planning.js.map +1 -1
  169. package/dist/types/config.d.ts +21 -1
  170. package/dist/types/config.d.ts.map +1 -1
  171. package/dist/types/config.js +16 -0
  172. package/dist/types/config.js.map +1 -1
  173. package/dist/ui/project-picker.d.ts.map +1 -1
  174. package/dist/ui/project-picker.js.map +1 -1
  175. package/dist/utils/config.d.ts +24 -6
  176. package/dist/utils/config.d.ts.map +1 -1
  177. package/dist/utils/config.js +155 -15
  178. package/dist/utils/config.js.map +1 -1
  179. package/dist/utils/name-generator.d.ts +2 -2
  180. package/dist/utils/name-generator.js +9 -9
  181. package/dist/utils/name-generator.js.map +1 -1
  182. package/dist/utils/paths.d.ts +32 -51
  183. package/dist/utils/paths.d.ts.map +1 -1
  184. package/dist/utils/paths.js +121 -150
  185. package/dist/utils/paths.js.map +1 -1
  186. package/dist/utils/token-tracker.d.ts +2 -2
  187. package/dist/utils/token-tracker.js +4 -4
  188. package/dist/utils/token-tracker.js.map +1 -1
  189. package/dist/utils/validation.d.ts.map +1 -1
  190. package/dist/utils/validation.js +7 -10
  191. package/dist/utils/validation.js.map +1 -1
  192. package/package.json +7 -2
  193. package/src/commands/config.ts +7 -7
  194. package/src/commands/do.ts +53 -265
  195. package/src/commands/plan.ts +102 -155
  196. package/src/commands/status.ts +1 -1
  197. package/src/core/claude-runner.ts +33 -277
  198. package/src/core/codex-runner.ts +326 -0
  199. package/src/core/completion-detector.ts +177 -0
  200. package/src/core/failure-analyzer.ts +10 -10
  201. package/src/core/project-manager.ts +2 -1
  202. package/src/core/pull-request.ts +13 -13
  203. package/src/core/runner-factory.ts +35 -0
  204. package/src/core/runner-interface.ts +14 -0
  205. package/src/core/runner-types.ts +75 -0
  206. package/src/core/shutdown-handler.ts +17 -10
  207. package/src/core/state-derivation.ts +12 -15
  208. package/src/core/worktree.ts +14 -16
  209. package/src/index.ts +1 -1
  210. package/src/parsers/codex-stream-renderer.ts +210 -0
  211. package/src/parsers/output-parser.ts +2 -2
  212. package/src/parsers/stream-renderer.ts +1 -1
  213. package/src/prompts/amend.ts +7 -10
  214. package/src/prompts/config-docs.md +8 -8
  215. package/src/prompts/execution.ts +2 -2
  216. package/src/prompts/planning.ts +14 -16
  217. package/src/types/config.ts +39 -1
  218. package/src/ui/project-picker.ts +1 -0
  219. package/src/utils/config.ts +170 -14
  220. package/src/utils/name-generator.ts +9 -9
  221. package/src/utils/paths.ts +123 -159
  222. package/src/utils/token-tracker.ts +4 -4
  223. package/src/utils/validation.ts +7 -10
  224. package/tests/unit/commit-planning-artifacts-worktree.test.ts +14 -14
  225. package/tests/unit/commit-planning-artifacts.test.ts +40 -40
  226. package/tests/unit/config.test.ts +8 -8
  227. package/tests/unit/dependency-integration.test.ts +96 -96
  228. package/tests/unit/do-blocked-tasks.test.ts +1 -1
  229. package/tests/unit/do-command.test.ts +36 -36
  230. package/tests/unit/do-rerun.test.ts +1 -1
  231. package/tests/unit/execution-prompt.test.ts +62 -62
  232. package/tests/unit/git-stash.test.ts +4 -4
  233. package/tests/unit/paths.test.ts +135 -249
  234. package/tests/unit/plan-command.test.ts +103 -103
  235. package/tests/unit/planning-prompt.test.ts +3 -3
  236. package/tests/unit/project-manager.test.ts +9 -10
  237. package/tests/unit/project-picker.test.ts +74 -74
  238. package/tests/unit/pull-request.test.ts +3 -3
  239. package/tests/unit/state-derivation.test.ts +144 -144
  240. package/tests/unit/status-command.test.ts +71 -103
  241. package/tests/unit/worktree.test.ts +32 -33
  242. /package/RAF/{aaaaab-raf-task-improvements → 1-raf-task-improvements}/input.md +0 -0
  243. /package/RAF/{aaaaab-raf-task-improvements/outcomes/01-add-decisions-folder.md → 1-raf-task-improvements/outcomes/1-add-decisions-folder.md} +0 -0
  244. /package/RAF/{aaaaab-raf-task-improvements/outcomes/02-fix-write-error-on-shutdown.md → 1-raf-task-improvements/outcomes/2-fix-write-error-on-shutdown.md} +0 -0
  245. /package/RAF/{aaaaab-raf-task-improvements/outcomes/03-stash-changes-on-failure.md → 1-raf-task-improvements/outcomes/3-stash-changes-on-failure.md} +0 -0
  246. /package/RAF/{aaaaab-raf-task-improvements/outcomes/04-add-project-name-to-commits.md → 1-raf-task-improvements/outcomes/4-add-project-name-to-commits.md} +0 -0
  247. /package/RAF/{aaaaab-raf-task-improvements/outcomes/05-add-running-time-display.md → 1-raf-task-improvements/outcomes/5-add-running-time-display.md} +0 -0
  248. /package/RAF/{aaaaab-raf-task-improvements/outcomes/06-add-task-name-to-logs.md → 1-raf-task-improvements/outcomes/6-add-task-name-to-logs.md} +0 -0
  249. /package/RAF/{aaaaab-raf-task-improvements/outcomes/07-show-model-at-task-start.md → 1-raf-task-improvements/outcomes/7-show-model-at-task-start.md} +0 -0
  250. /package/RAF/{aaaaab-raf-task-improvements/outcomes/09-remove-editor-placeholder-text.md → 1-raf-task-improvements/outcomes/9-remove-editor-placeholder-text.md} +0 -0
  251. /package/RAF/{aaaaab-raf-task-improvements → 1-raf-task-improvements}/outcomes/SUMMARY.md +0 -0
  252. /package/RAF/{aaaaab-raf-task-improvements/plans/01-add-decisions-folder.md → 1-raf-task-improvements/plans/1-add-decisions-folder.md} +0 -0
  253. /package/RAF/{aaaaab-raf-task-improvements/plans/02-fix-write-error-on-shutdown.md → 1-raf-task-improvements/plans/2-fix-write-error-on-shutdown.md} +0 -0
  254. /package/RAF/{aaaaab-raf-task-improvements/plans/03-stash-changes-on-failure.md → 1-raf-task-improvements/plans/3-stash-changes-on-failure.md} +0 -0
  255. /package/RAF/{aaaaab-raf-task-improvements/plans/04-add-project-name-to-commits.md → 1-raf-task-improvements/plans/4-add-project-name-to-commits.md} +0 -0
  256. /package/RAF/{aaaaab-raf-task-improvements/plans/05-add-running-time-display.md → 1-raf-task-improvements/plans/5-add-running-time-display.md} +0 -0
  257. /package/RAF/{aaaaab-raf-task-improvements/plans/06-add-task-name-to-logs.md → 1-raf-task-improvements/plans/6-add-task-name-to-logs.md} +0 -0
  258. /package/RAF/{aaaaab-raf-task-improvements/plans/09-remove-editor-placeholder-text.md → 1-raf-task-improvements/plans/9-remove-editor-placeholder-text.md} +0 -0
  259. /package/RAF/{aaaabk-outcome-marker-fallback → 10-outcome-marker-fallback}/decisions.md +0 -0
  260. /package/RAF/{aaaabk-outcome-marker-fallback → 10-outcome-marker-fallback}/input.md +0 -0
  261. /package/RAF/{aaaabk-outcome-marker-fallback/outcomes/01-outcome-file-marker-fallback.md → 10-outcome-marker-fallback/outcomes/1-outcome-file-marker-fallback.md} +0 -0
  262. /package/RAF/{aaaabk-outcome-marker-fallback/outcomes/02-creative-project-naming.md → 10-outcome-marker-fallback/outcomes/2-creative-project-naming.md} +0 -0
  263. /package/RAF/{aaaabk-outcome-marker-fallback/plans/01-outcome-file-marker-fallback.md → 10-outcome-marker-fallback/plans/1-outcome-file-marker-fallback.md} +0 -0
  264. /package/RAF/{aaaabk-outcome-marker-fallback/plans/02-creative-project-naming.md → 10-outcome-marker-fallback/plans/2-creative-project-naming.md} +0 -0
  265. /package/RAF/{aaaabl-do-task-in-commit → 11-do-task-in-commit}/decisions.md +0 -0
  266. /package/RAF/{aaaabl-do-task-in-commit → 11-do-task-in-commit}/input.md +0 -0
  267. /package/RAF/{aaaabl-do-task-in-commit/outcomes/01-update-execution-prompt.md → 11-do-task-in-commit/outcomes/1-update-execution-prompt.md} +0 -0
  268. /package/RAF/{aaaabl-do-task-in-commit/outcomes/02-update-tests.md → 11-do-task-in-commit/outcomes/2-update-tests.md} +0 -0
  269. /package/RAF/{aaaabl-do-task-in-commit/outcomes/03-update-documentation.md → 11-do-task-in-commit/outcomes/3-update-documentation.md} +0 -0
  270. /package/RAF/{aaaabl-do-task-in-commit/plans/01-update-execution-prompt.md → 11-do-task-in-commit/plans/1-update-execution-prompt.md} +0 -0
  271. /package/RAF/{aaaabl-do-task-in-commit/plans/02-update-tests.md → 11-do-task-in-commit/plans/2-update-tests.md} +0 -0
  272. /package/RAF/{aaaabl-do-task-in-commit/plans/03-update-documentation.md → 11-do-task-in-commit/plans/3-update-documentation.md} +0 -0
  273. /package/RAF/{aaaabm-name-picker-buffet → 12-name-picker-buffet}/decisions.md +0 -0
  274. /package/RAF/{aaaabm-name-picker-buffet → 12-name-picker-buffet}/input.md +0 -0
  275. /package/RAF/{aaaabm-name-picker-buffet/outcomes/01-name-picker-for-raf-plan.md → 12-name-picker-buffet/outcomes/1-name-picker-for-raf-plan.md} +0 -0
  276. /package/RAF/{aaaabm-name-picker-buffet/outcomes/02-interactive-project-picker-for-raf-do.md → 12-name-picker-buffet/outcomes/2-interactive-project-picker-for-raf-do.md} +0 -0
  277. /package/RAF/{aaaabm-name-picker-buffet/outcomes/03-raf-status-truncation.md → 12-name-picker-buffet/outcomes/3-raf-status-truncation.md} +0 -0
  278. /package/RAF/{aaaabm-name-picker-buffet/outcomes/04-failure-reason-details.md → 12-name-picker-buffet/outcomes/4-failure-reason-details.md} +0 -0
  279. /package/RAF/{aaaabm-name-picker-buffet/outcomes/05-remove-raf-commits.md → 12-name-picker-buffet/outcomes/5-remove-raf-commits.md} +0 -0
  280. /package/RAF/{aaaabm-name-picker-buffet/outcomes/06-update-execution-prompt-for-commits.md → 12-name-picker-buffet/outcomes/6-update-execution-prompt-for-commits.md} +0 -0
  281. /package/RAF/{aaaabm-name-picker-buffet/outcomes/07-fix-plan-mode-user-prompt.md → 12-name-picker-buffet/outcomes/7-fix-plan-mode-user-prompt.md} +0 -0
  282. /package/RAF/{aaaabm-name-picker-buffet/outcomes/08-add-auto-flag-for-plan-mode.md → 12-name-picker-buffet/outcomes/8-add-auto-flag-for-plan-mode.md} +0 -0
  283. /package/RAF/{aaaabm-name-picker-buffet/plans/01-name-picker-for-raf-plan.md → 12-name-picker-buffet/plans/1-name-picker-for-raf-plan.md} +0 -0
  284. /package/RAF/{aaaabm-name-picker-buffet/plans/02-interactive-project-picker-for-raf-do.md → 12-name-picker-buffet/plans/2-interactive-project-picker-for-raf-do.md} +0 -0
  285. /package/RAF/{aaaabm-name-picker-buffet/plans/03-raf-status-truncation.md → 12-name-picker-buffet/plans/3-raf-status-truncation.md} +0 -0
  286. /package/RAF/{aaaabm-name-picker-buffet/plans/04-failure-reason-details.md → 12-name-picker-buffet/plans/4-failure-reason-details.md} +0 -0
  287. /package/RAF/{aaaabm-name-picker-buffet/plans/05-remove-raf-commits.md → 12-name-picker-buffet/plans/5-remove-raf-commits.md} +0 -0
  288. /package/RAF/{aaaabm-name-picker-buffet/plans/06-update-execution-prompt-for-commits.md → 12-name-picker-buffet/plans/6-update-execution-prompt-for-commits.md} +0 -0
  289. /package/RAF/{aaaabm-name-picker-buffet/plans/07-fix-plan-mode-user-prompt.md → 12-name-picker-buffet/plans/7-fix-plan-mode-user-prompt.md} +0 -0
  290. /package/RAF/{aaaabm-name-picker-buffet/plans/08-add-auto-flag-for-plan-mode.md → 12-name-picker-buffet/plans/8-add-auto-flag-for-plan-mode.md} +0 -0
  291. /package/RAF/{aaaabn-dependencies-watchdog → 13-dependencies-watchdog}/decisions.md +0 -0
  292. /package/RAF/{aaaabn-dependencies-watchdog → 13-dependencies-watchdog}/input.md +0 -0
  293. /package/RAF/{aaaabn-dependencies-watchdog/outcomes/01-define-dependency-syntax.md → 13-dependencies-watchdog/outcomes/1-define-dependency-syntax.md} +0 -0
  294. /package/RAF/{aaaabn-dependencies-watchdog/outcomes/02-update-planning-prompts.md → 13-dependencies-watchdog/outcomes/2-update-planning-prompts.md} +0 -0
  295. /package/RAF/{aaaabn-dependencies-watchdog/outcomes/03-parse-dependencies-update-state.md → 13-dependencies-watchdog/outcomes/3-parse-dependencies-update-state.md} +0 -0
  296. /package/RAF/{aaaabn-dependencies-watchdog/outcomes/04-implement-dependency-checking-in-do.md → 13-dependencies-watchdog/outcomes/4-implement-dependency-checking-in-do.md} +0 -0
  297. /package/RAF/{aaaabn-dependencies-watchdog/outcomes/05-update-execution-prompts.md → 13-dependencies-watchdog/outcomes/5-update-execution-prompts.md} +0 -0
  298. /package/RAF/{aaaabn-dependencies-watchdog/outcomes/06-add-tests.md → 13-dependencies-watchdog/outcomes/6-add-tests.md} +0 -0
  299. /package/RAF/{aaaabn-dependencies-watchdog/outcomes/07-add-act-alias.md → 13-dependencies-watchdog/outcomes/7-add-act-alias.md} +0 -0
  300. /package/RAF/{aaaabn-dependencies-watchdog/outcomes/08-add-exit-message.md → 13-dependencies-watchdog/outcomes/8-add-exit-message.md} +0 -0
  301. /package/RAF/{aaaabn-dependencies-watchdog/plans/01-define-dependency-syntax.md → 13-dependencies-watchdog/plans/1-define-dependency-syntax.md} +0 -0
  302. /package/RAF/{aaaabn-dependencies-watchdog/plans/07-add-act-alias.md → 13-dependencies-watchdog/plans/7-add-act-alias.md} +0 -0
  303. /package/RAF/{aaaabn-dependencies-watchdog/plans/08-add-exit-message.md → 13-dependencies-watchdog/plans/8-add-exit-message.md} +0 -0
  304. /package/RAF/{aaaabo-watchdog → 14-watchdog}/decisions.md +0 -0
  305. /package/RAF/{aaaabo-watchdog → 14-watchdog}/input.md +0 -0
  306. /package/RAF/{aaaabo-watchdog/outcomes/01-amend-flag-position.md → 14-watchdog/outcomes/1-amend-flag-position.md} +0 -0
  307. /package/RAF/{aaaabo-watchdog/outcomes/02-details-only-on-failure.md → 14-watchdog/outcomes/2-details-only-on-failure.md} +0 -0
  308. /package/RAF/{aaaabo-watchdog/plans/01-amend-flag-position.md → 14-watchdog/plans/1-amend-flag-position.md} +0 -0
  309. /package/RAF/{aaaabo-watchdog/plans/02-details-only-on-failure.md → 14-watchdog/plans/2-details-only-on-failure.md} +0 -0
  310. /package/RAF/{aaaabp-name-lottery → 15-name-lottery}/decisions.md +0 -0
  311. /package/RAF/{aaaabp-name-lottery → 15-name-lottery}/input.md +0 -0
  312. /package/RAF/{aaaabp-name-lottery/outcomes/01-auto-pick-project-name.md → 15-name-lottery/outcomes/1-auto-pick-project-name.md} +0 -0
  313. /package/RAF/{aaaabp-name-lottery/outcomes/02-mention-plan-files-in-commit.md → 15-name-lottery/outcomes/2-mention-plan-files-in-commit.md} +0 -0
  314. /package/RAF/{aaaabp-name-lottery/outcomes/03-fix-input-md-in-amend-flow.md → 15-name-lottery/outcomes/3-fix-input-md-in-amend-flow.md} +0 -0
  315. /package/RAF/{aaaabp-name-lottery/plans/01-auto-pick-project-name.md → 15-name-lottery/plans/1-auto-pick-project-name.md} +0 -0
  316. /package/RAF/{aaaabp-name-lottery/plans/02-mention-plan-files-in-commit.md → 15-name-lottery/plans/2-mention-plan-files-in-commit.md} +0 -0
  317. /package/RAF/{aaaabp-name-lottery/plans/03-fix-input-md-in-amend-flow.md → 15-name-lottery/plans/3-fix-input-md-in-amend-flow.md} +0 -0
  318. /package/RAF/{aaaabq-planning-scalpel → 16-planning-scalpel}/decisions.md +0 -0
  319. /package/RAF/{aaaabq-planning-scalpel → 16-planning-scalpel}/input.md +0 -0
  320. /package/RAF/{aaaabq-planning-scalpel/outcomes/01-update-git-commit-instructions.md → 16-planning-scalpel/outcomes/1-update-git-commit-instructions.md} +0 -0
  321. /package/RAF/{aaaabq-planning-scalpel/plans/01-update-git-commit-instructions.md → 16-planning-scalpel/plans/1-update-git-commit-instructions.md} +0 -0
  322. /package/RAF/{aaaabr-decision-vault → 17-decision-vault}/decisions.md +0 -0
  323. /package/RAF/{aaaabr-decision-vault → 17-decision-vault}/input.md +0 -0
  324. /package/RAF/{aaaabr-decision-vault/outcomes/01-create-git-commit-utility.md → 17-decision-vault/outcomes/1-create-git-commit-utility.md} +0 -0
  325. /package/RAF/{aaaabr-decision-vault/outcomes/02-integrate-commit-into-plan.md → 17-decision-vault/outcomes/2-integrate-commit-into-plan.md} +0 -0
  326. /package/RAF/{aaaabr-decision-vault/outcomes/03-add-tests-for-planning-commit.md → 17-decision-vault/outcomes/3-add-tests-for-planning-commit.md} +0 -0
  327. /package/RAF/{aaaabr-decision-vault/plans/01-create-git-commit-utility.md → 17-decision-vault/plans/1-create-git-commit-utility.md} +0 -0
  328. /package/RAF/{aaaabs-workflow-forge → 18-workflow-forge}/decisions.md +0 -0
  329. /package/RAF/{aaaabs-workflow-forge → 18-workflow-forge}/input.md +0 -0
  330. /package/RAF/{aaaabs-workflow-forge/outcomes/01-add-task-number-progress.md → 18-workflow-forge/outcomes/1-add-task-number-progress.md} +0 -0
  331. /package/RAF/{aaaabs-workflow-forge/outcomes/02-update-plan-do-prompts.md → 18-workflow-forge/outcomes/2-update-plan-do-prompts.md} +0 -0
  332. /package/RAF/{aaaabs-workflow-forge/plans/01-add-task-number-progress.md → 18-workflow-forge/plans/1-add-task-number-progress.md} +0 -0
  333. /package/RAF/{aaaabs-workflow-forge/plans/02-update-plan-do-prompts.md → 18-workflow-forge/plans/2-update-plan-do-prompts.md} +0 -0
  334. /package/RAF/{aaaabt-verbose-chronicle → 19-verbose-chronicle}/decisions.md +0 -0
  335. /package/RAF/{aaaabt-verbose-chronicle → 19-verbose-chronicle}/input.md +0 -0
  336. /package/RAF/{aaaabt-verbose-chronicle/outcomes/01-amend-iteration-references.md → 19-verbose-chronicle/outcomes/1-amend-iteration-references.md} +0 -0
  337. /package/RAF/{aaaabt-verbose-chronicle/outcomes/02-verbose-task-name-display.md → 19-verbose-chronicle/outcomes/2-verbose-task-name-display.md} +0 -0
  338. /package/RAF/{aaaabt-verbose-chronicle/outcomes/03-verbose-streaming-fix.md → 19-verbose-chronicle/outcomes/3-verbose-streaming-fix.md} +0 -0
  339. /package/RAF/{aaaabt-verbose-chronicle/outcomes/04-commit-verification-before-halt.md → 19-verbose-chronicle/outcomes/4-commit-verification-before-halt.md} +0 -0
  340. /package/RAF/{aaaabt-verbose-chronicle/plans/01-amend-iteration-references.md → 19-verbose-chronicle/plans/1-amend-iteration-references.md} +0 -0
  341. /package/RAF/{aaaabt-verbose-chronicle/plans/02-verbose-task-name-display.md → 19-verbose-chronicle/plans/2-verbose-task-name-display.md} +0 -0
  342. /package/RAF/{aaaabt-verbose-chronicle/plans/03-verbose-streaming-fix.md → 19-verbose-chronicle/plans/3-verbose-streaming-fix.md} +0 -0
  343. /package/RAF/{aaaaac-raf-task-improvements-execution → 2-raf-task-improvements-execution}/decisions/DECISIONS.md +0 -0
  344. /package/RAF/{aaaaac-raf-task-improvements-execution → 2-raf-task-improvements-execution}/input.md +0 -0
  345. /package/RAF/{aaaaac-raf-task-improvements-execution/outcomes/01-commit-show-model-at-task-start.md → 2-raf-task-improvements-execution/outcomes/1-commit-show-model-at-task-start.md} +0 -0
  346. /package/RAF/{aaaaac-raf-task-improvements-execution/outcomes/02-delete-skipped-plan.md → 2-raf-task-improvements-execution/outcomes/2-delete-skipped-plan.md} +0 -0
  347. /package/RAF/{aaaaac-raf-task-improvements-execution → 2-raf-task-improvements-execution}/outcomes/SUMMARY.md +0 -0
  348. /package/RAF/{aaaaac-raf-task-improvements-execution/plans/01-commit-show-model-at-task-start.md → 2-raf-task-improvements-execution/plans/1-commit-show-model-at-task-start.md} +0 -0
  349. /package/RAF/{aaaaac-raf-task-improvements-execution/plans/02-delete-skipped-plan.md → 2-raf-task-improvements-execution/plans/2-delete-skipped-plan.md} +0 -0
  350. /package/RAF/{aaaacu-worktree-weaver → 20-worktree-weaver}/decisions.md +0 -0
  351. /package/RAF/{aaaacu-worktree-weaver → 20-worktree-weaver}/input.md +0 -0
  352. /package/RAF/{aaaacu-worktree-weaver/outcomes/01-git-worktree-utilities.md → 20-worktree-weaver/outcomes/1-git-worktree-utilities.md} +0 -0
  353. /package/RAF/{aaaacu-worktree-weaver/outcomes/02-worktree-plan-command.md → 20-worktree-weaver/outcomes/2-worktree-plan-command.md} +0 -0
  354. /package/RAF/{aaaacu-worktree-weaver/outcomes/03-worktree-do-command.md → 20-worktree-weaver/outcomes/3-worktree-do-command.md} +0 -0
  355. /package/RAF/{aaaacu-worktree-weaver/outcomes/04-auto-merge-and-cleanup.md → 20-worktree-weaver/outcomes/4-auto-merge-and-cleanup.md} +0 -0
  356. /package/RAF/{aaaacu-worktree-weaver/outcomes/05-worktree-tests.md → 20-worktree-weaver/outcomes/5-worktree-tests.md} +0 -0
  357. /package/RAF/{aaaacu-worktree-weaver/outcomes/06-update-documentation.md → 20-worktree-weaver/outcomes/6-update-documentation.md} +0 -0
  358. /package/RAF/{aaaacu-worktree-weaver/plans/01-git-worktree-utilities.md → 20-worktree-weaver/plans/1-git-worktree-utilities.md} +0 -0
  359. /package/RAF/{aaaacv-trim-the-fat → 21-trim-the-fat}/decisions.md +0 -0
  360. /package/RAF/{aaaacv-trim-the-fat → 21-trim-the-fat}/input.md +0 -0
  361. /package/RAF/{aaaacv-trim-the-fat/outcomes/01-add-worktree-support-to-status.md → 21-trim-the-fat/outcomes/1-add-worktree-support-to-status.md} +0 -0
  362. /package/RAF/{aaaacv-trim-the-fat/outcomes/02-remove-multi-project-from-do.md → 21-trim-the-fat/outcomes/2-remove-multi-project-from-do.md} +0 -0
  363. /package/RAF/{aaaacv-trim-the-fat/outcomes/03-commit-artifacts-on-amend.md → 21-trim-the-fat/outcomes/3-commit-artifacts-on-amend.md} +0 -0
  364. /package/RAF/{aaaacv-trim-the-fat/outcomes/04-worktree-aware-exit-messages.md → 21-trim-the-fat/outcomes/4-worktree-aware-exit-messages.md} +0 -0
  365. /package/RAF/{aaaacv-trim-the-fat/plans/01-add-worktree-support-to-status.md → 21-trim-the-fat/plans/1-add-worktree-support-to-status.md} +0 -0
  366. /package/RAF/{aaaacv-trim-the-fat/plans/02-remove-multi-project-from-do.md → 21-trim-the-fat/plans/2-remove-multi-project-from-do.md} +0 -0
  367. /package/RAF/{aaaacw-prune-cycle → 22-prune-cycle}/decisions.md +0 -0
  368. /package/RAF/{aaaacw-prune-cycle → 22-prune-cycle}/input.md +0 -0
  369. /package/RAF/{aaaacw-prune-cycle/outcomes/01-create-worktree-from-branch.md → 22-prune-cycle/outcomes/1-create-worktree-from-branch.md} +0 -0
  370. /package/RAF/{aaaacw-prune-cycle/outcomes/02-cleanup-worktree-on-success.md → 22-prune-cycle/outcomes/2-cleanup-worktree-on-success.md} +0 -0
  371. /package/RAF/{aaaacw-prune-cycle/outcomes/03-amend-recreate-worktree.md → 22-prune-cycle/outcomes/3-amend-recreate-worktree.md} +0 -0
  372. /package/RAF/{aaaacw-prune-cycle/plans/01-create-worktree-from-branch.md → 22-prune-cycle/plans/1-create-worktree-from-branch.md} +0 -0
  373. /package/RAF/{aaaacx-epoch-shift → 23-epoch-shift}/decisions.md +0 -0
  374. /package/RAF/{aaaacx-epoch-shift → 23-epoch-shift}/input.md +0 -0
  375. /package/RAF/{aaaacx-epoch-shift/outcomes/01-epoch-id-generation.md → 23-epoch-shift/outcomes/1-epoch-id-generation.md} +0 -0
  376. /package/RAF/{aaaacx-epoch-shift/outcomes/02-update-pattern-matching.md → 23-epoch-shift/outcomes/2-update-pattern-matching.md} +0 -0
  377. /package/RAF/{aaaacx-epoch-shift/outcomes/03-update-tests.md → 23-epoch-shift/outcomes/3-update-tests.md} +0 -0
  378. /package/RAF/{aaaacx-epoch-shift/outcomes/04-update-documentation.md → 23-epoch-shift/outcomes/4-update-documentation.md} +0 -0
  379. /package/RAF/{aaaacx-epoch-shift/plans/01-epoch-id-generation.md → 23-epoch-shift/plans/1-epoch-id-generation.md} +0 -0
  380. /package/RAF/{ahmpro-merge-guardian → 24-merge-guardian}/decisions.md +0 -0
  381. /package/RAF/{ahmpro-merge-guardian → 24-merge-guardian}/input.md +0 -0
  382. /package/RAF/{ahmpro-merge-guardian/outcomes/001-fix-amend-worktree-commit.md → 24-merge-guardian/outcomes/1-fix-amend-worktree-commit.md} +0 -0
  383. /package/RAF/{ahmpro-merge-guardian/outcomes/002-base36-task-ids.md → 24-merge-guardian/outcomes/2-base36-task-ids.md} +0 -0
  384. /package/RAF/{ahmpro-merge-guardian/outcomes/003-worktree-pr-creation.md → 24-merge-guardian/outcomes/3-worktree-pr-creation.md} +0 -0
  385. /package/RAF/{ahmpro-merge-guardian/outcomes/004-post-execution-picker.md → 24-merge-guardian/outcomes/4-post-execution-picker.md} +0 -0
  386. /package/RAF/{ahmpro-merge-guardian/plans/001-fix-amend-worktree-commit.md → 24-merge-guardian/plans/1-fix-amend-worktree-commit.md} +0 -0
  387. /package/RAF/{ahmpro-merge-guardian/plans/002-base36-task-ids.md → 24-merge-guardian/plans/2-base36-task-ids.md} +0 -0
  388. /package/RAF/{ahnbcu-letterjam → 25-letterjam}/decisions.md +0 -0
  389. /package/RAF/{ahnbcu-letterjam → 25-letterjam}/input.md +0 -0
  390. /package/RAF/{ahnbcu-letterjam/outcomes/01-base26-encoding.md → 25-letterjam/outcomes/1-base26-encoding.md} +0 -0
  391. /package/RAF/{ahnbcu-letterjam/outcomes/02-update-tests.md → 25-letterjam/outcomes/2-update-tests.md} +0 -0
  392. /package/RAF/{ahnbcu-letterjam/outcomes/03-migrate-command.md → 25-letterjam/outcomes/3-migrate-command.md} +0 -0
  393. /package/RAF/{ahnbcu-letterjam/outcomes/04-update-documentation.md → 25-letterjam/outcomes/4-update-documentation.md} +0 -0
  394. /package/RAF/{ahnbcu-letterjam/plans/01-base26-encoding.md → 25-letterjam/plans/1-base26-encoding.md} +0 -0
  395. /package/RAF/{ahnwrk-worktree-weaver → 26-worktree-weaver}/decisions.md +0 -0
  396. /package/RAF/{ahnwrk-worktree-weaver → 26-worktree-weaver}/input.md +0 -0
  397. /package/RAF/{ahnwrk-worktree-weaver/outcomes/01-remove-co-authored-by.md → 26-worktree-weaver/outcomes/1-remove-co-authored-by.md} +0 -0
  398. /package/RAF/{ahnwrk-worktree-weaver/outcomes/02-update-task-status-format.md → 26-worktree-weaver/outcomes/2-update-task-status-format.md} +0 -0
  399. /package/RAF/{ahnwrk-worktree-weaver/outcomes/03-worktree-auto-discovery.md → 26-worktree-weaver/outcomes/3-worktree-auto-discovery.md} +0 -0
  400. /package/RAF/{ahnwrk-worktree-weaver/outcomes/04-fix-pr-description.md → 26-worktree-weaver/outcomes/4-fix-pr-description.md} +0 -0
  401. /package/RAF/{ahnwrk-worktree-weaver/plans/01-remove-co-authored-by.md → 26-worktree-weaver/plans/1-remove-co-authored-by.md} +0 -0
  402. /package/RAF/{ahnwrk-worktree-weaver/plans/02-update-task-status-format.md → 26-worktree-weaver/plans/2-update-task-status-format.md} +0 -0
  403. /package/RAF/{ahnwrk-worktree-weaver/plans/03-worktree-auto-discovery.md → 26-worktree-weaver/plans/3-worktree-auto-discovery.md} +0 -0
  404. /package/RAF/{ahrren-turbo-finder → 27-turbo-finder}/decisions.md +0 -0
  405. /package/RAF/{ahrren-turbo-finder → 27-turbo-finder}/input.md +0 -0
  406. /package/RAF/{ahrren-turbo-finder/outcomes/01-worktree-auto-detect.md → 27-turbo-finder/outcomes/1-worktree-auto-detect.md} +0 -0
  407. /package/RAF/{ahrren-turbo-finder/outcomes/02-medium-effort-do.md → 27-turbo-finder/outcomes/2-medium-effort-do.md} +0 -0
  408. /package/RAF/{ahrren-turbo-finder/plans/01-worktree-auto-detect.md → 27-turbo-finder/plans/1-worktree-auto-detect.md} +0 -0
  409. /package/RAF/{ahslfe-config-wizard → 28-config-wizard}/decisions.md +0 -0
  410. /package/RAF/{ahslfe-config-wizard → 28-config-wizard}/input.md +0 -0
  411. /package/RAF/{ahslfe-config-wizard/outcomes/01-define-config-schema.md → 28-config-wizard/outcomes/1-define-config-schema.md} +0 -0
  412. /package/RAF/{ahslfe-config-wizard/outcomes/02-refactor-codebase-to-use-config.md → 28-config-wizard/outcomes/2-refactor-codebase-to-use-config.md} +0 -0
  413. /package/RAF/{ahslfe-config-wizard/outcomes/03-create-config-documentation.md → 28-config-wizard/outcomes/3-create-config-documentation.md} +0 -0
  414. /package/RAF/{ahslfe-config-wizard/outcomes/04-implement-raf-config-command.md → 28-config-wizard/outcomes/4-implement-raf-config-command.md} +0 -0
  415. /package/RAF/{ahslfe-config-wizard/outcomes/05-update-claude-md.md → 28-config-wizard/outcomes/5-update-claude-md.md} +0 -0
  416. /package/RAF/{ahslfe-config-wizard/plans/01-define-config-schema.md → 28-config-wizard/plans/1-define-config-schema.md} +0 -0
  417. /package/RAF/{ahstvo-token-tracker → 29-token-tracker}/decisions.md +0 -0
  418. /package/RAF/{ahstvo-token-tracker → 29-token-tracker}/input.md +0 -0
  419. /package/RAF/{ahstvo-token-tracker/outcomes/01-full-model-id-support.md → 29-token-tracker/outcomes/1-full-model-id-support.md} +0 -0
  420. /package/RAF/{ahstvo-token-tracker/outcomes/02-name-generation-no-session.md → 29-token-tracker/outcomes/2-name-generation-no-session.md} +0 -0
  421. /package/RAF/{ahstvo-token-tracker/outcomes/03-unify-stream-json-execution.md → 29-token-tracker/outcomes/3-unify-stream-json-execution.md} +0 -0
  422. /package/RAF/{ahstvo-token-tracker/outcomes/04-token-tracking-cost-calculation.md → 29-token-tracker/outcomes/4-token-tracking-cost-calculation.md} +0 -0
  423. /package/RAF/{ahstvo-token-tracker/outcomes/05-token-cost-console-reporting.md → 29-token-tracker/outcomes/5-token-cost-console-reporting.md} +0 -0
  424. /package/RAF/{ahstvo-token-tracker/outcomes/06-runtime-verbose-toggle.md → 29-token-tracker/outcomes/6-runtime-verbose-toggle.md} +0 -0
  425. /package/RAF/{ahstvo-token-tracker/outcomes/07-readme-config-docs.md → 29-token-tracker/outcomes/7-readme-config-docs.md} +0 -0
  426. /package/RAF/{ahstvo-token-tracker/plans/01-full-model-id-support.md → 29-token-tracker/plans/1-full-model-id-support.md} +0 -0
  427. /package/RAF/{ahstvo-token-tracker/plans/02-name-generation-no-session.md → 29-token-tracker/plans/2-name-generation-no-session.md} +0 -0
  428. /package/RAF/{ahstvo-token-tracker/plans/07-readme-config-docs.md → 29-token-tracker/plans/7-readme-config-docs.md} +0 -0
  429. /package/RAF/{aaaaad-multi-project-execution → 3-multi-project-execution}/decisions/DECISIONS.md +0 -0
  430. /package/RAF/{aaaaad-multi-project-execution → 3-multi-project-execution}/input.md +0 -0
  431. /package/RAF/{aaaaad-multi-project-execution/outcomes/01-remove-state-json.md → 3-multi-project-execution/outcomes/1-remove-state-json.md} +0 -0
  432. /package/RAF/{aaaaad-multi-project-execution/outcomes/02-update-raf-status.md → 3-multi-project-execution/outcomes/2-update-raf-status.md} +0 -0
  433. /package/RAF/{aaaaad-multi-project-execution/outcomes/03-simplify-git-logic.md → 3-multi-project-execution/outcomes/3-simplify-git-logic.md} +0 -0
  434. /package/RAF/{aaaaad-multi-project-execution/outcomes/04-auto-commit-planning.md → 3-multi-project-execution/outcomes/4-auto-commit-planning.md} +0 -0
  435. /package/RAF/{aaaaad-multi-project-execution/outcomes/05-rerun-failed-tasks.md → 3-multi-project-execution/outcomes/5-rerun-failed-tasks.md} +0 -0
  436. /package/RAF/{aaaaad-multi-project-execution/outcomes/06-multi-project-execution.md → 3-multi-project-execution/outcomes/6-multi-project-execution.md} +0 -0
  437. /package/RAF/{aaaaad-multi-project-execution/outcomes/07-verify-timeout.md → 3-multi-project-execution/outcomes/7-verify-timeout.md} +0 -0
  438. /package/RAF/{aaaaad-multi-project-execution/outcomes/08-move-decisions-file.md → 3-multi-project-execution/outcomes/8-move-decisions-file.md} +0 -0
  439. /package/RAF/{aaaaad-multi-project-execution → 3-multi-project-execution}/outcomes/SUMMARY.md +0 -0
  440. /package/RAF/{aaaaad-multi-project-execution/plans/01-remove-state-json.md → 3-multi-project-execution/plans/1-remove-state-json.md} +0 -0
  441. /package/RAF/{aaaaad-multi-project-execution/plans/02-update-raf-status.md → 3-multi-project-execution/plans/2-update-raf-status.md} +0 -0
  442. /package/RAF/{aaaaad-multi-project-execution/plans/03-simplify-git-logic.md → 3-multi-project-execution/plans/3-simplify-git-logic.md} +0 -0
  443. /package/RAF/{aaaaad-multi-project-execution/plans/04-auto-commit-planning.md → 3-multi-project-execution/plans/4-auto-commit-planning.md} +0 -0
  444. /package/RAF/{aaaaad-multi-project-execution/plans/05-rerun-failed-tasks.md → 3-multi-project-execution/plans/5-rerun-failed-tasks.md} +0 -0
  445. /package/RAF/{aaaaad-multi-project-execution/plans/06-multi-project-execution.md → 3-multi-project-execution/plans/6-multi-project-execution.md} +0 -0
  446. /package/RAF/{aaaaad-multi-project-execution/plans/07-verify-timeout.md → 3-multi-project-execution/plans/7-verify-timeout.md} +0 -0
  447. /package/RAF/{aaaaad-multi-project-execution/plans/08-move-decisions-file.md → 3-multi-project-execution/plans/8-move-decisions-file.md} +0 -0
  448. /package/RAF/{ahtahs-token-reaper → 30-token-reaper}/decisions.md +0 -0
  449. /package/RAF/{ahtahs-token-reaper → 30-token-reaper}/input.md +0 -0
  450. /package/RAF/{ahtahs-token-reaper/outcomes/01-extend-token-tracker-data-model.md → 30-token-reaper/outcomes/1-extend-token-tracker-data-model.md} +0 -0
  451. /package/RAF/{ahtahs-token-reaper/outcomes/02-accumulate-usage-in-retry-loop.md → 30-token-reaper/outcomes/2-accumulate-usage-in-retry-loop.md} +0 -0
  452. /package/RAF/{ahtahs-token-reaper/outcomes/03-per-attempt-display-formatting.md → 30-token-reaper/outcomes/3-per-attempt-display-formatting.md} +0 -0
  453. /package/RAF/{ahtahs-token-reaper/outcomes/04-add-model-name-to-claude-call-logs.md → 30-token-reaper/outcomes/4-add-model-name-to-claude-call-logs.md} +0 -0
  454. /package/RAF/{ahtahs-token-reaper/outcomes/05-handle-invalid-config-in-raf-config.md → 30-token-reaper/outcomes/5-handle-invalid-config-in-raf-config.md} +0 -0
  455. /package/RAF/{ahtahs-token-reaper/outcomes/06-fix-verbose-toggle-timer-display.md → 30-token-reaper/outcomes/6-fix-verbose-toggle-timer-display.md} +0 -0
  456. /package/RAF/{ahtahs-token-reaper/plans/01-extend-token-tracker-data-model.md → 30-token-reaper/plans/1-extend-token-tracker-data-model.md} +0 -0
  457. /package/RAF/{ahtahs-token-reaper/plans/04-add-model-name-to-claude-call-logs.md → 30-token-reaper/plans/4-add-model-name-to-claude-call-logs.md} +0 -0
  458. /package/RAF/{ahtahs-token-reaper/plans/05-handle-invalid-config-in-raf-config.md → 30-token-reaper/plans/5-handle-invalid-config-in-raf-config.md} +0 -0
  459. /package/RAF/{ahtahs-token-reaper/plans/06-fix-verbose-toggle-timer-display.md → 30-token-reaper/plans/6-fix-verbose-toggle-timer-display.md} +0 -0
  460. /package/RAF/{ahvrih-rate-forge → 31-rate-forge}/decisions.md +0 -0
  461. /package/RAF/{ahvrih-rate-forge → 31-rate-forge}/input.md +0 -0
  462. /package/RAF/{ahvrih-rate-forge/outcomes/01-remove-claude-command-config.md → 31-rate-forge/outcomes/1-remove-claude-command-config.md} +0 -0
  463. /package/RAF/{ahvrih-rate-forge/outcomes/02-fix-mixed-attempt-cost.md → 31-rate-forge/outcomes/2-fix-mixed-attempt-cost.md} +0 -0
  464. /package/RAF/{ahvrih-rate-forge/outcomes/03-rate-limit-estimation.md → 31-rate-forge/outcomes/3-rate-limit-estimation.md} +0 -0
  465. /package/RAF/{ahvrih-rate-forge/outcomes/04-show-version-in-do-logs.md → 31-rate-forge/outcomes/4-show-version-in-do-logs.md} +0 -0
  466. /package/RAF/{ahvrih-rate-forge/outcomes/05-sync-main-before-worktree.md → 31-rate-forge/outcomes/5-sync-main-before-worktree.md} +0 -0
  467. /package/RAF/{ahvrih-rate-forge/outcomes/06-sync-readme-with-codebase.md → 31-rate-forge/outcomes/6-sync-readme-with-codebase.md} +0 -0
  468. /package/RAF/{ahvrih-rate-forge/outcomes/07-no-session-persistence.md → 31-rate-forge/outcomes/7-no-session-persistence.md} +0 -0
  469. /package/RAF/{ahvrih-rate-forge/outcomes/08-plan-execution-metadata.md → 31-rate-forge/outcomes/8-plan-execution-metadata.md} +0 -0
  470. /package/RAF/{ahvrih-rate-forge/plans/01-remove-claude-command-config.md → 31-rate-forge/plans/1-remove-claude-command-config.md} +0 -0
  471. /package/RAF/{ahvrih-rate-forge/plans/02-fix-mixed-attempt-cost.md → 31-rate-forge/plans/2-fix-mixed-attempt-cost.md} +0 -0
  472. /package/RAF/{ahvrih-rate-forge/plans/04-show-version-in-do-logs.md → 31-rate-forge/plans/4-show-version-in-do-logs.md} +0 -0
  473. /package/RAF/{ahvrih-rate-forge/plans/05-sync-main-before-worktree.md → 31-rate-forge/plans/5-sync-main-before-worktree.md} +0 -0
  474. /package/RAF/{ahvrih-rate-forge/plans/07-no-session-persistence.md → 31-rate-forge/plans/7-no-session-persistence.md} +0 -0
  475. /package/RAF/{ahwidh-quick-fix-gremlin → 32-quick-fix-gremlin}/decisions.md +0 -0
  476. /package/RAF/{ahwidh-quick-fix-gremlin → 32-quick-fix-gremlin}/input.md +0 -0
  477. /package/RAF/{ahwidh-quick-fix-gremlin/outcomes/01-fix-name-generation-prompt.md → 32-quick-fix-gremlin/outcomes/1-fix-name-generation-prompt.md} +0 -0
  478. /package/RAF/{ahwidh-quick-fix-gremlin/outcomes/02-fix-amend-commit-scope.md → 32-quick-fix-gremlin/outcomes/2-fix-amend-commit-scope.md} +0 -0
  479. /package/RAF/{ahwidh-quick-fix-gremlin/outcomes/03-fix-diverged-main-branch-sync.md → 32-quick-fix-gremlin/outcomes/3-fix-diverged-main-branch-sync.md} +0 -0
  480. /package/RAF/{ahwidh-quick-fix-gremlin/outcomes/04-wire-rate-limit-to-do-command.md → 32-quick-fix-gremlin/outcomes/4-wire-rate-limit-to-do-command.md} +0 -0
  481. /package/RAF/{ahwidh-quick-fix-gremlin/outcomes/05-add-config-get-set-flags.md → 32-quick-fix-gremlin/outcomes/5-add-config-get-set-flags.md} +0 -0
  482. /package/RAF/{ahwidh-quick-fix-gremlin/outcomes/06-sync-worktree-branch-before-execution.md → 32-quick-fix-gremlin/outcomes/6-sync-worktree-branch-before-execution.md} +0 -0
  483. /package/RAF/{ahwidh-quick-fix-gremlin/outcomes/07-update-frontmatter-format.md → 32-quick-fix-gremlin/outcomes/7-update-frontmatter-format.md} +0 -0
  484. /package/RAF/{ahwidh-quick-fix-gremlin/outcomes/08-remove-plan-token-report.md → 32-quick-fix-gremlin/outcomes/8-remove-plan-token-report.md} +0 -0
  485. /package/RAF/{ahwidh-quick-fix-gremlin/plans/01-fix-name-generation-prompt.md → 32-quick-fix-gremlin/plans/1-fix-name-generation-prompt.md} +0 -0
  486. /package/RAF/{ahwidh-quick-fix-gremlin/plans/02-fix-amend-commit-scope.md → 32-quick-fix-gremlin/plans/2-fix-amend-commit-scope.md} +0 -0
  487. /package/RAF/{ahwidh-quick-fix-gremlin/plans/03-fix-diverged-main-branch-sync.md → 32-quick-fix-gremlin/plans/3-fix-diverged-main-branch-sync.md} +0 -0
  488. /package/RAF/{ahwidh-quick-fix-gremlin/plans/04-wire-rate-limit-to-do-command.md → 32-quick-fix-gremlin/plans/4-wire-rate-limit-to-do-command.md} +0 -0
  489. /package/RAF/{ahwidh-quick-fix-gremlin/plans/05-add-config-get-set-flags.md → 32-quick-fix-gremlin/plans/5-add-config-get-set-flags.md} +0 -0
  490. /package/RAF/{ahwidh-quick-fix-gremlin/plans/07-update-frontmatter-format.md → 32-quick-fix-gremlin/plans/7-update-frontmatter-format.md} +0 -0
  491. /package/RAF/{ahwidh-quick-fix-gremlin/plans/08-remove-plan-token-report.md → 32-quick-fix-gremlin/plans/8-remove-plan-token-report.md} +0 -0
  492. /package/RAF/{ahwqwq-model-whisperer → 33-model-whisperer}/decisions.md +0 -0
  493. /package/RAF/{ahwqwq-model-whisperer → 33-model-whisperer}/input.md +0 -0
  494. /package/RAF/{ahwqwq-model-whisperer/outcomes/01-show-model-on-task-line.md → 33-model-whisperer/outcomes/1-show-model-on-task-line.md} +0 -0
  495. /package/RAF/{ahwqwq-model-whisperer/outcomes/02-use-claude-cost-estimation.md → 33-model-whisperer/outcomes/2-use-claude-cost-estimation.md} +0 -0
  496. /package/RAF/{ahwqwq-model-whisperer/outcomes/03-add-plan-resume-flag.md → 33-model-whisperer/outcomes/3-add-plan-resume-flag.md} +0 -0
  497. /package/RAF/{ahwqwq-model-whisperer/plans/01-show-model-on-task-line.md → 33-model-whisperer/plans/1-show-model-on-task-line.md} +0 -0
  498. /package/RAF/{ahwqwq-model-whisperer/plans/02-use-claude-cost-estimation.md → 33-model-whisperer/plans/2-use-claude-cost-estimation.md} +0 -0
  499. /package/RAF/{ahwvrz-legacy-sunset → 34-legacy-sunset}/decisions.md +0 -0
  500. /package/RAF/{ahwvrz-legacy-sunset → 34-legacy-sunset}/input.md +0 -0
  501. /package/RAF/{ahwvrz-legacy-sunset/outcomes/01-remove-migrate-command.md → 34-legacy-sunset/outcomes/1-remove-migrate-command.md} +0 -0
  502. /package/RAF/{ahwvrz-legacy-sunset/outcomes/02-fix-resume-worktree-resolution.md → 34-legacy-sunset/outcomes/2-fix-resume-worktree-resolution.md} +0 -0
  503. /package/RAF/{ahwvrz-legacy-sunset/plans/01-remove-migrate-command.md → 34-legacy-sunset/plans/1-remove-migrate-command.md} +0 -0
  504. /package/RAF/{ahwzmc-echo-forge → 35-echo-forge}/decisions.md +0 -0
  505. /package/RAF/{ahwzmc-echo-forge → 35-echo-forge}/input.md +0 -0
  506. /package/RAF/{ahwzmc-echo-forge/outcomes/01-change-low-effort-default-to-sonnet.md → 35-echo-forge/outcomes/1-change-low-effort-default-to-sonnet.md} +0 -0
  507. /package/RAF/{ahwzmc-echo-forge/outcomes/02-add-no-worktree-flag.md → 35-echo-forge/outcomes/2-add-no-worktree-flag.md} +0 -0
  508. /package/RAF/{ahwzmc-echo-forge/outcomes/03-update-readme.md → 35-echo-forge/outcomes/3-update-readme.md} +0 -0
  509. /package/RAF/{ahwzmc-echo-forge/plans/01-change-low-effort-default-to-sonnet.md → 35-echo-forge/plans/1-change-low-effort-default-to-sonnet.md} +0 -0
  510. /package/RAF/{ahwzmc-echo-forge/plans/02-add-no-worktree-flag.md → 35-echo-forge/plans/2-add-no-worktree-flag.md} +0 -0
  511. /package/RAF/{aifqwf-fix-amend-commit-again → 36-fix-amend-commit-again}/decisions.md +0 -0
  512. /package/RAF/{aifqwf-fix-amend-commit-again → 36-fix-amend-commit-again}/input.md +0 -0
  513. /package/RAF/{aifqwf-fix-amend-commit-again/outcomes/01-update-effort-mapping-defaults.md → 36-fix-amend-commit-again/outcomes/1-update-effort-mapping-defaults.md} +0 -0
  514. /package/RAF/{aifqwf-fix-amend-commit-again/outcomes/02-fix-amend-worktree-commit.md → 36-fix-amend-commit-again/outcomes/2-fix-amend-worktree-commit.md} +0 -0
  515. /package/RAF/{aifqwf-fix-amend-commit-again/plans/01-update-effort-mapping-defaults.md → 36-fix-amend-commit-again/plans/1-update-effort-mapping-defaults.md} +0 -0
  516. /package/RAF/{aifqwf-fix-amend-commit-again/plans/02-fix-amend-worktree-commit.md → 36-fix-amend-commit-again/plans/2-fix-amend-worktree-commit.md} +0 -0
  517. /package/RAF/{aaaaae-task-naming-optimization → 4-task-naming-optimization}/decisions.md +0 -0
  518. /package/RAF/{aaaaae-task-naming-optimization → 4-task-naming-optimization}/input.md +0 -0
  519. /package/RAF/{aaaaae-task-naming-optimization/outcomes/01-remove-summary-file.md → 4-task-naming-optimization/outcomes/1-remove-summary-file.md} +0 -0
  520. /package/RAF/{aaaaae-task-naming-optimization/outcomes/02-base36-project-numbering.md → 4-task-naming-optimization/outcomes/2-base36-project-numbering.md} +0 -0
  521. /package/RAF/{aaaaae-task-naming-optimization/outcomes/03-improve-haiku-prompt.md → 4-task-naming-optimization/outcomes/3-improve-haiku-prompt.md} +0 -0
  522. /package/RAF/{aaaaae-task-naming-optimization → 4-task-naming-optimization}/outcomes/SUMMARY.md +0 -0
  523. /package/RAF/{aaaaae-task-naming-optimization/plans/01-remove-summary-file.md → 4-task-naming-optimization/plans/1-remove-summary-file.md} +0 -0
  524. /package/RAF/{aaaaae-task-naming-optimization/plans/02-base36-project-numbering.md → 4-task-naming-optimization/plans/2-base36-project-numbering.md} +0 -0
  525. /package/RAF/{aaaaae-task-naming-optimization/plans/03-improve-haiku-prompt.md → 4-task-naming-optimization/plans/3-improve-haiku-prompt.md} +0 -0
  526. /package/RAF/{aaaaaf-task-naming-improvements → 5-task-naming-improvements}/decisions.md +0 -0
  527. /package/RAF/{aaaaaf-task-naming-improvements → 5-task-naming-improvements}/input.md +0 -0
  528. /package/RAF/{aaaaaf-task-naming-improvements/outcomes/01-enhance-identifier-resolution.md → 5-task-naming-improvements/outcomes/1-enhance-identifier-resolution.md} +0 -0
  529. /package/RAF/{aaaaaf-task-naming-improvements/outcomes/02-add-identifier-support-to-status.md → 5-task-naming-improvements/outcomes/2-add-identifier-support-to-status.md} +0 -0
  530. /package/RAF/{aaaaaf-task-naming-improvements/outcomes/03-update-do-for-full-folder-names.md → 5-task-naming-improvements/outcomes/3-update-do-for-full-folder-names.md} +0 -0
  531. /package/RAF/{aaaaaf-task-naming-improvements/outcomes/04-implement-amend-flag-for-plan.md → 5-task-naming-improvements/outcomes/4-implement-amend-flag-for-plan.md} +0 -0
  532. /package/RAF/{aaaaaf-task-naming-improvements/outcomes/05-commit-outcomes-on-complete.md → 5-task-naming-improvements/outcomes/5-commit-outcomes-on-complete.md} +0 -0
  533. /package/RAF/{aaaaaf-task-naming-improvements/outcomes/06-update-execution-prompt-commit-schema.md → 5-task-naming-improvements/outcomes/6-update-execution-prompt-commit-schema.md} +0 -0
  534. /package/RAF/{aaaaaf-task-naming-improvements/outcomes/07-allow-pending-task-amendments.md → 5-task-naming-improvements/outcomes/7-allow-pending-task-amendments.md} +0 -0
  535. /package/RAF/{aaaaaf-task-naming-improvements/outcomes/08-fix-timeout-label.md → 5-task-naming-improvements/outcomes/8-fix-timeout-label.md} +0 -0
  536. /package/RAF/{aaaaaf-task-naming-improvements/plans/01-enhance-identifier-resolution.md → 5-task-naming-improvements/plans/1-enhance-identifier-resolution.md} +0 -0
  537. /package/RAF/{aaaaaf-task-naming-improvements/plans/02-add-identifier-support-to-status.md → 5-task-naming-improvements/plans/2-add-identifier-support-to-status.md} +0 -0
  538. /package/RAF/{aaaaaf-task-naming-improvements/plans/03-update-do-for-full-folder-names.md → 5-task-naming-improvements/plans/3-update-do-for-full-folder-names.md} +0 -0
  539. /package/RAF/{aaaaaf-task-naming-improvements/plans/04-implement-amend-flag-for-plan.md → 5-task-naming-improvements/plans/4-implement-amend-flag-for-plan.md} +0 -0
  540. /package/RAF/{aaaaaf-task-naming-improvements/plans/05-commit-outcomes-on-complete.md → 5-task-naming-improvements/plans/5-commit-outcomes-on-complete.md} +0 -0
  541. /package/RAF/{aaaaaf-task-naming-improvements/plans/06-update-execution-prompt-commit-schema.md → 5-task-naming-improvements/plans/6-update-execution-prompt-commit-schema.md} +0 -0
  542. /package/RAF/{aaaaaf-task-naming-improvements/plans/07-allow-pending-task-amendments.md → 5-task-naming-improvements/plans/7-allow-pending-task-amendments.md} +0 -0
  543. /package/RAF/{aaaaaf-task-naming-improvements/plans/08-fix-timeout-label.md → 5-task-naming-improvements/plans/8-fix-timeout-label.md} +0 -0
  544. /package/RAF/{aaaaag-fix-double-summary-headers → 6-fix-double-summary-headers}/decisions.md +0 -0
  545. /package/RAF/{aaaaag-fix-double-summary-headers → 6-fix-double-summary-headers}/input.md +0 -0
  546. /package/RAF/{aaaaag-fix-double-summary-headers/outcomes/01-fix-double-summary-headers.md → 6-fix-double-summary-headers/outcomes/1-fix-double-summary-headers.md} +0 -0
  547. /package/RAF/{aaaaag-fix-double-summary-headers/outcomes/02-update-readme-for-npm.md → 6-fix-double-summary-headers/outcomes/2-update-readme-for-npm.md} +0 -0
  548. /package/RAF/{aaaaag-fix-double-summary-headers/outcomes/03-npm-publish-instructions.md → 6-fix-double-summary-headers/outcomes/3-npm-publish-instructions.md} +0 -0
  549. /package/RAF/{aaaaag-fix-double-summary-headers/outcomes/04-flexible-project-lookup.md → 6-fix-double-summary-headers/outcomes/4-flexible-project-lookup.md} +0 -0
  550. /package/RAF/{aaaaag-fix-double-summary-headers/plans/01-fix-double-summary-headers.md → 6-fix-double-summary-headers/plans/1-fix-double-summary-headers.md} +0 -0
  551. /package/RAF/{aaaaag-fix-double-summary-headers/plans/02-update-readme-for-npm.md → 6-fix-double-summary-headers/plans/2-update-readme-for-npm.md} +0 -0
  552. /package/RAF/{aaaaag-fix-double-summary-headers/plans/03-npm-publish-instructions.md → 6-fix-double-summary-headers/plans/3-npm-publish-instructions.md} +0 -0
  553. /package/RAF/{aaaaag-fix-double-summary-headers/plans/04-flexible-project-lookup.md → 6-fix-double-summary-headers/plans/4-flexible-project-lookup.md} +0 -0
  554. /package/RAF/{aaaaah-improve-outcome-format → 7-improve-outcome-format}/decisions.md +0 -0
  555. /package/RAF/{aaaaah-improve-outcome-format → 7-improve-outcome-format}/input.md +0 -0
  556. /package/RAF/{aaaaah-improve-outcome-format/outcomes/01-update-execution-prompt.md → 7-improve-outcome-format/outcomes/1-update-execution-prompt.md} +0 -0
  557. /package/RAF/{aaaaah-improve-outcome-format/outcomes/02-update-state-derivation.md → 7-improve-outcome-format/outcomes/2-update-state-derivation.md} +0 -0
  558. /package/RAF/{aaaaah-improve-outcome-format/outcomes/03-update-do-command-outcome-handling.md → 7-improve-outcome-format/outcomes/3-update-do-command-outcome-handling.md} +0 -0
  559. /package/RAF/{aaaaah-improve-outcome-format/outcomes/04-implement-failure-analysis.md → 7-improve-outcome-format/outcomes/4-implement-failure-analysis.md} +0 -0
  560. /package/RAF/{aaaaah-improve-outcome-format/outcomes/05-update-documentation.md → 7-improve-outcome-format/outcomes/5-update-documentation.md} +0 -0
  561. /package/RAF/{aaaaah-improve-outcome-format/plans/01-update-execution-prompt.md → 7-improve-outcome-format/plans/1-update-execution-prompt.md} +0 -0
  562. /package/RAF/{aaaaah-improve-outcome-format/plans/02-update-state-derivation.md → 7-improve-outcome-format/plans/2-update-state-derivation.md} +0 -0
  563. /package/RAF/{aaaaah-improve-outcome-format/plans/03-update-do-command-outcome-handling.md → 7-improve-outcome-format/plans/3-update-do-command-outcome-handling.md} +0 -0
  564. /package/RAF/{aaaaah-improve-outcome-format/plans/04-implement-failure-analysis.md → 7-improve-outcome-format/plans/4-implement-failure-analysis.md} +0 -0
  565. /package/RAF/{aaaaah-improve-outcome-format/plans/05-update-documentation.md → 7-improve-outcome-format/plans/5-update-documentation.md} +0 -0
  566. /package/RAF/{aaaaai-beautiful-do → 8-beautiful-do}/decisions.md +0 -0
  567. /package/RAF/{aaaaai-beautiful-do → 8-beautiful-do}/input.md +0 -0
  568. /package/RAF/{aaaaai-beautiful-do/outcomes/01-terminal-symbols.md → 8-beautiful-do/outcomes/1-terminal-symbols.md} +0 -0
  569. /package/RAF/{aaaaai-beautiful-do/outcomes/02-refactor-do-output.md → 8-beautiful-do/outcomes/2-refactor-do-output.md} +0 -0
  570. /package/RAF/{aaaaai-beautiful-do/outcomes/03-refactor-status-output.md → 8-beautiful-do/outcomes/3-refactor-status-output.md} +0 -0
  571. /package/RAF/{aaaaai-beautiful-do/outcomes/04-simplify-logger.md → 8-beautiful-do/outcomes/4-simplify-logger.md} +0 -0
  572. /package/RAF/{aaaaai-beautiful-do/outcomes/05-add-tests.md → 8-beautiful-do/outcomes/5-add-tests.md} +0 -0
  573. /package/RAF/{aaaaai-beautiful-do/plans/01-terminal-symbols.md → 8-beautiful-do/plans/1-terminal-symbols.md} +0 -0
  574. /package/RAF/{aaaaai-beautiful-do/plans/02-refactor-do-output.md → 8-beautiful-do/plans/2-refactor-do-output.md} +0 -0
  575. /package/RAF/{aaaaai-beautiful-do/plans/03-refactor-status-output.md → 8-beautiful-do/plans/3-refactor-status-output.md} +0 -0
  576. /package/RAF/{aaaaai-beautiful-do/plans/04-simplify-logger.md → 8-beautiful-do/plans/4-simplify-logger.md} +0 -0
  577. /package/RAF/{aaaaai-beautiful-do/plans/05-add-tests.md → 8-beautiful-do/plans/5-add-tests.md} +0 -0
  578. /package/RAF/{aaaaaj-system-promt-ammend → 9-system-promt-ammend}/decisions.md +0 -0
  579. /package/RAF/{aaaaaj-system-promt-ammend → 9-system-promt-ammend}/input.md +0 -0
  580. /package/RAF/{aaaaaj-system-promt-ammend/outcomes/01-model-override.md → 9-system-promt-ammend/outcomes/1-model-override.md} +0 -0
  581. /package/RAF/{aaaaaj-system-promt-ammend/outcomes/02-system-prompt-append.md → 9-system-promt-ammend/outcomes/2-system-prompt-append.md} +0 -0
  582. /package/RAF/{aaaaaj-system-promt-ammend/outcomes/03-retry-context.md → 9-system-promt-ammend/outcomes/3-retry-context.md} +0 -0
  583. /package/RAF/{aaaaaj-system-promt-ammend/plans/01-model-override.md → 9-system-promt-ammend/plans/1-model-override.md} +0 -0
  584. /package/RAF/{aaaaaj-system-promt-ammend/plans/02-system-prompt-append.md → 9-system-promt-ammend/plans/2-system-prompt-append.md} +0 -0
  585. /package/RAF/{aaaaaj-system-promt-ammend/plans/03-retry-context.md → 9-system-promt-ammend/plans/3-retry-context.md} +0 -0
@@ -0,0 +1,271 @@
1
+ import * as pty from 'node-pty';
2
+ import { execSync, spawn } from 'node:child_process';
3
+ import { logger } from '../utils/logger.js';
4
+ import { renderCodexStreamEvent } from '../parsers/codex-stream-renderer.js';
5
+ import { getModel } from '../utils/config.js';
6
+ import { createCompletionDetector } from './completion-detector.js';
7
+ function getCodexPath() {
8
+ try {
9
+ return execSync('which codex', { encoding: 'utf-8' }).trim();
10
+ }
11
+ catch {
12
+ throw new Error('Codex CLI not found. Please ensure it is installed and in your PATH.');
13
+ }
14
+ }
15
+ /**
16
+ * Combine system prompt and user message into a single prompt for Codex.
17
+ * Codex CLI does not support a separate --system-prompt flag, so the system
18
+ * instructions are prepended to the user message.
19
+ */
20
+ function buildCombinedPrompt(systemPrompt, userMessage) {
21
+ return `[System Instructions]\n\n${systemPrompt}\n\n[User Request]\n\n${userMessage}`;
22
+ }
23
+ const CONTEXT_OVERFLOW_PATTERNS = [
24
+ /context length exceeded/i,
25
+ /token limit/i,
26
+ /maximum context/i,
27
+ /context window/i,
28
+ ];
29
+ export class CodexRunner {
30
+ activeProcess = null;
31
+ killed = false;
32
+ model;
33
+ constructor(config = {}) {
34
+ this.model = config.model ?? getModel('execute', 'codex');
35
+ }
36
+ /**
37
+ * Run Codex interactively with stdin/stdout passthrough via PTY.
38
+ * Spawns `codex -m <model> <combined_prompt>` (no `exec` subcommand).
39
+ */
40
+ async runInteractive(systemPrompt, userMessage, options = {}) {
41
+ const { cwd = process.cwd() } = options;
42
+ return new Promise((resolve) => {
43
+ const combinedPrompt = buildCombinedPrompt(systemPrompt, userMessage);
44
+ const args = ['-m', this.model, combinedPrompt];
45
+ logger.debug(`Starting interactive Codex session with model: ${this.model}`);
46
+ this.activeProcess = pty.spawn(getCodexPath(), args, {
47
+ name: 'xterm-256color',
48
+ cols: process.stdout.columns ?? 80,
49
+ rows: process.stdout.rows ?? 24,
50
+ cwd,
51
+ env: process.env,
52
+ });
53
+ // Set raw mode to pass through all input
54
+ if (process.stdin.isTTY) {
55
+ process.stdin.setRawMode(true);
56
+ }
57
+ process.stdin.resume();
58
+ // Pipe input to Codex
59
+ const onData = (data) => {
60
+ if (this.activeProcess && !this.killed) {
61
+ this.activeProcess.write(data.toString());
62
+ }
63
+ };
64
+ process.stdin.on('data', onData);
65
+ // Store disposables for proper cleanup
66
+ const disposables = [];
67
+ // Pipe output to stdout
68
+ disposables.push(this.activeProcess.onData((data) => {
69
+ process.stdout.write(data);
70
+ }));
71
+ disposables.push(this.activeProcess.onExit(({ exitCode }) => {
72
+ // Cleanup stdin
73
+ process.stdin.off('data', onData);
74
+ if (process.stdin.isTTY) {
75
+ process.stdin.setRawMode(false);
76
+ }
77
+ process.stdin.pause();
78
+ // Dispose all event listeners to prevent FD leaks
79
+ for (const disposable of disposables) {
80
+ try {
81
+ disposable.dispose();
82
+ }
83
+ catch {
84
+ // Ignore disposal errors
85
+ }
86
+ }
87
+ // Ensure PTY is fully cleaned up
88
+ if (this.activeProcess) {
89
+ try {
90
+ this.activeProcess.kill();
91
+ }
92
+ catch {
93
+ // Ignore - process may already be dead
94
+ }
95
+ this.activeProcess = null;
96
+ }
97
+ if (this.killed) {
98
+ resolve(130); // SIGINT exit code
99
+ }
100
+ else {
101
+ resolve(exitCode);
102
+ }
103
+ }));
104
+ });
105
+ }
106
+ /**
107
+ * Session resume is not supported by Codex CLI.
108
+ */
109
+ async runResume(_options = {}) {
110
+ throw new Error('Session resume is not supported by Codex CLI');
111
+ }
112
+ /**
113
+ * Run Codex non-interactively and collect output.
114
+ * Tool display is suppressed (non-verbose mode).
115
+ */
116
+ async run(prompt, options = {}) {
117
+ return this._runExec(prompt, options, false);
118
+ }
119
+ /**
120
+ * Run Codex non-interactively with verbose output to stdout.
121
+ * Uses `codex exec --full-auto --json` to get JSONL streaming events.
122
+ */
123
+ async runVerbose(prompt, options = {}) {
124
+ return this._runExec(prompt, options, true);
125
+ }
126
+ /**
127
+ * Internal unified execution method using `codex exec --full-auto --json`.
128
+ * Both run() and runVerbose() delegate to this method.
129
+ */
130
+ async _runExec(prompt, options, verbose) {
131
+ const { timeout = 60, cwd = process.cwd(), outcomeFilePath, commitContext, verboseCheck } = options;
132
+ const validatedTimeout = Number(timeout) > 0 ? Number(timeout) : 60;
133
+ const timeoutMs = validatedTimeout * 60 * 1000;
134
+ const shouldDisplay = verboseCheck ?? (() => verbose);
135
+ return new Promise((resolve) => {
136
+ let output = '';
137
+ let stderr = '';
138
+ let timedOut = false;
139
+ let contextOverflow = false;
140
+ const codexPath = getCodexPath();
141
+ logger.debug(`Starting Codex execution session (json, verbose=${verbose}) with model: ${this.model}`);
142
+ logger.debug(`Prompt length: ${prompt.length}, timeout: ${timeoutMs}ms, cwd: ${cwd}`);
143
+ logger.debug(`Codex path: ${codexPath}`);
144
+ logger.debug('Spawning process...');
145
+ const proc = spawn(codexPath, [
146
+ 'exec',
147
+ '--full-auto',
148
+ '--json',
149
+ '--ephemeral',
150
+ '-m',
151
+ this.model,
152
+ prompt,
153
+ ], {
154
+ cwd,
155
+ env: process.env,
156
+ stdio: ['ignore', 'pipe', 'pipe'],
157
+ });
158
+ // Track this process
159
+ this.activeProcess = proc;
160
+ logger.debug('Process spawned');
161
+ // Set up timeout
162
+ const timeoutHandle = setTimeout(() => {
163
+ timedOut = true;
164
+ logger.warn('Codex session timed out');
165
+ proc.kill('SIGTERM');
166
+ }, timeoutMs);
167
+ // Set up completion detection (stdout marker + outcome file polling)
168
+ const completionDetector = createCompletionDetector(() => proc.kill('SIGTERM'), outcomeFilePath, commitContext);
169
+ // Buffer for incomplete JSONL lines
170
+ let lineBuffer = '';
171
+ let dataReceived = false;
172
+ proc.stdout.on('data', (data) => {
173
+ if (!dataReceived) {
174
+ logger.debug('First data chunk received');
175
+ dataReceived = true;
176
+ }
177
+ lineBuffer += data.toString();
178
+ // Process complete lines from the JSONL stream
179
+ let newlineIndex;
180
+ while ((newlineIndex = lineBuffer.indexOf('\n')) !== -1) {
181
+ const line = lineBuffer.substring(0, newlineIndex);
182
+ lineBuffer = lineBuffer.substring(newlineIndex + 1);
183
+ const rendered = renderCodexStreamEvent(line);
184
+ if (rendered.textContent) {
185
+ output += rendered.textContent;
186
+ // Check for completion marker to start grace period
187
+ completionDetector.checkOutput(output);
188
+ // Check for context overflow
189
+ for (const pattern of CONTEXT_OVERFLOW_PATTERNS) {
190
+ if (pattern.test(rendered.textContent)) {
191
+ contextOverflow = true;
192
+ logger.warn('Context overflow detected');
193
+ proc.kill('SIGTERM');
194
+ break;
195
+ }
196
+ }
197
+ }
198
+ if (shouldDisplay() && rendered.display) {
199
+ process.stdout.write(rendered.display);
200
+ }
201
+ }
202
+ });
203
+ // Collect stderr
204
+ proc.stderr.on('data', (data) => {
205
+ stderr += data.toString();
206
+ });
207
+ proc.on('close', (exitCode) => {
208
+ // Process any remaining data in the line buffer
209
+ if (lineBuffer.trim()) {
210
+ const rendered = renderCodexStreamEvent(lineBuffer);
211
+ if (rendered.textContent) {
212
+ output += rendered.textContent;
213
+ }
214
+ if (shouldDisplay() && rendered.display) {
215
+ process.stdout.write(rendered.display);
216
+ }
217
+ }
218
+ clearTimeout(timeoutHandle);
219
+ completionDetector.cleanup();
220
+ this.activeProcess = null;
221
+ logger.debug(`Codex exited with code ${exitCode}, output length: ${output.length}, timedOut: ${timedOut}, contextOverflow: ${contextOverflow}`);
222
+ if (stderr) {
223
+ logger.debug(`Codex stderr: ${stderr}`);
224
+ }
225
+ resolve({
226
+ output,
227
+ exitCode: exitCode ?? (this.killed ? 130 : 1),
228
+ timedOut,
229
+ contextOverflow,
230
+ // Codex does not provide usage data in the same format — omit gracefully
231
+ usageData: undefined,
232
+ });
233
+ });
234
+ });
235
+ }
236
+ /**
237
+ * Kill the active Codex process gracefully.
238
+ */
239
+ kill() {
240
+ if (this.activeProcess) {
241
+ this.killed = true;
242
+ // Send Ctrl+C first for graceful shutdown (only for PTY processes)
243
+ try {
244
+ if (typeof this.activeProcess.write === 'function') {
245
+ this.activeProcess.write('\x03');
246
+ }
247
+ }
248
+ catch {
249
+ // Ignore write errors - process may already be closing
250
+ }
251
+ // Force kill after 5 seconds if still running
252
+ setTimeout(() => {
253
+ if (this.activeProcess) {
254
+ try {
255
+ this.activeProcess.kill();
256
+ }
257
+ catch {
258
+ // Ignore kill errors - process may already be dead
259
+ }
260
+ }
261
+ }, 5000);
262
+ }
263
+ }
264
+ /**
265
+ * Check if a process is currently running.
266
+ */
267
+ isRunning() {
268
+ return this.activeProcess !== null;
269
+ }
270
+ }
271
+ //# sourceMappingURL=codex-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-runner.js","sourceRoot":"","sources":["../../src/core/codex-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,SAAS,YAAY;IACnB,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;IAC1F,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,YAAoB,EAAE,WAAmB;IACpE,OAAO,4BAA4B,YAAY,yBAAyB,WAAW,EAAE,CAAC;AACxF,CAAC;AAED,MAAM,yBAAyB,GAAG;IAChC,0BAA0B;IAC1B,cAAc;IACd,kBAAkB;IAClB,iBAAiB;CAClB,CAAC;AAEF,MAAM,OAAO,WAAW;IACd,aAAa,GAAoB,IAAI,CAAC;IACtC,M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,QAAQ,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC7C,QAAQ;oBACR,eAAe;oBACf,yEAAyE;oBACzE,SAAS,EAAE,SAAS;iBACrB,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YAEnB,mEAAmE;YACnE,IAAI,CAAC;gBACH,IAAI,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;oBACnD,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;gBACnC,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,uDAAuD;YACzD,CAAC;YAED,8CAA8C;YAC9C,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;oBACvB,IAAI,CAAC;wBACH,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;oBAC5B,CAAC;oBAAC,MAAM,CAAC;wBACP,mDAAmD;oBACrD,CAAC;gBACH,CAAC;YACH,CAAC,EAAE,IAAI,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAED;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,aAAa,KAAK,IAAI,CAAC;IACrC,CAAC;CACF"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Grace period in ms after completion marker is detected before terminating.
3
+ * Allows time for git commit operations to complete.
4
+ */
5
+ export declare const COMPLETION_GRACE_PERIOD_MS = 60000;
6
+ /**
7
+ * Hard maximum grace period in ms. If the commit hasn't landed by this point,
8
+ * the process is killed regardless.
9
+ */
10
+ export declare const COMPLETION_HARD_MAX_MS = 180000;
11
+ /**
12
+ * Interval in ms for polling commit verification after the initial grace period expires.
13
+ */
14
+ export declare const COMMIT_POLL_INTERVAL_MS = 10000;
15
+ /**
16
+ * Interval in ms for polling the outcome file for completion markers.
17
+ */
18
+ export declare const OUTCOME_POLL_INTERVAL_MS = 5000;
19
+ export declare const COMPLETION_MARKER_PATTERN: RegExp;
20
+ /**
21
+ * Context for commit verification during grace period.
22
+ */
23
+ export interface CommitContext {
24
+ /** HEAD commit hash recorded before task execution began. */
25
+ preExecutionHead: string;
26
+ /** Expected commit message prefix (e.g., "RAF[005:01]"). */
27
+ expectedPrefix: string;
28
+ /** Path to the outcome file that should be committed. */
29
+ outcomeFilePath: string;
30
+ }
31
+ /**
32
+ * Monitors for task completion markers in stdout and outcome files.
33
+ * When a marker is detected, starts a grace period before killing the process.
34
+ */
35
+ export interface CompletionDetector {
36
+ /** Check accumulated stdout output for completion markers. */
37
+ checkOutput(output: string): void;
38
+ /** Clean up all timers. Must be called when the process exits. */
39
+ cleanup(): void;
40
+ }
41
+ /**
42
+ * Verify that the expected commit has been made.
43
+ * Checks: HEAD changed, commit message matches prefix, outcome file is committed.
44
+ */
45
+ export declare function verifyCommit(commitContext: CommitContext): boolean;
46
+ export declare function createCompletionDetector(killFn: () => void, outcomeFilePath?: string, commitContext?: CommitContext): CompletionDetector;
47
+ //# sourceMappingURL=completion-detector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion-detector.d.ts","sourceRoot":"","sources":["../../src/core/completion-detector.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,SAAU,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAE9C,eAAO,MAAM,yBAAyB,QAA2C,CAAC;AAIlF;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,6DAA6D;IAC7D,gBAAgB,EAAE,MAAM,CAAC;IACzB,4DAA4D;IAC5D,cAAc,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,kEAAkE;IAClE,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAgBlE;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,IAAI,EAClB,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,CAAC,EAAE,aAAa,GAC5B,kBAAkB,CAiGpB"}
@@ -0,0 +1,143 @@
1
+ import * as fs from 'node:fs';
2
+ import { logger } from '../utils/logger.js';
3
+ import { getHeadCommitHash, getHeadCommitMessage, isFileCommittedInHead } from './git.js';
4
+ /**
5
+ * Grace period in ms after completion marker is detected before terminating.
6
+ * Allows time for git commit operations to complete.
7
+ */
8
+ export const COMPLETION_GRACE_PERIOD_MS = 60_000;
9
+ /**
10
+ * Hard maximum grace period in ms. If the commit hasn't landed by this point,
11
+ * the process is killed regardless.
12
+ */
13
+ export const COMPLETION_HARD_MAX_MS = 180_000;
14
+ /**
15
+ * Interval in ms for polling commit verification after the initial grace period expires.
16
+ */
17
+ export const COMMIT_POLL_INTERVAL_MS = 10_000;
18
+ /**
19
+ * Interval in ms for polling the outcome file for completion markers.
20
+ */
21
+ export const OUTCOME_POLL_INTERVAL_MS = 5_000;
22
+ export const COMPLETION_MARKER_PATTERN = /<promise>(COMPLETE|FAILED)<\/promise>/i;
23
+ const COMPLETE_MARKER_PATTERN = /<promise>COMPLETE<\/promise>/i;
24
+ /**
25
+ * Verify that the expected commit has been made.
26
+ * Checks: HEAD changed, commit message matches prefix, outcome file is committed.
27
+ */
28
+ export function verifyCommit(commitContext) {
29
+ const currentHead = getHeadCommitHash();
30
+ if (!currentHead || currentHead === commitContext.preExecutionHead) {
31
+ return false;
32
+ }
33
+ const message = getHeadCommitMessage();
34
+ if (!message || !message.startsWith(commitContext.expectedPrefix)) {
35
+ return false;
36
+ }
37
+ if (!isFileCommittedInHead(commitContext.outcomeFilePath)) {
38
+ return false;
39
+ }
40
+ return true;
41
+ }
42
+ export function createCompletionDetector(killFn, outcomeFilePath, commitContext) {
43
+ let graceHandle = null;
44
+ let commitPollHandle = null;
45
+ let hardMaxHandle = null;
46
+ let pollHandle = null;
47
+ let initialMtime = 0;
48
+ let detectedMarkerIsComplete = false;
49
+ // Record initial mtime of outcome file to avoid false positives from previous runs
50
+ if (outcomeFilePath) {
51
+ try {
52
+ if (fs.existsSync(outcomeFilePath)) {
53
+ initialMtime = fs.statSync(outcomeFilePath).mtimeMs;
54
+ }
55
+ }
56
+ catch {
57
+ // Ignore stat errors
58
+ }
59
+ }
60
+ /**
61
+ * Called when the initial grace period expires.
62
+ * If commit verification is needed and the commit hasn't landed yet,
63
+ * start polling for the commit up to the hard maximum.
64
+ */
65
+ function onGracePeriodExpired() {
66
+ if (commitContext && detectedMarkerIsComplete) {
67
+ // Check if commit already landed
68
+ if (verifyCommit(commitContext)) {
69
+ logger.debug('Grace period expired - commit verified, terminating process');
70
+ killFn();
71
+ return;
72
+ }
73
+ // Commit not found yet - extend with polling
74
+ logger.debug('Grace period expired but commit not verified - extending with polling');
75
+ const remainingMs = COMPLETION_HARD_MAX_MS - COMPLETION_GRACE_PERIOD_MS;
76
+ hardMaxHandle = setTimeout(() => {
77
+ logger.warn('Hard maximum grace period reached without commit verification - terminating process');
78
+ if (commitPollHandle)
79
+ clearInterval(commitPollHandle);
80
+ killFn();
81
+ }, remainingMs);
82
+ commitPollHandle = setInterval(() => {
83
+ if (commitContext && verifyCommit(commitContext)) {
84
+ logger.debug('Commit verified during extended grace period - terminating process');
85
+ if (commitPollHandle)
86
+ clearInterval(commitPollHandle);
87
+ if (hardMaxHandle)
88
+ clearTimeout(hardMaxHandle);
89
+ killFn();
90
+ }
91
+ }, COMMIT_POLL_INTERVAL_MS);
92
+ }
93
+ else {
94
+ // No commit verification needed (FAILED marker or no context) - kill immediately
95
+ logger.debug('Grace period expired - terminating process');
96
+ killFn();
97
+ }
98
+ }
99
+ function startGracePeriod(markerOutput) {
100
+ if (graceHandle)
101
+ return; // Already started
102
+ detectedMarkerIsComplete = COMPLETE_MARKER_PATTERN.test(markerOutput);
103
+ logger.debug('Completion marker detected - starting grace period before termination');
104
+ graceHandle = setTimeout(onGracePeriodExpired, COMPLETION_GRACE_PERIOD_MS);
105
+ }
106
+ function checkOutput(output) {
107
+ if (!graceHandle && COMPLETION_MARKER_PATTERN.test(output)) {
108
+ startGracePeriod(output);
109
+ }
110
+ }
111
+ // Start outcome file polling if path provided
112
+ if (outcomeFilePath) {
113
+ const filePath = outcomeFilePath;
114
+ pollHandle = setInterval(() => {
115
+ try {
116
+ if (!fs.existsSync(filePath))
117
+ return;
118
+ const stat = fs.statSync(filePath);
119
+ if (stat.mtimeMs <= initialMtime)
120
+ return; // File unchanged from before execution
121
+ const content = fs.readFileSync(filePath, 'utf-8');
122
+ if (COMPLETION_MARKER_PATTERN.test(content)) {
123
+ startGracePeriod(content);
124
+ }
125
+ }
126
+ catch {
127
+ // Ignore read errors - file may be mid-write
128
+ }
129
+ }, OUTCOME_POLL_INTERVAL_MS);
130
+ }
131
+ function cleanup() {
132
+ if (graceHandle)
133
+ clearTimeout(graceHandle);
134
+ if (pollHandle)
135
+ clearInterval(pollHandle);
136
+ if (commitPollHandle)
137
+ clearInterval(commitPollHandle);
138
+ if (hardMaxHandle)
139
+ clearTimeout(hardMaxHandle);
140
+ }
141
+ return { checkOutput, cleanup };
142
+ }
143
+ //# sourceMappingURL=completion-detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion-detector.js","sourceRoot":"","sources":["../../src/core/completion-detector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SA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C,CAAC;QACH,CAAC,EAAE,wBAAwB,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS,OAAO;QACd,IAAI,WAAW;YAAE,YAAY,CAAC,WAAW,CAAC,CAAC;QAC3C,IAAI,UAAU;YAAE,aAAa,CAAC,UAAU,CAAC,CAAC;QAC1C,IAAI,gBAAgB;YAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;QACtD,IAAI,aAAa;YAAE,YAAY,CAAC,aAAa,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AAClC,CAAC"}
@@ -21,7 +21,7 @@ export declare function detectProgrammaticFailure(output: string, failureReason:
21
21
  */
22
22
  export declare function generateProgrammaticReport(failureType: ProgrammaticFailureType, _failureReason: string, output: string): string;
23
23
  /**
24
- * Analyze a failure using Claude (Sonnet/Haiku) and generate a structured report.
24
+ * Analyze a failure using the LLM and generate a structured report.
25
25
  * Uses a fast model for cost efficiency.
26
26
  */
27
27
  export declare function analyzeFailure(output: string, failureReason: string, taskId: string, timeoutMs?: number): Promise<string>;
@@ -73,7 +73,7 @@ export function generateProgrammaticReport(failureType, _failureReason, output)
73
73
  API error occurred during task execution.
74
74
 
75
75
  ## Analysis
76
- The Claude API returned an error response. This is typically a temporary issue with the API service.
76
+ The API returned an error response. This is typically a temporary issue with the API service.
77
77
 
78
78
  ## Suggested Fix
79
79
  - Wait a few minutes and retry the task
@@ -111,13 +111,13 @@ Task execution timed out.
111
111
  ## Analysis
112
112
  The task took longer than the configured timeout to complete. This could indicate:
113
113
  - The task is too complex or large for a single execution
114
- - Claude is stuck or making slow progress
114
+ - The LLM is stuck or making slow progress
115
115
  - Network issues causing delays
116
116
 
117
117
  ## Suggested Fix
118
118
  - Increase the timeout with \`--timeout <minutes>\`
119
119
  - Break the task into smaller subtasks
120
- - Check the logs for what Claude was doing before timeout
120
+ - Check the logs for what the LLM was doing before timeout
121
121
 
122
122
  ## Relevant Output
123
123
  \`\`\`
@@ -130,14 +130,14 @@ ${relevantOutput}
130
130
  Context window exceeded during task execution.
131
131
 
132
132
  ## Analysis
133
- The conversation context grew too large for Claude to process. This typically happens when:
133
+ The conversation context grew too large for the LLM to process. This typically happens when:
134
134
  - Too much code or output was included in the context
135
135
  - The task involves very large files
136
136
  - Multiple previous outcomes created a large context
137
137
 
138
138
  ## Suggested Fix
139
139
  - Break the task into smaller, independent subtasks
140
- - Reduce the amount of context passed to Claude
140
+ - Reduce the amount of context passed to the LLM
141
141
  - Consider processing files in chunks
142
142
 
143
143
  ## Relevant Output
@@ -165,18 +165,18 @@ function extractRelevantOutput(output, maxLines) {
165
165
  return `...(truncated)\n${lastLines.join('\n').trim()}`;
166
166
  }
167
167
  /**
168
- * Get the path to Claude CLI.
168
+ * Get the path to the CLI binary.
169
169
  */
170
170
  function getClaudePath() {
171
171
  try {
172
172
  return execSync('which claude', { encoding: 'utf-8' }).trim();
173
173
  }
174
174
  catch {
175
- throw new Error('Claude CLI not found. Please ensure it is installed and in your PATH.');
175
+ throw new Error('CLI not found. Please ensure it is installed and in your PATH.');
176
176
  }
177
177
  }
178
178
  /**
179
- * Analyze a failure using Claude (Sonnet/Haiku) and generate a structured report.
179
+ * Analyze a failure using the LLM and generate a structured report.
180
180
  * Uses a fast model for cost efficiency.
181
181
  */
182
182
  export async function analyzeFailure(output, failureReason, taskId, timeoutMs = 60000) {
@@ -185,7 +185,7 @@ export async function analyzeFailure(output, failureReason, taskId, timeoutMs =
185
185
  if (programmaticType) {
186
186
  return generateProgrammaticReport(programmaticType, failureReason, output);
187
187
  }
188
- // For other failures, use Claude to analyze
188
+ // For other failures, use the LLM to analyze
189
189
  try {
190
190
  const analysisResult = await callClaudeForAnalysis(output, failureReason, taskId, timeoutMs);
191
191
  return analysisResult;
@@ -211,7 +211,7 @@ ${relevantOutput}
211
211
  }
212
212
  }
213
213
  /**
214
- * Call Claude CLI to analyze the failure.
214
+ * Call the LLM CLI to analyze the failure.
215
215
  * Uses the print mode with a concise prompt.
216
216
  */
217
217
  async function callClaudeForAnalysis(output, failureReason, taskId, timeoutMs) {
@@ -1 +1 @@
1
- {"version":3,"file":"failure-analyzer.js","sourceRoot":"","sources":["../../src/core/failure-analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAqB9C;;GAEG;AACH,MAAM,kBAAkB,GAAG;IACzB,YAAY;IACZ,wBAAwB;IACxB,sBAAsB;IACtB,cAAc;IACd,qCAAqC;IACrC,sBAAsB;IACtB,8BAA8B;IAC9B,0BAA0B;IAC1B,WAAW;IACX,qBAAqB;CACtB,CAAC;AAEF,MAAM,mBAAmB,GAAG;IAC1B,aAAa;IACb,oBAAoB;IACpB,8BAA8B;IAC9B,iBAAiB;IACjB,gBAAgB;IAChB,UAAU;CACX,CAAC;AAEF,MAAM,yBAAyB,GAAG;IAChC,0BAA0B;IAC1B,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,kBAAkB;IAClB,cAAc;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CACvC,MAAc,EACd,aAAqB;IAErB,MAAM,QAAQ,GAAG,GAAG,MAAM,KAAK,aAAa,EAAE,CAAC;IAE/C,6BAA6B;IAC7B,KAAK,MAAM,OAAO,IAAI,yBAAyB,EAAE,CAAC;QAChD,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3B,OAAO,kBAAkB,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,0BAA0B;IAC1B,KAAK,MAAM,OAAO,IAAI,mBAAmB,EAAE,CAAC;QAC1C,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3B,OAAO,YAAY,CAAC;QACtB,CAAC;IACH,CAAC;IAED,uBAAuB;IACv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EG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAQtC;;OAEG;IACH,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAiBvE;;OAEG;IACH,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAoB7E;;OAEG;IACH,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAUnE;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAQvD;;OAEG;IACH,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAI1D;;OAEG;IACH,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAOxC;;;OAGG;IACH,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAiBlD;;;;OAIG;IACH,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;CAkB/C"}
@@ -1,6 +1,6 @@
1
1
  import * as fs from 'node:fs';
2
2
  import * as path from 'node:path';
3
- import { getRafDir, ensureRafDir, getNextProjectNumber, formatProjectNumber, getProjectDir, getPlansDir, getOutcomesDir, getDecisionsPath, getInputPath, listProjects, TASK_ID_PATTERN, } from '../utils/paths.js';
3
+ import { getRafDir, ensureRafDir, getNextProjectNumber, formatProjectNumber, getProjectDir, getPlansDir, getOutcomesDir, getDecisionsPath, getInputPath, listProjects, TASK_ID_PATTERN, numericFileSort, } from '../utils/paths.js';
4
4
  import { sanitizeProjectName } from '../utils/validation.js';
5
5
  import { logger } from '../utils/logger.js';
6
6
  import { deriveProjectState, getDerivedStats } from './state-derivation.js';
@@ -103,7 +103,7 @@ export class ProjectManager {
103
103
  return [];
104
104
  }
105
105
  const outcomes = [];
106
- const files = fs.readdirSync(outcomesDir).filter((f) => f.endsWith('.md')).sort();
106
+ const files = fs.readdirSync(outcomesDir).filter((f) => f.endsWith('.md')).sort(numericFileSort);
107
107
  for (const file of files) {
108
108
  const match = file.match(new RegExp(`^(${TASK_ID_PATTERN})-`));
109
109
  if (match && match[1]) {