edsger 0.50.0 → 0.52.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 +23 -3
- package/.env.local +12 -0
- package/README.md +25 -25
- package/dist/api/chat.d.ts +7 -7
- package/dist/api/chat.js +13 -13
- package/dist/api/cross-product.d.ts +10 -10
- package/dist/api/cross-product.js +30 -30
- package/dist/api/github.d.ts +5 -5
- package/dist/api/github.js +10 -10
- package/dist/api/intelligence.d.ts +3 -3
- package/dist/api/issues/approval-checker.d.ts +20 -0
- package/dist/api/{features → issues}/approval-checker.js +16 -16
- package/dist/api/issues/get-issue.d.ts +5 -0
- package/dist/api/issues/get-issue.js +21 -0
- package/dist/api/issues/index.d.ts +8 -0
- package/dist/api/issues/index.js +10 -0
- package/dist/api/issues/issue-utils.d.ts +23 -0
- package/dist/api/issues/issue-utils.js +80 -0
- package/dist/api/issues/status-updater.d.ts +41 -0
- package/dist/api/{features → issues}/status-updater.js +23 -23
- package/dist/api/{features → issues}/test-cases.d.ts +7 -7
- package/dist/api/{features → issues}/test-cases.js +12 -12
- package/dist/api/issues/update-issue.d.ts +20 -0
- package/dist/api/{features/update-feature.js → issues/update-issue.js} +22 -22
- package/dist/api/{features → issues}/user-stories.d.ts +5 -5
- package/dist/api/{features → issues}/user-stories.js +8 -8
- package/dist/api/products.d.ts +1 -1
- package/dist/api/tasks.d.ts +1 -1
- package/dist/api/test-reports.d.ts +2 -2
- package/dist/api/test-reports.js +4 -4
- package/dist/auth/login.js +1 -1
- package/dist/commands/agent-workflow/chat-worker.d.ts +7 -7
- package/dist/commands/agent-workflow/chat-worker.js +50 -50
- package/dist/commands/agent-workflow/index.d.ts +2 -2
- package/dist/commands/agent-workflow/index.js +3 -3
- package/dist/commands/agent-workflow/{feature-worker.d.ts → issue-worker.d.ts} +4 -4
- package/dist/commands/agent-workflow/{feature-worker.js → issue-worker.js} +12 -12
- package/dist/commands/agent-workflow/processor.d.ts +9 -9
- package/dist/commands/agent-workflow/processor.js +90 -90
- package/dist/commands/build/index.js +2 -2
- package/dist/commands/find-bugs/index.d.ts +11 -0
- package/dist/commands/find-bugs/index.js +39 -0
- package/dist/commands/find-features/index.d.ts +14 -0
- package/dist/commands/find-features/index.js +42 -0
- package/dist/commands/find-smells/index.d.ts +21 -0
- package/dist/commands/find-smells/index.js +65 -0
- package/dist/commands/init/prompts.js +1 -1
- package/dist/commands/init/templates.d.ts +1 -1
- package/dist/commands/init/templates.js +4 -4
- package/dist/commands/workflow/config/phase-configs.js +17 -17
- package/dist/commands/workflow/core/index.d.ts +1 -1
- package/dist/commands/workflow/core/index.js +2 -2
- package/dist/commands/workflow/core/issue-filter.d.ts +16 -0
- package/dist/commands/workflow/core/issue-filter.js +47 -0
- package/dist/commands/workflow/core/state-manager.d.ts +10 -10
- package/dist/commands/workflow/core/state-manager.js +10 -10
- package/dist/commands/workflow/core/workflow-logger.d.ts +9 -9
- package/dist/commands/workflow/core/workflow-logger.js +21 -21
- package/dist/commands/workflow/executors/phase-executor.d.ts +2 -2
- package/dist/commands/workflow/executors/phase-executor.js +32 -32
- package/dist/commands/workflow/issue-coordinator.d.ts +18 -0
- package/dist/commands/workflow/{feature-coordinator.js → issue-coordinator.js} +29 -29
- package/dist/commands/workflow/phase-orchestrator.d.ts +2 -2
- package/dist/commands/workflow/phase-orchestrator.js +82 -82
- package/dist/commands/workflow/processor.d.ts +7 -7
- package/dist/commands/workflow/processor.js +44 -44
- package/dist/config/{feature-status.d.ts → issue-status.d.ts} +14 -14
- package/dist/config/{feature-status.js → issue-status.js} +14 -14
- package/dist/errors/index.d.ts +6 -6
- package/dist/errors/index.js +11 -11
- package/dist/index.js +90 -1
- package/dist/phases/app-store-generation/context.js +6 -6
- package/dist/phases/app-store-generation/index.js +2 -2
- package/dist/phases/app-store-generation/prompts.js +2 -2
- package/dist/phases/autonomous/index.d.ts +3 -3
- package/dist/phases/autonomous/index.js +37 -37
- package/dist/phases/autonomous/prompts.d.ts +2 -2
- package/dist/phases/autonomous/prompts.js +4 -4
- package/dist/phases/branch-planning/context.d.ts +3 -3
- package/dist/phases/branch-planning/context.js +12 -12
- package/dist/phases/branch-planning/index.d.ts +3 -3
- package/dist/phases/branch-planning/index.js +32 -32
- package/dist/phases/branch-planning/outcome.d.ts +5 -5
- package/dist/phases/branch-planning/outcome.js +12 -12
- package/dist/phases/branch-planning/prompts.d.ts +3 -3
- package/dist/phases/branch-planning/prompts.js +13 -13
- package/dist/phases/bug-fixing/analyzer.d.ts +2 -2
- package/dist/phases/bug-fixing/analyzer.js +13 -13
- package/dist/phases/bug-fixing/context-fetcher.d.ts +3 -3
- package/dist/phases/bug-fixing/context-fetcher.js +18 -18
- package/dist/phases/bug-fixing/mcp-server.js +17 -18
- package/dist/phases/chat-processor/context.d.ts +5 -5
- package/dist/phases/chat-processor/context.js +17 -17
- package/dist/phases/chat-processor/index.d.ts +4 -4
- package/dist/phases/chat-processor/index.js +17 -17
- package/dist/phases/chat-processor/product-context.d.ts +3 -3
- package/dist/phases/chat-processor/product-context.js +16 -16
- package/dist/phases/chat-processor/product-prompts.d.ts +1 -1
- package/dist/phases/chat-processor/product-prompts.js +10 -10
- package/dist/phases/chat-processor/product-tools.d.ts +2 -2
- package/dist/phases/chat-processor/product-tools.js +33 -33
- package/dist/phases/chat-processor/prompts.d.ts +3 -3
- package/dist/phases/chat-processor/prompts.js +22 -22
- package/dist/phases/chat-processor/tools.js +46 -46
- package/dist/phases/code-implementation/branch-pr-creator.d.ts +3 -3
- package/dist/phases/code-implementation/branch-pr-creator.js +5 -5
- package/dist/phases/code-implementation/context.d.ts +3 -3
- package/dist/phases/code-implementation/context.js +18 -18
- package/dist/phases/code-implementation/index.d.ts +4 -4
- package/dist/phases/code-implementation/index.js +88 -88
- package/dist/phases/code-implementation/outcome.d.ts +3 -3
- package/dist/phases/code-implementation/outcome.js +6 -6
- package/dist/phases/code-implementation/prompts.d.ts +1 -1
- package/dist/phases/code-implementation/prompts.js +6 -6
- package/dist/phases/code-implementation-verification/agent.d.ts +3 -3
- package/dist/phases/code-implementation-verification/agent.js +5 -5
- package/dist/phases/code-implementation-verification/index.d.ts +3 -3
- package/dist/phases/code-implementation-verification/index.js +11 -11
- package/dist/phases/code-implementation-verification/prompts.d.ts +3 -3
- package/dist/phases/code-implementation-verification/prompts.js +7 -7
- package/dist/phases/code-refine/context.d.ts +8 -8
- package/dist/phases/code-refine/context.js +29 -29
- package/dist/phases/code-refine/index.d.ts +2 -2
- package/dist/phases/code-refine/index.js +20 -20
- package/dist/phases/code-refine/prompts.d.ts +1 -1
- package/dist/phases/code-refine/prompts.js +3 -3
- package/dist/phases/code-refine/refine-iteration.d.ts +1 -1
- package/dist/phases/code-refine/refine-iteration.js +4 -4
- package/dist/phases/code-refine/retry-handler.js +2 -2
- package/dist/phases/code-refine-verification/index.js +10 -10
- package/dist/phases/code-refine-verification/types.d.ts +2 -2
- package/dist/phases/code-review/context.d.ts +8 -8
- package/dist/phases/code-review/context.js +25 -25
- package/dist/phases/code-review/diff-utils.d.ts +1 -1
- package/dist/phases/code-review/diff-utils.js +1 -1
- package/dist/phases/code-review/index.d.ts +2 -2
- package/dist/phases/code-review/index.js +26 -26
- package/dist/phases/code-testing/analyzer.d.ts +2 -2
- package/dist/phases/code-testing/analyzer.js +18 -18
- package/dist/phases/code-testing/context-fetcher.d.ts +3 -3
- package/dist/phases/code-testing/context-fetcher.js +16 -16
- package/dist/phases/code-testing/prompts.d.ts +1 -1
- package/dist/phases/code-testing/prompts.js +5 -5
- package/dist/phases/find-bugs/index.d.ts +30 -0
- package/dist/phases/find-bugs/index.js +216 -0
- package/dist/phases/find-bugs/prompts.d.ts +22 -0
- package/dist/phases/find-bugs/prompts.js +101 -0
- package/dist/phases/find-bugs/state.d.ts +19 -0
- package/dist/phases/find-bugs/state.js +13 -0
- package/dist/phases/find-bugs/types.d.ts +21 -0
- package/dist/phases/find-bugs/types.js +16 -0
- package/dist/phases/find-features/index.d.ts +40 -0
- package/dist/phases/find-features/index.js +279 -0
- package/dist/phases/find-features/prompts.d.ts +43 -0
- package/dist/phases/find-features/prompts.js +138 -0
- package/dist/phases/find-features/state.d.ts +25 -0
- package/dist/phases/find-features/state.js +22 -0
- package/dist/phases/find-features/types.d.ts +27 -0
- package/dist/phases/find-features/types.js +16 -0
- package/dist/phases/find-shared/git.d.ts +24 -0
- package/dist/phases/find-shared/git.js +60 -0
- package/dist/phases/find-shared/mcp.d.ts +33 -0
- package/dist/phases/find-shared/mcp.js +69 -0
- package/dist/phases/find-shared/scan-state.d.ts +33 -0
- package/dist/phases/find-shared/scan-state.js +112 -0
- package/dist/phases/find-smells/index.d.ts +47 -0
- package/dist/phases/find-smells/index.js +278 -0
- package/dist/phases/find-smells/prompts.d.ts +30 -0
- package/dist/phases/find-smells/prompts.js +129 -0
- package/dist/phases/find-smells/state.d.ts +21 -0
- package/dist/phases/find-smells/state.js +17 -0
- package/dist/phases/find-smells/types.d.ts +51 -0
- package/dist/phases/find-smells/types.js +64 -0
- package/dist/phases/functional-testing/analyzer.d.ts +2 -2
- package/dist/phases/functional-testing/analyzer.js +40 -40
- package/dist/phases/functional-testing/context-fetcher.d.ts +3 -3
- package/dist/phases/functional-testing/context-fetcher.js +16 -16
- package/dist/phases/functional-testing/http-fallback.d.ts +2 -2
- package/dist/phases/functional-testing/http-fallback.js +9 -9
- package/dist/phases/functional-testing/mcp-server.js +23 -24
- package/dist/phases/functional-testing/prompts.d.ts +1 -1
- package/dist/phases/functional-testing/prompts.js +4 -4
- package/dist/phases/functional-testing/test-report-creator.d.ts +2 -2
- package/dist/phases/functional-testing/test-report-creator.js +10 -10
- package/dist/phases/functional-testing/test-retry-handler.js +3 -3
- package/dist/phases/growth-analysis/context.js +6 -6
- package/dist/phases/growth-analysis/index.js +2 -2
- package/dist/phases/growth-analysis/prompts.js +2 -2
- package/dist/phases/intelligence-analysis/context.js +7 -7
- package/dist/phases/intelligence-analysis/index.js +3 -3
- package/dist/phases/{feature-analysis → issue-analysis}/agent.js +1 -1
- package/dist/phases/issue-analysis/context.d.ts +24 -0
- package/dist/phases/{feature-analysis → issue-analysis}/context.js +30 -30
- package/dist/phases/issue-analysis/index.d.ts +8 -0
- package/dist/phases/{feature-analysis → issue-analysis}/index.js +29 -29
- package/dist/phases/issue-analysis/outcome.d.ts +40 -0
- package/dist/phases/{feature-analysis → issue-analysis}/outcome.js +17 -17
- package/dist/phases/{feature-analysis → issue-analysis}/prompts.d.ts +3 -3
- package/dist/phases/{feature-analysis → issue-analysis}/prompts.js +12 -12
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/agent.d.ts +2 -2
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/agent.js +1 -1
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/index.d.ts +5 -5
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/index.js +9 -9
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/prompts.d.ts +2 -2
- package/dist/phases/{feature-analysis-verification → issue-analysis-verification}/prompts.js +7 -7
- package/dist/phases/output-contracts.js +37 -37
- package/dist/phases/pr-execution/context.d.ts +3 -3
- package/dist/phases/pr-execution/context.js +14 -14
- package/dist/phases/pr-execution/index.d.ts +2 -2
- package/dist/phases/pr-execution/index.js +22 -22
- package/dist/phases/pr-execution/outcome.d.ts +4 -4
- package/dist/phases/pr-execution/outcome.js +6 -6
- package/dist/phases/pr-execution/prompts.d.ts +4 -4
- package/dist/phases/pr-execution/prompts.js +6 -6
- package/dist/phases/pr-resolve/checklist-learner.js +2 -2
- package/dist/phases/pr-review/index.d.ts +1 -1
- package/dist/phases/pr-review/index.js +1 -1
- package/dist/phases/pr-review/prompts.d.ts +1 -1
- package/dist/phases/pr-review/prompts.js +1 -1
- package/dist/phases/pr-shared/context.d.ts +3 -3
- package/dist/phases/pr-shared/context.js +3 -3
- package/dist/phases/pr-splitting/context.d.ts +3 -3
- package/dist/phases/pr-splitting/context.js +16 -16
- package/dist/phases/pr-splitting/index.d.ts +4 -4
- package/dist/phases/pr-splitting/index.js +29 -29
- package/dist/phases/pr-splitting/outcome.d.ts +3 -3
- package/dist/phases/pr-splitting/outcome.js +7 -7
- package/dist/phases/pr-splitting/prompts.d.ts +3 -3
- package/dist/phases/pr-splitting/prompts.js +11 -11
- package/dist/phases/pull-request/creator.d.ts +4 -4
- package/dist/phases/pull-request/creator.js +25 -25
- package/dist/phases/pull-request/handler.d.ts +3 -3
- package/dist/phases/pull-request/handler.js +16 -16
- package/dist/phases/release-sync/index.js +2 -2
- package/dist/phases/run-sheet/agent.js +1 -2
- package/dist/phases/run-sheet/index.js +3 -3
- package/dist/phases/smoke-test/index.js +2 -2
- package/dist/phases/technical-design/context.d.ts +3 -3
- package/dist/phases/technical-design/context.js +11 -11
- package/dist/phases/technical-design/index.d.ts +2 -2
- package/dist/phases/technical-design/index.js +27 -27
- package/dist/phases/technical-design/outcome.d.ts +4 -4
- package/dist/phases/technical-design/outcome.js +6 -6
- package/dist/phases/technical-design/prompts.d.ts +2 -2
- package/dist/phases/technical-design/prompts.js +10 -10
- package/dist/phases/technical-design-verification/agent.d.ts +3 -3
- package/dist/phases/technical-design-verification/agent.js +4 -4
- package/dist/phases/technical-design-verification/index.d.ts +4 -4
- package/dist/phases/technical-design-verification/index.js +12 -12
- package/dist/phases/technical-design-verification/prompts.d.ts +3 -3
- package/dist/phases/technical-design-verification/prompts.js +6 -6
- package/dist/phases/test-cases-analysis/context.d.ts +5 -5
- package/dist/phases/test-cases-analysis/context.js +18 -18
- package/dist/phases/test-cases-analysis/formatters.js +7 -7
- package/dist/phases/test-cases-analysis/index.d.ts +1 -1
- package/dist/phases/test-cases-analysis/index.js +21 -21
- package/dist/phases/test-cases-analysis/outcome.d.ts +7 -7
- package/dist/phases/test-cases-analysis/outcome.js +13 -13
- package/dist/phases/test-cases-analysis/prompts.d.ts +3 -3
- package/dist/phases/test-cases-analysis/prompts.js +6 -6
- package/dist/phases/user-stories-analysis/context.d.ts +5 -5
- package/dist/phases/user-stories-analysis/context.js +18 -18
- package/dist/phases/user-stories-analysis/formatters.js +7 -7
- package/dist/phases/user-stories-analysis/index.d.ts +1 -1
- package/dist/phases/user-stories-analysis/index.js +21 -21
- package/dist/phases/user-stories-analysis/outcome.d.ts +7 -7
- package/dist/phases/user-stories-analysis/outcome.js +13 -13
- package/dist/phases/user-stories-analysis/prompts.d.ts +3 -3
- package/dist/phases/user-stories-analysis/prompts.js +10 -10
- package/dist/services/audit-logs.d.ts +10 -10
- package/dist/services/audit-logs.js +12 -12
- package/dist/services/branches.d.ts +6 -6
- package/dist/services/branches.js +16 -16
- package/dist/services/checklist.d.ts +3 -3
- package/dist/services/checklist.js +11 -11
- package/dist/services/coaching/coaching-agent.js +2 -2
- package/dist/services/coaching/coaching-loop.d.ts +1 -1
- package/dist/services/coaching/coaching-loop.js +2 -2
- package/dist/services/coaching/phase-coaching.d.ts +2 -2
- package/dist/services/coaching/phase-coaching.js +3 -3
- package/dist/services/coaching/self-rating.js +1 -1
- package/dist/services/feedbacks.d.ts +4 -4
- package/dist/services/feedbacks.js +8 -8
- package/dist/services/phase-hooks/bindings-fetcher.d.ts +4 -4
- package/dist/services/phase-hooks/bindings-fetcher.js +8 -8
- package/dist/services/phase-hooks/hook-executor.js +1 -1
- package/dist/services/phase-hooks/hook-logging.d.ts +2 -2
- package/dist/services/phase-hooks/hook-logging.js +4 -4
- package/dist/services/phase-hooks/hook-runner.d.ts +1 -1
- package/dist/services/phase-hooks/hook-runner.js +4 -4
- package/dist/services/phase-hooks/types.d.ts +3 -3
- package/dist/services/phase-ratings.d.ts +7 -7
- package/dist/services/phase-ratings.js +8 -8
- package/dist/services/pull-requests.d.ts +4 -4
- package/dist/services/pull-requests.js +11 -11
- package/dist/services/skill-resolver.d.ts +1 -1
- package/dist/services/skill-resolver.js +1 -1
- package/dist/skills/phase/app-store-generation/SKILL.md +9 -9
- package/dist/skills/phase/autonomous/SKILL.md +2 -2
- package/dist/skills/phase/branch-planning/SKILL.md +12 -12
- package/dist/skills/phase/bug-fixing/SKILL.md +1 -1
- package/dist/skills/phase/code-implementation/SKILL.md +6 -6
- package/dist/skills/phase/code-implementation-verification/SKILL.md +3 -3
- package/dist/skills/phase/code-testing/SKILL.md +5 -5
- package/dist/skills/phase/functional-testing/SKILL.md +3 -3
- package/dist/skills/phase/growth-analysis/SKILL.md +8 -8
- package/dist/skills/phase/incremental-sync/SKILL.md +6 -6
- package/dist/skills/phase/intelligence-analysis/SKILL.md +7 -7
- package/dist/skills/phase/{feature-analysis → issue-analysis}/SKILL.md +8 -8
- package/dist/skills/phase/pr-execution/SKILL.md +7 -7
- package/dist/skills/phase/pr-splitting/SKILL.md +14 -14
- package/dist/skills/phase/smoke-test/SKILL.md +1 -1
- package/dist/skills/phase/technical-design/SKILL.md +5 -5
- package/dist/skills/phase/test-cases-analysis/SKILL.md +4 -4
- package/dist/skills/phase/user-stories-analysis/SKILL.md +13 -13
- package/dist/system/session-manager.d.ts +3 -3
- package/dist/system/session-manager.js +3 -3
- package/dist/system/sleep-notification.js +2 -2
- package/dist/system/sleep-prevention.js +1 -1
- package/dist/types/index.d.ts +21 -21
- package/dist/types/{features.d.ts → issues.d.ts} +3 -3
- package/dist/types/pipeline.d.ts +4 -4
- package/dist/updater/auto-updater.d.ts +2 -2
- package/dist/updater/auto-updater.js +3 -3
- package/dist/utils/conflict-resolver.d.ts +1 -1
- package/dist/utils/conflict-resolver.js +5 -5
- package/dist/utils/formatters.d.ts +4 -4
- package/dist/utils/formatters.js +29 -29
- package/dist/utils/git-branch-manager-async.d.ts +6 -6
- package/dist/utils/git-branch-manager-async.js +41 -41
- package/dist/utils/git-branch-manager.d.ts +11 -11
- package/dist/utils/git-branch-manager.js +42 -42
- package/dist/utils/image-downloader.d.ts +4 -4
- package/dist/utils/image-downloader.js +17 -17
- package/dist/utils/pipeline-logger.d.ts +1 -1
- package/dist/utils/pipeline-logger.js +5 -5
- package/dist/workspace/workspace-manager.d.ts +17 -17
- package/dist/workspace/workspace-manager.js +21 -21
- package/package.json +1 -1
- package/vitest.config.ts +4 -0
- package/dist/api/__tests__/app-store.test.d.ts +0 -7
- package/dist/api/__tests__/app-store.test.js +0 -60
- package/dist/api/__tests__/intelligence.test.d.ts +0 -11
- package/dist/api/__tests__/intelligence.test.js +0 -315
- package/dist/api/features/__tests__/feature-utils.test.d.ts +0 -4
- package/dist/api/features/__tests__/feature-utils.test.js +0 -370
- package/dist/api/features/__tests__/status-updater.test.d.ts +0 -4
- package/dist/api/features/__tests__/status-updater.test.js +0 -88
- package/dist/api/features/approval-checker.d.ts +0 -20
- package/dist/api/features/feature-utils.d.ts +0 -23
- package/dist/api/features/feature-utils.js +0 -80
- package/dist/api/features/get-feature.d.ts +0 -5
- package/dist/api/features/get-feature.js +0 -21
- package/dist/api/features/index.d.ts +0 -8
- package/dist/api/features/index.js +0 -10
- package/dist/api/features/status-updater.d.ts +0 -41
- package/dist/api/features/update-feature.d.ts +0 -20
- package/dist/commands/build/__tests__/build.test.d.ts +0 -5
- package/dist/commands/build/__tests__/build.test.js +0 -206
- package/dist/commands/build/__tests__/detect-project.test.d.ts +0 -6
- package/dist/commands/build/__tests__/detect-project.test.js +0 -160
- package/dist/commands/build/__tests__/run-build.test.d.ts +0 -6
- package/dist/commands/build/__tests__/run-build.test.js +0 -433
- package/dist/commands/intelligence/__tests__/command.test.d.ts +0 -4
- package/dist/commands/intelligence/__tests__/command.test.js +0 -48
- package/dist/commands/workflow/core/__tests__/feature-filter.test.d.ts +0 -5
- package/dist/commands/workflow/core/__tests__/feature-filter.test.js +0 -316
- package/dist/commands/workflow/core/__tests__/pipeline-evaluator.test.d.ts +0 -4
- package/dist/commands/workflow/core/__tests__/pipeline-evaluator.test.js +0 -397
- package/dist/commands/workflow/core/__tests__/state-manager.test.d.ts +0 -4
- package/dist/commands/workflow/core/__tests__/state-manager.test.js +0 -384
- package/dist/commands/workflow/core/feature-filter.d.ts +0 -16
- package/dist/commands/workflow/core/feature-filter.js +0 -47
- package/dist/commands/workflow/feature-coordinator.d.ts +0 -18
- package/dist/config/__tests__/config.test.d.ts +0 -4
- package/dist/config/__tests__/config.test.js +0 -286
- package/dist/config/__tests__/feature-status.test.d.ts +0 -4
- package/dist/config/__tests__/feature-status.test.js +0 -111
- package/dist/errors/__tests__/index.test.d.ts +0 -4
- package/dist/errors/__tests__/index.test.js +0 -349
- package/dist/phases/app-store-generation/__tests__/agent.test.d.ts +0 -5
- package/dist/phases/app-store-generation/__tests__/agent.test.js +0 -142
- package/dist/phases/app-store-generation/__tests__/context.test.d.ts +0 -4
- package/dist/phases/app-store-generation/__tests__/context.test.js +0 -284
- package/dist/phases/app-store-generation/__tests__/prompts.test.d.ts +0 -4
- package/dist/phases/app-store-generation/__tests__/prompts.test.js +0 -122
- package/dist/phases/app-store-generation/__tests__/screenshot-composer.test.d.ts +0 -5
- package/dist/phases/app-store-generation/__tests__/screenshot-composer.test.js +0 -826
- package/dist/phases/code-review/__tests__/diff-utils.test.js +0 -101
- package/dist/phases/feature-analysis/context.d.ts +0 -24
- package/dist/phases/feature-analysis/index.d.ts +0 -8
- package/dist/phases/feature-analysis/outcome.d.ts +0 -40
- package/dist/phases/intelligence-analysis/__tests__/context.test.d.ts +0 -4
- package/dist/phases/intelligence-analysis/__tests__/context.test.js +0 -192
- package/dist/phases/intelligence-analysis/__tests__/matching.test.d.ts +0 -13
- package/dist/phases/intelligence-analysis/__tests__/matching.test.js +0 -154
- package/dist/phases/intelligence-analysis/__tests__/orchestration.test.d.ts +0 -5
- package/dist/phases/intelligence-analysis/__tests__/orchestration.test.js +0 -378
- package/dist/phases/intelligence-analysis/__tests__/prompts.test.d.ts +0 -4
- package/dist/phases/intelligence-analysis/__tests__/prompts.test.js +0 -33
- package/dist/phases/pr-execution/__tests__/file-assigner.test.d.ts +0 -1
- package/dist/phases/pr-execution/__tests__/file-assigner.test.js +0 -303
- package/dist/phases/pr-resolve/__tests__/checklist-learner.test.d.ts +0 -1
- package/dist/phases/pr-resolve/__tests__/checklist-learner.test.js +0 -157
- package/dist/phases/pr-resolve/__tests__/prompts.test.d.ts +0 -1
- package/dist/phases/pr-resolve/__tests__/prompts.test.js +0 -116
- package/dist/phases/pr-resolve/__tests__/resolve-mapping.test.d.ts +0 -1
- package/dist/phases/pr-resolve/__tests__/resolve-mapping.test.js +0 -138
- package/dist/phases/pr-resolve/__tests__/types.test.d.ts +0 -1
- package/dist/phases/pr-resolve/__tests__/types.test.js +0 -43
- package/dist/phases/pr-resolve/__tests__/workspace.test.d.ts +0 -1
- package/dist/phases/pr-resolve/__tests__/workspace.test.js +0 -111
- package/dist/phases/pr-review/__tests__/prompts.test.d.ts +0 -1
- package/dist/phases/pr-review/__tests__/prompts.test.js +0 -49
- package/dist/phases/pr-review/__tests__/review-comments.test.d.ts +0 -1
- package/dist/phases/pr-review/__tests__/review-comments.test.js +0 -110
- package/dist/phases/pr-shared/__tests__/agent-utils.test.d.ts +0 -1
- package/dist/phases/pr-shared/__tests__/agent-utils.test.js +0 -91
- package/dist/phases/pr-shared/__tests__/context.test.d.ts +0 -1
- package/dist/phases/pr-shared/__tests__/context.test.js +0 -94
- package/dist/phases/pr-splitting/__tests__/import-dep-validator.test.d.ts +0 -1
- package/dist/phases/pr-splitting/__tests__/import-dep-validator.test.js +0 -331
- package/dist/phases/run-sheet/render.d.ts +0 -60
- package/dist/phases/run-sheet/render.js +0 -297
- package/dist/phases/smoke-test/__tests__/agent.test.d.ts +0 -4
- package/dist/phases/smoke-test/__tests__/agent.test.js +0 -84
- package/dist/phases/smoke-test/__tests__/github.test.d.ts +0 -9
- package/dist/phases/smoke-test/__tests__/github.test.js +0 -120
- package/dist/phases/smoke-test/__tests__/snapshot.test.d.ts +0 -8
- package/dist/phases/smoke-test/__tests__/snapshot.test.js +0 -93
- package/dist/phases/smoke-test/github.d.ts +0 -54
- package/dist/phases/smoke-test/github.js +0 -101
- package/dist/phases/smoke-test/snapshot.d.ts +0 -27
- package/dist/phases/smoke-test/snapshot.js +0 -157
- package/dist/services/coaching/__tests__/coaching-agent.test.d.ts +0 -1
- package/dist/services/coaching/__tests__/coaching-agent.test.js +0 -74
- package/dist/services/coaching/__tests__/coaching-loop.test.d.ts +0 -1
- package/dist/services/coaching/__tests__/coaching-loop.test.js +0 -59
- package/dist/services/coaching/__tests__/self-rating.test.d.ts +0 -1
- package/dist/services/coaching/__tests__/self-rating.test.js +0 -188
- package/dist/services/lifecycle-agent/__tests__/phase-criteria.test.d.ts +0 -4
- package/dist/services/lifecycle-agent/__tests__/phase-criteria.test.js +0 -133
- package/dist/services/lifecycle-agent/__tests__/transition-rules.test.d.ts +0 -4
- package/dist/services/lifecycle-agent/__tests__/transition-rules.test.js +0 -336
- package/dist/services/lifecycle-agent/index.d.ts +0 -24
- package/dist/services/lifecycle-agent/index.js +0 -25
- package/dist/services/lifecycle-agent/phase-criteria.d.ts +0 -57
- package/dist/services/lifecycle-agent/phase-criteria.js +0 -335
- package/dist/services/lifecycle-agent/transition-rules.d.ts +0 -60
- package/dist/services/lifecycle-agent/transition-rules.js +0 -184
- package/dist/services/lifecycle-agent/types.d.ts +0 -190
- package/dist/services/lifecycle-agent/types.js +0 -12
- package/dist/services/phase-hooks/__tests__/bindings-fetcher.test.d.ts +0 -1
- package/dist/services/phase-hooks/__tests__/bindings-fetcher.test.js +0 -122
- package/dist/services/phase-hooks/__tests__/hook-executor.test.d.ts +0 -1
- package/dist/services/phase-hooks/__tests__/hook-executor.test.js +0 -321
- package/dist/services/phase-hooks/__tests__/hook-runner.test.d.ts +0 -1
- package/dist/services/phase-hooks/__tests__/hook-runner.test.js +0 -261
- package/dist/services/phase-hooks/__tests__/plugin-loader.test.d.ts +0 -1
- package/dist/services/phase-hooks/__tests__/plugin-loader.test.js +0 -158
- package/dist/services/video/__tests__/video-pipeline.test.d.ts +0 -6
- package/dist/services/video/__tests__/video-pipeline.test.js +0 -249
- package/dist/types/features.js +0 -1
- package/dist/workspace/__tests__/workspace-manager.test.d.ts +0 -7
- package/dist/workspace/__tests__/workspace-manager.test.js +0 -52
- /package/dist/api/{features → issues}/batch-operations.d.ts +0 -0
- /package/dist/api/{features → issues}/batch-operations.js +0 -0
- /package/dist/phases/{feature-analysis → issue-analysis}/agent.d.ts +0 -0
- /package/dist/skills/phase/{feature-analysis-verification → issue-analysis-verification}/SKILL.md +0 -0
- /package/dist/{phases/code-review/__tests__/diff-utils.test.d.ts → types/issues.js} +0 -0
package/dist/utils/formatters.js
CHANGED
|
@@ -29,19 +29,19 @@ export function formatTestCases(cases) {
|
|
|
29
29
|
* Format technical design context for Claude Code prompts
|
|
30
30
|
*/
|
|
31
31
|
export async function formatTechnicalDesignContext(context) {
|
|
32
|
-
const { processedMarkdown, downloadedImages } = await downloadImagesForClaudeCode(context.
|
|
32
|
+
const { processedMarkdown, downloadedImages } = await downloadImagesForClaudeCode(context.issue.description || 'No description provided', context.issue.id // Use issue ID for directory naming
|
|
33
33
|
);
|
|
34
34
|
const content = `# Technical Design Context
|
|
35
35
|
|
|
36
|
-
##
|
|
37
|
-
- **ID**: ${context.
|
|
38
|
-
- **Name**: ${context.
|
|
36
|
+
## Issue Information
|
|
37
|
+
- **ID**: ${context.issue.id}
|
|
38
|
+
- **Name**: ${context.issue.name}
|
|
39
39
|
- **Description**:
|
|
40
40
|
${processedMarkdown}
|
|
41
41
|
|
|
42
42
|
${downloadedImages.length > 0 ? '**IMPORTANT**: The description contains images that have been downloaded locally. Please use the Read tool to view these images to fully understand the requirements.' : ''}
|
|
43
43
|
|
|
44
|
-
- **Current Status**: ${context.
|
|
44
|
+
- **Current Status**: ${context.issue.status}
|
|
45
45
|
|
|
46
46
|
## Product Information
|
|
47
47
|
- **Product**: ${context.product.name}
|
|
@@ -55,30 +55,30 @@ ${formatUserStories(context.user_stories)}
|
|
|
55
55
|
${formatTestCases(context.test_cases)}
|
|
56
56
|
|
|
57
57
|
## Current Technical Design
|
|
58
|
-
${context.
|
|
58
|
+
${context.issue.technical_design || 'No existing technical design found'}
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
|
|
62
|
-
**Design Instructions**: Based on the above
|
|
62
|
+
**Design Instructions**: Based on the above issue requirements, user stories, and test cases, create or enhance the comprehensive technical design. Focus on system architecture, component design, database schema, API specifications, security considerations, and implementation strategy.`;
|
|
63
63
|
return { content, downloadedImages };
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
|
-
* Format
|
|
66
|
+
* Format issue analysis context for Claude Code prompts
|
|
67
67
|
*/
|
|
68
|
-
export async function
|
|
69
|
-
const { processedMarkdown, downloadedImages } = await downloadImagesForClaudeCode(context.
|
|
68
|
+
export async function formatIssueAnalysisContext(context) {
|
|
69
|
+
const { processedMarkdown, downloadedImages } = await downloadImagesForClaudeCode(context.issue.description || 'No description provided', context.issue.id // Use issue ID for directory naming
|
|
70
70
|
);
|
|
71
|
-
const content = `#
|
|
71
|
+
const content = `# Issue Analysis Context
|
|
72
72
|
|
|
73
|
-
##
|
|
74
|
-
- **ID**: ${context.
|
|
75
|
-
- **Name**: ${context.
|
|
73
|
+
## Issue Information
|
|
74
|
+
- **ID**: ${context.issue.id}
|
|
75
|
+
- **Name**: ${context.issue.name}
|
|
76
76
|
- **Description**:
|
|
77
77
|
${processedMarkdown}
|
|
78
78
|
|
|
79
79
|
${downloadedImages.length > 0 ? '**IMPORTANT**: The description contains images that have been downloaded locally. Please use the Read tool to view these images to fully understand the requirements.' : ''}
|
|
80
80
|
|
|
81
|
-
- **Current Status**: ${context.
|
|
81
|
+
- **Current Status**: ${context.issue.status}
|
|
82
82
|
|
|
83
83
|
## Product Information
|
|
84
84
|
- **Product**: ${context.product.name}
|
|
@@ -92,30 +92,30 @@ ${formatUserStories(context.existing_user_stories)}
|
|
|
92
92
|
${formatTestCases(context.existing_test_cases)}
|
|
93
93
|
|
|
94
94
|
## Current Technical Design
|
|
95
|
-
${context.
|
|
95
|
+
${context.issue.technical_design || 'No technical design available yet'}
|
|
96
96
|
|
|
97
97
|
---
|
|
98
98
|
|
|
99
|
-
**Analysis Instructions**: Based on the above
|
|
99
|
+
**Analysis Instructions**: Based on the above issue information and existing user stories/test cases, conduct comprehensive business analysis to identify gaps and create additional user stories and test cases that add business value.`;
|
|
100
100
|
return { content, downloadedImages };
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* Format code implementation context for Claude Code prompts
|
|
104
104
|
*/
|
|
105
105
|
export async function formatCodeImplementationContext(context) {
|
|
106
|
-
const { processedMarkdown, downloadedImages } = await downloadImagesForClaudeCode(context.
|
|
106
|
+
const { processedMarkdown, downloadedImages } = await downloadImagesForClaudeCode(context.issue.description || 'No description provided', context.issue.id // Use issue ID for directory naming
|
|
107
107
|
);
|
|
108
108
|
const content = `# Code Implementation Context
|
|
109
109
|
|
|
110
|
-
##
|
|
111
|
-
- **ID**: ${context.
|
|
112
|
-
- **Name**: ${context.
|
|
110
|
+
## Issue Information
|
|
111
|
+
- **ID**: ${context.issue.id}
|
|
112
|
+
- **Name**: ${context.issue.name}
|
|
113
113
|
- **Description**:
|
|
114
114
|
${processedMarkdown}
|
|
115
115
|
|
|
116
116
|
${downloadedImages.length > 0 ? '**IMPORTANT**: The description contains images that have been downloaded locally. Please use the Read tool to view these images to fully understand the requirements.' : ''}
|
|
117
117
|
|
|
118
|
-
- **Current Status**: ${context.
|
|
118
|
+
- **Current Status**: ${context.issue.status}
|
|
119
119
|
|
|
120
120
|
## Product Information
|
|
121
121
|
- **Product**: ${context.product.name}
|
|
@@ -133,26 +133,26 @@ ${context.technical_design || 'No technical design available - implement based o
|
|
|
133
133
|
|
|
134
134
|
---
|
|
135
135
|
|
|
136
|
-
**Implementation Instructions**: Based on the above requirements, user stories, test cases, and technical design, implement the complete
|
|
136
|
+
**Implementation Instructions**: Based on the above requirements, user stories, test cases, and technical design, implement the complete issue functionality. Ensure all user stories are implemented and all test cases can pass.`;
|
|
137
137
|
return { content, downloadedImages };
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* Format functional testing context for Claude Code prompts
|
|
141
141
|
*/
|
|
142
142
|
export async function formatFunctionalTestingContext(context) {
|
|
143
|
-
const { processedMarkdown, downloadedImages } = await downloadImagesForClaudeCode(context.
|
|
143
|
+
const { processedMarkdown, downloadedImages } = await downloadImagesForClaudeCode(context.issue.description || 'No description provided', context.issue.id // Use issue ID for directory naming
|
|
144
144
|
);
|
|
145
145
|
const content = `# Functional Testing Context
|
|
146
146
|
|
|
147
|
-
##
|
|
148
|
-
- **ID**: ${context.
|
|
149
|
-
- **Name**: ${context.
|
|
147
|
+
## Issue Information
|
|
148
|
+
- **ID**: ${context.issue.id}
|
|
149
|
+
- **Name**: ${context.issue.name}
|
|
150
150
|
- **Description**:
|
|
151
151
|
${processedMarkdown}
|
|
152
152
|
|
|
153
153
|
${downloadedImages.length > 0 ? '**IMPORTANT**: The description contains images that have been downloaded locally. Please use the Read tool to view these images to fully understand the requirements.' : ''}
|
|
154
154
|
|
|
155
|
-
- **Current Status**: ${context.
|
|
155
|
+
- **Current Status**: ${context.issue.status}
|
|
156
156
|
|
|
157
157
|
## Product Information
|
|
158
158
|
- **Product**: ${context.product.name}
|
|
@@ -167,6 +167,6 @@ ${formatTestCases(context.test_cases)}
|
|
|
167
167
|
|
|
168
168
|
---
|
|
169
169
|
|
|
170
|
-
**Testing Instructions**: The
|
|
170
|
+
**Testing Instructions**: The issue has been implemented. Execute comprehensive functional testing using headless Playwright to verify all user stories work correctly and all test cases pass. Test both positive and negative scenarios.`;
|
|
171
171
|
return { content, downloadedImages };
|
|
172
172
|
}
|
|
@@ -29,7 +29,7 @@ export declare function syncFeatBranchWithMain(opts: SyncFeatBranchOptions): Pro
|
|
|
29
29
|
* Options for async rebase with conflict resolution
|
|
30
30
|
*/
|
|
31
31
|
export interface RebaseWithConflictResolutionOptions {
|
|
32
|
-
|
|
32
|
+
issueBranch: string;
|
|
33
33
|
/**
|
|
34
34
|
* Base branch to create new branches from.
|
|
35
35
|
* For merged parent branches, this is feat/xxx.
|
|
@@ -72,13 +72,13 @@ export interface RebaseWithConflictResolutionOptions {
|
|
|
72
72
|
githubToken?: string;
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
-
* Switch to
|
|
75
|
+
* Switch to issue branch and rebase with base branch, with optional automatic conflict resolution
|
|
76
76
|
* This is the async version that supports conflict resolution using Claude agent
|
|
77
77
|
*
|
|
78
78
|
* @param options - Options for the rebase operation
|
|
79
79
|
* @returns Object containing the previous branch name and conflict resolution result
|
|
80
80
|
*/
|
|
81
|
-
export declare function
|
|
81
|
+
export declare function switchToIssueBranchAndRebaseAsync(options: RebaseWithConflictResolutionOptions): Promise<{
|
|
82
82
|
previousBranch: string;
|
|
83
83
|
conflictsResolved?: boolean;
|
|
84
84
|
resolvedFiles?: string[];
|
|
@@ -88,7 +88,7 @@ export declare function switchToFeatureBranchAndRebaseAsync(options: RebaseWithC
|
|
|
88
88
|
*
|
|
89
89
|
* Usage:
|
|
90
90
|
* const cleanup = await prepareCustomBranchGitEnvironmentAsync({
|
|
91
|
-
*
|
|
91
|
+
* issueBranch: 'feat/123/2-api',
|
|
92
92
|
* baseBranch: 'feat/123/1-database',
|
|
93
93
|
* verbose: true,
|
|
94
94
|
* resolveConflicts: true,
|
|
@@ -110,14 +110,14 @@ export declare function prepareCustomBranchGitEnvironmentAsync(options: RebaseWi
|
|
|
110
110
|
/**
|
|
111
111
|
* Async version of preparePhaseGitEnvironment with conflict resolution support.
|
|
112
112
|
*
|
|
113
|
-
* @param
|
|
113
|
+
* @param issueId - The issue ID (will be used to construct branch name "dev/{issueId}")
|
|
114
114
|
* @param baseBranch - The base branch to rebase from (default: "main")
|
|
115
115
|
* @param verbose - Whether to log verbose output
|
|
116
116
|
* @param resolveConflicts - Whether to automatically resolve conflicts using Claude
|
|
117
117
|
* @param conflictResolverConfig - Configuration for the conflict resolver
|
|
118
118
|
* @returns Cleanup function and conflict resolution info
|
|
119
119
|
*/
|
|
120
|
-
export declare function preparePhaseGitEnvironmentAsync(
|
|
120
|
+
export declare function preparePhaseGitEnvironmentAsync(issueId: string, baseBranch?: string, verbose?: boolean, resolveConflicts?: boolean, conflictResolverConfig?: {
|
|
121
121
|
model?: string;
|
|
122
122
|
maxTurns?: number;
|
|
123
123
|
}): Promise<{
|
|
@@ -100,36 +100,36 @@ export async function syncFeatBranchWithMain(opts) {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
|
-
* Switch to
|
|
103
|
+
* Switch to issue branch and rebase with base branch, with optional automatic conflict resolution
|
|
104
104
|
* This is the async version that supports conflict resolution using Claude agent
|
|
105
105
|
*
|
|
106
106
|
* @param options - Options for the rebase operation
|
|
107
107
|
* @returns Object containing the previous branch name and conflict resolution result
|
|
108
108
|
*/
|
|
109
109
|
// eslint-disable-next-line complexity -- async git branch management with rebase, conflict resolution, and recovery
|
|
110
|
-
export async function
|
|
111
|
-
const {
|
|
110
|
+
export async function switchToIssueBranchAndRebaseAsync(options) {
|
|
111
|
+
const { issueBranch, baseBranch = 'main', rebaseTargetBranch, originalBaseBranch, verbose, resolveConflicts = false, conflictResolverConfig, forcePushAfterRebase = false, baseBranchCompleted = false, githubToken, } = options;
|
|
112
112
|
// Determine the actual target branch for rebase
|
|
113
113
|
// If rebaseTargetBranch is set (e.g., main), use it; otherwise use baseBranch
|
|
114
114
|
const actualRebaseTarget = rebaseTargetBranch || baseBranch;
|
|
115
115
|
const previousBranch = getCurrentBranch();
|
|
116
116
|
if (verbose) {
|
|
117
|
-
logInfo(`\n🔄 Preparing
|
|
117
|
+
logInfo(`\n🔄 Preparing issue branch: ${issueBranch}`);
|
|
118
118
|
logInfo(` Current branch: ${previousBranch}`);
|
|
119
119
|
}
|
|
120
|
-
// If
|
|
121
|
-
if (!branchExists(
|
|
120
|
+
// If issue branch doesn't exist, we need to create it from base branch
|
|
121
|
+
if (!branchExists(issueBranch)) {
|
|
122
122
|
if (verbose) {
|
|
123
|
-
logInfo(`
|
|
123
|
+
logInfo(` Issue branch ${issueBranch} doesn't exist, will create from ${baseBranch}`);
|
|
124
124
|
}
|
|
125
|
-
// First, ensure we're on the base branch to create
|
|
125
|
+
// First, ensure we're on the base branch to create issue branch from it
|
|
126
126
|
if (previousBranch !== baseBranch) {
|
|
127
127
|
if (verbose) {
|
|
128
128
|
logInfo(` Switching to ${baseBranch} first...`);
|
|
129
129
|
}
|
|
130
130
|
switchToBranch(baseBranch, verbose);
|
|
131
131
|
}
|
|
132
|
-
// Pull latest base branch before creating
|
|
132
|
+
// Pull latest base branch before creating issue branch
|
|
133
133
|
try {
|
|
134
134
|
if (verbose) {
|
|
135
135
|
logInfo(` Pulling latest ${baseBranch}...`);
|
|
@@ -142,12 +142,12 @@ export async function switchToFeatureBranchAndRebaseAsync(options) {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
// Switch to
|
|
145
|
+
// Switch to issue branch (will create if doesn't exist)
|
|
146
146
|
// Default behavior now checks remote first (handles multi-clone scenarios)
|
|
147
|
-
if (getCurrentBranch() !==
|
|
148
|
-
switchToBranch(
|
|
147
|
+
if (getCurrentBranch() !== issueBranch) {
|
|
148
|
+
switchToBranch(issueBranch, verbose, { githubToken });
|
|
149
149
|
}
|
|
150
|
-
// Sync with remote
|
|
150
|
+
// Sync with remote issue branch if it exists and local branch needs updating
|
|
151
151
|
// This handles the case where local branch exists but is behind remote
|
|
152
152
|
try {
|
|
153
153
|
if (hasUncommittedChanges()) {
|
|
@@ -163,57 +163,57 @@ export async function switchToFeatureBranchAndRebaseAsync(options) {
|
|
|
163
163
|
stdio: 'pipe',
|
|
164
164
|
});
|
|
165
165
|
try {
|
|
166
|
-
execSync(`git rev-parse --verify origin/${
|
|
166
|
+
execSync(`git rev-parse --verify origin/${issueBranch}`, {
|
|
167
167
|
encoding: 'utf-8',
|
|
168
168
|
stdio: 'pipe',
|
|
169
169
|
});
|
|
170
170
|
// Remote branch exists, check if we need to sync
|
|
171
171
|
// Get local and remote commit SHAs
|
|
172
|
-
const localSha = execSync(`git rev-parse ${
|
|
172
|
+
const localSha = execSync(`git rev-parse ${issueBranch}`, {
|
|
173
173
|
encoding: 'utf-8',
|
|
174
174
|
stdio: 'pipe',
|
|
175
175
|
}).trim();
|
|
176
|
-
const remoteSha = execSync(`git rev-parse origin/${
|
|
176
|
+
const remoteSha = execSync(`git rev-parse origin/${issueBranch}`, {
|
|
177
177
|
encoding: 'utf-8',
|
|
178
178
|
stdio: 'pipe',
|
|
179
179
|
}).trim();
|
|
180
180
|
if (localSha !== remoteSha) {
|
|
181
181
|
// Local and remote differ, reset to remote
|
|
182
182
|
if (verbose) {
|
|
183
|
-
logInfo(`📥 Syncing with remote
|
|
183
|
+
logInfo(`📥 Syncing with remote issue branch origin/${issueBranch}...`);
|
|
184
184
|
logInfo(` Local: ${localSha.substring(0, 7)}`);
|
|
185
185
|
logInfo(` Remote: ${remoteSha.substring(0, 7)}`);
|
|
186
186
|
}
|
|
187
|
-
execSync(`git reset --hard origin/${
|
|
187
|
+
execSync(`git reset --hard origin/${issueBranch}`, {
|
|
188
188
|
encoding: 'utf-8',
|
|
189
189
|
stdio: 'pipe',
|
|
190
190
|
});
|
|
191
191
|
if (verbose) {
|
|
192
|
-
logInfo(`✅ Synced local branch with origin/${
|
|
192
|
+
logInfo(`✅ Synced local branch with origin/${issueBranch}`);
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
else if (verbose) {
|
|
196
|
-
logInfo(`✅ Local branch is up to date with origin/${
|
|
196
|
+
logInfo(`✅ Local branch is up to date with origin/${issueBranch}`);
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
catch (_e) {
|
|
200
200
|
if (verbose) {
|
|
201
|
-
logInfo(` Remote branch origin/${
|
|
201
|
+
logInfo(` Remote branch origin/${issueBranch} doesn't exist yet, will create on push`);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
catch (_error) {
|
|
206
206
|
if (verbose) {
|
|
207
|
-
logInfo(`⚠️ Could not sync with remote
|
|
207
|
+
logInfo(`⚠️ Could not sync with remote issue branch, continuing with local branch`);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
// Rebase
|
|
210
|
+
// Rebase issue branch with latest target branch
|
|
211
211
|
if (verbose) {
|
|
212
212
|
if (originalBaseBranch) {
|
|
213
|
-
logInfo(`📥 Rebasing ${
|
|
213
|
+
logInfo(`📥 Rebasing ${issueBranch} onto origin/${actualRebaseTarget} (from ${originalBaseBranch})...`);
|
|
214
214
|
}
|
|
215
215
|
else {
|
|
216
|
-
logInfo(`📥 Rebasing ${
|
|
216
|
+
logInfo(`📥 Rebasing ${issueBranch} with origin/${actualRebaseTarget}...`);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
try {
|
|
@@ -284,17 +284,17 @@ export async function switchToFeatureBranchAndRebaseAsync(options) {
|
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
if (verbose) {
|
|
287
|
-
logInfo(`✅ Successfully rebased ${
|
|
287
|
+
logInfo(`✅ Successfully rebased ${issueBranch} with origin/${actualRebaseTarget}\n`);
|
|
288
288
|
}
|
|
289
289
|
// Force push after rebase to trigger GitHub to recalculate PR diff
|
|
290
290
|
if (forcePushAfterRebase) {
|
|
291
291
|
const pushResult = gitForcePush({
|
|
292
|
-
branchName:
|
|
292
|
+
branchName: issueBranch,
|
|
293
293
|
token: githubToken,
|
|
294
294
|
verbose,
|
|
295
295
|
});
|
|
296
296
|
if (!pushResult.success && verbose) {
|
|
297
|
-
logInfo(`⚠️ Could not force push ${
|
|
297
|
+
logInfo(`⚠️ Could not force push ${issueBranch}: ${pushResult.error}`);
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
return { previousBranch };
|
|
@@ -311,24 +311,24 @@ export async function switchToFeatureBranchAndRebaseAsync(options) {
|
|
|
311
311
|
model: conflictResolverConfig?.model,
|
|
312
312
|
maxTurns: conflictResolverConfig?.maxTurns,
|
|
313
313
|
verbose,
|
|
314
|
-
|
|
314
|
+
issueBranch,
|
|
315
315
|
baseBranch,
|
|
316
316
|
originalBaseBranch,
|
|
317
317
|
baseBranchCompleted,
|
|
318
318
|
});
|
|
319
319
|
if (result.success) {
|
|
320
320
|
if (verbose) {
|
|
321
|
-
logInfo(`✅ Successfully resolved conflicts and rebased ${
|
|
321
|
+
logInfo(`✅ Successfully resolved conflicts and rebased ${issueBranch} with origin/${actualRebaseTarget}\n`);
|
|
322
322
|
}
|
|
323
323
|
// Force push after rebase to trigger GitHub to recalculate PR diff
|
|
324
324
|
if (forcePushAfterRebase) {
|
|
325
325
|
const pushResult = gitForcePush({
|
|
326
|
-
branchName:
|
|
326
|
+
branchName: issueBranch,
|
|
327
327
|
token: githubToken,
|
|
328
328
|
verbose,
|
|
329
329
|
});
|
|
330
330
|
if (!pushResult.success && verbose) {
|
|
331
|
-
logInfo(`⚠️ Could not force push ${
|
|
331
|
+
logInfo(`⚠️ Could not force push ${issueBranch}: ${pushResult.error}`);
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
return {
|
|
@@ -339,7 +339,7 @@ export async function switchToFeatureBranchAndRebaseAsync(options) {
|
|
|
339
339
|
}
|
|
340
340
|
// Conflict resolution failed, abort rebase
|
|
341
341
|
abortRebase(verbose);
|
|
342
|
-
throw new Error(`Failed to automatically resolve conflicts during rebase ${
|
|
342
|
+
throw new Error(`Failed to automatically resolve conflicts during rebase ${issueBranch} with ${actualRebaseTarget}.\n` +
|
|
343
343
|
`${result.error || 'Unknown error'}\n` +
|
|
344
344
|
`Please resolve conflicts manually and try again.`);
|
|
345
345
|
}
|
|
@@ -349,8 +349,8 @@ export async function switchToFeatureBranchAndRebaseAsync(options) {
|
|
|
349
349
|
if (verbose) {
|
|
350
350
|
logError(`❌ Rebase failed and was aborted. Repository is in clean state.`);
|
|
351
351
|
}
|
|
352
|
-
throw new Error(`Failed to rebase ${
|
|
353
|
-
`This usually means there are conflicts between your
|
|
352
|
+
throw new Error(`Failed to rebase ${issueBranch} with ${actualRebaseTarget}: ${error instanceof Error ? error.message : String(error)}\n` +
|
|
353
|
+
`This usually means there are conflicts between your issue branch and base branch.\n` +
|
|
354
354
|
`Please resolve conflicts manually and try again.`);
|
|
355
355
|
}
|
|
356
356
|
}
|
|
@@ -359,7 +359,7 @@ export async function switchToFeatureBranchAndRebaseAsync(options) {
|
|
|
359
359
|
*
|
|
360
360
|
* Usage:
|
|
361
361
|
* const cleanup = await prepareCustomBranchGitEnvironmentAsync({
|
|
362
|
-
*
|
|
362
|
+
* issueBranch: 'feat/123/2-api',
|
|
363
363
|
* baseBranch: 'feat/123/1-database',
|
|
364
364
|
* verbose: true,
|
|
365
365
|
* resolveConflicts: true,
|
|
@@ -380,7 +380,7 @@ export async function prepareCustomBranchGitEnvironmentAsync(options) {
|
|
|
380
380
|
returnToMainBranch('main', verbose);
|
|
381
381
|
};
|
|
382
382
|
try {
|
|
383
|
-
const result = await
|
|
383
|
+
const result = await switchToIssueBranchAndRebaseAsync(options);
|
|
384
384
|
return {
|
|
385
385
|
cleanup,
|
|
386
386
|
conflictsResolved: result.conflictsResolved,
|
|
@@ -402,17 +402,17 @@ export async function prepareCustomBranchGitEnvironmentAsync(options) {
|
|
|
402
402
|
/**
|
|
403
403
|
* Async version of preparePhaseGitEnvironment with conflict resolution support.
|
|
404
404
|
*
|
|
405
|
-
* @param
|
|
405
|
+
* @param issueId - The issue ID (will be used to construct branch name "dev/{issueId}")
|
|
406
406
|
* @param baseBranch - The base branch to rebase from (default: "main")
|
|
407
407
|
* @param verbose - Whether to log verbose output
|
|
408
408
|
* @param resolveConflicts - Whether to automatically resolve conflicts using Claude
|
|
409
409
|
* @param conflictResolverConfig - Configuration for the conflict resolver
|
|
410
410
|
* @returns Cleanup function and conflict resolution info
|
|
411
411
|
*/
|
|
412
|
-
export async function preparePhaseGitEnvironmentAsync(
|
|
413
|
-
const
|
|
412
|
+
export async function preparePhaseGitEnvironmentAsync(issueId, baseBranch = 'main', verbose, resolveConflicts, conflictResolverConfig) {
|
|
413
|
+
const issueBranch = `dev/${issueId}`;
|
|
414
414
|
return prepareCustomBranchGitEnvironmentAsync({
|
|
415
|
-
|
|
415
|
+
issueBranch,
|
|
416
416
|
baseBranch,
|
|
417
417
|
verbose,
|
|
418
418
|
resolveConflicts,
|
|
@@ -103,15 +103,15 @@ export declare function switchToBranch(branch: string, verbose?: boolean, option
|
|
|
103
103
|
*/
|
|
104
104
|
export declare function pullLatestFromBranch(branch: string, verbose?: boolean, githubToken?: string): void;
|
|
105
105
|
/**
|
|
106
|
-
* Switch to
|
|
106
|
+
* Switch to issue branch and rebase with main
|
|
107
107
|
* This should be called at the START of each phase
|
|
108
108
|
*
|
|
109
|
-
* @param
|
|
109
|
+
* @param issueBranch - The issue branch to switch to (e.g., "dev/issue-id")
|
|
110
110
|
* @param baseBranch - The base branch to rebase from (usually "main")
|
|
111
111
|
* @param verbose - Whether to log verbose output
|
|
112
112
|
* @returns Object containing the previous branch name
|
|
113
113
|
*/
|
|
114
|
-
export declare function
|
|
114
|
+
export declare function switchToIssueBranchAndRebase(issueBranch: string, baseBranch?: string, verbose?: boolean, githubToken?: string): {
|
|
115
115
|
previousBranch: string;
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
@@ -120,9 +120,9 @@ export declare function switchToFeatureBranchAndRebase(featureBranch: string, ba
|
|
|
120
120
|
*/
|
|
121
121
|
export declare function returnToMainBranch(baseBranch?: string, verbose?: boolean): void;
|
|
122
122
|
/**
|
|
123
|
-
* Full phase lifecycle: switch to
|
|
123
|
+
* Full phase lifecycle: switch to issue branch, rebase with main, and return a cleanup function
|
|
124
124
|
* Usage:
|
|
125
|
-
* const cleanup = preparePhaseGitEnvironment(
|
|
125
|
+
* const cleanup = preparePhaseGitEnvironment(issueId, baseBranch, verbose)
|
|
126
126
|
* try {
|
|
127
127
|
* // ... phase logic ...
|
|
128
128
|
* } finally {
|
|
@@ -133,15 +133,15 @@ export declare function returnToMainBranch(baseBranch?: string, verbose?: boolea
|
|
|
133
133
|
* is in a clean state (rebase aborted). The caller should still call the cleanup function
|
|
134
134
|
* in a finally block to return to the main branch.
|
|
135
135
|
*
|
|
136
|
-
* @param
|
|
136
|
+
* @param issueId - The issue ID (will be used to construct branch name "dev/{issueId}")
|
|
137
137
|
* @param baseBranch - The base branch to rebase from (default: "main")
|
|
138
138
|
* @param verbose - Whether to log verbose output
|
|
139
139
|
* @returns Cleanup function that will return to main branch
|
|
140
140
|
*/
|
|
141
|
-
export declare function preparePhaseGitEnvironment(
|
|
141
|
+
export declare function preparePhaseGitEnvironment(issueId: string, baseBranch?: string, verbose?: boolean): () => void;
|
|
142
142
|
/**
|
|
143
143
|
* Full phase lifecycle with custom branch names for branch chaining support.
|
|
144
|
-
* This allows creating a
|
|
144
|
+
* This allows creating a issue branch from another issue branch (not just main).
|
|
145
145
|
*
|
|
146
146
|
* Usage:
|
|
147
147
|
* const cleanup = prepareCustomBranchGitEnvironment('feat/123/2-api', 'feat/123/1-database', verbose)
|
|
@@ -151,10 +151,10 @@ export declare function preparePhaseGitEnvironment(featureId: string, baseBranch
|
|
|
151
151
|
* cleanup()
|
|
152
152
|
* }
|
|
153
153
|
*
|
|
154
|
-
* @param
|
|
154
|
+
* @param issueBranch - The issue branch to switch to (e.g., "feat/123/2-api")
|
|
155
155
|
* @param baseBranch - The base branch to rebase from (e.g., "main" or "feat/123/1-database")
|
|
156
156
|
* @param verbose - Whether to log verbose output
|
|
157
157
|
* @returns Cleanup function that will return to main branch
|
|
158
158
|
*/
|
|
159
|
-
export declare function prepareCustomBranchGitEnvironment(
|
|
160
|
-
export { prepareCustomBranchGitEnvironmentAsync, preparePhaseGitEnvironmentAsync, type RebaseWithConflictResolutionOptions,
|
|
159
|
+
export declare function prepareCustomBranchGitEnvironment(issueBranch: string, baseBranch?: string, verbose?: boolean): () => void;
|
|
160
|
+
export { prepareCustomBranchGitEnvironmentAsync, preparePhaseGitEnvironmentAsync, type RebaseWithConflictResolutionOptions, switchToIssueBranchAndRebaseAsync, type SyncFeatBranchOptions, syncFeatBranchWithMain, } from './git-branch-manager-async.js';
|