rafcode 1.3.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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 +384 -123
- 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 +2 -2
- package/dist/core/claude-runner.d.ts.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/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 +120 -0
- package/dist/core/worktree.d.ts.map +1 -0
- package/dist/core/worktree.js +322 -0
- package/dist/core/worktree.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.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 +5 -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 +454 -134
- 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 +2 -2
- 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/state-derivation.ts +18 -14
- package/src/core/worktree.ts +357 -0
- package/src/index.ts +2 -0
- 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 +6 -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.test.ts +9 -9
- 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 +251 -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/terminal-symbols.test.ts +4 -4
- package/tests/unit/worktree-integration.test.ts +405 -0
- package/tests/unit/worktree.test.ts +523 -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
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Task: Add --worktree Flag to Plan Command
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Add `--worktree` flag to `raf plan` that creates a git worktree and runs the entire planning session inside it, including support for `--amend` to add tasks to existing worktree projects.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
When a user runs `raf plan --worktree` (with or without a project name), RAF should create a git worktree under `~/.raf/worktrees/<repo-basename>/`, then create the project folder inside the worktree and run the interactive planning session there. The project name is optional — the normal name picker/auto-generation works since the editor uses a temp file and the worktree is only created after the name is known. When combined with `--amend`, RAF should find the existing worktree, switch into it, and run the amendment flow there.
|
|
8
|
+
|
|
9
|
+
## Dependencies
|
|
10
|
+
001
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
|
|
14
|
+
### New project flow (`raf plan [name] --worktree`)
|
|
15
|
+
- Add `--worktree` boolean flag to the plan command in Commander.js (both in `src/commands/plan.ts` and `src/index.ts` if needed)
|
|
16
|
+
- Project name is OPTIONAL with `--worktree` — same behavior as non-worktree mode:
|
|
17
|
+
- If name is provided: use it directly (skip name picker)
|
|
18
|
+
- If name is NOT provided: generate suggestions from input content, then picker or auto-select (same as today)
|
|
19
|
+
- The worktree is created AFTER the project name is determined (not before), because the worktree path includes the project ID
|
|
20
|
+
- Flow with `--worktree`:
|
|
21
|
+
1. Validate environment
|
|
22
|
+
2. Open editor for input (writes to temp file — nothing touches the main tree)
|
|
23
|
+
3. Resolve project name: use provided name, or generate/pick from input content (same as today)
|
|
24
|
+
4. Compute project number from the main repo's RAF directory (to get the sequential ID)
|
|
25
|
+
5. Create git worktree at `~/.raf/worktrees/<repo-basename>/<project-id>` using utilities from task 001
|
|
26
|
+
6. Create the project folder structure inside the worktree (at the same relative path as it would be in the main repo)
|
|
27
|
+
7. Save input.md inside the worktree project folder (never in the main tree)
|
|
28
|
+
8. Run interactive Claude planning session with `cwd` set to the worktree directory
|
|
29
|
+
9. Commit planning artifacts (input.md, decisions.md, plan files) inside the worktree branch
|
|
30
|
+
10. Show success message including the worktree path and branch name
|
|
31
|
+
- When `--worktree` is NOT used, behavior is exactly the same as today (no changes)
|
|
32
|
+
- The `--worktree` flag should be compatible with `--auto` and `--model` flags
|
|
33
|
+
- If worktree creation fails, error out with a clear message
|
|
34
|
+
- Cleanup: if planning fails or is interrupted and no plans were created, clean up the worktree
|
|
35
|
+
|
|
36
|
+
### Amend flow (`raf plan --amend <project> --worktree`)
|
|
37
|
+
- When `--amend` and `--worktree` are both used, the project identifier must be resolved from the worktree directory (`~/.raf/worktrees/<repo-basename>/`), NOT from the main repo — because plans only exist inside the worktree
|
|
38
|
+
- The worktree must already exist (it was created during initial `raf plan --worktree`) — error if not found
|
|
39
|
+
- Flow with `--amend --worktree`:
|
|
40
|
+
1. Resolve project identifier against the worktree's project directories
|
|
41
|
+
2. Validate the worktree exists and contains the project with existing plans
|
|
42
|
+
3. Switch working context to the worktree directory
|
|
43
|
+
4. Run the standard amend flow (derive project state, show existing tasks, open editor, run Claude amendment interview) with all paths pointing into the worktree
|
|
44
|
+
5. Commit amendment artifacts (updated input.md, decisions.md, new plan files) in the worktree branch
|
|
45
|
+
- The project state derivation (`deriveProjectState`) should read from the worktree project path
|
|
46
|
+
- The amend system prompt should receive task information from the worktree project
|
|
47
|
+
- No worktree creation or cleanup needed for amend — the worktree already exists
|
|
48
|
+
|
|
49
|
+
## Implementation Steps
|
|
50
|
+
1. Add `--worktree` option to the Commander command definition in `src/commands/plan.ts`
|
|
51
|
+
2. Update `PlanCommandOptions` interface to include `worktree?: boolean`
|
|
52
|
+
3. **New project path**: When `--worktree` is set (without `--amend`):
|
|
53
|
+
- Run editor (temp file) and name resolution exactly as today
|
|
54
|
+
- After name is finalized, compute project number from main repo
|
|
55
|
+
- Create worktree, then create project folder inside worktree
|
|
56
|
+
- Save input.md inside worktree project folder
|
|
57
|
+
- Run planning with cwd set to worktree root
|
|
58
|
+
4. **Amend path**: When `--worktree` and `--amend` are both set:
|
|
59
|
+
- Resolve project identifier from `~/.raf/worktrees/<repo-basename>/` instead of main repo
|
|
60
|
+
- Validate the worktree exists
|
|
61
|
+
- Set all paths to worktree project path and run standard amend flow
|
|
62
|
+
5. For both paths, set the working directory for Claude's interactive session to the worktree root
|
|
63
|
+
6. After planning/amending, commit artifacts in the worktree branch
|
|
64
|
+
7. Add cleanup logic for worktree on failure/interruption for new projects (not for amend — worktree already existed)
|
|
65
|
+
8. Update the success message to mention worktree path and suggest `raf do <name> --worktree`
|
|
66
|
+
|
|
67
|
+
## Acceptance Criteria
|
|
68
|
+
- [ ] `raf plan --worktree` without project name works (name picker/auto-generation runs)
|
|
69
|
+
- [ ] `raf plan my-feature --worktree` works with explicit name (skips name picker)
|
|
70
|
+
- [ ] `raf plan --worktree --auto` works (auto-selects generated name)
|
|
71
|
+
- [ ] Worktree is created AFTER name is resolved, not before
|
|
72
|
+
- [ ] input.md is only saved inside the worktree, never in the main tree
|
|
73
|
+
- [ ] Project folder is created at correct relative path inside worktree
|
|
74
|
+
- [ ] Planning session runs with cwd set to worktree root
|
|
75
|
+
- [ ] Planning artifacts are committed in the worktree branch
|
|
76
|
+
- [ ] Success message mentions the worktree path and suggests `--worktree` flag for `raf do`
|
|
77
|
+
- [ ] Without `--worktree`, behavior is unchanged
|
|
78
|
+
- [ ] Failed planning cleans up the worktree (new project only)
|
|
79
|
+
- [ ] Compatible with `--auto` and `--model` flags
|
|
80
|
+
- [ ] `raf plan --amend <project> --worktree` resolves project from worktree directory
|
|
81
|
+
- [ ] `raf plan --amend <project> --worktree` with no worktree shows helpful error
|
|
82
|
+
- [ ] Amend flow reads existing plans/state from inside the worktree
|
|
83
|
+
- [ ] New plan files from amend are committed in the worktree branch
|
|
84
|
+
- [ ] Amend does NOT attempt to create or clean up the worktree
|
|
85
|
+
|
|
86
|
+
## Notes
|
|
87
|
+
- The project folder path inside the worktree should be identical to what it would be in the main repo (e.g., `<worktree>/RAF/020-my-feature/plans/`)
|
|
88
|
+
- The interactive Claude session needs to run with its working directory set to the worktree root so Claude sees the correct file paths
|
|
89
|
+
- The `commitPlanningArtifacts` function from `src/core/git.ts` should work inside the worktree since git operations are branch-aware
|
|
90
|
+
- For amend, `resolveProjectIdentifierWithDetails()` from `src/utils/paths.ts` likely needs a way to point at the worktree's RAF directory instead of the main repo's. This could be an optional parameter or a wrapper that computes the worktree RAF path
|
|
91
|
+
- The project number still comes from the main repo's RAF directory (to maintain sequential numbering), but the project folder itself only exists in the worktree
|
|
92
|
+
- The editor already uses a temp file (`os.tmpdir()`), so nothing touches the main tree before the worktree is created
|
|
93
|
+
- Reference existing plan command at `src/commands/plan.ts` for the current flow
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Task: Add --worktree Flag to Do Command
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Add `--worktree` flag to `raf do` that validates the worktree exists and executes all tasks inside the worktree directory, with optional auto-discovery of worktree projects when no project identifier is given.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
After planning with `--worktree`, the user runs `raf do <project> --worktree` to execute tasks. RAF needs to validate the worktree exists at `~/.raf/worktrees/<repo-basename>/<project-id>`, find the project inside it, and run all Claude execution sessions with cwd set to the worktree root.
|
|
8
|
+
|
|
9
|
+
Additionally, `raf do --worktree` (without a project identifier) should auto-discover uncompleted worktree projects by scanning the worktrees directory and filtering to projects that come after the latest completed project in the main tree.
|
|
10
|
+
|
|
11
|
+
## Dependencies
|
|
12
|
+
001
|
|
13
|
+
|
|
14
|
+
## Requirements
|
|
15
|
+
- Add `--worktree` boolean flag to the do command in Commander.js
|
|
16
|
+
- When `--worktree` is used with a project identifier, only a SINGLE project is supported - error if multiple projects are specified
|
|
17
|
+
- When `--worktree` is used WITHOUT a project identifier, perform auto-discovery:
|
|
18
|
+
1. Use the listing utility from task 001 to get all worktree project directories for this repo
|
|
19
|
+
2. If no worktree projects exist, show error: "No worktree projects found. Did you plan with --worktree?"
|
|
20
|
+
3. Find the highest-numbered completed project in the MAIN tree (using `deriveProjectState`)
|
|
21
|
+
4. Filter worktree projects to those with a project number >= (highest completed - 3). For example, if the highest completed main-tree project is 008, include worktree projects 006 and above. This accounts for amended projects that may have new uncompleted tasks added via `--amend`
|
|
22
|
+
5. For each remaining worktree project, derive its state and keep only uncompleted ones (pending, failed, or in-progress — anything that is NOT fully completed)
|
|
23
|
+
6. If no uncompleted worktree projects remain after filtering, show message: "All worktree projects are completed"
|
|
24
|
+
7. Show an interactive picker with the uncompleted worktree projects (even if there's only one), allowing the user to cancel with Ctrl+C
|
|
25
|
+
8. Execute the selected project
|
|
26
|
+
- When `--worktree` is used with an explicit project identifier, validate:
|
|
27
|
+
1. The worktree directory exists at `~/.raf/worktrees/<repo-basename>/<project-id>`
|
|
28
|
+
2. The worktree is a valid git worktree (listed in `git worktree list`)
|
|
29
|
+
3. The project folder exists inside the worktree with plan files
|
|
30
|
+
4. If any validation fails, show a helpful error message (e.g., "No worktree found for project X. Did you plan with --worktree?")
|
|
31
|
+
- Execution flow with `--worktree` (after project is selected/resolved):
|
|
32
|
+
1. Resolve project identifier to get project folder name
|
|
33
|
+
2. Compute worktree path using utilities from task 001
|
|
34
|
+
3. Validate worktree and project content
|
|
35
|
+
4. Derive project state from the worktree project path (not the main repo)
|
|
36
|
+
5. Execute each task with Claude's cwd set to the worktree root
|
|
37
|
+
6. All commits, stashes, and git operations happen in the worktree branch
|
|
38
|
+
7. State derivation, outcome files, logs - all use the worktree project path
|
|
39
|
+
- When `--worktree` is NOT used, behavior is exactly the same as today
|
|
40
|
+
- The `--worktree` flag should be compatible with all existing flags (`--timeout`, `--verbose`, `--debug`, `--force`, `--model`, `--sonnet`)
|
|
41
|
+
- Update `DoCommandOptions` type in `src/types/config.ts` to include `worktree?: boolean`
|
|
42
|
+
|
|
43
|
+
## Implementation Steps
|
|
44
|
+
1. Add `--worktree` option to the Commander command definition in `src/commands/do.ts`
|
|
45
|
+
2. Update `DoCommandOptions` interface in `src/types/config.ts`
|
|
46
|
+
3. In `runDoCommand`, branch on whether a project identifier was provided:
|
|
47
|
+
- **With identifier**: validate single project only, compute worktree path, validate it exists
|
|
48
|
+
- **Without identifier**: run auto-discovery flow (list worktrees, find latest completed main-tree project, filter, derive states, show picker)
|
|
49
|
+
4. For auto-discovery: scan main tree projects to find the highest-numbered fully-completed project using `deriveProjectState`
|
|
50
|
+
5. For auto-discovery: filter worktree projects to those with IDs >= (highest completed - 3), then derive each project's state to find uncompleted ones
|
|
51
|
+
6. For auto-discovery: show interactive picker using the existing `pickPendingProject` pattern (or similar UI) for the user to select one
|
|
52
|
+
7. After project selection/resolution, replace the `projectPath` with the worktree project path for all operations
|
|
53
|
+
8. Pass the worktree root as the working directory to `ClaudeRunner.run` and `ClaudeRunner.runVerbose`
|
|
54
|
+
9. Ensure `executeSingleProject` uses the worktree project path for state derivation, outcome files, and all file operations
|
|
55
|
+
10. The `ClaudeRunner` likely needs a `cwd` option - check if it already supports it, add if not
|
|
56
|
+
11. All git operations (commit verification, stash, etc.) should naturally work in the worktree since cwd is set there
|
|
57
|
+
|
|
58
|
+
## Acceptance Criteria
|
|
59
|
+
- [ ] `raf do --worktree` without project identifier triggers auto-discovery flow
|
|
60
|
+
- [ ] Auto-discovery lists worktree projects, finds latest completed main-tree project, filters correctly
|
|
61
|
+
- [ ] Auto-discovery shows picker even when only one uncompleted project is found
|
|
62
|
+
- [ ] Auto-discovery shows "No worktree projects found" when none exist
|
|
63
|
+
- [ ] Auto-discovery shows "All worktree projects are completed" when all are done
|
|
64
|
+
- [ ] `raf do proj1 proj2 --worktree` shows error about single project only
|
|
65
|
+
- [ ] `raf do my-feature --worktree` with no worktree shows helpful error
|
|
66
|
+
- [ ] `raf do my-feature --worktree` with valid worktree executes tasks in worktree
|
|
67
|
+
- [ ] Claude runs with cwd set to worktree root
|
|
68
|
+
- [ ] State derivation reads from worktree project path
|
|
69
|
+
- [ ] Outcome files are written to worktree project path
|
|
70
|
+
- [ ] Git commits land in the worktree branch
|
|
71
|
+
- [ ] Compatible with `--verbose`, `--timeout`, `--force`, `--debug`, `--model`
|
|
72
|
+
- [ ] Without `--worktree`, behavior is unchanged
|
|
73
|
+
|
|
74
|
+
## Notes
|
|
75
|
+
- The key change is that all paths point to the worktree version of the project, and Claude's working directory is the worktree root
|
|
76
|
+
- The `ClaudeRunner` class in `src/core/claude-runner.ts` likely needs a `cwd` option passed to `spawn` / `node-pty` - check if this already exists
|
|
77
|
+
- When a project identifier IS given, resolution still works against the MAIN repo's RAF directory to get the folder name, but then the actual project path used for execution is inside the worktree
|
|
78
|
+
- For auto-discovery, project identifier resolution works against the worktree directory listing — these projects only exist in worktrees, not the main tree
|
|
79
|
+
- The scanning threshold is: highest completed main-tree project number minus 3. E.g., if project 008 is the highest completed, scan worktrees from 006 onward. This catches amended projects that had new tasks added after completion. If no main-tree projects are completed, scan all worktrees (threshold = 0)
|
|
80
|
+
- Reference existing do command at `src/commands/do.ts` and `ClaudeRunner` at `src/core/claude-runner.ts`
|
|
81
|
+
- Reference `getPendingProjects` and `pickPendingProject` from `src/ui/project-picker.js` for the picker pattern
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Task: Auto-merge on Project Completion
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
When `--merge` flag is present on `raf do --worktree`, automatically merge the project branch into the original branch after all tasks complete successfully.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
After worktree execution completes, the user may want to merge the project branch back into the branch from which `raf` was originally called. This is controlled by the `--merge` flag (only valid with `--worktree`). The worktree itself is NOT cleaned up or removed after merge — it stays in place.
|
|
8
|
+
|
|
9
|
+
## Dependencies
|
|
10
|
+
003
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
- Add `--merge` boolean flag to the do command in Commander.js
|
|
14
|
+
- `--merge` is only valid when `--worktree` is also present — error if `--merge` is used without `--worktree`
|
|
15
|
+
- After all tasks complete (project state is "completed") and `--merge` is set, attempt auto-merge:
|
|
16
|
+
1. Switch back to the original branch (the branch that was active when `raf do --worktree` was invoked)
|
|
17
|
+
2. Attempt merge using the merge utility from task 001 (tries ff first, falls back to merge-commit)
|
|
18
|
+
3. On success: log success message with merge details
|
|
19
|
+
4. On conflict: `git merge --abort` is called by the utility, log a warning with the branch name so the user can merge manually
|
|
20
|
+
- Record the original branch name at the start of `raf do --worktree` execution (before switching to worktree)
|
|
21
|
+
- The merge must happen from the ORIGINAL repo's working directory, not from inside the worktree
|
|
22
|
+
- If the project is NOT fully completed (has failures), skip the merge entirely — just show a message about the worktree branch
|
|
23
|
+
- The merge should also work for partially completed projects that were continued with `--force` and are now fully complete
|
|
24
|
+
- Do NOT remove or clean up the worktree after merge — the worktree stays in place
|
|
25
|
+
|
|
26
|
+
## Implementation Steps
|
|
27
|
+
1. Add `--merge` option to the Commander command definition in `src/commands/do.ts`
|
|
28
|
+
2. Validate that `--merge` is only used with `--worktree`, error otherwise
|
|
29
|
+
3. In the `do` command's worktree flow, record the current branch name before execution starts
|
|
30
|
+
4. After the task execution loop completes, check if `--merge` is set and the project is fully completed
|
|
31
|
+
5. If completed with `--merge`: call the merge utility from task 001 (passing original branch, project branch, and paths)
|
|
32
|
+
6. Handle merge result: success -> log success, conflict -> log warning with manual merge instructions
|
|
33
|
+
7. If project has failures: just note that the worktree branch is available for inspection
|
|
34
|
+
8. No worktree cleanup or removal after merge
|
|
35
|
+
|
|
36
|
+
## Acceptance Criteria
|
|
37
|
+
- [ ] `--merge` flag is added to the do command
|
|
38
|
+
- [ ] `--merge` without `--worktree` shows an error
|
|
39
|
+
- [ ] On full project completion with `--merge`, merge is attempted
|
|
40
|
+
- [ ] Successful merge logs a clear success message
|
|
41
|
+
- [ ] Merge conflicts trigger `git merge --abort` and show warning with branch name and manual merge instructions
|
|
42
|
+
- [ ] Incomplete projects (failures) skip merge and mention the branch
|
|
43
|
+
- [ ] Original branch is correctly recorded and restored
|
|
44
|
+
- [ ] Worktree is NOT removed or cleaned up after merge
|
|
45
|
+
- [ ] Without `--merge`, no merge is attempted even if project completes
|
|
46
|
+
|
|
47
|
+
## Notes
|
|
48
|
+
- The merge happens in the original repo directory, not the worktree — this is important because `git merge` needs to be on the target branch
|
|
49
|
+
- The current branch at invocation time should be captured early (before any worktree operations change context)
|
|
50
|
+
- Consider the case where the user's original branch has moved forward (other commits) while the worktree was being worked on — if ff fails, a merge-commit is created; only conflicts cause failure
|
|
51
|
+
- Reference the worktree utility functions from task 001 for merge operations
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Task: Add Tests for Worktree Functionality
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Add comprehensive tests covering the worktree utilities and the integration of `--worktree` and `--merge` flags into plan and do commands.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
RAF uses Jest with ts-jest ESM preset. Existing tests are in `__tests__/` directories. The worktree functionality involves git operations that need careful testing with real temporary git repos.
|
|
8
|
+
|
|
9
|
+
## Dependencies
|
|
10
|
+
001, 002, 003, 004
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
- Unit tests for all worktree utility functions in `src/core/worktree.ts`:
|
|
14
|
+
- Path computation (given repo name and project folder, verify correct worktree path)
|
|
15
|
+
- Worktree creation (use a temporary git repo)
|
|
16
|
+
- Worktree validation (existing vs non-existing)
|
|
17
|
+
- Merge (fast-forward success, merge-commit fallback, and conflict/abort cases)
|
|
18
|
+
- Removal (for failed-plan cleanup scenario only)
|
|
19
|
+
- Integration-level tests for command behavior:
|
|
20
|
+
- `raf do --worktree` with multiple projects should error
|
|
21
|
+
- `raf do --worktree` with no worktree should error with helpful message
|
|
22
|
+
- `raf do --merge` without `--worktree` should error
|
|
23
|
+
- Test edge cases:
|
|
24
|
+
- Worktree path computation when repo has special characters in name
|
|
25
|
+
- Merge when original branch has diverged (merge-commit should be created)
|
|
26
|
+
- Merge with conflicts (should abort and return failure)
|
|
27
|
+
- Use temporary directories and real git repos for git operation tests (create temp dir, `git init`, add commits, etc.)
|
|
28
|
+
- Follow existing test patterns in the project
|
|
29
|
+
|
|
30
|
+
## Implementation Steps
|
|
31
|
+
1. Create `src/core/__tests__/worktree.test.ts` for unit tests of utility functions
|
|
32
|
+
2. Write tests for path computation (pure function, no git needed)
|
|
33
|
+
3. Write tests for worktree creation/validation/merge/removal using temporary git repos
|
|
34
|
+
4. Create test helpers for setting up temporary git repos with commits
|
|
35
|
+
5. Write tests for CLI validation (--worktree and --merge flag behavior)
|
|
36
|
+
6. Ensure all tests clean up their temporary directories
|
|
37
|
+
|
|
38
|
+
## Acceptance Criteria
|
|
39
|
+
- [ ] All worktree utility functions have unit tests
|
|
40
|
+
- [ ] Path computation tested with various repo and project names
|
|
41
|
+
- [ ] Worktree creation tested with real temporary git repo
|
|
42
|
+
- [ ] Merge tested for ff success, merge-commit fallback, and conflict/abort
|
|
43
|
+
- [ ] Removal tested for failed-plan cleanup scenario
|
|
44
|
+
- [ ] CLI validation tests for error cases (--merge without --worktree, etc.)
|
|
45
|
+
- [ ] All tests pass with `npm test`
|
|
46
|
+
- [ ] Tests clean up temporary files/directories
|
|
47
|
+
|
|
48
|
+
## Notes
|
|
49
|
+
- Creating temporary git repos for testing: use `fs.mkdtempSync` + `execSync('git init')` + add a commit
|
|
50
|
+
- For worktree tests, the base repo needs at least one commit before `git worktree add` will work
|
|
51
|
+
- Be careful with `process.cwd()` in tests - some utilities may depend on it. Consider mocking or using `chdir` carefully
|
|
52
|
+
- Reference existing test files in the project for patterns and conventions
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Task: Update Documentation for Worktree Support
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Document the `--worktree` and `--merge` flags and worktree workflow in both CLAUDE.md (internal developer docs) and README.md (user-facing docs).
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
The worktree feature adds a new workflow to RAF. Users need to know how to use it, and developers maintaining RAF need to understand the architecture. Both docs files need updates.
|
|
8
|
+
|
|
9
|
+
## Dependencies
|
|
10
|
+
002, 003, 004
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
|
|
14
|
+
### README.md updates:
|
|
15
|
+
- Add `--worktree` to the Features section (brief mention of isolated branch execution)
|
|
16
|
+
- Add worktree usage examples to the Commands section for both `raf plan` and `raf do`
|
|
17
|
+
- Add `--worktree` and `--merge` rows to the Command Reference tables for both plan and do
|
|
18
|
+
- Add a new "Worktree Mode" section (after the existing "Project Structure" section) explaining:
|
|
19
|
+
- What worktree mode does and why you'd use it (isolated branch for parallel work)
|
|
20
|
+
- The basic workflow: `raf plan my-feature --worktree` -> `raf do my-feature --worktree --merge`
|
|
21
|
+
- Where worktree directories are created (`~/.raf/worktrees/<repo>/<project>`)
|
|
22
|
+
- Merge behavior with `--merge` flag (ff preferred, merge-commit fallback, conflict abort)
|
|
23
|
+
- What happens on failure (branch preserved, user can merge manually)
|
|
24
|
+
- Worktrees persist after completion — no automatic cleanup
|
|
25
|
+
|
|
26
|
+
### CLAUDE.md updates:
|
|
27
|
+
- Add a new "Worktree Mode" subsection under "Architectural Decisions" explaining:
|
|
28
|
+
- Worktree path convention: `~/.raf/worktrees/<repo-basename>/<project-id>`
|
|
29
|
+
- Branch naming: full project folder name (e.g., `020-my-feature`)
|
|
30
|
+
- How worktree mode detection works (--worktree flag required on both plan and do)
|
|
31
|
+
- The lifecycle: create worktree -> plan in worktree -> execute in worktree -> optionally merge with `--merge`
|
|
32
|
+
- Merge strategy: ff preferred, merge-commit fallback, abort on conflicts
|
|
33
|
+
- Worktrees are NOT cleaned up after completion or merge
|
|
34
|
+
- Single project limitation (no multi-project with --worktree)
|
|
35
|
+
- `--merge` only valid with `--worktree`
|
|
36
|
+
- Add `--worktree` and `--merge` to the plan and do command descriptions if they exist in CLAUDE.md
|
|
37
|
+
|
|
38
|
+
## Implementation Steps
|
|
39
|
+
1. Read both README.md and CLAUDE.md to understand current structure
|
|
40
|
+
2. Add worktree content to README.md in the appropriate sections
|
|
41
|
+
3. Add worktree architectural decision to CLAUDE.md
|
|
42
|
+
4. Ensure the documentation is consistent with the actual implementation
|
|
43
|
+
|
|
44
|
+
## Acceptance Criteria
|
|
45
|
+
- [ ] README.md has `--worktree` and `--merge` in Features, Commands, and Command Reference
|
|
46
|
+
- [ ] README.md has a "Worktree Mode" section with workflow explanation
|
|
47
|
+
- [ ] CLAUDE.md has a "Worktree Mode" architectural decision section
|
|
48
|
+
- [ ] Documentation mentions that worktrees persist (no auto-cleanup)
|
|
49
|
+
- [ ] Documentation matches the implemented behavior
|
|
50
|
+
- [ ] No existing documentation is broken or contradicted
|
|
51
|
+
|
|
52
|
+
## Notes
|
|
53
|
+
- Keep documentation concise - match the existing style of both files
|
|
54
|
+
- Focus on the user workflow in README.md and the technical architecture in CLAUDE.md
|
|
55
|
+
- The worktree path example should use concrete values so it's easy to understand
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Project Decisions
|
|
2
|
+
|
|
3
|
+
## Should we remove raf status or modify it?
|
|
4
|
+
Don't remove status. Add automatic worktree discovery — no flag needed.
|
|
5
|
+
|
|
6
|
+
## Should raf status need a --worktree flag?
|
|
7
|
+
No. Always look for worktree projects automatically (if in a git repo).
|
|
8
|
+
|
|
9
|
+
## Should raf status show only worktree projects or both main and worktree?
|
|
10
|
+
Both combined. If a project exists in both main repo and worktree, don't duplicate in list mode — only show additional worktree projects and mark them.
|
|
11
|
+
|
|
12
|
+
## How should worktree-only projects be marked in the status list?
|
|
13
|
+
Indented under a "Worktrees:" header at the bottom of the list.
|
|
14
|
+
|
|
15
|
+
## How should single-project view work when project exists in both main and worktree?
|
|
16
|
+
Show both states separately ONLY if they differ. For example, after an amend, the main repo might show 5/5 tasks done while the worktree shows 5/7 (not fully completed). List both with clear labels (Main: / Worktree:). If states are identical, show just the normal view with no worktree label.
|
|
17
|
+
|
|
18
|
+
## Should worktree projects always appear in status output?
|
|
19
|
+
Only if they differ from their main repo counterpart (more tasks, different statuses). If identical, skip them. Worktree-only projects (no main counterpart) are always shown.
|
|
20
|
+
|
|
21
|
+
## For raf plan --amend syntax change — keep -a alias?
|
|
22
|
+
Keep -a alias. However, this task was SKIPPED — Commander.js treats both orderings identically so no code change needed.
|
|
23
|
+
|
|
24
|
+
## For removing multi-project support from raf do — what should the arg look like?
|
|
25
|
+
Single project argument only: `raf do <project>` with exactly one identifier.
|
|
26
|
+
|
|
27
|
+
## For amend commit — should plan files be included?
|
|
28
|
+
Yes. Commit input.md, decisions.md, AND any new/modified plan files.
|
|
29
|
+
|
|
30
|
+
## Should amend commit message be distinct from new plan commit?
|
|
31
|
+
Yes. Use `RAF[NNN] Amend: project-name` for amendments (vs `RAF[NNN] Plan: project-name` for new plans).
|
|
32
|
+
|
|
33
|
+
## Should planning/amend exit messages be worktree-aware?
|
|
34
|
+
Yes. When running in worktree mode, the exit message should show `raf do <project> --worktree` instead of `raf do <project>`. Both planning and amend prompts need this.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
- [ ] remove "raf status"
|
|
2
|
+
- [ ] support only "raf plan project --amend" syntax (remove support for "raf plan --amend project syntax). update docs (readme and claude.md)
|
|
3
|
+
- [ ] remove multi project support for raf do
|
|
4
|
+
- [ ] even if plan was not created in amend (but updated) RAF should still commit input and decisions and updated plan files
|
|
5
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Outcome: Add Automatic Worktree Discovery to raf status
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Added automatic worktree project discovery to `raf status`. When inside a git repo, the status command now discovers and displays worktree projects from `~/.raf/worktrees/<repo>/` alongside main repo projects, with no flag required.
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### `src/commands/status.ts`
|
|
10
|
+
- Added `getWorktreeContext()` to resolve repo basename and RAF relative path
|
|
11
|
+
- Added `discoverWorktreeProjectStates()` to scan worktree directories and derive project state
|
|
12
|
+
- Added `projectStatesDiffer()` to compare main vs worktree project states (by task count and statuses)
|
|
13
|
+
- **List mode** (`raf status`): Shows main repo projects normally, then appends a `Worktrees:` section listing worktree projects that differ from their main repo counterpart. Identical projects are hidden. Worktree-only projects always shown.
|
|
14
|
+
- **Single project mode** (`raf status <project>`): Shows both "Main:" and "Worktree:" progress bars when states differ. Shows only one view when identical or when project exists in only one location.
|
|
15
|
+
- **JSON output**: List mode wraps in `{ projects: [...], worktrees: [...] }`. Single project mode adds `worktree` field when worktree data exists.
|
|
16
|
+
- Gracefully handles non-git-repo case (skips worktree discovery silently)
|
|
17
|
+
|
|
18
|
+
### `tests/unit/status-command.test.ts`
|
|
19
|
+
- Added 10 new tests covering:
|
|
20
|
+
- Project state comparison (identical states, differing task counts, differing statuses)
|
|
21
|
+
- Worktree project discovery patterns
|
|
22
|
+
- Filtering worktree-only vs counterpart projects
|
|
23
|
+
- Stats computation for worktree projects
|
|
24
|
+
|
|
25
|
+
### `README.md`
|
|
26
|
+
- Updated `raf status` section to mention automatic worktree discovery
|
|
27
|
+
|
|
28
|
+
### `CLAUDE.md`
|
|
29
|
+
- Added worktree discovery details to the Worktree Mode section
|
|
30
|
+
|
|
31
|
+
## Acceptance Criteria Verification
|
|
32
|
+
|
|
33
|
+
- [x] `raf status` lists main repo projects normally, then worktree projects that differ under a `Worktrees:` header
|
|
34
|
+
- [x] Worktree projects identical to their main repo counterpart are not shown
|
|
35
|
+
- [x] `raf status <project>` shows both main repo and worktree state only when they differ
|
|
36
|
+
- [x] `raf status <project>` shows just worktree state when project only exists in worktree
|
|
37
|
+
- [x] `--json` includes worktree project data
|
|
38
|
+
- [x] Non-git-repo environments work fine (worktree section just doesn't appear)
|
|
39
|
+
- [x] README.md and CLAUDE.md updated
|
|
40
|
+
- [x] Tests cover the new functionality (10 new tests, all passing)
|
|
41
|
+
- [x] All existing tests pass (1 pre-existing failure in planning-prompt.test.ts unrelated to changes)
|
|
42
|
+
|
|
43
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Outcome: Remove Multi-Project Support from raf do
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Simplified `raf do` to accept only a single project identifier, removing the multi-project execution feature. The command argument changed from `[projects...]` (variadic) to `[project]` (single optional). All multi-project logic was removed.
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### `src/commands/do.ts`
|
|
10
|
+
- Changed `.argument('[projects...]', ...)` to `.argument('[project]', ...)`
|
|
11
|
+
- Changed action handler signature from `(projects: string[], ...)` to `(project: string | undefined, ...)`
|
|
12
|
+
- Rewrote `runDoCommand()` to work with a single optional identifier:
|
|
13
|
+
- No array iteration, deduplication (`seenPaths`), or error accumulation
|
|
14
|
+
- Direct project resolution instead of loop
|
|
15
|
+
- Simplified merge check: `result.success` instead of `results.every(r => r.success)`
|
|
16
|
+
- Removed `printMultiProjectSummary()` function entirely
|
|
17
|
+
- Removed `isMultiProject` flag and multi-project verbose logging
|
|
18
|
+
- Removed verbose model logging for multi-project (`if (verbose && model && resolvedProjects.length > 1)`)
|
|
19
|
+
- Removed worktree guard for multiple projects (no longer needed)
|
|
20
|
+
- Removed unused `SYMBOLS` import
|
|
21
|
+
|
|
22
|
+
### `tests/unit/do-multiproject.test.ts`
|
|
23
|
+
- Deleted entirely
|
|
24
|
+
|
|
25
|
+
### `tests/unit/do-command.test.ts`
|
|
26
|
+
- Removed "Multiple Projects with Full Folder Names" describe block
|
|
27
|
+
- Removed "Mixed Formats" describe block (tested multi-identifier resolution)
|
|
28
|
+
- Kept all single-project, backward compatibility, and error handling tests
|
|
29
|
+
|
|
30
|
+
### `README.md`
|
|
31
|
+
- Removed `raf do 3 4 5` example from usage
|
|
32
|
+
- Changed command reference from `raf do [projects...]` to `raf do [project]`
|
|
33
|
+
- Removed `--worktree supports a single project at a time (no multi-project)` line
|
|
34
|
+
|
|
35
|
+
### `CLAUDE.md`
|
|
36
|
+
- Removed `### Multi-Project Execution` section from architectural decisions
|
|
37
|
+
- Removed `--worktree supports single project only (no multi-project)` line from worktree section
|
|
38
|
+
|
|
39
|
+
## Acceptance Criteria Verification
|
|
40
|
+
|
|
41
|
+
- [x] `raf do 3` works for a single project
|
|
42
|
+
- [x] `raf do` (no args) still shows interactive picker
|
|
43
|
+
- [x] `raf do --worktree` still shows worktree picker
|
|
44
|
+
- [x] `raf do 3 4` — Commander.js with `[project]` ignores extra args
|
|
45
|
+
- [x] `printMultiProjectSummary` and multi-project loop removed
|
|
46
|
+
- [x] `do-multiproject.test.ts` removed
|
|
47
|
+
- [x] README.md and CLAUDE.md updated (no multi-project references)
|
|
48
|
+
- [x] All remaining tests pass (843 pass, 1 pre-existing failure in planning-prompt.test.ts unrelated)
|
|
49
|
+
|
|
50
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Outcome: Commit Planning Artifacts (Including Plan Files) on Amend
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Extended `commitPlanningArtifacts()` to support amending by accepting additional file paths and an `isAmend` flag. The amend flow in `plan.ts` now passes new plan file paths to the commit function, and uses a distinct `Amend:` commit message prefix. Also fixed a bug where `isGitRepo()` was not receiving the `cwd` option for worktree support.
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### `src/core/git.ts`
|
|
10
|
+
- Extended `commitPlanningArtifacts()` options to include `additionalFiles?: string[]` and `isAmend?: boolean`
|
|
11
|
+
- When `isAmend` is true, commit message uses `RAF[NNN] Amend: project-name` instead of `RAF[NNN] Plan: project-name`
|
|
12
|
+
- Additional files are staged alongside `input.md` and `decisions.md`
|
|
13
|
+
- Fixed bug: `isGitRepo()` now receives `execCwd` parameter for correct worktree support (was called without `cwd` previously)
|
|
14
|
+
|
|
15
|
+
### `src/commands/plan.ts`
|
|
16
|
+
- Updated `runAmendCommand()` to build full paths for new plan files (`newPlanPaths = newPlanFiles.map(f => path.join(plansDir, f))`)
|
|
17
|
+
- Passes `additionalFiles` and `isAmend: true` to `commitPlanningArtifacts()`
|
|
18
|
+
- Normal `raf plan` flow unchanged — still only commits input + decisions with "Plan:" prefix
|
|
19
|
+
|
|
20
|
+
### `tests/unit/commit-planning-artifacts.test.ts`
|
|
21
|
+
- Added test: "should use 'Amend:' prefix when isAmend is true"
|
|
22
|
+
- Added test: "should stage additional files when provided"
|
|
23
|
+
- Added test: "should pass cwd to isGitRepo for worktree support"
|
|
24
|
+
- All 11 tests pass (8 existing + 3 new)
|
|
25
|
+
|
|
26
|
+
## Acceptance Criteria Verification
|
|
27
|
+
|
|
28
|
+
- [x] `raf plan --amend` commits input.md, decisions.md, and new plan files together
|
|
29
|
+
- [x] Amend commits use message format `RAF[NNN] Amend: project-name`
|
|
30
|
+
- [x] Normal `raf plan` still uses `RAF[NNN] Plan: project-name` and only commits input + decisions
|
|
31
|
+
- [x] Worktree mode works correctly (cwd passed through)
|
|
32
|
+
- [x] Tests cover the amend commit scenario (3 new tests)
|
|
33
|
+
- [x] All existing tests pass (846 pass, 1 pre-existing failure in planning-prompt.test.ts unrelated)
|
|
34
|
+
|
|
35
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Outcome: Make Planning and Amend Exit Messages Worktree-Aware
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Made the exit messages in both planning and amend prompts worktree-aware. When planning or amending in worktree mode, the exit message now shows `raf do <project> --worktree` instead of `raf do <project>`. Also improved the amend prompt's exit message to include the `raf do` command (previously it only said "Press Ctrl-C twice to exit").
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### `src/prompts/planning.ts`
|
|
10
|
+
- Added `worktreeMode?: boolean` to `PlanningPromptParams` interface
|
|
11
|
+
- Updated `getPlanningPrompt()` to conditionally append ` --worktree` to the `raf do <project>` exit message
|
|
12
|
+
|
|
13
|
+
### `src/prompts/amend.ts`
|
|
14
|
+
- Added `worktreeMode?: boolean` to `AmendPromptParams` interface
|
|
15
|
+
- Updated `getAmendPrompt()` exit message from "Press Ctrl-C twice to exit" to include `raf do <project>` command with conditional `--worktree` flag
|
|
16
|
+
|
|
17
|
+
### `src/commands/plan.ts`
|
|
18
|
+
- Passed `worktreeMode` to `getPlanningPrompt()` in `runPlanCommand()`
|
|
19
|
+
- Passed `worktreeMode` to `getAmendPrompt()` in `runAmendCommand()`
|
|
20
|
+
|
|
21
|
+
### `tests/unit/planning-prompt.test.ts`
|
|
22
|
+
- Added 3 new tests: worktreeMode false, undefined, and true variations
|
|
23
|
+
|
|
24
|
+
### `tests/unit/amend-prompt.test.ts` (new file)
|
|
25
|
+
- Added 7 tests covering basic prompt functionality and worktree mode variations
|
|
26
|
+
|
|
27
|
+
## Acceptance Criteria Verification
|
|
28
|
+
|
|
29
|
+
- [x] Planning in worktree mode shows `raf do <project> --worktree` in exit message
|
|
30
|
+
- [x] Planning in normal mode still shows `raf do <project>` in exit message
|
|
31
|
+
- [x] Amend in worktree mode shows `raf do <project> --worktree` in exit message
|
|
32
|
+
- [x] Amend in normal mode shows exit message without `--worktree`
|
|
33
|
+
- [x] Tests cover both worktree and non-worktree variations (6 new tests)
|
|
34
|
+
- [x] All existing tests pass (856 pass, 1 pre-existing failure in planning-prompt.test.ts unrelated)
|
|
35
|
+
|
|
36
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Task: Add Automatic Worktree Discovery to raf status
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Make `raf status` always discover and display worktree projects alongside main repo projects — no flag required.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Currently `raf status` only discovers and displays projects from the main RAF directory. Projects that exist only in worktrees (`~/.raf/worktrees/<repo>/<project>/`) are invisible to the status command. This makes it hard to track worktree project progress without running `raf do --worktree`. Worktree discovery should be automatic — if a git repo is detected and worktree projects exist, they should appear.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- **No new flag** — worktree discovery happens automatically when the current directory is inside a git repo
|
|
11
|
+
- **List mode** (`raf status`): Show main repo projects as normal, then append a `Worktrees:` section at the bottom listing worktree projects that DIFFER from their main repo counterpart (indented). A worktree project "differs" if it has more tasks (amend added new ones) or different task statuses. If the worktree state is identical to main repo, skip it. Worktree-only projects (no main repo counterpart) are always shown.
|
|
12
|
+
- **Single project mode** (`raf status <project>`): Show the project from BOTH main repo and worktree only when they differ. This is common after `--amend` — e.g., main repo shows 5/5 tasks completed (original plan), while worktree shows 5/7 (amended with 2 new tasks not yet executed). Display both states, clearly labeled (e.g., "Main:" and "Worktree:"). If the states are identical, show just the main view without any worktree label. If the project only exists in worktree, show just that one.
|
|
13
|
+
- Both modes should support the existing `--json` flag (include worktree data in JSON output)
|
|
14
|
+
- Gracefully handle non-git-repo case: if `getRepoBasename()` returns null, skip worktree discovery silently
|
|
15
|
+
- Use existing worktree utilities: `getRepoBasename()`, `listWorktreeProjects()`, `computeWorktreePath()`, `computeWorktreeBaseDir()` from `src/core/worktree.ts`
|
|
16
|
+
- Use existing state derivation: `deriveProjectState()`, `getDerivedStats()` from `src/core/state-derivation.ts`
|
|
17
|
+
- Follow existing patterns in `src/commands/do.ts` for worktree project resolution (searching worktree directories, resolving identifiers within them)
|
|
18
|
+
|
|
19
|
+
## Implementation Steps
|
|
20
|
+
1. In `runStatusCommand()` in `src/commands/status.ts`, after the main repo logic, attempt worktree discovery using `getRepoBasename()` and `listWorktreeProjects()`. If not in a git repo, skip silently.
|
|
21
|
+
2. For list mode: discover worktree projects, filter out any that already appear in main repo projects (match by folder name), then display remaining under a `Worktrees:` header with indentation. Derive state for each worktree project to show progress bars.
|
|
22
|
+
3. For single-project mode: resolve the project identifier in both main repo and worktrees. If found in both, show two progress displays labeled "Main:" and "Worktree:". If found in only one, show just that.
|
|
23
|
+
4. Update the `--json` output to include worktree project data when worktree projects are discovered
|
|
24
|
+
5. Update tests in `tests/unit/status-command.test.ts` to cover worktree discovery for both list and single-project modes
|
|
25
|
+
6. Update README.md `raf status` section to mention that worktree projects are shown automatically
|
|
26
|
+
7. Update CLAUDE.md to mention automatic worktree discovery in the status command
|
|
27
|
+
|
|
28
|
+
## Acceptance Criteria
|
|
29
|
+
- [ ] `raf status` lists main repo projects normally, then worktree projects that differ under a `Worktrees:` header
|
|
30
|
+
- [ ] Worktree projects identical to their main repo counterpart are not shown
|
|
31
|
+
- [ ] `raf status <project>` shows both main repo and worktree state only when they differ
|
|
32
|
+
- [ ] `raf status <project>` shows just worktree state when project only exists in worktree
|
|
33
|
+
- [ ] `--json` includes worktree project data
|
|
34
|
+
- [ ] Non-git-repo environments work fine (worktree section just doesn't appear)
|
|
35
|
+
- [ ] README.md and CLAUDE.md updated
|
|
36
|
+
- [ ] Tests cover the new functionality
|
|
37
|
+
- [ ] All existing tests pass
|
|
38
|
+
|
|
39
|
+
## Notes
|
|
40
|
+
- The worktree project resolution pattern already exists in `do.ts` — reuse that logic (or extract shared utility if the duplication is significant)
|
|
41
|
+
- `listWorktreeProjects()` returns folder names like `['020-my-feature', '021-another']` — use `extractProjectNumber()` and `extractProjectName()` to display them consistently with main repo projects
|
|
42
|
+
- Worktree projects need their RAF relative path computed (from repo root to RAF dir) to find the project folder inside the worktree, same as `do.ts` does
|
|
43
|
+
- No changes needed to `StatusCommandOptions` type or command definition — this is automatic behavior, not a flag
|