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
|
@@ -138,20 +138,20 @@ function processAssistantContent(content, responseAccumulator, verbose) {
|
|
|
138
138
|
* Verify code implementation against checklist requirements by reviewing git diff
|
|
139
139
|
*/
|
|
140
140
|
export async function verifyCodeImplementationCompliance(options, _config) {
|
|
141
|
-
const {
|
|
141
|
+
const { issueId, branchName, baseBranch, issueName, issueDescription, checklistContext, verbose, } = options;
|
|
142
142
|
if (verbose) {
|
|
143
|
-
logInfo(`\n🔍 Starting code implementation verification for
|
|
143
|
+
logInfo(`\n🔍 Starting code implementation verification for issue: ${issueName}`);
|
|
144
144
|
logInfo(` Branch: ${branchName}`);
|
|
145
145
|
logInfo(` Base: ${baseBranch}`);
|
|
146
146
|
}
|
|
147
147
|
try {
|
|
148
148
|
const systemPrompt = await createCodeImplementationVerificationSystemPrompt();
|
|
149
149
|
const verificationPrompt = createCodeImplementationVerificationPrompt({
|
|
150
|
-
|
|
150
|
+
issueId,
|
|
151
151
|
branchName,
|
|
152
152
|
baseBranch,
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
issueName,
|
|
154
|
+
issueDescription: issueDescription || '',
|
|
155
155
|
checklistContext,
|
|
156
156
|
});
|
|
157
157
|
const responseAccumulator = { text: '' };
|
|
@@ -16,9 +16,9 @@ export interface PerformVerificationCycleOptions {
|
|
|
16
16
|
branchName: string;
|
|
17
17
|
baseBranch: string;
|
|
18
18
|
checklistContext: ChecklistPhaseContext | null;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
issueId: string;
|
|
20
|
+
issueName: string;
|
|
21
|
+
issueDescription: string | undefined;
|
|
22
22
|
config: EdsgerConfig;
|
|
23
23
|
currentIteration: number;
|
|
24
24
|
maxIterations: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { logIssueVerificationEvent } from '../../services/audit-logs.js';
|
|
2
2
|
import { formatChecklistsForContext, processChecklistItemResultsFromResponse, } from '../../services/checklist.js';
|
|
3
3
|
import { logError, logInfo } from '../../utils/logger.js';
|
|
4
4
|
import { createCodeImplementationImprovementPrompt } from '../code-implementation/prompts.js';
|
|
5
5
|
import { verifyCodeImplementationCompliance, } from '../code-implementation-verification/agent.js';
|
|
6
6
|
export async function performVerificationCycle(opts) {
|
|
7
|
-
const { branchName, baseBranch, checklistContext,
|
|
7
|
+
const { branchName, baseBranch, checklistContext, issueId, issueName, issueDescription, config, currentIteration, maxIterations, verbose, } = opts;
|
|
8
8
|
// If no checklist, verification passes automatically
|
|
9
9
|
if (!checklistContext || checklistContext.checklists.length === 0) {
|
|
10
10
|
if (verbose) {
|
|
@@ -23,11 +23,11 @@ export async function performVerificationCycle(opts) {
|
|
|
23
23
|
const checklistInfo = formatChecklistsForContext(checklistContext);
|
|
24
24
|
// Perform verification
|
|
25
25
|
const verificationResult = await verifyCodeImplementationCompliance({
|
|
26
|
-
|
|
26
|
+
issueId,
|
|
27
27
|
branchName,
|
|
28
28
|
baseBranch,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
issueName,
|
|
30
|
+
issueDescription,
|
|
31
31
|
checklistContext: checklistInfo,
|
|
32
32
|
verbose,
|
|
33
33
|
}, config);
|
|
@@ -38,8 +38,8 @@ export async function performVerificationCycle(opts) {
|
|
|
38
38
|
if (verbose) {
|
|
39
39
|
logInfo(`✅ Code verification passed: ${verificationResult.confirmed_count} confirmed, ${verificationResult.uncertain_count} uncertain`);
|
|
40
40
|
}
|
|
41
|
-
await
|
|
42
|
-
|
|
41
|
+
await logIssueVerificationEvent({
|
|
42
|
+
issueId,
|
|
43
43
|
phase: 'code_implementation',
|
|
44
44
|
iteration: currentIteration,
|
|
45
45
|
result: 'success',
|
|
@@ -57,12 +57,12 @@ export async function performVerificationCycle(opts) {
|
|
|
57
57
|
value: item.verification_status,
|
|
58
58
|
notes: item.verification_reason || undefined,
|
|
59
59
|
}));
|
|
60
|
-
await processChecklistItemResultsFromResponse({
|
|
60
|
+
await processChecklistItemResultsFromResponse({ issueId }, 'code_implementation', checklistItemResults, verbose);
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
63
|
logError(`❌ Iteration ${currentIteration}: Code verification FAILED - ${verificationResult.rejected_count} items rejected, ${verificationResult.uncertain_count} uncertain`);
|
|
64
|
-
await
|
|
65
|
-
|
|
64
|
+
await logIssueVerificationEvent({
|
|
65
|
+
issueId,
|
|
66
66
|
phase: 'code_implementation',
|
|
67
67
|
iteration: currentIteration,
|
|
68
68
|
result: 'error',
|
|
@@ -111,7 +111,7 @@ export async function performVerificationCycle(opts) {
|
|
|
111
111
|
value: item.verification_status,
|
|
112
112
|
notes: item.verification_reason || undefined,
|
|
113
113
|
}));
|
|
114
|
-
await processChecklistItemResultsFromResponse({
|
|
114
|
+
await processChecklistItemResultsFromResponse({ issueId }, 'code_implementation', checklistItemResults, verbose);
|
|
115
115
|
}
|
|
116
116
|
return {
|
|
117
117
|
passed: verificationPassed,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const createCodeImplementationVerificationSystemPrompt: (projectDir?: string) => Promise<string>;
|
|
2
2
|
export interface CodeImplVerificationPromptOptions {
|
|
3
|
-
|
|
3
|
+
issueId: string;
|
|
4
4
|
branchName: string;
|
|
5
5
|
baseBranch: string;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
issueName: string;
|
|
7
|
+
issueDescription: string;
|
|
8
8
|
checklistContext: string;
|
|
9
9
|
}
|
|
10
10
|
export declare const createCodeImplementationVerificationPrompt: (opts: CodeImplVerificationPromptOptions) => string;
|
|
@@ -12,14 +12,14 @@ export const createCodeImplementationVerificationSystemPrompt = async (projectDi
|
|
|
12
12
|
${OUTPUT_CONTRACTS['code-implementation-verification']}`;
|
|
13
13
|
};
|
|
14
14
|
export const createCodeImplementationVerificationPrompt = (opts) => {
|
|
15
|
-
const {
|
|
15
|
+
const { issueId, branchName, baseBranch, issueName, issueDescription, checklistContext, } = opts;
|
|
16
16
|
return `# Code Implementation Verification Task
|
|
17
17
|
|
|
18
|
-
You are verifying the code implementation for
|
|
18
|
+
You are verifying the code implementation for issue: **${issueName}**
|
|
19
19
|
|
|
20
|
-
##
|
|
21
|
-
- **
|
|
22
|
-
- **Description**: ${
|
|
20
|
+
## Issue Information
|
|
21
|
+
- **Issue ID**: ${issueId}
|
|
22
|
+
- **Description**: ${issueDescription}
|
|
23
23
|
- **Implementation Branch**: ${branchName}
|
|
24
24
|
- **Base Branch**: ${baseBranch}
|
|
25
25
|
|
|
@@ -32,13 +32,13 @@ ${checklistContext}
|
|
|
32
32
|
|
|
33
33
|
Follow these steps systematically:
|
|
34
34
|
|
|
35
|
-
### Step 1: Switch to
|
|
35
|
+
### Step 1: Switch to Issue Branch
|
|
36
36
|
\`\`\`bash
|
|
37
37
|
git checkout ${branchName}
|
|
38
38
|
\`\`\`
|
|
39
39
|
|
|
40
40
|
### Step 2: Review Code Changes
|
|
41
|
-
Compare the
|
|
41
|
+
Compare the issue branch with the base branch to see what was changed:
|
|
42
42
|
\`\`\`bash
|
|
43
43
|
git diff ${baseBranch}...${branchName}
|
|
44
44
|
\`\`\`
|
|
@@ -40,9 +40,9 @@ export interface PRReviewThread {
|
|
|
40
40
|
comments: PRReviewComment[];
|
|
41
41
|
}
|
|
42
42
|
export interface CodeRefineContext {
|
|
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;
|
|
@@ -80,19 +80,19 @@ export declare function fetchPRDataGraphQL(octokit: Octokit, owner: string, repo
|
|
|
80
80
|
/**
|
|
81
81
|
* Fetch user stories via MCP
|
|
82
82
|
*/
|
|
83
|
-
export declare function fetchUserStories(
|
|
83
|
+
export declare function fetchUserStories(issueId: string, verbose?: boolean): Promise<any[]>;
|
|
84
84
|
/**
|
|
85
85
|
* Fetch test cases via MCP
|
|
86
86
|
*/
|
|
87
|
-
export declare function fetchTestCases(
|
|
87
|
+
export declare function fetchTestCases(issueId: string, verbose?: boolean): Promise<any[]>;
|
|
88
88
|
/**
|
|
89
89
|
* Fetch complete code refine context
|
|
90
|
-
* @param
|
|
90
|
+
* @param issueId - The issue ID
|
|
91
91
|
* @param githubToken - GitHub token for API access
|
|
92
92
|
* @param verbose - Enable verbose logging
|
|
93
|
-
* @param pullRequestUrl - Optional PR URL (for multi-branch
|
|
93
|
+
* @param pullRequestUrl - Optional PR URL (for multi-branch issues, use branch's PR URL)
|
|
94
94
|
*/
|
|
95
|
-
export declare function fetchCodeRefineContext(
|
|
95
|
+
export declare function fetchCodeRefineContext(issueId: string, githubToken: string, verbose?: boolean, pullRequestUrl?: string): Promise<CodeRefineContext>;
|
|
96
96
|
/**
|
|
97
97
|
* Format code refine context for prompt
|
|
98
98
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Fetches GitHub PR review comments and reviews using GraphQL API
|
|
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 { downloadImagesForClaudeCode } from '../../utils/image-downloader.js';
|
|
9
9
|
import { logDebug } from '../../utils/logger.js';
|
|
@@ -174,11 +174,11 @@ export async function fetchPRDataGraphQL(octokit, owner, repo, prNumber, verbose
|
|
|
174
174
|
/**
|
|
175
175
|
* Fetch user stories via MCP
|
|
176
176
|
*/
|
|
177
|
-
export async function fetchUserStories(
|
|
177
|
+
export async function fetchUserStories(issueId, verbose
|
|
178
178
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
179
179
|
) {
|
|
180
180
|
try {
|
|
181
|
-
logDebug(`Fetching user stories for ${
|
|
181
|
+
logDebug(`Fetching user stories for ${issueId}...`, verbose);
|
|
182
182
|
const mcpServerUrl = getMcpServerUrl();
|
|
183
183
|
const mcpToken = getMcpToken();
|
|
184
184
|
const response = await fetch(`${mcpServerUrl}/mcp`, {
|
|
@@ -192,7 +192,7 @@ export async function fetchUserStories(featureId, verbose
|
|
|
192
192
|
id: 1,
|
|
193
193
|
method: 'user_stories/list',
|
|
194
194
|
params: {
|
|
195
|
-
|
|
195
|
+
issue_id: issueId,
|
|
196
196
|
},
|
|
197
197
|
}),
|
|
198
198
|
});
|
|
@@ -215,11 +215,11 @@ export async function fetchUserStories(featureId, verbose
|
|
|
215
215
|
/**
|
|
216
216
|
* Fetch test cases via MCP
|
|
217
217
|
*/
|
|
218
|
-
export async function fetchTestCases(
|
|
218
|
+
export async function fetchTestCases(issueId, verbose
|
|
219
219
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
220
220
|
) {
|
|
221
221
|
try {
|
|
222
|
-
logDebug(`Fetching test cases for ${
|
|
222
|
+
logDebug(`Fetching test cases for ${issueId}...`, verbose);
|
|
223
223
|
const mcpServerUrl = getMcpServerUrl();
|
|
224
224
|
const mcpToken = getMcpToken();
|
|
225
225
|
const response = await fetch(`${mcpServerUrl}/mcp`, {
|
|
@@ -233,7 +233,7 @@ export async function fetchTestCases(featureId, verbose
|
|
|
233
233
|
id: 1,
|
|
234
234
|
method: 'test_cases/list',
|
|
235
235
|
params: {
|
|
236
|
-
|
|
236
|
+
issue_id: issueId,
|
|
237
237
|
},
|
|
238
238
|
}),
|
|
239
239
|
});
|
|
@@ -257,14 +257,14 @@ export async function fetchTestCases(featureId, verbose
|
|
|
257
257
|
* Process images in GitHub PR reviews and comments
|
|
258
258
|
* Downloads images from markdown content and replaces URLs with local paths
|
|
259
259
|
*/
|
|
260
|
-
async function processGitHubContentImages(reviews, reviewThreads,
|
|
260
|
+
async function processGitHubContentImages(reviews, reviewThreads, issueId, verbose) {
|
|
261
261
|
logDebug('Processing images in GitHub PR content...', verbose);
|
|
262
262
|
// Process review bodies
|
|
263
263
|
const processedReviews = await Promise.all(reviews.map(async (review) => {
|
|
264
264
|
if (!review.body) {
|
|
265
265
|
return review;
|
|
266
266
|
}
|
|
267
|
-
const { processedMarkdown } = await downloadImagesForClaudeCode(review.body,
|
|
267
|
+
const { processedMarkdown } = await downloadImagesForClaudeCode(review.body, issueId);
|
|
268
268
|
return { ...review, body: processedMarkdown };
|
|
269
269
|
}));
|
|
270
270
|
// Process comment bodies in review threads
|
|
@@ -273,7 +273,7 @@ async function processGitHubContentImages(reviews, reviewThreads, featureId, ver
|
|
|
273
273
|
if (!comment.body) {
|
|
274
274
|
return comment;
|
|
275
275
|
}
|
|
276
|
-
const { processedMarkdown } = await downloadImagesForClaudeCode(comment.body,
|
|
276
|
+
const { processedMarkdown } = await downloadImagesForClaudeCode(comment.body, issueId);
|
|
277
277
|
return { ...comment, body: processedMarkdown };
|
|
278
278
|
}));
|
|
279
279
|
return { ...thread, comments: processedComments };
|
|
@@ -286,18 +286,18 @@ async function processGitHubContentImages(reviews, reviewThreads, featureId, ver
|
|
|
286
286
|
}
|
|
287
287
|
/**
|
|
288
288
|
* Fetch complete code refine context
|
|
289
|
-
* @param
|
|
289
|
+
* @param issueId - The issue ID
|
|
290
290
|
* @param githubToken - GitHub token for API access
|
|
291
291
|
* @param verbose - Enable verbose logging
|
|
292
|
-
* @param pullRequestUrl - Optional PR URL (for multi-branch
|
|
292
|
+
* @param pullRequestUrl - Optional PR URL (for multi-branch issues, use branch's PR URL)
|
|
293
293
|
*/
|
|
294
|
-
export async function fetchCodeRefineContext(
|
|
295
|
-
// Fetch
|
|
296
|
-
const
|
|
294
|
+
export async function fetchCodeRefineContext(issueId, githubToken, verbose, pullRequestUrl) {
|
|
295
|
+
// Fetch issue info using shared API
|
|
296
|
+
const issue = await getIssue(issueId, verbose);
|
|
297
297
|
// Use provided PR URL (from branch)
|
|
298
298
|
const prUrl = pullRequestUrl;
|
|
299
299
|
if (!prUrl) {
|
|
300
|
-
throw new Error(`No pull request URL found for
|
|
300
|
+
throw new Error(`No pull request URL found for issue ${issueId}. Cannot perform code refine.`);
|
|
301
301
|
}
|
|
302
302
|
// Parse PR URL
|
|
303
303
|
const prInfo = parsePullRequestUrl(prUrl);
|
|
@@ -312,18 +312,18 @@ export async function fetchCodeRefineContext(featureId, githubToken, verbose, pu
|
|
|
312
312
|
// Fetch PR data using GraphQL API and additional context
|
|
313
313
|
const [prData, userStories, testCases] = await Promise.all([
|
|
314
314
|
fetchPRDataGraphQL(octokit, owner, repo, prNumber, verbose),
|
|
315
|
-
fetchUserStories(
|
|
316
|
-
fetchTestCases(
|
|
315
|
+
fetchUserStories(issueId, verbose),
|
|
316
|
+
fetchTestCases(issueId, verbose),
|
|
317
317
|
]);
|
|
318
318
|
// Process images in GitHub PR content (reviews and comments may contain markdown images)
|
|
319
|
-
const { processedReviews, processedThreads } = await processGitHubContentImages(prData.reviews, prData.reviewThreads,
|
|
319
|
+
const { processedReviews, processedThreads } = await processGitHubContentImages(prData.reviews, prData.reviewThreads, issueId, verbose);
|
|
320
320
|
// Extract review comments from unresolved threads (use processed threads)
|
|
321
321
|
const reviewComments = processedThreads.flatMap((thread) => thread.comments);
|
|
322
322
|
logDebug(`Summary: ${processedReviews.length} reviews requesting changes, ${processedThreads.length} unresolved threads, ${reviewComments.length} total comments`, verbose);
|
|
323
323
|
return {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
324
|
+
issueId,
|
|
325
|
+
issueName: issue.name,
|
|
326
|
+
issueDescription: issue.description ?? null,
|
|
327
327
|
pullRequestUrl: prUrl,
|
|
328
328
|
pullRequestNumber: prNumber,
|
|
329
329
|
owner,
|
|
@@ -331,7 +331,7 @@ export async function fetchCodeRefineContext(featureId, githubToken, verbose, pu
|
|
|
331
331
|
reviews: processedReviews,
|
|
332
332
|
reviewComments,
|
|
333
333
|
reviewThreads: processedThreads,
|
|
334
|
-
technicalDesign:
|
|
334
|
+
technicalDesign: issue.technical_design,
|
|
335
335
|
userStories,
|
|
336
336
|
testCases,
|
|
337
337
|
};
|
|
@@ -341,12 +341,12 @@ export async function fetchCodeRefineContext(featureId, githubToken, verbose, pu
|
|
|
341
341
|
*/
|
|
342
342
|
export function formatContextForPrompt(context) {
|
|
343
343
|
const sections = [];
|
|
344
|
-
//
|
|
345
|
-
sections.push(`#
|
|
346
|
-
sections.push(`**
|
|
347
|
-
sections.push(`**
|
|
348
|
-
if (context.
|
|
349
|
-
sections.push(`**Description**: ${context.
|
|
344
|
+
// Issue information
|
|
345
|
+
sections.push(`# Issue Information`);
|
|
346
|
+
sections.push(`**Issue ID**: ${context.issueId}`);
|
|
347
|
+
sections.push(`**Issue Name**: ${context.issueName}`);
|
|
348
|
+
if (context.issueDescription) {
|
|
349
|
+
sections.push(`**Description**: ${context.issueDescription}`);
|
|
350
350
|
}
|
|
351
351
|
sections.push(`**Pull Request**: ${context.pullRequestUrl} (#${context.pullRequestNumber})`);
|
|
352
352
|
sections.push('');
|
|
@@ -8,7 +8,7 @@ import { type EdsgerConfig } from '../../types/index.js';
|
|
|
8
8
|
import { type CodeRefineVerificationResult } from '../code-refine-verification/index.js';
|
|
9
9
|
export declare const MAX_REFINE_ITERATIONS = 10;
|
|
10
10
|
export interface CodeRefineOptions {
|
|
11
|
-
|
|
11
|
+
issueId: string;
|
|
12
12
|
githubToken: string;
|
|
13
13
|
verbose?: boolean;
|
|
14
14
|
checklistContext?: ChecklistPhaseContext | null;
|
|
@@ -33,7 +33,7 @@ export interface CodeRefineOptions {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
export interface CodeRefineResult {
|
|
36
|
-
|
|
36
|
+
issueId: string;
|
|
37
37
|
status: 'success' | 'error';
|
|
38
38
|
message: string;
|
|
39
39
|
summary?: string;
|
|
@@ -43,13 +43,13 @@ export const MAX_REFINE_ITERATIONS = 10;
|
|
|
43
43
|
*/
|
|
44
44
|
// eslint-disable-next-line complexity
|
|
45
45
|
export const refineCodeFromPRFeedback = async (options, config, checklistContext) => {
|
|
46
|
-
const {
|
|
46
|
+
const { issueId, githubToken, verbose } = options;
|
|
47
47
|
if (verbose) {
|
|
48
|
-
logInfo(`Starting code refine for
|
|
48
|
+
logInfo(`Starting code refine for issue ID: ${issueId}`);
|
|
49
49
|
}
|
|
50
|
-
// For multi-branch
|
|
50
|
+
// For multi-branch issues, find the branch that has been reviewed
|
|
51
51
|
// (status = 'reviewed' after code-review phase) and use its branch_name for refine
|
|
52
|
-
let branchName = `dev/${
|
|
52
|
+
let branchName = `dev/${issueId}`; // Default for single-branch issues
|
|
53
53
|
let currentBranch = null;
|
|
54
54
|
let allBranches = [];
|
|
55
55
|
let baseBranchForRebase = 'main'; // Default base branch for rebase
|
|
@@ -58,7 +58,7 @@ export const refineCodeFromPRFeedback = async (options, config, checklistContext
|
|
|
58
58
|
let baseBranchCompletedForRebase = false;
|
|
59
59
|
try {
|
|
60
60
|
// Get all branches to determine base branch info
|
|
61
|
-
allBranches = await getBranches({
|
|
61
|
+
allBranches = await getBranches({ issueId, verbose });
|
|
62
62
|
currentBranch = allBranches.find((b) => b.status === 'reviewed') || null;
|
|
63
63
|
if (currentBranch && currentBranch.branch_name) {
|
|
64
64
|
// Use branch_name directly (already stored as dev/...)
|
|
@@ -88,7 +88,7 @@ export const refineCodeFromPRFeedback = async (options, config, checklistContext
|
|
|
88
88
|
}
|
|
89
89
|
catch (_error) {
|
|
90
90
|
if (verbose) {
|
|
91
|
-
logInfo(`Note: Could not fetch
|
|
91
|
+
logInfo(`Note: Could not fetch issue branches, using default branch`);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
// Get PR URL from branch
|
|
@@ -107,7 +107,7 @@ export const refineCodeFromPRFeedback = async (options, config, checklistContext
|
|
|
107
107
|
let featSyncedToMain = false;
|
|
108
108
|
if (branchName.startsWith('dev/')) {
|
|
109
109
|
try {
|
|
110
|
-
const githubConfig = await getGitHubConfig(
|
|
110
|
+
const githubConfig = await getGitHubConfig(issueId, verbose);
|
|
111
111
|
if (githubConfig.configured &&
|
|
112
112
|
githubConfig.token &&
|
|
113
113
|
githubConfig.owner &&
|
|
@@ -137,7 +137,7 @@ export const refineCodeFromPRFeedback = async (options, config, checklistContext
|
|
|
137
137
|
// Use async version with automatic conflict resolution
|
|
138
138
|
const gitEnvResult = currentBranch
|
|
139
139
|
? await prepareCustomBranchGitEnvironmentAsync({
|
|
140
|
-
|
|
140
|
+
issueBranch: branchName,
|
|
141
141
|
baseBranch: baseBranchForRebase,
|
|
142
142
|
rebaseTargetBranch: rebaseTargetBranchForRebase,
|
|
143
143
|
originalBaseBranch: originalBaseBranchForRebase,
|
|
@@ -150,7 +150,7 @@ export const refineCodeFromPRFeedback = async (options, config, checklistContext
|
|
|
150
150
|
baseBranchCompleted: baseBranchCompletedForRebase,
|
|
151
151
|
githubToken,
|
|
152
152
|
})
|
|
153
|
-
: await preparePhaseGitEnvironmentAsync(
|
|
153
|
+
: await preparePhaseGitEnvironmentAsync(issueId, 'main', verbose, true, {
|
|
154
154
|
model: DEFAULT_MODEL,
|
|
155
155
|
});
|
|
156
156
|
const cleanupGit = gitEnvResult.cleanup;
|
|
@@ -163,7 +163,7 @@ export const refineCodeFromPRFeedback = async (options, config, checklistContext
|
|
|
163
163
|
if (verbose) {
|
|
164
164
|
logInfo('Fetching code refine context from GitHub PR...');
|
|
165
165
|
}
|
|
166
|
-
const initialContext = await fetchCodeRefineContext(
|
|
166
|
+
const initialContext = await fetchCodeRefineContext(issueId, githubToken, verbose, pullRequestUrl || undefined);
|
|
167
167
|
// Check if there are any reviews or comments to address
|
|
168
168
|
if (initialContext.reviews.length === 0 &&
|
|
169
169
|
initialContext.reviewComments.length === 0) {
|
|
@@ -171,7 +171,7 @@ export const refineCodeFromPRFeedback = async (options, config, checklistContext
|
|
|
171
171
|
logInfo('✅ No review comments or change requests found. Nothing to refine.');
|
|
172
172
|
}
|
|
173
173
|
return {
|
|
174
|
-
|
|
174
|
+
issueId,
|
|
175
175
|
status: 'success',
|
|
176
176
|
message: 'No review feedback to address',
|
|
177
177
|
summary: 'No change requests or review comments found on the PR',
|
|
@@ -197,7 +197,7 @@ export const refineCodeFromPRFeedback = async (options, config, checklistContext
|
|
|
197
197
|
}
|
|
198
198
|
// Execute refine for this iteration
|
|
199
199
|
const refineResult = await executeRefineIteration({
|
|
200
|
-
|
|
200
|
+
issueId,
|
|
201
201
|
githubToken,
|
|
202
202
|
config,
|
|
203
203
|
pullRequestUrl: pullRequestUrl || undefined,
|
|
@@ -209,7 +209,7 @@ export const refineCodeFromPRFeedback = async (options, config, checklistContext
|
|
|
209
209
|
if (refineResult.status === 'error') {
|
|
210
210
|
// Refine failed - return error
|
|
211
211
|
return {
|
|
212
|
-
|
|
212
|
+
issueId,
|
|
213
213
|
status: 'error',
|
|
214
214
|
message: refineResult.message || 'Code refine failed',
|
|
215
215
|
iterations: currentIteration,
|
|
@@ -227,7 +227,7 @@ ${uncommittedFiles.join('\n')}
|
|
|
227
227
|
Please ensure Claude Code commits all changes before completing the refine phase.`;
|
|
228
228
|
logError(`❌ ${errorMsg}`);
|
|
229
229
|
return {
|
|
230
|
-
|
|
230
|
+
issueId,
|
|
231
231
|
status: 'error',
|
|
232
232
|
message: errorMsg,
|
|
233
233
|
iterations: currentIteration,
|
|
@@ -245,7 +245,7 @@ Please ensure Claude Code commits all changes before completing the refine phase
|
|
|
245
245
|
catch (pushError) {
|
|
246
246
|
logError(`Failed to push changes: ${pushError}`);
|
|
247
247
|
return {
|
|
248
|
-
|
|
248
|
+
issueId,
|
|
249
249
|
status: 'error',
|
|
250
250
|
message: `Code refined but failed to push: ${pushError}`,
|
|
251
251
|
iterations: currentIteration,
|
|
@@ -256,7 +256,7 @@ Please ensure Claude Code commits all changes before completing the refine phase
|
|
|
256
256
|
logInfo('\n🔍 Running verification to check if all comments are addressed...');
|
|
257
257
|
}
|
|
258
258
|
const verificationResult = await verifyAndResolveComments({
|
|
259
|
-
|
|
259
|
+
issueId,
|
|
260
260
|
githubToken,
|
|
261
261
|
config,
|
|
262
262
|
verbose,
|
|
@@ -267,7 +267,7 @@ Please ensure Claude Code commits all changes before completing the refine phase
|
|
|
267
267
|
if (verbose) {
|
|
268
268
|
logInfo('✅ Verification passed! All PR comments have been addressed and resolved.');
|
|
269
269
|
}
|
|
270
|
-
// Update branch status to 'refined' for multi-branch
|
|
270
|
+
// Update branch status to 'refined' for multi-branch issues
|
|
271
271
|
if (currentBranch) {
|
|
272
272
|
await updateBranch(currentBranch.id, { status: 'refined' }, verbose);
|
|
273
273
|
if (verbose) {
|
|
@@ -275,7 +275,7 @@ Please ensure Claude Code commits all changes before completing the refine phase
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
return {
|
|
278
|
-
|
|
278
|
+
issueId,
|
|
279
279
|
status: 'success',
|
|
280
280
|
message: verificationResult.message,
|
|
281
281
|
summary: lastRefineResult.summary ||
|
|
@@ -319,7 +319,7 @@ Please ensure Claude Code commits all changes before completing the refine phase
|
|
|
319
319
|
}
|
|
320
320
|
// Return last verification result (which failed)
|
|
321
321
|
return {
|
|
322
|
-
|
|
322
|
+
issueId,
|
|
323
323
|
status: 'error',
|
|
324
324
|
message: lastVerificationResult?.message ||
|
|
325
325
|
'Verification failed after max iterations',
|
|
@@ -334,7 +334,7 @@ Please ensure Claude Code commits all changes before completing the refine phase
|
|
|
334
334
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
335
335
|
logError(`Code refine failed: ${errorMessage}`);
|
|
336
336
|
return {
|
|
337
|
-
|
|
337
|
+
issueId,
|
|
338
338
|
status: 'error',
|
|
339
339
|
message: `Code refine failed: ${errorMessage}`,
|
|
340
340
|
};
|
|
@@ -2,4 +2,4 @@ import { type ChecklistPhaseContext } from '../../services/checklist.js';
|
|
|
2
2
|
import { type CodeRefineContext } from './context.js';
|
|
3
3
|
import { type CodeRefineOptions } from './index.js';
|
|
4
4
|
export declare function createSystemPrompt(checklistContext?: ChecklistPhaseContext | null, projectDir?: string): Promise<string>;
|
|
5
|
-
export declare function createCodeRefinePrompt(
|
|
5
|
+
export declare function createCodeRefinePrompt(issueId: string, context: CodeRefineContext, feedbacksInfo?: string, verificationFailureContext?: CodeRefineOptions['verificationFailureContext'], checklistContext?: ChecklistPhaseContext | null): string;
|
|
@@ -18,7 +18,7 @@ export async function createSystemPrompt(checklistContext, projectDir) {
|
|
|
18
18
|
: 'code-refine';
|
|
19
19
|
return `${prompt}\n\n${OUTPUT_CONTRACTS[contractKey]}`;
|
|
20
20
|
}
|
|
21
|
-
export function createCodeRefinePrompt(
|
|
21
|
+
export function createCodeRefinePrompt(issueId, context, feedbacksInfo, verificationFailureContext, checklistContext) {
|
|
22
22
|
let contextInfo = formatContextForPrompt(context);
|
|
23
23
|
if (feedbacksInfo) {
|
|
24
24
|
contextInfo = `${contextInfo}\n\n${feedbacksInfo}`;
|
|
@@ -67,7 +67,7 @@ ${verificationFailureContext.unresolvedReviewDetails
|
|
|
67
67
|
5. Do not skip or overlook any comments - address ALL of them
|
|
68
68
|
`;
|
|
69
69
|
}
|
|
70
|
-
return `Refine code based on PR review feedback for
|
|
70
|
+
return `Refine code based on PR review feedback for issue: ${issueId}
|
|
71
71
|
${verificationFailureContext ? '\n🔄 **This is a RETRY after verification failure**\n' : ''}
|
|
72
72
|
${contextInfo}
|
|
73
73
|
${verificationSection}
|
|
@@ -156,7 +156,7 @@ You MUST satisfy ALL checklist items provided in the context and include results
|
|
|
156
156
|
- ALL checklist items must be included - missing items will cause pipeline failure
|
|
157
157
|
`
|
|
158
158
|
: ''}
|
|
159
|
-
You are currently on the \`dev/${
|
|
159
|
+
You are currently on the \`dev/${issueId}\` branch. Make your changes, commit them, and they will be pushed to the remote repository.
|
|
160
160
|
|
|
161
161
|
Begin by analyzing all the review feedback and creating a plan to address each comment.`;
|
|
162
162
|
}
|
|
@@ -7,7 +7,7 @@ import { type ChecklistPhaseContext } from '../../services/checklist.js';
|
|
|
7
7
|
import { type EdsgerConfig } from '../../types/index.js';
|
|
8
8
|
import { type CodeRefineOptions } from './index.js';
|
|
9
9
|
export interface ExecuteRefineIterationOptions {
|
|
10
|
-
|
|
10
|
+
issueId: string;
|
|
11
11
|
githubToken: string;
|
|
12
12
|
config: EdsgerConfig;
|
|
13
13
|
pullRequestUrl: string | undefined;
|
|
@@ -23,13 +23,13 @@ async function* prompt(refinePrompt) {
|
|
|
23
23
|
}
|
|
24
24
|
// eslint-disable-next-line complexity -- agent loop with message processing and result extraction
|
|
25
25
|
export async function executeRefineIteration(opts) {
|
|
26
|
-
const {
|
|
26
|
+
const { issueId, githubToken, config: _config, pullRequestUrl, currentBranch, verificationFailureContext, checklistContext, verbose, } = opts;
|
|
27
27
|
// Fetch code refine context (PR reviews and comments)
|
|
28
|
-
const context = await fetchCodeRefineContext(
|
|
28
|
+
const context = await fetchCodeRefineContext(issueId, githubToken, verbose, pullRequestUrl);
|
|
29
29
|
// Fetch additional feedbacks for code-refine phase
|
|
30
30
|
let feedbacksInfo;
|
|
31
31
|
try {
|
|
32
|
-
const feedbacksContext = await getFeedbacksForPhase({
|
|
32
|
+
const feedbacksContext = await getFeedbacksForPhase({ issueId, verbose }, 'code_refine', currentBranch?.id);
|
|
33
33
|
if (feedbacksContext.feedbacks.length > 0) {
|
|
34
34
|
feedbacksInfo = await formatFeedbacksForContext(feedbacksContext);
|
|
35
35
|
if (verbose) {
|
|
@@ -44,7 +44,7 @@ export async function executeRefineIteration(opts) {
|
|
|
44
44
|
}
|
|
45
45
|
// Create prompt for code refine
|
|
46
46
|
const systemPrompt = await createSystemPrompt(checklistContext);
|
|
47
|
-
const refinePrompt = createCodeRefinePrompt(
|
|
47
|
+
const refinePrompt = createCodeRefinePrompt(issueId, context, feedbacksInfo, verificationFailureContext, checklistContext);
|
|
48
48
|
let lastAssistantResponse = '';
|
|
49
49
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
50
|
let structuredRefineResult = null;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code refine retry handler for pipeline execution
|
|
3
3
|
* Handles verification failures and retries code refine with suggestions
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { updateIssueStatusForPhase } from '../../api/issues/index.js';
|
|
6
6
|
import { runCodeRefinePhase, runCodeRefineVerificationPhase, } from '../../commands/workflow/executors/phase-executor.js';
|
|
7
7
|
import { logDebug, logInfo, logRaw } from '../../utils/logger.js';
|
|
8
8
|
import { logPhaseResult } from '../../utils/pipeline-logger.js';
|
|
@@ -71,7 +71,7 @@ export async function handleCodeRefineWithRetry({ options, config, results, verb
|
|
|
71
71
|
// Remove the failed verification result - we'll add the new one after retry
|
|
72
72
|
results.pop();
|
|
73
73
|
// Update status to indicate we're retrying code refine
|
|
74
|
-
await
|
|
74
|
+
await updateIssueStatusForPhase(options.issueId, 'code-refine', verbose);
|
|
75
75
|
// Also remove the code refine result so it can be retried
|
|
76
76
|
results.pop();
|
|
77
77
|
}
|