rafcode 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +118 -22
- package/RAF/aaaabt-verbose-chronicle/decisions.md +25 -0
- package/RAF/aaaabt-verbose-chronicle/input.md +3 -0
- package/RAF/aaaabt-verbose-chronicle/outcomes/01-amend-iteration-references.md +25 -0
- package/RAF/aaaabt-verbose-chronicle/outcomes/02-verbose-task-name-display.md +31 -0
- package/RAF/aaaabt-verbose-chronicle/outcomes/03-verbose-streaming-fix.md +48 -0
- package/RAF/aaaabt-verbose-chronicle/outcomes/04-commit-verification-before-halt.md +56 -0
- package/RAF/aaaabt-verbose-chronicle/plans/01-amend-iteration-references.md +35 -0
- package/RAF/aaaabt-verbose-chronicle/plans/02-verbose-task-name-display.md +38 -0
- package/RAF/aaaabt-verbose-chronicle/plans/03-verbose-streaming-fix.md +45 -0
- package/RAF/aaaabt-verbose-chronicle/plans/04-commit-verification-before-halt.md +62 -0
- package/RAF/aaaacu-worktree-weaver/decisions.md +88 -0
- package/RAF/aaaacu-worktree-weaver/input.md +27 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/01-git-worktree-utilities.md +41 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/02-worktree-plan-command.md +44 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/03-worktree-do-command.md +58 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/04-auto-merge-and-cleanup.md +40 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/05-worktree-tests.md +43 -0
- package/RAF/aaaacu-worktree-weaver/outcomes/06-update-documentation.md +33 -0
- package/RAF/aaaacu-worktree-weaver/plans/01-git-worktree-utilities.md +51 -0
- package/RAF/aaaacu-worktree-weaver/plans/02-worktree-plan-command.md +93 -0
- package/RAF/aaaacu-worktree-weaver/plans/03-worktree-do-command.md +81 -0
- package/RAF/aaaacu-worktree-weaver/plans/04-auto-merge-and-cleanup.md +51 -0
- package/RAF/aaaacu-worktree-weaver/plans/05-worktree-tests.md +52 -0
- package/RAF/aaaacu-worktree-weaver/plans/06-update-documentation.md +55 -0
- package/RAF/aaaacv-trim-the-fat/decisions.md +34 -0
- package/RAF/aaaacv-trim-the-fat/input.md +5 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/01-add-worktree-support-to-status.md +43 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/02-remove-multi-project-from-do.md +50 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/03-commit-artifacts-on-amend.md +35 -0
- package/RAF/aaaacv-trim-the-fat/outcomes/04-worktree-aware-exit-messages.md +36 -0
- package/RAF/aaaacv-trim-the-fat/plans/01-add-worktree-support-to-status.md +43 -0
- package/RAF/aaaacv-trim-the-fat/plans/02-remove-multi-project-from-do.md +44 -0
- package/RAF/aaaacv-trim-the-fat/plans/03-commit-artifacts-on-amend.md +38 -0
- package/RAF/aaaacv-trim-the-fat/plans/04-worktree-aware-exit-messages.md +38 -0
- package/RAF/aaaacw-prune-cycle/decisions.md +25 -0
- package/RAF/aaaacw-prune-cycle/input.md +5 -0
- package/RAF/aaaacw-prune-cycle/outcomes/01-create-worktree-from-branch.md +32 -0
- package/RAF/aaaacw-prune-cycle/outcomes/02-cleanup-worktree-on-success.md +33 -0
- package/RAF/aaaacw-prune-cycle/outcomes/03-amend-recreate-worktree.md +40 -0
- package/RAF/aaaacw-prune-cycle/plans/01-create-worktree-from-branch.md +31 -0
- package/RAF/aaaacw-prune-cycle/plans/02-cleanup-worktree-on-success.md +38 -0
- package/RAF/aaaacw-prune-cycle/plans/03-amend-recreate-worktree.md +50 -0
- package/RAF/aaaacx-epoch-shift/decisions.md +25 -0
- package/RAF/aaaacx-epoch-shift/input.md +1 -0
- package/RAF/aaaacx-epoch-shift/outcomes/01-epoch-id-generation.md +34 -0
- package/RAF/aaaacx-epoch-shift/outcomes/02-update-pattern-matching.md +32 -0
- package/RAF/aaaacx-epoch-shift/outcomes/03-update-tests.md +59 -0
- package/RAF/aaaacx-epoch-shift/outcomes/04-update-documentation.md +30 -0
- package/RAF/aaaacx-epoch-shift/plans/01-epoch-id-generation.md +40 -0
- package/RAF/aaaacx-epoch-shift/plans/02-update-pattern-matching.md +60 -0
- package/RAF/aaaacx-epoch-shift/plans/03-update-tests.md +48 -0
- package/RAF/aaaacx-epoch-shift/plans/04-update-documentation.md +44 -0
- package/RAF/ahmpro-merge-guardian/decisions.md +25 -0
- package/RAF/ahmpro-merge-guardian/input.md +4 -0
- package/RAF/ahmpro-merge-guardian/outcomes/001-fix-amend-worktree-commit.md +45 -0
- package/RAF/ahmpro-merge-guardian/outcomes/002-base36-task-ids.md +55 -0
- package/RAF/ahmpro-merge-guardian/outcomes/003-worktree-pr-creation.md +41 -0
- package/RAF/ahmpro-merge-guardian/outcomes/004-post-execution-picker.md +53 -0
- package/RAF/ahmpro-merge-guardian/plans/001-fix-amend-worktree-commit.md +39 -0
- package/RAF/ahmpro-merge-guardian/plans/002-base36-task-ids.md +43 -0
- package/RAF/ahmpro-merge-guardian/plans/003-worktree-pr-creation.md +43 -0
- package/RAF/ahmpro-merge-guardian/plans/004-post-execution-picker.md +51 -0
- package/RAF/ahnbcu-letterjam/decisions.md +13 -0
- package/RAF/ahnbcu-letterjam/input.md +3 -0
- package/RAF/ahnbcu-letterjam/outcomes/01-base26-encoding.md +42 -0
- package/RAF/ahnbcu-letterjam/outcomes/02-update-tests.md +38 -0
- package/RAF/ahnbcu-letterjam/outcomes/03-migrate-command.md +51 -0
- package/RAF/ahnbcu-letterjam/outcomes/04-update-documentation.md +29 -0
- package/RAF/ahnbcu-letterjam/plans/01-base26-encoding.md +36 -0
- package/RAF/ahnbcu-letterjam/plans/02-update-tests.md +37 -0
- package/RAF/ahnbcu-letterjam/plans/03-migrate-command.md +49 -0
- package/RAF/ahnbcu-letterjam/plans/04-update-documentation.md +39 -0
- package/RAF/ahnwrk-worktree-weaver/decisions.md +19 -0
- package/RAF/ahnwrk-worktree-weaver/input.md +4 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/01-remove-co-authored-by.md +20 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/02-update-task-status-format.md +21 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/03-worktree-auto-discovery.md +34 -0
- package/RAF/ahnwrk-worktree-weaver/outcomes/04-fix-pr-description.md +30 -0
- package/RAF/ahnwrk-worktree-weaver/plans/01-remove-co-authored-by.md +26 -0
- package/RAF/ahnwrk-worktree-weaver/plans/02-update-task-status-format.md +27 -0
- package/RAF/ahnwrk-worktree-weaver/plans/03-worktree-auto-discovery.md +37 -0
- package/RAF/ahnwrk-worktree-weaver/plans/04-fix-pr-description.md +50 -0
- package/README.md +56 -10
- package/dist/commands/do.d.ts +15 -0
- package/dist/commands/do.d.ts.map +1 -1
- package/dist/commands/do.js +400 -131
- package/dist/commands/do.js.map +1 -1
- package/dist/commands/migrate.d.ts +14 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +228 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +237 -40
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +221 -47
- package/dist/commands/status.js.map +1 -1
- package/dist/core/claude-runner.d.ts +52 -1
- package/dist/core/claude-runner.d.ts.map +1 -1
- package/dist/core/claude-runner.js +195 -17
- package/dist/core/claude-runner.js.map +1 -1
- package/dist/core/git.d.ts +29 -5
- package/dist/core/git.d.ts.map +1 -1
- package/dist/core/git.js +95 -18
- package/dist/core/git.js.map +1 -1
- package/dist/core/project-manager.d.ts.map +1 -1
- package/dist/core/project-manager.js +2 -2
- package/dist/core/project-manager.js.map +1 -1
- package/dist/core/pull-request.d.ts +84 -0
- package/dist/core/pull-request.d.ts.map +1 -0
- package/dist/core/pull-request.js +414 -0
- package/dist/core/pull-request.js.map +1 -0
- package/dist/core/state-derivation.d.ts +3 -3
- package/dist/core/state-derivation.d.ts.map +1 -1
- package/dist/core/state-derivation.js +18 -14
- package/dist/core/state-derivation.js.map +1 -1
- package/dist/core/worktree.d.ts +120 -0
- package/dist/core/worktree.d.ts.map +1 -0
- package/dist/core/worktree.js +322 -0
- package/dist/core/worktree.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/parsers/stream-renderer.d.ts +42 -0
- package/dist/parsers/stream-renderer.d.ts.map +1 -0
- package/dist/parsers/stream-renderer.js +100 -0
- package/dist/parsers/stream-renderer.js.map +1 -0
- package/dist/prompts/amend.d.ts +1 -0
- package/dist/prompts/amend.d.ts.map +1 -1
- package/dist/prompts/amend.js +25 -10
- package/dist/prompts/amend.js.map +1 -1
- package/dist/prompts/execution.js +5 -5
- package/dist/prompts/execution.js.map +1 -1
- package/dist/prompts/planning.d.ts +1 -0
- package/dist/prompts/planning.d.ts.map +1 -1
- package/dist/prompts/planning.js +11 -10
- package/dist/prompts/planning.js.map +1 -1
- package/dist/types/config.d.ts +5 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/ui/project-picker.d.ts +34 -3
- package/dist/ui/project-picker.d.ts.map +1 -1
- package/dist/ui/project-picker.js +78 -10
- package/dist/ui/project-picker.js.map +1 -1
- package/dist/utils/paths.d.ts +38 -43
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +123 -193
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/terminal-symbols.d.ts +2 -2
- package/dist/utils/terminal-symbols.js +3 -3
- package/dist/utils/terminal-symbols.js.map +1 -1
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +2 -8
- package/dist/utils/validation.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/do.ts +471 -142
- package/src/commands/migrate.ts +269 -0
- package/src/commands/plan.ts +264 -40
- package/src/commands/status.ts +252 -45
- package/src/core/claude-runner.ts +270 -17
- package/src/core/git.ts +99 -19
- package/src/core/project-manager.ts +2 -1
- package/src/core/pull-request.ts +480 -0
- package/src/core/state-derivation.ts +18 -14
- package/src/core/worktree.ts +357 -0
- package/src/index.ts +2 -0
- package/src/parsers/stream-renderer.ts +139 -0
- package/src/prompts/amend.ts +27 -9
- package/src/prompts/execution.ts +5 -5
- package/src/prompts/planning.ts +12 -10
- package/src/types/config.ts +6 -0
- package/src/ui/project-picker.ts +110 -10
- package/src/utils/paths.ts +129 -214
- package/src/utils/terminal-symbols.ts +3 -3
- package/src/utils/validation.ts +2 -9
- package/tests/unit/amend-prompt.test.ts +85 -0
- package/tests/unit/claude-runner.test.ts +567 -1
- package/tests/unit/commit-planning-artifacts-worktree.test.ts +327 -0
- package/tests/unit/commit-planning-artifacts.test.ts +303 -35
- package/tests/unit/dependency-integration.test.ts +95 -95
- package/tests/unit/do-blocked-tasks.test.ts +53 -53
- package/tests/unit/do-command.test.ts +39 -132
- package/tests/unit/do-rerun.test.ts +65 -65
- package/tests/unit/do-worktree-cleanup.test.ts +151 -0
- package/tests/unit/execution-prompt.test.ts +71 -60
- package/tests/unit/failure-history.test.ts +19 -19
- package/tests/unit/git-commit-helpers.test.ts +103 -0
- package/tests/unit/git-stash.test.ts +4 -4
- package/tests/unit/migrate-command.test.ts +197 -0
- package/tests/unit/outcome-content.test.ts +20 -20
- package/tests/unit/paths.test.ts +269 -467
- package/tests/unit/plan-amend-worktree-recreate.test.ts +246 -0
- package/tests/unit/plan-command.test.ts +144 -93
- package/tests/unit/planning-prompt.test.ts +41 -4
- package/tests/unit/post-execution-picker.test.ts +251 -0
- package/tests/unit/project-manager.test.ts +20 -8
- package/tests/unit/project-picker.test.ts +425 -42
- package/tests/unit/pull-request.test.ts +852 -0
- package/tests/unit/state-derivation.test.ts +138 -137
- package/tests/unit/status-command.test.ts +344 -76
- package/tests/unit/stream-renderer.test.ts +286 -0
- package/tests/unit/terminal-symbols.test.ts +4 -4
- package/tests/unit/worktree-integration.test.ts +405 -0
- package/tests/unit/worktree.test.ts +523 -0
- package/tests/unit/do-multiproject.test.ts +0 -270
- /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/input.md +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/001-add-decisions-folder.md → aaaaab-raf-task-improvements/outcomes/01-add-decisions-folder.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/002-fix-write-error-on-shutdown.md → aaaaab-raf-task-improvements/outcomes/02-fix-write-error-on-shutdown.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/003-stash-changes-on-failure.md → aaaaab-raf-task-improvements/outcomes/03-stash-changes-on-failure.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/004-add-project-name-to-commits.md → aaaaab-raf-task-improvements/outcomes/04-add-project-name-to-commits.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/005-add-running-time-display.md → aaaaab-raf-task-improvements/outcomes/05-add-running-time-display.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/006-add-task-name-to-logs.md → aaaaab-raf-task-improvements/outcomes/06-add-task-name-to-logs.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/007-show-model-at-task-start.md → aaaaab-raf-task-improvements/outcomes/07-show-model-at-task-start.md} +0 -0
- /package/RAF/{001-raf-task-improvements/outcomes/009-remove-editor-placeholder-text.md → aaaaab-raf-task-improvements/outcomes/09-remove-editor-placeholder-text.md} +0 -0
- /package/RAF/{001-raf-task-improvements → aaaaab-raf-task-improvements}/outcomes/SUMMARY.md +0 -0
- /package/RAF/{001-raf-task-improvements/plans/001-add-decisions-folder.md → aaaaab-raf-task-improvements/plans/01-add-decisions-folder.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/002-fix-write-error-on-shutdown.md → aaaaab-raf-task-improvements/plans/02-fix-write-error-on-shutdown.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/003-stash-changes-on-failure.md → aaaaab-raf-task-improvements/plans/03-stash-changes-on-failure.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/004-add-project-name-to-commits.md → aaaaab-raf-task-improvements/plans/04-add-project-name-to-commits.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/005-add-running-time-display.md → aaaaab-raf-task-improvements/plans/05-add-running-time-display.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/006-add-task-name-to-logs.md → aaaaab-raf-task-improvements/plans/06-add-task-name-to-logs.md} +0 -0
- /package/RAF/{001-raf-task-improvements/plans/009-remove-editor-placeholder-text.md → aaaaab-raf-task-improvements/plans/09-remove-editor-placeholder-text.md} +0 -0
- /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/decisions/DECISIONS.md +0 -0
- /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/input.md +0 -0
- /package/RAF/{002-raf-task-improvements-execution/outcomes/001-commit-show-model-at-task-start.md → aaaaac-raf-task-improvements-execution/outcomes/01-commit-show-model-at-task-start.md} +0 -0
- /package/RAF/{002-raf-task-improvements-execution/outcomes/002-delete-skipped-plan.md → aaaaac-raf-task-improvements-execution/outcomes/02-delete-skipped-plan.md} +0 -0
- /package/RAF/{002-raf-task-improvements-execution → aaaaac-raf-task-improvements-execution}/outcomes/SUMMARY.md +0 -0
- /package/RAF/{002-raf-task-improvements-execution/plans/001-commit-show-model-at-task-start.md → aaaaac-raf-task-improvements-execution/plans/01-commit-show-model-at-task-start.md} +0 -0
- /package/RAF/{002-raf-task-improvements-execution/plans/002-delete-skipped-plan.md → aaaaac-raf-task-improvements-execution/plans/02-delete-skipped-plan.md} +0 -0
- /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/decisions/DECISIONS.md +0 -0
- /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/input.md +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/001-remove-state-json.md → aaaaad-multi-project-execution/outcomes/01-remove-state-json.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/002-update-raf-status.md → aaaaad-multi-project-execution/outcomes/02-update-raf-status.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/003-simplify-git-logic.md → aaaaad-multi-project-execution/outcomes/03-simplify-git-logic.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/004-auto-commit-planning.md → aaaaad-multi-project-execution/outcomes/04-auto-commit-planning.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/outcomes/05-rerun-failed-tasks.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/006-multi-project-execution.md → aaaaad-multi-project-execution/outcomes/06-multi-project-execution.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/007-verify-timeout.md → aaaaad-multi-project-execution/outcomes/07-verify-timeout.md} +0 -0
- /package/RAF/{003-multi-project-execution/outcomes/008-move-decisions-file.md → aaaaad-multi-project-execution/outcomes/08-move-decisions-file.md} +0 -0
- /package/RAF/{003-multi-project-execution → aaaaad-multi-project-execution}/outcomes/SUMMARY.md +0 -0
- /package/RAF/{003-multi-project-execution/plans/001-remove-state-json.md → aaaaad-multi-project-execution/plans/01-remove-state-json.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/002-update-raf-status.md → aaaaad-multi-project-execution/plans/02-update-raf-status.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/003-simplify-git-logic.md → aaaaad-multi-project-execution/plans/03-simplify-git-logic.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/004-auto-commit-planning.md → aaaaad-multi-project-execution/plans/04-auto-commit-planning.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/005-rerun-failed-tasks.md → aaaaad-multi-project-execution/plans/05-rerun-failed-tasks.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/006-multi-project-execution.md → aaaaad-multi-project-execution/plans/06-multi-project-execution.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/007-verify-timeout.md → aaaaad-multi-project-execution/plans/07-verify-timeout.md} +0 -0
- /package/RAF/{003-multi-project-execution/plans/008-move-decisions-file.md → aaaaad-multi-project-execution/plans/08-move-decisions-file.md} +0 -0
- /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/decisions.md +0 -0
- /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/input.md +0 -0
- /package/RAF/{004-task-naming-optimization/outcomes/001-remove-summary-file.md → aaaaae-task-naming-optimization/outcomes/01-remove-summary-file.md} +0 -0
- /package/RAF/{004-task-naming-optimization/outcomes/002-base36-project-numbering.md → aaaaae-task-naming-optimization/outcomes/02-base36-project-numbering.md} +0 -0
- /package/RAF/{004-task-naming-optimization/outcomes/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/outcomes/03-improve-haiku-prompt.md} +0 -0
- /package/RAF/{004-task-naming-optimization → aaaaae-task-naming-optimization}/outcomes/SUMMARY.md +0 -0
- /package/RAF/{004-task-naming-optimization/plans/001-remove-summary-file.md → aaaaae-task-naming-optimization/plans/01-remove-summary-file.md} +0 -0
- /package/RAF/{004-task-naming-optimization/plans/002-base36-project-numbering.md → aaaaae-task-naming-optimization/plans/02-base36-project-numbering.md} +0 -0
- /package/RAF/{004-task-naming-optimization/plans/003-improve-haiku-prompt.md → aaaaae-task-naming-optimization/plans/03-improve-haiku-prompt.md} +0 -0
- /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/decisions.md +0 -0
- /package/RAF/{005-task-naming-improvements → aaaaaf-task-naming-improvements}/input.md +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/outcomes/01-enhance-identifier-resolution.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/002-add-identifier-support-to-status.md → aaaaaf-task-naming-improvements/outcomes/02-add-identifier-support-to-status.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/003-update-do-for-full-folder-names.md → aaaaaf-task-naming-improvements/outcomes/03-update-do-for-full-folder-names.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/004-implement-amend-flag-for-plan.md → aaaaaf-task-naming-improvements/outcomes/04-implement-amend-flag-for-plan.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/005-commit-outcomes-on-complete.md → aaaaaf-task-naming-improvements/outcomes/05-commit-outcomes-on-complete.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/006-update-execution-prompt-commit-schema.md → aaaaaf-task-naming-improvements/outcomes/06-update-execution-prompt-commit-schema.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/007-allow-pending-task-amendments.md → aaaaaf-task-naming-improvements/outcomes/07-allow-pending-task-amendments.md} +0 -0
- /package/RAF/{005-task-naming-improvements/outcomes/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/outcomes/08-fix-timeout-label.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/001-enhance-identifier-resolution.md → aaaaaf-task-naming-improvements/plans/01-enhance-identifier-resolution.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/002-add-identifier-support-to-status.md → aaaaaf-task-naming-improvements/plans/02-add-identifier-support-to-status.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/003-update-do-for-full-folder-names.md → aaaaaf-task-naming-improvements/plans/03-update-do-for-full-folder-names.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/004-implement-amend-flag-for-plan.md → aaaaaf-task-naming-improvements/plans/04-implement-amend-flag-for-plan.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/005-commit-outcomes-on-complete.md → aaaaaf-task-naming-improvements/plans/05-commit-outcomes-on-complete.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/006-update-execution-prompt-commit-schema.md → aaaaaf-task-naming-improvements/plans/06-update-execution-prompt-commit-schema.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/007-allow-pending-task-amendments.md → aaaaaf-task-naming-improvements/plans/07-allow-pending-task-amendments.md} +0 -0
- /package/RAF/{005-task-naming-improvements/plans/008-fix-timeout-label.md → aaaaaf-task-naming-improvements/plans/08-fix-timeout-label.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/decisions.md +0 -0
- /package/RAF/{006-fix-double-summary-headers → aaaaag-fix-double-summary-headers}/input.md +0 -0
- /package/RAF/{006-fix-double-summary-headers/outcomes/001-fix-double-summary-headers.md → aaaaag-fix-double-summary-headers/outcomes/01-fix-double-summary-headers.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/outcomes/002-update-readme-for-npm.md → aaaaag-fix-double-summary-headers/outcomes/02-update-readme-for-npm.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/outcomes/003-npm-publish-instructions.md → aaaaag-fix-double-summary-headers/outcomes/03-npm-publish-instructions.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/outcomes/004-flexible-project-lookup.md → aaaaag-fix-double-summary-headers/outcomes/04-flexible-project-lookup.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/plans/001-fix-double-summary-headers.md → aaaaag-fix-double-summary-headers/plans/01-fix-double-summary-headers.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/plans/002-update-readme-for-npm.md → aaaaag-fix-double-summary-headers/plans/02-update-readme-for-npm.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/plans/003-npm-publish-instructions.md → aaaaag-fix-double-summary-headers/plans/03-npm-publish-instructions.md} +0 -0
- /package/RAF/{006-fix-double-summary-headers/plans/004-flexible-project-lookup.md → aaaaag-fix-double-summary-headers/plans/04-flexible-project-lookup.md} +0 -0
- /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/decisions.md +0 -0
- /package/RAF/{007-improve-outcome-format → aaaaah-improve-outcome-format}/input.md +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/001-update-execution-prompt.md → aaaaah-improve-outcome-format/outcomes/01-update-execution-prompt.md} +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/002-update-state-derivation.md → aaaaah-improve-outcome-format/outcomes/02-update-state-derivation.md} +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/003-update-do-command-outcome-handling.md → aaaaah-improve-outcome-format/outcomes/03-update-do-command-outcome-handling.md} +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/outcomes/04-implement-failure-analysis.md} +0 -0
- /package/RAF/{007-improve-outcome-format/outcomes/005-update-documentation.md → aaaaah-improve-outcome-format/outcomes/05-update-documentation.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/001-update-execution-prompt.md → aaaaah-improve-outcome-format/plans/01-update-execution-prompt.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/002-update-state-derivation.md → aaaaah-improve-outcome-format/plans/02-update-state-derivation.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/003-update-do-command-outcome-handling.md → aaaaah-improve-outcome-format/plans/03-update-do-command-outcome-handling.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/004-implement-failure-analysis.md → aaaaah-improve-outcome-format/plans/04-implement-failure-analysis.md} +0 -0
- /package/RAF/{007-improve-outcome-format/plans/005-update-documentation.md → aaaaah-improve-outcome-format/plans/05-update-documentation.md} +0 -0
- /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/decisions.md +0 -0
- /package/RAF/{008-beautiful-do → aaaaai-beautiful-do}/input.md +0 -0
- /package/RAF/{008-beautiful-do/outcomes/001-terminal-symbols.md → aaaaai-beautiful-do/outcomes/01-terminal-symbols.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/002-refactor-do-output.md → aaaaai-beautiful-do/outcomes/02-refactor-do-output.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/003-refactor-status-output.md → aaaaai-beautiful-do/outcomes/03-refactor-status-output.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/004-simplify-logger.md → aaaaai-beautiful-do/outcomes/04-simplify-logger.md} +0 -0
- /package/RAF/{008-beautiful-do/outcomes/005-add-tests.md → aaaaai-beautiful-do/outcomes/05-add-tests.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/001-terminal-symbols.md → aaaaai-beautiful-do/plans/01-terminal-symbols.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/002-refactor-do-output.md → aaaaai-beautiful-do/plans/02-refactor-do-output.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/003-refactor-status-output.md → aaaaai-beautiful-do/plans/03-refactor-status-output.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/004-simplify-logger.md → aaaaai-beautiful-do/plans/04-simplify-logger.md} +0 -0
- /package/RAF/{008-beautiful-do/plans/005-add-tests.md → aaaaai-beautiful-do/plans/05-add-tests.md} +0 -0
- /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/decisions.md +0 -0
- /package/RAF/{009-system-promt-ammend → aaaaaj-system-promt-ammend}/input.md +0 -0
- /package/RAF/{009-system-promt-ammend/outcomes/001-model-override.md → aaaaaj-system-promt-ammend/outcomes/01-model-override.md} +0 -0
- /package/RAF/{009-system-promt-ammend/outcomes/002-system-prompt-append.md → aaaaaj-system-promt-ammend/outcomes/02-system-prompt-append.md} +0 -0
- /package/RAF/{009-system-promt-ammend/outcomes/003-retry-context.md → aaaaaj-system-promt-ammend/outcomes/03-retry-context.md} +0 -0
- /package/RAF/{009-system-promt-ammend/plans/001-model-override.md → aaaaaj-system-promt-ammend/plans/01-model-override.md} +0 -0
- /package/RAF/{009-system-promt-ammend/plans/002-system-prompt-append.md → aaaaaj-system-promt-ammend/plans/02-system-prompt-append.md} +0 -0
- /package/RAF/{009-system-promt-ammend/plans/003-retry-context.md → aaaaaj-system-promt-ammend/plans/03-retry-context.md} +0 -0
- /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/decisions.md +0 -0
- /package/RAF/{010-outcome-marker-fallback → aaaabk-outcome-marker-fallback}/input.md +0 -0
- /package/RAF/{010-outcome-marker-fallback/outcomes/001-outcome-file-marker-fallback.md → aaaabk-outcome-marker-fallback/outcomes/01-outcome-file-marker-fallback.md} +0 -0
- /package/RAF/{010-outcome-marker-fallback/outcomes/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/outcomes/02-creative-project-naming.md} +0 -0
- /package/RAF/{010-outcome-marker-fallback/plans/001-outcome-file-marker-fallback.md → aaaabk-outcome-marker-fallback/plans/01-outcome-file-marker-fallback.md} +0 -0
- /package/RAF/{010-outcome-marker-fallback/plans/002-creative-project-naming.md → aaaabk-outcome-marker-fallback/plans/02-creative-project-naming.md} +0 -0
- /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/decisions.md +0 -0
- /package/RAF/{011-do-task-in-commit → aaaabl-do-task-in-commit}/input.md +0 -0
- /package/RAF/{011-do-task-in-commit/outcomes/001-update-execution-prompt.md → aaaabl-do-task-in-commit/outcomes/01-update-execution-prompt.md} +0 -0
- /package/RAF/{011-do-task-in-commit/outcomes/002-update-tests.md → aaaabl-do-task-in-commit/outcomes/02-update-tests.md} +0 -0
- /package/RAF/{011-do-task-in-commit/outcomes/003-update-documentation.md → aaaabl-do-task-in-commit/outcomes/03-update-documentation.md} +0 -0
- /package/RAF/{011-do-task-in-commit/plans/001-update-execution-prompt.md → aaaabl-do-task-in-commit/plans/01-update-execution-prompt.md} +0 -0
- /package/RAF/{011-do-task-in-commit/plans/002-update-tests.md → aaaabl-do-task-in-commit/plans/02-update-tests.md} +0 -0
- /package/RAF/{011-do-task-in-commit/plans/003-update-documentation.md → aaaabl-do-task-in-commit/plans/03-update-documentation.md} +0 -0
- /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/decisions.md +0 -0
- /package/RAF/{012-name-picker-buffet → aaaabm-name-picker-buffet}/input.md +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/001-name-picker-for-raf-plan.md → aaaabm-name-picker-buffet/outcomes/01-name-picker-for-raf-plan.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/002-interactive-project-picker-for-raf-do.md → aaaabm-name-picker-buffet/outcomes/02-interactive-project-picker-for-raf-do.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/003-raf-status-truncation.md → aaaabm-name-picker-buffet/outcomes/03-raf-status-truncation.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/004-failure-reason-details.md → aaaabm-name-picker-buffet/outcomes/04-failure-reason-details.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/005-remove-raf-commits.md → aaaabm-name-picker-buffet/outcomes/05-remove-raf-commits.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/006-update-execution-prompt-for-commits.md → aaaabm-name-picker-buffet/outcomes/06-update-execution-prompt-for-commits.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/007-fix-plan-mode-user-prompt.md → aaaabm-name-picker-buffet/outcomes/07-fix-plan-mode-user-prompt.md} +0 -0
- /package/RAF/{012-name-picker-buffet/outcomes/008-add-auto-flag-for-plan-mode.md → aaaabm-name-picker-buffet/outcomes/08-add-auto-flag-for-plan-mode.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/001-name-picker-for-raf-plan.md → aaaabm-name-picker-buffet/plans/01-name-picker-for-raf-plan.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/002-interactive-project-picker-for-raf-do.md → aaaabm-name-picker-buffet/plans/02-interactive-project-picker-for-raf-do.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/003-raf-status-truncation.md → aaaabm-name-picker-buffet/plans/03-raf-status-truncation.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/004-failure-reason-details.md → aaaabm-name-picker-buffet/plans/04-failure-reason-details.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/005-remove-raf-commits.md → aaaabm-name-picker-buffet/plans/05-remove-raf-commits.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/006-update-execution-prompt-for-commits.md → aaaabm-name-picker-buffet/plans/06-update-execution-prompt-for-commits.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/007-fix-plan-mode-user-prompt.md → aaaabm-name-picker-buffet/plans/07-fix-plan-mode-user-prompt.md} +0 -0
- /package/RAF/{012-name-picker-buffet/plans/008-add-auto-flag-for-plan-mode.md → aaaabm-name-picker-buffet/plans/08-add-auto-flag-for-plan-mode.md} +0 -0
- /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/decisions.md +0 -0
- /package/RAF/{013-dependencies-watchdog → aaaabn-dependencies-watchdog}/input.md +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/outcomes/01-define-dependency-syntax.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/outcomes/02-update-planning-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/outcomes/03-parse-dependencies-update-state.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/004-implement-dependency-checking-in-do.md → aaaabn-dependencies-watchdog/outcomes/04-implement-dependency-checking-in-do.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/outcomes/05-update-execution-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/006-add-tests.md → aaaabn-dependencies-watchdog/outcomes/06-add-tests.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/007-add-act-alias.md → aaaabn-dependencies-watchdog/outcomes/07-add-act-alias.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/outcomes/008-add-exit-message.md → aaaabn-dependencies-watchdog/outcomes/08-add-exit-message.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/001-define-dependency-syntax.md → aaaabn-dependencies-watchdog/plans/01-define-dependency-syntax.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/002-update-planning-prompts.md → aaaabn-dependencies-watchdog/plans/02-update-planning-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/003-parse-dependencies-update-state.md → aaaabn-dependencies-watchdog/plans/03-parse-dependencies-update-state.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/004-implement-dependency-checking-in-do.md → aaaabn-dependencies-watchdog/plans/04-implement-dependency-checking-in-do.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/005-update-execution-prompts.md → aaaabn-dependencies-watchdog/plans/05-update-execution-prompts.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/006-add-tests.md → aaaabn-dependencies-watchdog/plans/06-add-tests.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/007-add-act-alias.md → aaaabn-dependencies-watchdog/plans/07-add-act-alias.md} +0 -0
- /package/RAF/{013-dependencies-watchdog/plans/008-add-exit-message.md → aaaabn-dependencies-watchdog/plans/08-add-exit-message.md} +0 -0
- /package/RAF/{014-watchdog → aaaabo-watchdog}/decisions.md +0 -0
- /package/RAF/{014-watchdog → aaaabo-watchdog}/input.md +0 -0
- /package/RAF/{014-watchdog/outcomes/001-amend-flag-position.md → aaaabo-watchdog/outcomes/01-amend-flag-position.md} +0 -0
- /package/RAF/{014-watchdog/outcomes/002-details-only-on-failure.md → aaaabo-watchdog/outcomes/02-details-only-on-failure.md} +0 -0
- /package/RAF/{014-watchdog/plans/001-amend-flag-position.md → aaaabo-watchdog/plans/01-amend-flag-position.md} +0 -0
- /package/RAF/{014-watchdog/plans/002-details-only-on-failure.md → aaaabo-watchdog/plans/02-details-only-on-failure.md} +0 -0
- /package/RAF/{015-name-lottery → aaaabp-name-lottery}/decisions.md +0 -0
- /package/RAF/{015-name-lottery → aaaabp-name-lottery}/input.md +0 -0
- /package/RAF/{015-name-lottery/outcomes/001-auto-pick-project-name.md → aaaabp-name-lottery/outcomes/01-auto-pick-project-name.md} +0 -0
- /package/RAF/{015-name-lottery/outcomes/002-mention-plan-files-in-commit.md → aaaabp-name-lottery/outcomes/02-mention-plan-files-in-commit.md} +0 -0
- /package/RAF/{015-name-lottery/outcomes/003-fix-input-md-in-amend-flow.md → aaaabp-name-lottery/outcomes/03-fix-input-md-in-amend-flow.md} +0 -0
- /package/RAF/{015-name-lottery/plans/001-auto-pick-project-name.md → aaaabp-name-lottery/plans/01-auto-pick-project-name.md} +0 -0
- /package/RAF/{015-name-lottery/plans/002-mention-plan-files-in-commit.md → aaaabp-name-lottery/plans/02-mention-plan-files-in-commit.md} +0 -0
- /package/RAF/{015-name-lottery/plans/003-fix-input-md-in-amend-flow.md → aaaabp-name-lottery/plans/03-fix-input-md-in-amend-flow.md} +0 -0
- /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/decisions.md +0 -0
- /package/RAF/{016-planning-scalpel → aaaabq-planning-scalpel}/input.md +0 -0
- /package/RAF/{016-planning-scalpel/outcomes/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/outcomes/01-update-git-commit-instructions.md} +0 -0
- /package/RAF/{016-planning-scalpel/plans/001-update-git-commit-instructions.md → aaaabq-planning-scalpel/plans/01-update-git-commit-instructions.md} +0 -0
- /package/RAF/{017-decision-vault → aaaabr-decision-vault}/decisions.md +0 -0
- /package/RAF/{017-decision-vault → aaaabr-decision-vault}/input.md +0 -0
- /package/RAF/{017-decision-vault/outcomes/001-create-git-commit-utility.md → aaaabr-decision-vault/outcomes/01-create-git-commit-utility.md} +0 -0
- /package/RAF/{017-decision-vault/outcomes/002-integrate-commit-into-plan.md → aaaabr-decision-vault/outcomes/02-integrate-commit-into-plan.md} +0 -0
- /package/RAF/{017-decision-vault/outcomes/003-add-tests-for-planning-commit.md → aaaabr-decision-vault/outcomes/03-add-tests-for-planning-commit.md} +0 -0
- /package/RAF/{017-decision-vault/plans/001-create-git-commit-utility.md → aaaabr-decision-vault/plans/01-create-git-commit-utility.md} +0 -0
- /package/RAF/{017-decision-vault/plans/002-integrate-commit-into-plan.md → aaaabr-decision-vault/plans/02-integrate-commit-into-plan.md} +0 -0
- /package/RAF/{017-decision-vault/plans/003-add-tests-for-planning-commit.md → aaaabr-decision-vault/plans/03-add-tests-for-planning-commit.md} +0 -0
- /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/decisions.md +0 -0
- /package/RAF/{018-workflow-forge → aaaabs-workflow-forge}/input.md +0 -0
- /package/RAF/{018-workflow-forge/outcomes/001-add-task-number-progress.md → aaaabs-workflow-forge/outcomes/01-add-task-number-progress.md} +0 -0
- /package/RAF/{018-workflow-forge/outcomes/002-update-plan-do-prompts.md → aaaabs-workflow-forge/outcomes/02-update-plan-do-prompts.md} +0 -0
- /package/RAF/{018-workflow-forge/plans/001-add-task-number-progress.md → aaaabs-workflow-forge/plans/01-add-task-number-progress.md} +0 -0
- /package/RAF/{018-workflow-forge/plans/002-update-plan-do-prompts.md → aaaabs-workflow-forge/plans/02-update-plan-do-prompts.md} +0 -0
|
@@ -22,7 +22,7 @@ describe('state-derivation', () => {
|
|
|
22
22
|
|
|
23
23
|
beforeEach(() => {
|
|
24
24
|
tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'raf-test-'));
|
|
25
|
-
projectPath = path.join(tempDir, '
|
|
25
|
+
projectPath = path.join(tempDir, 'aaaaab-test-project');
|
|
26
26
|
fs.mkdirSync(projectPath, { recursive: true });
|
|
27
27
|
fs.mkdirSync(path.join(projectPath, 'plans'), { recursive: true });
|
|
28
28
|
fs.mkdirSync(path.join(projectPath, 'outcomes'), { recursive: true });
|
|
@@ -109,33 +109,33 @@ Later it was blocked...
|
|
|
109
109
|
const content = `# Task
|
|
110
110
|
|
|
111
111
|
## Dependencies
|
|
112
|
-
|
|
112
|
+
01
|
|
113
113
|
|
|
114
114
|
## Requirements
|
|
115
115
|
`;
|
|
116
|
-
expect(parseDependencies(content)).toEqual(['
|
|
116
|
+
expect(parseDependencies(content)).toEqual(['01']);
|
|
117
117
|
});
|
|
118
118
|
|
|
119
119
|
it('should parse multiple comma-separated dependencies', () => {
|
|
120
120
|
const content = `# Task
|
|
121
121
|
|
|
122
122
|
## Dependencies
|
|
123
|
-
|
|
123
|
+
01, 02, 03
|
|
124
124
|
|
|
125
125
|
## Requirements
|
|
126
126
|
`;
|
|
127
|
-
expect(parseDependencies(content)).toEqual(['
|
|
127
|
+
expect(parseDependencies(content)).toEqual(['01', '02', '03']);
|
|
128
128
|
});
|
|
129
129
|
|
|
130
130
|
it('should handle extra whitespace around dependencies', () => {
|
|
131
131
|
const content = `# Task
|
|
132
132
|
|
|
133
133
|
## Dependencies
|
|
134
|
-
|
|
134
|
+
01 , 02 ,03
|
|
135
135
|
|
|
136
136
|
## Requirements
|
|
137
137
|
`;
|
|
138
|
-
expect(parseDependencies(content)).toEqual(['
|
|
138
|
+
expect(parseDependencies(content)).toEqual(['01', '02', '03']);
|
|
139
139
|
});
|
|
140
140
|
|
|
141
141
|
it('should return empty array when no Dependencies section', () => {
|
|
@@ -161,22 +161,22 @@ Later it was blocked...
|
|
|
161
161
|
const content = `# Task
|
|
162
162
|
|
|
163
163
|
## Dependencies
|
|
164
|
-
|
|
164
|
+
01, invalid, 02, 1, 001, abcd
|
|
165
165
|
|
|
166
166
|
## Requirements
|
|
167
167
|
`;
|
|
168
|
-
expect(parseDependencies(content)).toEqual(['
|
|
168
|
+
expect(parseDependencies(content)).toEqual(['01', '02']);
|
|
169
169
|
});
|
|
170
170
|
|
|
171
|
-
it('should handle
|
|
171
|
+
it('should handle base36 task IDs', () => {
|
|
172
172
|
const content = `# Task
|
|
173
173
|
|
|
174
174
|
## Dependencies
|
|
175
|
-
|
|
175
|
+
0z, 10, zz
|
|
176
176
|
|
|
177
177
|
## Requirements
|
|
178
178
|
`;
|
|
179
|
-
expect(parseDependencies(content)).toEqual(['
|
|
179
|
+
expect(parseDependencies(content)).toEqual(['0z', '10', 'zz']);
|
|
180
180
|
});
|
|
181
181
|
});
|
|
182
182
|
|
|
@@ -193,19 +193,20 @@ Later it was blocked...
|
|
|
193
193
|
expect(projects).toEqual([]);
|
|
194
194
|
});
|
|
195
195
|
|
|
196
|
-
it('should discover projects matching
|
|
196
|
+
it('should discover projects matching 6-char base26 prefix pattern', () => {
|
|
197
197
|
const rafDir = path.join(tempDir, 'RAF');
|
|
198
198
|
fs.mkdirSync(rafDir);
|
|
199
|
-
fs.mkdirSync(path.join(rafDir, '
|
|
200
|
-
fs.mkdirSync(path.join(rafDir, '
|
|
199
|
+
fs.mkdirSync(path.join(rafDir, 'aaaaab-first-project'));
|
|
200
|
+
fs.mkdirSync(path.join(rafDir, 'aaaaac-second-project'));
|
|
201
201
|
fs.mkdirSync(path.join(rafDir, 'not-a-project'));
|
|
202
|
+
fs.mkdirSync(path.join(rafDir, '001-too-short'));
|
|
202
203
|
fs.writeFileSync(path.join(rafDir, 'some-file.txt'), 'content');
|
|
203
204
|
|
|
204
205
|
const projects = discoverProjects(rafDir);
|
|
205
206
|
expect(projects).toHaveLength(2);
|
|
206
207
|
expect(projects[0]?.number).toBe(1);
|
|
207
208
|
expect(projects[0]?.name).toBe('first-project');
|
|
208
|
-
expect(projects[0]?.path).toBe(path.join(rafDir, '
|
|
209
|
+
expect(projects[0]?.path).toBe(path.join(rafDir, 'aaaaab-first-project'));
|
|
209
210
|
expect(projects[1]?.number).toBe(2);
|
|
210
211
|
expect(projects[1]?.name).toBe('second-project');
|
|
211
212
|
});
|
|
@@ -213,9 +214,9 @@ Later it was blocked...
|
|
|
213
214
|
it('should sort projects by number', () => {
|
|
214
215
|
const rafDir = path.join(tempDir, 'RAF');
|
|
215
216
|
fs.mkdirSync(rafDir);
|
|
216
|
-
fs.mkdirSync(path.join(rafDir, '
|
|
217
|
-
fs.mkdirSync(path.join(rafDir, '
|
|
218
|
-
fs.mkdirSync(path.join(rafDir, '
|
|
217
|
+
fs.mkdirSync(path.join(rafDir, 'aaaaad-third'));
|
|
218
|
+
fs.mkdirSync(path.join(rafDir, 'aaaaab-first'));
|
|
219
|
+
fs.mkdirSync(path.join(rafDir, 'aaaaac-second'));
|
|
219
220
|
|
|
220
221
|
const projects = discoverProjects(rafDir);
|
|
221
222
|
expect(projects.map((p) => p.number)).toEqual([1, 2, 3]);
|
|
@@ -236,8 +237,8 @@ Later it was blocked...
|
|
|
236
237
|
|
|
237
238
|
it('should return ready when all tasks are pending', () => {
|
|
238
239
|
const tasks = [
|
|
239
|
-
{ id: '
|
|
240
|
-
{ id: '
|
|
240
|
+
{ id: '01', planFile: 'plans/01.md', status: 'pending' as const, dependencies: [] },
|
|
241
|
+
{ id: '02', planFile: 'plans/02.md', status: 'pending' as const, dependencies: [] },
|
|
241
242
|
];
|
|
242
243
|
const status = deriveProjectStatus(projectPath, tasks);
|
|
243
244
|
expect(status).toBe('ready');
|
|
@@ -245,8 +246,8 @@ Later it was blocked...
|
|
|
245
246
|
|
|
246
247
|
it('should return executing when some tasks are completed', () => {
|
|
247
248
|
const tasks = [
|
|
248
|
-
{ id: '
|
|
249
|
-
{ id: '
|
|
249
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
250
|
+
{ id: '02', planFile: 'plans/02.md', status: 'pending' as const, dependencies: [] },
|
|
250
251
|
];
|
|
251
252
|
const status = deriveProjectStatus(projectPath, tasks);
|
|
252
253
|
expect(status).toBe('executing');
|
|
@@ -254,8 +255,8 @@ Later it was blocked...
|
|
|
254
255
|
|
|
255
256
|
it('should return completed when all tasks are completed', () => {
|
|
256
257
|
const tasks = [
|
|
257
|
-
{ id: '
|
|
258
|
-
{ id: '
|
|
258
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
259
|
+
{ id: '02', planFile: 'plans/02.md', status: 'completed' as const, dependencies: [] },
|
|
259
260
|
];
|
|
260
261
|
const status = deriveProjectStatus(projectPath, tasks);
|
|
261
262
|
expect(status).toBe('completed');
|
|
@@ -263,9 +264,9 @@ Later it was blocked...
|
|
|
263
264
|
|
|
264
265
|
it('should return failed when any task has failed', () => {
|
|
265
266
|
const tasks = [
|
|
266
|
-
{ id: '
|
|
267
|
-
{ id: '
|
|
268
|
-
{ id: '
|
|
267
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
268
|
+
{ id: '02', planFile: 'plans/02.md', status: 'failed' as const, dependencies: [] },
|
|
269
|
+
{ id: '03', planFile: 'plans/03.md', status: 'pending' as const, dependencies: [] },
|
|
269
270
|
];
|
|
270
271
|
const status = deriveProjectStatus(projectPath, tasks);
|
|
271
272
|
expect(status).toBe('failed');
|
|
@@ -280,31 +281,31 @@ Later it was blocked...
|
|
|
280
281
|
});
|
|
281
282
|
|
|
282
283
|
it('should derive tasks from plan files with ready status', () => {
|
|
283
|
-
fs.writeFileSync(path.join(projectPath, 'plans', '
|
|
284
|
-
fs.writeFileSync(path.join(projectPath, 'plans', '
|
|
284
|
+
fs.writeFileSync(path.join(projectPath, 'plans', '01-first-task.md'), '# Task 1');
|
|
285
|
+
fs.writeFileSync(path.join(projectPath, 'plans', '02-second-task.md'), '# Task 2');
|
|
285
286
|
|
|
286
287
|
const state = deriveProjectState(projectPath);
|
|
287
288
|
expect(state.tasks).toHaveLength(2);
|
|
288
|
-
expect(state.tasks[0]?.id).toBe('
|
|
289
|
-
expect(state.tasks[0]?.planFile).toBe('plans/
|
|
289
|
+
expect(state.tasks[0]?.id).toBe('01');
|
|
290
|
+
expect(state.tasks[0]?.planFile).toBe('plans/01-first-task.md');
|
|
290
291
|
expect(state.tasks[0]?.status).toBe('pending');
|
|
291
|
-
expect(state.tasks[1]?.id).toBe('
|
|
292
|
+
expect(state.tasks[1]?.id).toBe('02');
|
|
292
293
|
expect(state.status).toBe('ready');
|
|
293
294
|
});
|
|
294
295
|
|
|
295
296
|
it('should match outcome statuses to tasks and derive failed status', () => {
|
|
296
297
|
// Create plan files
|
|
297
|
-
fs.writeFileSync(path.join(projectPath, 'plans', '
|
|
298
|
-
fs.writeFileSync(path.join(projectPath, 'plans', '
|
|
299
|
-
fs.writeFileSync(path.join(projectPath, 'plans', '
|
|
298
|
+
fs.writeFileSync(path.join(projectPath, 'plans', '01-task.md'), '# Task 1');
|
|
299
|
+
fs.writeFileSync(path.join(projectPath, 'plans', '02-task.md'), '# Task 2');
|
|
300
|
+
fs.writeFileSync(path.join(projectPath, 'plans', '03-task.md'), '# Task 3');
|
|
300
301
|
|
|
301
302
|
// Create outcome files with promise markers
|
|
302
303
|
fs.writeFileSync(
|
|
303
|
-
path.join(projectPath, 'outcomes', '
|
|
304
|
+
path.join(projectPath, 'outcomes', '01-task.md'),
|
|
304
305
|
'# Task 001 - Completed\n\n<promise>COMPLETE</promise>'
|
|
305
306
|
);
|
|
306
307
|
fs.writeFileSync(
|
|
307
|
-
path.join(projectPath, 'outcomes', '
|
|
308
|
+
path.join(projectPath, 'outcomes', '02-task.md'),
|
|
308
309
|
'# Task 002 - Failed\n\n<promise>FAILED</promise>'
|
|
309
310
|
);
|
|
310
311
|
|
|
@@ -317,14 +318,14 @@ Later it was blocked...
|
|
|
317
318
|
});
|
|
318
319
|
|
|
319
320
|
it('should derive completed status when all tasks completed', () => {
|
|
320
|
-
fs.writeFileSync(path.join(projectPath, 'plans', '
|
|
321
|
-
fs.writeFileSync(path.join(projectPath, 'plans', '
|
|
321
|
+
fs.writeFileSync(path.join(projectPath, 'plans', '01-task.md'), '# Task 1');
|
|
322
|
+
fs.writeFileSync(path.join(projectPath, 'plans', '02-task.md'), '# Task 2');
|
|
322
323
|
fs.writeFileSync(
|
|
323
|
-
path.join(projectPath, 'outcomes', '
|
|
324
|
+
path.join(projectPath, 'outcomes', '01-task.md'),
|
|
324
325
|
'# Task 001 - Completed\n\n<promise>COMPLETE</promise>'
|
|
325
326
|
);
|
|
326
327
|
fs.writeFileSync(
|
|
327
|
-
path.join(projectPath, 'outcomes', '
|
|
328
|
+
path.join(projectPath, 'outcomes', '02-task.md'),
|
|
328
329
|
'# Task 002 - Completed\n\n<promise>COMPLETE</promise>'
|
|
329
330
|
);
|
|
330
331
|
|
|
@@ -333,10 +334,10 @@ Later it was blocked...
|
|
|
333
334
|
});
|
|
334
335
|
|
|
335
336
|
it('should derive executing status when some tasks completed', () => {
|
|
336
|
-
fs.writeFileSync(path.join(projectPath, 'plans', '
|
|
337
|
-
fs.writeFileSync(path.join(projectPath, 'plans', '
|
|
337
|
+
fs.writeFileSync(path.join(projectPath, 'plans', '01-task.md'), '# Task 1');
|
|
338
|
+
fs.writeFileSync(path.join(projectPath, 'plans', '02-task.md'), '# Task 2');
|
|
338
339
|
fs.writeFileSync(
|
|
339
|
-
path.join(projectPath, 'outcomes', '
|
|
340
|
+
path.join(projectPath, 'outcomes', '01-task.md'),
|
|
340
341
|
'# Task 001 - Completed\n\n<promise>COMPLETE</promise>'
|
|
341
342
|
);
|
|
342
343
|
|
|
@@ -345,9 +346,9 @@ Later it was blocked...
|
|
|
345
346
|
});
|
|
346
347
|
|
|
347
348
|
it('should ignore outcome files without promise marker', () => {
|
|
348
|
-
fs.writeFileSync(path.join(projectPath, 'plans', '
|
|
349
|
+
fs.writeFileSync(path.join(projectPath, 'plans', '01-task.md'), '# Task 1');
|
|
349
350
|
fs.writeFileSync(
|
|
350
|
-
path.join(projectPath, 'outcomes', '
|
|
351
|
+
path.join(projectPath, 'outcomes', '01-task.md'),
|
|
351
352
|
'# Task 001 - Completed (no promise marker)'
|
|
352
353
|
);
|
|
353
354
|
|
|
@@ -356,7 +357,7 @@ Later it was blocked...
|
|
|
356
357
|
});
|
|
357
358
|
|
|
358
359
|
it('should ignore SUMMARY.md in outcomes', () => {
|
|
359
|
-
fs.writeFileSync(path.join(projectPath, 'plans', '
|
|
360
|
+
fs.writeFileSync(path.join(projectPath, 'plans', '01-task.md'), '# Task 1');
|
|
360
361
|
fs.writeFileSync(path.join(projectPath, 'outcomes', 'SUMMARY.md'), '# Summary');
|
|
361
362
|
|
|
362
363
|
const state = deriveProjectState(projectPath);
|
|
@@ -373,38 +374,38 @@ Later it was blocked...
|
|
|
373
374
|
|
|
374
375
|
it('should parse dependencies from plan files', () => {
|
|
375
376
|
fs.writeFileSync(
|
|
376
|
-
path.join(projectPath, 'plans', '
|
|
377
|
+
path.join(projectPath, 'plans', '01-task.md'),
|
|
377
378
|
'# Task 1\n\n## Dependencies\n\n## Requirements\n'
|
|
378
379
|
);
|
|
379
380
|
fs.writeFileSync(
|
|
380
|
-
path.join(projectPath, 'plans', '
|
|
381
|
-
'# Task 2\n\n## Dependencies\
|
|
381
|
+
path.join(projectPath, 'plans', '02-task.md'),
|
|
382
|
+
'# Task 2\n\n## Dependencies\n01\n\n## Requirements\n'
|
|
382
383
|
);
|
|
383
384
|
fs.writeFileSync(
|
|
384
|
-
path.join(projectPath, 'plans', '
|
|
385
|
-
'# Task 3\n\n## Dependencies\
|
|
385
|
+
path.join(projectPath, 'plans', '03-task.md'),
|
|
386
|
+
'# Task 3\n\n## Dependencies\n01, 02\n\n## Requirements\n'
|
|
386
387
|
);
|
|
387
388
|
|
|
388
389
|
const state = deriveProjectState(projectPath);
|
|
389
390
|
expect(state.tasks[0]?.dependencies).toEqual([]);
|
|
390
|
-
expect(state.tasks[1]?.dependencies).toEqual(['
|
|
391
|
-
expect(state.tasks[2]?.dependencies).toEqual(['
|
|
391
|
+
expect(state.tasks[1]?.dependencies).toEqual(['01']);
|
|
392
|
+
expect(state.tasks[2]?.dependencies).toEqual(['01', '02']);
|
|
392
393
|
});
|
|
393
394
|
|
|
394
395
|
it('should derive blocked status when dependency fails', () => {
|
|
395
|
-
// Task
|
|
396
|
+
// Task 01 has no dependencies
|
|
396
397
|
fs.writeFileSync(
|
|
397
|
-
path.join(projectPath, 'plans', '
|
|
398
|
+
path.join(projectPath, 'plans', '01-task.md'),
|
|
398
399
|
'# Task 1\n\n## Requirements\n'
|
|
399
400
|
);
|
|
400
|
-
// Task
|
|
401
|
+
// Task 02 depends on 01
|
|
401
402
|
fs.writeFileSync(
|
|
402
|
-
path.join(projectPath, 'plans', '
|
|
403
|
-
'# Task 2\n\n## Dependencies\
|
|
403
|
+
path.join(projectPath, 'plans', '02-task.md'),
|
|
404
|
+
'# Task 2\n\n## Dependencies\n01\n\n## Requirements\n'
|
|
404
405
|
);
|
|
405
|
-
// Task
|
|
406
|
+
// Task 01 failed
|
|
406
407
|
fs.writeFileSync(
|
|
407
|
-
path.join(projectPath, 'outcomes', '
|
|
408
|
+
path.join(projectPath, 'outcomes', '01-task.md'),
|
|
408
409
|
'<promise>FAILED</promise>'
|
|
409
410
|
);
|
|
410
411
|
|
|
@@ -414,24 +415,24 @@ Later it was blocked...
|
|
|
414
415
|
});
|
|
415
416
|
|
|
416
417
|
it('should derive transitive blocked status', () => {
|
|
417
|
-
// Task
|
|
418
|
+
// Task 01 has no dependencies
|
|
418
419
|
fs.writeFileSync(
|
|
419
|
-
path.join(projectPath, 'plans', '
|
|
420
|
+
path.join(projectPath, 'plans', '01-task.md'),
|
|
420
421
|
'# Task 1\n\n## Requirements\n'
|
|
421
422
|
);
|
|
422
|
-
// Task
|
|
423
|
+
// Task 02 depends on 01
|
|
423
424
|
fs.writeFileSync(
|
|
424
|
-
path.join(projectPath, 'plans', '
|
|
425
|
-
'# Task 2\n\n## Dependencies\
|
|
425
|
+
path.join(projectPath, 'plans', '02-task.md'),
|
|
426
|
+
'# Task 2\n\n## Dependencies\n01\n\n## Requirements\n'
|
|
426
427
|
);
|
|
427
|
-
// Task
|
|
428
|
+
// Task 03 depends on 02
|
|
428
429
|
fs.writeFileSync(
|
|
429
|
-
path.join(projectPath, 'plans', '
|
|
430
|
-
'# Task 3\n\n## Dependencies\
|
|
430
|
+
path.join(projectPath, 'plans', '03-task.md'),
|
|
431
|
+
'# Task 3\n\n## Dependencies\n02\n\n## Requirements\n'
|
|
431
432
|
);
|
|
432
|
-
// Task
|
|
433
|
+
// Task 01 failed
|
|
433
434
|
fs.writeFileSync(
|
|
434
|
-
path.join(projectPath, 'outcomes', '
|
|
435
|
+
path.join(projectPath, 'outcomes', '01-task.md'),
|
|
435
436
|
'<promise>FAILED</promise>'
|
|
436
437
|
);
|
|
437
438
|
|
|
@@ -443,15 +444,15 @@ Later it was blocked...
|
|
|
443
444
|
|
|
444
445
|
it('should not block when all dependencies are completed', () => {
|
|
445
446
|
fs.writeFileSync(
|
|
446
|
-
path.join(projectPath, 'plans', '
|
|
447
|
+
path.join(projectPath, 'plans', '01-task.md'),
|
|
447
448
|
'# Task 1\n\n## Requirements\n'
|
|
448
449
|
);
|
|
449
450
|
fs.writeFileSync(
|
|
450
|
-
path.join(projectPath, 'plans', '
|
|
451
|
-
'# Task 2\n\n## Dependencies\
|
|
451
|
+
path.join(projectPath, 'plans', '02-task.md'),
|
|
452
|
+
'# Task 2\n\n## Dependencies\n01\n\n## Requirements\n'
|
|
452
453
|
);
|
|
453
454
|
fs.writeFileSync(
|
|
454
|
-
path.join(projectPath, 'outcomes', '
|
|
455
|
+
path.join(projectPath, 'outcomes', '01-task.md'),
|
|
455
456
|
'<promise>COMPLETE</promise>'
|
|
456
457
|
);
|
|
457
458
|
|
|
@@ -461,21 +462,21 @@ Later it was blocked...
|
|
|
461
462
|
});
|
|
462
463
|
|
|
463
464
|
it('should block when any dependency is blocked', () => {
|
|
464
|
-
//
|
|
465
|
+
// 01 fails, 02 depends on 01 (blocked), 03 depends on 02 (blocked)
|
|
465
466
|
fs.writeFileSync(
|
|
466
|
-
path.join(projectPath, 'plans', '
|
|
467
|
+
path.join(projectPath, 'plans', '01-task.md'),
|
|
467
468
|
'# Task 1\n\n## Requirements\n'
|
|
468
469
|
);
|
|
469
470
|
fs.writeFileSync(
|
|
470
|
-
path.join(projectPath, 'plans', '
|
|
471
|
-
'# Task 2\n\n## Dependencies\
|
|
471
|
+
path.join(projectPath, 'plans', '02-task.md'),
|
|
472
|
+
'# Task 2\n\n## Dependencies\n01\n\n## Requirements\n'
|
|
472
473
|
);
|
|
473
474
|
fs.writeFileSync(
|
|
474
|
-
path.join(projectPath, 'plans', '
|
|
475
|
-
'# Task 3\n\n## Dependencies\
|
|
475
|
+
path.join(projectPath, 'plans', '03-task.md'),
|
|
476
|
+
'# Task 3\n\n## Dependencies\n02\n\n## Requirements\n'
|
|
476
477
|
);
|
|
477
478
|
fs.writeFileSync(
|
|
478
|
-
path.join(projectPath, 'outcomes', '
|
|
479
|
+
path.join(projectPath, 'outcomes', '01-task.md'),
|
|
479
480
|
'<promise>FAILED</promise>'
|
|
480
481
|
);
|
|
481
482
|
|
|
@@ -485,11 +486,11 @@ Later it was blocked...
|
|
|
485
486
|
|
|
486
487
|
it('should recognize BLOCKED marker in outcome file', () => {
|
|
487
488
|
fs.writeFileSync(
|
|
488
|
-
path.join(projectPath, 'plans', '
|
|
489
|
+
path.join(projectPath, 'plans', '01-task.md'),
|
|
489
490
|
'# Task 1\n\n## Requirements\n'
|
|
490
491
|
);
|
|
491
492
|
fs.writeFileSync(
|
|
492
|
-
path.join(projectPath, 'outcomes', '
|
|
493
|
+
path.join(projectPath, 'outcomes', '01-task.md'),
|
|
493
494
|
'<promise>BLOCKED</promise>'
|
|
494
495
|
);
|
|
495
496
|
|
|
@@ -503,21 +504,21 @@ Later it was blocked...
|
|
|
503
504
|
const state = {
|
|
504
505
|
status: 'executing' as DerivedProjectStatus,
|
|
505
506
|
tasks: [
|
|
506
|
-
{ id: '
|
|
507
|
-
{ id: '
|
|
508
|
-
{ id: '
|
|
507
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
508
|
+
{ id: '02', planFile: 'plans/02.md', status: 'pending' as const, dependencies: [] },
|
|
509
|
+
{ id: '03', planFile: 'plans/03.md', status: 'pending' as const, dependencies: [] },
|
|
509
510
|
],
|
|
510
511
|
};
|
|
511
512
|
const task = getNextPendingTask(state);
|
|
512
|
-
expect(task?.id).toBe('
|
|
513
|
+
expect(task?.id).toBe('02');
|
|
513
514
|
});
|
|
514
515
|
|
|
515
516
|
it('should return null when no pending tasks', () => {
|
|
516
517
|
const state = {
|
|
517
518
|
status: 'failed' as DerivedProjectStatus,
|
|
518
519
|
tasks: [
|
|
519
|
-
{ id: '
|
|
520
|
-
{ id: '
|
|
520
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
521
|
+
{ id: '02', planFile: 'plans/02.md', status: 'failed' as const, dependencies: [] },
|
|
521
522
|
],
|
|
522
523
|
};
|
|
523
524
|
const task = getNextPendingTask(state);
|
|
@@ -528,13 +529,13 @@ Later it was blocked...
|
|
|
528
529
|
const state = {
|
|
529
530
|
status: 'failed' as DerivedProjectStatus,
|
|
530
531
|
tasks: [
|
|
531
|
-
{ id: '
|
|
532
|
-
{ id: '
|
|
533
|
-
{ id: '
|
|
532
|
+
{ id: '01', planFile: 'plans/01.md', status: 'failed' as const, dependencies: [] },
|
|
533
|
+
{ id: '02', planFile: 'plans/02.md', status: 'blocked' as const, dependencies: ['01'] },
|
|
534
|
+
{ id: '03', planFile: 'plans/03.md', status: 'pending' as const, dependencies: [] },
|
|
534
535
|
],
|
|
535
536
|
};
|
|
536
537
|
const task = getNextPendingTask(state);
|
|
537
|
-
expect(task?.id).toBe('
|
|
538
|
+
expect(task?.id).toBe('03');
|
|
538
539
|
});
|
|
539
540
|
});
|
|
540
541
|
|
|
@@ -543,45 +544,45 @@ Later it was blocked...
|
|
|
543
544
|
const state = {
|
|
544
545
|
status: 'failed' as DerivedProjectStatus,
|
|
545
546
|
tasks: [
|
|
546
|
-
{ id: '
|
|
547
|
-
{ id: '
|
|
547
|
+
{ id: '01', planFile: 'plans/01.md', status: 'failed' as const, dependencies: [] },
|
|
548
|
+
{ id: '02', planFile: 'plans/02.md', status: 'pending' as const, dependencies: [] },
|
|
548
549
|
],
|
|
549
550
|
};
|
|
550
551
|
const task = getNextExecutableTask(state);
|
|
551
|
-
expect(task?.id).toBe('
|
|
552
|
+
expect(task?.id).toBe('02');
|
|
552
553
|
});
|
|
553
554
|
|
|
554
555
|
it('should return failed task when no pending', () => {
|
|
555
556
|
const state = {
|
|
556
557
|
status: 'failed' as DerivedProjectStatus,
|
|
557
558
|
tasks: [
|
|
558
|
-
{ id: '
|
|
559
|
-
{ id: '
|
|
559
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
560
|
+
{ id: '02', planFile: 'plans/02.md', status: 'failed' as const, dependencies: [] },
|
|
560
561
|
],
|
|
561
562
|
};
|
|
562
563
|
const task = getNextExecutableTask(state);
|
|
563
|
-
expect(task?.id).toBe('
|
|
564
|
+
expect(task?.id).toBe('02');
|
|
564
565
|
});
|
|
565
566
|
|
|
566
567
|
it('should skip blocked tasks when looking for pending', () => {
|
|
567
568
|
const state = {
|
|
568
569
|
status: 'failed' as DerivedProjectStatus,
|
|
569
570
|
tasks: [
|
|
570
|
-
{ id: '
|
|
571
|
-
{ id: '
|
|
572
|
-
{ id: '
|
|
571
|
+
{ id: '01', planFile: 'plans/01.md', status: 'failed' as const, dependencies: [] },
|
|
572
|
+
{ id: '02', planFile: 'plans/02.md', status: 'blocked' as const, dependencies: ['01'] },
|
|
573
|
+
{ id: '03', planFile: 'plans/03.md', status: 'pending' as const, dependencies: [] },
|
|
573
574
|
],
|
|
574
575
|
};
|
|
575
576
|
const task = getNextExecutableTask(state);
|
|
576
|
-
expect(task?.id).toBe('
|
|
577
|
+
expect(task?.id).toBe('03');
|
|
577
578
|
});
|
|
578
579
|
|
|
579
580
|
it('should return null when only blocked tasks remain', () => {
|
|
580
581
|
const state = {
|
|
581
582
|
status: 'failed' as DerivedProjectStatus,
|
|
582
583
|
tasks: [
|
|
583
|
-
{ id: '
|
|
584
|
-
{ id: '
|
|
584
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
585
|
+
{ id: '02', planFile: 'plans/02.md', status: 'blocked' as const, dependencies: ['03'] },
|
|
585
586
|
],
|
|
586
587
|
};
|
|
587
588
|
const task = getNextExecutableTask(state);
|
|
@@ -594,10 +595,10 @@ Later it was blocked...
|
|
|
594
595
|
const state = {
|
|
595
596
|
status: 'failed' as DerivedProjectStatus,
|
|
596
597
|
tasks: [
|
|
597
|
-
{ id: '
|
|
598
|
-
{ id: '
|
|
599
|
-
{ id: '
|
|
600
|
-
{ id: '
|
|
598
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
599
|
+
{ id: '02', planFile: 'plans/02.md', status: 'failed' as const, dependencies: [] },
|
|
600
|
+
{ id: '03', planFile: 'plans/03.md', status: 'pending' as const, dependencies: [] },
|
|
601
|
+
{ id: '04', planFile: 'plans/04.md', status: 'pending' as const, dependencies: [] },
|
|
601
602
|
],
|
|
602
603
|
};
|
|
603
604
|
const stats = getDerivedStats(state);
|
|
@@ -612,10 +613,10 @@ Later it was blocked...
|
|
|
612
613
|
const state = {
|
|
613
614
|
status: 'failed' as DerivedProjectStatus,
|
|
614
615
|
tasks: [
|
|
615
|
-
{ id: '
|
|
616
|
-
{ id: '
|
|
617
|
-
{ id: '
|
|
618
|
-
{ id: '
|
|
616
|
+
{ id: '01', planFile: 'plans/01.md', status: 'failed' as const, dependencies: [] },
|
|
617
|
+
{ id: '02', planFile: 'plans/02.md', status: 'blocked' as const, dependencies: ['01'] },
|
|
618
|
+
{ id: '03', planFile: 'plans/03.md', status: 'blocked' as const, dependencies: ['02'] },
|
|
619
|
+
{ id: '04', planFile: 'plans/04.md', status: 'pending' as const, dependencies: [] },
|
|
619
620
|
],
|
|
620
621
|
};
|
|
621
622
|
const stats = getDerivedStats(state);
|
|
@@ -632,13 +633,13 @@ Later it was blocked...
|
|
|
632
633
|
const state = {
|
|
633
634
|
status: 'executing' as DerivedProjectStatus,
|
|
634
635
|
tasks: [
|
|
635
|
-
{ id: '
|
|
636
|
-
{ id: '
|
|
637
|
-
{ id: '
|
|
638
|
-
{ id: '
|
|
636
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
637
|
+
{ id: '02', planFile: 'plans/02.md', status: 'failed' as const, dependencies: [] },
|
|
638
|
+
{ id: '03', planFile: 'plans/03.md', status: 'pending' as const, dependencies: [] },
|
|
639
|
+
{ id: '04', planFile: 'plans/04.md', status: 'blocked' as const, dependencies: ['02'] },
|
|
639
640
|
],
|
|
640
641
|
};
|
|
641
|
-
const stats = getDerivedStatsForTasks(state, ['
|
|
642
|
+
const stats = getDerivedStatsForTasks(state, ['01', '03', '04']);
|
|
642
643
|
expect(stats.completed).toBe(1);
|
|
643
644
|
expect(stats.failed).toBe(0);
|
|
644
645
|
expect(stats.pending).toBe(1);
|
|
@@ -650,11 +651,11 @@ Later it was blocked...
|
|
|
650
651
|
const state = {
|
|
651
652
|
status: 'executing' as DerivedProjectStatus,
|
|
652
653
|
tasks: [
|
|
653
|
-
{ id: '
|
|
654
|
-
{ id: '
|
|
654
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
655
|
+
{ id: '02', planFile: 'plans/02.md', status: 'failed' as const, dependencies: [] },
|
|
655
656
|
],
|
|
656
657
|
};
|
|
657
|
-
const stats = getDerivedStatsForTasks(state, ['
|
|
658
|
+
const stats = getDerivedStatsForTasks(state, ['zz']);
|
|
658
659
|
expect(stats.completed).toBe(0);
|
|
659
660
|
expect(stats.failed).toBe(0);
|
|
660
661
|
expect(stats.pending).toBe(0);
|
|
@@ -668,8 +669,8 @@ Later it was blocked...
|
|
|
668
669
|
const state = {
|
|
669
670
|
status: 'completed' as DerivedProjectStatus,
|
|
670
671
|
tasks: [
|
|
671
|
-
{ id: '
|
|
672
|
-
{ id: '
|
|
672
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
673
|
+
{ id: '02', planFile: 'plans/02.md', status: 'completed' as const, dependencies: [] },
|
|
673
674
|
],
|
|
674
675
|
};
|
|
675
676
|
expect(isProjectComplete(state)).toBe(true);
|
|
@@ -679,8 +680,8 @@ Later it was blocked...
|
|
|
679
680
|
const state = {
|
|
680
681
|
status: 'executing' as DerivedProjectStatus,
|
|
681
682
|
tasks: [
|
|
682
|
-
{ id: '
|
|
683
|
-
{ id: '
|
|
683
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
684
|
+
{ id: '02', planFile: 'plans/02.md', status: 'pending' as const, dependencies: [] },
|
|
684
685
|
],
|
|
685
686
|
};
|
|
686
687
|
expect(isProjectComplete(state)).toBe(false);
|
|
@@ -690,8 +691,8 @@ Later it was blocked...
|
|
|
690
691
|
const state = {
|
|
691
692
|
status: 'failed' as DerivedProjectStatus,
|
|
692
693
|
tasks: [
|
|
693
|
-
{ id: '
|
|
694
|
-
{ id: '
|
|
694
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
695
|
+
{ id: '02', planFile: 'plans/02.md', status: 'failed' as const, dependencies: [] },
|
|
695
696
|
],
|
|
696
697
|
};
|
|
697
698
|
expect(isProjectComplete(state)).toBe(false);
|
|
@@ -701,8 +702,8 @@ Later it was blocked...
|
|
|
701
702
|
const state = {
|
|
702
703
|
status: 'failed' as DerivedProjectStatus,
|
|
703
704
|
tasks: [
|
|
704
|
-
{ id: '
|
|
705
|
-
{ id: '
|
|
705
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
706
|
+
{ id: '02', planFile: 'plans/02.md', status: 'blocked' as const, dependencies: ['03'] },
|
|
706
707
|
],
|
|
707
708
|
};
|
|
708
709
|
expect(isProjectComplete(state)).toBe(false);
|
|
@@ -719,8 +720,8 @@ Later it was blocked...
|
|
|
719
720
|
const state = {
|
|
720
721
|
status: 'failed' as DerivedProjectStatus,
|
|
721
722
|
tasks: [
|
|
722
|
-
{ id: '
|
|
723
|
-
{ id: '
|
|
723
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
724
|
+
{ id: '02', planFile: 'plans/02.md', status: 'failed' as const, dependencies: [] },
|
|
724
725
|
],
|
|
725
726
|
};
|
|
726
727
|
expect(hasProjectFailed(state)).toBe(true);
|
|
@@ -730,8 +731,8 @@ Later it was blocked...
|
|
|
730
731
|
const state = {
|
|
731
732
|
status: 'executing' as DerivedProjectStatus,
|
|
732
733
|
tasks: [
|
|
733
|
-
{ id: '
|
|
734
|
-
{ id: '
|
|
734
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
735
|
+
{ id: '02', planFile: 'plans/02.md', status: 'pending' as const, dependencies: [] },
|
|
735
736
|
],
|
|
736
737
|
};
|
|
737
738
|
expect(hasProjectFailed(state)).toBe(false);
|
|
@@ -741,8 +742,8 @@ Later it was blocked...
|
|
|
741
742
|
const state = {
|
|
742
743
|
status: 'failed' as DerivedProjectStatus,
|
|
743
744
|
tasks: [
|
|
744
|
-
{ id: '
|
|
745
|
-
{ id: '
|
|
745
|
+
{ id: '01', planFile: 'plans/01.md', status: 'completed' as const, dependencies: [] },
|
|
746
|
+
{ id: '02', planFile: 'plans/02.md', status: 'blocked' as const, dependencies: ['03'] },
|
|
746
747
|
],
|
|
747
748
|
};
|
|
748
749
|
expect(hasProjectFailed(state)).toBe(false);
|