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,63 @@
|
|
|
1
|
+
# Task: Verify Per-Task Timeout Implementation
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Verify that the 60-minute timeout is correctly applied per task (not per project or per retry) and add tests to ensure this behavior.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
The user wants to ensure that the timeout (default 60 minutes) is applied to each individual task execution, not shared across tasks or accumulated across retries. Based on code review, the current implementation appears correct, but verification and tests are needed.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Verify timeout is passed to each Claude execution independently
|
|
11
|
+
- Verify timeout resets for each task
|
|
12
|
+
- Verify timeout resets for each retry attempt
|
|
13
|
+
- Document the timeout behavior clearly
|
|
14
|
+
- Add tests to prevent regression
|
|
15
|
+
|
|
16
|
+
## Implementation Steps
|
|
17
|
+
|
|
18
|
+
1. **Code review and verification**
|
|
19
|
+
- Review `src/core/claude-runner.ts` timeout handling
|
|
20
|
+
- Trace timeout parameter flow from CLI through to process execution
|
|
21
|
+
- Confirm `setTimeout` is set up per execution
|
|
22
|
+
- Document findings
|
|
23
|
+
|
|
24
|
+
2. **Verify retry behavior**
|
|
25
|
+
- Check if retries use the same timeout or share elapsed time
|
|
26
|
+
- Current expectation: each retry gets fresh timeout
|
|
27
|
+
- Document actual behavior
|
|
28
|
+
|
|
29
|
+
3. **Add unit tests for timeout** (`src/core/claude-runner.test.ts`)
|
|
30
|
+
- Test that timeout is passed correctly to spawn
|
|
31
|
+
- Test that timeout handler kills process
|
|
32
|
+
- Test that timedOut flag is set correctly
|
|
33
|
+
|
|
34
|
+
4. **Add integration tests**
|
|
35
|
+
- Test that multiple tasks each get their own timeout
|
|
36
|
+
- Test that retry attempts get fresh timeout
|
|
37
|
+
- Use mock/stub Claude process for testing
|
|
38
|
+
|
|
39
|
+
5. **Update documentation**
|
|
40
|
+
- Add comment in code explaining timeout is per-task
|
|
41
|
+
- Update README or help text if needed
|
|
42
|
+
- Add note about retry timeout behavior
|
|
43
|
+
|
|
44
|
+
6. **Consider edge cases**
|
|
45
|
+
- What happens if timeout is 0? (should be rejected or infinite?)
|
|
46
|
+
- What happens with very large timeout values?
|
|
47
|
+
- Ensure timeout parameter validation
|
|
48
|
+
|
|
49
|
+
## Acceptance Criteria
|
|
50
|
+
- [ ] Code review confirms timeout is per-task execution
|
|
51
|
+
- [ ] Code review confirms retries get fresh timeout
|
|
52
|
+
- [ ] Unit tests verify timeout behavior
|
|
53
|
+
- [ ] Integration tests verify multi-task timeout independence
|
|
54
|
+
- [ ] Documentation updated with timeout behavior
|
|
55
|
+
- [ ] Edge cases handled appropriately
|
|
56
|
+
|
|
57
|
+
## Notes
|
|
58
|
+
- This is primarily a verification and testing task, not implementation
|
|
59
|
+
- If issues are found, they should be fixed as part of this task
|
|
60
|
+
- Current implementation in claude-runner.ts appears correct based on exploration:
|
|
61
|
+
- `setTimeout(() => proc.kill('SIGTERM'), timeoutMs)` is set per call
|
|
62
|
+
- Each task execution is a separate call to `run()` or `runVerbose()`
|
|
63
|
+
- Timeout includes all time Claude is running, including any context it builds
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Task: Move decisions/DECISIONS.md to decisions.md
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Simplify project structure by moving the decisions file from `decisions/DECISIONS.md` to `decisions.md` at the project root.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Currently, decisions are stored in a nested folder structure (`decisions/DECISIONS.md`). This adds unnecessary complexity when there's only one decisions file per project. Moving it to `decisions.md` at the project root simplifies the structure and makes it more discoverable.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Move `decisions/DECISIONS.md` to `decisions.md` at project root
|
|
11
|
+
- Update `raf plan` command to create `decisions.md` instead of `decisions/DECISIONS.md`
|
|
12
|
+
- Update planning prompt to reference new location
|
|
13
|
+
- Remove empty `decisions/` folder creation
|
|
14
|
+
- Handle migration of existing projects (optional - just document)
|
|
15
|
+
|
|
16
|
+
## Implementation Steps
|
|
17
|
+
|
|
18
|
+
1. **Update project folder creation** (`src/commands/plan.ts` or `src/utils/paths.ts`)
|
|
19
|
+
- Remove `decisions/` folder creation
|
|
20
|
+
- Create `decisions.md` file directly in project root
|
|
21
|
+
|
|
22
|
+
2. **Update planning prompt** (`src/prompts/planning-prompt.ts` or similar)
|
|
23
|
+
- Change path reference from `decisions/DECISIONS.md` to `decisions.md`
|
|
24
|
+
- Update any instructions that mention the decisions folder
|
|
25
|
+
|
|
26
|
+
3. **Update path utilities** (`src/utils/paths.ts`)
|
|
27
|
+
- Update `getDecisionsPath()` or similar function
|
|
28
|
+
- Return `RAF/NNN-project-name/decisions.md` instead of `RAF/NNN-project-name/decisions/DECISIONS.md`
|
|
29
|
+
|
|
30
|
+
4. **Update state derivation** (if decisions are used in state)
|
|
31
|
+
- Check if decisions file is referenced in state derivation
|
|
32
|
+
- Update paths accordingly
|
|
33
|
+
|
|
34
|
+
5. **Update documentation**
|
|
35
|
+
- Update folder structure documentation in CLAUDE.md
|
|
36
|
+
- Update any references in README
|
|
37
|
+
|
|
38
|
+
6. **Clean up existing projects (optional)**
|
|
39
|
+
- Document that existing `decisions/DECISIONS.md` files can be manually moved
|
|
40
|
+
- Or add migration logic to move file if old location exists
|
|
41
|
+
|
|
42
|
+
## New Project Structure
|
|
43
|
+
|
|
44
|
+
Before:
|
|
45
|
+
```
|
|
46
|
+
RAF/001-example-project/
|
|
47
|
+
├── input.md
|
|
48
|
+
├── decisions/
|
|
49
|
+
│ └── DECISIONS.md
|
|
50
|
+
├── plans/
|
|
51
|
+
│ └── ...
|
|
52
|
+
└── outcomes/
|
|
53
|
+
└── ...
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
After:
|
|
57
|
+
```
|
|
58
|
+
RAF/001-example-project/
|
|
59
|
+
├── input.md
|
|
60
|
+
├── decisions.md
|
|
61
|
+
├── plans/
|
|
62
|
+
│ └── ...
|
|
63
|
+
└── outcomes/
|
|
64
|
+
└── ...
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Acceptance Criteria
|
|
68
|
+
- [ ] New projects create `decisions.md` at project root
|
|
69
|
+
- [ ] `decisions/` folder is not created for new projects
|
|
70
|
+
- [ ] Planning prompt references correct path
|
|
71
|
+
- [ ] Path utilities return correct location
|
|
72
|
+
- [ ] Documentation updated
|
|
73
|
+
- [ ] Tests updated
|
|
74
|
+
|
|
75
|
+
## Notes
|
|
76
|
+
- This is a minor structural change but improves discoverability
|
|
77
|
+
- Existing projects will continue to work (decisions file location doesn't affect execution)
|
|
78
|
+
- Consider: should we support both locations for backward compatibility? Decision: No, keep it simple
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Project Decisions
|
|
2
|
+
|
|
3
|
+
## What exactly should be removed - the SUMMARY.md file generation, the console summary output, or both?
|
|
4
|
+
Remove SUMMARY.md file only - Keep console output, stop generating SUMMARY.md in outcomes/
|
|
5
|
+
|
|
6
|
+
## For 'support passing full name to the project' - what change do you want?
|
|
7
|
+
Leave optional user-provided name working as is. If name not provided, use Haiku with modified prompt (see task 4 about improving Haiku prompt to use most important task).
|
|
8
|
+
|
|
9
|
+
## For the numbering prefix problem (what happens after 999?), which approach?
|
|
10
|
+
Alphanumeric base36 (a00-zzz) - Uses 0-9 and a-z, gives ~46,000 combinations in 3 chars.
|
|
11
|
+
|
|
12
|
+
## Should we migrate existing projects to new format?
|
|
13
|
+
Start fresh, no migration - New projects use base36, old projects stay as-is but mixed formats allowed.
|
|
14
|
+
|
|
15
|
+
## When should base36 kick in?
|
|
16
|
+
After 999 - Keep familiar 001-999, then a00, a01... for project numbers 1000+.
|
|
17
|
+
|
|
18
|
+
## How should Haiku identify the 'most important task' from project description?
|
|
19
|
+
Let Haiku decide - Tell Haiku to analyze and pick the most impactful/core task.
|
|
20
|
+
|
|
21
|
+
## Any specific guidelines for how Haiku should name projects?
|
|
22
|
+
Add 'focus on core feature' - Tell Haiku to name based on the main functionality being built.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
- [ ] remove summary
|
|
2
|
+
- [ ] support passing full name to the project
|
|
3
|
+
- [ ] investigate that do to with only there numbers prefix (000, 001, NNN), i don't wan't to make 4, since it's ugly, but also adding timestamps or is ugly, what could be good solution so it's user readable and short?
|
|
4
|
+
- [ ] when comming up with project name take most important task for the base name (add this
|
|
5
|
+
instruction to prompt to claude code haiku)
|
|
6
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 001 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
Let me verify all acceptance criteria are met:
|
|
7
|
+
1. ✅ **SUMMARY.md is no longer created in `outcomes/` directory after task execution** - Removed `saveSummary` method and its call in `do.ts`
|
|
8
|
+
2. ✅ **Console summary output still displays after single project execution** - Lines 437-443 in `do.ts` still print:
|
|
9
|
+
3. ✅ **Console summary output still displays for multi-project execution** - `printMultiProjectSummary()` function at line 453 is unchanged and still displays multi-project results
|
|
10
|
+
4. ✅ **All existing tests pass (or are updated appropriately)** - All 235 tests pass (removed the `saveSummary` test that was no longer applicable)
|
|
11
|
+
5. ✅ **No orphaned code referencing SUMMARY.md generation** - Verified with grep that no references remain in `src/`
|
|
12
|
+
<promise>COMPLETE</promise>
|
|
13
|
+
|
|
14
|
+
## Details
|
|
15
|
+
- Attempts: 1
|
|
16
|
+
- Elapsed time: 2m 49s
|
|
17
|
+
- Completed at: 2026-01-30T18:55:54.601Z
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 002 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
All acceptance criteria are verified. Let me summarize what was implemented:
|
|
7
|
+
## Summary
|
|
8
|
+
Successfully implemented base36 project numbering for RAF. The implementation:
|
|
9
|
+
**New Functions Added to `src/utils/paths.ts`:**
|
|
10
|
+
- `encodeBase36(num)`: Converts numbers >= 1000 to 3-character base36 strings (a00, a01, ..., zzz)
|
|
11
|
+
- `decodeBase36(str)`: Converts base36 strings back to numbers
|
|
12
|
+
- `isBase36Prefix(str)`: Validates if a string is a valid base36 prefix
|
|
13
|
+
- `parseProjectPrefix(prefix)`: Parses either numeric or base36 prefix to a number
|
|
14
|
+
**Updated Functions:**
|
|
15
|
+
- `formatProjectNumber()`: Uses numeric format (001-999) or base36 (a00+)
|
|
16
|
+
- `extractProjectNumber()`: Handles both numeric and base36 prefixes
|
|
17
|
+
- `extractProjectName()`: Handles both formats
|
|
18
|
+
- `getProjectDir()`: Matches both format patterns
|
|
19
|
+
- `getNextProjectNumber()`: Scans for both formats to find max
|
|
20
|
+
- `listProjects()`: Lists both formats with correct numeric values
|
|
21
|
+
- `resolveProjectIdentifier()`: Resolves by numeric, base36 prefix, or name
|
|
22
|
+
- `validateProjectExists()` in validation.ts: Matches both formats
|
|
23
|
+
**Tests Added:**
|
|
24
|
+
- 40 new tests covering all base36 functionality
|
|
25
|
+
- Updated 5 existing tests to reflect new behavior (where 3-letter words like "not" are now valid base36)
|
|
26
|
+
All 275 tests pass.
|
|
27
|
+
<promise>COMPLETE</promise>
|
|
28
|
+
|
|
29
|
+
## Details
|
|
30
|
+
- Attempts: 1
|
|
31
|
+
- Elapsed time: 6m 19s
|
|
32
|
+
- Completed at: 2026-01-30T19:02:14.551Z
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 003 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
## Summary
|
|
7
|
+
Successfully improved the Haiku prompt for project naming in `src/utils/name-generator.ts`. The updated prompt now:
|
|
8
|
+
1. **Instructs Haiku to identify the most important task** - "Analyze this project description" and "Focus on the most important or core feature being built"
|
|
9
|
+
2. **Focuses on core feature** - Explicit instruction to focus on what's being built
|
|
10
|
+
3. **Guides toward action-oriented naming** - "The name should be action-oriented, describing what the project does" with concrete examples like 'add-user-auth', 'fix-payment-flow', 'refactor-api-routes'
|
|
11
|
+
4. **Maintains existing constraints** - Still requests kebab-case, 2-4 words, and "Output ONLY the name"
|
|
12
|
+
5. **Preserves fallback behavior** - The `generateFallbackName()` function remains unchanged
|
|
13
|
+
6. **CLI-provided names still bypass Haiku** - Existing behavior in command layer is unchanged
|
|
14
|
+
All 275 tests pass.
|
|
15
|
+
<promise>COMPLETE</promise>
|
|
16
|
+
|
|
17
|
+
## Details
|
|
18
|
+
- Attempts: 1
|
|
19
|
+
- Elapsed time: 1m 15s
|
|
20
|
+
- Completed at: 2026-01-30T19:03:30.210Z
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Project Summary: task-naming-optimization
|
|
2
|
+
|
|
3
|
+
**Generated:** 2026-01-30T19:03:30.212Z
|
|
4
|
+
|
|
5
|
+
## Statistics
|
|
6
|
+
|
|
7
|
+
- Total: 3
|
|
8
|
+
- Completed: 3
|
|
9
|
+
- Failed: 0
|
|
10
|
+
- Pending: 0
|
|
11
|
+
|
|
12
|
+
## Tasks
|
|
13
|
+
|
|
14
|
+
### [x] Task 001
|
|
15
|
+
|
|
16
|
+
- **Plan:** plans/001-remove-summary-file.md
|
|
17
|
+
- **Status:** completed
|
|
18
|
+
|
|
19
|
+
### [x] Task 002
|
|
20
|
+
|
|
21
|
+
- **Plan:** plans/002-base36-project-numbering.md
|
|
22
|
+
- **Status:** completed
|
|
23
|
+
|
|
24
|
+
### [x] Task 003
|
|
25
|
+
|
|
26
|
+
- **Plan:** plans/003-improve-haiku-prompt.md
|
|
27
|
+
- **Status:** completed
|
|
28
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Task: Remove SUMMARY.md File Generation
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Remove the SUMMARY.md file generation from the outcomes folder while keeping console summary output intact.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
The project currently generates a SUMMARY.md file in the `outcomes/` directory after task execution completes. The user wants to remove this file generation but keep the console output that shows project execution results.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Remove SUMMARY.md file generation from `ProjectManager.saveSummary()`
|
|
11
|
+
- Keep console summary output in `do.ts` (single project and multi-project summaries)
|
|
12
|
+
- Remove the `saveSummary` method or convert it to only handle console output
|
|
13
|
+
- Update any tests that expect SUMMARY.md to be created
|
|
14
|
+
- Do NOT remove the `printMultiProjectSummary()` console functionality
|
|
15
|
+
|
|
16
|
+
## Implementation Steps
|
|
17
|
+
1. Read `src/core/project-manager.ts` and locate the `saveSummary` method
|
|
18
|
+
2. Remove or disable the file writing logic (the `fs.writeFileSync` call for SUMMARY.md)
|
|
19
|
+
3. Read `src/commands/do.ts` and verify console summary output is preserved
|
|
20
|
+
4. Update any references that call `saveSummary` if needed
|
|
21
|
+
5. Run existing tests and update any that fail due to missing SUMMARY.md
|
|
22
|
+
6. Verify the console output still works correctly
|
|
23
|
+
|
|
24
|
+
## Acceptance Criteria
|
|
25
|
+
- [ ] SUMMARY.md is no longer created in `outcomes/` directory after task execution
|
|
26
|
+
- [ ] Console summary output still displays after single project execution
|
|
27
|
+
- [ ] Console summary output still displays for multi-project execution
|
|
28
|
+
- [ ] All existing tests pass (or are updated appropriately)
|
|
29
|
+
- [ ] No orphaned code referencing SUMMARY.md generation
|
|
30
|
+
|
|
31
|
+
## Notes
|
|
32
|
+
- The `saveSummary` method is called in `executeSingleProject()` in do.ts
|
|
33
|
+
- The console output comes from separate code paths - make sure to preserve those
|
|
34
|
+
- Consider whether to remove the method entirely or just the file writing portion
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Task: Implement Base36 Project Numbering
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Implement alphanumeric base36 numbering for project prefixes that kicks in after project 999, providing ~46,000 combinations in 3 characters.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Current project numbering uses 3-digit zero-padded numbers (001-999). The user wants a scalable solution that remains user-readable and short. Base36 encoding (0-9, a-z) allows for 36^3 = 46,656 combinations in 3 characters.
|
|
8
|
+
|
|
9
|
+
**Numbering scheme:**
|
|
10
|
+
- Projects 1-999: Use current format (001, 002, ..., 999)
|
|
11
|
+
- Projects 1000+: Use base36 format (a00, a01, ..., a0z, a10, ..., zzz)
|
|
12
|
+
|
|
13
|
+
## Requirements
|
|
14
|
+
- Keep backwards compatibility: existing projects (001-999) continue to work
|
|
15
|
+
- No migration needed: old projects stay as-is
|
|
16
|
+
- New projects after 999 use base36 (a00 = 1000, a01 = 1001, etc.)
|
|
17
|
+
- Support reading both formats when resolving project identifiers
|
|
18
|
+
- Base36 uses lowercase letters only (a-z, not A-Z)
|
|
19
|
+
- Maintain 3-character prefix for consistency
|
|
20
|
+
|
|
21
|
+
## Implementation Steps
|
|
22
|
+
1. Read `src/utils/paths.ts` - understand current `formatProjectNumber()` and `getNextProjectNumber()` functions
|
|
23
|
+
2. Create helper functions for base36 encoding/decoding:
|
|
24
|
+
- `encodeBase36(num: number): string` - converts 1000+ to 'a00', 'a01', etc.
|
|
25
|
+
- `decodeBase36(str: string): number` - converts 'a00' back to 1000
|
|
26
|
+
3. Update `formatProjectNumber(num)`:
|
|
27
|
+
- If num <= 999: return zero-padded 3-digit string (current behavior)
|
|
28
|
+
- If num >= 1000: return base36 encoded string
|
|
29
|
+
4. Update `extractProjectNumber(projectPath)`:
|
|
30
|
+
- Support parsing both numeric (001-999) and base36 (a00-zzz) prefixes
|
|
31
|
+
5. Update `getNextProjectNumber(rafDir)`:
|
|
32
|
+
- Scan for both numeric and base36 prefixed folders
|
|
33
|
+
- Return correct next number in sequence
|
|
34
|
+
6. Update `resolveProjectIdentifier()` to handle both formats
|
|
35
|
+
7. Add comprehensive tests for edge cases:
|
|
36
|
+
- Transition from 999 to a00 (1000)
|
|
37
|
+
- Mixed folder formats
|
|
38
|
+
- Base36 parsing and formatting
|
|
39
|
+
8. Update validation in `src/utils/validation.ts` if needed
|
|
40
|
+
|
|
41
|
+
## Acceptance Criteria
|
|
42
|
+
- [ ] Projects 1-999 use format: 001, 002, ..., 999
|
|
43
|
+
- [ ] Project 1000 uses format: a00
|
|
44
|
+
- [ ] Project 1001 uses format: a01
|
|
45
|
+
- [ ] `raf do 003` still works for existing projects
|
|
46
|
+
- [ ] `raf do a00` works for base36 projects
|
|
47
|
+
- [ ] `raf plan` correctly determines next project number across mixed formats
|
|
48
|
+
- [ ] All tests pass including new base36 tests
|
|
49
|
+
|
|
50
|
+
## Notes
|
|
51
|
+
- Base36 math: a00 = 10*36^2 + 0*36 + 0 = 12960 in pure base36, but we're using it to represent 1000+
|
|
52
|
+
- Simpler approach: treat a00 as 1000 offset (a00 = 1000, a01 = 1001, etc.)
|
|
53
|
+
- 'a' represents 1000-1035 (a00-a0z, a10-a1z, a20-a2z)
|
|
54
|
+
- Each letter block = 36*36 = 1296 numbers
|
|
55
|
+
- Consider edge cases: what if user manually creates folders with inconsistent numbering?
|
|
56
|
+
- Sorting should work: 001 < 002 < 999 < a00 < a01 (lexicographic with numbers before letters)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Task: Improve Haiku Prompt for Project Naming
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Update the Claude Haiku prompt for project name generation to focus on the core feature and let Haiku decide the most important task.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Currently, the Haiku prompt in `src/utils/name-generator.ts` simply says "Generate a short kebab-case project name (2-4 words) for this project description". The user wants improved guidance so that:
|
|
8
|
+
1. Haiku analyzes the project description to identify the most important/impactful task
|
|
9
|
+
2. The name focuses on the core functionality being built
|
|
10
|
+
3. Names are action-oriented and descriptive
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
- Update the Haiku prompt to include instructions for:
|
|
14
|
+
- Analyzing the project description to find the most important task
|
|
15
|
+
- Focusing on the core feature/functionality
|
|
16
|
+
- Creating action-oriented names that describe what the project does
|
|
17
|
+
- Keep the existing constraints: kebab-case, 2-4 words, 50 char max
|
|
18
|
+
- Maintain fallback behavior if Haiku fails
|
|
19
|
+
- User-provided names via CLI should still skip Haiku entirely (existing behavior)
|
|
20
|
+
|
|
21
|
+
## Implementation Steps
|
|
22
|
+
1. Read `src/utils/name-generator.ts` to understand current implementation
|
|
23
|
+
2. Update the prompt string passed to Haiku with improved instructions:
|
|
24
|
+
```
|
|
25
|
+
Analyze this project description and generate a short kebab-case name (2-4 words).
|
|
26
|
+
Focus on the most important or core feature being built.
|
|
27
|
+
The name should be action-oriented, describing what the project does.
|
|
28
|
+
Examples: 'add-user-auth', 'fix-payment-flow', 'refactor-api-routes'
|
|
29
|
+
|
|
30
|
+
Project description:
|
|
31
|
+
{description}
|
|
32
|
+
```
|
|
33
|
+
3. Test the new prompt with various project descriptions
|
|
34
|
+
4. Ensure the sanitization and fallback logic still works
|
|
35
|
+
5. Update any tests related to name generation
|
|
36
|
+
|
|
37
|
+
## Acceptance Criteria
|
|
38
|
+
- [ ] Haiku prompt includes instruction to identify most important task
|
|
39
|
+
- [ ] Haiku prompt includes instruction to focus on core feature
|
|
40
|
+
- [ ] Haiku prompt guides toward action-oriented naming
|
|
41
|
+
- [ ] Generated names are descriptive of project functionality
|
|
42
|
+
- [ ] Existing fallback behavior (if Haiku fails) still works
|
|
43
|
+
- [ ] CLI-provided names still bypass Haiku
|
|
44
|
+
- [ ] All tests pass
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
- The prompt should not be too long - Haiku has context limits
|
|
48
|
+
- Keep the response format simple (just the name, no explanation)
|
|
49
|
+
- Consider adding "Output only the name, nothing else" to prevent chatty responses
|
|
50
|
+
- Test with edge cases: vague descriptions, multiple tasks, single task
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Project Decisions
|
|
2
|
+
|
|
3
|
+
## For `raf status`, should it work exactly like `raf do` where you can pass a number (3, 003), base36 (a00), or project name? Any additional behavior differences?
|
|
4
|
+
Same as `raf do` PLUS support for full folder names like `001-fix-stuff` or `a01-important-project`.
|
|
5
|
+
|
|
6
|
+
## When using `raf plan` with an existing project identifier (e.g., `raf plan 3`), what should happen?
|
|
7
|
+
Show error saying project already exists, require explicit `--amend` flag to modify existing plans.
|
|
8
|
+
|
|
9
|
+
## What operations should `--amend` support for existing plans?
|
|
10
|
+
Add new tasks only - only allow adding new tasks to the end of the plan, preserving existing task numbers.
|
|
11
|
+
|
|
12
|
+
## How should `raf plan --amend` be invoked?
|
|
13
|
+
`raf plan --amend <id>` - require project identifier with --amend flag.
|
|
14
|
+
|
|
15
|
+
## When in amend mode, should Claude see the existing tasks and their status?
|
|
16
|
+
Full context - show all existing tasks with their status (completed/pending/failed) so Claude can make informed decisions about new tasks.
|
|
17
|
+
|
|
18
|
+
## Should `raf do` also support full folder names like `001-fix-stuff`?
|
|
19
|
+
Yes, for consistency - all commands should support the same identifier formats.
|
|
20
|
+
|
|
21
|
+
## In amend mode, how should the user provide input for new tasks?
|
|
22
|
+
Same as current plan implementation - editor first for user to describe new tasks, then interactive Claude session. The only difference is that Claude will have context of existing tasks and their status.
|
|
23
|
+
|
|
24
|
+
## What should happen if `--amend` is used on a project that's fully completed?
|
|
25
|
+
Allow with warning - show warning that project is complete but allow adding new tasks.
|
|
26
|
+
|
|
27
|
+
## Should the enhanced identifier support task-level references for future extensibility?
|
|
28
|
+
Yes, design the resolution function to be extensible for task-level references like `001-project/002-task` in the future.
|
|
29
|
+
|
|
30
|
+
## [Amendment] When should the outcomes be committed - automatically after each task completes, or only when the entire project (all tasks) is marked complete?
|
|
31
|
+
On project complete - commit all outcomes together when the final task in the project is completed.
|
|
32
|
+
|
|
33
|
+
## [Amendment] What should be included in the commit when the project completes?
|
|
34
|
+
Full project folder - commit the entire project folder (plans, outcomes, decisions, input, etc.).
|
|
35
|
+
|
|
36
|
+
## [Amendment] How should the commit message be formatted?
|
|
37
|
+
Use format: `RAF(project): outcomes` - e.g., `RAF(005-task-naming-improvements): outcomes`
|
|
38
|
+
|
|
39
|
+
## [Amendment] Where should this commit logic be triggered from?
|
|
40
|
+
Inside `raf do` - automatically detect project completion at the end of `raf do` when final task succeeds.
|
|
41
|
+
|
|
42
|
+
## [Amendment] What should happen if there are other uncommitted changes in the repo when project completes?
|
|
43
|
+
Commit only project - stage and commit only the project folder, leave other changes unstaged.
|
|
44
|
+
|
|
45
|
+
## [Amendment] Should task 005 be updated or should a new task supersede it for the new commit format?
|
|
46
|
+
Update task 005 directly - PENDING tasks are allowed to be amended. Also create a new task to update the amend prompts to reflect this rule.
|
|
47
|
+
|
|
48
|
+
## [Amendment] What is the exact universal commit schema format?
|
|
49
|
+
- Task commits: `RAF[005:001] project-name task-name`
|
|
50
|
+
- Plan commits: `RAF[005:plan]`
|
|
51
|
+
- Outcome commits: `RAF[005:outcome]`
|
|
52
|
+
|
|
53
|
+
## [Amendment] Where do task commits happen?
|
|
54
|
+
Claude makes task commits during execution - need to update prompts that Claude uses.
|
|
55
|
+
|
|
56
|
+
## [Amendment] Should plan commits be automated via Claude or RAF?
|
|
57
|
+
Plan commits are done by RAF programmatically (not Claude) - format `RAF[005:plan]`.
|
|
58
|
+
|
|
59
|
+
## [Amendment] Should the message be changed from 'Tasks: X, Timeout: Y minutes' to 'Tasks: X, Task timeout: Y minutes'?
|
|
60
|
+
Yes, exactly that - change 'Timeout' to 'Task timeout' keeping the rest of the format.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 001 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
## Summary
|
|
7
|
+
I have successfully completed Task 001: Enhance Identifier Resolution for Full Folder Names.
|
|
8
|
+
### Changes Made
|
|
9
|
+
**1. `src/utils/paths.ts`** - Enhanced `resolveProjectIdentifier` function:
|
|
10
|
+
- Added support for full folder name format (e.g., `001-fix-stuff`, `a01-important-project`)
|
|
11
|
+
- Uses pattern `^(\d{2,3}|[a-z][0-9a-z]{2})-(.+)$` to detect full folder names
|
|
12
|
+
- Checks full folder names first with exact (case-insensitive) match
|
|
13
|
+
- Returns null for invalid full folder names without falling through to name-based matching
|
|
14
|
+
- Added comprehensive JSDoc documentation describing all supported identifier formats
|
|
15
|
+
- Function design allows for future task-level reference extension (as noted in documentation)
|
|
16
|
+
**2. `tests/unit/paths.test.ts`** - Added 10 new unit tests:
|
|
17
|
+
- Resolve numeric folder name (`001-fix-stuff`)
|
|
18
|
+
- Resolve base36 folder name (`a01-important-project`)
|
|
19
|
+
- Resolve folder with hyphens in name (`001-my-cool-project`)
|
|
20
|
+
- Return null for wrong prefix with correct name format
|
|
21
|
+
- Return null for correct prefix with wrong name format
|
|
22
|
+
- Case-insensitive folder matching
|
|
23
|
+
- 2-digit prefix full folder names
|
|
24
|
+
- Backward compatibility: name-only resolution still works
|
|
25
|
+
- Backward compatibility: number-only resolution still works
|
|
26
|
+
- Exact full folder match preferred over name-only match
|
|
27
|
+
### Acceptance Criteria Verification
|
|
28
|
+
- ✅ `resolveProjectIdentifier('001-fix-stuff')` returns the correct project path
|
|
29
|
+
- ✅ `resolveProjectIdentifier('a01-important-project')` returns the correct project path
|
|
30
|
+
- ✅ Invalid full folder names (wrong prefix or name) return null
|
|
31
|
+
- ✅ All existing identifier formats continue to work
|
|
32
|
+
- ✅ Unit tests cover the new functionality (10 new tests)
|
|
33
|
+
- ✅ Function design allows for future task-level reference extension
|
|
34
|
+
### Test Results
|
|
35
|
+
- All 285 tests pass
|
|
36
|
+
- TypeScript build succeeds with no errors
|
|
37
|
+
<promise>COMPLETE</promise>
|
|
38
|
+
|
|
39
|
+
## Details
|
|
40
|
+
- Attempts: 1
|
|
41
|
+
- Elapsed time: 2m 18s
|
|
42
|
+
- Completed at: 2026-01-30T21:22:43.407Z
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 002 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
## Summary
|
|
7
|
+
I have successfully completed Task 002: Add Identifier Support to `raf status`.
|
|
8
|
+
### Changes Made
|
|
9
|
+
**1. `src/commands/status.ts`** - Updated to use `resolveProjectIdentifier`:
|
|
10
|
+
- Changed import from `getProjectDir` to `resolveProjectIdentifier`
|
|
11
|
+
- Renamed parameter from `projectName` to `identifier` to reflect broader support
|
|
12
|
+
- Updated help text: `'Project identifier: number (3), name (my-project), or folder (001-my-project)'`
|
|
13
|
+
- Uses `resolveProjectIdentifier` for all identifier resolution
|
|
14
|
+
- Error message includes the identifier that was not found
|
|
15
|
+
**2. `tests/unit/status-command.test.ts`** - Added 24 new tests:
|
|
16
|
+
- Tests for numeric ID resolution (with and without leading zeros)
|
|
17
|
+
- Tests for base36 ID resolution
|
|
18
|
+
- Tests for project name resolution
|
|
19
|
+
- Tests for full folder name resolution (numeric and base36 prefixes)
|
|
20
|
+
- Tests for case-insensitive folder matching
|
|
21
|
+
- Tests for error cases (non-existent identifiers)
|
|
22
|
+
### Acceptance Criteria Verification
|
|
23
|
+
- ✅ `raf status 3` shows status for project 003 - Uses `resolveProjectIdentifier` which resolves numeric IDs
|
|
24
|
+
- ✅ `raf status 001-fix-stuff` shows status for that project - Uses full folder name resolution
|
|
25
|
+
- ✅ `raf status a00-important` shows status for that project - Uses base36 full folder name resolution
|
|
26
|
+
- ✅ Invalid identifiers show helpful error messages - Error message: "Project not found: {identifier}"
|
|
27
|
+
- ✅ `raf status` (no argument) continues to list all projects - Logic unchanged for no-argument case
|
|
28
|
+
- ✅ Tests cover the new identifier support - 24 new tests added
|
|
29
|
+
- ✅ `--json` output works correctly with all identifier formats - Uses same resolution logic
|
|
30
|
+
### Test Results
|
|
31
|
+
- All 309 tests pass
|
|
32
|
+
- TypeScript build succeeds with no errors
|
|
33
|
+
<promise>COMPLETE</promise>
|
|
34
|
+
|
|
35
|
+
## Details
|
|
36
|
+
- Attempts: 1
|
|
37
|
+
- Elapsed time: 3m 46s
|
|
38
|
+
- Completed at: 2026-01-30T21:26:29.990Z
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 003 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
## Summary
|
|
7
|
+
I have successfully completed Task 003: Update `raf do` for Full Folder Name Support.
|
|
8
|
+
### Changes Made
|
|
9
|
+
**1. `src/commands/do.ts`** - Updated help text and examples:
|
|
10
|
+
- Changed argument description from `'Project name(s) or number(s) to execute'` to `'Project identifier(s): number (3), name (my-project), or folder (001-my-project)'`
|
|
11
|
+
- Added full folder name examples to usage message: `raf do 001-my-project` and `raf do 003 my-project 001-another-project`
|
|
12
|
+
**2. `tests/unit/do-multiproject.test.ts`** - Added 12 new tests:
|
|
13
|
+
- Full folder name resolution (numeric and base36 prefixes)
|
|
14
|
+
- Multiple projects with full folder names
|
|
15
|
+
- Mixed identifier formats
|
|
16
|
+
- Invalid full folder names
|
|
17
|
+
- Duplicate detection
|
|
18
|
+
- Case-insensitive matching
|
|
19
|
+
- Multi-hyphen names
|
|
20
|
+
- 2-digit prefix support
|
|
21
|
+
**3. `tests/unit/do-command.test.ts`** - Created new test file with 20 tests:
|
|
22
|
+
- Single project full folder name resolution
|
|
23
|
+
- Multiple projects with full folder names
|
|
24
|
+
- Mixed formats including all identifier types
|
|
25
|
+
- Error cases for non-matching folder names
|
|
26
|
+
- Backward compatibility tests
|
|
27
|
+
- Project name extraction tests
|
|
28
|
+
### Acceptance Criteria Verification
|
|
29
|
+
- ✅ `raf do 001-fix-stuff` executes the correct project - Uses `resolveProjectIdentifier()` which supports full folder names
|
|
30
|
+
- ✅ `raf do a00-project` executes the correct project - Supports base36 prefixes
|
|
31
|
+
- ✅ `raf do 001-a 002-b` executes multiple projects correctly - Multi-project resolution works
|
|
32
|
+
- ✅ Mixed formats work: `raf do 3 001-fix-stuff my-project` - All identifier formats work together
|
|
33
|
+
- ✅ Error messages are helpful for non-matching full folder names - Returns null (shown as "Project not found")
|
|
34
|
+
- ✅ All existing tests continue to pass - 341 tests pass
|
|
35
|
+
- ✅ New tests cover full folder name scenarios - 32 new tests added
|
|
36
|
+
### Test Results
|
|
37
|
+
- All 341 tests pass
|
|
38
|
+
- TypeScript build succeeds with no errors
|
|
39
|
+
<promise>COMPLETE</promise>
|
|
40
|
+
|
|
41
|
+
## Details
|
|
42
|
+
- Attempts: 1
|
|
43
|
+
- Elapsed time: 2m 26s
|
|
44
|
+
- Completed at: 2026-01-30T21:28:56.399Z
|