rafcode 1.3.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +118 -22
- package/RAF/aaaacu-worktree-weaver/decisions.md +88 -0
- package/RAF/aaaacu-worktree-weaver/input.md +27 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/01-git-worktree-utilities.md +41 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/02-worktree-plan-command.md +44 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/03-worktree-do-command.md +58 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/04-auto-merge-and-cleanup.md +40 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/05-worktree-tests.md +43 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/06-update-documentation.md +33 -0
- package/RAF/aaaacu-worktree-weaver/plans/01-git-worktree-utilities.md +51 -0
- package/RAF/aaaacu-worktree-weaver/plans/02-worktree-plan-command.md +93 -0
- package/RAF/aaaacu-worktree-weaver/plans/03-worktree-do-command.md +81 -0
- package/RAF/aaaacu-worktree-weaver/plans/04-auto-merge-and-cleanup.md +51 -0
- package/RAF/aaaacu-worktree-weaver/plans/05-worktree-tests.md +52 -0
- package/RAF/aaaacu-worktree-weaver/plans/06-update-documentation.md +55 -0
- package/RAF/aaaacv-trim-the-fat/decisions.md +34 -0
- package/RAF/aaaacv-trim-the-fat/input.md +5 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/01-add-worktree-support-to-status.md +43 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/02-remove-multi-project-from-do.md +50 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/03-commit-artifacts-on-amend.md +35 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/04-worktree-aware-exit-messages.md +36 -0
- package/RAF/aaaacv-trim-the-fat/plans/01-add-worktree-support-to-status.md +43 -0
- package/RAF/aaaacv-trim-the-fat/plans/02-remove-multi-project-from-do.md +44 -0
- package/RAF/aaaacv-trim-the-fat/plans/03-commit-artifacts-on-amend.md +38 -0
- package/RAF/aaaacv-trim-the-fat/plans/04-worktree-aware-exit-messages.md +38 -0
- package/RAF/aaaacw-prune-cycle/decisions.md +25 -0
- package/RAF/aaaacw-prune-cycle/input.md +5 -0
- package/RAF/aaaacw-prune-cycle/outcomes/01-create-worktree-from-branch.md +32 -0
- package/RAF/aaaacw-prune-cycle/outcomes/02-cleanup-worktree-on-success.md +33 -0
- package/RAF/aaaacw-prune-cycle/outcomes/03-amend-recreate-worktree.md +40 -0
- package/RAF/aaaacw-prune-cycle/plans/01-create-worktree-from-branch.md +31 -0
- package/RAF/aaaacw-prune-cycle/plans/02-cleanup-worktree-on-success.md +38 -0
- package/RAF/aaaacw-prune-cycle/plans/03-amend-recreate-worktree.md +50 -0
- package/RAF/aaaacx-epoch-shift/decisions.md +25 -0
- package/RAF/aaaacx-epoch-shift/input.md +1 -0
- package/RAF/aaaacx-epoch-shift/outcomes/01-epoch-id-generation.md +34 -0
- package/RAF/aaaacx-epoch-shift/outcomes/02-update-pattern-matching.md +32 -0
- package/RAF/aaaacx-epoch-shift/outcomes/03-update-tests.md +59 -0
- package/RAF/aaaacx-epoch-shift/outcomes/04-update-documentation.md +30 -0
- package/RAF/aaaacx-epoch-shift/plans/01-epoch-id-generation.md +40 -0
- package/RAF/aaaacx-epoch-shift/plans/02-update-pattern-matching.md +60 -0
- package/RAF/aaaacx-epoch-shift/plans/03-update-tests.md +48 -0
- package/RAF/aaaacx-epoch-shift/plans/04-update-documentation.md +44 -0
- package/RAF/ahmpro-merge-guardian/decisions.md +25 -0
- package/RAF/ahmpro-merge-guardian/input.md +4 -0
- package/RAF/ahmpro-merge-guardian/outcomes/001-fix-amend-worktree-commit.md +45 -0
- package/RAF/ahmpro-merge-guardian/outcomes/002-base36-task-ids.md +55 -0
- package/RAF/ahmpro-merge-guardian/outcomes/003-worktree-pr-creation.md +41 -0
- package/RAF/ahmpro-merge-guardian/outcomes/004-post-execution-picker.md +53 -0
- package/RAF/ahmpro-merge-guardian/plans/001-fix-amend-worktree-commit.md +39 -0
- package/RAF/ahmpro-merge-guardian/plans/002-base36-task-ids.md +43 -0
- package/RAF/ahmpro-merge-guardian/plans/003-worktree-pr-creation.md +43 -0
- package/RAF/ahmpro-merge-guardian/plans/004-post-execution-picker.md +51 -0
- package/RAF/ahnbcu-letterjam/decisions.md +13 -0
- package/RAF/ahnbcu-letterjam/input.md +3 -0
- package/RAF/ahnbcu-letterjam/outcomes/01-base26-encoding.md +42 -0
- package/RAF/ahnbcu-letterjam/outcomes/02-update-tests.md +38 -0
- package/RAF/ahnbcu-letterjam/outcomes/03-migrate-command.md +51 -0
- package/RAF/ahnbcu-letterjam/outcomes/04-update-documentation.md +29 -0
- package/RAF/ahnbcu-letterjam/plans/01-base26-encoding.md +36 -0
- package/RAF/ahnbcu-letterjam/plans/02-update-tests.md +37 -0
- package/RAF/ahnbcu-letterjam/plans/03-migrate-command.md +49 -0
- package/RAF/ahnbcu-letterjam/plans/04-update-documentation.md +39 -0
- package/RAF/ahnwrk-worktree-weaver/decisions.md +19 -0
- package/RAF/ahnwrk-worktree-weaver/input.md +4 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/01-remove-co-authored-by.md +20 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/02-update-task-status-format.md +21 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/03-worktree-auto-discovery.md +34 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/04-fix-pr-description.md +30 -0
- package/RAF/ahnwrk-worktree-weaver/plans/01-remove-co-authored-by.md +26 -0
- package/RAF/ahnwrk-worktree-weaver/plans/02-update-task-status-format.md +27 -0
- package/RAF/ahnwrk-worktree-weaver/plans/03-worktree-auto-discovery.md +37 -0
- package/RAF/ahnwrk-worktree-weaver/plans/04-fix-pr-description.md +50 -0
- package/README.md +56 -10
- package/dist/commands/do.d.ts +15 -0
- package/dist/commands/do.d.ts.map +1 -1
- package/dist/commands/do.js +384 -123
- package/dist/commands/do.js.map +1 -1
- package/dist/commands/migrate.d.ts +14 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +228 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +237 -40
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +221 -47
- package/dist/commands/status.js.map +1 -1
- package/dist/core/claude-runner.d.ts +2 -2
- package/dist/core/claude-runner.d.ts.map +1 -1
- package/dist/core/git.d.ts +15 -6
- package/dist/core/git.d.ts.map +1 -1
- package/dist/core/git.js +53 -20
- package/dist/core/git.js.map +1 -1
- package/dist/core/project-manager.d.ts.map +1 -1
- package/dist/core/project-manager.js +2 -2
- package/dist/core/project-manager.js.map +1 -1
- package/dist/core/pull-request.d.ts +84 -0
- package/dist/core/pull-request.d.ts.map +1 -0
- package/dist/core/pull-request.js +414 -0
- package/dist/core/pull-request.js.map +1 -0
- package/dist/core/state-derivation.d.ts +3 -3
- package/dist/core/state-derivation.d.ts.map +1 -1
- package/dist/core/state-derivation.js +18 -14
- package/dist/core/state-derivation.js.map +1 -1
- package/dist/core/worktree.d.ts +120 -0
- package/dist/core/worktree.d.ts.map +1 -0
- package/dist/core/worktree.js +322 -0
- package/dist/core/worktree.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/prompts/amend.d.ts +1 -0
- package/dist/prompts/amend.d.ts.map +1 -1
- package/dist/prompts/amend.js +14 -10
- package/dist/prompts/amend.js.map +1 -1
- package/dist/prompts/execution.d.ts.map +1 -1
- package/dist/prompts/execution.js +4 -2
- package/dist/prompts/execution.js.map +1 -1
- package/dist/prompts/planning.d.ts +1 -0
- package/dist/prompts/planning.d.ts.map +1 -1
- package/dist/prompts/planning.js +9 -8
- package/dist/prompts/planning.js.map +1 -1
- package/dist/types/config.d.ts +5 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/ui/project-picker.d.ts +34 -3
- package/dist/ui/project-picker.d.ts.map +1 -1
- package/dist/ui/project-picker.js +78 -10
- package/dist/ui/project-picker.js.map +1 -1
- package/dist/utils/paths.d.ts +38 -43
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +123 -193
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/terminal-symbols.d.ts +2 -2
- package/dist/utils/terminal-symbols.js +3 -3
- package/dist/utils/terminal-symbols.js.map +1 -1
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +2 -8
- package/dist/utils/validation.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/do.ts +454 -134
- package/src/commands/migrate.ts +269 -0
- package/src/commands/plan.ts +264 -40
- package/src/commands/status.ts +252 -45
- package/src/core/claude-runner.ts +2 -2
- package/src/core/git.ts +57 -21
- package/src/core/project-manager.ts +2 -1
- package/src/core/pull-request.ts +480 -0
- package/src/core/state-derivation.ts +18 -14
- package/src/core/worktree.ts +357 -0
- package/src/index.ts +2 -0
- package/src/prompts/amend.ts +15 -9
- package/src/prompts/execution.ts +4 -2
- package/src/prompts/planning.ts +10 -8
- package/src/types/config.ts +6 -0
- package/src/ui/project-picker.ts +110 -10
- package/src/utils/paths.ts +129 -214
- package/src/utils/terminal-symbols.ts +3 -3
- package/src/utils/validation.ts +2 -9
- package/tests/unit/amend-prompt.test.ts +85 -0
- package/tests/unit/claude-runner.test.ts +9 -9
- package/tests/unit/commit-planning-artifacts-worktree.test.ts +327 -0
- package/tests/unit/commit-planning-artifacts.test.ts +303 -35
- package/tests/unit/dependency-integration.test.ts +95 -95
- package/tests/unit/do-blocked-tasks.test.ts +53 -53
- package/tests/unit/do-command.test.ts +39 -132
- package/tests/unit/do-rerun.test.ts +65 -65
- package/tests/unit/do-worktree-cleanup.test.ts +151 -0
- package/tests/unit/execution-prompt.test.ts +71 -60
- package/tests/unit/failure-history.test.ts +19 -19
- package/tests/unit/git-commit-helpers.test.ts +5 -5
- package/tests/unit/git-stash.test.ts +4 -4
- package/tests/unit/migrate-command.test.ts +197 -0
- package/tests/unit/outcome-content.test.ts +20 -20
- package/tests/unit/paths.test.ts +269 -467
- package/tests/unit/plan-amend-worktree-recreate.test.ts +246 -0
- package/tests/unit/plan-command.test.ts +103 -103
- package/tests/unit/planning-prompt.test.ts +41 -4
- package/tests/unit/post-execution-picker.test.ts +251 -0
- package/tests/unit/project-manager.test.ts +20 -8
- package/tests/unit/project-picker.test.ts +425 -42
- package/tests/unit/pull-request.test.ts +852 -0
- package/tests/unit/state-derivation.test.ts +138 -137
- package/tests/unit/status-command.test.ts +344 -76
- package/tests/unit/terminal-symbols.test.ts +4 -4
- package/tests/unit/worktree-integration.test.ts +405 -0
- package/tests/unit/worktree.test.ts +523 -0
- package/tests/unit/do-multiproject.test.ts +0 -270
- /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/input.md +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/001-add-decisions-folder.md → aaaaab-raf-task-improvements/outcomes/01-add-decisions-folder.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/002-fix-write-error-on-shutdown.md → aaaaab-raf-task-improvements/outcomes/02-fix-write-error-on-shutdown.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/003-stash-changes-on-failure.md → aaaaab-raf-task-improvements/outcomes/03-stash-changes-on-failure.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/004-add-project-name-to-commits.md → aaaaab-raf-task-improvements/outcomes/04-add-project-name-to-commits.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/005-add-running-time-display.md → aaaaab-raf-task-improvements/outcomes/05-add-running-time-display.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/006-add-task-name-to-logs.md → aaaaab-raf-task-improvements/outcomes/06-add-task-name-to-logs.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/007-show-model-at-task-start.md → aaaaab-raf-task-improvements/outcomes/07-show-model-at-task-start.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/009-remove-editor-placeholder-text.md → aaaaab-raf-task-improvements/outcomes/09-remove-editor-placeholder-text.md} +0 -0
- /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/outcomes/SUMMARY.md +0 -0
- /package/RAF/{001-raf-task-improvements/plans/001-add-decisions-folder.md → aaaaab-raf-task-improvements/plans/01-add-decisions-folder.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/002-fix-write-error-on-shutdown.md → aaaaab-raf-task-improvements/plans/02-fix-write-error-on-shutdown.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/003-stash-changes-on-failure.md → aaaaab-raf-task-improvements/plans/03-stash-changes-on-failure.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/004-add-project-name-to-commits.md → aaaaab-raf-task-improvements/plans/04-add-project-name-to-commits.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/005-add-running-time-display.md → aaaaab-raf-task-improvements/plans/05-add-running-time-display.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/006-add-task-name-to-logs.md → aaaaab-raf-task-improvements/plans/06-add-task-name-to-logs.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/009-remove-editor-placeholder-text.md → aaaaab-raf-task-improvements/plans/09-remove-editor-placeholder-text.md} +0 -0
- /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/decisions/DECISIONS.md +0 -0
- /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/input.md +0 -0
- /package/RAF/{002-raf-task-improvements-execution/outcomes/001-commit-show-model-at-task-start.md → aaaaac-raf-task-improvements-execution/outcomes/01-commit-show-model-at-task-start.md} +0 -0
- /package/RAF/{002-raf-task-improvements-execution/outcomes/002-delete-skipped-plan.md → aaaaac-raf-task-improvements-execution/outcomes/02-delete-skipped-plan.md} +0 -0
- /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/outcomes/SUMMARY.md +0 -0
- /package/RAF/{002-raf-task-improvements-execution/plans/001-commit-show-model-at-task-start.md → aaaaac-raf-task-improvements-execution/plans/01-commit-show-model-at-task-start.md} +0 -0
- /package/RAF/{002-raf-task-improvements-execution/plans/002-delete-skipped-plan.md → aaaaac-raf-task-improvements-execution/plans/02-delete-skipped-plan.md} +0 -0
- /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/decisions/DECISIONS.md +0 -0
- /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/input.md +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/001-remove-state-json.md → aaaaad-multi-project-execution/outcomes/01-remove-state-json.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/002-update-raf-status.md → aaaaad-multi-project-execution/outcomes/02-update-raf-status.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/003-simplify-git-logic.md → aaaaad-multi-project-execution/outcomes/03-simplify-git-logic.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/004-auto-commit-planning.md → aaaaad-multi-project-execution/outcomes/04-auto-commit-planning.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/outcomes/05-rerun-failed-tasks.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/006-multi-project-execution.md → aaaaad-multi-project-execution/outcomes/06-multi-project-execution.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/007-verify-timeout.md → aaaaad-multi-project-execution/outcomes/07-verify-timeout.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/008-move-decisions-file.md → aaaaad-multi-project-execution/outcomes/08-move-decisions-file.md} +0 -0
- /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/outcomes/SUMMARY.md +0 -0
- /package/RAF/{003-multi-project-execution/plans/001-remove-state-json.md → aaaaad-multi-project-execution/plans/01-remove-state-json.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/002-update-raf-status.md → aaaaad-multi-project-execution/plans/02-update-raf-status.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/003-simplify-git-logic.md → aaaaad-multi-project-execution/plans/03-simplify-git-logic.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/004-auto-commit-planning.md → aaaaad-multi-project-execution/plans/04-auto-commit-planning.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/plans/05-rerun-failed-tasks.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/006-multi-project-execution.md → aaaaad-multi-project-execution/plans/06-multi-project-execution.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/007-verify-timeout.md → aaaaad-multi-project-execution/plans/07-verify-timeout.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/008-move-decisions-file.md → aaaaad-multi-project-execution/plans/08-move-decisions-file.md} +0 -0
- /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/decisions.md +0 -0
- /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/input.md +0 -0
- /package/RAF/{004-task-naming-optimization/outcomes/001-remove-summary-file.md → aaaaae-task-naming-optimization/outcomes/01-remove-summary-file.md} +0 -0
- /package/RAF/{004-task-naming-optimization/outcomes/002-base36-project-numbering.md → aaaaae-task-naming-optimization/outcomes/02-base36-project-numbering.md} +0 -0
- /package/RAF/{004-task-naming-optimization/outcomes/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/outcomes/03-improve-haiku-prompt.md} +0 -0
- /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/outcomes/SUMMARY.md +0 -0
- /package/RAF/{004-task-naming-optimization/plans/001-remove-summary-file.md → aaaaae-task-naming-optimization/plans/01-remove-summary-file.md} +0 -0
- /package/RAF/{004-task-naming-optimization/plans/002-base36-project-numbering.md → aaaaae-task-naming-optimization/plans/02-base36-project-numbering.md} +0 -0
- /package/RAF/{004-task-naming-optimization/plans/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/plans/03-improve-haiku-prompt.md} +0 -0
- /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/decisions.md +0 -0
- /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/input.md +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/outcomes/01-enhance-identifier-resolution.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/002-add-identifier-support-to-status.md → aaaaaf-task-naming-improvements/outcomes/02-add-identifier-support-to-status.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/003-update-do-for-full-folder-names.md → aaaaaf-task-naming-improvements/outcomes/03-update-do-for-full-folder-names.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/004-implement-amend-flag-for-plan.md → aaaaaf-task-naming-improvements/outcomes/04-implement-amend-flag-for-plan.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/005-commit-outcomes-on-complete.md → aaaaaf-task-naming-improvements/outcomes/05-commit-outcomes-on-complete.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/006-update-execution-prompt-commit-schema.md → aaaaaf-task-naming-improvements/outcomes/06-update-execution-prompt-commit-schema.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/007-allow-pending-task-amendments.md → aaaaaf-task-naming-improvements/outcomes/07-allow-pending-task-amendments.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/outcomes/08-fix-timeout-label.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/plans/01-enhance-identifier-resolution.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/002-add-identifier-support-to-status.md → aaaaaf-task-naming-improvements/plans/02-add-identifier-support-to-status.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/003-update-do-for-full-folder-names.md → aaaaaf-task-naming-improvements/plans/03-update-do-for-full-folder-names.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/004-implement-amend-flag-for-plan.md → aaaaaf-task-naming-improvements/plans/04-implement-amend-flag-for-plan.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/005-commit-outcomes-on-complete.md → aaaaaf-task-naming-improvements/plans/05-commit-outcomes-on-complete.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/006-update-execution-prompt-commit-schema.md → aaaaaf-task-naming-improvements/plans/06-update-execution-prompt-commit-schema.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/007-allow-pending-task-amendments.md → aaaaaf-task-naming-improvements/plans/07-allow-pending-task-amendments.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/plans/08-fix-timeout-label.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/decisions.md +0 -0
- /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/input.md +0 -0
- /package/RAF/{006-fix-double-summary-headers/outcomes/001-fix-double-summary-headers.md → aaaaag-fix-double-summary-headers/outcomes/01-fix-double-summary-headers.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/outcomes/002-update-readme-for-npm.md → aaaaag-fix-double-summary-headers/outcomes/02-update-readme-for-npm.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/outcomes/003-npm-publish-instructions.md → aaaaag-fix-double-summary-headers/outcomes/03-npm-publish-instructions.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/outcomes/004-flexible-project-lookup.md → aaaaag-fix-double-summary-headers/outcomes/04-flexible-project-lookup.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/plans/001-fix-double-summary-headers.md → aaaaag-fix-double-summary-headers/plans/01-fix-double-summary-headers.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/plans/002-update-readme-for-npm.md → aaaaag-fix-double-summary-headers/plans/02-update-readme-for-npm.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/plans/003-npm-publish-instructions.md → aaaaag-fix-double-summary-headers/plans/03-npm-publish-instructions.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/plans/004-flexible-project-lookup.md → aaaaag-fix-double-summary-headers/plans/04-flexible-project-lookup.md} +0 -0
- /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/decisions.md +0 -0
- /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/input.md +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/001-update-execution-prompt.md → aaaaah-improve-outcome-format/outcomes/01-update-execution-prompt.md} +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/002-update-state-derivation.md → aaaaah-improve-outcome-format/outcomes/02-update-state-derivation.md} +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/003-update-do-command-outcome-handling.md → aaaaah-improve-outcome-format/outcomes/03-update-do-command-outcome-handling.md} +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/outcomes/04-implement-failure-analysis.md} +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/005-update-documentation.md → aaaaah-improve-outcome-format/outcomes/05-update-documentation.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/001-update-execution-prompt.md → aaaaah-improve-outcome-format/plans/01-update-execution-prompt.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/002-update-state-derivation.md → aaaaah-improve-outcome-format/plans/02-update-state-derivation.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/003-update-do-command-outcome-handling.md → aaaaah-improve-outcome-format/plans/03-update-do-command-outcome-handling.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/plans/04-implement-failure-analysis.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/005-update-documentation.md → aaaaah-improve-outcome-format/plans/05-update-documentation.md} +0 -0
- /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/decisions.md +0 -0
- /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/input.md +0 -0
- /package/RAF/{008-beautiful-do/outcomes/001-terminal-symbols.md → aaaaai-beautiful-do/outcomes/01-terminal-symbols.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/002-refactor-do-output.md → aaaaai-beautiful-do/outcomes/02-refactor-do-output.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/003-refactor-status-output.md → aaaaai-beautiful-do/outcomes/03-refactor-status-output.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/004-simplify-logger.md → aaaaai-beautiful-do/outcomes/04-simplify-logger.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/005-add-tests.md → aaaaai-beautiful-do/outcomes/05-add-tests.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/001-terminal-symbols.md → aaaaai-beautiful-do/plans/01-terminal-symbols.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/002-refactor-do-output.md → aaaaai-beautiful-do/plans/02-refactor-do-output.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/003-refactor-status-output.md → aaaaai-beautiful-do/plans/03-refactor-status-output.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/004-simplify-logger.md → aaaaai-beautiful-do/plans/04-simplify-logger.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/005-add-tests.md → aaaaai-beautiful-do/plans/05-add-tests.md} +0 -0
- /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/decisions.md +0 -0
- /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/input.md +0 -0
- /package/RAF/{009-system-promt-ammend/outcomes/001-model-override.md → aaaaaj-system-promt-ammend/outcomes/01-model-override.md} +0 -0
- /package/RAF/{009-system-promt-ammend/outcomes/002-system-prompt-append.md → aaaaaj-system-promt-ammend/outcomes/02-system-prompt-append.md} +0 -0
- /package/RAF/{009-system-promt-ammend/outcomes/003-retry-context.md → aaaaaj-system-promt-ammend/outcomes/03-retry-context.md} +0 -0
- /package/RAF/{009-system-promt-ammend/plans/001-model-override.md → aaaaaj-system-promt-ammend/plans/01-model-override.md} +0 -0
- /package/RAF/{009-system-promt-ammend/plans/002-system-prompt-append.md → aaaaaj-system-promt-ammend/plans/02-system-prompt-append.md} +0 -0
- /package/RAF/{009-system-promt-ammend/plans/003-retry-context.md → aaaaaj-system-promt-ammend/plans/03-retry-context.md} +0 -0
- /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/decisions.md +0 -0
- /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/input.md +0 -0
- /package/RAF/{010-outcome-marker-fallback/outcomes/001-outcome-file-marker-fallback.md → aaaabk-outcome-marker-fallback/outcomes/01-outcome-file-marker-fallback.md} +0 -0
- /package/RAF/{010-outcome-marker-fallback/outcomes/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/outcomes/02-creative-project-naming.md} +0 -0
- /package/RAF/{010-outcome-marker-fallback/plans/001-outcome-file-marker-fallback.md → aaaabk-outcome-marker-fallback/plans/01-outcome-file-marker-fallback.md} +0 -0
- /package/RAF/{010-outcome-marker-fallback/plans/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/plans/02-creative-project-naming.md} +0 -0
- /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/decisions.md +0 -0
- /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/input.md +0 -0
- /package/RAF/{011-do-task-in-commit/outcomes/001-update-execution-prompt.md → aaaabl-do-task-in-commit/outcomes/01-update-execution-prompt.md} +0 -0
- /package/RAF/{011-do-task-in-commit/outcomes/002-update-tests.md → aaaabl-do-task-in-commit/outcomes/02-update-tests.md} +0 -0
- /package/RAF/{011-do-task-in-commit/outcomes/003-update-documentation.md → aaaabl-do-task-in-commit/outcomes/03-update-documentation.md} +0 -0
- /package/RAF/{011-do-task-in-commit/plans/001-update-execution-prompt.md → aaaabl-do-task-in-commit/plans/01-update-execution-prompt.md} +0 -0
- /package/RAF/{011-do-task-in-commit/plans/002-update-tests.md → aaaabl-do-task-in-commit/plans/02-update-tests.md} +0 -0
- /package/RAF/{011-do-task-in-commit/plans/003-update-documentation.md → aaaabl-do-task-in-commit/plans/03-update-documentation.md} +0 -0
- /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/decisions.md +0 -0
- /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/input.md +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/001-name-picker-for-raf-plan.md → aaaabm-name-picker-buffet/outcomes/01-name-picker-for-raf-plan.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/002-interactive-project-picker-for-raf-do.md → aaaabm-name-picker-buffet/outcomes/02-interactive-project-picker-for-raf-do.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/003-raf-status-truncation.md → aaaabm-name-picker-buffet/outcomes/03-raf-status-truncation.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/004-failure-reason-details.md → aaaabm-name-picker-buffet/outcomes/04-failure-reason-details.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/005-remove-raf-commits.md → aaaabm-name-picker-buffet/outcomes/05-remove-raf-commits.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/006-update-execution-prompt-for-commits.md → aaaabm-name-picker-buffet/outcomes/06-update-execution-prompt-for-commits.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/007-fix-plan-mode-user-prompt.md → aaaabm-name-picker-buffet/outcomes/07-fix-plan-mode-user-prompt.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/008-add-auto-flag-for-plan-mode.md → aaaabm-name-picker-buffet/outcomes/08-add-auto-flag-for-plan-mode.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/001-name-picker-for-raf-plan.md → aaaabm-name-picker-buffet/plans/01-name-picker-for-raf-plan.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/002-interactive-project-picker-for-raf-do.md → aaaabm-name-picker-buffet/plans/02-interactive-project-picker-for-raf-do.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/003-raf-status-truncation.md → aaaabm-name-picker-buffet/plans/03-raf-status-truncation.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/004-failure-reason-details.md → aaaabm-name-picker-buffet/plans/04-failure-reason-details.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/005-remove-raf-commits.md → aaaabm-name-picker-buffet/plans/05-remove-raf-commits.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/006-update-execution-prompt-for-commits.md → aaaabm-name-picker-buffet/plans/06-update-execution-prompt-for-commits.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/007-fix-plan-mode-user-prompt.md → aaaabm-name-picker-buffet/plans/07-fix-plan-mode-user-prompt.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/008-add-auto-flag-for-plan-mode.md → aaaabm-name-picker-buffet/plans/08-add-auto-flag-for-plan-mode.md} +0 -0
- /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/decisions.md +0 -0
- /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/input.md +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/outcomes/01-define-dependency-syntax.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/outcomes/02-update-planning-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/outcomes/03-parse-dependencies-update-state.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/004-implement-dependency-checking-in-do.md → aaaabn-dependencies-watchdog/outcomes/04-implement-dependency-checking-in-do.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/outcomes/05-update-execution-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/006-add-tests.md → aaaabn-dependencies-watchdog/outcomes/06-add-tests.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/007-add-act-alias.md → aaaabn-dependencies-watchdog/outcomes/07-add-act-alias.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/008-add-exit-message.md → aaaabn-dependencies-watchdog/outcomes/08-add-exit-message.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/plans/01-define-dependency-syntax.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/plans/02-update-planning-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/plans/03-parse-dependencies-update-state.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/004-implement-dependency-checking-in-do.md → aaaabn-dependencies-watchdog/plans/04-implement-dependency-checking-in-do.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/plans/05-update-execution-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/006-add-tests.md → aaaabn-dependencies-watchdog/plans/06-add-tests.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/007-add-act-alias.md → aaaabn-dependencies-watchdog/plans/07-add-act-alias.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/008-add-exit-message.md → aaaabn-dependencies-watchdog/plans/08-add-exit-message.md} +0 -0
- /package/RAF/{014-watchdog → aaaabo-watchdog}/decisions.md +0 -0
- /package/RAF/{014-watchdog → aaaabo-watchdog}/input.md +0 -0
- /package/RAF/{014-watchdog/outcomes/001-amend-flag-position.md → aaaabo-watchdog/outcomes/01-amend-flag-position.md} +0 -0
- /package/RAF/{014-watchdog/outcomes/002-details-only-on-failure.md → aaaabo-watchdog/outcomes/02-details-only-on-failure.md} +0 -0
- /package/RAF/{014-watchdog/plans/001-amend-flag-position.md → aaaabo-watchdog/plans/01-amend-flag-position.md} +0 -0
- /package/RAF/{014-watchdog/plans/002-details-only-on-failure.md → aaaabo-watchdog/plans/02-details-only-on-failure.md} +0 -0
- /package/RAF/{015-name-lottery → aaaabp-name-lottery}/decisions.md +0 -0
- /package/RAF/{015-name-lottery → aaaabp-name-lottery}/input.md +0 -0
- /package/RAF/{015-name-lottery/outcomes/001-auto-pick-project-name.md → aaaabp-name-lottery/outcomes/01-auto-pick-project-name.md} +0 -0
- /package/RAF/{015-name-lottery/outcomes/002-mention-plan-files-in-commit.md → aaaabp-name-lottery/outcomes/02-mention-plan-files-in-commit.md} +0 -0
- /package/RAF/{015-name-lottery/outcomes/003-fix-input-md-in-amend-flow.md → aaaabp-name-lottery/outcomes/03-fix-input-md-in-amend-flow.md} +0 -0
- /package/RAF/{015-name-lottery/plans/001-auto-pick-project-name.md → aaaabp-name-lottery/plans/01-auto-pick-project-name.md} +0 -0
- /package/RAF/{015-name-lottery/plans/002-mention-plan-files-in-commit.md → aaaabp-name-lottery/plans/02-mention-plan-files-in-commit.md} +0 -0
- /package/RAF/{015-name-lottery/plans/003-fix-input-md-in-amend-flow.md → aaaabp-name-lottery/plans/03-fix-input-md-in-amend-flow.md} +0 -0
- /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/decisions.md +0 -0
- /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/input.md +0 -0
- /package/RAF/{016-planning-scalpel/outcomes/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/outcomes/01-update-git-commit-instructions.md} +0 -0
- /package/RAF/{016-planning-scalpel/plans/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/plans/01-update-git-commit-instructions.md} +0 -0
- /package/RAF/{017-decision-vault → aaaabr-decision-vault}/decisions.md +0 -0
- /package/RAF/{017-decision-vault → aaaabr-decision-vault}/input.md +0 -0
- /package/RAF/{017-decision-vault/outcomes/001-create-git-commit-utility.md → aaaabr-decision-vault/outcomes/01-create-git-commit-utility.md} +0 -0
- /package/RAF/{017-decision-vault/outcomes/002-integrate-commit-into-plan.md → aaaabr-decision-vault/outcomes/02-integrate-commit-into-plan.md} +0 -0
- /package/RAF/{017-decision-vault/outcomes/003-add-tests-for-planning-commit.md → aaaabr-decision-vault/outcomes/03-add-tests-for-planning-commit.md} +0 -0
- /package/RAF/{017-decision-vault/plans/001-create-git-commit-utility.md → aaaabr-decision-vault/plans/01-create-git-commit-utility.md} +0 -0
- /package/RAF/{017-decision-vault/plans/002-integrate-commit-into-plan.md → aaaabr-decision-vault/plans/02-integrate-commit-into-plan.md} +0 -0
- /package/RAF/{017-decision-vault/plans/003-add-tests-for-planning-commit.md → aaaabr-decision-vault/plans/03-add-tests-for-planning-commit.md} +0 -0
- /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/decisions.md +0 -0
- /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/input.md +0 -0
- /package/RAF/{018-workflow-forge/outcomes/001-add-task-number-progress.md → aaaabs-workflow-forge/outcomes/01-add-task-number-progress.md} +0 -0
- /package/RAF/{018-workflow-forge/outcomes/002-update-plan-do-prompts.md → aaaabs-workflow-forge/outcomes/02-update-plan-do-prompts.md} +0 -0
- /package/RAF/{018-workflow-forge/plans/001-add-task-number-progress.md → aaaabs-workflow-forge/plans/01-add-task-number-progress.md} +0 -0
- /package/RAF/{018-workflow-forge/plans/002-update-plan-do-prompts.md → aaaabs-workflow-forge/plans/02-update-plan-do-prompts.md} +0 -0
- /package/RAF/{019-verbose-chronicle → aaaabt-verbose-chronicle}/decisions.md +0 -0
- /package/RAF/{019-verbose-chronicle → aaaabt-verbose-chronicle}/input.md +0 -0
- /package/RAF/{019-verbose-chronicle/outcomes/001-amend-iteration-references.md → aaaabt-verbose-chronicle/outcomes/01-amend-iteration-references.md} +0 -0
- /package/RAF/{019-verbose-chronicle/outcomes/002-verbose-task-name-display.md → aaaabt-verbose-chronicle/outcomes/02-verbose-task-name-display.md} +0 -0
- /package/RAF/{019-verbose-chronicle/outcomes/003-verbose-streaming-fix.md → aaaabt-verbose-chronicle/outcomes/03-verbose-streaming-fix.md} +0 -0
- /package/RAF/{019-verbose-chronicle/outcomes/004-commit-verification-before-halt.md → aaaabt-verbose-chronicle/outcomes/04-commit-verification-before-halt.md} +0 -0
- /package/RAF/{019-verbose-chronicle/plans/001-amend-iteration-references.md → aaaabt-verbose-chronicle/plans/01-amend-iteration-references.md} +0 -0
- /package/RAF/{019-verbose-chronicle/plans/002-verbose-task-name-display.md → aaaabt-verbose-chronicle/plans/02-verbose-task-name-display.md} +0 -0
- /package/RAF/{019-verbose-chronicle/plans/003-verbose-streaming-fix.md → aaaabt-verbose-chronicle/plans/03-verbose-streaming-fix.md} +0 -0
- /package/RAF/{019-verbose-chronicle/plans/004-commit-verification-before-halt.md → aaaabt-verbose-chronicle/plans/04-commit-verification-before-halt.md} +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Task: Update All Pattern Matching and Resolution for 6-Char IDs
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Update every regex pattern, folder matching function, and identifier resolution function across the codebase to recognize the new 6-character base36 project ID format.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
After task 001 changes the ID generation, the rest of the codebase still has regex patterns like `/^(\d{2,3})-/` and `/^([a-z][0-9a-z]{2})-/` that match the old format. These must all be updated to match the new 6-char alphanumeric format (e.g., `00j3k1-project-name`). This is a clean break, so old patterns should be removed entirely.
|
|
8
|
+
|
|
9
|
+
## Dependencies
|
|
10
|
+
001
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
- New project folder pattern: `/^([0-9a-z]{6})-(.+)$/` (6 lowercase alphanumeric chars, hyphen, name)
|
|
14
|
+
- Update all functions in `src/utils/paths.ts` that parse folder names:
|
|
15
|
+
- `extractProjectNumber()` — match 6-char prefix
|
|
16
|
+
- `extractProjectName()` — match 6-char prefix, return name after hyphen
|
|
17
|
+
- `extractTaskNameFromPlanFile()` — this uses task IDs (3-digit like `001`), leave as-is since task numbering within a project hasn't changed
|
|
18
|
+
- `parseProjectPrefix()` — parse 6-char base36 string
|
|
19
|
+
- `getProjectDir()` — match 6-char prefix pattern
|
|
20
|
+
- `listProjects()` — match 6-char prefix pattern
|
|
21
|
+
- `parseProjectFolder()` — match 6-char prefix pattern
|
|
22
|
+
- `resolveProjectIdentifierWithDetails()` — update the full folder pattern regex, update identifier detection (no more separate numeric vs base36 paths — all IDs are 6-char base36)
|
|
23
|
+
- Update `src/core/state-derivation.ts`:
|
|
24
|
+
- `discoverProjects()` — currently only matches `/^(\d{2,3})-/`, must match new 6-char format
|
|
25
|
+
- `parseDependencies()` — this is about task IDs (like `001`), not project IDs, so leave as-is
|
|
26
|
+
- Outcome file matching in `deriveProjectState()` — these use task IDs (`/^(\d{2,3})-/` for tasks), leave as-is
|
|
27
|
+
- Plan file matching in `deriveProjectState()` — same, task IDs, leave as-is
|
|
28
|
+
- Update `src/core/project-manager.ts`:
|
|
29
|
+
- `readOutcomes()` — uses `/^(\d{2,3})-/` to match task outcomes, this is task ID format, leave as-is
|
|
30
|
+
- Update `src/utils/validation.ts`:
|
|
31
|
+
- `validateProjectExists()` — update folder matching patterns
|
|
32
|
+
- Update `src/commands/plan.ts`:
|
|
33
|
+
- Any regex matching existing plan files (line ~582: `/^(\d{2,3})-/`) — this is for task files, leave as-is
|
|
34
|
+
- Update `src/commands/status.ts` and `src/commands/do.ts` — these use `extractProjectNumber()` and `extractProjectName()` which will be updated via paths.ts, but check for any inline regex patterns
|
|
35
|
+
- Update identifier resolution to support:
|
|
36
|
+
- Full 6-char ID: `00j3k1` → look up by decoded number
|
|
37
|
+
- Full folder name: `00j3k1-epoch-shift` → exact match
|
|
38
|
+
- Project name: `epoch-shift` → name match (case-insensitive)
|
|
39
|
+
- Remove old numeric-only (`3`, `003`) and old 3-char base36 (`a00`) resolution paths
|
|
40
|
+
|
|
41
|
+
## Implementation Steps
|
|
42
|
+
1. Update all regex patterns in `src/utils/paths.ts` from old numeric/base36 dual patterns to single 6-char pattern
|
|
43
|
+
2. Simplify `resolveProjectIdentifierWithDetails()` — all IDs are now 6-char base36, so the numeric vs base36 branching can be unified
|
|
44
|
+
3. Update `discoverProjects()` in `src/core/state-derivation.ts` to match 6-char prefix
|
|
45
|
+
4. Update `validateProjectExists()` in `src/utils/validation.ts`
|
|
46
|
+
5. Verify that task-level patterns (3-digit IDs like `001`) are untouched
|
|
47
|
+
6. Verify commands (`do.ts`, `status.ts`, `plan.ts`) work with updated utility functions
|
|
48
|
+
|
|
49
|
+
## Acceptance Criteria
|
|
50
|
+
- [ ] All project folder patterns match `[0-9a-z]{6}-name` format
|
|
51
|
+
- [ ] Task-level patterns (`001`, `002`) remain unchanged
|
|
52
|
+
- [ ] `resolveProjectIdentifierWithDetails()` resolves 6-char IDs and project names
|
|
53
|
+
- [ ] `discoverProjects()` finds projects with new ID format
|
|
54
|
+
- [ ] `validateProjectExists()` works with new format
|
|
55
|
+
- [ ] No old numeric-only or 3-char base36 patterns remain for project IDs
|
|
56
|
+
- [ ] TypeScript compiles with no errors
|
|
57
|
+
|
|
58
|
+
## Notes
|
|
59
|
+
- Be careful to distinguish between PROJECT IDs (changing to 6-char) and TASK IDs within a project (staying as 3-digit `001`, `002`, etc.). Only project-level patterns change.
|
|
60
|
+
- The `number` field in project interfaces remains a `number` type — it just holds a larger value now (the shifted timestamp).
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Task: Update Tests for New Epoch-Based ID System
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Rewrite all unit tests affected by the project ID format change to test the new 6-character base36 epoch-based ID system.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
The test suite in `tests/unit/paths.test.ts` (~741 lines) extensively tests the old sequential numbering and base36 encoding. After tasks 001 and 002 change the production code, these tests will all fail. Other test files (`status-command.test.ts`, `plan-command.test.ts`, `do-command.test.ts`) may also have hardcoded project folder names in old format.
|
|
8
|
+
|
|
9
|
+
## Dependencies
|
|
10
|
+
001, 002
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
- Rewrite `tests/unit/paths.test.ts` to cover:
|
|
14
|
+
- `encodeBase36()` — now encodes any non-negative integer to 6-char zero-padded base36
|
|
15
|
+
- `decodeBase36()` — inverse of encode
|
|
16
|
+
- `getNextProjectNumber()` — generates from current timestamp, handles collisions
|
|
17
|
+
- `formatProjectNumber()` — produces 6-char strings
|
|
18
|
+
- `extractProjectNumber()` — extracts 6-char prefix from folder names
|
|
19
|
+
- `extractProjectName()` — extracts name portion after 6-char prefix
|
|
20
|
+
- `parseProjectPrefix()` — parses 6-char base36 strings
|
|
21
|
+
- `resolveProjectIdentifierWithDetails()` — test all resolution paths (6-char ID, folder name, project name)
|
|
22
|
+
- `listProjects()` — lists projects with new format
|
|
23
|
+
- `discoverProjects()` — discovers projects with new format
|
|
24
|
+
- Update any test fixtures that use old folder names (e.g., `001-test-project` → `00abcd-test-project`)
|
|
25
|
+
- Test collision handling in `getNextProjectNumber()` — mock `Date.now()` and pre-create folders
|
|
26
|
+
- Test edge cases: zero timestamp (epoch start), very large timestamps, invalid format strings
|
|
27
|
+
- Update tests in other test files (`status-command.test.ts`, `plan-command.test.ts`, `do-command.test.ts`) that reference project folder names with old format
|
|
28
|
+
|
|
29
|
+
## Implementation Steps
|
|
30
|
+
1. Read existing test files to understand current test structure and patterns
|
|
31
|
+
2. Rewrite `tests/unit/paths.test.ts` for the new ID system
|
|
32
|
+
3. Update project folder references in `tests/unit/status-command.test.ts`
|
|
33
|
+
4. Update project folder references in `tests/unit/plan-command.test.ts`
|
|
34
|
+
5. Update project folder references in `tests/unit/do-command.test.ts`
|
|
35
|
+
6. Run all tests and fix any remaining failures
|
|
36
|
+
|
|
37
|
+
## Acceptance Criteria
|
|
38
|
+
- [ ] All tests in `paths.test.ts` rewritten and passing
|
|
39
|
+
- [ ] Tests cover encode/decode round-trip
|
|
40
|
+
- [ ] Tests cover collision handling
|
|
41
|
+
- [ ] Tests cover identifier resolution (6-char ID, full folder, name)
|
|
42
|
+
- [ ] Tests in other files updated with new folder format
|
|
43
|
+
- [ ] `npm test` passes with all tests green
|
|
44
|
+
- [ ] No references to old folder format (e.g., `001-`, `a00-`) remain in test files for project IDs (task IDs like `001-task.md` within plans/outcomes are fine)
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
- For time-dependent tests, mock `Date.now()` to return predictable values. E.g., `Date.now = jest.fn(() => (1767225600 + 12345) * 1000)` → ID should be `encodeBase36(12345)` = `"0009ix"`.
|
|
48
|
+
- Remember task IDs within projects still use the `001`, `002` format — only project-level IDs changed.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Task: Update Documentation for New ID System
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Update CLAUDE.md and README.md to reflect the new epoch-based project ID format.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
After the code changes, the documentation still references the old sequential numbering system (001-999 numeric, a00-zzz base36). All references need to be updated to describe the new 6-character base36 epoch-based IDs.
|
|
8
|
+
|
|
9
|
+
## Dependencies
|
|
10
|
+
001, 002
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
- Update `CLAUDE.md`:
|
|
14
|
+
- Project Naming Convention section: describe new epoch-based scheme
|
|
15
|
+
- Remove references to NNN (001-999) sequential format
|
|
16
|
+
- Remove references to old base36 (a00-zzz) format
|
|
17
|
+
- Update "Supports 46,000+ projects" — new system supports 69 years of unique IDs
|
|
18
|
+
- Update Project Identifier Resolution section: 6-char ID, project name, full folder name
|
|
19
|
+
- Update example folder names (e.g., `001-fix-bug` → `00abcd-fix-bug`)
|
|
20
|
+
- Update git commit format examples: `RAF[00abcd:001]`
|
|
21
|
+
- Update worktree branch name examples
|
|
22
|
+
- Update RAF Project Structure section with new folder format
|
|
23
|
+
- Update `README.md`:
|
|
24
|
+
- Update any user-facing references to project ID format
|
|
25
|
+
- Update example commands and output
|
|
26
|
+
|
|
27
|
+
## Implementation Steps
|
|
28
|
+
1. Read current CLAUDE.md and identify all sections referencing the old ID format
|
|
29
|
+
2. Update each section with the new 6-char base36 epoch-based format
|
|
30
|
+
3. Read current README.md and update relevant sections
|
|
31
|
+
4. Ensure consistency between CLAUDE.md and README.md
|
|
32
|
+
|
|
33
|
+
## Acceptance Criteria
|
|
34
|
+
- [ ] No references to old sequential numbering (001-999) for project IDs in docs
|
|
35
|
+
- [ ] No references to old base36 format (a00-zzz) for project IDs in docs
|
|
36
|
+
- [ ] New epoch-based scheme clearly documented
|
|
37
|
+
- [ ] Examples use realistic 6-char IDs
|
|
38
|
+
- [ ] Git commit format examples updated
|
|
39
|
+
- [ ] Project resolution formats documented
|
|
40
|
+
- [ ] Task IDs within projects still shown as 001, 002 format (unchanged)
|
|
41
|
+
|
|
42
|
+
## Notes
|
|
43
|
+
- Be careful to distinguish between project IDs (changing) and task IDs (staying as 001, 002). Don't accidentally change task ID documentation.
|
|
44
|
+
- The prompts in `src/prompts/` also reference project structure — the amend prompt mentions `NNN` for task references which is about task IDs, not project IDs. The planning prompt shows `001-task-name.md` which is also task format. These should NOT be changed.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Project Decisions
|
|
2
|
+
|
|
3
|
+
## Amend commit bug: does it fail only with --worktree or also without?
|
|
4
|
+
Worktree only. The bug only happens when using --amend --worktree.
|
|
5
|
+
|
|
6
|
+
## Amend commit bug: suspected root cause?
|
|
7
|
+
Needs investigation. Not sure of root cause — the task should investigate the full amend+worktree flow to find the bug.
|
|
8
|
+
|
|
9
|
+
## Task ID format change: breaking change or backward compatible?
|
|
10
|
+
Breaking change. Update everything to new format, no backward compat needed.
|
|
11
|
+
|
|
12
|
+
## PR creation: what content should the PR body contain?
|
|
13
|
+
Input.md, key decisions, and outcomes summary combined.
|
|
14
|
+
|
|
15
|
+
## PR creation: how should the PR body be generated?
|
|
16
|
+
Use Claude (Haiku) to generate a clean PR description from input + decisions + outcomes.
|
|
17
|
+
|
|
18
|
+
## PR target branch: auto-detect or let user pick?
|
|
19
|
+
Auto-detect base. Automatically use the branch the worktree was forked from (usually main).
|
|
20
|
+
|
|
21
|
+
## Post-execution picker: when should it appear?
|
|
22
|
+
Remove --merge flag entirely. Always show picker BEFORE worktree tasks execute.
|
|
23
|
+
|
|
24
|
+
## Post-execution picker: flow after task completion?
|
|
25
|
+
Pre-pick + auto. Pick before execution, auto-perform after success, skip on failure.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
- [ ] if i do amend - input.md and decision.md updates don't get commited. investigate and fix (prev attempt to fix in commit c94558940d232fabcf8023c92867891de3a0dbcc)
|
|
2
|
+
- [ ] make task id two decimal places (01, 02, 03..., a0, a1) same encoding
|
|
3
|
+
- [ ] use gh to create a PR from worktree if possible
|
|
4
|
+
- [ ] add picker for raf do --worktree to chose between --merge or --pr or leave branch options
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Outcome: Fix Amend Worktree Commit Bug
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Fixed the bug where `input.md` and `decisions.md` changes were not committed when running `raf plan --amend --worktree`. The fix addresses two root causes in `commitPlanningArtifacts()`:
|
|
6
|
+
|
|
7
|
+
1. **Absolute path resolution in worktrees**: Converted file paths from absolute to relative when `cwd` is provided (worktree mode). This avoids potential path resolution mismatches between Node.js and git, particularly on macOS where symlinks (e.g., `/tmp` → `/private/tmp`) can cause absolute paths to not match git's internal worktree path tracking.
|
|
8
|
+
|
|
9
|
+
2. **All-or-nothing staging failure**: Changed from a single `git add` call with all files to individual `git add` calls per file. Previously, if any single file failed to stage (e.g., missing `decisions.md`), the entire `git add` command failed with exit code 128, meaning NO files were staged — including `input.md` which was always modified.
|
|
10
|
+
|
|
11
|
+
## Root Cause Analysis
|
|
12
|
+
|
|
13
|
+
The `commitPlanningArtifacts()` function used absolute paths for `git add` even when operating in a worktree. While this works in simple cases, it can fail when:
|
|
14
|
+
- macOS path symlink resolution causes the absolute path to differ from git's internal representation
|
|
15
|
+
- One file in the batch doesn't exist (e.g., `decisions.md` not yet written by Claude), causing `git add` to fail for ALL files
|
|
16
|
+
|
|
17
|
+
Evidence: commit `60d6565` ("missed desicions") shows that project 022's amend produced updated `input.md` and `decisions.md` that were never committed by `commitPlanningArtifacts`, requiring a manual commit.
|
|
18
|
+
|
|
19
|
+
## Changes Made
|
|
20
|
+
|
|
21
|
+
### `src/core/git.ts`
|
|
22
|
+
- Convert absolute file paths to relative (via `path.relative(cwd, file)`) when `cwd` is provided
|
|
23
|
+
- Stage files individually with separate `git add` calls per file
|
|
24
|
+
- Add per-file error handling so one failed staging doesn't block others
|
|
25
|
+
- Add early return when no files are successfully staged
|
|
26
|
+
|
|
27
|
+
### `tests/unit/commit-planning-artifacts.test.ts`
|
|
28
|
+
- Updated existing tests for individual `git add` call behavior
|
|
29
|
+
- Added tests for: relative path conversion in worktree mode, absolute paths in standard mode, partial staging failure recovery, total staging failure handling, additional file path conversion in worktree mode
|
|
30
|
+
|
|
31
|
+
### `tests/unit/commit-planning-artifacts-worktree.test.ts` (new)
|
|
32
|
+
- Real git repo integration tests covering:
|
|
33
|
+
- Basic worktree commit (input.md + decisions.md)
|
|
34
|
+
- Amend with additional plan files in worktree
|
|
35
|
+
- Commit after worktree recreation from branch (the exact bug scenario)
|
|
36
|
+
- Partial file changes (only some files modified)
|
|
37
|
+
- Non-worktree standard mode (regression check)
|
|
38
|
+
|
|
39
|
+
## Test Results
|
|
40
|
+
|
|
41
|
+
- All 852 tests pass (842 existing + 10 new)
|
|
42
|
+
- Build succeeds with no type errors
|
|
43
|
+
- No regressions in existing functionality
|
|
44
|
+
|
|
45
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Outcome: Change Task IDs to 2-Character Base36 Format
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Changed task IDs from 3-digit decimal (001, 002, ..., 999) to 2-character base36 (01, 02, ..., 0a, ..., zz) across the entire codebase, supporting up to 1296 tasks per project.
|
|
6
|
+
|
|
7
|
+
## Changes Made
|
|
8
|
+
|
|
9
|
+
### Core Utilities (`src/utils/paths.ts`)
|
|
10
|
+
- Added `TASK_ID_WIDTH = 2` constant
|
|
11
|
+
- Added `TASK_ID_PATTERN = '[0-9a-z]{2}'` exported regex pattern
|
|
12
|
+
- Added `encodeTaskId(num)` function: converts number to 2-char zero-padded base36 string
|
|
13
|
+
- Added `decodeTaskId(str)` function: converts 2-char base36 string back to number (returns null if invalid)
|
|
14
|
+
- Updated `extractTaskNameFromPlanFile` regex from `\d{2,3}` to `[0-9a-z]{2}`
|
|
15
|
+
|
|
16
|
+
### State Derivation (`src/core/state-derivation.ts`)
|
|
17
|
+
- Updated `parseDependencies` filter to use `TASK_ID_PATTERN` regex
|
|
18
|
+
- Updated outcome file and plan file parsing regexes from `\d{2,3}` to `TASK_ID_PATTERN`
|
|
19
|
+
|
|
20
|
+
### Project Manager (`src/core/project-manager.ts`)
|
|
21
|
+
- Updated `readOutcomes` regex to use `TASK_ID_PATTERN`
|
|
22
|
+
|
|
23
|
+
### Plan Command (`src/commands/plan.ts`)
|
|
24
|
+
- Updated `maxTaskNumber` calculation to use `decodeTaskId()` instead of `parseInt()`
|
|
25
|
+
- Updated new plan file detection regex to use `TASK_ID_PATTERN` and `decodeTaskId()`
|
|
26
|
+
- Updated amend template task numbering to use `encodeTaskId()`
|
|
27
|
+
|
|
28
|
+
### Prompt Templates
|
|
29
|
+
- **execution.ts**: Changed commit message format from 3-digit padStart to 2-char base36 encoding
|
|
30
|
+
- **planning.ts**: Updated all plan file examples (001 -> 01), dependency format examples (001, 002 -> 01, 02), numbering rule (001, 002, 003 -> 01, 02, 03)
|
|
31
|
+
- **amend.ts**: Updated all task numbering to use `encodeTaskId()`, updated dependency format examples
|
|
32
|
+
|
|
33
|
+
### Comments Updated
|
|
34
|
+
- **claude-runner.ts**: Updated commit message examples (RAF[005:001] -> RAF[005:01])
|
|
35
|
+
- **git.ts**: Updated stash name example
|
|
36
|
+
|
|
37
|
+
### Documentation (`CLAUDE.md`)
|
|
38
|
+
- Updated project structure examples to show 2-char task IDs
|
|
39
|
+
- Added "Task ID Format" section to architectural decisions
|
|
40
|
+
- Updated dependencies format and git commit examples
|
|
41
|
+
|
|
42
|
+
### Test Files (25+ files updated)
|
|
43
|
+
All test fixtures updated to use 2-char base36 task IDs in plan/outcome filenames, task ID assertions, dependency strings, commit messages, and prompt expectations. Key patterns changed:
|
|
44
|
+
- Plan filenames: `001-task.md` -> `01-task.md`
|
|
45
|
+
- Task IDs: `'001'` -> `'01'`
|
|
46
|
+
- Commit messages: `RAF[005:001]` -> `RAF[005:01]`
|
|
47
|
+
- Dependencies: `001, 002` -> `01, 02`
|
|
48
|
+
|
|
49
|
+
## Test Results
|
|
50
|
+
|
|
51
|
+
- All 853 tests pass (42 test suites)
|
|
52
|
+
- Build succeeds with no type errors
|
|
53
|
+
- No regressions
|
|
54
|
+
|
|
55
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Outcome: Add PR Creation from Worktree
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Added a reusable `src/core/pull-request.ts` module that creates GitHub Pull Requests from worktree branches using the `gh` CLI tool, with Claude Haiku-generated PR bodies.
|
|
6
|
+
|
|
7
|
+
## Changes Made
|
|
8
|
+
|
|
9
|
+
### New Module: `src/core/pull-request.ts`
|
|
10
|
+
- **`createPullRequest(branch, projectPath, options?)`**: Main entry point - runs preflight checks, detects base branch, auto-pushes branch, generates PR body via Claude Haiku, and calls `gh pr create`
|
|
11
|
+
- **`prPreflight(branch, cwd?)`**: Validates prerequisites - gh CLI installed, authenticated, GitHub remote present, branch push status
|
|
12
|
+
- **`generatePrBody(projectPath, timeoutMs?)`**: Reads input.md, decisions.md, and outcome files, then calls Claude Haiku to generate a summary. Falls back to simple body if Claude is unavailable
|
|
13
|
+
- **`generatePrTitle(projectPath)`**: Converts project name from kebab-case to human-readable (e.g., "merge-guardian" -> "Merge guardian")
|
|
14
|
+
- **`detectBaseBranch(cwd?)`**: Auto-detects base branch from `refs/remotes/origin/HEAD`, falling back to checking `main` then `master`
|
|
15
|
+
- **`readProjectContext(projectPath)`**: Reads input.md, decisions.md, and outcome files for context
|
|
16
|
+
- Helper functions: `isGhInstalled()`, `isGhAuthenticated()`, `isGitHubRemote()`, `isBranchPushed()`, `pushBranch()`
|
|
17
|
+
- All git-related functions accept optional `cwd` parameter for worktree support
|
|
18
|
+
|
|
19
|
+
### New Tests: `tests/unit/pull-request.test.ts`
|
|
20
|
+
- 43 tests covering all exported functions
|
|
21
|
+
- Tests for: gh CLI detection, authentication check, GitHub remote detection, branch push status, base branch detection (with fallback chain), preflight checks, PR title generation, project context reading, PR body generation (with Claude fallback), full PR creation flow (success, failures, cwd passthrough)
|
|
22
|
+
- Follows existing mock patterns: `jest.unstable_mockModule()` for ESM, mocks `child_process`, `fs`, `logger`
|
|
23
|
+
|
|
24
|
+
### Documentation: `CLAUDE.md`
|
|
25
|
+
- Added "PR Creation from Worktree" section under Architectural Decisions
|
|
26
|
+
|
|
27
|
+
## Test Results
|
|
28
|
+
|
|
29
|
+
- All 896 tests pass (43 test suites)
|
|
30
|
+
- 853 existing tests: passing
|
|
31
|
+
- 43 new tests: passing
|
|
32
|
+
- Build succeeds with no type errors
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
- This module is a standalone utility - it will be consumed by the post-execution picker (task 004)
|
|
37
|
+
- PR body generation uses Claude Haiku for cost efficiency, with a configurable timeout (default 60s)
|
|
38
|
+
- If Claude CLI is unavailable, falls back to a simple body with project input and task count
|
|
39
|
+
- Branch is automatically pushed to origin if not already pushed before PR creation
|
|
40
|
+
|
|
41
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Outcome: Add Post-Execution Picker for Worktree Mode
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Replaced the `--merge` CLI flag with an interactive post-execution picker shown before task execution in worktree mode. Users now choose upfront what happens after tasks complete: merge, create PR, or leave the branch.
|
|
6
|
+
|
|
7
|
+
## Changes Made
|
|
8
|
+
|
|
9
|
+
### `src/commands/do.ts`
|
|
10
|
+
- Removed `--merge` Commander.js option
|
|
11
|
+
- Added `PostExecutionAction` type (`'merge' | 'pr' | 'leave'`)
|
|
12
|
+
- Added `pickPostExecutionAction()` — interactive picker using `@inquirer/prompts` `select`, shown before task execution begins
|
|
13
|
+
- If "Create PR" is chosen, runs `prPreflight()` immediately; falls back to "leave" if preflight fails (e.g., `gh` not installed)
|
|
14
|
+
- Added `executePostAction()` — dispatches the chosen action after all tasks succeed:
|
|
15
|
+
- **merge**: cleans up worktree, merges branch into original (same behavior as old `--merge`)
|
|
16
|
+
- **pr**: creates GitHub PR via `createPullRequest()` from task 003's module; preserves worktree for follow-up
|
|
17
|
+
- **leave**: cleans up worktree directory (branch preserved)
|
|
18
|
+
- Refactored post-execution flow: old `mergeMode` boolean replaced with `postAction` variable
|
|
19
|
+
- On failure, skips post-action with informational message (only for non-leave actions)
|
|
20
|
+
- Added import for `createPullRequest` and `prPreflight` from `pull-request.ts`
|
|
21
|
+
|
|
22
|
+
### `src/types/config.ts`
|
|
23
|
+
- Removed `merge?: boolean` from `DoCommandOptions` interface
|
|
24
|
+
|
|
25
|
+
### `tests/unit/post-execution-picker.test.ts` (new)
|
|
26
|
+
- 16 tests covering:
|
|
27
|
+
- Picker presents three choices with correct labels and values
|
|
28
|
+
- Returns correct action for each choice
|
|
29
|
+
- PR preflight runs only for PR choice
|
|
30
|
+
- Falls back to "leave" when PR preflight fails
|
|
31
|
+
- Branch name extracted from worktree path for picker message
|
|
32
|
+
- Action dispatch logic: merge cleans up, PR preserves worktree, leave cleans up
|
|
33
|
+
- Action skip logic on failure (skip for merge/PR, silent for leave)
|
|
34
|
+
|
|
35
|
+
### `tests/unit/worktree-integration.test.ts`
|
|
36
|
+
- Replaced `--merge requires --worktree` test section with `post-execution picker is worktree-only` tests
|
|
37
|
+
- Tests verify picker is shown only when worktreeMode && worktreeRoot are both set
|
|
38
|
+
|
|
39
|
+
### `tests/unit/do-worktree-cleanup.test.ts`
|
|
40
|
+
- Updated comment block to describe new cleanup flow (post-action based instead of `--merge` based)
|
|
41
|
+
|
|
42
|
+
### `CLAUDE.md`
|
|
43
|
+
- Updated Worktree Mode section: replaced `--merge` documentation with post-execution picker documentation
|
|
44
|
+
- Documented three picker options, preflight behavior, cleanup rules, and exported symbols
|
|
45
|
+
|
|
46
|
+
## Test Results
|
|
47
|
+
|
|
48
|
+
- All 912 tests pass (44 test suites)
|
|
49
|
+
- 896 existing tests: passing
|
|
50
|
+
- 16 new tests: passing
|
|
51
|
+
- Build succeeds with no type errors
|
|
52
|
+
|
|
53
|
+
<promise>COMPLETE</promise>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Task: Fix Amend Worktree Commit Bug
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Fix the bug where input.md and decisions.md changes are not committed when running `raf plan --amend --worktree`.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
When amending a project in worktree mode, the updated input.md and decisions.md files are not being committed. The previous fix attempt (commit c94558940d) added `additionalFiles` and `isAmend` support to `commitPlanningArtifacts()`, but the bug persists specifically in the worktree scenario. The non-worktree amend flow works correctly.
|
|
8
|
+
|
|
9
|
+
The root cause is unknown and requires investigation of the full amend+worktree flow — specifically how the worktree is recreated from an existing branch, how file paths are resolved, and how `cwd` is passed through to git commit operations.
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
- Investigate the amend+worktree flow end-to-end: worktree recreation, file writing, path resolution, and git commit
|
|
13
|
+
- Identify why input.md and decisions.md changes aren't staged/committed in worktree mode
|
|
14
|
+
- Fix the root cause (likely a path or cwd mismatch between where files are written and where git operates)
|
|
15
|
+
- Verify the fix works for both: fresh worktree creation and worktree recreation from existing branch
|
|
16
|
+
- Ensure the non-worktree amend flow remains unaffected
|
|
17
|
+
|
|
18
|
+
## Implementation Steps
|
|
19
|
+
1. Trace the amend+worktree flow in `src/commands/plan.ts` — follow the code path when both `--amend` and `--worktree` flags are set
|
|
20
|
+
2. Check how the worktree is recreated (from branch vs fresh) and where the project folder ends up
|
|
21
|
+
3. Examine how `commitPlanningArtifacts()` receives the `cwd` parameter in the amend+worktree case
|
|
22
|
+
4. Verify that the project path passed to `commitPlanningArtifacts()` matches the actual worktree location where files were written
|
|
23
|
+
5. Add or fix the `cwd` parameter passing so git operations run inside the worktree
|
|
24
|
+
6. Write tests covering the amend+worktree commit scenario
|
|
25
|
+
7. Manually verify with a real amend+worktree flow if possible
|
|
26
|
+
|
|
27
|
+
## Acceptance Criteria
|
|
28
|
+
- [ ] Root cause identified and documented in the outcome
|
|
29
|
+
- [ ] input.md and decisions.md changes are committed during amend+worktree operations
|
|
30
|
+
- [ ] New plan files are also committed correctly (regression check)
|
|
31
|
+
- [ ] Non-worktree amend flow still works
|
|
32
|
+
- [ ] Tests added covering the amend+worktree commit path
|
|
33
|
+
- [ ] All existing tests pass
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
- Previous fix attempt: commit c94558940d232fabcf8023c92867891de3a0dbcc
|
|
37
|
+
- Key files: `src/commands/plan.ts`, `src/core/git.ts` (commitPlanningArtifacts), `src/core/worktree.ts`
|
|
38
|
+
- The worktree root path is `~/.raf/worktrees/<repo-basename>/<project-folder>/`
|
|
39
|
+
- Pay attention to the difference between the project path inside the worktree vs the worktree root — git operations need the worktree root as cwd, while file paths are relative to the project folder inside it
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Task: Change Task IDs to 2-Character Base36 Format
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Replace the current 3-digit decimal task IDs (001, 002, ..., 999) with 2-character base36 IDs (01, 02, ..., 09, 0a, 0b, ..., 0z, 10, ..., zz) supporting up to 1296 tasks per project.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
The project already uses base36 encoding for project IDs (6-char epoch-based). This change extends the same encoding philosophy to task IDs, making them shorter and consistent. This is a breaking change — no backward compatibility with old 3-digit decimal IDs is needed.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Task IDs become 2-character base36, zero-padded (e.g., `01`, `0a`, `1z`, `zz`)
|
|
11
|
+
- All file naming uses this format: `01-task-name.md`, `0a-task-name.md`, etc.
|
|
12
|
+
- All regex patterns that match task IDs must be updated from `\d{2,3}` to a base36-aware pattern
|
|
13
|
+
- Git commit format updates: `RAF[NNN:01]` instead of `RAF[NNN:001]`
|
|
14
|
+
- Plan file dependencies section uses new format: `01, 02` instead of `001, 002`
|
|
15
|
+
- State derivation, task parsing, and all consumers of task IDs must be updated
|
|
16
|
+
- The encoding should reuse or mirror the existing base36 utilities in `src/utils/paths.ts`
|
|
17
|
+
|
|
18
|
+
## Implementation Steps
|
|
19
|
+
1. Add task ID encoding/decoding utilities — convert between numeric index and 2-char base36 string (reuse `encodeBase36`/`decodeBase36` pattern from paths.ts, but with width=2)
|
|
20
|
+
2. Update plan file naming: change all references from 3-digit to 2-char base36 format
|
|
21
|
+
3. Update task ID extraction regex throughout the codebase — search for patterns like `/^\d{2,3}-/`, `/^(\d{2,3})-/`, `\d{3}` and replace with base36-aware patterns
|
|
22
|
+
4. Update `state-derivation.ts` — task ID parsing, dependency parsing, sorting logic
|
|
23
|
+
5. Update `plan.ts` — next task number calculation, plan file creation, amend task numbering
|
|
24
|
+
6. Update `do.ts` — task ID display, commit message formatting
|
|
25
|
+
7. Update prompt templates — any system prompts that reference task ID format
|
|
26
|
+
8. Update all test fixtures and test expectations to use new format
|
|
27
|
+
9. Update CLAUDE.md documentation for the new task ID format
|
|
28
|
+
|
|
29
|
+
## Acceptance Criteria
|
|
30
|
+
- [ ] Task IDs use 2-character base36 format everywhere
|
|
31
|
+
- [ ] Plan files created as `01-task-name.md`, `02-task-name.md`, etc.
|
|
32
|
+
- [ ] State derivation correctly parses new task ID format
|
|
33
|
+
- [ ] Dependencies section uses new format
|
|
34
|
+
- [ ] Git commit messages use new format: `RAF[NNN:01]`
|
|
35
|
+
- [ ] All existing tests updated and passing
|
|
36
|
+
- [ ] CLAUDE.md updated with new task ID format documentation
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
- Base36 charset: 0-9, a-z (lowercase)
|
|
40
|
+
- 2-char base36 supports 00-zz = 1296 values (more than enough)
|
|
41
|
+
- Sort order: 00, 01, ..., 09, 0a, 0b, ..., 0z, 10, 11, ..., zz
|
|
42
|
+
- Task numbering still starts at 01 (not 00)
|
|
43
|
+
- Key files to modify: `src/utils/paths.ts`, `src/core/state-derivation.ts`, `src/commands/plan.ts`, `src/commands/do.ts`, `src/prompts/` (system prompts), test files
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Task: Add PR Creation from Worktree
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Add the ability to create a GitHub Pull Request from a worktree branch using the `gh` CLI tool.
|
|
5
|
+
|
|
6
|
+
## Dependencies
|
|
7
|
+
002
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
Currently, after completing tasks in a worktree, the only automated option is merging the branch back. This task adds PR creation as an alternative workflow. The PR body should be a Claude-generated summary combining the project's input.md, key decisions, and task outcomes.
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
- Use `gh pr create` CLI command to create PRs
|
|
14
|
+
- Auto-detect the base branch (the branch the worktree was forked from, typically main)
|
|
15
|
+
- PR title derived from the project name (human-readable, from the folder name)
|
|
16
|
+
- PR body generated by Claude (Haiku model) summarizing: input.md content, key decisions from decisions.md, and outcomes from completed tasks
|
|
17
|
+
- Handle errors gracefully: `gh` not installed, not authenticated, repo not on GitHub, etc.
|
|
18
|
+
- The PR creation function should be a reusable utility in `src/core/` that the `do` command can call
|
|
19
|
+
|
|
20
|
+
## Implementation Steps
|
|
21
|
+
1. Create a new module `src/core/pull-request.ts` with the PR creation logic
|
|
22
|
+
2. Implement base branch detection — determine which branch the worktree was forked from (likely stored or derivable from git)
|
|
23
|
+
3. Implement PR body generation — read input.md, decisions.md, and outcome files, then call Claude Haiku to generate a clean summary
|
|
24
|
+
4. Implement the `gh pr create` call — construct the command with title, body, base branch, and head branch
|
|
25
|
+
5. Add error handling for common failure modes (gh not installed, auth issues, non-GitHub remote)
|
|
26
|
+
6. Add prerequisite check: verify `gh` CLI is available and authenticated before attempting PR creation
|
|
27
|
+
7. Write tests for the PR creation module (mock `gh` CLI calls)
|
|
28
|
+
|
|
29
|
+
## Acceptance Criteria
|
|
30
|
+
- [ ] PR creation works from a worktree branch
|
|
31
|
+
- [ ] PR title is clean and derived from project name
|
|
32
|
+
- [ ] PR body is a Claude-generated summary of input + decisions + outcomes
|
|
33
|
+
- [ ] Base branch is auto-detected correctly
|
|
34
|
+
- [ ] Graceful error handling when gh is not available or not authenticated
|
|
35
|
+
- [ ] Tests cover the PR creation flow
|
|
36
|
+
- [ ] All existing tests pass
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
- The `gh` CLI must be installed and authenticated (`gh auth status`) for this to work
|
|
40
|
+
- PR body generation uses Claude Haiku for cost efficiency
|
|
41
|
+
- The head branch name is the project folder name (e.g., `021b5g-merge-guardian`)
|
|
42
|
+
- This module will be consumed by the post-execution picker (task 004)
|
|
43
|
+
- Consider adding a check that the branch has been pushed to the remote before creating the PR — `gh pr create` may handle this automatically
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Task: Add Post-Execution Picker for Worktree Mode
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Replace the `--merge` flag with an interactive picker shown before task execution that lets users choose what to do with the worktree branch after tasks complete: merge, create PR, or leave the branch.
|
|
5
|
+
|
|
6
|
+
## Dependencies
|
|
7
|
+
001, 003
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
Currently `raf do --worktree --merge` is the only way to handle the branch after execution. This task replaces that with a better UX: an interactive picker shown before execution starts, so the user declares intent upfront. After all tasks succeed, the chosen action is performed automatically. On failure, the action is skipped.
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
- Remove the `--merge` CLI flag from the `do` command
|
|
14
|
+
- When `--worktree` is used, show an interactive picker before task execution begins with three options:
|
|
15
|
+
1. **Merge** — merge the worktree branch into the original branch (existing behavior)
|
|
16
|
+
2. **Create PR** — push the branch and create a GitHub PR (uses task 003's PR creation module)
|
|
17
|
+
3. **Leave branch** — do nothing, keep the worktree branch as-is
|
|
18
|
+
- Store the user's choice and execute it automatically after all tasks complete successfully
|
|
19
|
+
- If any task fails, skip the post-execution action and inform the user
|
|
20
|
+
- The picker should use the existing interactive selection pattern used elsewhere in RAF (or a simple numbered prompt if no pattern exists)
|
|
21
|
+
|
|
22
|
+
## Implementation Steps
|
|
23
|
+
1. Remove the `--merge` flag from the `do` command's Commander.js option definition
|
|
24
|
+
2. Add the interactive picker UI — display the three options and capture user choice before task execution loop starts
|
|
25
|
+
3. Refactor the merge logic: extract the existing merge code into a callable function if not already
|
|
26
|
+
4. After the task execution loop completes, check if all tasks succeeded
|
|
27
|
+
5. If successful, execute the chosen action: call merge function, PR creation function, or do nothing
|
|
28
|
+
6. If failed, log that the post-execution action was skipped due to failures
|
|
29
|
+
7. Update any documentation or help text referencing `--merge`
|
|
30
|
+
8. Write tests for the picker flow and post-execution action dispatch
|
|
31
|
+
9. Update CLAUDE.md to document the new workflow
|
|
32
|
+
|
|
33
|
+
## Acceptance Criteria
|
|
34
|
+
- [ ] `--merge` flag is removed from `raf do`
|
|
35
|
+
- [ ] Interactive picker appears before task execution when `--worktree` is used
|
|
36
|
+
- [ ] Picker offers three options: merge, create PR, leave branch
|
|
37
|
+
- [ ] Chosen action executes automatically after all tasks succeed
|
|
38
|
+
- [ ] Action is skipped with a message when tasks fail
|
|
39
|
+
- [ ] PR creation option works end-to-end (push + create PR)
|
|
40
|
+
- [ ] Merge option works as before
|
|
41
|
+
- [ ] Leave branch option does nothing (clean exit)
|
|
42
|
+
- [ ] Tests cover picker logic and action dispatch
|
|
43
|
+
- [ ] All existing tests pass
|
|
44
|
+
- [ ] CLAUDE.md updated
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
- The picker must appear BEFORE execution starts (user's explicit requirement)
|
|
48
|
+
- For the PR option, the branch needs to be pushed to remote first — handle this as part of the PR creation flow
|
|
49
|
+
- Consider what happens if the user picks PR but `gh` is not installed — detect early and fall back or warn
|
|
50
|
+
- The existing merge logic in `do.ts` (lines ~356-377) should be preserved but made callable independently
|
|
51
|
+
- Worktree cleanup behavior should match the chosen action: cleanup after merge, preserve for PR and leave-branch
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Project Decisions
|
|
2
|
+
|
|
3
|
+
## Should task IDs also switch to pure letters (base26)?
|
|
4
|
+
Only project IDs. Task IDs stay base36 (0-9a-z, 2-char).
|
|
5
|
+
|
|
6
|
+
## What should the ID width be?
|
|
7
|
+
6 characters, padded with 'a' (the base26 zero-equivalent). So a=0, b=1, ..., z=25. Value 0 = "aaaaaa", value 1 = "aaaaab", value 26 = "aaaaba". This gives 26^6 = ~308M values (~9.8 years from epoch).
|
|
8
|
+
|
|
9
|
+
## How should existing projects with old ID formats be handled?
|
|
10
|
+
A `raf migrate` CLI command that renames old project folders to new base26 encoding. Should support both old sequential 3-char base36 IDs (e.g., "007-project") and current 6-char base36 IDs (e.g., "021h44-project").
|
|
11
|
+
|
|
12
|
+
## Should old IDs be auto-detected transparently in resolution?
|
|
13
|
+
No — the migrate command is the transition path. After migration, only base26 IDs are recognized.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Outcome: Base26 Encoding Migration
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Replaced base36 (0-9a-z) project ID encoding with base26 (a-z only) encoding across the entire codebase. Project IDs now contain only lowercase letters, making them visually distinct from task IDs (which remain base36) and sorting naturally as strings.
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### Source Files
|
|
10
|
+
- **`src/utils/paths.ts`** — Core implementation:
|
|
11
|
+
- Added `BASE26_ALPHABET` constant (`'abcdefghijklmnopqrstuvwxyz'`)
|
|
12
|
+
- Replaced `encodeBase36()` → `encodeBase26()` with custom a-z encoding (a=0, b=1, ..., z=25)
|
|
13
|
+
- Replaced `decodeBase36()` → `decodeBase26()` with matching decoder
|
|
14
|
+
- Replaced `isBase36Prefix()` → `isBase26Prefix()` using `/^[a-z]{6}$/`
|
|
15
|
+
- Updated `formatProjectNumber()` to call `encodeBase26()`
|
|
16
|
+
- Updated all regex patterns from `[0-9a-z]{6}` to `[a-z]{6}`
|
|
17
|
+
- **`src/core/state-derivation.ts`** — Updated import and regex for project discovery
|
|
18
|
+
- **`src/utils/validation.ts`** — Updated regex for project validation
|
|
19
|
+
|
|
20
|
+
### Test Files (12 files updated)
|
|
21
|
+
- `tests/unit/paths.test.ts` — Rewrote encode/decode/prefix tests with base26 values
|
|
22
|
+
- `tests/unit/project-manager.test.ts` — Updated regex and imports
|
|
23
|
+
- `tests/unit/status-command.test.ts` — Updated all hardcoded folder names
|
|
24
|
+
- `tests/unit/do-command.test.ts` — Updated folder name references
|
|
25
|
+
- `tests/unit/plan-command.test.ts` — Updated folder name references
|
|
26
|
+
- `tests/unit/state-derivation.test.ts` — Updated folder names
|
|
27
|
+
- `tests/unit/project-picker.test.ts` — Updated folder names and display strings
|
|
28
|
+
- `tests/unit/post-execution-picker.test.ts` — Updated folder names
|
|
29
|
+
- `tests/unit/commit-planning-artifacts.test.ts` — Updated expected commit messages
|
|
30
|
+
- `tests/unit/commit-planning-artifacts-worktree.test.ts` — Updated expected commit messages
|
|
31
|
+
- `tests/unit/pull-request.test.ts` — Updated folder names with digit-free prefixes
|
|
32
|
+
|
|
33
|
+
## Verification
|
|
34
|
+
- Build: `npm run build` passes cleanly
|
|
35
|
+
- Tests: All 913 tests pass across 44 test suites
|
|
36
|
+
|
|
37
|
+
## Notes
|
|
38
|
+
- Task IDs remain base36 (2-char, 0-9a-z) — unchanged
|
|
39
|
+
- RAF_EPOCH constant unchanged (1767225600)
|
|
40
|
+
- Encoding examples: 0→"aaaaaa", 1→"aaaaab", 25→"aaaaaz", 26→"aaaaba", 1000→"aaabmm"
|
|
41
|
+
|
|
42
|
+
<promise>COMPLETE</promise>
|