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/dist/prompts/amend.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { encodeTaskId } from '../utils/paths.js';
|
|
1
2
|
/**
|
|
2
3
|
* Generate a prompt for amending an existing project with new tasks.
|
|
3
4
|
* - systemPrompt: Amendment mode conventions, existing tasks context (via --append-system-prompt)
|
|
4
5
|
* - userMessage: Reference to input.md and new task description (via positional argument, triggers Claude to start)
|
|
5
6
|
*/
|
|
6
7
|
export function getAmendPrompt(params) {
|
|
7
|
-
const { projectPath, existingTasks, nextTaskNumber, newTaskDescription, } = params;
|
|
8
|
+
const { projectPath, existingTasks, nextTaskNumber, newTaskDescription, worktreeMode, } = params;
|
|
9
|
+
const worktreeFlag = worktreeMode ? ' --worktree' : '';
|
|
8
10
|
const existingTasksSummary = existingTasks
|
|
9
11
|
.map((task) => {
|
|
10
12
|
const status = task.status === 'completed'
|
|
@@ -35,7 +37,7 @@ You are in AMENDMENT MODE. This means:
|
|
|
35
37
|
- You MAY modify [MODIFIABLE] tasks (pending/failed) if the user requests changes
|
|
36
38
|
- NEVER modify [PROTECTED] tasks (completed) - their outcomes depend on the original plan
|
|
37
39
|
- DO NOT renumber existing tasks
|
|
38
|
-
- You can create NEW tasks starting from number ${nextTaskNumber
|
|
40
|
+
- You can create NEW tasks starting from number ${encodeTaskId(nextTaskNumber)}
|
|
39
41
|
|
|
40
42
|
## Project Location
|
|
41
43
|
|
|
@@ -73,7 +75,7 @@ Read the user's description of new tasks and identify what needs to be added. Co
|
|
|
73
75
|
**Identifying Follow-up Tasks**: When a new task is a follow-up, fix, or iteration of a previously completed task, you MUST reference the previous task's outcome in the new plan's Context section. This gives the executing agent full context about what was done before.
|
|
74
76
|
|
|
75
77
|
Use this format in the Context section:
|
|
76
|
-
\`This is a follow-up to task
|
|
78
|
+
\`This is a follow-up to task NN. See outcome: {projectPath}/outcomes/NN-task-name.md\`
|
|
77
79
|
|
|
78
80
|
The outcome file paths for completed tasks are listed above in the Existing Tasks section.
|
|
79
81
|
|
|
@@ -99,8 +101,8 @@ Use this format:
|
|
|
99
101
|
### Step 4: Create New Plan Files
|
|
100
102
|
|
|
101
103
|
After interviewing the user about all NEW tasks, create plan files starting from the next available number:
|
|
102
|
-
- ${projectPath}/plans/${nextTaskNumber
|
|
103
|
-
- ${projectPath}/plans/${(nextTaskNumber + 1)
|
|
104
|
+
- ${projectPath}/plans/${encodeTaskId(nextTaskNumber)}-task-name.md
|
|
105
|
+
- ${projectPath}/plans/${encodeTaskId(nextTaskNumber + 1)}-task-name.md
|
|
104
106
|
- etc.
|
|
105
107
|
|
|
106
108
|
Each plan file should follow this structure:
|
|
@@ -114,11 +116,11 @@ Each plan file should follow this structure:
|
|
|
114
116
|
## Context
|
|
115
117
|
[Why this task is needed, how it fits into the larger project]
|
|
116
118
|
[Reference relevant existing tasks if applicable]
|
|
117
|
-
[For follow-up/fix tasks: "This is a follow-up to task
|
|
119
|
+
[For follow-up/fix tasks: "This is a follow-up to task NN. See outcome: {projectPath}/outcomes/NN-task-name.md"]
|
|
118
120
|
|
|
119
121
|
## Dependencies
|
|
120
122
|
[Optional section - omit if task has no dependencies]
|
|
121
|
-
[Comma-separated list of task IDs this task depends on, e.g., "
|
|
123
|
+
[Comma-separated list of task IDs this task depends on, e.g., "01, 02"]
|
|
122
124
|
[If a dependency fails, this task will be automatically blocked]
|
|
123
125
|
|
|
124
126
|
## Requirements
|
|
@@ -153,7 +155,9 @@ After creating all new plan files:
|
|
|
153
155
|
2. Display this exit message to the user:
|
|
154
156
|
|
|
155
157
|
\`\`\`
|
|
156
|
-
Planning complete!
|
|
158
|
+
Planning complete! To exit this session and run your tasks:
|
|
159
|
+
1. Press Ctrl-C twice to exit
|
|
160
|
+
2. Then run: raf do <project>${worktreeFlag}
|
|
157
161
|
\`\`\`
|
|
158
162
|
|
|
159
163
|
## Important Rules
|
|
@@ -161,10 +165,10 @@ Planning complete! Press Ctrl-C twice to exit to exit this session
|
|
|
161
165
|
1. NEVER modify COMPLETED task plans - they are [PROTECTED] because their outcomes depend on the original plan
|
|
162
166
|
2. You MAY modify non-completed task plans (pending/failed) if the user requests changes - they are [MODIFIABLE]
|
|
163
167
|
3. ALWAYS interview the user before creating or modifying plans
|
|
164
|
-
4. New tasks start from number ${nextTaskNumber
|
|
168
|
+
4. New tasks start from number ${encodeTaskId(nextTaskNumber)}
|
|
165
169
|
5. Use descriptive, kebab-case names for plan files
|
|
166
170
|
6. Each plan should be self-contained with all context needed
|
|
167
|
-
7. Specify task dependencies using the ## Dependencies section with task IDs only (e.g., "
|
|
171
|
+
7. Specify task dependencies using the ## Dependencies section with task IDs only (e.g., "01, 02")
|
|
168
172
|
8. Tasks without dependencies should omit the Dependencies section entirely
|
|
169
173
|
9. Be specific - vague plans lead to poor execution
|
|
170
174
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amend.js","sourceRoot":"","sources":["../../src/prompts/amend.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"amend.js","sourceRoot":"","sources":["../../src/prompts/amend.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ourceRoot":"","sources":["../../src/prompts/execution.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA2BxD;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/prompts/execution.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA2BxD;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAwKxE"}
|
|
@@ -43,8 +43,8 @@ The following tasks have already been completed. Review them for context and to
|
|
|
43
43
|
${previousOutcomes.map((o) => `### Task ${o.taskId}\n${o.content}`).join('\n\n')}
|
|
44
44
|
`;
|
|
45
45
|
}
|
|
46
|
-
//
|
|
47
|
-
const paddedTaskNumber = taskNumber.toString().padStart(
|
|
46
|
+
// Encode task number to 2-char base36
|
|
47
|
+
const paddedTaskNumber = taskNumber.toString(36).padStart(2, '0');
|
|
48
48
|
const commitInstructions = autoCommit
|
|
49
49
|
? `
|
|
50
50
|
## Git Instructions
|
|
@@ -57,6 +57,8 @@ After successfully completing the task:
|
|
|
57
57
|
2. Commit with message: "RAF[${projectNumber}:${paddedTaskNumber}] <description>"
|
|
58
58
|
- Write a concise description of what was accomplished
|
|
59
59
|
- Focus on the actual change, not the task name
|
|
60
|
+
- The commit message must be a SINGLE LINE — no body, no trailers
|
|
61
|
+
- Do NOT add Co-Authored-By or any other trailers to the commit message
|
|
60
62
|
|
|
61
63
|
**IMPORTANT - On Failure**: If the task fails, do NOT commit. Just write the outcome file with the \`<promise>FAILED</promise>\` marker and stop. Uncommitted changes will be preserved for debugging.
|
|
62
64
|
`
|
|
@@ -1 +1 @@
|
|
|
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MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../src/prompts/planning.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,oBAAoB,GAAG,oBAAoB,CA6KpF"}
|
package/dist/prompts/planning.js
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* - userMessage: Reference to input.md file (via positional argument, triggers Claude to start)
|
|
5
5
|
*/
|
|
6
6
|
export function getPlanningPrompt(params) {
|
|
7
|
-
const { projectPath } = params;
|
|
7
|
+
const { projectPath, worktreeMode } = params;
|
|
8
|
+
const worktreeFlag = worktreeMode ? ' --worktree' : '';
|
|
8
9
|
const systemPrompt = `You are a project planning assistant for RAF (Ralph's Automation Framework). Your task is to analyze the user's project description and create detailed task plans.
|
|
9
10
|
|
|
10
11
|
## Your Goals
|
|
@@ -63,8 +64,8 @@ This file serves as documentation of design choices made during planning. Append
|
|
|
63
64
|
### Step 3: Create Plan Files
|
|
64
65
|
|
|
65
66
|
After interviewing the user about all tasks, create plan files in the plans folder:
|
|
66
|
-
- ${projectPath}/plans/
|
|
67
|
-
- ${projectPath}/plans/
|
|
67
|
+
- ${projectPath}/plans/01-task-name.md
|
|
68
|
+
- ${projectPath}/plans/02-task-name.md
|
|
68
69
|
- etc.
|
|
69
70
|
|
|
70
71
|
Each plan file should follow this structure:
|
|
@@ -80,7 +81,7 @@ Each plan file should follow this structure:
|
|
|
80
81
|
|
|
81
82
|
## Dependencies
|
|
82
83
|
[Optional section - omit if task has no dependencies]
|
|
83
|
-
[Comma-separated list of task IDs this task depends on, e.g., "
|
|
84
|
+
[Comma-separated list of task IDs this task depends on, e.g., "01, 02"]
|
|
84
85
|
[If a dependency fails, this task will be automatically blocked]
|
|
85
86
|
|
|
86
87
|
## Requirements
|
|
@@ -117,12 +118,12 @@ For each task, analyze which other tasks must complete successfully before it ca
|
|
|
117
118
|
**Dependency format examples:**
|
|
118
119
|
\`\`\`markdown
|
|
119
120
|
## Dependencies
|
|
120
|
-
|
|
121
|
+
01
|
|
121
122
|
\`\`\`
|
|
122
123
|
or for multiple dependencies:
|
|
123
124
|
\`\`\`markdown
|
|
124
125
|
## Dependencies
|
|
125
|
-
|
|
126
|
+
01, 02
|
|
126
127
|
\`\`\`
|
|
127
128
|
|
|
128
129
|
**Rules for dependencies:**
|
|
@@ -140,13 +141,13 @@ After creating all plan files:
|
|
|
140
141
|
\`\`\`
|
|
141
142
|
Planning complete! To exit this session and run your tasks:
|
|
142
143
|
1. Press Ctrl-C twice to exit
|
|
143
|
-
2. Then run: raf do <project
|
|
144
|
+
2. Then run: raf do <project>${worktreeFlag}
|
|
144
145
|
\`\`\`
|
|
145
146
|
|
|
146
147
|
## Important Rules
|
|
147
148
|
|
|
148
149
|
1. ALWAYS interview the user before creating plans
|
|
149
|
-
2. Create plans in numbered order (
|
|
150
|
+
2. Create plans in numbered order (01, 02, 03, etc.) reflecting logical execution order
|
|
150
151
|
3. Use descriptive, kebab-case names for plan files
|
|
151
152
|
4. Each plan should be self-contained with all context needed
|
|
152
153
|
5. Infer dependencies automatically - analyze task relationships, don't ask the user about dependencies
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planning.js","sourceRoot":"","sources":["../../src/prompts/planning.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"planning.js","sourceRoot":"","sources":["../../src/prompts/planning.ts"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAA4B;IAC5D,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IAC7C,MAAM,YAAY,GAAG,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAEvD,MAAM,YAAY,GAAG;;;;;;;;;;kBAUL,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8BzB,WAAW;;;;;;;;;;;;;;;;;;IAkBX,WAAW;IACX,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA4EkB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;wDAyBW,CAAC;IAEvD,MAAM,WAAW,GAAG;;EAEpB,MAAM,CAAC,YAAY;;sDAEiC,CAAC;IAErD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AACvC,CAAC"}
|
package/dist/types/config.d.ts
CHANGED
|
@@ -19,8 +19,13 @@ export interface DoCommandOptions {
|
|
|
19
19
|
force?: boolean;
|
|
20
20
|
model?: ClaudeModelName;
|
|
21
21
|
sonnet?: boolean;
|
|
22
|
+
worktree?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export interface StatusCommandOptions {
|
|
24
25
|
json?: boolean;
|
|
25
26
|
}
|
|
27
|
+
export interface MigrateCommandOptions {
|
|
28
|
+
dryRun?: boolean;
|
|
29
|
+
worktree?: boolean;
|
|
30
|
+
}
|
|
26
31
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,EA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;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source of a pending project.
|
|
3
|
+
* - 'local': project lives in the main repo's RAF directory
|
|
4
|
+
* - 'worktree': project lives in a git worktree under ~/.raf/worktrees/
|
|
5
|
+
*/
|
|
6
|
+
export type ProjectSource = 'local' | 'worktree';
|
|
1
7
|
/**
|
|
2
8
|
* Information about a pending project for display in the picker.
|
|
3
9
|
*/
|
|
@@ -8,6 +14,9 @@ export interface PendingProjectInfo {
|
|
|
8
14
|
path: string;
|
|
9
15
|
completedTasks: number;
|
|
10
16
|
totalTasks: number;
|
|
17
|
+
source: ProjectSource;
|
|
18
|
+
/** Worktree root directory — only set when source is 'worktree'. */
|
|
19
|
+
worktreeRoot?: string;
|
|
11
20
|
}
|
|
12
21
|
/**
|
|
13
22
|
* Get all projects that have pending tasks (not fully completed).
|
|
@@ -16,12 +25,34 @@ export interface PendingProjectInfo {
|
|
|
16
25
|
export declare function getPendingProjects(rafDir: string): PendingProjectInfo[];
|
|
17
26
|
/**
|
|
18
27
|
* Format a project for display in the picker.
|
|
19
|
-
* Example: "
|
|
28
|
+
* Example: "aaaaab fix-auth-bug (2/5 tasks)"
|
|
29
|
+
* Worktree projects get a "[worktree]" suffix: "aaaaab my-feature (2/5 tasks) [worktree]"
|
|
20
30
|
*/
|
|
21
31
|
export declare function formatProjectChoice(project: PendingProjectInfo): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get pending worktree projects for the current repo.
|
|
34
|
+
* Scans `~/.raf/worktrees/<repoBasename>/` for projects with pending tasks.
|
|
35
|
+
*
|
|
36
|
+
* @param repoBasename - The basename of the current git repo
|
|
37
|
+
* @param rafRelativePath - The relative path from repo root to the RAF directory (e.g., "RAF")
|
|
38
|
+
* @returns Pending worktree projects sorted by number
|
|
39
|
+
*/
|
|
40
|
+
export declare function getPendingWorktreeProjects(repoBasename: string, rafRelativePath: string): PendingProjectInfo[];
|
|
41
|
+
/**
|
|
42
|
+
* Result of the project picker — includes the selected project's folder name
|
|
43
|
+
* and its source metadata so callers know whether to enable worktree mode.
|
|
44
|
+
*/
|
|
45
|
+
export interface PickerResult {
|
|
46
|
+
folder: string;
|
|
47
|
+
source: ProjectSource;
|
|
48
|
+
worktreeRoot?: string;
|
|
49
|
+
}
|
|
22
50
|
/**
|
|
23
51
|
* Display an interactive project picker for pending projects.
|
|
24
|
-
* Returns the selected project
|
|
52
|
+
* Returns the selected project info or null if no projects or cancelled.
|
|
53
|
+
*
|
|
54
|
+
* @param rafDir - The main repo's RAF directory
|
|
55
|
+
* @param worktreeProjects - Optional worktree projects to merge into the picker
|
|
25
56
|
*/
|
|
26
|
-
export declare function pickPendingProject(rafDir: string): Promise<
|
|
57
|
+
export declare function pickPendingProject(rafDir: string, worktreeProjects?: PendingProjectInfo[]): Promise<PickerResult | null>;
|
|
27
58
|
//# sourceMappingURL=project-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-picker.d.ts","sourceRoot":"","sources":["../../src/ui/project-picker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project-picker.d.ts","sourceRoot":"","sources":["../../src/ui/project-picker.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;IACtB,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,EAAE,CA2BvE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAIvE;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,GACtB,kBAAkB,EAAE,CAqCtB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,kBAAkB,EAAE,GACtC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAoC9B"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { select } from '@inquirer/prompts';
|
|
2
2
|
import { discoverProjects, deriveProjectState, getDerivedStats } from '../core/state-derivation.js';
|
|
3
|
-
import { extractProjectNumber, formatProjectNumber } from '../utils/paths.js';
|
|
3
|
+
import { extractProjectNumber, extractProjectName, parseProjectPrefix, formatProjectNumber } from '../utils/paths.js';
|
|
4
|
+
import { listWorktreeProjects, computeWorktreePath } from '../core/worktree.js';
|
|
5
|
+
import * as fs from 'node:fs';
|
|
6
|
+
import * as path from 'node:path';
|
|
4
7
|
/**
|
|
5
8
|
* Get all projects that have pending tasks (not fully completed).
|
|
6
9
|
* Returns projects sorted by number (oldest first).
|
|
@@ -22,6 +25,7 @@ export function getPendingProjects(rafDir) {
|
|
|
22
25
|
path: project.path,
|
|
23
26
|
completedTasks: stats.completed,
|
|
24
27
|
totalTasks: stats.total,
|
|
28
|
+
source: 'local',
|
|
25
29
|
});
|
|
26
30
|
}
|
|
27
31
|
}
|
|
@@ -30,29 +34,93 @@ export function getPendingProjects(rafDir) {
|
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
32
36
|
* Format a project for display in the picker.
|
|
33
|
-
* Example: "
|
|
37
|
+
* Example: "aaaaab fix-auth-bug (2/5 tasks)"
|
|
38
|
+
* Worktree projects get a "[worktree]" suffix: "aaaaab my-feature (2/5 tasks) [worktree]"
|
|
34
39
|
*/
|
|
35
40
|
export function formatProjectChoice(project) {
|
|
36
41
|
const projectNumber = extractProjectNumber(project.path) ?? formatProjectNumber(project.number);
|
|
37
|
-
|
|
42
|
+
const base = `${projectNumber} ${project.name} (${project.completedTasks}/${project.totalTasks} tasks)`;
|
|
43
|
+
return project.source === 'worktree' ? `${base} [worktree]` : base;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get pending worktree projects for the current repo.
|
|
47
|
+
* Scans `~/.raf/worktrees/<repoBasename>/` for projects with pending tasks.
|
|
48
|
+
*
|
|
49
|
+
* @param repoBasename - The basename of the current git repo
|
|
50
|
+
* @param rafRelativePath - The relative path from repo root to the RAF directory (e.g., "RAF")
|
|
51
|
+
* @returns Pending worktree projects sorted by number
|
|
52
|
+
*/
|
|
53
|
+
export function getPendingWorktreeProjects(repoBasename, rafRelativePath) {
|
|
54
|
+
const wtProjectDirs = listWorktreeProjects(repoBasename);
|
|
55
|
+
const pendingProjects = [];
|
|
56
|
+
for (const wtProjectDir of wtProjectDirs) {
|
|
57
|
+
const numPrefix = extractProjectNumber(wtProjectDir);
|
|
58
|
+
if (!numPrefix)
|
|
59
|
+
continue;
|
|
60
|
+
const projectNumber = parseProjectPrefix(numPrefix);
|
|
61
|
+
if (projectNumber === null)
|
|
62
|
+
continue;
|
|
63
|
+
const wtPath = computeWorktreePath(repoBasename, wtProjectDir);
|
|
64
|
+
const wtProjectPath = path.join(wtPath, rafRelativePath, wtProjectDir);
|
|
65
|
+
if (!fs.existsSync(wtProjectPath))
|
|
66
|
+
continue;
|
|
67
|
+
const state = deriveProjectState(wtProjectPath);
|
|
68
|
+
if (state.tasks.length === 0)
|
|
69
|
+
continue;
|
|
70
|
+
const stats = getDerivedStats(state);
|
|
71
|
+
// Include projects that are not fully completed
|
|
72
|
+
if (stats.pending > 0 || stats.failed > 0) {
|
|
73
|
+
const name = extractProjectName(wtProjectDir) ?? wtProjectDir;
|
|
74
|
+
pendingProjects.push({
|
|
75
|
+
folder: wtProjectDir,
|
|
76
|
+
number: projectNumber,
|
|
77
|
+
name,
|
|
78
|
+
path: wtProjectPath,
|
|
79
|
+
completedTasks: stats.completed,
|
|
80
|
+
totalTasks: stats.total,
|
|
81
|
+
source: 'worktree',
|
|
82
|
+
worktreeRoot: wtPath,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return pendingProjects.sort((a, b) => a.number - b.number);
|
|
38
87
|
}
|
|
39
88
|
/**
|
|
40
89
|
* Display an interactive project picker for pending projects.
|
|
41
|
-
* Returns the selected project
|
|
90
|
+
* Returns the selected project info or null if no projects or cancelled.
|
|
91
|
+
*
|
|
92
|
+
* @param rafDir - The main repo's RAF directory
|
|
93
|
+
* @param worktreeProjects - Optional worktree projects to merge into the picker
|
|
42
94
|
*/
|
|
43
|
-
export async function pickPendingProject(rafDir) {
|
|
44
|
-
const
|
|
45
|
-
|
|
95
|
+
export async function pickPendingProject(rafDir, worktreeProjects) {
|
|
96
|
+
const localProjects = getPendingProjects(rafDir);
|
|
97
|
+
const allProjects = [...localProjects, ...(worktreeProjects ?? [])];
|
|
98
|
+
// Deduplicate: if a project folder appears in both local and worktree, keep only worktree
|
|
99
|
+
const seen = new Map();
|
|
100
|
+
for (const project of allProjects) {
|
|
101
|
+
const existing = seen.get(project.folder);
|
|
102
|
+
if (!existing || project.source === 'worktree') {
|
|
103
|
+
seen.set(project.folder, project);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const deduped = Array.from(seen.values());
|
|
107
|
+
// Sort chronologically by number
|
|
108
|
+
deduped.sort((a, b) => a.number - b.number);
|
|
109
|
+
if (deduped.length === 0) {
|
|
46
110
|
return null;
|
|
47
111
|
}
|
|
48
|
-
const choices =
|
|
112
|
+
const choices = deduped.map((project) => ({
|
|
49
113
|
name: formatProjectChoice(project),
|
|
50
|
-
value: project
|
|
114
|
+
value: project,
|
|
51
115
|
}));
|
|
52
116
|
const selected = await select({
|
|
53
117
|
message: 'Select a project to execute:',
|
|
54
118
|
choices,
|
|
55
119
|
});
|
|
56
|
-
return
|
|
120
|
+
return {
|
|
121
|
+
folder: selected.folder,
|
|
122
|
+
source: selected.source,
|
|
123
|
+
worktreeRoot: selected.worktreeRoot,
|
|
124
|
+
};
|
|
57
125
|
}
|
|
58
126
|
//# sourceMappingURL=project-picker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-picker.js","sourceRoot":"","sources":["../../src/ui/project-picker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"project-picker.js","sourceRoot":"","sources":["../../src/ui/project-picker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACtH,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,EAAE,M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AAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;IAE5C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACxC,IAAI,EAAE,mBAAmB,CAAC,OAAO,CAAC;QAClC,KAAK,EAAE,OAAO;KACf,CAAC,CAAC,CAAC;IAEJ,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC;QAC5B,OAAO,EAAE,8BAA8B;QACvC,OAAO;KACR,CAAC,CAAC;IAEH,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,YAAY,EAAE,QAAQ,CAAC,YAAY;KACpC,CAAC;AACJ,CAAC"}
|
package/dist/utils/paths.d.ts
CHANGED
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
export declare const RAF_DIR = "RAF";
|
|
2
|
+
/** RAF epoch: 2026-01-01T00:00:00Z */
|
|
3
|
+
export declare const RAF_EPOCH = 1767225600;
|
|
4
|
+
/** Regex pattern for matching base36 task IDs (2-char: 00-zz) */
|
|
5
|
+
export declare const TASK_ID_PATTERN = "[0-9a-z]{2}";
|
|
2
6
|
/**
|
|
3
|
-
* Encode a
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* -
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* First character uses a-z (10-35 in base36, letters only).
|
|
12
|
-
* Second and third characters use 0-9a-z (0-35 in base36).
|
|
7
|
+
* Encode a task number (0-based or 1-based) to a 2-character zero-padded base36 string.
|
|
8
|
+
* E.g., 1 -> "01", 10 -> "0a", 36 -> "10", 1295 -> "zz"
|
|
9
|
+
*/
|
|
10
|
+
export declare function encodeTaskId(num: number): string;
|
|
11
|
+
/**
|
|
12
|
+
* Decode a 2-character base36 task ID string back to a number.
|
|
13
|
+
* E.g., "01" -> 1, "0a" -> 10, "10" -> 36
|
|
14
|
+
* Returns null if invalid format.
|
|
13
15
|
*/
|
|
14
|
-
export declare function
|
|
16
|
+
export declare function decodeTaskId(str: string): number | null;
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
+
* Encode a non-negative integer to a 6-character 'a'-padded base26 string (a-z alphabet).
|
|
19
|
+
* E.g., 0 → "aaaaaa", 1 → "aaaaab", 25 → "aaaaaz", 26 → "aaaaba"
|
|
18
20
|
*/
|
|
19
|
-
export declare function
|
|
21
|
+
export declare function encodeBase26(num: number): string;
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
+
* Decode a 6-character base26 string (a-z alphabet) back to a non-negative integer.
|
|
24
|
+
* Returns the decoded number, or null if invalid format.
|
|
23
25
|
*/
|
|
24
|
-
export declare function
|
|
26
|
+
export declare function decodeBase26(str: string): number | null;
|
|
27
|
+
/**
|
|
28
|
+
* Check if a string is a valid 6-character base26 project prefix (a-z only).
|
|
29
|
+
*/
|
|
30
|
+
export declare function isBase26Prefix(str: string): boolean;
|
|
25
31
|
export declare function getRafDir(): string;
|
|
26
32
|
export declare function ensureRafDir(): string;
|
|
27
33
|
export declare function getNextProjectNumber(rafDir: string): number;
|
|
@@ -29,29 +35,25 @@ export declare function formatProjectNumber(num: number): string;
|
|
|
29
35
|
export declare function getProjectDir(rafDir: string, projectName: string): string | null;
|
|
30
36
|
/**
|
|
31
37
|
* Extract project number prefix from a project path.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* E.g., "/Users/foo/RAF/a00-my-project" -> "a00"
|
|
35
|
-
* Returns the prefix string (e.g., "001" or "a00") or null if not found.
|
|
38
|
+
* E.g., "/Users/foo/RAF/abcdef-my-project" -> "abcdef"
|
|
39
|
+
* Returns the 6-char base26 prefix string or null if not found.
|
|
36
40
|
*/
|
|
37
41
|
export declare function extractProjectNumber(projectPath: string): string | null;
|
|
38
42
|
/**
|
|
39
43
|
* Parse a project prefix string to its numeric value.
|
|
40
|
-
*
|
|
44
|
+
* Accepts a 6-character base26 string (a-z only).
|
|
41
45
|
* Returns the numeric project number or null if invalid.
|
|
42
46
|
*/
|
|
43
47
|
export declare function parseProjectPrefix(prefix: string): number | null;
|
|
44
48
|
/**
|
|
45
49
|
* Extract project name from a project path (without number prefix).
|
|
46
|
-
*
|
|
47
|
-
* E.g., "/Users/foo/RAF/001-my-project" -> "my-project"
|
|
48
|
-
* E.g., "/Users/foo/RAF/a00-my-project" -> "my-project"
|
|
50
|
+
* E.g., "/Users/foo/RAF/abcdef-my-project" -> "my-project"
|
|
49
51
|
* Returns the project name or null if not found.
|
|
50
52
|
*/
|
|
51
53
|
export declare function extractProjectName(projectPath: string): string | null;
|
|
52
54
|
/**
|
|
53
55
|
* Extract task name from a plan filename (without number prefix and extension).
|
|
54
|
-
* E.g., "
|
|
56
|
+
* E.g., "02-fix-login-bug.md" -> "fix-login-bug"
|
|
55
57
|
* Returns the task name or null if not found.
|
|
56
58
|
*/
|
|
57
59
|
export declare function extractTaskNameFromPlanFile(planFilename: string): string | null;
|
|
@@ -86,14 +88,12 @@ export interface ProjectResolutionResult {
|
|
|
86
88
|
* Resolve a project identifier with detailed result including ambiguity detection.
|
|
87
89
|
*
|
|
88
90
|
* Supported identifier formats (checked in this order):
|
|
89
|
-
* 1. Full folder name (e.g., "
|
|
91
|
+
* 1. Full folder name (e.g., "abcdef-fix-stuff")
|
|
90
92
|
* - Must be an exact match to an existing folder
|
|
91
|
-
* - Pattern:
|
|
92
|
-
* 2.
|
|
93
|
-
* - Looks up by project number
|
|
94
|
-
* 3.
|
|
95
|
-
* - Looks up by base36 project number (for projects >= 1000)
|
|
96
|
-
* 4. Project name (e.g., "my-project", "fix-stuff")
|
|
93
|
+
* - Pattern: 6-char base26 prefix, followed by hyphen and name
|
|
94
|
+
* 2. Base26 prefix (e.g., "abcdef")
|
|
95
|
+
* - Looks up by decoded project number
|
|
96
|
+
* 3. Project name (e.g., "my-project", "fix-stuff")
|
|
97
97
|
* - Looks up by the name portion of the folder (after the prefix)
|
|
98
98
|
* - Case-insensitive matching
|
|
99
99
|
* - Returns error if multiple projects have the same name
|
|
@@ -107,23 +107,18 @@ export declare function resolveProjectIdentifierWithDetails(rafDir: string, iden
|
|
|
107
107
|
* Resolve a project identifier to a full project path.
|
|
108
108
|
*
|
|
109
109
|
* Supported identifier formats (checked in this order):
|
|
110
|
-
* 1. Full folder name (e.g., "
|
|
110
|
+
* 1. Full folder name (e.g., "abcdef-fix-stuff")
|
|
111
111
|
* - Must be an exact match to an existing folder
|
|
112
|
-
* - Pattern:
|
|
113
|
-
* 2.
|
|
114
|
-
* - Looks up by project number
|
|
115
|
-
* 3.
|
|
116
|
-
* - Looks up by base36 project number (for projects >= 1000)
|
|
117
|
-
* 4. Project name (e.g., "my-project", "fix-stuff")
|
|
112
|
+
* - Pattern: 6-char base26 prefix, followed by hyphen and name
|
|
113
|
+
* 2. Base26 prefix (e.g., "abcdef")
|
|
114
|
+
* - Looks up by decoded project number
|
|
115
|
+
* 3. Project name (e.g., "my-project", "fix-stuff")
|
|
118
116
|
* - Looks up by the name portion of the folder (after the prefix)
|
|
119
117
|
* - Case-insensitive matching
|
|
120
118
|
*
|
|
121
119
|
* Note: For ambiguity detection (multiple projects with same name), use
|
|
122
120
|
* resolveProjectIdentifierWithDetails instead.
|
|
123
121
|
*
|
|
124
|
-
* This function is designed to be extensible for future task-level references
|
|
125
|
-
* like "001-project/002-task".
|
|
126
|
-
*
|
|
127
122
|
* @param rafDir - The RAF directory containing project folders
|
|
128
123
|
* @param identifier - The identifier to resolve
|
|
129
124
|
* @returns The full project path or null if not found (or ambiguous)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names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