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
package/CLAUDE.md
CHANGED
|
@@ -30,15 +30,15 @@ src/
|
|
|
30
30
|
Each RAF project follows this structure:
|
|
31
31
|
```
|
|
32
32
|
RAF/
|
|
33
|
-
└──
|
|
33
|
+
└── abcdef-project-name/ # 6-char epoch-based base26 ID (a-z only)
|
|
34
34
|
├── input.md # User requirements
|
|
35
35
|
├── decisions.md # Q&A from planning interviews
|
|
36
36
|
├── plans/ # Task breakdowns
|
|
37
|
-
│ ├──
|
|
38
|
-
│ └──
|
|
37
|
+
│ ├── 01-task-name.md # 2-char base36 task ID
|
|
38
|
+
│ └── 02-another-task.md
|
|
39
39
|
└── outcomes/ # Completed task results
|
|
40
|
-
├──
|
|
41
|
-
└──
|
|
40
|
+
├── 01-task-name.md
|
|
41
|
+
└── 02-another-task.md
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
### Plan File Structure
|
|
@@ -54,7 +54,7 @@ Each plan file follows this structure:
|
|
|
54
54
|
[Why this task is needed]
|
|
55
55
|
|
|
56
56
|
## Dependencies
|
|
57
|
-
[Optional - comma-separated task IDs, e.g., "
|
|
57
|
+
[Optional - comma-separated task IDs, e.g., "01, 02"]
|
|
58
58
|
[If a dependency fails, this task is blocked]
|
|
59
59
|
|
|
60
60
|
## Requirements
|
|
@@ -75,7 +75,7 @@ Each plan file follows this structure:
|
|
|
75
75
|
|
|
76
76
|
**Dependencies Section**:
|
|
77
77
|
- Optional - omit if task has no dependencies
|
|
78
|
-
- Uses task IDs only (e.g., `
|
|
78
|
+
- Uses task IDs only (e.g., `01, 02`)
|
|
79
79
|
- If a dependency fails, dependent tasks are automatically blocked
|
|
80
80
|
|
|
81
81
|
## Development Commands
|
|
@@ -134,16 +134,28 @@ npm run lint # Type check without emit
|
|
|
134
134
|
- All failure outcomes end with `<promise>FAILED</promise>` marker
|
|
135
135
|
|
|
136
136
|
### Project Naming Convention
|
|
137
|
-
- Format: `
|
|
137
|
+
- Format: `XXXXXX-project-name` where `XXXXXX` is a 6-character base26 ID (a-z only)
|
|
138
|
+
- ID is generated from `(current_unix_seconds - RAF_EPOCH)` encoded as base26, left-padded with 'a' to 6 characters
|
|
139
|
+
- Base26 encoding: a=0, b=1, ..., z=25 (lowercase letters only, no digits)
|
|
140
|
+
- RAF_EPOCH is 2026-01-01T00:00:00Z (Unix timestamp 1767225600)
|
|
138
141
|
- Project name is kebab-case derived from core feature
|
|
139
|
-
-
|
|
142
|
+
- IDs are unique by timestamp and sort chronologically
|
|
143
|
+
- Project IDs are visually distinct from task IDs (which use base36 with digits)
|
|
144
|
+
|
|
145
|
+
### Task ID Format
|
|
146
|
+
- Task IDs are 2-character base36 strings, zero-padded (e.g., `01`, `0a`, `1z`, `zz`)
|
|
147
|
+
- Base36 charset: 0-9, a-z (lowercase)
|
|
148
|
+
- Supports up to 1296 tasks per project (00-zz)
|
|
149
|
+
- Task numbering starts at `01` (not `00`)
|
|
150
|
+
- Sort order: 00, 01, ..., 09, 0a, 0b, ..., 0z, 10, 11, ..., zz
|
|
151
|
+
- Utilities in `src/utils/paths.ts`: `encodeTaskId()`, `decodeTaskId()`, `TASK_ID_PATTERN`
|
|
152
|
+
- File naming: `01-task-name.md`, `0a-task-name.md`, etc.
|
|
140
153
|
|
|
141
154
|
### Project Identifier Resolution
|
|
142
155
|
Support multiple identifier formats in commands:
|
|
143
|
-
1.
|
|
144
|
-
2.
|
|
145
|
-
3.
|
|
146
|
-
4. Full folder name: `001-fix-stuff` (exact match)
|
|
156
|
+
1. Base26 ID: `abcdef` (6-character epoch-based ID, a-z only)
|
|
157
|
+
2. Project name: `fix-stuff` (case-insensitive, partial match)
|
|
158
|
+
3. Full folder name: `abcdef-fix-stuff` (exact match)
|
|
147
159
|
|
|
148
160
|
Use `resolveProjectIdentifierWithDetails()` from `src/utils/paths.ts`
|
|
149
161
|
|
|
@@ -159,9 +171,9 @@ Claude writes a concise description of what was accomplished, focusing on the ac
|
|
|
159
171
|
|
|
160
172
|
Examples:
|
|
161
173
|
```
|
|
162
|
-
RAF[
|
|
163
|
-
RAF[
|
|
164
|
-
RAF[
|
|
174
|
+
RAF[abcdef:01] Add validation for user input fields
|
|
175
|
+
RAF[abcdef:02] Fix null pointer in auth handler
|
|
176
|
+
RAF[abaaba:03] Refactor database connection pooling
|
|
165
177
|
```
|
|
166
178
|
|
|
167
179
|
- Claude commits code changes and outcome file together in one commit per task
|
|
@@ -174,12 +186,96 @@ RAF[a01:003] Refactor database connection pooling
|
|
|
174
186
|
- New tasks numbered sequentially after last task
|
|
175
187
|
- No modification of existing plan files
|
|
176
188
|
|
|
177
|
-
###
|
|
178
|
-
- `raf do
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
189
|
+
### Worktree Mode
|
|
190
|
+
- `raf plan --worktree` and `raf do --worktree` run in an isolated git worktree
|
|
191
|
+
- Worktree path: `~/.raf/worktrees/<repo-basename>/<project-id>` (e.g., `~/.raf/worktrees/myapp/abcdef-my-feature`)
|
|
192
|
+
- Branch name matches the project folder name (e.g., `abcdef-my-feature`)
|
|
193
|
+
- `--worktree` flag is required on `plan`; on `do` it is auto-detected when a worktree project is selected from the picker
|
|
194
|
+
- `raf do` without arguments auto-discovers pending worktree projects and merges them into the project picker
|
|
195
|
+
- Worktree projects are labeled with `[worktree]` suffix in the picker
|
|
196
|
+
- Selecting a worktree project automatically enables worktree mode (post-action picker, worktree cwd)
|
|
197
|
+
- Projects are deduplicated: when a folder exists in both local and worktree, the worktree version is shown
|
|
198
|
+
- Mixed local and worktree projects are sorted chronologically
|
|
199
|
+
- `raf status` automatically discovers and displays worktree projects (no flag needed)
|
|
200
|
+
- List mode: worktree projects that differ from main repo shown under `Worktrees:` header
|
|
201
|
+
- Single project mode: shows both main and worktree state when they differ
|
|
202
|
+
- Identical worktree projects are hidden; worktree-only projects always shown
|
|
203
|
+
- Lifecycle: create worktree -> plan in worktree -> pick post-action -> execute in worktree -> auto-run chosen action
|
|
204
|
+
- **Post-execution picker**: Before task execution, an interactive picker asks what to do after tasks complete:
|
|
205
|
+
1. **Merge** — merge branch into original branch (fast-forward preferred, merge-commit fallback)
|
|
206
|
+
2. **Create PR** — push branch and create a GitHub PR (uses `createPullRequest()` from `pull-request.ts`)
|
|
207
|
+
3. **Leave branch** — do nothing, keep the branch as-is
|
|
208
|
+
- PR option runs preflight checks immediately; falls back to "leave" if `gh` CLI is missing or unauthenticated
|
|
209
|
+
- On task failure, the chosen post-action is skipped with a message
|
|
210
|
+
- Worktree cleanup: all post-actions (merge, PR, leave) clean up the worktree directory (branch preserved in git)
|
|
211
|
+
- On failure, worktree is kept for inspection
|
|
212
|
+
- `raf plan --amend --worktree` auto-recreates the worktree when it was cleaned up:
|
|
213
|
+
- If the branch exists (common after cleanup): recreates worktree from the existing branch
|
|
214
|
+
- If no branch exists: creates a fresh worktree and copies project files from the main repo
|
|
215
|
+
- On plan failure with no plan files created, the worktree is cleaned up automatically
|
|
216
|
+
- Core utilities in `src/core/worktree.ts`: `createWorktree()`, `createWorktreeFromBranch()`, `branchExists()`, `validateWorktree()`, `mergeWorktreeBranch()`, `removeWorktree()`, `listWorktreeProjects()`
|
|
217
|
+
- Post-execution picker: `pickPostExecutionAction()` and `PostExecutionAction` type exported from `src/commands/do.ts`
|
|
218
|
+
|
|
219
|
+
### PR Creation from Worktree
|
|
220
|
+
- `src/core/pull-request.ts` provides `createPullRequest()` to create GitHub PRs from worktree branches
|
|
221
|
+
- Requires `gh` CLI installed and authenticated (`gh auth login`)
|
|
222
|
+
- Auto-detects base branch (from `refs/remotes/origin/HEAD`, falling back to `main`/`master`)
|
|
223
|
+
- PR title derived from project name (kebab-case to human-readable)
|
|
224
|
+
- PR body generated by Claude Haiku summarizing input.md, decisions.md, and outcomes
|
|
225
|
+
- Falls back to simple body if Claude is unavailable
|
|
226
|
+
- Auto-pushes branch to origin if not already pushed
|
|
227
|
+
- Preflight checks: `prPreflight()` validates gh CLI, authentication, GitHub remote
|
|
228
|
+
- Key functions: `createPullRequest()`, `prPreflight()`, `generatePrBody()`, `generatePrTitle()`, `detectBaseBranch()`
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
## PR Review
|
|
232
|
+
|
|
233
|
+
When reviewing a PR or addressing PR comments, use `gh` CLI to read PR details:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
# View PR description and metadata
|
|
237
|
+
gh pr view <number>
|
|
238
|
+
|
|
239
|
+
# View PR diff
|
|
240
|
+
gh pr diff <number>
|
|
241
|
+
|
|
242
|
+
# View review comments (inline code comments)
|
|
243
|
+
gh api repos/{owner}/{repo}/pulls/<number>/comments
|
|
244
|
+
|
|
245
|
+
# View PR review summaries
|
|
246
|
+
gh api repos/{owner}/{repo}/pulls/<number>/reviews
|
|
247
|
+
|
|
248
|
+
# View general PR conversation comments (non-inline)
|
|
249
|
+
gh api repos/{owner}/{repo}/issues/<number>/comments
|
|
250
|
+
|
|
251
|
+
# List PR files changed
|
|
252
|
+
gh pr diff <number> --name-only
|
|
253
|
+
|
|
254
|
+
# View PR checks/CI status
|
|
255
|
+
gh pr checks <number>
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Checking Out PR Branches
|
|
259
|
+
|
|
260
|
+
PR branches are often checked out in git worktrees. Before creating a new checkout, check for existing worktrees:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# List existing worktrees
|
|
264
|
+
git worktree list
|
|
265
|
+
|
|
266
|
+
# Find the branch name from the PR
|
|
267
|
+
gh pr view <number> --json headRefName -q .headRefName
|
|
268
|
+
|
|
269
|
+
# If gh is rate-limited, list remote branches to find it
|
|
270
|
+
git ls-remote --heads origin
|
|
271
|
+
|
|
272
|
+
# Check if branch is already in a worktree (look for the path in worktree list output)
|
|
273
|
+
# If it is, work directly in that worktree path (e.g., /Users/eremeev/.raf/worktrees/Paperi/<branch>)
|
|
274
|
+
# If not, checkout normally:
|
|
275
|
+
git fetch origin <branch> && git checkout <branch>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
When working in a worktree, use absolute paths to the worktree directory for all file operations and builds.
|
|
183
279
|
|
|
184
280
|
## Important Reminders
|
|
185
281
|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Project Decisions
|
|
2
|
+
|
|
3
|
+
## How should the --worktree flag be persisted so `raf do` knows the project uses worktree mode?
|
|
4
|
+
By naming convention - if a worktree directory matching `<repo>-<project id>` exists in `../<repo>-worktrees/`, the project is in worktree mode. No config file needed; existence of the worktree directory is the signal.
|
|
5
|
+
|
|
6
|
+
## What branch name format should be used for the worktree branch?
|
|
7
|
+
Full project folder name (e.g., `020-worktree-weaver`) - matches the project folder exactly.
|
|
8
|
+
|
|
9
|
+
## Should planning also happen inside the worktree directory, or only execution?
|
|
10
|
+
Both plan and execute in worktree. Create worktree first, then run planning inside it. Plans, decisions, input all live in the worktree.
|
|
11
|
+
|
|
12
|
+
## What should happen during auto-merge on project completion if there are merge conflicts?
|
|
13
|
+
~~Fast-forward only, warn on conflict. Only auto-merge if fast-forward is possible. If not, print a warning and leave the branch for manual merge.~~ UPDATED: Merge is controlled by `--merge` flag. Try ff first, fall back to merge-commit. On conflicts, run `git merge --abort` and warn the user to merge manually.
|
|
14
|
+
|
|
15
|
+
## Should the project folder structure inside the worktree mirror the same relative path?
|
|
16
|
+
Yes, same relative path. The worktree is a full repo clone. Project folder lives at the same `RAF/020-project-name/` path inside the worktree, so Claude works normally.
|
|
17
|
+
|
|
18
|
+
## Should the worktree directory be cleaned up after a successful merge?
|
|
19
|
+
~~Auto-cleanup after merge. Run `git worktree remove` and delete the worktree directory after successful merge.~~ UPDATED: No cleanup after merge. Worktrees persist indefinitely. No `raf cleanup` command needed.
|
|
20
|
+
|
|
21
|
+
## For `raf do` without --worktree flag: should it auto-detect worktree mode?
|
|
22
|
+
Require `--worktree` flag explicitly. Since it allows RAF to `cd` into the worktree dir and find project plans there. Both `raf plan` and `raf do` need the flag.
|
|
23
|
+
|
|
24
|
+
## When should the git worktree be created during `raf plan --worktree`?
|
|
25
|
+
~~Require the project name upfront when `--worktree` flag is present.~~ UPDATED: Project name is NOT required upfront for `--worktree`. The normal name picker/auto-generation flow works. The editor uses a temp file (never touches the main tree), so the worktree is created AFTER the project name is known. Flow: editor (temp file) → name resolution → create worktree → create project folder inside worktree → save input.md inside worktree.
|
|
26
|
+
|
|
27
|
+
## Should `raf do --worktree` validate the worktree exists before execution?
|
|
28
|
+
Yes, validate and fail with a helpful message. Check that: (1) the worktree directory exists, (2) the project folder and plan files exist inside the worktree. If not, error with guidance like "No worktree found. Did you plan with --worktree?"
|
|
29
|
+
|
|
30
|
+
## Should `raf status` show worktree information?
|
|
31
|
+
No, keep status output simple. No worktree-specific display.
|
|
32
|
+
|
|
33
|
+
## Should `raf do --worktree` support multiple projects?
|
|
34
|
+
No, `--worktree` only supports a single project at a time. Multi-project execution is not compatible with worktree mode.
|
|
35
|
+
|
|
36
|
+
## How should the CLI syntax work for `raf plan --worktree`?
|
|
37
|
+
~~Name is required when `--worktree` is used.~~ UPDATED: Name is optional, same as non-worktree mode. `raf plan --worktree` works without a name — the name picker/auto-generation runs as normal. `raf plan my-feature --worktree` also works (skips name picker). The `--auto` flag works the same (auto-selects first generated name).
|
|
38
|
+
|
|
39
|
+
## Should planning artifacts be committed in worktree mode?
|
|
40
|
+
Yes, commit in the worktree branch. Same commit behavior as today, but the commit lands in the worktree's branch instead of the main branch.
|
|
41
|
+
|
|
42
|
+
## Where should worktree directories be stored?
|
|
43
|
+
In `~/.raf/worktrees/<repo-basename>/<project-id>`, where `<repo-basename>` is the basename of the repo root directory (e.g., `myapp` from `/Users/me/projects/myapp`), and `<project-id>` is the full project folder name (e.g., `020-worktree-weaver`). This keeps worktrees outside the repo entirely — no `.gitignore` changes needed.
|
|
44
|
+
|
|
45
|
+
## Should the parent `<repo>` directory under `~/.raf/worktrees/` be cleaned up when empty?
|
|
46
|
+
No. Leave `~/.raf/worktrees/<repo>/` in place. No separate cleanup command needed.
|
|
47
|
+
|
|
48
|
+
## How should `raf plan --amend --worktree` resolve the project identifier?
|
|
49
|
+
Resolve from the worktree. Since plans only exist inside the worktree in worktree mode, project identifier resolution should look inside `~/.raf/worktrees/<repo-basename>/` to find the matching project. This is part of task 002 (worktree-plan-command).
|
|
50
|
+
|
|
51
|
+
## When multiple uncompleted worktree projects are found (for `raf do --worktree` without project identifier), what should happen?
|
|
52
|
+
Show an interactive picker (like the existing non-worktree flow) to let the user choose one project.
|
|
53
|
+
|
|
54
|
+
## Should `raf do --worktree` without a project identifier be a new task or modify existing task 003?
|
|
55
|
+
Modify task 003 directly to support optional project identifier with auto-discovery. Keeps related logic together.
|
|
56
|
+
|
|
57
|
+
## What defines "latest completed project in main tree"?
|
|
58
|
+
The project with the highest ID where all tasks are completed (project status = 'completed').
|
|
59
|
+
|
|
60
|
+
## Should auto-discovery include worktree projects with failed tasks?
|
|
61
|
+
Yes, include both pending and failed worktree projects in the picker - they're all "uncompleted".
|
|
62
|
+
|
|
63
|
+
## If only one uncompleted worktree project is found, should it auto-select?
|
|
64
|
+
No, still show the picker/confirmation even for a single project, so the user can cancel.
|
|
65
|
+
|
|
66
|
+
## Should auto-discovery utility functions be added to task 001 (worktree utilities)?
|
|
67
|
+
Yes, add a utility function like `listWorktreeProjects()` to task 001, and have task 003 call it. Keeps worktree scanning logic reusable.
|
|
68
|
+
|
|
69
|
+
## What should the starting point for worktree scanning be?
|
|
70
|
+
Start from "highest completed project in main tree minus 3" instead of "after the latest completed". This accounts for amended projects — e.g., if the highest completed main-tree project is 008, scan worktrees starting from 006 (006, 007, 008, 009, 010, ...). This catches worktrees for projects that were amended after completion and now have new uncompleted tasks.
|
|
71
|
+
|
|
72
|
+
## Should worktrees be cleaned up after task completion or merge?
|
|
73
|
+
No. No cleanup, no deletion of worktree, no prune after task completion. No `raf cleanup` command is needed. Worktrees stay in place indefinitely.
|
|
74
|
+
|
|
75
|
+
## How should merging work after project completion in worktree mode?
|
|
76
|
+
Merge is controlled by a `--merge` flag on `raf do`. When `--merge` is present, attempt merge after all tasks complete. Allow merge-commits (not ff-only). On merge conflicts, notify the user. Without `--merge`, no merge happens.
|
|
77
|
+
|
|
78
|
+
## Should failed planning still clean up the worktree?
|
|
79
|
+
Yes. If planning fails or is interrupted and no plans were created, clean up the worktree that was just created. This is different from post-completion cleanup — it's cleaning up a half-created state.
|
|
80
|
+
|
|
81
|
+
## Should the worktree removal utility remain in task 001?
|
|
82
|
+
Yes. It's still needed for the failed-plan cleanup in task 002. Just remove post-completion cleanup references from task 004.
|
|
83
|
+
|
|
84
|
+
## Should `--merge` only work with `--worktree`?
|
|
85
|
+
Yes. `--merge` is only valid when `--worktree` is also present. Error if used without `--worktree`.
|
|
86
|
+
|
|
87
|
+
## What should happen on merge conflicts?
|
|
88
|
+
Abort the merge (`git merge --abort`) to leave the repo in a clean state, then tell the user to merge manually.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
add support for git worktree if you pass --worktree flag to "do" or "plan". plan should be created
|
|
2
|
+
with --worktree for raf do to work in worktree mode. --worktree means worktree folder will be
|
|
3
|
+
created with git. use path "../<current folder name>-worktrees/<current folder name>-<project id
|
|
4
|
+
like 001>". based on thether worktree dir exists in git we can validate if "raf do" can work in
|
|
5
|
+
worktree mode. in worktree mode raf switches to worktree dir (in created branch with project name) and plans, commits and do work there.
|
|
6
|
+
on project completion if it's possible to merge <project name> branch into original branch from with
|
|
7
|
+
raf was called - it does so
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
use .raf/worktrees/<repo> as a place for raf worktrees
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
make it possible to not specify project name in "raf do --worktree" command, for that raf will go to
|
|
16
|
+
worktrees repo and list uncompleted projects AFTER latest completed project in main tree
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
task 004 mentiones this:
|
|
21
|
+
|
|
22
|
+
When `raf do <project> --worktree` finishes with all tasks completed, the project branch should be merged back into the branch from which `raf` was originally called. This is the final step in the worktree lifecycle: plan in worktree -> execute in worktree -> merge back -> remove worktree. The parent directory (`~/.raf/worktrees/<repo>/`) is NOT cleaned up here — that is handled by `raf cleanup`.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
let's clarify cleanup situation (and remove mentionse about clean up from project plans)
|
|
26
|
+
the situation is this: no cleanup, no delition of worktree, prune etc after task completion. AND no
|
|
27
|
+
raf cleanup command need to be implemeted. look through all the plans and update
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Outcome: Git Worktree Utility Functions
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
Created `src/core/worktree.ts` module with all git worktree utility functions needed as the foundation for worktree support in RAF.
|
|
5
|
+
|
|
6
|
+
## Changes Made
|
|
7
|
+
|
|
8
|
+
### New Files
|
|
9
|
+
- **`src/core/worktree.ts`** - Core worktree utility module with 11 exported functions:
|
|
10
|
+
- `getRepoRoot()` - Get the git toplevel directory
|
|
11
|
+
- `getRepoBasename()` - Get the basename of the repo root (e.g., "myapp")
|
|
12
|
+
- `getCurrentBranch()` - Get the current branch name
|
|
13
|
+
- `computeWorktreePath(repoBasename, projectId)` - Compute `~/.raf/worktrees/<repo>/<project>` path
|
|
14
|
+
- `computeWorktreeBaseDir(repoBasename)` - Compute `~/.raf/worktrees/<repo>/` path
|
|
15
|
+
- `getWorktreeProjectPath(worktreePath, projectRelativePath)` - Compute project path inside worktree
|
|
16
|
+
- `createWorktree(repoBasename, projectId)` - Create worktree with auto-created parent dir and new branch
|
|
17
|
+
- `validateWorktree(worktreePath, projectRelativePath)` - Validate worktree existence, git status, project content
|
|
18
|
+
- `mergeWorktreeBranch(branch, originalBranch)` - Merge with ff-first, fallback to merge-commit, abort on conflicts
|
|
19
|
+
- `removeWorktree(worktreePath)` - Remove a single worktree (for failed-plan cleanup)
|
|
20
|
+
- `listWorktreeProjects(repoBasename)` - List all worktree project directories for a repo
|
|
21
|
+
|
|
22
|
+
- **`tests/unit/worktree.test.ts`** - 30 unit tests covering all functions, error paths, and edge cases
|
|
23
|
+
|
|
24
|
+
### Interfaces Exported
|
|
25
|
+
- `WorktreeCreateResult` - Result of worktree creation
|
|
26
|
+
- `WorktreeMergeResult` - Result of branch merge (includes fastForward flag)
|
|
27
|
+
- `WorktreeValidation` - Validation result with exists/isValidWorktree/hasProjectFolder/hasPlans/projectPath
|
|
28
|
+
|
|
29
|
+
## Acceptance Criteria Verification
|
|
30
|
+
- [x] Worktree path computation returns `~/.raf/worktrees/<repo-basename>/<project-id>`
|
|
31
|
+
- [x] Parent directory `~/.raf/worktrees/<repo-basename>/` is created automatically
|
|
32
|
+
- [x] Worktree creation creates the directory and branch with correct names
|
|
33
|
+
- [x] Validation correctly identifies existing vs missing worktrees and checks for project content
|
|
34
|
+
- [x] Merge function tries fast-forward first, falls back to merge-commit, aborts on conflicts
|
|
35
|
+
- [x] Removal function removes a single worktree (for failed-plan cleanup only)
|
|
36
|
+
- [x] Listing function returns all worktree project directories for the current repo
|
|
37
|
+
- [x] Listing function returns empty array when no worktrees exist
|
|
38
|
+
- [x] All functions handle non-git-repo scenario gracefully
|
|
39
|
+
- [x] All functions handle errors and return meaningful messages
|
|
40
|
+
|
|
41
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Outcome: Add --worktree Flag to Plan Command
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
Added `--worktree` (`-w`) flag to `raf plan` that creates a git worktree for isolated planning. Supports both new project creation and amendment of existing worktree projects.
|
|
5
|
+
|
|
6
|
+
## Changes Made
|
|
7
|
+
|
|
8
|
+
### Modified Files
|
|
9
|
+
- **`src/commands/plan.ts`** - Added `--worktree` flag to the plan command with full support in both new project and amend flows:
|
|
10
|
+
- Added `-w, --worktree` option to Commander command definition
|
|
11
|
+
- Updated `PlanCommandOptions` interface with `worktree?: boolean`
|
|
12
|
+
- `runPlanCommand`: When `--worktree` is set, creates a worktree AFTER name resolution, creates project folder inside worktree at the correct relative path, saves input.md only in the worktree, runs Claude with `cwd` set to the worktree root, commits artifacts in the worktree branch, and shows success message with worktree path and `--worktree` suggestion for `raf do`
|
|
13
|
+
- `runAmendCommand`: When `--worktree` is set, resolves project from `~/.raf/worktrees/<repo>/` instead of main repo, validates worktree exists and is valid, runs amend flow with paths pointing into the worktree, commits amendment artifacts in the worktree branch
|
|
14
|
+
- Cleanup: failed planning with no plan files cleans up the worktree (new project only), amend does not create or clean up worktrees
|
|
15
|
+
- Added imports for worktree utilities, path utilities, and validation
|
|
16
|
+
|
|
17
|
+
- **`src/core/git.ts`** - Updated `commitPlanningArtifacts` to accept optional `{ cwd }` parameter so git commands can run from the worktree directory instead of the main repo
|
|
18
|
+
|
|
19
|
+
## Acceptance Criteria Verification
|
|
20
|
+
- [x] `raf plan --worktree` without project name works (name picker/auto-generation runs)
|
|
21
|
+
- [x] `raf plan my-feature --worktree` works with explicit name (skips name picker)
|
|
22
|
+
- [x] `raf plan --worktree --auto` works (auto-selects generated name)
|
|
23
|
+
- [x] Worktree is created AFTER name is resolved, not before
|
|
24
|
+
- [x] input.md is only saved inside the worktree, never in the main tree
|
|
25
|
+
- [x] Project folder is created at correct relative path inside worktree
|
|
26
|
+
- [x] Planning session runs with cwd set to worktree root
|
|
27
|
+
- [x] Planning artifacts are committed in the worktree branch
|
|
28
|
+
- [x] Success message mentions the worktree path and suggests `--worktree` flag for `raf do`
|
|
29
|
+
- [x] Without `--worktree`, behavior is unchanged
|
|
30
|
+
- [x] Failed planning cleans up the worktree (new project only)
|
|
31
|
+
- [x] Compatible with `--auto` and `--model` flags
|
|
32
|
+
- [x] `raf plan --amend <project> --worktree` resolves project from worktree directory
|
|
33
|
+
- [x] `raf plan --amend <project> --worktree` with no worktree shows helpful error
|
|
34
|
+
- [x] Amend flow reads existing plans/state from inside the worktree
|
|
35
|
+
- [x] New plan files from amend are committed in the worktree branch
|
|
36
|
+
- [x] Amend does NOT attempt to create or clean up the worktree
|
|
37
|
+
|
|
38
|
+
## Test Results
|
|
39
|
+
- Build: passes cleanly (no TypeScript errors)
|
|
40
|
+
- All 835 tests pass (834 pass, 1 pre-existing failure in planning-prompt.test.ts unrelated to this change)
|
|
41
|
+
- All 64 plan command tests pass
|
|
42
|
+
- All 8 commit-planning-artifacts tests pass
|
|
43
|
+
|
|
44
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Outcome: Add --worktree Flag to Do Command
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
Added `--worktree` (`-w`) flag to `raf do` that validates worktree existence and executes all tasks inside the worktree directory. Supports both explicit project identifier and auto-discovery of uncompleted worktree projects when no identifier is given.
|
|
5
|
+
|
|
6
|
+
## Changes Made
|
|
7
|
+
|
|
8
|
+
### Modified Files
|
|
9
|
+
- **`src/commands/do.ts`** - Added `--worktree` flag with full worktree support:
|
|
10
|
+
- Added `-w, --worktree` option to Commander command definition
|
|
11
|
+
- When `--worktree` with no identifier: auto-discovery flow via `discoverAndPickWorktreeProject()`:
|
|
12
|
+
- Lists worktree projects using `listWorktreeProjects()`
|
|
13
|
+
- Finds highest-numbered completed project in main tree
|
|
14
|
+
- Filters worktrees by threshold (highest completed - 3)
|
|
15
|
+
- Derives state for remaining worktrees, keeps uncompleted ones
|
|
16
|
+
- Shows interactive picker (even for single project)
|
|
17
|
+
- Shows appropriate messages for no projects / all completed
|
|
18
|
+
- When `--worktree` with explicit identifier:
|
|
19
|
+
- Validates single project only (errors if multiple)
|
|
20
|
+
- Resolves project from main repo or searches worktrees directly
|
|
21
|
+
- Validates worktree existence, git worktree status, project content, and plans
|
|
22
|
+
- Shows helpful error messages on validation failure
|
|
23
|
+
- When `--worktree` with identifier: validates worktree, resolves project path inside it
|
|
24
|
+
- Passes `worktreeCwd` to `executeSingleProject` which flows to `ClaudeRunner.run()`/`runVerbose()`
|
|
25
|
+
- Git operations (commit verification, stash) use worktree cwd
|
|
26
|
+
- Added imports for worktree utilities, path utilities, inquirer select, and discoverProjects
|
|
27
|
+
|
|
28
|
+
- **`src/core/git.ts`** - Added optional `cwd` parameter to git utility functions:
|
|
29
|
+
- `isGitRepo(cwd?)` - accepts optional cwd for worktree context
|
|
30
|
+
- `hasUncommittedChanges(cwd?)` - accepts optional cwd
|
|
31
|
+
- `getHeadCommitHash(cwd?)` - accepts optional cwd
|
|
32
|
+
- `stashChanges(name, cwd?)` - accepts optional cwd, propagates to internal calls
|
|
33
|
+
|
|
34
|
+
- **`src/types/config.ts`** - Added `worktree?: boolean` to `DoCommandOptions` interface
|
|
35
|
+
|
|
36
|
+
## Acceptance Criteria Verification
|
|
37
|
+
- [x] `raf do --worktree` without project identifier triggers auto-discovery flow
|
|
38
|
+
- [x] Auto-discovery lists worktree projects, finds latest completed main-tree project, filters correctly
|
|
39
|
+
- [x] Auto-discovery shows picker even when only one uncompleted project is found
|
|
40
|
+
- [x] Auto-discovery shows "No worktree projects found" when none exist
|
|
41
|
+
- [x] Auto-discovery shows "All worktree projects are completed" when all are done
|
|
42
|
+
- [x] `raf do proj1 proj2 --worktree` shows error about single project only
|
|
43
|
+
- [x] `raf do my-feature --worktree` with no worktree shows helpful error
|
|
44
|
+
- [x] `raf do my-feature --worktree` with valid worktree executes tasks in worktree
|
|
45
|
+
- [x] Claude runs with cwd set to worktree root
|
|
46
|
+
- [x] State derivation reads from worktree project path
|
|
47
|
+
- [x] Outcome files are written to worktree project path
|
|
48
|
+
- [x] Git commits land in the worktree branch
|
|
49
|
+
- [x] Compatible with `--verbose`, `--timeout`, `--force`, `--debug`, `--model`
|
|
50
|
+
- [x] Without `--worktree`, behavior is unchanged
|
|
51
|
+
|
|
52
|
+
## Test Results
|
|
53
|
+
- Build: passes cleanly (no TypeScript errors)
|
|
54
|
+
- All 835 tests pass (834 pass, 1 pre-existing failure in planning-prompt.test.ts unrelated to this change)
|
|
55
|
+
- All 67 do command tests pass (do-command, do-multiproject, do-rerun, do-blocked-tasks)
|
|
56
|
+
- All 29 git tests pass (git, git-stash, git-commit-helpers)
|
|
57
|
+
|
|
58
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Outcome: Auto-merge on Project Completion
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
Added `--merge` flag to `raf do` that automatically merges the worktree branch back into the original branch after all tasks complete successfully. The merge uses fast-forward first, falls back to merge-commit, and aborts on conflicts with helpful manual merge instructions.
|
|
5
|
+
|
|
6
|
+
## Changes Made
|
|
7
|
+
|
|
8
|
+
### Modified Files
|
|
9
|
+
- **`src/commands/do.ts`** - Added `--merge` flag with full merge-on-completion support:
|
|
10
|
+
- Added `--merge` option to Commander command definition
|
|
11
|
+
- Added validation that `--merge` requires `--worktree` (errors otherwise)
|
|
12
|
+
- Records the original branch name (`getCurrentBranch()`) at the start of worktree execution, before any worktree operations
|
|
13
|
+
- After task execution loop completes, checks if `--merge` is set:
|
|
14
|
+
- If all results succeeded: attempts merge via `mergeWorktreeBranch()` from the original repo directory
|
|
15
|
+
- On successful merge: logs success message with merge type (fast-forward or merge commit)
|
|
16
|
+
- On merge conflict: `mergeWorktreeBranch` aborts the merge, logs warning with branch name and manual merge instructions
|
|
17
|
+
- If project has failures: skips merge entirely, logs message about worktree branch being available for inspection
|
|
18
|
+
- Worktree is NOT removed or cleaned up after merge
|
|
19
|
+
- Added imports for `getCurrentBranch` and `mergeWorktreeBranch` from worktree module
|
|
20
|
+
|
|
21
|
+
- **`src/types/config.ts`** - Added `merge?: boolean` to `DoCommandOptions` interface
|
|
22
|
+
|
|
23
|
+
## Acceptance Criteria Verification
|
|
24
|
+
- [x] `--merge` flag is added to the do command
|
|
25
|
+
- [x] `--merge` without `--worktree` shows an error
|
|
26
|
+
- [x] On full project completion with `--merge`, merge is attempted
|
|
27
|
+
- [x] Successful merge logs a clear success message
|
|
28
|
+
- [x] Merge conflicts trigger `git merge --abort` and show warning with branch name and manual merge instructions
|
|
29
|
+
- [x] Incomplete projects (failures) skip merge and mention the branch
|
|
30
|
+
- [x] Original branch is correctly recorded and restored
|
|
31
|
+
- [x] Worktree is NOT removed or cleaned up after merge
|
|
32
|
+
- [x] Without `--merge`, no merge is attempted even if project completes
|
|
33
|
+
|
|
34
|
+
## Test Results
|
|
35
|
+
- Build: passes cleanly (no TypeScript errors)
|
|
36
|
+
- All 835 tests pass (834 pass, 1 pre-existing failure in planning-prompt.test.ts unrelated to this change)
|
|
37
|
+
- All 50 do-command and worktree tests pass
|
|
38
|
+
- All 30 worktree utility tests pass
|
|
39
|
+
|
|
40
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Outcome: Add Tests for Worktree Functionality
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
Added comprehensive tests covering worktree utilities and CLI validation for `--worktree` and `--merge` flags. Tests include both unit tests with mocked dependencies and integration tests using real temporary git repos.
|
|
5
|
+
|
|
6
|
+
## Changes Made
|
|
7
|
+
|
|
8
|
+
### Modified Files
|
|
9
|
+
- **`tests/unit/worktree.test.ts`** - Added 6 new unit tests for path computation with various repo/project names:
|
|
10
|
+
- `computeWorktreePath`: repo names with dots, underscores, hyphens; base36 project IDs
|
|
11
|
+
- `computeWorktreeBaseDir`: repo names with special characters
|
|
12
|
+
- `getWorktreeProjectPath`: nested relative paths
|
|
13
|
+
|
|
14
|
+
### New Files
|
|
15
|
+
- **`tests/unit/worktree-integration.test.ts`** - 22 integration tests in two sections:
|
|
16
|
+
|
|
17
|
+
**Real git repo tests** (12 tests):
|
|
18
|
+
- `createWorktree`: worktree creation with real git, branch conflict detection
|
|
19
|
+
- `validateWorktree`: valid worktree with project/plans, nonexistent path, non-worktree directory, missing project folder
|
|
20
|
+
- `mergeWorktreeBranch`: fast-forward merge, merge-commit fallback on divergence, conflict detection with abort, checkout failure
|
|
21
|
+
- `removeWorktree`: successful removal for failed-plan cleanup, nonexistent worktree failure
|
|
22
|
+
|
|
23
|
+
**CLI validation tests** (10 tests):
|
|
24
|
+
- `--merge requires --worktree`: validates the constraint, allows valid combos
|
|
25
|
+
- `--worktree supports only single project`: rejects multiple projects, allows single/none
|
|
26
|
+
- `--worktree validation for missing worktree`: missing path, non-worktree dir, missing content, valid worktree
|
|
27
|
+
|
|
28
|
+
## Test Results
|
|
29
|
+
- All 58 worktree tests pass (36 unit + 22 integration)
|
|
30
|
+
- All 862 project tests pass (1 pre-existing failure in planning-prompt.test.ts unrelated to this change)
|
|
31
|
+
- Temp directories and worktrees are properly cleaned up after each test
|
|
32
|
+
|
|
33
|
+
## Acceptance Criteria Verification
|
|
34
|
+
- [x] All worktree utility functions have unit tests
|
|
35
|
+
- [x] Path computation tested with various repo and project names
|
|
36
|
+
- [x] Worktree creation tested with real temporary git repo
|
|
37
|
+
- [x] Merge tested for ff success, merge-commit fallback, and conflict/abort
|
|
38
|
+
- [x] Removal tested for failed-plan cleanup scenario
|
|
39
|
+
- [x] CLI validation tests for error cases (--merge without --worktree, etc.)
|
|
40
|
+
- [x] All tests pass with `npm test`
|
|
41
|
+
- [x] Tests clean up temporary files/directories
|
|
42
|
+
|
|
43
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Outcome: Update Documentation for Worktree Support
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
Updated both README.md (user-facing) and CLAUDE.md (internal developer docs) with comprehensive documentation for the `--worktree` and `--merge` flags.
|
|
5
|
+
|
|
6
|
+
## Changes Made
|
|
7
|
+
|
|
8
|
+
### Modified Files
|
|
9
|
+
- **`README.md`** - Added worktree documentation in four places:
|
|
10
|
+
- **Features section**: Added "Worktree Mode" bullet describing isolated branch execution
|
|
11
|
+
- **Commands section**: Added `raf plan --worktree` and `raf do --worktree --merge` examples to both plan and do command blocks
|
|
12
|
+
- **Worktree Mode section** (new, after Project Structure): Explains the workflow, worktree path convention, merge behavior, conflict handling, persistence, and single-project limitation
|
|
13
|
+
- **Command Reference tables**: Added `-w, --worktree` row to plan table; added `-w, --worktree` and `--merge` rows to do table
|
|
14
|
+
|
|
15
|
+
- **`CLAUDE.md`** - Added "Worktree Mode" subsection under "Architectural Decisions" covering:
|
|
16
|
+
- Worktree path convention (`~/.raf/worktrees/<repo-basename>/<project-id>`)
|
|
17
|
+
- Branch naming (matches project folder name)
|
|
18
|
+
- Flag requirement (explicit `--worktree` on both plan and do)
|
|
19
|
+
- Full lifecycle: create -> plan -> execute -> merge
|
|
20
|
+
- Merge strategy details
|
|
21
|
+
- Cleanup behavior (no auto-cleanup except on plan failure)
|
|
22
|
+
- Constraints (`--worktree` single project only, `--merge` requires `--worktree`)
|
|
23
|
+
- Core module reference (`src/core/worktree.ts`)
|
|
24
|
+
|
|
25
|
+
## Acceptance Criteria Verification
|
|
26
|
+
- [x] README.md has `--worktree` and `--merge` in Features, Commands, and Command Reference
|
|
27
|
+
- [x] README.md has a "Worktree Mode" section with workflow explanation
|
|
28
|
+
- [x] CLAUDE.md has a "Worktree Mode" architectural decision section
|
|
29
|
+
- [x] Documentation mentions that worktrees persist (no auto-cleanup)
|
|
30
|
+
- [x] Documentation matches the implemented behavior (verified against source code)
|
|
31
|
+
- [x] No existing documentation is broken or contradicted
|
|
32
|
+
|
|
33
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Task: Git Worktree Utility Functions
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Create a new module with git worktree utility functions that handle path computation, worktree creation, validation, merge, and removal.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
This is the foundation task for worktree support. All other worktree tasks depend on these utilities. The module follows the pattern of the existing `src/core/git.ts` module - standalone functions using `execSync` for git operations.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Compute worktree path: `~/.raf/worktrees/<repo-basename>/<project-id>` where `<repo-basename>` is the basename of `process.cwd()` (the repo root, e.g., `myapp`) and `<project-id>` is the full project folder name (e.g., `020-worktree-weaver`)
|
|
11
|
+
- Create the `~/.raf/worktrees/<repo-basename>/` directory automatically if it doesn't exist
|
|
12
|
+
- Create a git worktree at the computed path with a new branch named after the full project folder (e.g., `020-worktree-weaver`)
|
|
13
|
+
- Validate that a worktree directory exists and is a valid git worktree (check `git worktree list`)
|
|
14
|
+
- Validate that the project folder and plan files exist inside the worktree
|
|
15
|
+
- Compute the project path inside the worktree (same relative path from repo root as in the main repo)
|
|
16
|
+
- Merge: merge the worktree branch into the original branch. Attempt fast-forward first; if not possible, allow a merge-commit. On merge conflicts, run `git merge --abort` and return failure with a message for the user to merge manually
|
|
17
|
+
- Remove a worktree: run `git worktree remove` to remove a single worktree directory (used only for failed-plan cleanup, NOT for post-completion cleanup)
|
|
18
|
+
- Get current branch name (for recording which branch the worktree was created from)
|
|
19
|
+
- List all worktree project directories for a given repo: scan `~/.raf/worktrees/<repo-basename>/` and return the list of project folder names (e.g., `['020-worktree-weaver', '021-another-feature']`). Return an empty array if the directory doesn't exist or is empty
|
|
20
|
+
- All functions should handle errors gracefully and return meaningful error messages
|
|
21
|
+
- Follow the same patterns as `src/core/git.ts` - use `execSync` with `stdio: 'pipe'`, wrap in try/catch
|
|
22
|
+
|
|
23
|
+
## Implementation Steps
|
|
24
|
+
1. Create `src/core/worktree.ts` module
|
|
25
|
+
2. Implement path computation function that derives `~/.raf/worktrees/<repo-basename>/<project-id>` using `os.homedir()`, the basename of the git toplevel, and the project folder name
|
|
26
|
+
3. Implement worktree creation function that ensures the parent directory exists and runs `git worktree add <path> -b <branch-name>`
|
|
27
|
+
4. Implement validation function that checks worktree existence in `git worktree list` output AND checks for project folder + plans inside
|
|
28
|
+
5. Implement merge function that: switches to the original branch, runs `git merge --ff-only <project-branch>`, if ff fails tries `git merge <project-branch>`, if conflicts arise runs `git merge --abort` and returns failure with manual-merge instructions
|
|
29
|
+
6. Implement removal function that runs `git worktree remove <path>` for a single worktree (used only for failed-plan cleanup)
|
|
30
|
+
7. Implement helper to get the repo root directory name (basename of git toplevel)
|
|
31
|
+
8. Implement function to list all worktree project directories under `~/.raf/worktrees/<repo-basename>/` - read the directory, filter to valid project folder names, return sorted list
|
|
32
|
+
9. Export all functions as named exports
|
|
33
|
+
|
|
34
|
+
## Acceptance Criteria
|
|
35
|
+
- [ ] Worktree path computation returns `~/.raf/worktrees/<repo-basename>/<project-id>`
|
|
36
|
+
- [ ] Parent directory `~/.raf/worktrees/<repo-basename>/` is created automatically
|
|
37
|
+
- [ ] Worktree creation creates the directory and branch with correct names
|
|
38
|
+
- [ ] Validation correctly identifies existing vs missing worktrees and checks for project content
|
|
39
|
+
- [ ] Merge function tries fast-forward first, falls back to merge-commit, aborts on conflicts
|
|
40
|
+
- [ ] Removal function removes a single worktree (for failed-plan cleanup only)
|
|
41
|
+
- [ ] Listing function returns all worktree project directories for the current repo
|
|
42
|
+
- [ ] Listing function returns empty array when no worktrees exist
|
|
43
|
+
- [ ] All functions handle non-git-repo scenario gracefully
|
|
44
|
+
- [ ] All functions handle errors and return meaningful messages
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
- The worktree path is now under the user's home directory (`~/.raf/worktrees/`), not relative to the repo. For example, if the repo is at `/Users/me/projects/myapp`, the worktree would be at `~/.raf/worktrees/myapp/020-worktree-weaver`
|
|
48
|
+
- The merge function needs to be called from the ORIGINAL repo (not the worktree) because it needs to switch to the original branch
|
|
49
|
+
- The branch name is the full project folder name (e.g., `020-worktree-weaver`), not just the project name
|
|
50
|
+
- Use `os.homedir()` to resolve `~` to the actual home directory path
|
|
51
|
+
- The removal function is only used for cleaning up failed/cancelled planning — NOT for post-completion cleanup. Worktrees persist after task completion and merge
|