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
|
@@ -16,23 +16,23 @@ export * from './types.js';
|
|
|
16
16
|
*/
|
|
17
17
|
// eslint-disable-next-line complexity -- orchestration function with comment fetching, AI analysis, and resolution
|
|
18
18
|
export async function verifyAndResolveComments(options) {
|
|
19
|
-
const {
|
|
19
|
+
const { issueId, githubToken, config, verbose } = options;
|
|
20
20
|
if (verbose) {
|
|
21
|
-
logInfo(`Starting code refine verification for
|
|
21
|
+
logInfo(`Starting code refine verification for issue ID: ${issueId}`);
|
|
22
22
|
}
|
|
23
23
|
try {
|
|
24
|
-
// For multi-branch
|
|
24
|
+
// For multi-branch issues, find the branch that has been reviewed
|
|
25
25
|
// (status = 'reviewed' after code-review phase)
|
|
26
26
|
let currentBranch = null;
|
|
27
27
|
try {
|
|
28
|
-
currentBranch = await getReviewedBranch({
|
|
28
|
+
currentBranch = await getReviewedBranch({ issueId, verbose });
|
|
29
29
|
if (currentBranch && verbose) {
|
|
30
30
|
logInfo(`📋 Found reviewed branch: ${currentBranch.name}`);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
catch (_error) {
|
|
34
34
|
if (verbose) {
|
|
35
|
-
logInfo(`Note: Could not fetch
|
|
35
|
+
logInfo(`Note: Could not fetch issue branches`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
// Get PR URL from branch
|
|
@@ -44,7 +44,7 @@ export async function verifyAndResolveComments(options) {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
if (!pullRequestUrl) {
|
|
47
|
-
throw new Error(`
|
|
47
|
+
throw new Error(`Issue ${issueId} does not have a pull request URL. Cannot perform verification.`);
|
|
48
48
|
}
|
|
49
49
|
// Parse PR URL
|
|
50
50
|
const prInfo = parsePullRequestUrl(pullRequestUrl);
|
|
@@ -71,7 +71,7 @@ export async function verifyAndResolveComments(options) {
|
|
|
71
71
|
status: 'success',
|
|
72
72
|
message: 'No reviews or review comments to verify',
|
|
73
73
|
data: {
|
|
74
|
-
|
|
74
|
+
issueId,
|
|
75
75
|
totalReviews: 0,
|
|
76
76
|
unresolvedReviews: 0,
|
|
77
77
|
totalComments: 0,
|
|
@@ -136,7 +136,7 @@ export async function verifyAndResolveComments(options) {
|
|
|
136
136
|
status: 'success',
|
|
137
137
|
message: successMessage,
|
|
138
138
|
data: {
|
|
139
|
-
|
|
139
|
+
issueId,
|
|
140
140
|
totalReviews: reviews.length,
|
|
141
141
|
unresolvedReviews: 0,
|
|
142
142
|
totalComments: unresolvedThreads.length,
|
|
@@ -223,7 +223,7 @@ export async function verifyAndResolveComments(options) {
|
|
|
223
223
|
status: 'error',
|
|
224
224
|
message: errorMessage,
|
|
225
225
|
data: {
|
|
226
|
-
|
|
226
|
+
issueId,
|
|
227
227
|
totalReviews: reviews.length,
|
|
228
228
|
unresolvedReviews: remainingReviewsCount,
|
|
229
229
|
totalComments: unresolvedThreads.length, // Original count before LLM analysis
|
|
@@ -244,7 +244,7 @@ export async function verifyAndResolveComments(options) {
|
|
|
244
244
|
status: 'error',
|
|
245
245
|
message: `Verification failed: ${errorMessage}`,
|
|
246
246
|
data: {
|
|
247
|
-
|
|
247
|
+
issueId,
|
|
248
248
|
totalReviews: 0,
|
|
249
249
|
unresolvedReviews: 0,
|
|
250
250
|
totalComments: 0,
|
|
@@ -35,13 +35,13 @@ export interface PRFileChange {
|
|
|
35
35
|
fullContent?: string;
|
|
36
36
|
}
|
|
37
37
|
export interface CodeRefineVerificationOptions {
|
|
38
|
-
|
|
38
|
+
issueId: string;
|
|
39
39
|
githubToken: string;
|
|
40
40
|
config: EdsgerConfig;
|
|
41
41
|
verbose?: boolean;
|
|
42
42
|
}
|
|
43
43
|
export interface CodeRefineVerificationData {
|
|
44
|
-
|
|
44
|
+
issueId: string;
|
|
45
45
|
totalReviews: number;
|
|
46
46
|
unresolvedReviews: number;
|
|
47
47
|
totalComments: number;
|
|
@@ -40,9 +40,9 @@ export interface PRData {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
export interface CodeReviewContext {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
issueId: string;
|
|
44
|
+
issueName: string;
|
|
45
|
+
issueDescription: string | null;
|
|
46
46
|
pullRequestUrl: string;
|
|
47
47
|
pullRequestNumber: number;
|
|
48
48
|
owner: string;
|
|
@@ -77,19 +77,19 @@ export declare function fetchPRCommits(octokit: Octokit, owner: string, repo: st
|
|
|
77
77
|
/**
|
|
78
78
|
* Fetch user stories via MCP
|
|
79
79
|
*/
|
|
80
|
-
export declare function fetchUserStories(
|
|
80
|
+
export declare function fetchUserStories(issueId: string, verbose?: boolean): Promise<any[]>;
|
|
81
81
|
/**
|
|
82
82
|
* Fetch test cases via MCP
|
|
83
83
|
*/
|
|
84
|
-
export declare function fetchTestCases(
|
|
84
|
+
export declare function fetchTestCases(issueId: string, verbose?: boolean): Promise<any[]>;
|
|
85
85
|
/**
|
|
86
86
|
* Fetch complete code review context
|
|
87
|
-
* @param
|
|
87
|
+
* @param issueId - The issue ID
|
|
88
88
|
* @param githubToken - GitHub token for API access
|
|
89
89
|
* @param verbose - Enable verbose logging
|
|
90
|
-
* @param pullRequestUrl - Optional PR URL (for multi-branch
|
|
90
|
+
* @param pullRequestUrl - Optional PR URL (for multi-branch issues, use branch's PR URL)
|
|
91
91
|
*/
|
|
92
|
-
export declare function fetchCodeReviewContext(
|
|
92
|
+
export declare function fetchCodeReviewContext(issueId: string, githubToken: string, verbose?: boolean, pullRequestUrl?: string): Promise<CodeReviewContext>;
|
|
93
93
|
/**
|
|
94
94
|
* Format code review context for prompt
|
|
95
95
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Fetches GitHub PR data including files, diffs, and commits for review
|
|
4
4
|
*/
|
|
5
5
|
import { Octokit } from '@octokit/rest';
|
|
6
|
-
import {
|
|
6
|
+
import { getIssue } from '../../api/issues/get-issue.js';
|
|
7
7
|
import { getMcpServerUrl, getMcpToken } from '../../auth/auth-store.js';
|
|
8
8
|
import { logDebug } from '../../utils/logger.js';
|
|
9
9
|
/**
|
|
@@ -64,11 +64,11 @@ export async function fetchPRCommits(octokit, owner, repo, prNumber, verbose) {
|
|
|
64
64
|
/**
|
|
65
65
|
* Fetch user stories via MCP
|
|
66
66
|
*/
|
|
67
|
-
export async function fetchUserStories(
|
|
67
|
+
export async function fetchUserStories(issueId, verbose
|
|
68
68
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
69
69
|
) {
|
|
70
70
|
try {
|
|
71
|
-
logDebug(`Fetching user stories for ${
|
|
71
|
+
logDebug(`Fetching user stories for ${issueId}...`, verbose);
|
|
72
72
|
const mcpServerUrl = getMcpServerUrl();
|
|
73
73
|
const mcpToken = getMcpToken();
|
|
74
74
|
const response = await fetch(`${mcpServerUrl}/mcp`, {
|
|
@@ -82,7 +82,7 @@ export async function fetchUserStories(featureId, verbose
|
|
|
82
82
|
id: 1,
|
|
83
83
|
method: 'user_stories/list',
|
|
84
84
|
params: {
|
|
85
|
-
|
|
85
|
+
issue_id: issueId,
|
|
86
86
|
},
|
|
87
87
|
}),
|
|
88
88
|
});
|
|
@@ -105,11 +105,11 @@ export async function fetchUserStories(featureId, verbose
|
|
|
105
105
|
/**
|
|
106
106
|
* Fetch test cases via MCP
|
|
107
107
|
*/
|
|
108
|
-
export async function fetchTestCases(
|
|
108
|
+
export async function fetchTestCases(issueId, verbose
|
|
109
109
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
110
110
|
) {
|
|
111
111
|
try {
|
|
112
|
-
logDebug(`Fetching test cases for ${
|
|
112
|
+
logDebug(`Fetching test cases for ${issueId}...`, verbose);
|
|
113
113
|
const mcpServerUrl = getMcpServerUrl();
|
|
114
114
|
const mcpToken = getMcpToken();
|
|
115
115
|
const response = await fetch(`${mcpServerUrl}/mcp`, {
|
|
@@ -123,7 +123,7 @@ export async function fetchTestCases(featureId, verbose
|
|
|
123
123
|
id: 1,
|
|
124
124
|
method: 'test_cases/list',
|
|
125
125
|
params: {
|
|
126
|
-
|
|
126
|
+
issue_id: issueId,
|
|
127
127
|
},
|
|
128
128
|
}),
|
|
129
129
|
});
|
|
@@ -145,18 +145,18 @@ export async function fetchTestCases(featureId, verbose
|
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
147
147
|
* Fetch complete code review context
|
|
148
|
-
* @param
|
|
148
|
+
* @param issueId - The issue ID
|
|
149
149
|
* @param githubToken - GitHub token for API access
|
|
150
150
|
* @param verbose - Enable verbose logging
|
|
151
|
-
* @param pullRequestUrl - Optional PR URL (for multi-branch
|
|
151
|
+
* @param pullRequestUrl - Optional PR URL (for multi-branch issues, use branch's PR URL)
|
|
152
152
|
*/
|
|
153
|
-
export async function fetchCodeReviewContext(
|
|
154
|
-
// Fetch
|
|
155
|
-
const
|
|
153
|
+
export async function fetchCodeReviewContext(issueId, githubToken, verbose, pullRequestUrl) {
|
|
154
|
+
// Fetch issue info using shared API
|
|
155
|
+
const issue = await getIssue(issueId, verbose);
|
|
156
156
|
// Use provided PR URL (from branch)
|
|
157
157
|
const prUrl = pullRequestUrl;
|
|
158
158
|
if (!prUrl) {
|
|
159
|
-
throw new Error(`No pull request URL found for
|
|
159
|
+
throw new Error(`No pull request URL found for issue ${issueId}. Cannot perform code review.`);
|
|
160
160
|
}
|
|
161
161
|
// Parse PR URL
|
|
162
162
|
const prInfo = parsePullRequestUrl(prUrl);
|
|
@@ -173,14 +173,14 @@ export async function fetchCodeReviewContext(featureId, githubToken, verbose, pu
|
|
|
173
173
|
fetchPRDetails(octokit, owner, repo, prNumber, verbose),
|
|
174
174
|
fetchPRFiles(octokit, owner, repo, prNumber, verbose),
|
|
175
175
|
fetchPRCommits(octokit, owner, repo, prNumber, verbose),
|
|
176
|
-
fetchUserStories(
|
|
177
|
-
fetchTestCases(
|
|
176
|
+
fetchUserStories(issueId, verbose),
|
|
177
|
+
fetchTestCases(issueId, verbose),
|
|
178
178
|
]);
|
|
179
179
|
logDebug(`Summary: ${files.length} files changed across ${commits.length} commits`, verbose);
|
|
180
180
|
return {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
issueId,
|
|
182
|
+
issueName: issue.name,
|
|
183
|
+
issueDescription: issue.description ?? null,
|
|
184
184
|
pullRequestUrl: prUrl,
|
|
185
185
|
pullRequestNumber: prNumber,
|
|
186
186
|
owner,
|
|
@@ -188,7 +188,7 @@ export async function fetchCodeReviewContext(featureId, githubToken, verbose, pu
|
|
|
188
188
|
prData,
|
|
189
189
|
files,
|
|
190
190
|
commits,
|
|
191
|
-
technicalDesign:
|
|
191
|
+
technicalDesign: issue.technical_design,
|
|
192
192
|
userStories,
|
|
193
193
|
testCases,
|
|
194
194
|
};
|
|
@@ -198,12 +198,12 @@ export async function fetchCodeReviewContext(featureId, githubToken, verbose, pu
|
|
|
198
198
|
*/
|
|
199
199
|
export function formatContextForPrompt(context) {
|
|
200
200
|
const sections = [];
|
|
201
|
-
//
|
|
202
|
-
sections.push(`#
|
|
203
|
-
sections.push(`**
|
|
204
|
-
sections.push(`**
|
|
205
|
-
if (context.
|
|
206
|
-
sections.push(`**Description**: ${context.
|
|
201
|
+
// Issue information
|
|
202
|
+
sections.push(`# Issue Information`);
|
|
203
|
+
sections.push(`**Issue ID**: ${context.issueId}`);
|
|
204
|
+
sections.push(`**Issue Name**: ${context.issueName}`);
|
|
205
|
+
if (context.issueDescription) {
|
|
206
|
+
sections.push(`**Description**: ${context.issueDescription}`);
|
|
207
207
|
}
|
|
208
208
|
sections.push(`**Pull Request**: ${context.pullRequestUrl} (#${context.pullRequestNumber})`);
|
|
209
209
|
sections.push('');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared diff utilities for mapping file line numbers to GitHub diff positions.
|
|
3
|
-
* Used by both
|
|
3
|
+
* Used by both issue-linked code review and standalone PR review.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Parse unified diff patch to build a mapping from file line numbers to diff positions
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared diff utilities for mapping file line numbers to GitHub diff positions.
|
|
3
|
-
* Used by both
|
|
3
|
+
* Used by both issue-linked code review and standalone PR review.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Parse unified diff patch to build a mapping from file line numbers to diff positions
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type ChecklistPhaseContext } from '../../services/checklist.js';
|
|
6
6
|
import { type EdsgerConfig } from '../../types/index.js';
|
|
7
7
|
export interface CodeReviewOptions {
|
|
8
|
-
|
|
8
|
+
issueId: string;
|
|
9
9
|
githubToken: string;
|
|
10
10
|
verbose?: boolean;
|
|
11
11
|
checklistContext?: ChecklistPhaseContext | null;
|
|
@@ -17,7 +17,7 @@ export interface ReviewComment {
|
|
|
17
17
|
body: string;
|
|
18
18
|
}
|
|
19
19
|
export interface CodeReviewResult {
|
|
20
|
-
|
|
20
|
+
issueId: string;
|
|
21
21
|
status: 'success' | 'error';
|
|
22
22
|
message: string;
|
|
23
23
|
reviewId?: number;
|
|
@@ -69,13 +69,13 @@ baseBranchInfo, baseBranchForRebase, originalBaseBranchForRebase, verbose) {
|
|
|
69
69
|
*/
|
|
70
70
|
// eslint-disable-next-line complexity
|
|
71
71
|
export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
72
|
-
const {
|
|
72
|
+
const { issueId, githubToken, verbose } = options;
|
|
73
73
|
if (verbose) {
|
|
74
|
-
logInfo(`Starting code review for
|
|
74
|
+
logInfo(`Starting code review for issue ID: ${issueId}`);
|
|
75
75
|
}
|
|
76
|
-
// For multi-branch
|
|
76
|
+
// For multi-branch issues, find the branch that is ready for review
|
|
77
77
|
// and use its branch_name for review (branch_name is stored as dev/...)
|
|
78
|
-
let branchName = `dev/${
|
|
78
|
+
let branchName = `dev/${issueId}`; // Default for single-branch issues
|
|
79
79
|
let currentBranch = null;
|
|
80
80
|
let allBranches = [];
|
|
81
81
|
let baseBranchForRebase = 'main'; // Default base branch for rebase
|
|
@@ -84,7 +84,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
84
84
|
let baseBranchCompletedForRebase = false;
|
|
85
85
|
try {
|
|
86
86
|
// Get all branches to determine base branch info
|
|
87
|
-
allBranches = await getBranches({
|
|
87
|
+
allBranches = await getBranches({ issueId, verbose });
|
|
88
88
|
currentBranch =
|
|
89
89
|
allBranches.find((b) => b.status === 'ready_for_review') || null;
|
|
90
90
|
if (currentBranch && currentBranch.branch_name) {
|
|
@@ -115,7 +115,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
115
115
|
}
|
|
116
116
|
catch (_error) {
|
|
117
117
|
if (verbose) {
|
|
118
|
-
logInfo(`Note: Could not fetch
|
|
118
|
+
logInfo(`Note: Could not fetch issue branches, using default branch`);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
// Get PR URL from branch
|
|
@@ -134,7 +134,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
134
134
|
let featSyncedToMain = false;
|
|
135
135
|
if (branchName.startsWith('dev/')) {
|
|
136
136
|
try {
|
|
137
|
-
const githubConfig = await getGitHubConfig(
|
|
137
|
+
const githubConfig = await getGitHubConfig(issueId, verbose);
|
|
138
138
|
if (githubConfig.configured &&
|
|
139
139
|
githubConfig.token &&
|
|
140
140
|
githubConfig.owner &&
|
|
@@ -164,7 +164,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
164
164
|
// Use async version with automatic conflict resolution
|
|
165
165
|
const gitEnvResult = currentBranch
|
|
166
166
|
? await prepareCustomBranchGitEnvironmentAsync({
|
|
167
|
-
|
|
167
|
+
issueBranch: branchName,
|
|
168
168
|
baseBranch: baseBranchForRebase,
|
|
169
169
|
rebaseTargetBranch: rebaseTargetBranchForRebase,
|
|
170
170
|
originalBaseBranch: originalBaseBranchForRebase,
|
|
@@ -177,7 +177,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
177
177
|
baseBranchCompleted: baseBranchCompletedForRebase,
|
|
178
178
|
githubToken,
|
|
179
179
|
})
|
|
180
|
-
: await preparePhaseGitEnvironmentAsync(
|
|
180
|
+
: await preparePhaseGitEnvironmentAsync(issueId, 'main', verbose, true, {
|
|
181
181
|
model: DEFAULT_MODEL,
|
|
182
182
|
});
|
|
183
183
|
const cleanupGit = gitEnvResult.cleanup;
|
|
@@ -190,14 +190,14 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
190
190
|
if (verbose) {
|
|
191
191
|
logInfo('Fetching code review context from GitHub PR...');
|
|
192
192
|
}
|
|
193
|
-
const context = await fetchCodeReviewContext(
|
|
193
|
+
const context = await fetchCodeReviewContext(issueId, githubToken, verbose, pullRequestUrl || undefined);
|
|
194
194
|
// Check if there are any files to review
|
|
195
195
|
if (context.files.length === 0) {
|
|
196
196
|
if (verbose) {
|
|
197
197
|
logInfo('✅ No files to review in the PR.');
|
|
198
198
|
}
|
|
199
199
|
return {
|
|
200
|
-
|
|
200
|
+
issueId,
|
|
201
201
|
status: 'success',
|
|
202
202
|
message: 'No files to review',
|
|
203
203
|
summary: 'No changed files found in the PR',
|
|
@@ -207,10 +207,10 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
207
207
|
logInfo(`📋 Found ${context.files.length} files to review across ${context.commits.length} commits`);
|
|
208
208
|
}
|
|
209
209
|
// Fetch additional feedbacks for code-review phase
|
|
210
|
-
// For multi-branch
|
|
210
|
+
// For multi-branch issues, filter by the current branch to get branch-specific feedbacks
|
|
211
211
|
let feedbacksInfo;
|
|
212
212
|
try {
|
|
213
|
-
const feedbacksContext = await getFeedbacksForPhase({
|
|
213
|
+
const feedbacksContext = await getFeedbacksForPhase({ issueId, verbose }, 'code_review', currentBranch?.id // Pass branch_id if we have a current branch
|
|
214
214
|
);
|
|
215
215
|
if (feedbacksContext.feedbacks.length > 0) {
|
|
216
216
|
feedbacksInfo = await formatFeedbacksForContext(feedbacksContext);
|
|
@@ -226,7 +226,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
226
226
|
}
|
|
227
227
|
// Create prompt for code review
|
|
228
228
|
const systemPrompt = createSystemPrompt(config, checklistContext);
|
|
229
|
-
const reviewPrompt = createCodeReviewPrompt(
|
|
229
|
+
const reviewPrompt = createCodeReviewPrompt(issueId, context, feedbacksInfo, checklistContext);
|
|
230
230
|
let lastAssistantResponse = '';
|
|
231
231
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
232
232
|
let structuredReviewResult = null;
|
|
@@ -285,7 +285,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
285
285
|
overall_assessment ||
|
|
286
286
|
'Code review completed. No issues found.',
|
|
287
287
|
});
|
|
288
|
-
// Update branch status to 'reviewed' for multi-branch
|
|
288
|
+
// Update branch status to 'reviewed' for multi-branch issues
|
|
289
289
|
if (currentBranch) {
|
|
290
290
|
await updateBranch(currentBranch.id, { status: 'reviewed' }, verbose);
|
|
291
291
|
if (verbose) {
|
|
@@ -293,7 +293,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
return {
|
|
296
|
-
|
|
296
|
+
issueId,
|
|
297
297
|
status: 'success',
|
|
298
298
|
message: 'Code review completed - no issues found',
|
|
299
299
|
reviewId: review.data.id,
|
|
@@ -365,7 +365,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
365
365
|
event: 'COMMENT',
|
|
366
366
|
body: `${summary || overall_assessment || 'Code review completed.'}\n\n**Note**: Some review comments could not be posted because they referenced lines not present in the diff.`,
|
|
367
367
|
});
|
|
368
|
-
// Update branch status to 'reviewed' for multi-branch
|
|
368
|
+
// Update branch status to 'reviewed' for multi-branch issues
|
|
369
369
|
if (currentBranch) {
|
|
370
370
|
await updateBranch(currentBranch.id, { status: 'reviewed' }, verbose);
|
|
371
371
|
if (verbose) {
|
|
@@ -373,7 +373,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
return {
|
|
376
|
-
|
|
376
|
+
issueId,
|
|
377
377
|
status: 'success',
|
|
378
378
|
message: 'Code review completed - comments filtered due to invalid line numbers',
|
|
379
379
|
reviewId: review.data.id,
|
|
@@ -405,7 +405,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
405
405
|
logInfo(`Review ID: ${review.data.id}`);
|
|
406
406
|
logInfo(`Comments posted: ${comments.length}`);
|
|
407
407
|
}
|
|
408
|
-
// Update branch status to 'reviewed' for multi-branch
|
|
408
|
+
// Update branch status to 'reviewed' for multi-branch issues
|
|
409
409
|
if (currentBranch) {
|
|
410
410
|
await updateBranch(currentBranch.id, { status: 'reviewed' }, verbose);
|
|
411
411
|
if (verbose) {
|
|
@@ -413,7 +413,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
return {
|
|
416
|
-
|
|
416
|
+
issueId,
|
|
417
417
|
status: 'success',
|
|
418
418
|
message: 'Code review completed and posted to GitHub',
|
|
419
419
|
reviewId: review.data.id,
|
|
@@ -427,7 +427,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
427
427
|
};
|
|
428
428
|
}
|
|
429
429
|
return {
|
|
430
|
-
|
|
430
|
+
issueId,
|
|
431
431
|
status: 'error',
|
|
432
432
|
message: 'Code review analysis failed or incomplete',
|
|
433
433
|
};
|
|
@@ -436,7 +436,7 @@ export const reviewPullRequest = async (options, config, checklistContext) => {
|
|
|
436
436
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
437
437
|
logError(`Code review failed: ${errorMessage}`);
|
|
438
438
|
return {
|
|
439
|
-
|
|
439
|
+
issueId,
|
|
440
440
|
status: 'error',
|
|
441
441
|
message: `Code review failed: ${errorMessage}`,
|
|
442
442
|
};
|
|
@@ -506,7 +506,7 @@ You MUST end your response with a JSON object containing the review results in t
|
|
|
506
506
|
\`\`\`json
|
|
507
507
|
{
|
|
508
508
|
"review_result": {
|
|
509
|
-
"
|
|
509
|
+
"issue_id": "ISSUE_ID_PLACEHOLDER",
|
|
510
510
|
"summary": "Overall review summary and assessment",
|
|
511
511
|
"overall_assessment": "APPROVE | REQUEST_CHANGES | COMMENT",
|
|
512
512
|
"comments": [
|
|
@@ -538,7 +538,7 @@ You MUST end your response with a JSON object containing the review results in t
|
|
|
538
538
|
|
|
539
539
|
Focus on providing valuable, actionable code review feedback.`;
|
|
540
540
|
}
|
|
541
|
-
function createCodeReviewPrompt(
|
|
541
|
+
function createCodeReviewPrompt(issueId, context, feedbacksInfo, checklistContext) {
|
|
542
542
|
let contextInfo = formatContextForPrompt(context);
|
|
543
543
|
if (feedbacksInfo) {
|
|
544
544
|
contextInfo = `${contextInfo}\n\n${feedbacksInfo}`;
|
|
@@ -547,7 +547,7 @@ function createCodeReviewPrompt(featureId, context, feedbacksInfo, checklistCont
|
|
|
547
547
|
const checklistInfo = formatChecklistsForContext(checklistContext);
|
|
548
548
|
contextInfo = `${contextInfo}\n\n${checklistInfo}`;
|
|
549
549
|
}
|
|
550
|
-
return `Review the pull request code for
|
|
550
|
+
return `Review the pull request code for issue: ${issueId}
|
|
551
551
|
|
|
552
552
|
${contextInfo}
|
|
553
553
|
|
|
@@ -555,7 +555,7 @@ ${contextInfo}
|
|
|
555
555
|
|
|
556
556
|
Follow this systematic approach:
|
|
557
557
|
|
|
558
|
-
1. **Understand the Context**: Review the
|
|
558
|
+
1. **Understand the Context**: Review the issue description, technical design, user stories, and test cases to understand what the code should accomplish.
|
|
559
559
|
|
|
560
560
|
2. **Analyze Each File**: For each changed file:
|
|
561
561
|
- Review the code changes in the diff
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type EdsgerConfig, type WithExecutionSessionId } from '../../types/index.js';
|
|
2
2
|
export interface CodeTestingOptions {
|
|
3
|
-
|
|
3
|
+
issueId: string;
|
|
4
4
|
verbose?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export interface CodeTestingResult extends WithExecutionSessionId {
|
|
7
|
-
|
|
7
|
+
issueId: string;
|
|
8
8
|
branchName: string;
|
|
9
9
|
testSummary: string | null;
|
|
10
10
|
status: 'success' | 'error';
|
|
@@ -33,21 +33,21 @@ async function* prompt(testingPrompt) {
|
|
|
33
33
|
}
|
|
34
34
|
// eslint-disable-next-line complexity
|
|
35
35
|
export const writeCodeTests = async (options, config) => {
|
|
36
|
-
const {
|
|
36
|
+
const { issueId, verbose } = options;
|
|
37
37
|
if (verbose) {
|
|
38
|
-
logInfo(`Starting code testing phase for
|
|
38
|
+
logInfo(`Starting code testing phase for issue ID: ${issueId}`);
|
|
39
39
|
}
|
|
40
|
-
// Prepare git environment: switch to
|
|
41
|
-
const cleanupGit = preparePhaseGitEnvironment(
|
|
40
|
+
// Prepare git environment: switch to issue branch and rebase with main
|
|
41
|
+
const cleanupGit = preparePhaseGitEnvironment(issueId, 'main', verbose);
|
|
42
42
|
try {
|
|
43
43
|
// Fetch all required context information via MCP endpoints
|
|
44
44
|
if (verbose) {
|
|
45
45
|
logInfo('Fetching code testing context via MCP endpoints...');
|
|
46
46
|
}
|
|
47
|
-
const context = await fetchCodeTestingContext(
|
|
47
|
+
const context = await fetchCodeTestingContext(issueId, verbose);
|
|
48
48
|
const systemPrompt = await createCodeTestingSystemPrompt(config);
|
|
49
|
-
const testingPrompt = createCodeTestingPromptWithContext(
|
|
50
|
-
const branchName = `dev/${
|
|
49
|
+
const testingPrompt = createCodeTestingPromptWithContext(issueId, formatContextForPrompt(context));
|
|
50
|
+
const branchName = `dev/${issueId}`;
|
|
51
51
|
if (verbose) {
|
|
52
52
|
logInfo('Starting Claude Code query for code testing...');
|
|
53
53
|
}
|
|
@@ -88,7 +88,7 @@ export const writeCodeTests = async (options, config) => {
|
|
|
88
88
|
const codeTestResult = jsonResult?.code_test_result;
|
|
89
89
|
if (codeTestResult) {
|
|
90
90
|
return {
|
|
91
|
-
|
|
91
|
+
issueId,
|
|
92
92
|
branchName: codeTestResult.branch_name || branchName,
|
|
93
93
|
testSummary: codeTestResult.summary ||
|
|
94
94
|
'Tests written successfully',
|
|
@@ -105,9 +105,9 @@ export const writeCodeTests = async (options, config) => {
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
// Fallback parsing
|
|
108
|
-
const parsedResult = parseTestingResponse(responseText,
|
|
108
|
+
const parsedResult = parseTestingResponse(responseText, issueId, verbose);
|
|
109
109
|
return {
|
|
110
|
-
|
|
110
|
+
issueId,
|
|
111
111
|
branchName: parsedResult.branchName,
|
|
112
112
|
testSummary: parsedResult.summary || 'Tests written',
|
|
113
113
|
status: 'success',
|
|
@@ -128,7 +128,7 @@ export const writeCodeTests = async (options, config) => {
|
|
|
128
128
|
const fallbackResult = fallbackJson?.code_test_result;
|
|
129
129
|
if (fallbackResult) {
|
|
130
130
|
return {
|
|
131
|
-
|
|
131
|
+
issueId,
|
|
132
132
|
branchName: fallbackResult.branch_name || branchName,
|
|
133
133
|
testSummary: fallbackResult.summary || 'Tests partially written',
|
|
134
134
|
status: 'error',
|
|
@@ -143,7 +143,7 @@ export const writeCodeTests = async (options, config) => {
|
|
|
143
143
|
// If we get here, no valid result was found
|
|
144
144
|
logError('⚠️ Code testing completed but no structured result found');
|
|
145
145
|
return {
|
|
146
|
-
|
|
146
|
+
issueId,
|
|
147
147
|
branchName,
|
|
148
148
|
testSummary: null,
|
|
149
149
|
status: 'error',
|
|
@@ -153,8 +153,8 @@ export const writeCodeTests = async (options, config) => {
|
|
|
153
153
|
catch (error) {
|
|
154
154
|
logError(`Code testing failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
155
155
|
return {
|
|
156
|
-
|
|
157
|
-
branchName: `dev/${
|
|
156
|
+
issueId,
|
|
157
|
+
branchName: `dev/${issueId}`,
|
|
158
158
|
testSummary: null,
|
|
159
159
|
status: 'error',
|
|
160
160
|
message: `Testing failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
@@ -165,7 +165,7 @@ export const writeCodeTests = async (options, config) => {
|
|
|
165
165
|
cleanupGit();
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
|
-
const parseTestingResponse = (response,
|
|
168
|
+
const parseTestingResponse = (response, issueId, verbose) => {
|
|
169
169
|
logDebug('Parsing code testing response...', verbose);
|
|
170
170
|
try {
|
|
171
171
|
// Try to find JSON in the response
|
|
@@ -177,7 +177,7 @@ const parseTestingResponse = (response, featureId, verbose) => {
|
|
|
177
177
|
if (parsed.code_test_result) {
|
|
178
178
|
const result = parsed.code_test_result;
|
|
179
179
|
return {
|
|
180
|
-
branchName: result.branch_name || `dev/${
|
|
180
|
+
branchName: result.branch_name || `dev/${issueId}`,
|
|
181
181
|
testFilesCreated: result.test_files_created || [],
|
|
182
182
|
testFilesModified: result.test_files_modified || [],
|
|
183
183
|
commitHash: result.commit_hash || '',
|
|
@@ -190,7 +190,7 @@ const parseTestingResponse = (response, featureId, verbose) => {
|
|
|
190
190
|
const filesMatch = response.match(/files?[:\s]+([^\n]+)/i);
|
|
191
191
|
const commitMatch = response.match(/commit[:\s]+([a-f0-9]{7,})/i);
|
|
192
192
|
return {
|
|
193
|
-
branchName: branchMatch?.[1] || `dev/${
|
|
193
|
+
branchName: branchMatch?.[1] || `dev/${issueId}`,
|
|
194
194
|
testFilesCreated: filesMatch
|
|
195
195
|
? filesMatch[1].split(/[,\s]+/).filter((f) => f)
|
|
196
196
|
: [],
|
|
@@ -202,7 +202,7 @@ const parseTestingResponse = (response, featureId, verbose) => {
|
|
|
202
202
|
catch (error) {
|
|
203
203
|
logError(`Response parsing failed: ${error}`);
|
|
204
204
|
return {
|
|
205
|
-
branchName: `dev/${
|
|
205
|
+
branchName: `dev/${issueId}`,
|
|
206
206
|
testFilesCreated: [],
|
|
207
207
|
testFilesModified: [],
|
|
208
208
|
commitHash: '',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ProductInfo } from '../../api/products.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { IssueInfo, TestCase, UserStory } from '../../types/issues.js';
|
|
3
3
|
export interface CodeTestingContext {
|
|
4
|
-
|
|
4
|
+
issue: IssueInfo;
|
|
5
5
|
product: ProductInfo;
|
|
6
6
|
user_stories: UserStory[];
|
|
7
7
|
test_cases: TestCase[];
|
|
@@ -9,7 +9,7 @@ export interface CodeTestingContext {
|
|
|
9
9
|
/**
|
|
10
10
|
* Fetch all code testing context information via MCP endpoints
|
|
11
11
|
*/
|
|
12
|
-
export declare function fetchCodeTestingContext(
|
|
12
|
+
export declare function fetchCodeTestingContext(issueId: string, verbose?: boolean): Promise<CodeTestingContext>;
|
|
13
13
|
/**
|
|
14
14
|
* Format the context into a readable string for Claude Code
|
|
15
15
|
*/
|