rafcode 1.3.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +3 -1
- package/CLAUDE.md +118 -22
- package/RAF/aaaacu-worktree-weaver/decisions.md +88 -0
- package/RAF/aaaacu-worktree-weaver/input.md +27 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/01-git-worktree-utilities.md +41 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/02-worktree-plan-command.md +44 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/03-worktree-do-command.md +58 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/04-auto-merge-and-cleanup.md +40 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/05-worktree-tests.md +43 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/06-update-documentation.md +33 -0
- package/RAF/aaaacu-worktree-weaver/plans/01-git-worktree-utilities.md +51 -0
- package/RAF/aaaacu-worktree-weaver/plans/02-worktree-plan-command.md +93 -0
- package/RAF/aaaacu-worktree-weaver/plans/03-worktree-do-command.md +81 -0
- package/RAF/aaaacu-worktree-weaver/plans/04-auto-merge-and-cleanup.md +51 -0
- package/RAF/aaaacu-worktree-weaver/plans/05-worktree-tests.md +52 -0
- package/RAF/aaaacu-worktree-weaver/plans/06-update-documentation.md +55 -0
- package/RAF/aaaacv-trim-the-fat/decisions.md +34 -0
- package/RAF/aaaacv-trim-the-fat/input.md +5 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/01-add-worktree-support-to-status.md +43 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/02-remove-multi-project-from-do.md +50 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/03-commit-artifacts-on-amend.md +35 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/04-worktree-aware-exit-messages.md +36 -0
- package/RAF/aaaacv-trim-the-fat/plans/01-add-worktree-support-to-status.md +43 -0
- package/RAF/aaaacv-trim-the-fat/plans/02-remove-multi-project-from-do.md +44 -0
- package/RAF/aaaacv-trim-the-fat/plans/03-commit-artifacts-on-amend.md +38 -0
- package/RAF/aaaacv-trim-the-fat/plans/04-worktree-aware-exit-messages.md +38 -0
- package/RAF/aaaacw-prune-cycle/decisions.md +25 -0
- package/RAF/aaaacw-prune-cycle/input.md +5 -0
- package/RAF/aaaacw-prune-cycle/outcomes/01-create-worktree-from-branch.md +32 -0
- package/RAF/aaaacw-prune-cycle/outcomes/02-cleanup-worktree-on-success.md +33 -0
- package/RAF/aaaacw-prune-cycle/outcomes/03-amend-recreate-worktree.md +40 -0
- package/RAF/aaaacw-prune-cycle/plans/01-create-worktree-from-branch.md +31 -0
- package/RAF/aaaacw-prune-cycle/plans/02-cleanup-worktree-on-success.md +38 -0
- package/RAF/aaaacw-prune-cycle/plans/03-amend-recreate-worktree.md +50 -0
- package/RAF/aaaacx-epoch-shift/decisions.md +25 -0
- package/RAF/aaaacx-epoch-shift/input.md +1 -0
- package/RAF/aaaacx-epoch-shift/outcomes/01-epoch-id-generation.md +34 -0
- package/RAF/aaaacx-epoch-shift/outcomes/02-update-pattern-matching.md +32 -0
- package/RAF/aaaacx-epoch-shift/outcomes/03-update-tests.md +59 -0
- package/RAF/aaaacx-epoch-shift/outcomes/04-update-documentation.md +30 -0
- package/RAF/aaaacx-epoch-shift/plans/01-epoch-id-generation.md +40 -0
- package/RAF/aaaacx-epoch-shift/plans/02-update-pattern-matching.md +60 -0
- package/RAF/aaaacx-epoch-shift/plans/03-update-tests.md +48 -0
- package/RAF/aaaacx-epoch-shift/plans/04-update-documentation.md +44 -0
- package/RAF/ahmpro-merge-guardian/decisions.md +25 -0
- package/RAF/ahmpro-merge-guardian/input.md +4 -0
- package/RAF/ahmpro-merge-guardian/outcomes/001-fix-amend-worktree-commit.md +45 -0
- package/RAF/ahmpro-merge-guardian/outcomes/002-base36-task-ids.md +55 -0
- package/RAF/ahmpro-merge-guardian/outcomes/003-worktree-pr-creation.md +41 -0
- package/RAF/ahmpro-merge-guardian/outcomes/004-post-execution-picker.md +53 -0
- package/RAF/ahmpro-merge-guardian/plans/001-fix-amend-worktree-commit.md +39 -0
- package/RAF/ahmpro-merge-guardian/plans/002-base36-task-ids.md +43 -0
- package/RAF/ahmpro-merge-guardian/plans/003-worktree-pr-creation.md +43 -0
- package/RAF/ahmpro-merge-guardian/plans/004-post-execution-picker.md +51 -0
- package/RAF/ahnbcu-letterjam/decisions.md +13 -0
- package/RAF/ahnbcu-letterjam/input.md +3 -0
- package/RAF/ahnbcu-letterjam/outcomes/01-base26-encoding.md +42 -0
- package/RAF/ahnbcu-letterjam/outcomes/02-update-tests.md +38 -0
- package/RAF/ahnbcu-letterjam/outcomes/03-migrate-command.md +51 -0
- package/RAF/ahnbcu-letterjam/outcomes/04-update-documentation.md +29 -0
- package/RAF/ahnbcu-letterjam/plans/01-base26-encoding.md +36 -0
- package/RAF/ahnbcu-letterjam/plans/02-update-tests.md +37 -0
- package/RAF/ahnbcu-letterjam/plans/03-migrate-command.md +49 -0
- package/RAF/ahnbcu-letterjam/plans/04-update-documentation.md +39 -0
- package/RAF/ahnwrk-worktree-weaver/decisions.md +19 -0
- package/RAF/ahnwrk-worktree-weaver/input.md +4 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/01-remove-co-authored-by.md +20 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/02-update-task-status-format.md +21 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/03-worktree-auto-discovery.md +34 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/04-fix-pr-description.md +30 -0
- package/RAF/ahnwrk-worktree-weaver/plans/01-remove-co-authored-by.md +26 -0
- package/RAF/ahnwrk-worktree-weaver/plans/02-update-task-status-format.md +27 -0
- package/RAF/ahnwrk-worktree-weaver/plans/03-worktree-auto-discovery.md +37 -0
- package/RAF/ahnwrk-worktree-weaver/plans/04-fix-pr-description.md +50 -0
- package/RAF/ahrren-turbo-finder/decisions.md +19 -0
- package/RAF/ahrren-turbo-finder/input.md +2 -0
- package/RAF/ahrren-turbo-finder/outcomes/01-worktree-auto-detect.md +40 -0
- package/RAF/ahrren-turbo-finder/outcomes/02-medium-effort-do.md +34 -0
- package/RAF/ahrren-turbo-finder/plans/01-worktree-auto-detect.md +44 -0
- package/RAF/ahrren-turbo-finder/plans/02-medium-effort-do.md +39 -0
- package/RAF/ahrtxf-session-sentinel/decisions.md +19 -0
- package/RAF/ahrtxf-session-sentinel/input.md +1 -0
- package/RAF/ahrtxf-session-sentinel/outcomes/01-capture-session-id.md +37 -0
- package/RAF/ahrtxf-session-sentinel/outcomes/02-resume-flag.md +45 -0
- package/RAF/ahrtxf-session-sentinel/plans/01-capture-session-id.md +41 -0
- package/RAF/ahrtxf-session-sentinel/plans/02-resume-flag.md +51 -0
- package/README.md +56 -10
- package/dist/commands/do.d.ts +15 -0
- package/dist/commands/do.d.ts.map +1 -1
- package/dist/commands/do.js +431 -129
- package/dist/commands/do.js.map +1 -1
- package/dist/commands/migrate.d.ts +14 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +228 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +237 -40
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +221 -47
- package/dist/commands/status.js.map +1 -1
- package/dist/core/claude-runner.d.ts +21 -2
- package/dist/core/claude-runner.d.ts.map +1 -1
- package/dist/core/claude-runner.js +199 -29
- package/dist/core/claude-runner.js.map +1 -1
- package/dist/core/git.d.ts +15 -6
- package/dist/core/git.d.ts.map +1 -1
- package/dist/core/git.js +53 -20
- package/dist/core/git.js.map +1 -1
- package/dist/core/project-manager.d.ts.map +1 -1
- package/dist/core/project-manager.js +2 -2
- package/dist/core/project-manager.js.map +1 -1
- package/dist/core/pull-request.d.ts +84 -0
- package/dist/core/pull-request.d.ts.map +1 -0
- package/dist/core/pull-request.js +414 -0
- package/dist/core/pull-request.js.map +1 -0
- package/dist/core/shutdown-handler.d.ts.map +1 -1
- package/dist/core/shutdown-handler.js +4 -0
- package/dist/core/shutdown-handler.js.map +1 -1
- package/dist/core/state-derivation.d.ts +3 -3
- package/dist/core/state-derivation.d.ts.map +1 -1
- package/dist/core/state-derivation.js +18 -14
- package/dist/core/state-derivation.js.map +1 -1
- package/dist/core/worktree.d.ts +138 -0
- package/dist/core/worktree.d.ts.map +1 -0
- package/dist/core/worktree.js +383 -0
- package/dist/core/worktree.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/parsers/stream-renderer.d.ts +3 -0
- package/dist/parsers/stream-renderer.d.ts.map +1 -1
- package/dist/parsers/stream-renderer.js +1 -1
- package/dist/parsers/stream-renderer.js.map +1 -1
- package/dist/prompts/amend.d.ts +1 -0
- package/dist/prompts/amend.d.ts.map +1 -1
- package/dist/prompts/amend.js +14 -10
- package/dist/prompts/amend.js.map +1 -1
- package/dist/prompts/execution.d.ts.map +1 -1
- package/dist/prompts/execution.js +4 -2
- package/dist/prompts/execution.js.map +1 -1
- package/dist/prompts/planning.d.ts +1 -0
- package/dist/prompts/planning.d.ts.map +1 -1
- package/dist/prompts/planning.js +9 -8
- package/dist/prompts/planning.js.map +1 -1
- package/dist/types/config.d.ts +6 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/ui/project-picker.d.ts +34 -3
- package/dist/ui/project-picker.d.ts.map +1 -1
- package/dist/ui/project-picker.js +78 -10
- package/dist/ui/project-picker.js.map +1 -1
- package/dist/utils/paths.d.ts +38 -43
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +123 -193
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/terminal-symbols.d.ts +2 -2
- package/dist/utils/terminal-symbols.js +3 -3
- package/dist/utils/terminal-symbols.js.map +1 -1
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +2 -8
- package/dist/utils/validation.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/do.ts +505 -139
- package/src/commands/migrate.ts +269 -0
- package/src/commands/plan.ts +264 -40
- package/src/commands/status.ts +252 -45
- package/src/core/claude-runner.ts +246 -33
- package/src/core/git.ts +57 -21
- package/src/core/project-manager.ts +2 -1
- package/src/core/pull-request.ts +480 -0
- package/src/core/shutdown-handler.ts +5 -0
- package/src/core/state-derivation.ts +18 -14
- package/src/core/worktree.ts +434 -0
- package/src/index.ts +2 -0
- package/src/parsers/stream-renderer.ts +4 -1
- package/src/prompts/amend.ts +15 -9
- package/src/prompts/execution.ts +4 -2
- package/src/prompts/planning.ts +10 -8
- package/src/types/config.ts +7 -0
- package/src/ui/project-picker.ts +110 -10
- package/src/utils/paths.ts +129 -214
- package/src/utils/terminal-symbols.ts +3 -3
- package/src/utils/validation.ts +2 -9
- package/tests/unit/amend-prompt.test.ts +85 -0
- package/tests/unit/claude-runner-interactive.test.ts +24 -0
- package/tests/unit/claude-runner.test.ts +518 -64
- package/tests/unit/commit-planning-artifacts-worktree.test.ts +327 -0
- package/tests/unit/commit-planning-artifacts.test.ts +303 -35
- package/tests/unit/dependency-integration.test.ts +95 -95
- package/tests/unit/do-blocked-tasks.test.ts +53 -53
- package/tests/unit/do-command.test.ts +39 -132
- package/tests/unit/do-rerun.test.ts +65 -65
- package/tests/unit/do-worktree-cleanup.test.ts +151 -0
- package/tests/unit/execution-prompt.test.ts +71 -60
- package/tests/unit/failure-history.test.ts +19 -19
- package/tests/unit/git-commit-helpers.test.ts +5 -5
- package/tests/unit/git-stash.test.ts +4 -4
- package/tests/unit/migrate-command.test.ts +197 -0
- package/tests/unit/outcome-content.test.ts +20 -20
- package/tests/unit/paths.test.ts +269 -467
- package/tests/unit/plan-amend-worktree-recreate.test.ts +246 -0
- package/tests/unit/plan-command.test.ts +103 -103
- package/tests/unit/planning-prompt.test.ts +41 -4
- package/tests/unit/post-execution-picker.test.ts +252 -0
- package/tests/unit/project-manager.test.ts +20 -8
- package/tests/unit/project-picker.test.ts +425 -42
- package/tests/unit/pull-request.test.ts +852 -0
- package/tests/unit/state-derivation.test.ts +138 -137
- package/tests/unit/status-command.test.ts +344 -76
- package/tests/unit/stream-renderer.test.ts +30 -0
- package/tests/unit/terminal-symbols.test.ts +4 -4
- package/tests/unit/worktree-integration.test.ts +405 -0
- package/tests/unit/worktree.test.ts +625 -0
- package/tests/unit/do-multiproject.test.ts +0 -270
- /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/input.md +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/001-add-decisions-folder.md → aaaaab-raf-task-improvements/outcomes/01-add-decisions-folder.md} +0 -0
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/outcomes/SUMMARY.md +0 -0
- /package/RAF/{001-raf-task-improvements/plans/001-add-decisions-folder.md → aaaaab-raf-task-improvements/plans/01-add-decisions-folder.md} +0 -0
- /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
- /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
- /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
- /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
- /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
- /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
- /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/decisions/DECISIONS.md +0 -0
- /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/input.md +0 -0
- /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
- /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
- /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/outcomes/SUMMARY.md +0 -0
- /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
- /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
- /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/decisions/DECISIONS.md +0 -0
- /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/input.md +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/001-remove-state-json.md → aaaaad-multi-project-execution/outcomes/01-remove-state-json.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/002-update-raf-status.md → aaaaad-multi-project-execution/outcomes/02-update-raf-status.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/003-simplify-git-logic.md → aaaaad-multi-project-execution/outcomes/03-simplify-git-logic.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/004-auto-commit-planning.md → aaaaad-multi-project-execution/outcomes/04-auto-commit-planning.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/outcomes/05-rerun-failed-tasks.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/006-multi-project-execution.md → aaaaad-multi-project-execution/outcomes/06-multi-project-execution.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/007-verify-timeout.md → aaaaad-multi-project-execution/outcomes/07-verify-timeout.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/008-move-decisions-file.md → aaaaad-multi-project-execution/outcomes/08-move-decisions-file.md} +0 -0
- /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/outcomes/SUMMARY.md +0 -0
- /package/RAF/{003-multi-project-execution/plans/001-remove-state-json.md → aaaaad-multi-project-execution/plans/01-remove-state-json.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/002-update-raf-status.md → aaaaad-multi-project-execution/plans/02-update-raf-status.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/003-simplify-git-logic.md → aaaaad-multi-project-execution/plans/03-simplify-git-logic.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/004-auto-commit-planning.md → aaaaad-multi-project-execution/plans/04-auto-commit-planning.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/plans/05-rerun-failed-tasks.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/006-multi-project-execution.md → aaaaad-multi-project-execution/plans/06-multi-project-execution.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/007-verify-timeout.md → aaaaad-multi-project-execution/plans/07-verify-timeout.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/008-move-decisions-file.md → aaaaad-multi-project-execution/plans/08-move-decisions-file.md} +0 -0
- /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/decisions.md +0 -0
- /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/input.md +0 -0
- /package/RAF/{004-task-naming-optimization/outcomes/001-remove-summary-file.md → aaaaae-task-naming-optimization/outcomes/01-remove-summary-file.md} +0 -0
- /package/RAF/{004-task-naming-optimization/outcomes/002-base36-project-numbering.md → aaaaae-task-naming-optimization/outcomes/02-base36-project-numbering.md} +0 -0
- /package/RAF/{004-task-naming-optimization/outcomes/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/outcomes/03-improve-haiku-prompt.md} +0 -0
- /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/outcomes/SUMMARY.md +0 -0
- /package/RAF/{004-task-naming-optimization/plans/001-remove-summary-file.md → aaaaae-task-naming-optimization/plans/01-remove-summary-file.md} +0 -0
- /package/RAF/{004-task-naming-optimization/plans/002-base36-project-numbering.md → aaaaae-task-naming-optimization/plans/02-base36-project-numbering.md} +0 -0
- /package/RAF/{004-task-naming-optimization/plans/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/plans/03-improve-haiku-prompt.md} +0 -0
- /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/decisions.md +0 -0
- /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/input.md +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/outcomes/01-enhance-identifier-resolution.md} +0 -0
- /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
- /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
- /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
- /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
- /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
- /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
- /package/RAF/{005-task-naming-improvements/outcomes/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/outcomes/08-fix-timeout-label.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/plans/01-enhance-identifier-resolution.md} +0 -0
- /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
- /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
- /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
- /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
- /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
- /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
- /package/RAF/{005-task-naming-improvements/plans/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/plans/08-fix-timeout-label.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/decisions.md +0 -0
- /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/input.md +0 -0
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/decisions.md +0 -0
- /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/input.md +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/001-update-execution-prompt.md → aaaaah-improve-outcome-format/outcomes/01-update-execution-prompt.md} +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/002-update-state-derivation.md → aaaaah-improve-outcome-format/outcomes/02-update-state-derivation.md} +0 -0
- /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
- /package/RAF/{007-improve-outcome-format/outcomes/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/outcomes/04-implement-failure-analysis.md} +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/005-update-documentation.md → aaaaah-improve-outcome-format/outcomes/05-update-documentation.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/001-update-execution-prompt.md → aaaaah-improve-outcome-format/plans/01-update-execution-prompt.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/002-update-state-derivation.md → aaaaah-improve-outcome-format/plans/02-update-state-derivation.md} +0 -0
- /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
- /package/RAF/{007-improve-outcome-format/plans/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/plans/04-implement-failure-analysis.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/005-update-documentation.md → aaaaah-improve-outcome-format/plans/05-update-documentation.md} +0 -0
- /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/decisions.md +0 -0
- /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/input.md +0 -0
- /package/RAF/{008-beautiful-do/outcomes/001-terminal-symbols.md → aaaaai-beautiful-do/outcomes/01-terminal-symbols.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/002-refactor-do-output.md → aaaaai-beautiful-do/outcomes/02-refactor-do-output.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/003-refactor-status-output.md → aaaaai-beautiful-do/outcomes/03-refactor-status-output.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/004-simplify-logger.md → aaaaai-beautiful-do/outcomes/04-simplify-logger.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/005-add-tests.md → aaaaai-beautiful-do/outcomes/05-add-tests.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/001-terminal-symbols.md → aaaaai-beautiful-do/plans/01-terminal-symbols.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/002-refactor-do-output.md → aaaaai-beautiful-do/plans/02-refactor-do-output.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/003-refactor-status-output.md → aaaaai-beautiful-do/plans/03-refactor-status-output.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/004-simplify-logger.md → aaaaai-beautiful-do/plans/04-simplify-logger.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/005-add-tests.md → aaaaai-beautiful-do/plans/05-add-tests.md} +0 -0
- /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/decisions.md +0 -0
- /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/input.md +0 -0
- /package/RAF/{009-system-promt-ammend/outcomes/001-model-override.md → aaaaaj-system-promt-ammend/outcomes/01-model-override.md} +0 -0
- /package/RAF/{009-system-promt-ammend/outcomes/002-system-prompt-append.md → aaaaaj-system-promt-ammend/outcomes/02-system-prompt-append.md} +0 -0
- /package/RAF/{009-system-promt-ammend/outcomes/003-retry-context.md → aaaaaj-system-promt-ammend/outcomes/03-retry-context.md} +0 -0
- /package/RAF/{009-system-promt-ammend/plans/001-model-override.md → aaaaaj-system-promt-ammend/plans/01-model-override.md} +0 -0
- /package/RAF/{009-system-promt-ammend/plans/002-system-prompt-append.md → aaaaaj-system-promt-ammend/plans/02-system-prompt-append.md} +0 -0
- /package/RAF/{009-system-promt-ammend/plans/003-retry-context.md → aaaaaj-system-promt-ammend/plans/03-retry-context.md} +0 -0
- /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/decisions.md +0 -0
- /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/input.md +0 -0
- /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
- /package/RAF/{010-outcome-marker-fallback/outcomes/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/outcomes/02-creative-project-naming.md} +0 -0
- /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
- /package/RAF/{010-outcome-marker-fallback/plans/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/plans/02-creative-project-naming.md} +0 -0
- /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/decisions.md +0 -0
- /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/input.md +0 -0
- /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
- /package/RAF/{011-do-task-in-commit/outcomes/002-update-tests.md → aaaabl-do-task-in-commit/outcomes/02-update-tests.md} +0 -0
- /package/RAF/{011-do-task-in-commit/outcomes/003-update-documentation.md → aaaabl-do-task-in-commit/outcomes/03-update-documentation.md} +0 -0
- /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
- /package/RAF/{011-do-task-in-commit/plans/002-update-tests.md → aaaabl-do-task-in-commit/plans/02-update-tests.md} +0 -0
- /package/RAF/{011-do-task-in-commit/plans/003-update-documentation.md → aaaabl-do-task-in-commit/plans/03-update-documentation.md} +0 -0
- /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/decisions.md +0 -0
- /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/input.md +0 -0
- /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
- /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
- /package/RAF/{012-name-picker-buffet/outcomes/003-raf-status-truncation.md → aaaabm-name-picker-buffet/outcomes/03-raf-status-truncation.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/004-failure-reason-details.md → aaaabm-name-picker-buffet/outcomes/04-failure-reason-details.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/005-remove-raf-commits.md → aaaabm-name-picker-buffet/outcomes/05-remove-raf-commits.md} +0 -0
- /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
- /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
- /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
- /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
- /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
- /package/RAF/{012-name-picker-buffet/plans/003-raf-status-truncation.md → aaaabm-name-picker-buffet/plans/03-raf-status-truncation.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/004-failure-reason-details.md → aaaabm-name-picker-buffet/plans/04-failure-reason-details.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/005-remove-raf-commits.md → aaaabm-name-picker-buffet/plans/05-remove-raf-commits.md} +0 -0
- /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
- /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
- /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
- /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/decisions.md +0 -0
- /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/input.md +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/outcomes/01-define-dependency-syntax.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/outcomes/02-update-planning-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/outcomes/03-parse-dependencies-update-state.md} +0 -0
- /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
- /package/RAF/{013-dependencies-watchdog/outcomes/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/outcomes/05-update-execution-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/006-add-tests.md → aaaabn-dependencies-watchdog/outcomes/06-add-tests.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/007-add-act-alias.md → aaaabn-dependencies-watchdog/outcomes/07-add-act-alias.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/008-add-exit-message.md → aaaabn-dependencies-watchdog/outcomes/08-add-exit-message.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/plans/01-define-dependency-syntax.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/plans/02-update-planning-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/plans/03-parse-dependencies-update-state.md} +0 -0
- /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
- /package/RAF/{013-dependencies-watchdog/plans/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/plans/05-update-execution-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/006-add-tests.md → aaaabn-dependencies-watchdog/plans/06-add-tests.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/007-add-act-alias.md → aaaabn-dependencies-watchdog/plans/07-add-act-alias.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/008-add-exit-message.md → aaaabn-dependencies-watchdog/plans/08-add-exit-message.md} +0 -0
- /package/RAF/{014-watchdog → aaaabo-watchdog}/decisions.md +0 -0
- /package/RAF/{014-watchdog → aaaabo-watchdog}/input.md +0 -0
- /package/RAF/{014-watchdog/outcomes/001-amend-flag-position.md → aaaabo-watchdog/outcomes/01-amend-flag-position.md} +0 -0
- /package/RAF/{014-watchdog/outcomes/002-details-only-on-failure.md → aaaabo-watchdog/outcomes/02-details-only-on-failure.md} +0 -0
- /package/RAF/{014-watchdog/plans/001-amend-flag-position.md → aaaabo-watchdog/plans/01-amend-flag-position.md} +0 -0
- /package/RAF/{014-watchdog/plans/002-details-only-on-failure.md → aaaabo-watchdog/plans/02-details-only-on-failure.md} +0 -0
- /package/RAF/{015-name-lottery → aaaabp-name-lottery}/decisions.md +0 -0
- /package/RAF/{015-name-lottery → aaaabp-name-lottery}/input.md +0 -0
- /package/RAF/{015-name-lottery/outcomes/001-auto-pick-project-name.md → aaaabp-name-lottery/outcomes/01-auto-pick-project-name.md} +0 -0
- /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
- /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
- /package/RAF/{015-name-lottery/plans/001-auto-pick-project-name.md → aaaabp-name-lottery/plans/01-auto-pick-project-name.md} +0 -0
- /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
- /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
- /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/decisions.md +0 -0
- /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/input.md +0 -0
- /package/RAF/{016-planning-scalpel/outcomes/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/outcomes/01-update-git-commit-instructions.md} +0 -0
- /package/RAF/{016-planning-scalpel/plans/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/plans/01-update-git-commit-instructions.md} +0 -0
- /package/RAF/{017-decision-vault → aaaabr-decision-vault}/decisions.md +0 -0
- /package/RAF/{017-decision-vault → aaaabr-decision-vault}/input.md +0 -0
- /package/RAF/{017-decision-vault/outcomes/001-create-git-commit-utility.md → aaaabr-decision-vault/outcomes/01-create-git-commit-utility.md} +0 -0
- /package/RAF/{017-decision-vault/outcomes/002-integrate-commit-into-plan.md → aaaabr-decision-vault/outcomes/02-integrate-commit-into-plan.md} +0 -0
- /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
- /package/RAF/{017-decision-vault/plans/001-create-git-commit-utility.md → aaaabr-decision-vault/plans/01-create-git-commit-utility.md} +0 -0
- /package/RAF/{017-decision-vault/plans/002-integrate-commit-into-plan.md → aaaabr-decision-vault/plans/02-integrate-commit-into-plan.md} +0 -0
- /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
- /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/decisions.md +0 -0
- /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/input.md +0 -0
- /package/RAF/{018-workflow-forge/outcomes/001-add-task-number-progress.md → aaaabs-workflow-forge/outcomes/01-add-task-number-progress.md} +0 -0
- /package/RAF/{018-workflow-forge/outcomes/002-update-plan-do-prompts.md → aaaabs-workflow-forge/outcomes/02-update-plan-do-prompts.md} +0 -0
- /package/RAF/{018-workflow-forge/plans/001-add-task-number-progress.md → aaaabs-workflow-forge/plans/01-add-task-number-progress.md} +0 -0
- /package/RAF/{018-workflow-forge/plans/002-update-plan-do-prompts.md → aaaabs-workflow-forge/plans/02-update-plan-do-prompts.md} +0 -0
- /package/RAF/{019-verbose-chronicle → aaaabt-verbose-chronicle}/decisions.md +0 -0
- /package/RAF/{019-verbose-chronicle → aaaabt-verbose-chronicle}/input.md +0 -0
- /package/RAF/{019-verbose-chronicle/outcomes/001-amend-iteration-references.md → aaaabt-verbose-chronicle/outcomes/01-amend-iteration-references.md} +0 -0
- /package/RAF/{019-verbose-chronicle/outcomes/002-verbose-task-name-display.md → aaaabt-verbose-chronicle/outcomes/02-verbose-task-name-display.md} +0 -0
- /package/RAF/{019-verbose-chronicle/outcomes/003-verbose-streaming-fix.md → aaaabt-verbose-chronicle/outcomes/03-verbose-streaming-fix.md} +0 -0
- /package/RAF/{019-verbose-chronicle/outcomes/004-commit-verification-before-halt.md → aaaabt-verbose-chronicle/outcomes/04-commit-verification-before-halt.md} +0 -0
- /package/RAF/{019-verbose-chronicle/plans/001-amend-iteration-references.md → aaaabt-verbose-chronicle/plans/01-amend-iteration-references.md} +0 -0
- /package/RAF/{019-verbose-chronicle/plans/002-verbose-task-name-display.md → aaaabt-verbose-chronicle/plans/02-verbose-task-name-display.md} +0 -0
- /package/RAF/{019-verbose-chronicle/plans/003-verbose-streaming-fix.md → aaaabt-verbose-chronicle/plans/03-verbose-streaming-fix.md} +0 -0
- /package/RAF/{019-verbose-chronicle/plans/004-commit-verification-before-halt.md → aaaabt-verbose-chronicle/plans/04-commit-verification-before-halt.md} +0 -0
package/dist/commands/do.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
2
3
|
import { Command } from 'commander';
|
|
4
|
+
import { select } from '@inquirer/prompts';
|
|
3
5
|
import { ProjectManager } from '../core/project-manager.js';
|
|
4
6
|
import { ClaudeRunner } from '../core/claude-runner.js';
|
|
5
7
|
import { shutdownHandler } from '../core/shutdown-handler.js';
|
|
@@ -7,15 +9,17 @@ import { stashChanges, hasUncommittedChanges, isGitRepo, getHeadCommitHash } fro
|
|
|
7
9
|
import { getExecutionPrompt } from '../prompts/execution.js';
|
|
8
10
|
import { parseOutput, isRetryableFailure } from '../parsers/output-parser.js';
|
|
9
11
|
import { validatePlansExist, resolveModelOption } from '../utils/validation.js';
|
|
10
|
-
import { getRafDir, extractProjectNumber, extractProjectName, extractTaskNameFromPlanFile, resolveProjectIdentifierWithDetails, getOutcomeFilePath } from '../utils/paths.js';
|
|
11
|
-
import { pickPendingProject, getPendingProjects } from '../ui/project-picker.js';
|
|
12
|
+
import { getRafDir, extractProjectNumber, extractProjectName, extractTaskNameFromPlanFile, resolveProjectIdentifierWithDetails, getOutcomeFilePath, parseProjectPrefix } from '../utils/paths.js';
|
|
13
|
+
import { pickPendingProject, getPendingProjects, getPendingWorktreeProjects } from '../ui/project-picker.js';
|
|
12
14
|
import { logger } from '../utils/logger.js';
|
|
13
15
|
import { getConfig } from '../utils/config.js';
|
|
14
16
|
import { createTaskTimer, formatElapsedTime } from '../utils/timer.js';
|
|
15
17
|
import { createStatusLine } from '../utils/status-line.js';
|
|
16
|
-
import {
|
|
17
|
-
import { deriveProjectState, getNextExecutableTask, getDerivedStats, getDerivedStatsForTasks, isProjectComplete, hasProjectFailed, parseOutcomeStatus, } from '../core/state-derivation.js';
|
|
18
|
+
import { formatProjectHeader, formatSummary, formatTaskProgress, } from '../utils/terminal-symbols.js';
|
|
19
|
+
import { deriveProjectState, discoverProjects, getNextExecutableTask, getDerivedStats, getDerivedStatsForTasks, isProjectComplete, hasProjectFailed, parseOutcomeStatus, } from '../core/state-derivation.js';
|
|
18
20
|
import { analyzeFailure } from '../core/failure-analyzer.js';
|
|
21
|
+
import { getRepoRoot, getRepoBasename, getCurrentBranch, computeWorktreePath, computeWorktreeBaseDir, validateWorktree, listWorktreeProjects, mergeWorktreeBranch, removeWorktree, resolveWorktreeProjectByIdentifier, } from '../core/worktree.js';
|
|
22
|
+
import { createPullRequest, prPreflight } from '../core/pull-request.js';
|
|
19
23
|
/**
|
|
20
24
|
* Format failure history for console output.
|
|
21
25
|
* Shows attempts that failed before eventual success or final failure.
|
|
@@ -38,23 +42,26 @@ export function formatRetryHistoryForConsole(taskId, taskName, failureHistory, f
|
|
|
38
42
|
}
|
|
39
43
|
export function createDoCommand() {
|
|
40
44
|
const command = new Command('do')
|
|
41
|
-
.description('Execute planned tasks for
|
|
45
|
+
.description('Execute planned tasks for a project')
|
|
42
46
|
.alias('act')
|
|
43
|
-
.argument('[
|
|
47
|
+
.argument('[project]', 'Project identifier: ID (00j3k1), name (my-project), or folder (00j3k1-my-project)')
|
|
44
48
|
.option('-t, --timeout <minutes>', 'Timeout per task in minutes', '60')
|
|
45
49
|
.option('-v, --verbose', 'Show full Claude output')
|
|
46
50
|
.option('-d, --debug', 'Save all logs and show debug output')
|
|
47
51
|
.option('-f, --force', 'Re-run all tasks regardless of status')
|
|
48
52
|
.option('-m, --model <name>', 'Claude model to use (sonnet, haiku, opus)')
|
|
49
53
|
.option('--sonnet', 'Use Sonnet model (shorthand for --model sonnet)')
|
|
50
|
-
.
|
|
51
|
-
|
|
54
|
+
.option('-w, --worktree', 'Execute tasks in a git worktree')
|
|
55
|
+
.option('-r, --resume <session-id>', 'Resume an interrupted Claude session')
|
|
56
|
+
.action(async (project, options) => {
|
|
57
|
+
await runDoCommand(project, options);
|
|
52
58
|
});
|
|
53
59
|
return command;
|
|
54
60
|
}
|
|
55
|
-
async function runDoCommand(
|
|
61
|
+
async function runDoCommand(projectIdentifierArg, options) {
|
|
56
62
|
const rafDir = getRafDir();
|
|
57
|
-
let
|
|
63
|
+
let projectIdentifier = projectIdentifierArg;
|
|
64
|
+
let worktreeMode = options.worktree ?? false;
|
|
58
65
|
// Validate and resolve model option
|
|
59
66
|
let model;
|
|
60
67
|
try {
|
|
@@ -64,24 +71,61 @@ async function runDoCommand(projectIdentifiersArg, options) {
|
|
|
64
71
|
logger.error(error.message);
|
|
65
72
|
process.exit(1);
|
|
66
73
|
}
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
// Variables for worktree context (set when --worktree is used)
|
|
75
|
+
let worktreeRoot;
|
|
76
|
+
let originalBranch;
|
|
77
|
+
if (worktreeMode) {
|
|
78
|
+
// Validate git repo
|
|
79
|
+
const repoRoot = getRepoRoot();
|
|
80
|
+
if (!repoRoot) {
|
|
81
|
+
logger.error('--worktree requires a git repository');
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
const repoBasename = getRepoBasename();
|
|
85
|
+
const rafRelativePath = path.relative(repoRoot, rafDir);
|
|
86
|
+
// Record original branch before any worktree operations
|
|
87
|
+
originalBranch = getCurrentBranch() ?? undefined;
|
|
88
|
+
if (!projectIdentifier) {
|
|
89
|
+
// Auto-discovery flow
|
|
90
|
+
const selected = await discoverAndPickWorktreeProject(repoBasename, rafDir, rafRelativePath);
|
|
91
|
+
if (!selected) {
|
|
92
|
+
process.exit(0);
|
|
93
|
+
}
|
|
94
|
+
worktreeRoot = selected.worktreeRoot;
|
|
95
|
+
projectIdentifier = selected.projectFolder;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// Handle no project identifier (non-worktree mode) - show interactive picker
|
|
99
|
+
if (!projectIdentifier) {
|
|
100
|
+
// Discover worktree projects for the current repo (if in a git repo)
|
|
101
|
+
let worktreeProjects = [];
|
|
102
|
+
const repoRoot = getRepoRoot();
|
|
103
|
+
if (repoRoot) {
|
|
104
|
+
const repoBasename = getRepoBasename();
|
|
105
|
+
const rafRelativePath = path.relative(repoRoot, rafDir);
|
|
106
|
+
worktreeProjects = getPendingWorktreeProjects(repoBasename, rafRelativePath);
|
|
107
|
+
}
|
|
108
|
+
// Check if there are any pending projects (local or worktree)
|
|
70
109
|
const pendingProjects = getPendingProjects(rafDir);
|
|
71
|
-
if (pendingProjects.length === 0) {
|
|
110
|
+
if (pendingProjects.length === 0 && worktreeProjects.length === 0) {
|
|
72
111
|
logger.info('No pending projects found.');
|
|
73
112
|
logger.info("Run 'raf plan' to create a new project.");
|
|
74
113
|
process.exit(0);
|
|
75
114
|
}
|
|
76
115
|
try {
|
|
77
|
-
const selectedProject = await pickPendingProject(rafDir);
|
|
116
|
+
const selectedProject = await pickPendingProject(rafDir, worktreeProjects);
|
|
78
117
|
if (!selectedProject) {
|
|
79
|
-
// This shouldn't happen since we already checked pendingProjects.length
|
|
80
118
|
logger.info('No pending projects found.');
|
|
81
119
|
process.exit(0);
|
|
82
120
|
}
|
|
83
121
|
// Use the selected project
|
|
84
|
-
|
|
122
|
+
projectIdentifier = selectedProject.folder;
|
|
123
|
+
// If a worktree project was selected, auto-switch to worktree mode
|
|
124
|
+
if (selectedProject.source === 'worktree' && selectedProject.worktreeRoot) {
|
|
125
|
+
worktreeMode = true;
|
|
126
|
+
worktreeRoot = selectedProject.worktreeRoot;
|
|
127
|
+
originalBranch = getCurrentBranch() ?? undefined;
|
|
128
|
+
}
|
|
85
129
|
}
|
|
86
130
|
catch (error) {
|
|
87
131
|
// Handle Ctrl+C (user cancellation)
|
|
@@ -91,45 +135,123 @@ async function runDoCommand(projectIdentifiersArg, options) {
|
|
|
91
135
|
throw error;
|
|
92
136
|
}
|
|
93
137
|
}
|
|
94
|
-
// Resolve
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
138
|
+
// Resolve project identifier
|
|
139
|
+
let resolvedProject;
|
|
140
|
+
if (worktreeMode) {
|
|
141
|
+
// Worktree mode: resolve project inside the worktree
|
|
142
|
+
const repoRoot = getRepoRoot();
|
|
143
|
+
const repoBasename = getRepoBasename();
|
|
144
|
+
const rafRelativePath = path.relative(repoRoot, rafDir);
|
|
145
|
+
// If worktreeRoot was set by auto-discovery, use it directly
|
|
146
|
+
if (worktreeRoot) {
|
|
147
|
+
const wtRafDir = path.join(worktreeRoot, rafRelativePath);
|
|
148
|
+
const result = resolveProjectIdentifierWithDetails(wtRafDir, projectIdentifier);
|
|
149
|
+
if (!result.path) {
|
|
150
|
+
logger.error(`Project not found in worktree: ${projectIdentifier}`);
|
|
151
|
+
process.exit(1);
|
|
152
|
+
}
|
|
153
|
+
const projectName = extractProjectName(result.path) ?? projectIdentifier;
|
|
154
|
+
resolvedProject = { identifier: projectIdentifier, path: result.path, name: projectName };
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
// Explicit identifier: resolve from main repo to get folder name, then validate worktree
|
|
158
|
+
const mainResult = resolveProjectIdentifierWithDetails(rafDir, projectIdentifier);
|
|
159
|
+
let projectFolderName;
|
|
160
|
+
if (mainResult.path) {
|
|
161
|
+
// Found in main repo - use its folder name
|
|
162
|
+
projectFolderName = path.basename(mainResult.path);
|
|
109
163
|
}
|
|
110
164
|
else {
|
|
111
|
-
|
|
165
|
+
// Not found in main repo - try to find it in worktrees directly
|
|
166
|
+
// This handles projects that only exist in worktrees
|
|
167
|
+
const worktreeBaseDir = computeWorktreeBaseDir(repoBasename);
|
|
168
|
+
if (!fs.existsSync(worktreeBaseDir)) {
|
|
169
|
+
logger.error(`No worktree found for project "${projectIdentifier}". Did you plan with --worktree?`);
|
|
170
|
+
process.exit(1);
|
|
171
|
+
}
|
|
172
|
+
// Search worktrees for the project
|
|
173
|
+
const wtProjects = listWorktreeProjects(repoBasename);
|
|
174
|
+
let found = false;
|
|
175
|
+
for (const wtProjectDir of wtProjects) {
|
|
176
|
+
const wtPath = computeWorktreePath(repoBasename, wtProjectDir);
|
|
177
|
+
const wtRafDir = path.join(wtPath, rafRelativePath);
|
|
178
|
+
if (!fs.existsSync(wtRafDir))
|
|
179
|
+
continue;
|
|
180
|
+
const resolution = resolveProjectIdentifierWithDetails(wtRafDir, projectIdentifier);
|
|
181
|
+
if (resolution.path) {
|
|
182
|
+
projectFolderName = path.basename(resolution.path);
|
|
183
|
+
worktreeRoot = wtPath;
|
|
184
|
+
found = true;
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (!found) {
|
|
189
|
+
logger.error(`No worktree found for project "${projectIdentifier}". Did you plan with --worktree?`);
|
|
190
|
+
process.exit(1);
|
|
191
|
+
}
|
|
112
192
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
193
|
+
// Compute worktree path if not already set
|
|
194
|
+
if (!worktreeRoot) {
|
|
195
|
+
worktreeRoot = computeWorktreePath(repoBasename, projectFolderName);
|
|
196
|
+
}
|
|
197
|
+
// Validate the worktree
|
|
198
|
+
const wtProjectRelPath = path.join(rafRelativePath, projectFolderName);
|
|
199
|
+
const validation = validateWorktree(worktreeRoot, wtProjectRelPath);
|
|
200
|
+
if (!validation.exists || !validation.isValidWorktree) {
|
|
201
|
+
logger.error(`No worktree found for project "${projectIdentifier}". Did you plan with --worktree?`);
|
|
202
|
+
logger.error(`Expected worktree at: ${worktreeRoot}`);
|
|
203
|
+
process.exit(1);
|
|
204
|
+
}
|
|
205
|
+
if (!validation.hasProjectFolder || !validation.hasPlans) {
|
|
206
|
+
logger.error(`Worktree exists but project content is missing.`);
|
|
207
|
+
logger.error(`Expected project folder at: ${validation.projectPath ?? path.join(worktreeRoot, wtProjectRelPath)}`);
|
|
208
|
+
process.exit(1);
|
|
209
|
+
}
|
|
210
|
+
const projectPath = validation.projectPath;
|
|
211
|
+
const projectName = extractProjectName(projectPath) ?? projectIdentifier;
|
|
212
|
+
resolvedProject = { identifier: projectIdentifier, path: projectPath, name: projectName };
|
|
120
213
|
}
|
|
121
|
-
seenPaths.add(projectPath);
|
|
122
|
-
const projectName = extractProjectName(projectPath) ?? identifier;
|
|
123
|
-
resolvedProjects.push({ identifier, path: projectPath, name: projectName });
|
|
124
214
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
215
|
+
else {
|
|
216
|
+
// Standard mode: check worktrees first (worktree takes priority), then main repo
|
|
217
|
+
const repoRoot = getRepoRoot();
|
|
218
|
+
const repoBasename = repoRoot ? getRepoBasename() : null;
|
|
219
|
+
// Try worktree resolution first (preferred when project exists in both)
|
|
220
|
+
if (repoBasename) {
|
|
221
|
+
const wtResolution = resolveWorktreeProjectByIdentifier(repoBasename, projectIdentifier);
|
|
222
|
+
if (wtResolution) {
|
|
223
|
+
const rafRelativePath = path.relative(repoRoot, rafDir);
|
|
224
|
+
const wtRafDir = path.join(wtResolution.worktreeRoot, rafRelativePath);
|
|
225
|
+
const wtProjectPath = path.join(wtRafDir, wtResolution.folder);
|
|
226
|
+
if (fs.existsSync(wtProjectPath)) {
|
|
227
|
+
// Auto-switch to worktree mode
|
|
228
|
+
worktreeMode = true;
|
|
229
|
+
worktreeRoot = wtResolution.worktreeRoot;
|
|
230
|
+
originalBranch = getCurrentBranch() ?? undefined;
|
|
231
|
+
const projectName = extractProjectName(wtResolution.folder) ?? projectIdentifier;
|
|
232
|
+
resolvedProject = { identifier: projectIdentifier, path: wtProjectPath, name: projectName };
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
// Fall back to main repo if worktree didn't match
|
|
237
|
+
if (!resolvedProject) {
|
|
238
|
+
const result = resolveProjectIdentifierWithDetails(rafDir, projectIdentifier);
|
|
239
|
+
if (!result.path) {
|
|
240
|
+
if (result.error === 'ambiguous' && result.matches) {
|
|
241
|
+
const matchList = result.matches
|
|
242
|
+
.map((m) => ` - ${m.folder}`)
|
|
243
|
+
.join('\n');
|
|
244
|
+
logger.error(`${projectIdentifier}: Ambiguous project name. Multiple projects match:\n${matchList}\nPlease specify the project ID or full folder name.`);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
logger.error(`${projectIdentifier}: Project not found`);
|
|
248
|
+
}
|
|
249
|
+
logger.info("Run 'raf status' to see available projects.");
|
|
250
|
+
process.exit(1);
|
|
251
|
+
}
|
|
252
|
+
const projectName = extractProjectName(result.path) ?? projectIdentifier;
|
|
253
|
+
resolvedProject = { identifier: projectIdentifier, path: result.path, name: projectName };
|
|
254
|
+
}
|
|
133
255
|
}
|
|
134
256
|
// Get configuration
|
|
135
257
|
const config = getConfig();
|
|
@@ -137,64 +259,256 @@ async function runDoCommand(projectIdentifiersArg, options) {
|
|
|
137
259
|
const verbose = options.verbose ?? false;
|
|
138
260
|
const debug = options.debug ?? false;
|
|
139
261
|
const force = options.force ?? false;
|
|
262
|
+
const resumeSessionId = options.resume;
|
|
140
263
|
const maxRetries = config.maxRetries;
|
|
141
264
|
const autoCommit = config.autoCommit;
|
|
142
265
|
// Configure logger
|
|
143
266
|
logger.configure({ verbose, debug });
|
|
144
|
-
//
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
logger.newline();
|
|
148
|
-
}
|
|
149
|
-
// Execute projects
|
|
150
|
-
const results = [];
|
|
151
|
-
const isMultiProject = resolvedProjects.length > 1;
|
|
152
|
-
for (const [i, project] of resolvedProjects.entries()) {
|
|
153
|
-
if (isMultiProject && verbose) {
|
|
154
|
-
logger.info(`=== Project ${i + 1}/${resolvedProjects.length}: ${project.name} ===`);
|
|
155
|
-
logger.newline();
|
|
156
|
-
}
|
|
267
|
+
// Show post-execution picker before task execution (worktree mode only)
|
|
268
|
+
let postAction = 'leave';
|
|
269
|
+
if (worktreeMode && worktreeRoot) {
|
|
157
270
|
try {
|
|
158
|
-
|
|
159
|
-
timeout,
|
|
160
|
-
verbose,
|
|
161
|
-
debug,
|
|
162
|
-
force,
|
|
163
|
-
maxRetries,
|
|
164
|
-
autoCommit,
|
|
165
|
-
showModel: !isMultiProject, // Only show model for single project
|
|
166
|
-
model,
|
|
167
|
-
});
|
|
168
|
-
results.push(result);
|
|
271
|
+
postAction = await pickPostExecutionAction(worktreeRoot);
|
|
169
272
|
}
|
|
170
273
|
catch (error) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
tasksCompleted: 0,
|
|
177
|
-
totalTasks: 0,
|
|
178
|
-
error: errorMessage,
|
|
179
|
-
});
|
|
180
|
-
logger.error(`Project ${project.name} failed: ${errorMessage}`);
|
|
181
|
-
}
|
|
182
|
-
if (isMultiProject && i < resolvedProjects.length - 1) {
|
|
183
|
-
logger.newline();
|
|
274
|
+
// Handle Ctrl+C (user cancellation)
|
|
275
|
+
if (error instanceof Error && error.message.includes('User force closed')) {
|
|
276
|
+
process.exit(0);
|
|
277
|
+
}
|
|
278
|
+
throw error;
|
|
184
279
|
}
|
|
185
280
|
}
|
|
186
|
-
//
|
|
187
|
-
|
|
188
|
-
|
|
281
|
+
// Execute project
|
|
282
|
+
let result;
|
|
283
|
+
try {
|
|
284
|
+
result = await executeSingleProject(resolvedProject.path, resolvedProject.name, {
|
|
285
|
+
timeout,
|
|
286
|
+
verbose,
|
|
287
|
+
debug,
|
|
288
|
+
force,
|
|
289
|
+
maxRetries,
|
|
290
|
+
autoCommit,
|
|
291
|
+
showModel: true,
|
|
292
|
+
model,
|
|
293
|
+
worktreeCwd: worktreeRoot,
|
|
294
|
+
resumeSessionId,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
catch (error) {
|
|
298
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
299
|
+
logger.error(`Project ${resolvedProject.name} failed: ${errorMessage}`);
|
|
300
|
+
process.exit(1);
|
|
301
|
+
}
|
|
302
|
+
// Execute post-execution action based on picker choice
|
|
303
|
+
if (worktreeMode && worktreeRoot) {
|
|
304
|
+
const worktreeBranch = path.basename(worktreeRoot);
|
|
305
|
+
if (result.success) {
|
|
306
|
+
await executePostAction(postAction, worktreeRoot, worktreeBranch, originalBranch, resolvedProject.path);
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
if (postAction !== 'leave') {
|
|
310
|
+
logger.newline();
|
|
311
|
+
logger.info(`Skipping post-execution action — project has failures. Branch "${worktreeBranch}" is available for inspection.`);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
189
314
|
}
|
|
190
315
|
// Exit with appropriate code
|
|
191
|
-
|
|
192
|
-
|
|
316
|
+
if (!result.success) {
|
|
317
|
+
process.exit(1);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Show an interactive picker for the post-execution action in worktree mode.
|
|
322
|
+
* Presented before task execution so the user declares intent upfront.
|
|
323
|
+
*
|
|
324
|
+
* If "Create PR" is chosen, runs preflight checks immediately. If preflight fails,
|
|
325
|
+
* warns the user and falls back to re-prompting.
|
|
326
|
+
*/
|
|
327
|
+
export async function pickPostExecutionAction(worktreeRoot) {
|
|
328
|
+
const worktreeBranch = path.basename(worktreeRoot);
|
|
329
|
+
const chosen = await select({
|
|
330
|
+
message: `After tasks complete, what should happen with branch "${worktreeBranch}"?`,
|
|
331
|
+
choices: [
|
|
332
|
+
{ name: 'Merge into current branch', value: 'merge' },
|
|
333
|
+
{ name: 'Create a GitHub PR', value: 'pr' },
|
|
334
|
+
{ name: 'Leave branch as-is', value: 'leave' },
|
|
335
|
+
],
|
|
336
|
+
});
|
|
337
|
+
// Early preflight check for PR option
|
|
338
|
+
if (chosen === 'pr') {
|
|
339
|
+
const preflight = prPreflight(worktreeBranch, worktreeRoot);
|
|
340
|
+
if (!preflight.ready) {
|
|
341
|
+
logger.warn(`PR preflight failed: ${preflight.error}`);
|
|
342
|
+
logger.warn('Falling back to "Leave branch" — you can create a PR manually later.');
|
|
343
|
+
return 'leave';
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return chosen;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Execute the chosen post-execution action.
|
|
350
|
+
* Called after all tasks succeed.
|
|
351
|
+
*/
|
|
352
|
+
async function executePostAction(action, worktreeRoot, worktreeBranch, originalBranch, projectPath) {
|
|
353
|
+
switch (action) {
|
|
354
|
+
case 'merge': {
|
|
355
|
+
// Clean up worktree before merge (merge uses branch, not directory)
|
|
356
|
+
const cleanupResult = removeWorktree(worktreeRoot);
|
|
357
|
+
if (cleanupResult.success) {
|
|
358
|
+
logger.info(`Cleaned up worktree: ${worktreeRoot}`);
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
logger.warn(`Could not clean up worktree: ${cleanupResult.error}`);
|
|
362
|
+
}
|
|
363
|
+
if (!originalBranch) {
|
|
364
|
+
logger.warn('Could not determine original branch for merge.');
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
logger.newline();
|
|
368
|
+
logger.info(`Merging branch "${worktreeBranch}" into "${originalBranch}"...`);
|
|
369
|
+
const mergeResult = mergeWorktreeBranch(worktreeBranch, originalBranch);
|
|
370
|
+
if (mergeResult.success) {
|
|
371
|
+
const mergeType = mergeResult.fastForward ? 'fast-forward' : 'merge commit';
|
|
372
|
+
logger.success(`Merged "${worktreeBranch}" into "${originalBranch}" (${mergeType})`);
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
logger.warn(`Could not auto-merge: ${mergeResult.error}`);
|
|
376
|
+
logger.warn(`You can merge manually: git merge ${worktreeBranch}`);
|
|
377
|
+
}
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
case 'pr': {
|
|
381
|
+
logger.newline();
|
|
382
|
+
logger.info(`Creating PR for branch "${worktreeBranch}"...`);
|
|
383
|
+
const prResult = await createPullRequest(worktreeBranch, projectPath, { cwd: worktreeRoot });
|
|
384
|
+
if (prResult.success) {
|
|
385
|
+
logger.success(`PR created: ${prResult.prUrl}`);
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
logger.warn(`Could not create PR: ${prResult.error}`);
|
|
389
|
+
logger.warn(`Branch "${worktreeBranch}" has been pushed. You can create a PR manually.`);
|
|
390
|
+
}
|
|
391
|
+
// Clean up worktree directory (branch is preserved)
|
|
392
|
+
const prCleanupResult = removeWorktree(worktreeRoot);
|
|
393
|
+
if (prCleanupResult.success) {
|
|
394
|
+
logger.info(`Cleaned up worktree: ${worktreeRoot}`);
|
|
395
|
+
}
|
|
396
|
+
else {
|
|
397
|
+
logger.warn(`Could not clean up worktree: ${prCleanupResult.error}`);
|
|
398
|
+
}
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
case 'leave': {
|
|
402
|
+
// Clean up worktree directory (branch is preserved)
|
|
403
|
+
const cleanupResult = removeWorktree(worktreeRoot);
|
|
404
|
+
if (cleanupResult.success) {
|
|
405
|
+
logger.info(`Cleaned up worktree: ${worktreeRoot}`);
|
|
406
|
+
}
|
|
407
|
+
else {
|
|
408
|
+
logger.warn(`Could not clean up worktree: ${cleanupResult.error}`);
|
|
409
|
+
}
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Auto-discovery flow for `raf do --worktree` without a project identifier.
|
|
416
|
+
* Lists worktree projects, finds latest completed main-tree project, filters,
|
|
417
|
+
* and shows an interactive picker.
|
|
418
|
+
*
|
|
419
|
+
* @returns Selected project info or null if cancelled/no projects
|
|
420
|
+
*/
|
|
421
|
+
async function discoverAndPickWorktreeProject(repoBasename, rafDir, rafRelativePath) {
|
|
422
|
+
// List all worktree projects for this repo
|
|
423
|
+
const wtProjects = listWorktreeProjects(repoBasename);
|
|
424
|
+
if (wtProjects.length === 0) {
|
|
425
|
+
logger.error('No worktree projects found. Did you plan with --worktree?');
|
|
193
426
|
process.exit(1);
|
|
194
427
|
}
|
|
428
|
+
// Find the highest-numbered completed project in the MAIN tree
|
|
429
|
+
const mainProjects = discoverProjects(rafDir);
|
|
430
|
+
let highestCompletedNumber = 0;
|
|
431
|
+
for (const project of mainProjects) {
|
|
432
|
+
const state = deriveProjectState(project.path);
|
|
433
|
+
if (isProjectComplete(state) && state.tasks.length > 0) {
|
|
434
|
+
if (project.number > highestCompletedNumber) {
|
|
435
|
+
highestCompletedNumber = project.number;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
// Filter threshold: highest completed - 3 (or 0 if none completed)
|
|
440
|
+
const threshold = highestCompletedNumber > 3 ? highestCompletedNumber - 3 : 0;
|
|
441
|
+
// Filter worktree projects by number threshold and completion status
|
|
442
|
+
const uncompletedProjects = [];
|
|
443
|
+
for (const wtProjectDir of wtProjects) {
|
|
444
|
+
// Extract project number from the worktree directory name
|
|
445
|
+
const numPrefix = extractProjectNumber(wtProjectDir);
|
|
446
|
+
if (!numPrefix)
|
|
447
|
+
continue;
|
|
448
|
+
const projectNumber = parseProjectPrefix(numPrefix);
|
|
449
|
+
if (projectNumber === null)
|
|
450
|
+
continue;
|
|
451
|
+
// Apply threshold filter
|
|
452
|
+
if (projectNumber < threshold)
|
|
453
|
+
continue;
|
|
454
|
+
// Check if this worktree has a valid project
|
|
455
|
+
const wtPath = computeWorktreePath(repoBasename, wtProjectDir);
|
|
456
|
+
const wtProjectPath = path.join(wtPath, rafRelativePath, wtProjectDir);
|
|
457
|
+
if (!fs.existsSync(wtProjectPath))
|
|
458
|
+
continue;
|
|
459
|
+
// Derive project state from worktree
|
|
460
|
+
const state = deriveProjectState(wtProjectPath);
|
|
461
|
+
if (state.tasks.length === 0)
|
|
462
|
+
continue;
|
|
463
|
+
// Keep only uncompleted projects
|
|
464
|
+
if (isProjectComplete(state))
|
|
465
|
+
continue;
|
|
466
|
+
const stats = getDerivedStats(state);
|
|
467
|
+
uncompletedProjects.push({
|
|
468
|
+
folder: wtProjectDir,
|
|
469
|
+
worktreeRoot: wtPath,
|
|
470
|
+
projectPath: wtProjectPath,
|
|
471
|
+
completedTasks: stats.completed,
|
|
472
|
+
totalTasks: stats.total,
|
|
473
|
+
projectNumber,
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
if (uncompletedProjects.length === 0) {
|
|
477
|
+
logger.info('All worktree projects are completed.');
|
|
478
|
+
return null;
|
|
479
|
+
}
|
|
480
|
+
// Sort by project number
|
|
481
|
+
uncompletedProjects.sort((a, b) => a.projectNumber - b.projectNumber);
|
|
482
|
+
// Show interactive picker (even if only one project)
|
|
483
|
+
const choices = uncompletedProjects.map((p) => {
|
|
484
|
+
const name = extractProjectName(p.folder) ?? p.folder;
|
|
485
|
+
const numPrefix = extractProjectNumber(p.folder) ?? '';
|
|
486
|
+
return {
|
|
487
|
+
name: `${numPrefix} ${name} (${p.completedTasks}/${p.totalTasks} tasks)`,
|
|
488
|
+
value: p,
|
|
489
|
+
};
|
|
490
|
+
});
|
|
491
|
+
try {
|
|
492
|
+
const selected = await select({
|
|
493
|
+
message: 'Select a worktree project to execute:',
|
|
494
|
+
choices,
|
|
495
|
+
});
|
|
496
|
+
return {
|
|
497
|
+
worktreeRoot: selected.worktreeRoot,
|
|
498
|
+
projectFolder: selected.folder,
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
catch (error) {
|
|
502
|
+
// Handle Ctrl+C (user cancellation)
|
|
503
|
+
if (error instanceof Error && error.message.includes('User force closed')) {
|
|
504
|
+
return null;
|
|
505
|
+
}
|
|
506
|
+
throw error;
|
|
507
|
+
}
|
|
195
508
|
}
|
|
196
509
|
async function executeSingleProject(projectPath, projectName, options) {
|
|
197
|
-
const { timeout, verbose, debug, force, maxRetries, autoCommit, showModel, model } = options;
|
|
510
|
+
const { timeout, verbose, debug, force, maxRetries, autoCommit, showModel, model, worktreeCwd, resumeSessionId } = options;
|
|
511
|
+
let activeResumeSessionId = resumeSessionId;
|
|
198
512
|
if (!validatePlansExist(projectPath)) {
|
|
199
513
|
return {
|
|
200
514
|
projectName,
|
|
@@ -365,7 +679,10 @@ async function executeSingleProject(projectPath, projectName, options) {
|
|
|
365
679
|
const taskContext = `[Task ${taskNumber}/${totalTasks}: ${displayName}]`;
|
|
366
680
|
logger.setContext(taskContext);
|
|
367
681
|
// Log task execution status
|
|
368
|
-
if (
|
|
682
|
+
if (activeResumeSessionId) {
|
|
683
|
+
logger.info(`Resuming task ${taskLabel} with session ${activeResumeSessionId}`);
|
|
684
|
+
}
|
|
685
|
+
else if (task.status === 'failed') {
|
|
369
686
|
logger.info(`Retrying task ${taskLabel} (previously failed)...`);
|
|
370
687
|
}
|
|
371
688
|
else if (task.status === 'completed' && force) {
|
|
@@ -375,6 +692,9 @@ async function executeSingleProject(projectPath, projectName, options) {
|
|
|
375
692
|
logger.info(`Executing task ${taskLabel}...`);
|
|
376
693
|
}
|
|
377
694
|
}
|
|
695
|
+
else if (activeResumeSessionId) {
|
|
696
|
+
logger.info(`Resuming task ${task.id} with session ${activeResumeSessionId}`);
|
|
697
|
+
}
|
|
378
698
|
// Get previous outcomes for context
|
|
379
699
|
const previousOutcomes = projectManager.readOutcomes(projectPath);
|
|
380
700
|
// Get dependency outcomes - filter to only include outcomes for tasks this task depends on
|
|
@@ -426,16 +746,23 @@ async function executeSingleProject(projectPath, projectName, options) {
|
|
|
426
746
|
dependencyOutcomes,
|
|
427
747
|
});
|
|
428
748
|
// Capture HEAD hash before execution for commit verification
|
|
429
|
-
const preExecutionHead = isGitRepo() ? getHeadCommitHash() : null;
|
|
749
|
+
const preExecutionHead = isGitRepo(worktreeCwd) ? getHeadCommitHash(worktreeCwd) : null;
|
|
430
750
|
const commitContext = preExecutionHead ? {
|
|
431
751
|
preExecutionHead,
|
|
432
752
|
expectedPrefix: `RAF[${projectNumber}:${task.id}]`,
|
|
433
753
|
outcomeFilePath,
|
|
434
754
|
} : undefined;
|
|
435
|
-
// Run Claude
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
:
|
|
755
|
+
// Run Claude (use worktree root as cwd if in worktree mode)
|
|
756
|
+
let result;
|
|
757
|
+
if (activeResumeSessionId && attempts === 1) {
|
|
758
|
+
// Resume mode: use --resume flag instead of normal prompt execution
|
|
759
|
+
result = await claudeRunner.runResume(activeResumeSessionId, { timeout, outcomeFilePath, commitContext, cwd: worktreeCwd, effortLevel: 'medium' });
|
|
760
|
+
}
|
|
761
|
+
else {
|
|
762
|
+
result = verbose
|
|
763
|
+
? await claudeRunner.runVerbose(prompt, { timeout, outcomeFilePath, commitContext, cwd: worktreeCwd, effortLevel: 'medium' })
|
|
764
|
+
: await claudeRunner.run(prompt, { timeout, outcomeFilePath, commitContext, cwd: worktreeCwd, effortLevel: 'medium' });
|
|
765
|
+
}
|
|
439
766
|
lastOutput = result.output;
|
|
440
767
|
// Parse result
|
|
441
768
|
const parsed = parseOutput(result.output);
|
|
@@ -552,10 +879,10 @@ Task completed. No detailed report provided.
|
|
|
552
879
|
else {
|
|
553
880
|
// Stash any uncommitted changes on complete failure
|
|
554
881
|
let stashName;
|
|
555
|
-
if (hasUncommittedChanges()) {
|
|
882
|
+
if (hasUncommittedChanges(worktreeCwd)) {
|
|
556
883
|
const projectNum = extractProjectNumber(projectPath) ?? '000';
|
|
557
884
|
stashName = `raf-${projectNum}-task-${task.id}-failed`;
|
|
558
|
-
const stashed = stashChanges(stashName);
|
|
885
|
+
const stashed = stashChanges(stashName, worktreeCwd);
|
|
559
886
|
if (verbose && stashed) {
|
|
560
887
|
logger.info(` Changes for task ${taskLabel} stashed as: ${stashName}`);
|
|
561
888
|
}
|
|
@@ -589,6 +916,8 @@ ${stashName ? `- Stash: ${stashName}` : ''}
|
|
|
589
916
|
if (verbose) {
|
|
590
917
|
logger.newline();
|
|
591
918
|
}
|
|
919
|
+
// Clear resume flag after first task — subsequent tasks use normal execution
|
|
920
|
+
activeResumeSessionId = undefined;
|
|
592
921
|
// Clear context before next task
|
|
593
922
|
logger.clearContext();
|
|
594
923
|
// Re-derive state to get updated task statuses
|
|
@@ -667,31 +996,4 @@ ${stashName ? `- Stash: ${stashName}` : ''}
|
|
|
667
996
|
retryHistory: projectRetryHistory,
|
|
668
997
|
};
|
|
669
998
|
}
|
|
670
|
-
function printMultiProjectSummary(results, verbose) {
|
|
671
|
-
logger.newline();
|
|
672
|
-
if (verbose) {
|
|
673
|
-
logger.info('=== Multi-Project Summary ===');
|
|
674
|
-
logger.newline();
|
|
675
|
-
for (const result of results) {
|
|
676
|
-
const statusSymbol = result.success ? SYMBOLS.completed : SYMBOLS.failed;
|
|
677
|
-
const statusText = result.success
|
|
678
|
-
? `Completed (${result.tasksCompleted}/${result.totalTasks} tasks)`
|
|
679
|
-
: result.error
|
|
680
|
-
? `Error: ${result.error}`
|
|
681
|
-
: `Failed (${result.tasksCompleted}/${result.totalTasks} tasks)`;
|
|
682
|
-
logger.info(`${statusSymbol} ${result.projectName}: ${statusText}`);
|
|
683
|
-
}
|
|
684
|
-
const completed = results.filter((r) => r.success).length;
|
|
685
|
-
const failed = results.length - completed;
|
|
686
|
-
logger.newline();
|
|
687
|
-
logger.info(`Total: ${completed} completed, ${failed} failed`);
|
|
688
|
-
}
|
|
689
|
-
else {
|
|
690
|
-
// Minimal multi-project summary: just show each project result
|
|
691
|
-
for (const result of results) {
|
|
692
|
-
const symbol = result.success ? SYMBOLS.completed : SYMBOLS.failed;
|
|
693
|
-
logger.info(`${symbol} ${result.projectName}`);
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
999
|
//# sourceMappingURL=do.js.map
|