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,56 @@
|
|
|
1
|
+
# Outcome: Define Dependency Syntax in Plan Files
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Established the syntax and location for specifying task dependencies in plan markdown files. This is the foundational task for the dependencies watchdog feature.
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### 1. Updated Planning Prompt (`src/prompts/planning.ts`)
|
|
10
|
+
- Added `## Dependencies` section to the plan file template structure
|
|
11
|
+
- Section is optional and should be omitted if task has no dependencies
|
|
12
|
+
- Format: comma-separated task IDs (e.g., "001, 002")
|
|
13
|
+
- Includes clear instruction that dependent tasks are blocked if a dependency fails
|
|
14
|
+
- Updated Important Rules to include dependency specification guidelines
|
|
15
|
+
|
|
16
|
+
### 2. Updated Amend Prompt (`src/prompts/amend.ts`)
|
|
17
|
+
- Added `## Dependencies` section to the plan file template structure
|
|
18
|
+
- Added instruction to check existing plan files for dependencies when analyzing new requirements
|
|
19
|
+
- Updated Important Rules to include dependency specification guidelines
|
|
20
|
+
|
|
21
|
+
### 3. Updated CLAUDE.md Documentation
|
|
22
|
+
- Added new "Plan File Structure" subsection under "RAF Project Structure"
|
|
23
|
+
- Documents the complete plan file format including the optional Dependencies section
|
|
24
|
+
- Explains the format and behavior of dependencies (task IDs, blocking on failure)
|
|
25
|
+
|
|
26
|
+
## Dependency Syntax Specification
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
## Dependencies
|
|
30
|
+
001, 002
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- **Location**: After `## Context`, before `## Requirements`
|
|
34
|
+
- **Format**: Comma-separated list of task IDs (e.g., "001, 002")
|
|
35
|
+
- **Optional**: Omit entirely if task has no dependencies
|
|
36
|
+
- **Behavior**: If a dependency fails, dependent tasks are automatically blocked
|
|
37
|
+
|
|
38
|
+
## Files Modified
|
|
39
|
+
|
|
40
|
+
- `src/prompts/planning.ts` - Planning prompt template
|
|
41
|
+
- `src/prompts/amend.ts` - Amendment prompt template
|
|
42
|
+
- `CLAUDE.md` - Project documentation
|
|
43
|
+
|
|
44
|
+
## Notes
|
|
45
|
+
|
|
46
|
+
- This task only defines the syntax; parsing is handled in task 003
|
|
47
|
+
- All tests pass (638/638)
|
|
48
|
+
- TypeScript build succeeds with no errors
|
|
49
|
+
|
|
50
|
+
<promise>COMPLETE</promise>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## Details
|
|
54
|
+
- Attempts: 1
|
|
55
|
+
- Elapsed time: 2m 15s
|
|
56
|
+
- Completed at: 2026-01-31T16:35:37.298Z
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Outcome: Update Planning Prompts for Dependency Inference
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Updated the planning system prompt to instruct Claude to automatically infer and record task dependencies during project planning. The prompt now includes comprehensive guidance on task ordering, dependency identification, and circular dependency prevention.
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### 1. Updated Planning Prompt (`src/prompts/planning.ts`)
|
|
10
|
+
|
|
11
|
+
**Step 1 Enhancement - Task Ordering:**
|
|
12
|
+
- Renamed "Identify Tasks" to "Identify and Order Tasks"
|
|
13
|
+
- Added CRITICAL section emphasizing logical execution order
|
|
14
|
+
- Provided ordering guidelines: setup → core → integration → testing
|
|
15
|
+
|
|
16
|
+
**New Step 4 - Dependency Inference:**
|
|
17
|
+
- Added dedicated section for inferring task dependencies
|
|
18
|
+
- Explained how to identify dependencies:
|
|
19
|
+
- Task B uses output/artifacts from task A
|
|
20
|
+
- Task B modifies code created by task A
|
|
21
|
+
- Task B tests functionality from task A
|
|
22
|
+
- Task B extends or builds upon task A
|
|
23
|
+
- Provided format examples for single and multiple dependencies
|
|
24
|
+
- Listed rules for proper dependency specification
|
|
25
|
+
|
|
26
|
+
**Updated Important Rules:**
|
|
27
|
+
- Rule 2: Create plans reflecting "logical execution order"
|
|
28
|
+
- Rule 5: "Infer dependencies automatically - analyze task relationships, don't ask the user about dependencies"
|
|
29
|
+
- Rule 6: "Only add Dependencies section when a task genuinely requires another to complete first"
|
|
30
|
+
- Rule 7: "Dependencies must only reference lower-numbered tasks to prevent circular dependencies"
|
|
31
|
+
|
|
32
|
+
### 2. Updated Test (`tests/unit/planning-prompt.test.ts`)
|
|
33
|
+
- Updated test expectation to match new section title "Identify and Order Tasks"
|
|
34
|
+
|
|
35
|
+
## Files Modified
|
|
36
|
+
|
|
37
|
+
- `src/prompts/planning.ts` - Planning prompt with dependency inference instructions
|
|
38
|
+
- `tests/unit/planning-prompt.test.ts` - Updated test for new section title
|
|
39
|
+
|
|
40
|
+
## Acceptance Criteria Verification
|
|
41
|
+
|
|
42
|
+
- [x] Planning prompt includes clear instructions for dependency inference (Step 4)
|
|
43
|
+
- [x] Prompt explains to order tasks by logical execution order (Step 1 with CRITICAL guidance)
|
|
44
|
+
- [x] Prompt includes example of Dependencies section format (both single and multiple dependencies)
|
|
45
|
+
- [x] Prompt warns against circular dependencies (Rule 7 and Step 4 rules)
|
|
46
|
+
- [x] Generated plans include appropriate Dependencies sections (template from task 001 + inference instructions)
|
|
47
|
+
|
|
48
|
+
## Notes
|
|
49
|
+
|
|
50
|
+
- Dependencies are inferred automatically by Claude during planning, not asked about
|
|
51
|
+
- The "only reference lower-numbered tasks" rule structurally prevents circular dependencies
|
|
52
|
+
- All 638 tests pass
|
|
53
|
+
|
|
54
|
+
<promise>COMPLETE</promise>
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## Details
|
|
58
|
+
- Attempts: 1
|
|
59
|
+
- Elapsed time: 1m 58s
|
|
60
|
+
- Completed at: 2026-01-31T16:37:35.541Z
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Outcome: Parse Dependencies and Update State Derivation
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Implemented dependency parsing from plan files and extended the state derivation system to support a new `blocked` status. Tasks are now automatically blocked when any of their dependencies have failed or are blocked (transitive blocking).
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### 1. Updated Types (`src/core/state-derivation.ts`)
|
|
10
|
+
|
|
11
|
+
- **DerivedTaskStatus**: Added `'blocked'` to the union type (`'pending' | 'completed' | 'failed' | 'blocked'`)
|
|
12
|
+
- **DerivedTask interface**: Added `dependencies: string[]` field to track task dependencies
|
|
13
|
+
- **DerivedStats interface**: Added `blocked: number` field for statistics
|
|
14
|
+
|
|
15
|
+
### 2. New Dependency Parser (`parseDependencies()`)
|
|
16
|
+
|
|
17
|
+
Created function to extract dependencies from plan file content:
|
|
18
|
+
- Looks for `## Dependencies` section followed by a line of comma-separated task IDs
|
|
19
|
+
- Validates task IDs (must be 2-3 digit numbers)
|
|
20
|
+
- Returns empty array if no Dependencies section exists
|
|
21
|
+
|
|
22
|
+
### 3. Updated `parseOutcomeStatus()`
|
|
23
|
+
|
|
24
|
+
- Extended regex to recognize `<promise>BLOCKED</promise>` marker
|
|
25
|
+
- Uses switch statement for cleaner handling of COMPLETE/FAILED/BLOCKED
|
|
26
|
+
|
|
27
|
+
### 4. Updated `deriveProjectState()`
|
|
28
|
+
|
|
29
|
+
- **First pass**: Reads plan files to extract dependencies along with outcome statuses
|
|
30
|
+
- **Second pass**: Derives blocked status using iterative algorithm for transitive blocking
|
|
31
|
+
- A task is blocked if ANY of its dependencies are failed or blocked
|
|
32
|
+
- Uses `while` loop to handle chains (e.g., A fails → B blocked → C blocked)
|
|
33
|
+
|
|
34
|
+
### 5. Updated `getDerivedStats()`
|
|
35
|
+
|
|
36
|
+
- Added `blocked: 0` initialization
|
|
37
|
+
- Added case for `'blocked'` status in the switch statement
|
|
38
|
+
|
|
39
|
+
### 6. Updated `getNextExecutableTask()`
|
|
40
|
+
|
|
41
|
+
- Updated documentation to clarify that blocked tasks are skipped
|
|
42
|
+
- No code change needed - blocked tasks already excluded since they don't match 'pending' or 'failed'
|
|
43
|
+
|
|
44
|
+
## Files Modified
|
|
45
|
+
|
|
46
|
+
- `src/core/state-derivation.ts` - Main implementation
|
|
47
|
+
- `tests/unit/state-derivation.test.ts` - Added 21 new tests, updated existing tests
|
|
48
|
+
|
|
49
|
+
## New Tests Added
|
|
50
|
+
|
|
51
|
+
- `parseDependencies`: 7 tests (single/multiple dependencies, whitespace handling, invalid IDs, empty sections)
|
|
52
|
+
- `parseOutcomeStatus`: 2 tests for BLOCKED marker
|
|
53
|
+
- `deriveProjectState`: 6 tests for dependency parsing and blocked status derivation
|
|
54
|
+
- `getNextPendingTask`: 1 test for skipping blocked tasks
|
|
55
|
+
- `getNextExecutableTask`: 2 tests for blocked task handling
|
|
56
|
+
- `getDerivedStats`: 1 test for blocked count
|
|
57
|
+
- `isProjectComplete`: 1 test for blocked tasks
|
|
58
|
+
- `hasProjectFailed`: 1 test for blocked vs failed distinction
|
|
59
|
+
|
|
60
|
+
## Acceptance Criteria Verification
|
|
61
|
+
|
|
62
|
+
- [x] DerivedTask includes dependencies array
|
|
63
|
+
- [x] TaskStatus includes 'blocked'
|
|
64
|
+
- [x] Dependencies correctly parsed from plan files
|
|
65
|
+
- [x] Tasks with failed/blocked dependencies have status 'blocked'
|
|
66
|
+
- [x] BLOCKED marker recognized in outcome files
|
|
67
|
+
- [x] getNextExecutableTask() skips blocked tasks
|
|
68
|
+
|
|
69
|
+
## Notes
|
|
70
|
+
|
|
71
|
+
- Blocked status is derived, not persisted - calculated each time state is derived
|
|
72
|
+
- Transitive blocking is handled through iterative algorithm
|
|
73
|
+
- All 659 tests pass
|
|
74
|
+
|
|
75
|
+
<promise>COMPLETE</promise>
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## Details
|
|
79
|
+
- Attempts: 1
|
|
80
|
+
- Elapsed time: 4m 50s
|
|
81
|
+
- Completed at: 2026-01-31T16:42:26.156Z
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Outcome: Implement Dependency Checking in `raf do`
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Updated the `raf do` command to detect blocked tasks and automatically create blocked outcome files instead of attempting execution. When a task's dependencies fail, the task is marked as blocked and skipped, with a proper outcome file generated explaining which dependencies caused the block.
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### 1. Updated Terminal Symbols (`src/utils/terminal-symbols.ts`)
|
|
10
|
+
|
|
11
|
+
- **Added `blocked` symbol**: `⊘` for blocked tasks
|
|
12
|
+
- **Updated `TaskStatus` type**: Added `'blocked'` to union type
|
|
13
|
+
- **Updated `formatSummary()`**:
|
|
14
|
+
- Added optional `blocked` parameter (default 0)
|
|
15
|
+
- Summary now shows blocked count separately: "3/5 (1 failed, 2 blocked)"
|
|
16
|
+
- Blocked counts are included in the total
|
|
17
|
+
|
|
18
|
+
### 2. Updated Do Command (`src/commands/do.ts`)
|
|
19
|
+
|
|
20
|
+
**New Function: `getNextTaskToProcess()`**
|
|
21
|
+
- Replaces `getNextTask()` to handle blocked tasks
|
|
22
|
+
- First checks for blocked tasks that need outcome files generated
|
|
23
|
+
- Then returns next executable task (pending or failed)
|
|
24
|
+
|
|
25
|
+
**New Function: `generateBlockedOutcome()`**
|
|
26
|
+
- Creates structured blocked outcome file content
|
|
27
|
+
- Lists failed and blocked dependencies
|
|
28
|
+
- Includes resolution instructions
|
|
29
|
+
- Ends with `<promise>BLOCKED</promise>` marker
|
|
30
|
+
|
|
31
|
+
**Task Loop Updates**
|
|
32
|
+
- Detects blocked tasks and handles them separately
|
|
33
|
+
- Skips Claude execution for blocked tasks entirely
|
|
34
|
+
- Generates blocked outcome file via `projectManager.saveOutcome()`
|
|
35
|
+
- Shows console output: "Task X blocked by failed dependency: Y"
|
|
36
|
+
- Re-derives state after each blocked task to cascade blocking
|
|
37
|
+
|
|
38
|
+
**Summary Output Updates**
|
|
39
|
+
- Verbose mode: Shows blocked count in summary
|
|
40
|
+
- Minimal mode: Passes blocked count to `formatSummary()`
|
|
41
|
+
|
|
42
|
+
### 3. New Tests (`tests/unit/do-blocked-tasks.test.ts`)
|
|
43
|
+
|
|
44
|
+
Added 12 new tests covering:
|
|
45
|
+
- Blocked task detection when dependency fails
|
|
46
|
+
- Cascading blocking through multiple tasks
|
|
47
|
+
- Non-blocking when dependency succeeds
|
|
48
|
+
- Blocking with multiple dependencies (one fails)
|
|
49
|
+
- `getNextExecutableTask` skipping blocked tasks
|
|
50
|
+
- `getDerivedStats` counting blocked separately
|
|
51
|
+
- `isProjectComplete` with blocked tasks
|
|
52
|
+
- `hasProjectFailed` distinguishing blocked from failed
|
|
53
|
+
- BLOCKED marker recognition in outcome files
|
|
54
|
+
|
|
55
|
+
### 4. Updated Terminal Symbols Tests (`tests/unit/terminal-symbols.test.ts`)
|
|
56
|
+
|
|
57
|
+
- Added test for `blocked` symbol
|
|
58
|
+
- Updated SYMBOLS test to include `blocked`
|
|
59
|
+
- Added tests for `formatTaskProgress` with blocked status
|
|
60
|
+
- Added tests for `formatSummary` with blocked tasks (single, multiple, combined with failures)
|
|
61
|
+
- Added test for `formatProgressBar` with blocked status
|
|
62
|
+
|
|
63
|
+
## Blocked Outcome File Format
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
# Outcome: Task 002 Blocked
|
|
67
|
+
|
|
68
|
+
## Summary
|
|
69
|
+
|
|
70
|
+
This task was automatically blocked because one or more of its dependencies failed or are blocked.
|
|
71
|
+
|
|
72
|
+
## Blocking Dependencies
|
|
73
|
+
|
|
74
|
+
**Failed dependencies**: 001
|
|
75
|
+
**Blocked dependencies**: (if any)
|
|
76
|
+
|
|
77
|
+
**Task dependencies**: 001
|
|
78
|
+
|
|
79
|
+
## Resolution
|
|
80
|
+
|
|
81
|
+
To unblock this task:
|
|
82
|
+
1. Fix the failed dependency task(s)
|
|
83
|
+
2. Re-run the project with `raf do`
|
|
84
|
+
|
|
85
|
+
<promise>BLOCKED</promise>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Files Modified
|
|
89
|
+
|
|
90
|
+
- `src/commands/do.ts` - Main implementation
|
|
91
|
+
- `src/utils/terminal-symbols.ts` - Blocked symbol and formatSummary updates
|
|
92
|
+
- `tests/unit/do-blocked-tasks.test.ts` - New test file (12 tests)
|
|
93
|
+
- `tests/unit/terminal-symbols.test.ts` - Updated tests for blocked status
|
|
94
|
+
|
|
95
|
+
## Acceptance Criteria Verification
|
|
96
|
+
|
|
97
|
+
- [x] Blocked tasks are detected and skipped
|
|
98
|
+
- [x] Blocked outcome file created with proper format and BLOCKED marker
|
|
99
|
+
- [x] Console shows clear blocked message with dependency info
|
|
100
|
+
- [x] Blocking cascades properly (if 001 fails, 002 blocked, 003 depends on 002 also blocked)
|
|
101
|
+
- [x] Summary shows blocked tasks separately from failed
|
|
102
|
+
- [x] No Claude execution attempted for blocked tasks
|
|
103
|
+
|
|
104
|
+
## Test Results
|
|
105
|
+
|
|
106
|
+
- All 677 tests pass
|
|
107
|
+
- 12 new tests for blocked task handling
|
|
108
|
+
- 6 updated tests for terminal symbols
|
|
109
|
+
|
|
110
|
+
<promise>COMPLETE</promise>
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
## Details
|
|
114
|
+
- Attempts: 1
|
|
115
|
+
- Elapsed time: 4m 20s
|
|
116
|
+
- Completed at: 2026-01-31T16:46:46.254Z
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Outcome: Update Execution Prompts with Dependency Context
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Updated the execution system prompt to include outcome summaries of completed dependency tasks, providing Claude with full context when executing tasks that depend on other tasks. This enables Claude to understand and build upon previous work effectively.
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### 1. Added `summarizeOutcome()` function (`src/prompts/execution.ts`)
|
|
10
|
+
|
|
11
|
+
Created a helper function to manage context size for dependency outcomes:
|
|
12
|
+
- Returns content as-is if under 4000 characters
|
|
13
|
+
- Extracts just the Summary section for longer outcomes
|
|
14
|
+
- Falls back to truncation at a reasonable break point (newline or period)
|
|
15
|
+
- Appends "[Outcome truncated for context size]" indicator when truncated
|
|
16
|
+
|
|
17
|
+
### 2. Extended `ExecutionPromptParams` interface (`src/prompts/execution.ts`)
|
|
18
|
+
|
|
19
|
+
Added two new optional parameters:
|
|
20
|
+
- `dependencyIds?: string[]` - Task IDs that this task depends on
|
|
21
|
+
- `dependencyOutcomes?: Array<{ taskId: string; content: string }>` - Outcomes of dependency tasks
|
|
22
|
+
|
|
23
|
+
### 3. Updated `getExecutionPrompt()` function (`src/prompts/execution.ts`)
|
|
24
|
+
|
|
25
|
+
Added generation of "## Dependency Context" section:
|
|
26
|
+
- Only included when task has both dependencies AND dependency outcomes
|
|
27
|
+
- Lists all dependency IDs
|
|
28
|
+
- Shows each dependency outcome with task ID header
|
|
29
|
+
- Explains purpose: "Review their outcomes to understand what was accomplished and build upon their work"
|
|
30
|
+
- Placed before the existing "Previous Task Outcomes" section
|
|
31
|
+
|
|
32
|
+
### 4. Updated `do.ts` to pass dependency info (`src/commands/do.ts`)
|
|
33
|
+
|
|
34
|
+
- Extracts `dependencyIds` from the current task's `dependencies` array
|
|
35
|
+
- Filters `previousOutcomes` to get only outcomes for dependency tasks
|
|
36
|
+
- Passes both `dependencyIds` and `dependencyOutcomes` to the execution prompt
|
|
37
|
+
|
|
38
|
+
### 5. Added comprehensive tests (`tests/unit/execution-prompt.test.ts`)
|
|
39
|
+
|
|
40
|
+
Added 11 new tests covering:
|
|
41
|
+
- No dependency context when task has no dependencies
|
|
42
|
+
- No dependency context when dependencyIds is empty
|
|
43
|
+
- No dependency context when dependencyOutcomes is empty
|
|
44
|
+
- Dependency context included with proper formatting
|
|
45
|
+
- Multiple dependency outcomes
|
|
46
|
+
- Purpose explanation text
|
|
47
|
+
- Correct ordering (dependency context before previous outcomes)
|
|
48
|
+
- `summarizeOutcome` function behavior (4 tests)
|
|
49
|
+
|
|
50
|
+
## Files Modified
|
|
51
|
+
|
|
52
|
+
- `src/prompts/execution.ts` - Added summarizeOutcome function, extended params, added dependency context section
|
|
53
|
+
- `src/commands/do.ts` - Pass dependency info to execution prompt
|
|
54
|
+
- `tests/unit/execution-prompt.test.ts` - Added 11 new tests
|
|
55
|
+
|
|
56
|
+
## Acceptance Criteria Verification
|
|
57
|
+
|
|
58
|
+
- [x] Execution prompt includes dependency context section when task has dependencies
|
|
59
|
+
- [x] Dependency outcomes clearly labeled by task ID (e.g., "### Task 001")
|
|
60
|
+
- [x] Claude receives useful context about what dependencies accomplished
|
|
61
|
+
- [x] Tasks without dependencies have no extra context section
|
|
62
|
+
- [x] Context size remains reasonable (summarize if needed) - MAX_DEPENDENCY_OUTCOME_CHARS = 4000
|
|
63
|
+
|
|
64
|
+
## Test Results
|
|
65
|
+
|
|
66
|
+
- All 688 tests pass
|
|
67
|
+
- 11 new tests added for dependency context functionality
|
|
68
|
+
|
|
69
|
+
<promise>COMPLETE</promise>
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## Details
|
|
73
|
+
- Attempts: 1
|
|
74
|
+
- Elapsed time: 3m 47s
|
|
75
|
+
- Completed at: 2026-01-31T16:50:33.800Z
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Outcome: Add Tests for Dependency Features
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Added comprehensive integration tests for the dependency watchdog feature to ensure reliable behavior across all dependency-related functionality. The previous tasks (001-005) had already added unit tests for their specific features, so this task focused on creating a comprehensive integration test that verifies the full end-to-end dependency blocking workflow.
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### 1. New Integration Test File (`tests/unit/dependency-integration.test.ts`)
|
|
10
|
+
|
|
11
|
+
Created 20 new integration tests covering:
|
|
12
|
+
|
|
13
|
+
**Complete Dependency Chain Simulation (7 tests)**
|
|
14
|
+
- Simulates a real project with complex dependency structure:
|
|
15
|
+
```
|
|
16
|
+
001-setup (no deps)
|
|
17
|
+
002-core (depends on 001)
|
|
18
|
+
003-api (depends on 001, 002)
|
|
19
|
+
004-tests (depends on 003)
|
|
20
|
+
005-docs (depends on 003)
|
|
21
|
+
006-deploy (depends on 004, 005)
|
|
22
|
+
```
|
|
23
|
+
- Tests initial state derivation with all tasks pending
|
|
24
|
+
- Tests cascade blocking when task 001 fails (all 5 dependent tasks blocked)
|
|
25
|
+
- Tests cascade blocking when task 002 fails (001 completed)
|
|
26
|
+
- Tests cascade blocking when task 003 fails (001, 002 completed)
|
|
27
|
+
- Tests partial failure in parallel branches (004 succeeds, 005 fails)
|
|
28
|
+
- Tests project completion when all tasks succeed
|
|
29
|
+
|
|
30
|
+
**getNextExecutableTask with Complex States (3 tests)**
|
|
31
|
+
- Skip blocked tasks and find next available pending task
|
|
32
|
+
- Return failed task for retry when no pending tasks exist
|
|
33
|
+
- Return null when all tasks are blocked with no failed tasks to retry
|
|
34
|
+
|
|
35
|
+
**Execution Prompt with Dependency Context (2 tests)**
|
|
36
|
+
- Include dependency outcomes in execution prompt
|
|
37
|
+
- Include multiple dependency outcomes
|
|
38
|
+
|
|
39
|
+
**BLOCKED Outcome File Recognition (3 tests)**
|
|
40
|
+
- Recognize BLOCKED marker and set status to blocked
|
|
41
|
+
- Parse BLOCKED marker correctly
|
|
42
|
+
- Handle mixed markers using last one
|
|
43
|
+
|
|
44
|
+
**Edge Cases (5 tests)**
|
|
45
|
+
- Handle circular dependency detection (prevented by lower-ID rule)
|
|
46
|
+
- Handle dependency on non-existent task gracefully
|
|
47
|
+
- Handle self-dependency gracefully
|
|
48
|
+
- Handle empty project gracefully
|
|
49
|
+
- Handle task with all dependencies completed
|
|
50
|
+
|
|
51
|
+
## Test Coverage Summary
|
|
52
|
+
|
|
53
|
+
| File | Statements | Branches | Functions | Lines |
|
|
54
|
+
|------|-----------|----------|-----------|-------|
|
|
55
|
+
| state-derivation.ts | 99.18% | 98.18% | 100% | 99.14% |
|
|
56
|
+
| execution.ts | 96.87% | 95% | 100% | 96.87% |
|
|
57
|
+
|
|
58
|
+
Both files exceed the 80% coverage requirement.
|
|
59
|
+
|
|
60
|
+
## Files Modified
|
|
61
|
+
|
|
62
|
+
- `tests/unit/dependency-integration.test.ts` - New file with 20 integration tests
|
|
63
|
+
|
|
64
|
+
## Existing Tests Summary (Added by Previous Tasks)
|
|
65
|
+
|
|
66
|
+
**Task 003 - `tests/unit/state-derivation.test.ts`**:
|
|
67
|
+
- 7 tests for `parseDependencies`
|
|
68
|
+
- 2 tests for `parseOutcomeStatus` with BLOCKED marker
|
|
69
|
+
- 6 tests for `deriveProjectState` with dependencies and blocking
|
|
70
|
+
|
|
71
|
+
**Task 004 - `tests/unit/do-blocked-tasks.test.ts`**:
|
|
72
|
+
- 12 tests for blocked task handling in the do command
|
|
73
|
+
|
|
74
|
+
**Task 004 - `tests/unit/terminal-symbols.test.ts`**:
|
|
75
|
+
- 6 tests for blocked symbol and formatSummary
|
|
76
|
+
|
|
77
|
+
**Task 005 - `tests/unit/execution-prompt.test.ts`**:
|
|
78
|
+
- 11 tests for dependency context in execution prompts
|
|
79
|
+
|
|
80
|
+
## Acceptance Criteria Verification
|
|
81
|
+
|
|
82
|
+
- [x] Dependency parsing tests pass (7 tests in state-derivation.test.ts)
|
|
83
|
+
- [x] Blocked status derivation tests pass (multiple test files)
|
|
84
|
+
- [x] getNextExecutableTask tests cover blocked scenarios (state-derivation.test.ts, do-blocked-tasks.test.ts, dependency-integration.test.ts)
|
|
85
|
+
- [x] Prompt generation tests verify dependency context (execution-prompt.test.ts, dependency-integration.test.ts)
|
|
86
|
+
- [x] All new code has >80% test coverage (state-derivation: 99%, execution: 97%)
|
|
87
|
+
- [x] Tests follow existing patterns in the codebase
|
|
88
|
+
|
|
89
|
+
## Test Results
|
|
90
|
+
|
|
91
|
+
- All 708 tests pass (20 new tests added)
|
|
92
|
+
- Test run time: ~1s
|
|
93
|
+
|
|
94
|
+
<promise>COMPLETE</promise>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## Details
|
|
98
|
+
- Attempts: 1
|
|
99
|
+
- Elapsed time: 3m 46s
|
|
100
|
+
- Completed at: 2026-01-31T16:54:20.311Z
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Outcome: Add 'act' Alias for 'do' Command
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Added `act` as a complete alias for the `raf do` command, allowing users to run `raf act` instead of `raf do`. This is a simple one-line change using Commander.js's built-in `.alias()` method.
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### 1. Updated `src/commands/do.ts`
|
|
10
|
+
|
|
11
|
+
Added `.alias('act')` to the command definition chain:
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
const command = new Command('do')
|
|
15
|
+
.description('Execute planned tasks for one or more projects')
|
|
16
|
+
.alias('act') // Added this line
|
|
17
|
+
.argument('[projects...]', ...)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Verification
|
|
21
|
+
|
|
22
|
+
- **Build**: TypeScript compiles successfully
|
|
23
|
+
- **Tests**: All 708 tests pass
|
|
24
|
+
- **Help output**:
|
|
25
|
+
- `raf --help` shows `do|act [options] [projects...]`
|
|
26
|
+
- `raf do --help` and `raf act --help` show identical options
|
|
27
|
+
- All flags (`-t`, `-v`, `-d`, `-f`, `-m`, `--sonnet`) work with both commands
|
|
28
|
+
|
|
29
|
+
## Files Modified
|
|
30
|
+
|
|
31
|
+
- `src/commands/do.ts` - Added `.alias('act')` to command definition
|
|
32
|
+
|
|
33
|
+
## Acceptance Criteria Verification
|
|
34
|
+
|
|
35
|
+
- [x] `raf act <project>` executes tasks just like `raf do <project>`
|
|
36
|
+
- [x] `raf act --help` shows the same options as `raf do --help`
|
|
37
|
+
- [x] All flags (`-m`, `--sonnet`, `-y`, `--retries`, etc.) work with `raf act`
|
|
38
|
+
- [x] `raf --help` shows `act` as an alias (displayed as `do|act`)
|
|
39
|
+
|
|
40
|
+
<promise>COMPLETE</promise>
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## Details
|
|
44
|
+
- Attempts: 1
|
|
45
|
+
- Elapsed time: 1m 1s
|
|
46
|
+
- Completed at: 2026-01-31T16:55:21.347Z
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Outcome: Add Exit Instructions After Planning
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Added clear exit instructions to both planning and amendment prompts. After Claude completes plan creation, users now see a message explaining how to exit the Claude session (Ctrl-C twice) and how to run their tasks.
|
|
6
|
+
|
|
7
|
+
## Key Changes
|
|
8
|
+
|
|
9
|
+
### 1. Updated Planning Prompt (`src/prompts/planning.ts`)
|
|
10
|
+
|
|
11
|
+
Updated Step 5: Confirm Completion to include:
|
|
12
|
+
- Summary of created tasks (existing)
|
|
13
|
+
- Exit message with Ctrl-C instructions and `raf do <project>` command
|
|
14
|
+
|
|
15
|
+
### 2. Updated Amendment Prompt (`src/prompts/amend.ts`)
|
|
16
|
+
|
|
17
|
+
Updated Step 5: Confirm Completion to include:
|
|
18
|
+
- Summary of new tasks, relationships, and total count (existing)
|
|
19
|
+
- Exit message with Ctrl-C instructions and `raf do <project>` command
|
|
20
|
+
|
|
21
|
+
## Exit Message Format
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
Planning complete! To exit this session and run your tasks:
|
|
25
|
+
1. Press Ctrl-C twice to exit
|
|
26
|
+
2. Then run: raf do <project>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Files Modified
|
|
30
|
+
|
|
31
|
+
- `src/prompts/planning.ts` - Added exit instructions to Step 5
|
|
32
|
+
- `src/prompts/amend.ts` - Added exit instructions to Step 5
|
|
33
|
+
|
|
34
|
+
## Acceptance Criteria Verification
|
|
35
|
+
|
|
36
|
+
- [x] After `raf plan` completes, Claude displays exit instructions
|
|
37
|
+
- [x] After `raf plan --amend` completes, Claude displays exit instructions
|
|
38
|
+
- [x] Message is clear and actionable
|
|
39
|
+
- [x] Message uses generic `<project>` placeholder (not actual project name)
|
|
40
|
+
|
|
41
|
+
## Test Results
|
|
42
|
+
|
|
43
|
+
- All 708 tests pass
|
|
44
|
+
- No regressions introduced
|
|
45
|
+
|
|
46
|
+
<promise>COMPLETE</promise>
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Details
|
|
50
|
+
- Attempts: 1
|
|
51
|
+
- Elapsed time: 1m 37s
|
|
52
|
+
- Completed at: 2026-01-31T16:56:58.718Z
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Task: Define Dependency Syntax in Plan Files
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Establish the syntax and location for specifying task dependencies in plan markdown files.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
Tasks in RAF can depend on other tasks. When a dependency fails, dependent tasks should be blocked. This task defines how dependencies are expressed in plan files, which is foundational for the entire feature.
|
|
8
|
+
|
|
9
|
+
## Dependencies
|
|
10
|
+
None - this is the foundational task.
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
- Dependencies use task IDs only (e.g., `001`, `002`) - not full task names
|
|
14
|
+
- Add a new `## Dependencies` section after `## Context`, before `## Requirements`
|
|
15
|
+
- Section is optional - tasks without dependencies omit it
|
|
16
|
+
- Multiple dependencies are comma-separated
|
|
17
|
+
- Dependencies must reference task IDs that exist in the same project
|
|
18
|
+
|
|
19
|
+
## Implementation Steps
|
|
20
|
+
1. Update the plan file template in `src/prompts/planning.ts` to include the optional Dependencies section
|
|
21
|
+
2. Document the new section format in the plan structure comment/documentation
|
|
22
|
+
3. Update the amend prompt in `src/prompts/amend.ts` to show dependencies for existing tasks
|
|
23
|
+
|
|
24
|
+
## Acceptance Criteria
|
|
25
|
+
- [ ] Planning prompt template includes Dependencies section with clear format instructions
|
|
26
|
+
- [ ] Amend prompt displays dependencies when showing existing tasks
|
|
27
|
+
- [ ] Documentation in CLAUDE.md updated to reflect new plan structure
|
|
28
|
+
|
|
29
|
+
## Notes
|
|
30
|
+
- The Dependencies section is optional - first tasks typically have none
|
|
31
|
+
- Format: `## Dependencies\n001, 002` (simple comma-separated list)
|
|
32
|
+
- This task only defines syntax; parsing is handled in task 003
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Task: Update Planning Prompts for Dependency Inference
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
Modify the planning system prompt so Claude automatically infers and records task dependencies during project planning.
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
When Claude breaks down a project into tasks, it should analyze relationships between tasks and specify dependencies. This enables the execution engine to properly handle task failures by blocking dependent tasks.
|
|
8
|
+
|
|
9
|
+
## Dependencies
|
|
10
|
+
001
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
- Claude should automatically infer dependencies from task relationships (not ask user)
|
|
14
|
+
- Tasks must be ordered in suggested execution order (lower numbers first)
|
|
15
|
+
- Circular dependencies must be avoided through proper task ordering
|
|
16
|
+
- Dependencies section added to each plan file that has dependencies
|
|
17
|
+
- Planning prompt must instruct Claude on dependency inference logic
|
|
18
|
+
|
|
19
|
+
## Implementation Steps
|
|
20
|
+
1. Update `src/prompts/planning.ts` system prompt with dependency inference instructions:
|
|
21
|
+
- Explain what dependencies are and why they matter
|
|
22
|
+
- Instruct Claude to order tasks by execution order
|
|
23
|
+
- Instruct Claude to add Dependencies section listing prerequisite task IDs
|
|
24
|
+
- Warn against circular dependencies
|
|
25
|
+
2. Update the plan file template to show Dependencies section format
|
|
26
|
+
3. Add examples of proper dependency specification to the prompt
|
|
27
|
+
|
|
28
|
+
## Acceptance Criteria
|
|
29
|
+
- [ ] Planning prompt includes clear instructions for dependency inference
|
|
30
|
+
- [ ] Prompt explains to order tasks by logical execution order
|
|
31
|
+
- [ ] Prompt includes example of Dependencies section format
|
|
32
|
+
- [ ] Prompt warns against circular dependencies
|
|
33
|
+
- [ ] Generated plans include appropriate Dependencies sections
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
- Dependencies are inferred, not asked about - this keeps planning efficient
|
|
37
|
+
- Claude should use its judgment about what tasks require others to complete first
|
|
38
|
+
- Common patterns: setup before implementation, implementation before testing, core before extensions
|