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,28 @@
|
|
|
1
|
+
# Project Decisions
|
|
2
|
+
|
|
3
|
+
## For the double Summary header fix: Should RAF strip the '## Summary' header from Claude's output in extractSummary(), OR should RAF stop adding its own '## Summary' header in the outcome template?
|
|
4
|
+
Remove from RAF template - Remove the '## Summary' header from RAF's outcome template in do.ts, letting Claude's header stand.
|
|
5
|
+
|
|
6
|
+
## For the README documentation: Which sections do you want to add for npm publishing readiness?
|
|
7
|
+
Essential only - Add: badges, better examples, GitHub repo link - minimal additions.
|
|
8
|
+
|
|
9
|
+
## For npm publishing instructions: Where should the publishing documentation live?
|
|
10
|
+
Don't add a publishing section to README. Instead, make sure README is up to date with the codebase, how to install, API usage, etc. The goal is that a person knows how to use the software.
|
|
11
|
+
|
|
12
|
+
## What is your npm username/org for the package name?
|
|
13
|
+
Keep as 'raf' - attempt to publish with the current name.
|
|
14
|
+
|
|
15
|
+
## For the 'publish to npm instructions' task: What format should this take?
|
|
16
|
+
Just produce a report on how to publish to npm, no code changes needed. This is documentation only.
|
|
17
|
+
|
|
18
|
+
## What is your GitHub repository URL for this project?
|
|
19
|
+
https://github.com/john-veresk/raf
|
|
20
|
+
|
|
21
|
+
## [Amendment] For project name matching, should it be an exact match or support partial/fuzzy matching?
|
|
22
|
+
Exact match only - Project name must match exactly (case-insensitive).
|
|
23
|
+
|
|
24
|
+
## [Amendment] If a project name exists in multiple project folders, how should the command handle this ambiguity?
|
|
25
|
+
Show error with options - Display error listing all matching projects, require user to specify ID.
|
|
26
|
+
|
|
27
|
+
## [Amendment] Should project name matching be case-sensitive?
|
|
28
|
+
Case-insensitive - 'Fix-Double' matches 'fix-double-summary-headers'.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 001 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
All tasks are complete. Let me summarize what was done:
|
|
7
|
+
## Summary
|
|
8
|
+
I successfully completed the task to fix duplicate Summary headers in outcome files.
|
|
9
|
+
### Changes Made:
|
|
10
|
+
1. **Modified `src/commands/do.ts`** (line 373):
|
|
11
|
+
- Removed the `## Summary` line from the outcome content template
|
|
12
|
+
- The summary content from Claude (extracted via `extractSummary()`) is now placed directly after the task header
|
|
13
|
+
- This prevents duplicate `## Summary` headers when Claude's output already contains one
|
|
14
|
+
2. **Created `tests/unit/outcome-content.test.ts`**:
|
|
15
|
+
- Added a new test file with 5 test cases to verify the outcome content format
|
|
16
|
+
- Tests verify that no duplicate Summary headers appear when Claude's output contains a Summary section
|
|
17
|
+
- Tests verify the outcome structure and metadata
|
|
18
|
+
### Acceptance Criteria Met:
|
|
19
|
+
- ✅ The `## Summary` line is removed from the outcome template in do.ts
|
|
20
|
+
- ✅ Outcome files now contain only one `## Summary` header (from Claude's output)
|
|
21
|
+
- ✅ All existing tests continue to pass (401 tests)
|
|
22
|
+
- ✅ New test verifies no duplicate Summary headers
|
|
23
|
+
- ✅ Build succeeds without errors
|
|
24
|
+
<promise>COMPLETE</promise>
|
|
25
|
+
|
|
26
|
+
## Details
|
|
27
|
+
- Attempts: 1
|
|
28
|
+
- Elapsed time: 1m 51s
|
|
29
|
+
- Completed at: 2026-01-31T09:07:58.756Z
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 002 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
All acceptance criteria have been met:
|
|
7
|
+
- ✅ README has npm, license, and Node.js badges at the top
|
|
8
|
+
- ✅ GitHub repository link is present (https://github.com/john-veresk/raf)
|
|
9
|
+
- ✅ Installation instructions are accurate for npm install
|
|
10
|
+
- ✅ Usage examples for plan, do, and status commands are clear and accurate (including multi-project support, amend flag, and all command options verified against source code)
|
|
11
|
+
- ✅ All documented features match current codebase
|
|
12
|
+
- ✅ package.json has repository field populated
|
|
13
|
+
- ✅ Build succeeds
|
|
14
|
+
## Summary
|
|
15
|
+
Updated the README.md and package.json for npm publishing:
|
|
16
|
+
1. **README.md changes:**
|
|
17
|
+
- Added npm version, MIT license, and Node.js version badges at the top
|
|
18
|
+
- Added prominent GitHub repository link
|
|
19
|
+
- Added "Multi-Project Execution" to features list
|
|
20
|
+
- Updated `plan` command documentation with `--amend` option
|
|
21
|
+
- Enhanced `do` command documentation with multi-project syntax examples and all options
|
|
22
|
+
- Expanded `status` command with JSON output option and project status badges
|
|
23
|
+
- Added project status badge explanations (planning, ready, executing, completed, failed)
|
|
24
|
+
2. **package.json changes:**
|
|
25
|
+
- Added repository field with GitHub URL
|
|
26
|
+
<promise>COMPLETE</promise>
|
|
27
|
+
|
|
28
|
+
## Details
|
|
29
|
+
- Attempts: 1
|
|
30
|
+
- Elapsed time: 1m 43s
|
|
31
|
+
- Completed at: 2026-01-31T09:09:42.739Z
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 003 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
The task has been completed successfully.
|
|
7
|
+
## Summary
|
|
8
|
+
Created a comprehensive npm publish instructions report covering:
|
|
9
|
+
- Prerequisites (npm account setup and authentication)
|
|
10
|
+
- Pre-publish checklist (tests, lint, build, package configuration)
|
|
11
|
+
- Version management (npm version patch/minor/major)
|
|
12
|
+
- Publishing commands with various options
|
|
13
|
+
- Post-publish verification steps
|
|
14
|
+
- RAF-specific considerations (prepublishOnly hook, bin configuration, engines, native dependencies)
|
|
15
|
+
- Common issues and troubleshooting guide
|
|
16
|
+
- Quick reference commands
|
|
17
|
+
All acceptance criteria have been met:
|
|
18
|
+
- ✅ npm account setup and authentication covered
|
|
19
|
+
- ✅ Pre-publish checklist included
|
|
20
|
+
- ✅ Version bumping documented
|
|
21
|
+
- ✅ Publish command and flags shown
|
|
22
|
+
- ✅ Post-publish verification steps included
|
|
23
|
+
- ✅ RAF-specific considerations noted
|
|
24
|
+
- ✅ No code changes made - documentation only
|
|
25
|
+
<promise>COMPLETE</promise>
|
|
26
|
+
|
|
27
|
+
## Details
|
|
28
|
+
- Attempts: 1
|
|
29
|
+
- Elapsed time: 1m 4s
|
|
30
|
+
- Completed at: 2026-01-31T09:10:47.317Z
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 004 - Completed
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
## Summary
|
|
7
|
+
I successfully completed the task to enable flexible project lookup for `raf do` and `raf plan` commands.
|
|
8
|
+
### Changes Made:
|
|
9
|
+
1. **Modified `src/utils/paths.ts`**:
|
|
10
|
+
- Added new `ProjectResolutionResult` interface for detailed resolution results
|
|
11
|
+
- Created `parseProjectFolder` helper function to parse project folder names
|
|
12
|
+
- Added `resolveProjectIdentifierWithDetails` function that:
|
|
13
|
+
- Supports all identifier formats (ID only, name only, ID-name combined)
|
|
14
|
+
- Implements case-insensitive name matching
|
|
15
|
+
- Detects ambiguous names and returns all matching projects
|
|
16
|
+
- Updated `resolveProjectIdentifier` to use the new detailed function
|
|
17
|
+
- Fixed bug where names that looked like base36 prefixes (e.g., "fix-double-summary-headers") weren't properly falling through to name-based matching
|
|
18
|
+
2. **Modified `src/commands/do.ts`**:
|
|
19
|
+
- Updated to use `resolveProjectIdentifierWithDetails`
|
|
20
|
+
- Added error handling for ambiguous project names with helpful message listing all matches
|
|
21
|
+
3. **Modified `src/commands/plan.ts`**:
|
|
22
|
+
- Updated `runAmendCommand` to use `resolveProjectIdentifierWithDetails`
|
|
23
|
+
- Added error handling for ambiguous project names
|
|
24
|
+
4. **Added tests in `tests/unit/paths.test.ts`**:
|
|
25
|
+
- Tests for case-insensitive name matching
|
|
26
|
+
- Tests for `resolveProjectIdentifierWithDetails` function including:
|
|
27
|
+
- Unique name match
|
|
28
|
+
- Ambiguous name detection
|
|
29
|
+
- Not found error
|
|
30
|
+
- Resolution by number even with duplicate names
|
|
31
|
+
- Resolution by full folder name even with duplicate names
|
|
32
|
+
- Proper sorting of matches by project number
|
|
33
|
+
### Acceptance Criteria Met:
|
|
34
|
+
- ✅ `raf do 006` works (existing behavior preserved)
|
|
35
|
+
- ✅ `raf do fix-double-summary-headers` finds project 006-fix-double-summary-headers
|
|
36
|
+
- ✅ `raf do 006-fix-double-summary-headers` works
|
|
37
|
+
- ✅ `raf plan my-project` finds project by name
|
|
38
|
+
- ✅ Case-insensitive matching works (e.g., `raf do Fix-Double-Summary-Headers`)
|
|
39
|
+
- ✅ Ambiguous names show clear error with all matching project IDs
|
|
40
|
+
- ✅ All existing tests pass (411 tests)
|
|
41
|
+
- ✅ New unit tests cover all lookup scenarios
|
|
42
|
+
<promise>COMPLETE</promise>
|
|
43
|
+
|
|
44
|
+
## Details
|
|
45
|
+
- Attempts: 1
|
|
46
|
+
- Elapsed time: 3m 43s
|
|
47
|
+
- Completed at: 2026-01-31T09:14:31.099Z
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Task: Fix Double Summary Headers in Outcomes
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Remove the duplicate "## Summary" header that appears in outcome files by eliminating RAF's programmatic header.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
When RAF generates outcome files, it adds its own `## Summary` header in the template (do.ts:373). However, Claude's output often already contains a `## Summary` header from its response. This results in duplicate headers like:
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
## Summary
|
|
11
|
+
All tests pass and build succeeds.
|
|
12
|
+
## Summary
|
|
13
|
+
Task 003 has been completed successfully...
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The user decided to remove RAF's template header and let Claude's header stand.
|
|
17
|
+
|
|
18
|
+
## Requirements
|
|
19
|
+
- Remove the `## Summary` line from the outcome template in `src/commands/do.ts`
|
|
20
|
+
- Ensure the extracted summary content from Claude is still properly included
|
|
21
|
+
- Maintain the overall outcome file structure (Status, Task header, Details section)
|
|
22
|
+
- Write tests to verify the fix
|
|
23
|
+
|
|
24
|
+
## Implementation Steps
|
|
25
|
+
1. Read `src/commands/do.ts` and locate the outcome template (around line 366-380)
|
|
26
|
+
2. Remove the `## Summary` line from the `outcomeContent` template string
|
|
27
|
+
3. Update any related tests in the test files
|
|
28
|
+
4. Add a new test case to verify outcomes don't have duplicate Summary headers
|
|
29
|
+
5. Run the test suite to confirm all tests pass
|
|
30
|
+
6. Build the project to verify compilation succeeds
|
|
31
|
+
|
|
32
|
+
## Acceptance Criteria
|
|
33
|
+
- [ ] The `## Summary` line is removed from the outcome template in do.ts
|
|
34
|
+
- [ ] Outcome files now contain only one `## Summary` header (from Claude's output)
|
|
35
|
+
- [ ] All existing tests continue to pass
|
|
36
|
+
- [ ] New test verifies no duplicate Summary headers
|
|
37
|
+
- [ ] Build succeeds without errors
|
|
38
|
+
|
|
39
|
+
## Notes
|
|
40
|
+
- The `extractSummary()` function in `output-parser.ts` should remain unchanged
|
|
41
|
+
- Claude's responses typically include their own `## Summary` header, so removing RAF's is the cleaner solution
|
|
42
|
+
- Check existing outcome files in `RAF/*/outcomes/` for examples of the current duplicate header issue
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Task: Update README for npm Publishing
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Enhance the README.md with essential documentation so users know how to install and use RAF.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
The README needs to be updated to be fully documented for npm publishing. The current README has basic sections but needs badges, better examples, and a GitHub repository link. The goal is that a person reading the README knows how to use the software.
|
|
8
|
+
|
|
9
|
+
GitHub repository: https://github.com/john-veresk/raf
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
- Add npm and license badges at the top
|
|
13
|
+
- Add GitHub repository link
|
|
14
|
+
- Ensure installation instructions are accurate
|
|
15
|
+
- Provide clearer usage examples for all three commands (plan, do, status)
|
|
16
|
+
- Make sure the documentation matches the current codebase functionality
|
|
17
|
+
- Keep it minimal - essential sections only
|
|
18
|
+
|
|
19
|
+
## Implementation Steps
|
|
20
|
+
1. Read the current README.md to understand existing structure
|
|
21
|
+
2. Add badges at the top:
|
|
22
|
+
- npm version badge
|
|
23
|
+
- License badge (MIT)
|
|
24
|
+
- Node.js version badge
|
|
25
|
+
3. Review the current commands in `src/commands/` to ensure documentation accuracy
|
|
26
|
+
4. Update usage examples to be more descriptive and practical
|
|
27
|
+
5. Add GitHub repository link to appropriate sections
|
|
28
|
+
6. Update package.json with repository field: `"repository": { "type": "git", "url": "https://github.com/john-veresk/raf.git" }`
|
|
29
|
+
7. Verify all documented features match current implementation
|
|
30
|
+
|
|
31
|
+
## Acceptance Criteria
|
|
32
|
+
- [ ] README has npm, license, and Node.js badges at the top
|
|
33
|
+
- [ ] GitHub repository link is present
|
|
34
|
+
- [ ] Installation instructions are accurate for npm install
|
|
35
|
+
- [ ] Usage examples for plan, do, and status commands are clear and accurate
|
|
36
|
+
- [ ] All documented features match current codebase
|
|
37
|
+
- [ ] package.json has repository field populated
|
|
38
|
+
- [ ] Build succeeds
|
|
39
|
+
|
|
40
|
+
## Notes
|
|
41
|
+
- Reference `src/commands/*.ts` for accurate command documentation
|
|
42
|
+
- Check `package.json` for current version and other metadata
|
|
43
|
+
- Keep the README concise - this is essential documentation only
|
|
44
|
+
- The user specifically requested NOT to add a publishing section
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Task: Create npm Publish Instructions Report
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Produce a report documenting how to publish the RAF package to npm registry.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
The user wants documentation on how to publish RAF to npm. This is a report/documentation task only - no code changes are required. The package name will remain as 'raf'.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Create a comprehensive report on npm publishing process
|
|
11
|
+
- Include prerequisites (npm account, authentication)
|
|
12
|
+
- Document version bumping procedures
|
|
13
|
+
- Include the actual publish commands
|
|
14
|
+
- Note any pre-publish checks that should be done
|
|
15
|
+
- This is documentation only - no code changes
|
|
16
|
+
|
|
17
|
+
## Implementation Steps
|
|
18
|
+
1. Review current package.json configuration for publishing readiness
|
|
19
|
+
2. Check if there are any missing npm publishing fields
|
|
20
|
+
3. Create a report (in the outcomes folder or as specified) covering:
|
|
21
|
+
- Prerequisites (npm account setup, npm login)
|
|
22
|
+
- Pre-publish checklist (tests pass, build succeeds, version bumped)
|
|
23
|
+
- Version management (npm version patch/minor/major)
|
|
24
|
+
- Publish command (npm publish)
|
|
25
|
+
- Post-publish verification (npm info raf)
|
|
26
|
+
- Common issues and troubleshooting
|
|
27
|
+
4. Include specific commands for RAF's setup (prepublishOnly script, etc.)
|
|
28
|
+
|
|
29
|
+
## Acceptance Criteria
|
|
30
|
+
- [ ] Report covers npm account setup and authentication
|
|
31
|
+
- [ ] Report includes pre-publish checklist
|
|
32
|
+
- [ ] Report documents version bumping (npm version commands)
|
|
33
|
+
- [ ] Report shows the publish command and flags if needed
|
|
34
|
+
- [ ] Report includes post-publish verification steps
|
|
35
|
+
- [ ] Report notes RAF-specific considerations (prepublishOnly hook, etc.)
|
|
36
|
+
- [ ] No code changes made - this is documentation only
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
- Current package.json already has:
|
|
40
|
+
- `prepublishOnly: "npm run build"` hook
|
|
41
|
+
- `bin` entry for CLI
|
|
42
|
+
- `engines` field for Node.js version
|
|
43
|
+
- `keywords` for npm search
|
|
44
|
+
- May need to note that 'raf' package name could be taken - user should verify availability
|
|
45
|
+
- This report should be placed in the outcomes folder as the task deliverable
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Task: Flexible Project Lookup
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Enable `raf do` and `raf plan` commands to accept project identifiers in multiple formats: ID only, name only, or ID-name combined.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Currently, running `raf do fix-double-summary-headers` fails with "Project not found" because the command only accepts project IDs (e.g., "006"). Users should be able to reference projects by their name for convenience.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Accept three input formats:
|
|
11
|
+
1. ID only: `raf do 006`
|
|
12
|
+
2. Name only: `raf do fix-double-summary-headers`
|
|
13
|
+
3. ID-name: `raf do 006-fix-double-summary-headers`
|
|
14
|
+
- Project name matching must be exact (no partial/fuzzy matching)
|
|
15
|
+
- Matching is case-insensitive ('Fix-Double' matches 'fix-double-summary-headers')
|
|
16
|
+
- If multiple projects have the same name, show an error listing all matching projects and require the user to specify the ID
|
|
17
|
+
|
|
18
|
+
## Implementation Steps
|
|
19
|
+
1. Locate the project lookup logic (likely in `src/commands/do.ts` and `src/commands/plan.ts` or a shared utility)
|
|
20
|
+
2. Create a utility function `findProject(identifier: string)` that:
|
|
21
|
+
- First, try to parse as ID (numeric prefix like "006")
|
|
22
|
+
- If ID-name format, extract and validate both parts
|
|
23
|
+
- If name only, search all projects for exact name match (case-insensitive)
|
|
24
|
+
3. Handle ambiguity: if multiple projects match by name, throw an error with a helpful message listing all matches
|
|
25
|
+
4. Update both `raf do` and `raf plan` commands to use this shared lookup function
|
|
26
|
+
5. Add unit tests for all input formats and edge cases
|
|
27
|
+
|
|
28
|
+
## Acceptance Criteria
|
|
29
|
+
- [ ] `raf do 006` works (existing behavior preserved)
|
|
30
|
+
- [ ] `raf do fix-double-summary-headers` finds project 006-fix-double-summary-headers
|
|
31
|
+
- [ ] `raf do 006-fix-double-summary-headers` works
|
|
32
|
+
- [ ] `raf plan my-project` finds project by name
|
|
33
|
+
- [ ] Case-insensitive matching works (e.g., `raf do Fix-Double-Summary-Headers`)
|
|
34
|
+
- [ ] Ambiguous names show clear error with all matching project IDs
|
|
35
|
+
- [ ] All existing tests pass
|
|
36
|
+
- [ ] New unit tests cover all lookup scenarios
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
- The lookup function should be in a shared utility to avoid code duplication between commands
|
|
40
|
+
- Error messages should be user-friendly and suggest how to resolve ambiguity
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Project Decisions
|
|
2
|
+
|
|
3
|
+
## Why was the outcome file being overwritten with a harsh summary?
|
|
4
|
+
|
|
5
|
+
Claude wrote a comprehensive report during task execution, but RAF's `do.ts` always overwrote the outcome file with `extractSummary()` output after Claude finished. The flow was:
|
|
6
|
+
1. Claude wrote comprehensive report to outcome file
|
|
7
|
+
2. Claude committed
|
|
8
|
+
3. RAF overwrote outcome with summarized content
|
|
9
|
+
4. RAF committed (RAF[XXX:outcome])
|
|
10
|
+
|
|
11
|
+
## Should we preserve Claude's existing outcome file or use terminal output?
|
|
12
|
+
|
|
13
|
+
Use terminal output - but change approach to have Claude write the outcome file as part of task execution.
|
|
14
|
+
|
|
15
|
+
## Should Claude write the status tag, or should RAF add it?
|
|
16
|
+
|
|
17
|
+
Use `<promise>COMPLETE</promise>` marker that Claude already outputs. No need for separate `<status>` tag. State derivation should look for `<promise>` markers in outcome files.
|
|
18
|
+
|
|
19
|
+
## What should RAF do if Claude forgets to write outcome or writes incorrectly?
|
|
20
|
+
|
|
21
|
+
Create minimal outcome with status, timestamp, and "No report provided".
|
|
22
|
+
|
|
23
|
+
## How should failure outcomes be handled?
|
|
24
|
+
|
|
25
|
+
- RAF creates failure outcomes (not Claude)
|
|
26
|
+
- RAF spins up Sonnet to analyze task execution output
|
|
27
|
+
- For API errors, limit errors, etc. - generate outcome programmatically
|
|
28
|
+
- Sonnet provides structured report: Failure Reason, Analysis, Suggested Fix, Relevant Output
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
- [ ] output seems edited two times. what is the reason? i would put full outcome from claude there without harsh summary. for example in commit 156af076c1dd866d043c3f504b00f31317b242c7 usefull report was from claude was cut with "task sucessfully commited message"
|
|
2
|
+
- [ ] change success marker from ## Status: SUCCESS to something that not interfiers with markdown heading. we already have <promise> markers for output completion. use simular pattern in the end of the file. like `<status>SUCCESS</status>`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 002 - Completed
|
|
4
|
+
|
|
5
|
+
Let me verify the acceptance criteria one more time:
|
|
6
|
+
1. ✅ `parseOutcomeStatus()` correctly parses `<promise>COMPLETE</promise>` as completed
|
|
7
|
+
2. ✅ `parseOutcomeStatus()` correctly parses `<promise>FAILED</promise>` as failed
|
|
8
|
+
3. ✅ Returns null if no marker found
|
|
9
|
+
4. ✅ All state-derivation tests pass (34 tests)
|
|
10
|
+
5. ✅ No regression in project status detection (all 415 tests pass)
|
|
11
|
+
All acceptance criteria have been met. The task has been completed successfully.
|
|
12
|
+
<promise>COMPLETE</promise>
|
|
13
|
+
|
|
14
|
+
## Details
|
|
15
|
+
- Attempts: 1
|
|
16
|
+
- Elapsed time: 2m 59s
|
|
17
|
+
- Completed at: 2026-01-31T10:36:23.107Z
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 003 - Completed
|
|
4
|
+
|
|
5
|
+
All acceptance criteria have been met:
|
|
6
|
+
1. ✅ **Claude's outcome file is preserved (not overwritten)** - When Claude writes an outcome file with valid `<promise>COMPLETE</promise>` marker, the existing content is preserved and only metadata is appended.
|
|
7
|
+
2. ✅ **Missing outcomes get minimal fallback with `<promise>COMPLETE</promise>`** - When no outcome file exists or it lacks a valid marker, a minimal fallback outcome is created with the `<promise>COMPLETE</promise>` marker.
|
|
8
|
+
3. ✅ **Outcome file path passed to execution prompt** - The `outcomeFilePath` is computed and passed to `getExecutionPrompt()` (line 313).
|
|
9
|
+
4. ✅ **Metadata (attempts, elapsed, timestamp) included somewhere** - Metadata is appended to Claude's existing outcomes or included in the fallback outcome.
|
|
10
|
+
5. ✅ **Tests pass** - All 415 tests pass with no regressions.
|
|
11
|
+
<promise>COMPLETE</promise>
|
|
12
|
+
|
|
13
|
+
## Details
|
|
14
|
+
- Attempts: 1
|
|
15
|
+
- Elapsed time: 2m 10s
|
|
16
|
+
- Completed at: 2026-01-31T10:38:34.092Z
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 004 - Completed
|
|
4
|
+
|
|
5
|
+
All acceptance criteria have been met:
|
|
6
|
+
1. ✅ **Sonnet analyzes failures and generates structured report** - The `analyzeFailure()` function uses Claude (haiku model for cost efficiency) to analyze non-programmatic failures via `callClaudeForAnalysis()`.
|
|
7
|
+
2. ✅ **API/limit/timeout errors handled programmatically (no API call)** - The `detectProgrammaticFailure()` function detects these special cases and `generateProgrammaticReport()` creates reports without calling the API.
|
|
8
|
+
3. ✅ **Failure outcome ends with `<promise>FAILED</promise>`** - All reports end with this marker.
|
|
9
|
+
4. ✅ **Report includes all required sections** - Failure Reason, Analysis, Suggested Fix, and Relevant Output.
|
|
10
|
+
5. ✅ **Tests cover both Sonnet analysis and programmatic cases** - 454 tests pass, including the new failure-analyzer tests.
|
|
11
|
+
<promise>COMPLETE</promise>
|
|
12
|
+
|
|
13
|
+
## Details
|
|
14
|
+
- Attempts: 1
|
|
15
|
+
- Elapsed time: 4m 1s
|
|
16
|
+
- Completed at: 2026-01-31T10:42:35.359Z
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## Status: SUCCESS
|
|
2
|
+
|
|
3
|
+
# Task 005 - Completed
|
|
4
|
+
|
|
5
|
+
Let me verify all acceptance criteria are met:
|
|
6
|
+
1. ✅ **CLAUDE.md reflects new outcome format** - Updated the "State Derivation Over Persistence" section to use `<promise>COMPLETE</promise>` / `<promise>FAILED</promise>` markers
|
|
7
|
+
2. ✅ **Status marker documentation updated** - Changed from `## Status: SUCCESS/FAILED` to the new `<promise>` format
|
|
8
|
+
3. ✅ **Failure analysis documented** - Added new "Failure Analysis" section covering Haiku analysis, programmatic failures, and report structure
|
|
9
|
+
4. ✅ **No stale references to old format** - CLAUDE.md is the main documentation file and it's been updated. The old outcomes and plan files are historical records, not active documentation.
|
|
10
|
+
<promise>COMPLETE</promise>
|
|
11
|
+
|
|
12
|
+
## Details
|
|
13
|
+
- Attempts: 1
|
|
14
|
+
- Elapsed time: 2m 10s
|
|
15
|
+
- Completed at: 2026-01-31T10:44:45.421Z
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Task: Update Execution Prompt for Outcome File Writing
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Modify the execution prompt to instruct Claude to write the outcome file with its report and `<promise>COMPLETE</promise>` marker.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Currently, RAF overwrites Claude's outcome file after task execution. The new approach is to have Claude write the outcome file directly as part of task completion, including the `<promise>COMPLETE</promise>` marker at the end.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Update `src/prompts/execution.ts` to include instructions for writing outcome file
|
|
11
|
+
- Claude should write outcome to: `{projectPath}/outcomes/{taskId}-{taskName}.md`
|
|
12
|
+
- Outcome file must end with `<promise>COMPLETE</promise>` marker
|
|
13
|
+
- For documentation/report tasks, the outcome IS the deliverable
|
|
14
|
+
- For code tasks, outcome should summarize what was changed
|
|
15
|
+
|
|
16
|
+
## Implementation Steps
|
|
17
|
+
1. Read current `src/prompts/execution.ts`
|
|
18
|
+
2. Add outcome file path to `ExecutionPromptParams` interface
|
|
19
|
+
3. Add instructions section for outcome file writing:
|
|
20
|
+
- Location: `outcomes/{taskId}-{taskName}.md`
|
|
21
|
+
- Content: Summary of work done, key changes, any notes
|
|
22
|
+
- Must end with `<promise>COMPLETE</promise>` marker
|
|
23
|
+
4. Move the completion marker instruction to be part of outcome file writing
|
|
24
|
+
5. Update tests in `tests/unit/execution-prompt.test.ts`
|
|
25
|
+
|
|
26
|
+
## Acceptance Criteria
|
|
27
|
+
- [ ] Execution prompt includes outcome file writing instructions
|
|
28
|
+
- [ ] Outcome file path is passed to prompt
|
|
29
|
+
- [ ] Instructions specify the `<promise>COMPLETE</promise>` marker must be at end of file
|
|
30
|
+
- [ ] Tests updated and passing
|
|
31
|
+
- [ ] Prompt clearly distinguishes between code commits and outcome file
|
|
32
|
+
|
|
33
|
+
## Notes
|
|
34
|
+
- The outcome file is where Claude documents what was accomplished
|
|
35
|
+
- For report-only tasks (like npm-publish-instructions), the outcome IS the main deliverable
|
|
36
|
+
- Claude should still commit code changes separately before writing outcome
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Task: Update State Derivation to Use Promise Markers
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Change state derivation to look for `<promise>COMPLETE</promise>` and `<promise>FAILED</promise>` markers instead of `## Status: SUCCESS/FAILED`.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Currently, `src/core/state-derivation.ts` uses `## Status: SUCCESS` markdown heading to determine task status. This interferes with markdown rendering. The new approach uses `<promise>` markers which are already used for output parsing.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Update `parseOutcomeStatus()` in `src/core/state-derivation.ts`
|
|
11
|
+
- Look for `<promise>COMPLETE</promise>` → status: completed
|
|
12
|
+
- Look for `<promise>FAILED</promise>` → status: failed
|
|
13
|
+
- Marker should be at the end of the file (last occurrence wins)
|
|
14
|
+
- Update all related tests
|
|
15
|
+
|
|
16
|
+
## Implementation Steps
|
|
17
|
+
1. Read `src/core/state-derivation.ts`
|
|
18
|
+
2. Modify `parseOutcomeStatus()` function:
|
|
19
|
+
- Change regex from `/^## Status: (SUCCESS|FAILED)/m` to `/<promise>(COMPLETE|FAILED)<\/promise>/`
|
|
20
|
+
- Map COMPLETE → 'completed', FAILED → 'failed'
|
|
21
|
+
- Use last occurrence if multiple markers exist
|
|
22
|
+
3. Update tests in `tests/unit/state-derivation.test.ts`
|
|
23
|
+
4. Update test fixtures if they use old format
|
|
24
|
+
|
|
25
|
+
## Acceptance Criteria
|
|
26
|
+
- [ ] `parseOutcomeStatus()` correctly parses `<promise>COMPLETE</promise>` as completed
|
|
27
|
+
- [ ] `parseOutcomeStatus()` correctly parses `<promise>FAILED</promise>` as failed
|
|
28
|
+
- [ ] Returns null if no marker found
|
|
29
|
+
- [ ] All state-derivation tests pass
|
|
30
|
+
- [ ] No regression in project status detection
|
|
31
|
+
|
|
32
|
+
## Notes
|
|
33
|
+
- This is backwards-incompatible with old outcome files
|
|
34
|
+
- Existing projects with old format will show as "pending" (acceptable for now)
|
|
35
|
+
- The marker format matches what Claude outputs for completion signaling
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Task: Update Do Command Outcome Handling
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Modify `do.ts` to use Claude's outcome file instead of overwriting it, with fallback for missing outcomes.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Currently, `do.ts` always creates outcome files using `extractSummary()` which produces harsh summaries. Claude now writes outcome files directly. RAF should only create outcomes when Claude doesn't.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Check if outcome file exists after task completion
|
|
11
|
+
- If exists and has valid `<promise>COMPLETE</promise>` marker, keep it
|
|
12
|
+
- If missing or invalid, create minimal fallback outcome
|
|
13
|
+
- Remove `extractSummary()` usage for success cases
|
|
14
|
+
- Keep metadata (attempts, elapsed time) - append to existing or include in fallback
|
|
15
|
+
- Pass outcome file path to execution prompt
|
|
16
|
+
|
|
17
|
+
## Implementation Steps
|
|
18
|
+
1. Read `src/commands/do.ts`
|
|
19
|
+
2. Update success handling (around line 377):
|
|
20
|
+
- After task completes, check if outcome file exists
|
|
21
|
+
- If exists with valid marker, optionally append metadata
|
|
22
|
+
- If missing, create minimal outcome: "Task completed. No detailed report provided.\n\n<promise>COMPLETE</promise>"
|
|
23
|
+
3. Calculate outcome file path and pass to `getExecutionPrompt()`
|
|
24
|
+
4. Remove or deprecate `extractSummary()` call
|
|
25
|
+
5. Update tests in `tests/unit/do-rerun.test.ts` if needed
|
|
26
|
+
|
|
27
|
+
## Acceptance Criteria
|
|
28
|
+
- [ ] Claude's outcome file is preserved (not overwritten)
|
|
29
|
+
- [ ] Missing outcomes get minimal fallback with `<promise>COMPLETE</promise>`
|
|
30
|
+
- [ ] Outcome file path passed to execution prompt
|
|
31
|
+
- [ ] Metadata (attempts, elapsed, timestamp) included somewhere
|
|
32
|
+
- [ ] Tests pass
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
- The `extractSummary()` function can be removed or deprecated in separate task
|
|
36
|
+
- Metadata could go in a comment block or separate section
|
|
37
|
+
- This task depends on Task 001 (execution prompt changes)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Task: Implement Failure Analysis with Sonnet
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
When a task fails, use Sonnet to analyze the execution output and generate a structured failure report.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
For failed tasks, RAF should create the outcome file (not Claude, since Claude may not have completed). The failure outcome should contain a structured analysis of what went wrong, generated by Sonnet analyzing the task output.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- On task failure, call Sonnet to analyze execution output
|
|
11
|
+
- Generate structured report with sections:
|
|
12
|
+
- `## Failure Reason` - Brief description
|
|
13
|
+
- `## Analysis` - What went wrong and why
|
|
14
|
+
- `## Suggested Fix` - How to resolve the issue
|
|
15
|
+
- `## Relevant Output` - Key parts of the output
|
|
16
|
+
- End with `<promise>FAILED</promise>` marker
|
|
17
|
+
- Handle special cases programmatically (no Sonnet call needed):
|
|
18
|
+
- API errors
|
|
19
|
+
- Rate limit errors
|
|
20
|
+
- Timeout errors
|
|
21
|
+
- Context overflow
|
|
22
|
+
|
|
23
|
+
## Implementation Steps
|
|
24
|
+
1. Create new module `src/core/failure-analyzer.ts`:
|
|
25
|
+
- `analyzeFailure(output: string, failureReason: string): Promise<string>`
|
|
26
|
+
- Uses Sonnet model via ClaudeRunner or direct API call
|
|
27
|
+
- Returns formatted failure report
|
|
28
|
+
2. Add helper to detect special error cases
|
|
29
|
+
3. Create templates for programmatic failure outcomes
|
|
30
|
+
4. Update `do.ts` failure handling to use analyzer
|
|
31
|
+
5. Add tests for failure analysis
|
|
32
|
+
|
|
33
|
+
## Acceptance Criteria
|
|
34
|
+
- [ ] Sonnet analyzes failures and generates structured report
|
|
35
|
+
- [ ] API/limit/timeout errors handled programmatically (no API call)
|
|
36
|
+
- [ ] Failure outcome ends with `<promise>FAILED</promise>`
|
|
37
|
+
- [ ] Report includes all required sections
|
|
38
|
+
- [ ] Tests cover both Sonnet analysis and programmatic cases
|
|
39
|
+
|
|
40
|
+
## Notes
|
|
41
|
+
- Use haiku or fast model variant for cost efficiency if available
|
|
42
|
+
- Keep analysis prompt concise to minimize tokens
|
|
43
|
+
- Timeout the analysis call to avoid hanging on API issues
|
|
44
|
+
- This task depends on Task 002 (state derivation) and Task 003 (do.ts changes)
|