rafcode 1.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/settings.local.json +32 -0
- package/CLAUDE.md +187 -0
- package/LICENSE +21 -0
- package/RAF/001-raf-task-improvements/input.md +9 -0
- package/RAF/001-raf-task-improvements/outcomes/001-add-decisions-folder.md +21 -0
- package/RAF/001-raf-task-improvements/outcomes/002-fix-write-error-on-shutdown.md +22 -0
- package/RAF/001-raf-task-improvements/outcomes/003-stash-changes-on-failure.md +34 -0
- package/RAF/001-raf-task-improvements/outcomes/004-add-project-name-to-commits.md +28 -0
- package/RAF/001-raf-task-improvements/outcomes/005-add-running-time-display.md +36 -0
- package/RAF/001-raf-task-improvements/outcomes/006-add-task-name-to-logs.md +22 -0
- package/RAF/001-raf-task-improvements/outcomes/007-show-model-at-task-start.md +52 -0
- package/RAF/001-raf-task-improvements/outcomes/009-remove-editor-placeholder-text.md +20 -0
- package/RAF/001-raf-task-improvements/outcomes/SUMMARY.md +83 -0
- package/RAF/001-raf-task-improvements/plans/001-add-decisions-folder.md +38 -0
- package/RAF/001-raf-task-improvements/plans/002-fix-write-error-on-shutdown.md +33 -0
- package/RAF/001-raf-task-improvements/plans/003-stash-changes-on-failure.md +37 -0
- package/RAF/001-raf-task-improvements/plans/004-add-project-name-to-commits.md +34 -0
- package/RAF/001-raf-task-improvements/plans/005-add-running-time-display.md +39 -0
- package/RAF/001-raf-task-improvements/plans/006-add-task-name-to-logs.md +37 -0
- package/RAF/001-raf-task-improvements/plans/009-remove-editor-placeholder-text.md +34 -0
- package/RAF/002-raf-task-improvements-execution/decisions/DECISIONS.md +13 -0
- package/RAF/002-raf-task-improvements-execution/input.md +3 -0
- package/RAF/002-raf-task-improvements-execution/outcomes/001-commit-show-model-at-task-start.md +17 -0
- package/RAF/002-raf-task-improvements-execution/outcomes/002-delete-skipped-plan.md +23 -0
- package/RAF/002-raf-task-improvements-execution/outcomes/SUMMARY.md +32 -0
- package/RAF/002-raf-task-improvements-execution/plans/001-commit-show-model-at-task-start.md +37 -0
- package/RAF/002-raf-task-improvements-execution/plans/002-delete-skipped-plan.md +23 -0
- package/RAF/003-multi-project-execution/decisions/DECISIONS.md +68 -0
- package/RAF/003-multi-project-execution/input.md +6 -0
- package/RAF/003-multi-project-execution/outcomes/001-remove-state-json.md +52 -0
- package/RAF/003-multi-project-execution/outcomes/002-update-raf-status.md +50 -0
- package/RAF/003-multi-project-execution/outcomes/003-simplify-git-logic.md +35 -0
- package/RAF/003-multi-project-execution/outcomes/004-auto-commit-planning.md +43 -0
- package/RAF/003-multi-project-execution/outcomes/005-rerun-failed-tasks.md +43 -0
- package/RAF/003-multi-project-execution/outcomes/006-multi-project-execution.md +42 -0
- package/RAF/003-multi-project-execution/outcomes/007-verify-timeout.md +54 -0
- package/RAF/003-multi-project-execution/outcomes/008-move-decisions-file.md +38 -0
- package/RAF/003-multi-project-execution/outcomes/SUMMARY.md +79 -0
- package/RAF/003-multi-project-execution/plans/001-remove-state-json.md +71 -0
- package/RAF/003-multi-project-execution/plans/002-update-raf-status.md +65 -0
- package/RAF/003-multi-project-execution/plans/003-simplify-git-logic.md +74 -0
- package/RAF/003-multi-project-execution/plans/004-auto-commit-planning.md +57 -0
- package/RAF/003-multi-project-execution/plans/005-rerun-failed-tasks.md +69 -0
- package/RAF/003-multi-project-execution/plans/006-multi-project-execution.md +81 -0
- package/RAF/003-multi-project-execution/plans/007-verify-timeout.md +63 -0
- package/RAF/003-multi-project-execution/plans/008-move-decisions-file.md +78 -0
- package/RAF/004-task-naming-optimization/decisions.md +22 -0
- package/RAF/004-task-naming-optimization/input.md +6 -0
- package/RAF/004-task-naming-optimization/outcomes/001-remove-summary-file.md +17 -0
- package/RAF/004-task-naming-optimization/outcomes/002-base36-project-numbering.md +32 -0
- package/RAF/004-task-naming-optimization/outcomes/003-improve-haiku-prompt.md +20 -0
- package/RAF/004-task-naming-optimization/outcomes/SUMMARY.md +28 -0
- package/RAF/004-task-naming-optimization/plans/001-remove-summary-file.md +34 -0
- package/RAF/004-task-naming-optimization/plans/002-base36-project-numbering.md +56 -0
- package/RAF/004-task-naming-optimization/plans/003-improve-haiku-prompt.md +50 -0
- package/RAF/005-task-naming-improvements/decisions.md +60 -0
- package/RAF/005-task-naming-improvements/input.md +2 -0
- package/RAF/005-task-naming-improvements/outcomes/001-enhance-identifier-resolution.md +42 -0
- package/RAF/005-task-naming-improvements/outcomes/002-add-identifier-support-to-status.md +38 -0
- package/RAF/005-task-naming-improvements/outcomes/003-update-do-for-full-folder-names.md +44 -0
- package/RAF/005-task-naming-improvements/outcomes/004-implement-amend-flag-for-plan.md +55 -0
- package/RAF/005-task-naming-improvements/outcomes/005-commit-outcomes-on-complete.md +47 -0
- package/RAF/005-task-naming-improvements/outcomes/006-update-execution-prompt-commit-schema.md +40 -0
- package/RAF/005-task-naming-improvements/outcomes/007-allow-pending-task-amendments.md +38 -0
- package/RAF/005-task-naming-improvements/outcomes/008-fix-timeout-label.md +24 -0
- package/RAF/005-task-naming-improvements/plans/001-enhance-identifier-resolution.md +46 -0
- package/RAF/005-task-naming-improvements/plans/002-add-identifier-support-to-status.md +36 -0
- package/RAF/005-task-naming-improvements/plans/003-update-do-for-full-folder-names.md +38 -0
- package/RAF/005-task-naming-improvements/plans/004-implement-amend-flag-for-plan.md +67 -0
- package/RAF/005-task-naming-improvements/plans/005-commit-outcomes-on-complete.md +86 -0
- package/RAF/005-task-naming-improvements/plans/006-update-execution-prompt-commit-schema.md +60 -0
- package/RAF/005-task-naming-improvements/plans/007-allow-pending-task-amendments.md +60 -0
- package/RAF/005-task-naming-improvements/plans/008-fix-timeout-label.md +31 -0
- package/RAF/006-fix-double-summary-headers/decisions.md +28 -0
- package/RAF/006-fix-double-summary-headers/input.md +3 -0
- package/RAF/006-fix-double-summary-headers/outcomes/001-fix-double-summary-headers.md +29 -0
- package/RAF/006-fix-double-summary-headers/outcomes/002-update-readme-for-npm.md +31 -0
- package/RAF/006-fix-double-summary-headers/outcomes/003-npm-publish-instructions.md +30 -0
- package/RAF/006-fix-double-summary-headers/outcomes/004-flexible-project-lookup.md +47 -0
- package/RAF/006-fix-double-summary-headers/plans/001-fix-double-summary-headers.md +42 -0
- package/RAF/006-fix-double-summary-headers/plans/002-update-readme-for-npm.md +44 -0
- package/RAF/006-fix-double-summary-headers/plans/003-npm-publish-instructions.md +45 -0
- package/RAF/006-fix-double-summary-headers/plans/004-flexible-project-lookup.md +40 -0
- package/RAF/007-improve-outcome-format/decisions.md +28 -0
- package/RAF/007-improve-outcome-format/input.md +2 -0
- package/RAF/007-improve-outcome-format/outcomes/001-update-execution-prompt.md +10 -0
- package/RAF/007-improve-outcome-format/outcomes/002-update-state-derivation.md +17 -0
- package/RAF/007-improve-outcome-format/outcomes/003-update-do-command-outcome-handling.md +16 -0
- package/RAF/007-improve-outcome-format/outcomes/004-implement-failure-analysis.md +16 -0
- package/RAF/007-improve-outcome-format/outcomes/005-update-documentation.md +15 -0
- package/RAF/007-improve-outcome-format/plans/001-update-execution-prompt.md +36 -0
- package/RAF/007-improve-outcome-format/plans/002-update-state-derivation.md +35 -0
- package/RAF/007-improve-outcome-format/plans/003-update-do-command-outcome-handling.md +37 -0
- package/RAF/007-improve-outcome-format/plans/004-implement-failure-analysis.md +44 -0
- package/RAF/007-improve-outcome-format/plans/005-update-documentation.md +33 -0
- package/RAF/008-beautiful-do/decisions.md +31 -0
- package/RAF/008-beautiful-do/input.md +1 -0
- package/RAF/008-beautiful-do/outcomes/001-terminal-symbols.md +55 -0
- package/RAF/008-beautiful-do/outcomes/002-refactor-do-output.md +95 -0
- package/RAF/008-beautiful-do/outcomes/003-refactor-status-output.md +71 -0
- package/RAF/008-beautiful-do/outcomes/004-simplify-logger.md +53 -0
- package/RAF/008-beautiful-do/outcomes/005-add-tests.md +41 -0
- package/RAF/008-beautiful-do/plans/001-terminal-symbols.md +41 -0
- package/RAF/008-beautiful-do/plans/002-refactor-do-output.md +44 -0
- package/RAF/008-beautiful-do/plans/003-refactor-status-output.md +37 -0
- package/RAF/008-beautiful-do/plans/004-simplify-logger.md +32 -0
- package/RAF/008-beautiful-do/plans/005-add-tests.md +40 -0
- package/RAF/009-system-promt-ammend/decisions.md +13 -0
- package/RAF/009-system-promt-ammend/input.md +9 -0
- package/RAF/009-system-promt-ammend/outcomes/001-model-override.md +79 -0
- package/RAF/009-system-promt-ammend/outcomes/002-system-prompt-append.md +51 -0
- package/RAF/009-system-promt-ammend/outcomes/003-retry-context.md +60 -0
- package/RAF/009-system-promt-ammend/plans/001-model-override.md +61 -0
- package/RAF/009-system-promt-ammend/plans/002-system-prompt-append.md +56 -0
- package/RAF/009-system-promt-ammend/plans/003-retry-context.md +76 -0
- package/RAF/010-outcome-marker-fallback/decisions.md +19 -0
- package/RAF/010-outcome-marker-fallback/input.md +1 -0
- package/RAF/010-outcome-marker-fallback/outcomes/001-outcome-file-marker-fallback.md +35 -0
- package/RAF/010-outcome-marker-fallback/outcomes/002-creative-project-naming.md +47 -0
- package/RAF/010-outcome-marker-fallback/plans/001-outcome-file-marker-fallback.md +58 -0
- package/RAF/010-outcome-marker-fallback/plans/002-creative-project-naming.md +68 -0
- package/RAF/011-do-task-in-commit/decisions.md +22 -0
- package/RAF/011-do-task-in-commit/input.md +1 -0
- package/RAF/011-do-task-in-commit/outcomes/001-update-execution-prompt.md +54 -0
- package/RAF/011-do-task-in-commit/outcomes/002-update-tests.md +61 -0
- package/RAF/011-do-task-in-commit/outcomes/003-update-documentation.md +51 -0
- package/RAF/011-do-task-in-commit/plans/001-update-execution-prompt.md +46 -0
- package/RAF/011-do-task-in-commit/plans/002-update-tests.md +51 -0
- package/RAF/011-do-task-in-commit/plans/003-update-documentation.md +45 -0
- package/RAF/012-name-picker-buffet/decisions.md +40 -0
- package/RAF/012-name-picker-buffet/input.md +6 -0
- package/RAF/012-name-picker-buffet/outcomes/001-name-picker-for-raf-plan.md +49 -0
- package/RAF/012-name-picker-buffet/outcomes/002-interactive-project-picker-for-raf-do.md +49 -0
- package/RAF/012-name-picker-buffet/outcomes/003-raf-status-truncation.md +55 -0
- package/RAF/012-name-picker-buffet/outcomes/004-failure-reason-details.md +65 -0
- package/RAF/012-name-picker-buffet/outcomes/005-remove-raf-commits.md +57 -0
- package/RAF/012-name-picker-buffet/outcomes/006-update-execution-prompt-for-commits.md +47 -0
- package/RAF/012-name-picker-buffet/outcomes/007-fix-plan-mode-user-prompt.md +83 -0
- package/RAF/012-name-picker-buffet/outcomes/008-add-auto-flag-for-plan-mode.md +77 -0
- package/RAF/012-name-picker-buffet/plans/001-name-picker-for-raf-plan.md +47 -0
- package/RAF/012-name-picker-buffet/plans/002-interactive-project-picker-for-raf-do.md +43 -0
- package/RAF/012-name-picker-buffet/plans/003-raf-status-truncation.md +36 -0
- package/RAF/012-name-picker-buffet/plans/004-failure-reason-details.md +46 -0
- package/RAF/012-name-picker-buffet/plans/005-remove-raf-commits.md +42 -0
- package/RAF/012-name-picker-buffet/plans/006-update-execution-prompt-for-commits.md +47 -0
- package/RAF/012-name-picker-buffet/plans/007-fix-plan-mode-user-prompt.md +55 -0
- package/RAF/012-name-picker-buffet/plans/008-add-auto-flag-for-plan-mode.md +49 -0
- package/RAF/013-dependencies-watchdog/decisions.md +37 -0
- package/RAF/013-dependencies-watchdog/input.md +1 -0
- package/RAF/013-dependencies-watchdog/outcomes/001-define-dependency-syntax.md +56 -0
- package/RAF/013-dependencies-watchdog/outcomes/002-update-planning-prompts.md +60 -0
- package/RAF/013-dependencies-watchdog/outcomes/003-parse-dependencies-update-state.md +81 -0
- package/RAF/013-dependencies-watchdog/outcomes/004-implement-dependency-checking-in-do.md +116 -0
- package/RAF/013-dependencies-watchdog/outcomes/005-update-execution-prompts.md +75 -0
- package/RAF/013-dependencies-watchdog/outcomes/006-add-tests.md +100 -0
- package/RAF/013-dependencies-watchdog/outcomes/007-add-act-alias.md +46 -0
- package/RAF/013-dependencies-watchdog/outcomes/008-add-exit-message.md +52 -0
- package/RAF/013-dependencies-watchdog/plans/001-define-dependency-syntax.md +32 -0
- package/RAF/013-dependencies-watchdog/plans/002-update-planning-prompts.md +38 -0
- package/RAF/013-dependencies-watchdog/plans/003-parse-dependencies-update-state.md +46 -0
- package/RAF/013-dependencies-watchdog/plans/004-implement-dependency-checking-in-do.md +48 -0
- package/RAF/013-dependencies-watchdog/plans/005-update-execution-prompts.md +44 -0
- package/RAF/013-dependencies-watchdog/plans/006-add-tests.md +54 -0
- package/RAF/013-dependencies-watchdog/plans/007-add-act-alias.md +26 -0
- package/RAF/013-dependencies-watchdog/plans/008-add-exit-message.md +31 -0
- package/RAF/014-watchdog/decisions.md +16 -0
- package/RAF/014-watchdog/input.md +2 -0
- package/RAF/014-watchdog/outcomes/001-amend-flag-position.md +50 -0
- package/RAF/014-watchdog/outcomes/002-details-only-on-failure.md +58 -0
- package/RAF/014-watchdog/plans/001-amend-flag-position.md +34 -0
- package/RAF/014-watchdog/plans/002-details-only-on-failure.md +46 -0
- package/RAF/015-name-lottery/decisions.md +14 -0
- package/RAF/015-name-lottery/input.md +3 -0
- package/RAF/015-name-lottery/outcomes/001-auto-pick-project-name.md +31 -0
- package/RAF/015-name-lottery/outcomes/002-mention-plan-files-in-commit.md +23 -0
- package/RAF/015-name-lottery/outcomes/003-fix-input-md-in-amend-flow.md +44 -0
- package/RAF/015-name-lottery/plans/001-auto-pick-project-name.md +38 -0
- package/RAF/015-name-lottery/plans/002-mention-plan-files-in-commit.md +32 -0
- package/RAF/015-name-lottery/plans/003-fix-input-md-in-amend-flow.md +44 -0
- package/README.md +116 -0
- package/dist/commands/do.d.ts +12 -0
- package/dist/commands/do.d.ts.map +1 -0
- package/dist/commands/do.js +684 -0
- package/dist/commands/do.js.map +1 -0
- package/dist/commands/plan.d.ts +3 -0
- package/dist/commands/plan.d.ts.map +1 -0
- package/dist/commands/plan.js +345 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +117 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/core/claude-runner.d.ts +78 -0
- package/dist/core/claude-runner.d.ts.map +1 -0
- package/dist/core/claude-runner.js +297 -0
- package/dist/core/claude-runner.js.map +1 -0
- package/dist/core/editor.d.ts +10 -0
- package/dist/core/editor.d.ts.map +1 -0
- package/dist/core/editor.js +77 -0
- package/dist/core/editor.js.map +1 -0
- package/dist/core/failure-analyzer.d.ts +28 -0
- package/dist/core/failure-analyzer.d.ts.map +1 -0
- package/dist/core/failure-analyzer.js +305 -0
- package/dist/core/failure-analyzer.js.map +1 -0
- package/dist/core/git.d.ts +42 -0
- package/dist/core/git.d.ts.map +1 -0
- package/dist/core/git.js +148 -0
- package/dist/core/git.js.map +1 -0
- package/dist/core/project-manager.d.ts +72 -0
- package/dist/core/project-manager.d.ts.map +1 -0
- package/dist/core/project-manager.js +193 -0
- package/dist/core/project-manager.js.map +1 -0
- package/dist/core/retry-handler.d.ts +19 -0
- package/dist/core/retry-handler.d.ts.map +1 -0
- package/dist/core/retry-handler.js +51 -0
- package/dist/core/retry-handler.js.map +1 -0
- package/dist/core/shutdown-handler.d.ts +30 -0
- package/dist/core/shutdown-handler.d.ts.map +1 -0
- package/dist/core/shutdown-handler.js +79 -0
- package/dist/core/shutdown-handler.js.map +1 -0
- package/dist/core/state-derivation.d.ts +82 -0
- package/dist/core/state-derivation.d.ts.map +1 -0
- package/dist/core/state-derivation.js +271 -0
- package/dist/core/state-derivation.js.map +1 -0
- package/dist/core/state-manager.d.ts +54 -0
- package/dist/core/state-manager.d.ts.map +1 -0
- package/dist/core/state-manager.js +198 -0
- package/dist/core/state-manager.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/output-parser.d.ts +19 -0
- package/dist/parsers/output-parser.d.ts.map +1 -0
- package/dist/parsers/output-parser.js +137 -0
- package/dist/parsers/output-parser.js.map +1 -0
- package/dist/prompts/amend.d.ts +20 -0
- package/dist/prompts/amend.d.ts.map +1 -0
- package/dist/prompts/amend.js +166 -0
- package/dist/prompts/amend.js.map +1 -0
- package/dist/prompts/execution.d.ts +30 -0
- package/dist/prompts/execution.d.ts.map +1 -0
- package/dist/prompts/execution.js +179 -0
- package/dist/prompts/execution.js.map +1 -0
- package/dist/prompts/planning.d.ts +15 -0
- package/dist/prompts/planning.d.ts.map +1 -0
- package/dist/prompts/planning.js +163 -0
- package/dist/prompts/planning.js.map +1 -0
- package/dist/types/config.d.ts +26 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +7 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/state.d.ts +33 -0
- package/dist/types/state.d.ts.map +1 -0
- package/dist/types/state.js +28 -0
- package/dist/types/state.js.map +1 -0
- package/dist/ui/name-picker-subprocess.d.ts +11 -0
- package/dist/ui/name-picker-subprocess.d.ts.map +1 -0
- package/dist/ui/name-picker-subprocess.js +83 -0
- package/dist/ui/name-picker-subprocess.js.map +1 -0
- package/dist/ui/name-picker.d.ts +19 -0
- package/dist/ui/name-picker.d.ts.map +1 -0
- package/dist/ui/name-picker.js +173 -0
- package/dist/ui/name-picker.js.map +1 -0
- package/dist/ui/project-picker.d.ts +27 -0
- package/dist/ui/project-picker.d.ts.map +1 -0
- package/dist/ui/project-picker.js +58 -0
- package/dist/ui/project-picker.js.map +1 -0
- package/dist/utils/config.d.ts +24 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +63 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/logger.d.ts +32 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +60 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/name-generator.d.ts +20 -0
- package/dist/utils/name-generator.d.ts.map +1 -0
- package/dist/utils/name-generator.js +183 -0
- package/dist/utils/name-generator.js.map +1 -0
- package/dist/utils/paths.d.ts +132 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +412 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/status-line.d.ts +14 -0
- package/dist/utils/status-line.d.ts.map +1 -0
- package/dist/utils/status-line.js +36 -0
- package/dist/utils/status-line.js.map +1 -0
- package/dist/utils/terminal-symbols.d.ts +50 -0
- package/dist/utils/terminal-symbols.d.ts.map +1 -0
- package/dist/utils/terminal-symbols.js +97 -0
- package/dist/utils/terminal-symbols.js.map +1 -0
- package/dist/utils/timer.d.ts +17 -0
- package/dist/utils/timer.d.ts.map +1 -0
- package/dist/utils/timer.js +56 -0
- package/dist/utils/timer.js.map +1 -0
- package/dist/utils/validation.d.ts +17 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +106 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/utils/version.d.ts +2 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +12 -0
- package/dist/utils/version.js.map +1 -0
- package/jest.config.ts +30 -0
- package/package.json +55 -0
- package/src/commands/do.ts +829 -0
- package/src/commands/plan.ts +422 -0
- package/src/commands/status.ts +146 -0
- package/src/core/claude-runner.ts +374 -0
- package/src/core/editor.ts +85 -0
- package/src/core/failure-analyzer.ts +372 -0
- package/src/core/git.ts +166 -0
- package/src/core/project-manager.ts +243 -0
- package/src/core/retry-handler.ts +72 -0
- package/src/core/shutdown-handler.ts +93 -0
- package/src/core/state-derivation.ts +343 -0
- package/src/index.ts +20 -0
- package/src/parsers/output-parser.ts +164 -0
- package/src/prompts/amend.ts +194 -0
- package/src/prompts/execution.ts +223 -0
- package/src/prompts/planning.ts +175 -0
- package/src/types/config.ts +35 -0
- package/src/ui/name-picker-subprocess.ts +96 -0
- package/src/ui/name-picker.ts +198 -0
- package/src/ui/project-picker.ts +80 -0
- package/src/utils/config.ts +69 -0
- package/src/utils/logger.ts +81 -0
- package/src/utils/name-generator.ts +211 -0
- package/src/utils/paths.ts +497 -0
- package/src/utils/status-line.ts +45 -0
- package/src/utils/terminal-symbols.ts +124 -0
- package/src/utils/timer.ts +64 -0
- package/src/utils/validation.ts +132 -0
- package/src/utils/version.ts +12 -0
- package/tests/unit/claude-runner-interactive.test.ts +343 -0
- package/tests/unit/claude-runner.test.ts +629 -0
- package/tests/unit/command-output.test.ts +295 -0
- package/tests/unit/config.test.ts +72 -0
- package/tests/unit/dependency-integration.test.ts +559 -0
- package/tests/unit/do-blocked-tasks.test.ts +323 -0
- package/tests/unit/do-command.test.ts +198 -0
- package/tests/unit/do-multiproject.test.ts +270 -0
- package/tests/unit/do-rerun.test.ts +270 -0
- package/tests/unit/execution-prompt.test.ts +406 -0
- package/tests/unit/failure-analyzer.test.ts +276 -0
- package/tests/unit/failure-history.test.ts +143 -0
- package/tests/unit/git-stash.test.ts +138 -0
- package/tests/unit/git.test.ts +80 -0
- package/tests/unit/logger.test.ts +132 -0
- package/tests/unit/name-generator.test.ts +283 -0
- package/tests/unit/name-picker.test.ts +179 -0
- package/tests/unit/outcome-content.test.ts +166 -0
- package/tests/unit/output-parser.test.ts +178 -0
- package/tests/unit/paths.test.ts +741 -0
- package/tests/unit/plan-command-amend-flag.test.ts +115 -0
- package/tests/unit/plan-command-amend-input.test.ts +156 -0
- package/tests/unit/plan-command-auto-flag.test.ts +112 -0
- package/tests/unit/plan-command.test.ts +580 -0
- package/tests/unit/planning-prompt.test.ts +137 -0
- package/tests/unit/project-manager.test.ts +265 -0
- package/tests/unit/project-picker.test.ts +338 -0
- package/tests/unit/retry-handler.test.ts +89 -0
- package/tests/unit/state-derivation.test.ts +714 -0
- package/tests/unit/status-command.test.ts +271 -0
- package/tests/unit/status-line.test.ts +92 -0
- package/tests/unit/terminal-symbols.test.ts +214 -0
- package/tests/unit/timer.test.ts +102 -0
- package/tests/unit/validation.test.ts +118 -0
- package/tsconfig.json +26 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 004 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
The task has been completed successfully. Let me summarize the implementation:
|
|
7
|
+
## Summary
|
|
8
|
+
I have successfully completed Task 004: Implement `--amend` Flag for `raf plan`.
|
|
9
|
+
### Changes Made
|
|
10
|
+
**1. `src/commands/plan.ts`** - Updated plan command:
|
|
11
|
+
- Added `-a, --amend <identifier>` option to Commander.js definition
|
|
12
|
+
- Added check when creating new project: if project name matches existing project, show error with suggestion to use `--amend`
|
|
13
|
+
- Implemented `runAmendCommand()` function that:
|
|
14
|
+
- Resolves project using all identifier formats (number, name, full folder name)
|
|
15
|
+
- Loads existing project state (tasks with completed/pending/failed status)
|
|
16
|
+
- Shows warning for fully completed projects
|
|
17
|
+
- Opens editor with template showing existing tasks as read-only context
|
|
18
|
+
- Launches Claude with amend-specific prompt
|
|
19
|
+
- Detects and reports only newly created plan files
|
|
20
|
+
- Commits the changes
|
|
21
|
+
- Added `getAmendTemplate()` function for editor content
|
|
22
|
+
**2. `src/prompts/amend.ts`** - New file with amend-specific prompt:
|
|
23
|
+
- Includes AMENDMENT MODE instructions
|
|
24
|
+
- Lists existing tasks with their status ([COMPLETED], [PENDING], [FAILED])
|
|
25
|
+
- Instructs Claude to start numbering from next available task number
|
|
26
|
+
- Explicitly forbids modification of existing plan files
|
|
27
|
+
- Includes original input and new task description
|
|
28
|
+
**3. `tests/unit/plan-command.test.ts`** - New test file with 27 tests:
|
|
29
|
+
- Project resolution for amend (numeric ID, name, full folder name)
|
|
30
|
+
- Base36 project resolution for amend
|
|
31
|
+
- Existing project state loading (pending, completed, failed, mixed)
|
|
32
|
+
- Fully completed project detection
|
|
33
|
+
- Task name extraction
|
|
34
|
+
- Next task number calculation
|
|
35
|
+
- Amend prompt generation
|
|
36
|
+
- Existing project detection without amend flag
|
|
37
|
+
### Acceptance Criteria Verification
|
|
38
|
+
- ✅ `raf plan --amend 003` opens editor then launches Claude with existing task context
|
|
39
|
+
- ✅ `raf plan --amend 001-my-project` works with full folder name identifier
|
|
40
|
+
- ✅ `raf plan existing-project` (without `--amend`) shows clear error message
|
|
41
|
+
- ✅ Claude receives context about existing tasks and their status
|
|
42
|
+
- ✅ New tasks are numbered correctly (continuing from last task number)
|
|
43
|
+
- ✅ Warning is displayed when amending a fully completed project
|
|
44
|
+
- ✅ Amending creates new plan files without touching existing ones
|
|
45
|
+
- ✅ Tests cover the amend workflow (27 new tests)
|
|
46
|
+
- ✅ Help text documents the `--amend` option
|
|
47
|
+
### Test Results
|
|
48
|
+
- All 368 tests pass
|
|
49
|
+
- TypeScript build succeeds with no errors
|
|
50
|
+
<promise>COMPLETE</promise>
|
|
51
|
+
|
|
52
|
+
## Details
|
|
53
|
+
- Attempts: 1
|
|
54
|
+
- Elapsed time: 4m 2s
|
|
55
|
+
- Completed at: 2026-01-30T21:32:58.833Z
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 005 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
## Summary
|
|
7
|
+
I have successfully completed Task 005: Universal Commit Schema for RAF.
|
|
8
|
+
### Changes Made
|
|
9
|
+
**1. `src/core/git.ts`** - Updated `commitProjectFolder` function:
|
|
10
|
+
- Added new `CommitType` type (`'plan' | 'outcome'`)
|
|
11
|
+
- Changed function signature from `(projectPath, projectName)` to `(projectPath, projectNumber, commitType)`
|
|
12
|
+
- Updated commit message format from `RAF(${projectName}): Plan complete` to `RAF[${projectNumber}:${commitType}]`
|
|
13
|
+
- Added default value for `commitType` parameter (`'plan'`)
|
|
14
|
+
**2. `src/commands/plan.ts`** - Updated plan and amend commands:
|
|
15
|
+
- Added import for `extractProjectNumber`
|
|
16
|
+
- Updated `runPlanCommand()` to use new signature: `commitProjectFolder(projectPath, projectNum, 'plan')`
|
|
17
|
+
- Updated `runAmendCommand()` to use new signature: `commitProjectFolder(projectPath, projectNum, 'plan')`
|
|
18
|
+
**3. `src/commands/do.ts`** - Added outcome commit on project completion:
|
|
19
|
+
- Added import for `commitProjectFolder`
|
|
20
|
+
- Added outcome commit logic in `if (isProjectComplete(state))` block
|
|
21
|
+
- Commits with format `RAF[<project-number>:outcome]` when all tasks complete successfully
|
|
22
|
+
**4. `tests/unit/git-commit-project.test.ts`** - Updated and expanded tests:
|
|
23
|
+
- Updated existing tests for new function signature
|
|
24
|
+
- Added dedicated `describe('plan commits')` block with 3 tests
|
|
25
|
+
- Added dedicated `describe('outcome commits')` block with 2 tests
|
|
26
|
+
- Tests cover: plan format, outcome format, default type, base36 project numbers
|
|
27
|
+
### Acceptance Criteria Verification
|
|
28
|
+
- ✅ Git utility function supports both plan and outcome commit types
|
|
29
|
+
- ✅ Plan commits use format `RAF[<project-number>:plan]`
|
|
30
|
+
- ✅ Outcome commits use format `RAF[<project-number>:outcome]`
|
|
31
|
+
- ✅ `raf plan` auto-commits project folder after successful planning
|
|
32
|
+
- ✅ `raf do` auto-commits project folder when final task completes successfully
|
|
33
|
+
- ✅ Only project folder is staged/committed, other repo changes are untouched
|
|
34
|
+
- ✅ No commit is made if planning or final task fails
|
|
35
|
+
- ✅ Graceful handling when not in a git repo (warning, no crash)
|
|
36
|
+
- ✅ Graceful handling when there are no changes to commit
|
|
37
|
+
- ✅ Tests cover both plan and outcome commit workflows
|
|
38
|
+
- ✅ Success messages are logged after commits
|
|
39
|
+
### Test Results
|
|
40
|
+
- All 372 tests pass
|
|
41
|
+
- TypeScript build succeeds with no errors
|
|
42
|
+
<promise>COMPLETE</promise>
|
|
43
|
+
|
|
44
|
+
## Details
|
|
45
|
+
- Attempts: 1
|
|
46
|
+
- Elapsed time: 3m 10s
|
|
47
|
+
- Completed at: 2026-01-30T22:26:38.415Z
|
package/RAF/005-task-naming-improvements/outcomes/006-update-execution-prompt-commit-schema.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 006 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
## Summary
|
|
7
|
+
I have successfully completed Task 006: Update Execution Prompt for Universal Task Commit Schema.
|
|
8
|
+
### Changes Made
|
|
9
|
+
**1. `src/prompts/execution.ts`** - Updated execution prompt:
|
|
10
|
+
- Added `projectNumber: string` field to `ExecutionPromptParams` interface (required)
|
|
11
|
+
- Added `taskName: string` field to `ExecutionPromptParams` interface (required)
|
|
12
|
+
- Made `projectName` required (removed optional `?`)
|
|
13
|
+
- Added zero-padding for task number (3 digits)
|
|
14
|
+
- Updated commit message format to: `RAF[${projectNumber}:${paddedTaskNumber}] ${projectName} ${taskName}`
|
|
15
|
+
**2. `src/commands/do.ts`** - Updated do command:
|
|
16
|
+
- Added extraction of `projectNumber` using `extractProjectNumber(projectPath)`
|
|
17
|
+
- Updated `getExecutionPrompt()` call to pass `projectNumber` and `taskName`
|
|
18
|
+
- Task name is extracted from plan file using `extractTaskNameFromPlanFile(task.planFile)`
|
|
19
|
+
**3. `tests/unit/execution-prompt.test.ts`** - New test file with 19 tests:
|
|
20
|
+
- Tests for RAF commit schema format in prompt
|
|
21
|
+
- Tests for zero-padding of single, double, and triple digit task numbers
|
|
22
|
+
- Tests for base36 project numbers
|
|
23
|
+
- Tests for task name and project name in commit message
|
|
24
|
+
- Tests for autoCommit=false case
|
|
25
|
+
- Tests for various commit message combinations
|
|
26
|
+
- Tests for task information, outcome file notes, and previous outcomes
|
|
27
|
+
### Acceptance Criteria Verification
|
|
28
|
+
- ✅ `ExecutionPromptParams` includes `projectNumber` and `taskName` fields
|
|
29
|
+
- ✅ Execution prompt instructs Claude to use format `RAF[005:001] project-name task-name`
|
|
30
|
+
- ✅ `do.ts` extracts and passes project number from folder name
|
|
31
|
+
- ✅ `do.ts` extracts and passes task name from plan file name
|
|
32
|
+
- ✅ Task number is zero-padded in commit message (001, 002, etc.)
|
|
33
|
+
- ✅ Tests verify correct commit message format in prompt
|
|
34
|
+
- ✅ All existing tests pass (391 tests total)
|
|
35
|
+
<promise>COMPLETE</promise>
|
|
36
|
+
|
|
37
|
+
## Details
|
|
38
|
+
- Attempts: 1
|
|
39
|
+
- Elapsed time: 2m 55s
|
|
40
|
+
- Completed at: 2026-01-30T22:29:34.246Z
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 007 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
## Summary
|
|
7
|
+
I have successfully completed Task 007: Allow Pending Task Amendments in Amend Mode.
|
|
8
|
+
### Changes Made
|
|
9
|
+
**1. `src/prompts/amend.ts`** - Updated amend prompt:
|
|
10
|
+
- Modified task summary to include `[PROTECTED]` for completed tasks and `[MODIFIABLE]` for pending/failed tasks
|
|
11
|
+
- Added separate lists for protected tasks and modifiable tasks with clear headers
|
|
12
|
+
- Updated "IMPORTANT: Amendment Mode" section to allow modification of [MODIFIABLE] tasks
|
|
13
|
+
- Updated "Important Rules" section to distinguish between protected and modifiable tasks
|
|
14
|
+
- Shows `(none)` when either category has no tasks
|
|
15
|
+
**2. `tests/unit/plan-command.test.ts`** - Added and updated tests:
|
|
16
|
+
- Updated existing tests for new prompt format
|
|
17
|
+
- Added 7 new tests covering:
|
|
18
|
+
- Protected task listing
|
|
19
|
+
- Modifiable task listing
|
|
20
|
+
- Mixed task status handling
|
|
21
|
+
- `(none)` display when no tasks in a category
|
|
22
|
+
- Task status indicator verification
|
|
23
|
+
### Acceptance Criteria Verification
|
|
24
|
+
- ✅ Amend prompt allows modification of non-completed tasks (pending/failed)
|
|
25
|
+
- ✅ Amend prompt prohibits modification of COMPLETED tasks
|
|
26
|
+
- ✅ Prompt clearly lists which tasks are modifiable vs protected
|
|
27
|
+
- ✅ Status indicators are clear: [PROTECTED], [MODIFIABLE]
|
|
28
|
+
- ✅ Tests cover different task status combinations (7 new tests)
|
|
29
|
+
- ✅ All existing tests pass (396 tests total)
|
|
30
|
+
### Test Results
|
|
31
|
+
- All 396 tests pass
|
|
32
|
+
- TypeScript build succeeds with no errors
|
|
33
|
+
<promise>COMPLETE</promise>
|
|
34
|
+
|
|
35
|
+
## Details
|
|
36
|
+
- Attempts: 1
|
|
37
|
+
- Elapsed time: 2m 15s
|
|
38
|
+
- Completed at: 2026-01-30T22:31:49.414Z
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 008 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
## Summary
|
|
7
|
+
I have successfully completed Task 008: Fix Timeout Label.
|
|
8
|
+
### Change Made
|
|
9
|
+
**`src/commands/do.ts:227`** - Changed startup message label:
|
|
10
|
+
- Before: `Tasks: ${state.tasks.length}, Timeout: ${timeout} minutes`
|
|
11
|
+
- After: `Tasks: ${state.tasks.length}, Task timeout: ${timeout} minutes`
|
|
12
|
+
### Acceptance Criteria Verification
|
|
13
|
+
- ✅ The message displays "Task timeout:" instead of "Timeout:"
|
|
14
|
+
- ✅ The rest of the message format remains unchanged
|
|
15
|
+
- ✅ All existing tests pass (396 tests total)
|
|
16
|
+
### Test Results
|
|
17
|
+
- All 396 tests pass
|
|
18
|
+
- TypeScript build succeeds with no errors
|
|
19
|
+
<promise>COMPLETE</promise>
|
|
20
|
+
|
|
21
|
+
## Details
|
|
22
|
+
- Attempts: 1
|
|
23
|
+
- Elapsed time: 36s
|
|
24
|
+
- Completed at: 2026-01-30T22:35:52.807Z
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Task: Enhance Identifier Resolution for Full Folder Names
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Extend the `resolveProjectIdentifier` function to support full folder names like `001-fix-stuff` or `a01-important-project` in addition to the existing number, base36, and name formats.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Currently `resolveProjectIdentifier()` in `src/utils/paths.ts` supports:
|
|
8
|
+
- Numeric IDs: `3`, `003`
|
|
9
|
+
- Base36 IDs: `a00`, `a01`
|
|
10
|
+
- Project names: `fix-stuff`
|
|
11
|
+
|
|
12
|
+
Users want to copy-paste full folder names directly from file explorers or terminal output. This enhancement is the foundation for consistent identifier support across all RAF commands.
|
|
13
|
+
|
|
14
|
+
## Requirements
|
|
15
|
+
- Support full folder name format: `NNN-project-name` or `XXX-project-name` (base36)
|
|
16
|
+
- Extract the prefix and use existing resolution logic
|
|
17
|
+
- Design the function to be extensible for future task-level references like `001-project/002-task`
|
|
18
|
+
- Maintain backward compatibility with all existing identifier formats
|
|
19
|
+
- All commands (`raf do`, `raf status`, `raf plan`) will share this enhanced resolution
|
|
20
|
+
|
|
21
|
+
## Implementation Steps
|
|
22
|
+
1. Read and understand the current `resolveProjectIdentifier()` function in `src/utils/paths.ts`
|
|
23
|
+
2. Add a new identifier type detection for full folder names:
|
|
24
|
+
- Pattern: `^(\d{2,3}|[a-z][0-9a-z]{2})-(.+)$` to match `NNN-name` or `XXX-name`
|
|
25
|
+
- Extract prefix and validate it matches existing project
|
|
26
|
+
3. Update the resolution logic order:
|
|
27
|
+
- Check if identifier is a full folder name first
|
|
28
|
+
- Then fall through to existing checks (numeric, base36, name)
|
|
29
|
+
4. Add unit tests for the new identifier format:
|
|
30
|
+
- Test `001-fix-stuff` resolves correctly
|
|
31
|
+
- Test `a01-important-project` resolves correctly
|
|
32
|
+
- Test partial matches don't accidentally match (e.g., `001-wrong-name` should fail if folder is `001-correct-name`)
|
|
33
|
+
5. Document the supported identifier formats in code comments
|
|
34
|
+
|
|
35
|
+
## Acceptance Criteria
|
|
36
|
+
- [ ] `resolveProjectIdentifier('001-fix-stuff')` returns the correct project path
|
|
37
|
+
- [ ] `resolveProjectIdentifier('a01-important-project')` returns the correct project path
|
|
38
|
+
- [ ] Invalid full folder names (wrong prefix or name) return appropriate errors
|
|
39
|
+
- [ ] All existing identifier formats continue to work
|
|
40
|
+
- [ ] Unit tests cover the new functionality
|
|
41
|
+
- [ ] Function design allows for future task-level reference extension
|
|
42
|
+
|
|
43
|
+
## Notes
|
|
44
|
+
- The full folder name should be an exact match, not a partial match
|
|
45
|
+
- Consider edge cases where the name portion contains hyphens (e.g., `001-my-cool-project`)
|
|
46
|
+
- This task must be completed before tasks 002 and 003 can proceed
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Task: Add Identifier Support to `raf status`
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Update the `raf status` command to accept all identifier formats (number, base36, full folder name, project name) for consistency with other commands.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Currently `raf status [projectName]` may only accept project names. After task 001 enhances `resolveProjectIdentifier`, this command should use that function to support all identifier formats, giving users a consistent experience across all RAF commands.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- `raf status 3` - status by numeric ID
|
|
11
|
+
- `raf status 003` - status by zero-padded numeric ID
|
|
12
|
+
- `raf status a00` - status by base36 ID
|
|
13
|
+
- `raf status my-project` - status by project name (existing)
|
|
14
|
+
- `raf status 001-my-project` - status by full folder name (new)
|
|
15
|
+
- `raf status a00-my-project` - status by full folder name with base36 prefix (new)
|
|
16
|
+
|
|
17
|
+
## Implementation Steps
|
|
18
|
+
1. Read the current `status.ts` command implementation in `src/commands/`
|
|
19
|
+
2. Identify how the project name/identifier is currently resolved
|
|
20
|
+
3. Replace or update the resolution logic to use `resolveProjectIdentifier()` from `src/utils/paths.ts`
|
|
21
|
+
4. Ensure error messages are clear when the identifier doesn't match any project
|
|
22
|
+
5. Add integration tests for the status command with various identifier formats
|
|
23
|
+
6. Update any help text or documentation for the command
|
|
24
|
+
|
|
25
|
+
## Acceptance Criteria
|
|
26
|
+
- [ ] `raf status 3` shows status for project 003
|
|
27
|
+
- [ ] `raf status 001-fix-stuff` shows status for that project
|
|
28
|
+
- [ ] `raf status a00-important` shows status for that project
|
|
29
|
+
- [ ] Invalid identifiers show helpful error messages
|
|
30
|
+
- [ ] `raf status` (no argument) continues to list all projects
|
|
31
|
+
- [ ] Tests cover the new identifier support
|
|
32
|
+
- [ ] `--json` output works correctly with all identifier formats
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
- Depends on task 001 being completed first
|
|
36
|
+
- The behavior when no project matches should be consistent with `raf do`
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Task: Update `raf do` for Full Folder Name Support
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Ensure `raf do` supports the full folder name identifier format (`001-fix-stuff`) for consistency across all RAF commands.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
The `raf do` command already uses `resolveProjectIdentifier()` for project resolution. After task 001 enhances that function to support full folder names, this task ensures `raf do` works correctly with the new format and has appropriate tests.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- `raf do 001-fix-stuff` - execute project by full folder name
|
|
11
|
+
- `raf do a00-important-project` - execute project by full folder name with base36 prefix
|
|
12
|
+
- `raf do 001-fix-stuff 002-another-project` - multi-project execution with full folder names
|
|
13
|
+
- All existing identifier formats must continue to work
|
|
14
|
+
|
|
15
|
+
## Implementation Steps
|
|
16
|
+
1. Read the current `do.ts` command implementation in `src/commands/`
|
|
17
|
+
2. Verify it uses `resolveProjectIdentifier()` (it should based on the codebase exploration)
|
|
18
|
+
3. After task 001 is complete, the function should automatically support full folder names
|
|
19
|
+
4. Add integration tests specifically for full folder name support in `raf do`:
|
|
20
|
+
- Single project with full folder name
|
|
21
|
+
- Multiple projects mixing identifier formats
|
|
22
|
+
- Invalid full folder names
|
|
23
|
+
5. Test verbose and debug modes with the new identifier format
|
|
24
|
+
6. Update help text if needed
|
|
25
|
+
|
|
26
|
+
## Acceptance Criteria
|
|
27
|
+
- [ ] `raf do 001-fix-stuff` executes the correct project
|
|
28
|
+
- [ ] `raf do a00-project` executes the correct project
|
|
29
|
+
- [ ] `raf do 001-a 002-b` executes multiple projects correctly
|
|
30
|
+
- [ ] Mixed formats work: `raf do 3 001-fix-stuff my-project`
|
|
31
|
+
- [ ] Error messages are helpful for non-matching full folder names
|
|
32
|
+
- [ ] All existing tests continue to pass
|
|
33
|
+
- [ ] New tests cover full folder name scenarios
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
- This task may be minimal if `raf do` already delegates entirely to `resolveProjectIdentifier()`
|
|
37
|
+
- Depends on task 001 being completed first
|
|
38
|
+
- Focus on testing rather than code changes if the integration is already correct
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Task: Implement `--amend` Flag for `raf plan`
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Add a `--amend` flag to the `raf plan` command that allows adding new tasks to existing projects without modifying completed tasks.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Users need the ability to extend existing plans with new tasks as requirements evolve. The `--amend` flag provides a controlled way to add tasks while preserving the integrity of completed work.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Command signature: `raf plan --amend <project-identifier>`
|
|
11
|
+
- When `raf plan <existing-project>` is used without `--amend`, show an error
|
|
12
|
+
- In amend mode:
|
|
13
|
+
- Open editor for user to describe new tasks (same as regular planning)
|
|
14
|
+
- Launch interactive Claude session with context of existing tasks
|
|
15
|
+
- Claude should see all existing tasks with their status (completed/pending/failed)
|
|
16
|
+
- New tasks are numbered sequentially after existing tasks
|
|
17
|
+
- Only adding new tasks is supported (no modification/deletion of existing)
|
|
18
|
+
- Show warning if project is fully completed but allow amendment
|
|
19
|
+
- Support all identifier formats for the project argument
|
|
20
|
+
|
|
21
|
+
## Implementation Steps
|
|
22
|
+
1. Read the current `plan.ts` command implementation in `src/commands/`
|
|
23
|
+
2. Add the `--amend` option to the Commander.js command definition:
|
|
24
|
+
```typescript
|
|
25
|
+
.option('-a, --amend <identifier>', 'Add tasks to an existing project')
|
|
26
|
+
```
|
|
27
|
+
3. Modify the command logic to detect existing project:
|
|
28
|
+
- If project identifier matches existing project AND no `--amend` flag → error with helpful message
|
|
29
|
+
- If `--amend` flag provided → enter amend mode
|
|
30
|
+
4. Create or modify the planning prompt for amend mode:
|
|
31
|
+
- Include summary of existing tasks and their status
|
|
32
|
+
- Instruct Claude to add new tasks starting from the next number
|
|
33
|
+
- Preserve the original `input.md` content as context
|
|
34
|
+
5. Load existing project state:
|
|
35
|
+
- Read all plan files from `plans/` directory
|
|
36
|
+
- Read outcomes from `outcomes/` directory
|
|
37
|
+
- Build task status summary (completed/pending/failed)
|
|
38
|
+
6. Update the editor flow:
|
|
39
|
+
- Pre-populate with context about existing tasks (as reference)
|
|
40
|
+
- User adds description of NEW tasks only
|
|
41
|
+
7. Launch interactive Claude session with the amend-specific prompt
|
|
42
|
+
8. Handle the warning for fully completed projects:
|
|
43
|
+
- Check if all tasks are completed
|
|
44
|
+
- Display warning: "Project is fully completed. New tasks will extend the existing plan."
|
|
45
|
+
- Continue with amendment
|
|
46
|
+
9. Add tests for:
|
|
47
|
+
- `raf plan --amend 003` with pending tasks
|
|
48
|
+
- `raf plan --amend 003` with all tasks completed (warning shown)
|
|
49
|
+
- `raf plan existing-project` without flag (error)
|
|
50
|
+
- Various identifier formats with `--amend`
|
|
51
|
+
|
|
52
|
+
## Acceptance Criteria
|
|
53
|
+
- [ ] `raf plan --amend 003` opens editor then launches Claude with existing task context
|
|
54
|
+
- [ ] `raf plan --amend 001-my-project` works with full folder name identifier
|
|
55
|
+
- [ ] `raf plan existing-project` (without `--amend`) shows clear error message
|
|
56
|
+
- [ ] Claude receives context about existing tasks and their status
|
|
57
|
+
- [ ] New tasks are numbered correctly (continuing from last task number)
|
|
58
|
+
- [ ] Warning is displayed when amending a fully completed project
|
|
59
|
+
- [ ] Amending creates new plan files without touching existing ones
|
|
60
|
+
- [ ] Tests cover the amend workflow
|
|
61
|
+
- [ ] Help text documents the `--amend` option
|
|
62
|
+
|
|
63
|
+
## Notes
|
|
64
|
+
- This task depends on task 001 for identifier resolution
|
|
65
|
+
- Consider creating a separate prompt file in `src/prompts/` for the amend context
|
|
66
|
+
- The editor content should clearly distinguish between existing task summary (read-only context) and the area for new task descriptions
|
|
67
|
+
- Be careful not to accidentally modify or renumber existing plan files
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Task: Universal Commit Schema for RAF
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Implement a universal commit schema for all RAF-triggered commits (plan and outcome) with consistent formatting.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
RAF needs a consistent commit message format across all automated commits. This provides clear identification of RAF-generated commits in git history and makes it easy to understand what type of commit it is (plan, task, or outcome).
|
|
8
|
+
|
|
9
|
+
This task builds on the existing `raf do` command implementation and extends to `raf plan`.
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
### Commit Schema Format
|
|
14
|
+
- **Plan commits**: `RAF[<project-number>:plan]`
|
|
15
|
+
- Example: `RAF[005:plan]`
|
|
16
|
+
- Triggered by: RAF programmatically after `raf plan` creates plan files
|
|
17
|
+
- **Outcome commits**: `RAF[<project-number>:outcome]`
|
|
18
|
+
- Example: `RAF[005:outcome]`
|
|
19
|
+
- Triggered by: RAF programmatically when all tasks in a project complete via `raf do`
|
|
20
|
+
- **Task commits**: `RAF[<project-number>:<task-number>] <project-name> <task-name>`
|
|
21
|
+
- Example: `RAF[005:001] task-naming-improvements enhance-identifier-resolution`
|
|
22
|
+
- Triggered by: Claude during task execution (handled in separate task 006)
|
|
23
|
+
|
|
24
|
+
### Plan Commit Requirements
|
|
25
|
+
- Trigger: After `raf plan` successfully creates all plan files
|
|
26
|
+
- Scope: Commit the entire project folder (plans, decisions.md, input.md)
|
|
27
|
+
- Handle dirty repo: Stage and commit only the project folder
|
|
28
|
+
- Only commit on success - if planning fails, do not commit
|
|
29
|
+
|
|
30
|
+
### Outcome Commit Requirements
|
|
31
|
+
- Trigger: When final task in a project completes successfully via `raf do`
|
|
32
|
+
- Scope: Commit the entire project folder (plans, outcomes, decisions, input.md, state.json, etc.)
|
|
33
|
+
- Handle dirty repo: Stage and commit only the project folder
|
|
34
|
+
- Only commit on success - if the final task fails, do not commit
|
|
35
|
+
|
|
36
|
+
## Implementation Steps
|
|
37
|
+
|
|
38
|
+
### Part A: Git Utility
|
|
39
|
+
1. Create a git commit utility function in `src/utils/git.ts`:
|
|
40
|
+
- Accept project folder path, project number, and commit type (plan/outcome)
|
|
41
|
+
- Stage only files within the project folder: `git add <project-folder>`
|
|
42
|
+
- Create commit with appropriate format based on type
|
|
43
|
+
- Handle git errors gracefully (not a git repo, nothing to commit, etc.)
|
|
44
|
+
|
|
45
|
+
### Part B: Plan Commits
|
|
46
|
+
2. Read the current `plan.ts` command implementation in `src/commands/`
|
|
47
|
+
3. After Claude successfully creates plan files, call the git utility with type "plan"
|
|
48
|
+
4. Log success message: "Plan committed to git."
|
|
49
|
+
|
|
50
|
+
### Part C: Outcome Commits
|
|
51
|
+
5. Read the current `do.ts` command implementation in `src/commands/`
|
|
52
|
+
6. Identify where task completion is detected (success/failure handling)
|
|
53
|
+
7. Add a helper function to check if project is complete:
|
|
54
|
+
- Load project state
|
|
55
|
+
- Check if all tasks have status "completed"
|
|
56
|
+
8. After a task completes successfully, check if this was the final task
|
|
57
|
+
9. If project is now complete, call the git utility with type "outcome"
|
|
58
|
+
10. Log success message: "Project complete. Committed to git."
|
|
59
|
+
|
|
60
|
+
### Part D: Tests
|
|
61
|
+
11. Add tests for:
|
|
62
|
+
- Plan commits after successful planning
|
|
63
|
+
- Outcome commits when final task completes
|
|
64
|
+
- Not committing when task/planning fails
|
|
65
|
+
- Handling non-git repos gracefully
|
|
66
|
+
- Handling when project folder has no changes
|
|
67
|
+
|
|
68
|
+
## Acceptance Criteria
|
|
69
|
+
- [ ] Git utility function supports both plan and outcome commit types
|
|
70
|
+
- [ ] Plan commits use format `RAF[<project-number>:plan]`
|
|
71
|
+
- [ ] Outcome commits use format `RAF[<project-number>:outcome]`
|
|
72
|
+
- [ ] `raf plan` auto-commits project folder after successful planning
|
|
73
|
+
- [ ] `raf do` auto-commits project folder when final task completes successfully
|
|
74
|
+
- [ ] Only project folder is staged/committed, other repo changes are untouched
|
|
75
|
+
- [ ] No commit is made if planning or final task fails
|
|
76
|
+
- [ ] Graceful handling when not in a git repo (warning, no crash)
|
|
77
|
+
- [ ] Graceful handling when there are no changes to commit
|
|
78
|
+
- [ ] Tests cover both plan and outcome commit workflows
|
|
79
|
+
- [ ] Success messages are logged after commits
|
|
80
|
+
|
|
81
|
+
## Notes
|
|
82
|
+
- Use `child_process.execSync` or similar for git commands
|
|
83
|
+
- Extract git utilities to `src/utils/git.ts` for reusability
|
|
84
|
+
- The project folder path can be derived from the project identifier resolution (task 001)
|
|
85
|
+
- Be careful with error handling - git failures should not crash RAF commands
|
|
86
|
+
- Task commits are handled separately in task 006 (Claude-triggered via execution prompt)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Task: Update Execution Prompt for Universal Task Commit Schema
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Update the execution prompt to instruct Claude to use the universal commit schema format for task commits.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
RAF uses a universal commit schema for all commits. While plan and outcome commits are handled programmatically by RAF (task 005), task commits are made by Claude during execution. The execution prompt needs to be updated to use the new format:
|
|
8
|
+
|
|
9
|
+
`RAF[<project-number>:<task-number>] <project-name> <task-name>`
|
|
10
|
+
|
|
11
|
+
Example: `RAF[005:001] task-naming-improvements enhance-identifier-resolution`
|
|
12
|
+
|
|
13
|
+
This task depends on the commit schema defined in task 005.
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
- Update `src/prompts/execution.ts` to use the new commit message format
|
|
17
|
+
- The execution prompt params must include:
|
|
18
|
+
- Project number (e.g., "005")
|
|
19
|
+
- Task number (e.g., "001")
|
|
20
|
+
- Project name (e.g., "task-naming-improvements")
|
|
21
|
+
- Task name (e.g., "enhance-identifier-resolution")
|
|
22
|
+
- The commit message should follow format: `RAF[<project-number>:<task-number>] <project-name> <task-name>`
|
|
23
|
+
- Update the `do.ts` command to pass the required parameters to the execution prompt
|
|
24
|
+
|
|
25
|
+
## Implementation Steps
|
|
26
|
+
1. Read the current execution prompt in `src/prompts/execution.ts`
|
|
27
|
+
2. Update `ExecutionPromptParams` interface to include:
|
|
28
|
+
- `projectNumber: string` (e.g., "005")
|
|
29
|
+
- `taskName: string` (e.g., "enhance-identifier-resolution")
|
|
30
|
+
- Ensure `projectName` is required (not optional)
|
|
31
|
+
3. Update the `commitInstructions` section in `getExecutionPrompt` to use format:
|
|
32
|
+
```
|
|
33
|
+
Commit with message: "RAF[${projectNumber}:${taskNumber}] ${projectName} ${taskName}"
|
|
34
|
+
```
|
|
35
|
+
Note: `taskNumber` should be zero-padded (e.g., "001")
|
|
36
|
+
4. Read the `do.ts` command implementation
|
|
37
|
+
5. Update the call to `getExecutionPrompt` to pass:
|
|
38
|
+
- `projectNumber` extracted from the project folder name (e.g., "005" from "005-task-naming-improvements")
|
|
39
|
+
- `taskName` extracted from the task file name (e.g., "enhance-identifier-resolution" from "001-enhance-identifier-resolution.md")
|
|
40
|
+
6. Add or update tests for:
|
|
41
|
+
- Execution prompt generates correct commit format
|
|
42
|
+
- Parameters are correctly passed from do command
|
|
43
|
+
|
|
44
|
+
## Acceptance Criteria
|
|
45
|
+
- [ ] `ExecutionPromptParams` includes `projectNumber` and `taskName` fields
|
|
46
|
+
- [ ] Execution prompt instructs Claude to use format `RAF[005:001] project-name task-name`
|
|
47
|
+
- [ ] `do.ts` extracts and passes project number from folder name
|
|
48
|
+
- [ ] `do.ts` extracts and passes task name from plan file name
|
|
49
|
+
- [ ] Task number is zero-padded in commit message (001, 002, etc.)
|
|
50
|
+
- [ ] Tests verify correct commit message format in prompt
|
|
51
|
+
- [ ] All existing tests pass
|
|
52
|
+
|
|
53
|
+
## Notes
|
|
54
|
+
- The project number can be extracted from the project folder name (first 3 digits or base36 prefix)
|
|
55
|
+
- The task name is the kebab-case portion after the task number in the plan filename
|
|
56
|
+
- Example extraction: `005-task-naming-improvements/plans/001-enhance-identifier-resolution.md`
|
|
57
|
+
- Project number: `005`
|
|
58
|
+
- Task number: `001` (from `taskNumber` param, zero-padded)
|
|
59
|
+
- Project name: `task-naming-improvements`
|
|
60
|
+
- Task name: `enhance-identifier-resolution`
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Task: Allow Amending PENDING Tasks in Amend Mode
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Update the amend prompt to allow modifying PENDING (not yet executed) tasks, while still protecting COMPLETED tasks from changes.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Currently, the amend prompt instructs Claude to "NEVER modify existing plan files." However, this is overly restrictive for PENDING tasks that haven't been executed yet. Users should be able to:
|
|
8
|
+
- Modify PENDING tasks (they haven't been executed, so changes are safe)
|
|
9
|
+
- NOT modify COMPLETED tasks (their outcomes depend on the original plan)
|
|
10
|
+
|
|
11
|
+
This provides flexibility while protecting work that has already been done.
|
|
12
|
+
|
|
13
|
+
## Requirements
|
|
14
|
+
- Update `src/prompts/amend.ts` to differentiate between completed and non-completed tasks
|
|
15
|
+
- NOT COMPLETED tasks (pending or failed): Can be modified
|
|
16
|
+
- COMPLETED tasks: Cannot be modified (protected)
|
|
17
|
+
- The amend prompt should clearly communicate these rules to Claude
|
|
18
|
+
- The prompt should list which specific tasks are modifiable vs protected
|
|
19
|
+
|
|
20
|
+
## Implementation Steps
|
|
21
|
+
1. Read the current amend prompt in `src/prompts/amend.ts`
|
|
22
|
+
2. Update the `AmendPromptParams` interface if needed to include task status
|
|
23
|
+
3. Modify the existing tasks summary section to clearly indicate:
|
|
24
|
+
- Which tasks are PROTECTED (completed)
|
|
25
|
+
- Which tasks are MODIFIABLE (pending, failed)
|
|
26
|
+
4. Update the "Important Rules" section to replace:
|
|
27
|
+
```
|
|
28
|
+
NEVER modify existing plan files (001-XXX)
|
|
29
|
+
```
|
|
30
|
+
With something like:
|
|
31
|
+
```
|
|
32
|
+
NEVER modify COMPLETED task plans - they are protected
|
|
33
|
+
You MAY modify non-completed task plans (pending/failed) if the user requests changes
|
|
34
|
+
```
|
|
35
|
+
5. Add a new section listing modifiable vs protected tasks explicitly
|
|
36
|
+
6. Add tests for:
|
|
37
|
+
- Prompt correctly identifies modifiable tasks
|
|
38
|
+
- Prompt correctly identifies protected tasks
|
|
39
|
+
- Different combinations of task statuses
|
|
40
|
+
|
|
41
|
+
## Acceptance Criteria
|
|
42
|
+
- [ ] Amend prompt allows modification of non-completed tasks (pending/failed)
|
|
43
|
+
- [ ] Amend prompt prohibits modification of COMPLETED tasks
|
|
44
|
+
- [ ] Prompt clearly lists which tasks are modifiable vs protected
|
|
45
|
+
- [ ] Status indicators are clear: [PROTECTED], [MODIFIABLE]
|
|
46
|
+
- [ ] Tests cover different task status combinations
|
|
47
|
+
- [ ] All existing tests pass
|
|
48
|
+
|
|
49
|
+
## Notes
|
|
50
|
+
- The task status is already available in `existingTasks` parameter
|
|
51
|
+
- Consider using clear visual indicators like [PROTECTED] and [MODIFIABLE] instead of just status
|
|
52
|
+
- This change makes the amend mode more practical while still safeguarding completed work
|
|
53
|
+
- Example output in prompt:
|
|
54
|
+
```
|
|
55
|
+
Existing Tasks:
|
|
56
|
+
- Task 001: setup-database [COMPLETED] [PROTECTED]
|
|
57
|
+
- Task 002: add-user-auth [COMPLETED] [PROTECTED]
|
|
58
|
+
- Task 003: implement-api [PENDING] [MODIFIABLE]
|
|
59
|
+
- Task 004: write-tests [PENDING] [MODIFIABLE]
|
|
60
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Task: Fix Timeout Label
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Change the startup message label from "Timeout" to "Task timeout" for clarity.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
When `raf do` starts executing a project, it displays a summary message showing the number of tasks and the timeout value. The current label "Timeout" is ambiguous - changing it to "Task timeout" makes it clearer that this timeout applies per-task, not for the entire project.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Change the label from "Timeout" to "Task timeout" in the `raf do` startup message
|
|
11
|
+
- Keep the rest of the message format unchanged: `Tasks: X, Task timeout: Y minutes`
|
|
12
|
+
|
|
13
|
+
## Implementation Steps
|
|
14
|
+
1. Open `src/commands/do.ts`
|
|
15
|
+
2. Find line 227 with the logger.info call
|
|
16
|
+
3. Change `Timeout:` to `Task timeout:`
|
|
17
|
+
|
|
18
|
+
## Acceptance Criteria
|
|
19
|
+
- [ ] The message displays "Task timeout:" instead of "Timeout:"
|
|
20
|
+
- [ ] The rest of the message format remains unchanged
|
|
21
|
+
- [ ] All existing tests pass
|
|
22
|
+
|
|
23
|
+
## Notes
|
|
24
|
+
This is a simple label change in `src/commands/do.ts:227`:
|
|
25
|
+
```typescript
|
|
26
|
+
// Before:
|
|
27
|
+
logger.info(`Tasks: ${state.tasks.length}, Timeout: ${timeout} minutes`);
|
|
28
|
+
|
|
29
|
+
// After:
|
|
30
|
+
logger.info(`Tasks: ${state.tasks.length}, Task timeout: ${timeout} minutes`);
|
|
31
|
+
```
|