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
|
@@ -3,7 +3,7 @@ import { OUTPUT_CONTRACTS } from '../output-contracts.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Create the system prompt for branch planning
|
|
5
5
|
*/
|
|
6
|
-
export async function createBranchPlanningSystemPrompt(config,
|
|
6
|
+
export async function createBranchPlanningSystemPrompt(config, issueId, projectDir) {
|
|
7
7
|
const skill = await resolveSkill('phase/branch-planning', {
|
|
8
8
|
projectDir,
|
|
9
9
|
});
|
|
@@ -13,19 +13,19 @@ export async function createBranchPlanningSystemPrompt(config, featureId, projec
|
|
|
13
13
|
let { prompt } = skill;
|
|
14
14
|
prompt = substituteVariables(prompt, {
|
|
15
15
|
BASE_BRANCH: 'main',
|
|
16
|
-
|
|
16
|
+
ISSUE_ID: issueId,
|
|
17
17
|
});
|
|
18
18
|
return `${prompt}\n\n${OUTPUT_CONTRACTS['branch-planning']}`;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Create the user prompt with context for branch planning
|
|
22
22
|
*/
|
|
23
|
-
export function createBranchPlanningPromptWithContext(
|
|
23
|
+
export function createBranchPlanningPromptWithContext(issueId, contextInfo, existingBranchesInfo) {
|
|
24
24
|
let prompt = `# Branch Planning Task
|
|
25
25
|
|
|
26
|
-
Please analyze the following
|
|
26
|
+
Please analyze the following issue and create a branch plan for incremental development.
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Issue Context
|
|
29
29
|
|
|
30
30
|
${contextInfo}
|
|
31
31
|
|
|
@@ -35,7 +35,7 @@ ${contextInfo}
|
|
|
35
35
|
|
|
36
36
|
${existingBranchesInfo}
|
|
37
37
|
|
|
38
|
-
**Note**: There are already branches planned for this
|
|
38
|
+
**Note**: There are already branches planned for this issue. Please review and suggest improvements or confirm the existing plan.
|
|
39
39
|
|
|
40
40
|
`;
|
|
41
41
|
}
|
|
@@ -43,7 +43,7 @@ ${existingBranchesInfo}
|
|
|
43
43
|
|
|
44
44
|
Based on the technical design and user stories above:
|
|
45
45
|
|
|
46
|
-
1. **Analyze the
|
|
46
|
+
1. **Analyze the issue scope**: Understand what needs to be built
|
|
47
47
|
2. **Identify logical boundaries**: Find natural division points in the implementation
|
|
48
48
|
3. **Determine dependencies**: Figure out what must be built first
|
|
49
49
|
4. **Create branch plan**: Define branches with clear scope and acceptance criteria
|
|
@@ -60,10 +60,10 @@ Please provide your branch plan as a JSON response following the format specifie
|
|
|
60
60
|
/**
|
|
61
61
|
* Format the context information for the prompt
|
|
62
62
|
*/
|
|
63
|
-
export function formatContextForPrompt(
|
|
64
|
-
let context = `###
|
|
63
|
+
export function formatContextForPrompt(issue, product, userStories, testCases) {
|
|
64
|
+
let context = `### Issue: ${issue.name}
|
|
65
65
|
|
|
66
|
-
${
|
|
66
|
+
${issue.description || 'No description provided'}
|
|
67
67
|
|
|
68
68
|
### Product: ${product.name}
|
|
69
69
|
|
|
@@ -71,17 +71,17 @@ ${product.description || 'No description provided'}
|
|
|
71
71
|
|
|
72
72
|
`;
|
|
73
73
|
// Add technical design if available
|
|
74
|
-
if (
|
|
74
|
+
if (issue.technical_design) {
|
|
75
75
|
context += `### Technical Design
|
|
76
76
|
|
|
77
|
-
${
|
|
77
|
+
${issue.technical_design}
|
|
78
78
|
|
|
79
79
|
`;
|
|
80
80
|
}
|
|
81
81
|
else {
|
|
82
82
|
context += `### Technical Design
|
|
83
83
|
|
|
84
|
-
**No technical design available.** You may need to run the technical design phase first, or create a high-level implementation plan based on the
|
|
84
|
+
**No technical design available.** You may need to run the technical design phase first, or create a high-level implementation plan based on the issue description and user stories.
|
|
85
85
|
|
|
86
86
|
`;
|
|
87
87
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type EdsgerConfig } from '../../types/index.js';
|
|
2
2
|
export interface BugFixingOptions {
|
|
3
|
-
|
|
3
|
+
issueId: string;
|
|
4
4
|
testErrors: string;
|
|
5
5
|
attemptNumber?: number;
|
|
6
6
|
verbose?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export interface BugFixingResult {
|
|
9
|
-
|
|
9
|
+
issueId: string;
|
|
10
10
|
fixSummary: string | null;
|
|
11
11
|
status: 'success' | 'error';
|
|
12
12
|
message: string;
|
|
@@ -34,22 +34,22 @@ async function* prompt(bugFixPrompt) {
|
|
|
34
34
|
}
|
|
35
35
|
// eslint-disable-next-line complexity
|
|
36
36
|
export const fixTestFailures = async (options, config) => {
|
|
37
|
-
const {
|
|
37
|
+
const { issueId, testErrors, attemptNumber = 1, verbose } = options;
|
|
38
38
|
if (verbose) {
|
|
39
|
-
logInfo(`Starting bug fixing for
|
|
39
|
+
logInfo(`Starting bug fixing for issue ID: ${issueId} (Attempt ${attemptNumber})`);
|
|
40
40
|
}
|
|
41
|
-
// Prepare git environment: switch to
|
|
42
|
-
const cleanupGit = preparePhaseGitEnvironment(
|
|
41
|
+
// Prepare git environment: switch to issue branch and rebase with main
|
|
42
|
+
const cleanupGit = preparePhaseGitEnvironment(issueId, 'main', verbose);
|
|
43
43
|
try {
|
|
44
44
|
// Fetch all required context information via MCP endpoints
|
|
45
45
|
if (verbose) {
|
|
46
46
|
logInfo('Fetching bug fixing context via MCP endpoints...');
|
|
47
47
|
}
|
|
48
|
-
const context = await fetchBugFixingContext(
|
|
48
|
+
const context = await fetchBugFixingContext(issueId, verbose);
|
|
49
49
|
// Fetch feedbacks for bug fixing phase
|
|
50
50
|
let feedbacksInfo;
|
|
51
51
|
try {
|
|
52
|
-
const feedbacksContext = await getFeedbacksForPhase({
|
|
52
|
+
const feedbacksContext = await getFeedbacksForPhase({ issueId, verbose }, 'bug_fixing');
|
|
53
53
|
if (feedbacksContext.feedbacks.length > 0) {
|
|
54
54
|
feedbacksInfo = await formatFeedbacksForContext(feedbacksContext);
|
|
55
55
|
if (verbose) {
|
|
@@ -64,7 +64,7 @@ export const fixTestFailures = async (options, config) => {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
const systemPrompt = await createBugFixingSystemPrompt(config);
|
|
67
|
-
const bugFixPrompt = createBugFixPromptWithContext(
|
|
67
|
+
const bugFixPrompt = createBugFixPromptWithContext(issueId, testErrors, attemptNumber, context, feedbacksInfo);
|
|
68
68
|
let lastAssistantResponse = '';
|
|
69
69
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
70
|
let structuredFixResult = null;
|
|
@@ -119,13 +119,13 @@ export const fixTestFailures = async (options, config) => {
|
|
|
119
119
|
if (structuredFixResult) {
|
|
120
120
|
const { summary, files_modified } = structuredFixResult;
|
|
121
121
|
if (verbose) {
|
|
122
|
-
logInfo(`Bug fixing completed for
|
|
122
|
+
logInfo(`Bug fixing completed for issue: ${issueId}`);
|
|
123
123
|
if (files_modified?.length > 0) {
|
|
124
124
|
logInfo(`Files fixed: ${files_modified.join(', ')}`);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
return {
|
|
128
|
-
|
|
128
|
+
issueId,
|
|
129
129
|
fixSummary: summary || 'Bug fixes applied',
|
|
130
130
|
status: 'success',
|
|
131
131
|
message: 'Bug fixes applied successfully',
|
|
@@ -134,7 +134,7 @@ export const fixTestFailures = async (options, config) => {
|
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
return {
|
|
137
|
-
|
|
137
|
+
issueId,
|
|
138
138
|
fixSummary: null,
|
|
139
139
|
status: 'error',
|
|
140
140
|
message: 'Bug fixing failed or incomplete',
|
|
@@ -145,7 +145,7 @@ export const fixTestFailures = async (options, config) => {
|
|
|
145
145
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
146
146
|
logError(`Bug fixing failed: ${errorMessage}`);
|
|
147
147
|
return {
|
|
148
|
-
|
|
148
|
+
issueId,
|
|
149
149
|
fixSummary: null,
|
|
150
150
|
status: 'error',
|
|
151
151
|
message: `Bug fixing failed: ${errorMessage}`,
|
|
@@ -157,13 +157,13 @@ export const fixTestFailures = async (options, config) => {
|
|
|
157
157
|
cleanupGit();
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
|
-
function createBugFixPromptWithContext(
|
|
160
|
+
function createBugFixPromptWithContext(issueId, testErrors, attemptNumber, context, feedbacksInfo) {
|
|
161
161
|
let contextInfo = formatContextForPrompt(context, testErrors);
|
|
162
162
|
// Add feedbacks context to the bug fixing prompt
|
|
163
163
|
if (feedbacksInfo) {
|
|
164
164
|
contextInfo = `${contextInfo}\n\n${feedbacksInfo}`;
|
|
165
165
|
}
|
|
166
|
-
return `Fix the test failures for
|
|
166
|
+
return `Fix the test failures for issue: ${issueId} (Attempt ${attemptNumber})
|
|
167
167
|
|
|
168
168
|
${contextInfo}
|
|
169
169
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IssueInfo, TestCase, UserStory } from '../../types/issues.js';
|
|
2
2
|
export interface BugFixingContext {
|
|
3
|
-
|
|
3
|
+
issue: IssueInfo;
|
|
4
4
|
user_stories: UserStory[];
|
|
5
5
|
test_cases: TestCase[];
|
|
6
6
|
latest_test_report?: {
|
|
@@ -15,7 +15,7 @@ export interface BugFixingContext {
|
|
|
15
15
|
/**
|
|
16
16
|
* Fetch all bug fixing context information via MCP endpoints
|
|
17
17
|
*/
|
|
18
|
-
export declare function fetchBugFixingContext(
|
|
18
|
+
export declare function fetchBugFixingContext(issueId: string, verbose?: boolean): Promise<BugFixingContext>;
|
|
19
19
|
/**
|
|
20
20
|
* Format the context into a readable string for Claude Code
|
|
21
21
|
*/
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getIssue, getTestCases, getUserStories, } from '../../api/issues/index.js';
|
|
2
2
|
import { callMcpEndpoint } from '../../api/mcp-client.js';
|
|
3
3
|
import { logError, logInfo } from '../../utils/logger.js';
|
|
4
4
|
/**
|
|
5
5
|
* Fetch all bug fixing context information via MCP endpoints
|
|
6
6
|
*/
|
|
7
|
-
export async function fetchBugFixingContext(
|
|
7
|
+
export async function fetchBugFixingContext(issueId, verbose) {
|
|
8
8
|
try {
|
|
9
9
|
if (verbose) {
|
|
10
|
-
logInfo(`Fetching complete bug fixing context for
|
|
10
|
+
logInfo(`Fetching complete bug fixing context for issue: ${issueId}`);
|
|
11
11
|
}
|
|
12
12
|
// Fetch all required data in parallel for better performance
|
|
13
|
-
const [
|
|
14
|
-
|
|
15
|
-
getUserStories(
|
|
16
|
-
getTestCases(
|
|
13
|
+
const [issue, userStories, testCases] = await Promise.all([
|
|
14
|
+
getIssue(issueId, verbose),
|
|
15
|
+
getUserStories(issueId, verbose),
|
|
16
|
+
getTestCases(issueId, verbose),
|
|
17
17
|
]);
|
|
18
18
|
// Get latest test report to understand what has been tested
|
|
19
19
|
let latestTestReport = null;
|
|
@@ -22,7 +22,7 @@ export async function fetchBugFixingContext(featureId, verbose) {
|
|
|
22
22
|
logInfo('Fetching latest test report...');
|
|
23
23
|
}
|
|
24
24
|
const testReportResult = (await callMcpEndpoint('test_reports/latest', {
|
|
25
|
-
|
|
25
|
+
issue_id: issueId,
|
|
26
26
|
}));
|
|
27
27
|
if (testReportResult.test_report) {
|
|
28
28
|
latestTestReport = testReportResult.test_report;
|
|
@@ -35,14 +35,14 @@ export async function fetchBugFixingContext(featureId, verbose) {
|
|
|
35
35
|
}
|
|
36
36
|
if (verbose) {
|
|
37
37
|
logInfo(`✅ Bug fixing context fetched successfully:`);
|
|
38
|
-
logInfo(`
|
|
38
|
+
logInfo(` Issue: ${issue.name}`);
|
|
39
39
|
logInfo(` User Stories: ${userStories.length}`);
|
|
40
40
|
logInfo(` Test Cases: ${testCases.length} (${testCases.filter((tc) => tc.is_critical).length} critical)`);
|
|
41
|
-
logInfo(` Technical Design: ${
|
|
41
|
+
logInfo(` Technical Design: ${issue.technical_design ? 'Available' : 'Not available'}`);
|
|
42
42
|
logInfo(` Latest Test Report: ${latestTestReport ? 'Available' : 'Not available'}`);
|
|
43
43
|
}
|
|
44
44
|
return {
|
|
45
|
-
|
|
45
|
+
issue,
|
|
46
46
|
user_stories: userStories,
|
|
47
47
|
test_cases: testCases,
|
|
48
48
|
latest_test_report: latestTestReport,
|
|
@@ -78,11 +78,11 @@ export function formatContextForPrompt(context, testErrors) {
|
|
|
78
78
|
};
|
|
79
79
|
return `# Bug Fixing Context
|
|
80
80
|
|
|
81
|
-
##
|
|
82
|
-
- **ID**: ${context.
|
|
83
|
-
- **Name**: ${context.
|
|
84
|
-
- **Description**: ${context.
|
|
85
|
-
- **Current Status**: ${context.
|
|
81
|
+
## Issue Information
|
|
82
|
+
- **ID**: ${context.issue.id}
|
|
83
|
+
- **Name**: ${context.issue.name}
|
|
84
|
+
- **Description**: ${context.issue.description || 'No description provided'}
|
|
85
|
+
- **Current Status**: ${context.issue.status}
|
|
86
86
|
|
|
87
87
|
## User Stories (${context.user_stories.length})
|
|
88
88
|
${formatUserStories(context.user_stories)}
|
|
@@ -91,7 +91,7 @@ ${formatUserStories(context.user_stories)}
|
|
|
91
91
|
${formatTestCases(context.test_cases)}
|
|
92
92
|
|
|
93
93
|
## Technical Design
|
|
94
|
-
${context.
|
|
94
|
+
${context.issue.technical_design || 'No technical design available'}
|
|
95
95
|
|
|
96
96
|
## Latest Test Report
|
|
97
97
|
${context.latest_test_report
|
|
@@ -110,5 +110,5 @@ ${testErrors}
|
|
|
110
110
|
|
|
111
111
|
---
|
|
112
112
|
|
|
113
|
-
**Bug Fixing Instructions**: Analyze the test failures above and fix the underlying issues in the code. Focus on making the critical test cases pass while ensuring the
|
|
113
|
+
**Bug Fixing Instructions**: Analyze the test failures above and fix the underlying issues in the code. Focus on making the critical test cases pass while ensuring the issue still meets all user story requirements. Use the technical design and test report for context about what should be working.`;
|
|
114
114
|
}
|
|
@@ -8,35 +8,34 @@ export const createBugFixingMcpServer = () => {
|
|
|
8
8
|
name: 'edsger-bug-fixing-mcp',
|
|
9
9
|
version: '1.0.0',
|
|
10
10
|
tools: [
|
|
11
|
-
tool('
|
|
12
|
-
|
|
11
|
+
tool('get_issue_with_test_reports', 'Get issue information including technical design, implementation details, and test reports', {
|
|
12
|
+
issue_id: z
|
|
13
13
|
.string()
|
|
14
|
-
.describe('
|
|
14
|
+
.describe('Issue ID to get information and test results for'),
|
|
15
15
|
}, async (args) => {
|
|
16
16
|
try {
|
|
17
|
-
// Get
|
|
18
|
-
const
|
|
19
|
-
|
|
17
|
+
// Get issue details
|
|
18
|
+
const issueResult = (await callMcpEndpoint('issues/get', {
|
|
19
|
+
issue_id: args.issue_id,
|
|
20
20
|
}));
|
|
21
|
-
if (!
|
|
22
|
-
|
|
23
|
-
throw new Error('Feature not found');
|
|
21
|
+
if (!issueResult.issues || issueResult.issues.length === 0) {
|
|
22
|
+
throw new Error('Issue not found');
|
|
24
23
|
}
|
|
25
|
-
const
|
|
24
|
+
const issue = issueResult.issues[0];
|
|
26
25
|
// Get user stories to understand requirements
|
|
27
|
-
const userStoriesResult = (await callMcpEndpoint('user_stories/list', {
|
|
26
|
+
const userStoriesResult = (await callMcpEndpoint('user_stories/list', { issue_id: args.issue_id }));
|
|
28
27
|
// Get test cases to understand what needs to pass
|
|
29
28
|
const testCasesResult = (await callMcpEndpoint('test_cases/list', {
|
|
30
|
-
|
|
29
|
+
issue_id: args.issue_id,
|
|
31
30
|
}));
|
|
32
31
|
// Get latest test report to understand what has been tested
|
|
33
|
-
const testReportResult = (await callMcpEndpoint('test_reports/latest', {
|
|
32
|
+
const testReportResult = (await callMcpEndpoint('test_reports/latest', { issue_id: args.issue_id }));
|
|
34
33
|
const completeInfo = {
|
|
35
|
-
|
|
34
|
+
issue,
|
|
36
35
|
user_stories: userStoriesResult.user_stories || [],
|
|
37
36
|
test_cases: testCasesResult.test_cases || [],
|
|
38
37
|
latest_test_report: testReportResult.test_report || null,
|
|
39
|
-
technical_design:
|
|
38
|
+
technical_design: issue.technical_design || null,
|
|
40
39
|
};
|
|
41
40
|
return {
|
|
42
41
|
content: [
|
|
@@ -48,12 +47,12 @@ export const createBugFixingMcpServer = () => {
|
|
|
48
47
|
};
|
|
49
48
|
}
|
|
50
49
|
catch (error) {
|
|
51
|
-
logError(`Error in
|
|
50
|
+
logError(`Error in get_issue_with_test_reports: ${error}`);
|
|
52
51
|
throw error;
|
|
53
52
|
}
|
|
54
53
|
}),
|
|
55
54
|
tool('verify_fix', 'Verify that the bug fix addresses the test failures', {
|
|
56
|
-
|
|
55
|
+
issue_id: z.string().describe('Issue ID to verify the fix for'),
|
|
57
56
|
fix_summary: z.string().describe('Summary of the fixes applied'),
|
|
58
57
|
files_modified: z
|
|
59
58
|
.array(z.string())
|
|
@@ -64,7 +63,7 @@ export const createBugFixingMcpServer = () => {
|
|
|
64
63
|
type: 'text',
|
|
65
64
|
text: JSON.stringify({
|
|
66
65
|
verified: true,
|
|
67
|
-
|
|
66
|
+
issue_id: args.issue_id,
|
|
68
67
|
summary: args.fix_summary,
|
|
69
68
|
files_modified: args.files_modified,
|
|
70
69
|
message: 'Bug fix verification complete',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Build context for the chat AI processor.
|
|
3
|
-
* Fetches
|
|
3
|
+
* Fetches issue state, user stories, test cases, and recent chat history.
|
|
4
4
|
*/
|
|
5
5
|
import type { ChatMessage } from '../../types/index.js';
|
|
6
6
|
export interface ChatProcessorContext {
|
|
7
|
-
|
|
7
|
+
issueId: string;
|
|
8
8
|
productId: string;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
issueDescription: string;
|
|
10
|
+
issueStatus: string;
|
|
11
11
|
executionMode: string;
|
|
12
12
|
workflow: {
|
|
13
13
|
phase: string;
|
|
@@ -31,7 +31,7 @@ export interface ChatProcessorContext {
|
|
|
31
31
|
/**
|
|
32
32
|
* Build the full context for the chat AI to process a message.
|
|
33
33
|
*/
|
|
34
|
-
export declare function buildChatContext(
|
|
34
|
+
export declare function buildChatContext(issueId: string, channelId: string, verbose?: boolean): Promise<ChatProcessorContext>;
|
|
35
35
|
/**
|
|
36
36
|
* Format context into a string for the AI system prompt.
|
|
37
37
|
*/
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Build context for the chat AI processor.
|
|
3
|
-
* Fetches
|
|
3
|
+
* Fetches issue state, user stories, test cases, and recent chat history.
|
|
4
4
|
*/
|
|
5
5
|
import { listChatMessages } from '../../api/chat.js';
|
|
6
6
|
import { callMcpEndpoint } from '../../api/mcp-client.js';
|
|
7
7
|
/**
|
|
8
8
|
* Build the full context for the chat AI to process a message.
|
|
9
9
|
*/
|
|
10
|
-
export async function buildChatContext(
|
|
11
|
-
// Fetch
|
|
12
|
-
const [
|
|
13
|
-
callMcpEndpoint('
|
|
14
|
-
|
|
10
|
+
export async function buildChatContext(issueId, channelId, verbose) {
|
|
11
|
+
// Fetch issue, user stories, and test cases in parallel
|
|
12
|
+
const [issueResult, storiesResult, testCasesResult, recentMessages] = await Promise.all([
|
|
13
|
+
callMcpEndpoint('issues/get', {
|
|
14
|
+
issue_id: issueId,
|
|
15
15
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
16
|
}),
|
|
17
17
|
callMcpEndpoint('user_stories/list', {
|
|
18
|
-
|
|
18
|
+
issue_id: issueId,
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
20
|
}),
|
|
21
21
|
callMcpEndpoint('test_cases/list', {
|
|
22
|
-
|
|
22
|
+
issue_id: issueId,
|
|
23
23
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
24
|
}),
|
|
25
25
|
listChatMessages(channelId, { limit: 20 }, verbose),
|
|
26
26
|
]);
|
|
27
|
-
const
|
|
27
|
+
const issue = issueResult?.issues?.[0] || {};
|
|
28
28
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
29
|
const userStories = (storiesResult?.user_stories || []).map((s) => ({
|
|
30
30
|
id: s.id,
|
|
@@ -40,13 +40,13 @@ export async function buildChatContext(featureId, channelId, verbose) {
|
|
|
40
40
|
is_critical: t.is_critical,
|
|
41
41
|
}));
|
|
42
42
|
return {
|
|
43
|
-
|
|
44
|
-
productId:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
executionMode:
|
|
43
|
+
issueId,
|
|
44
|
+
productId: issue.product_id || '',
|
|
45
|
+
issueDescription: `${issue.name || 'Unknown'}: ${issue.description || 'No description'}`,
|
|
46
|
+
issueStatus: issue.status || 'unknown',
|
|
47
|
+
executionMode: issue.execution_mode || 'unknown',
|
|
48
48
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
|
-
workflow: (
|
|
49
|
+
workflow: (issue.workflow || []).map((p) => ({
|
|
50
50
|
phase: p.phase,
|
|
51
51
|
status: p.status,
|
|
52
52
|
})),
|
|
@@ -61,8 +61,8 @@ export async function buildChatContext(featureId, channelId, verbose) {
|
|
|
61
61
|
*/
|
|
62
62
|
export function formatContextForAI(context) {
|
|
63
63
|
const parts = [
|
|
64
|
-
`##
|
|
65
|
-
`**Status:** ${context.
|
|
64
|
+
`## Issue: ${context.issueDescription}`,
|
|
65
|
+
`**Status:** ${context.issueStatus}`,
|
|
66
66
|
`**Execution Mode:** ${context.executionMode}`,
|
|
67
67
|
'',
|
|
68
68
|
'## Workflow Phases',
|
|
@@ -16,7 +16,7 @@ import type { ChatMessage, EdsgerConfig } from '../../types/index.js';
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function getChannelSessionId(channelId: string): string | undefined;
|
|
18
18
|
/**
|
|
19
|
-
* Clear a channel's session (e.g., on
|
|
19
|
+
* Clear a channel's session (e.g., on issue reset).
|
|
20
20
|
*/
|
|
21
21
|
export declare function clearChannelSession(channelId: string): void;
|
|
22
22
|
/**
|
|
@@ -26,10 +26,10 @@ export declare function clearChannelSession(channelId: string): void;
|
|
|
26
26
|
*
|
|
27
27
|
* Returns the session ID (callers should track this if needed).
|
|
28
28
|
*/
|
|
29
|
-
export declare function processHumanMessages(messages: ChatMessage[],
|
|
29
|
+
export declare function processHumanMessages(messages: ChatMessage[], issueId: string, config: EdsgerConfig, verbose?: boolean, repoPath?: string): Promise<string | undefined>;
|
|
30
30
|
/**
|
|
31
31
|
* Process one or more human messages from a product channel.
|
|
32
|
-
* Same session resumption pattern as
|
|
32
|
+
* Same session resumption pattern as issue chat, but uses
|
|
33
33
|
* product context, product prompt, and product tools.
|
|
34
34
|
*/
|
|
35
35
|
export declare function processProductHumanMessages(messages: ChatMessage[], productId: string, config: EdsgerConfig, verbose?: boolean): Promise<string | undefined>;
|
|
@@ -38,7 +38,7 @@ export declare function processProductHumanMessages(messages: ChatMessage[], pro
|
|
|
38
38
|
* Resumes the same channel session so AI has full conversation context.
|
|
39
39
|
*/
|
|
40
40
|
export interface ProcessPhaseCompletionOptions {
|
|
41
|
-
|
|
41
|
+
issueId: string;
|
|
42
42
|
phase: string;
|
|
43
43
|
summary: string;
|
|
44
44
|
phaseOutput: unknown;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* 2. processPhaseCompletion() — Generate next-step suggestions (resumes session)
|
|
12
12
|
*/
|
|
13
13
|
import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
14
|
-
import {
|
|
14
|
+
import { getIssueChannel, listChatMessages, markMessageProcessed, sendAiMessage, sendSystemMessage, } from '../../api/chat.js';
|
|
15
15
|
import { DEFAULT_MODEL } from '../../constants.js';
|
|
16
16
|
import { logDebug, logError, logInfo } from '../../utils/logger.js';
|
|
17
17
|
import { buildChatContext, formatContextForAI } from './context.js';
|
|
@@ -32,7 +32,7 @@ export function getChannelSessionId(channelId) {
|
|
|
32
32
|
return channelSessions.get(channelId);
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* Clear a channel's session (e.g., on
|
|
35
|
+
* Clear a channel's session (e.g., on issue reset).
|
|
36
36
|
*/
|
|
37
37
|
export function clearChannelSession(channelId) {
|
|
38
38
|
channelSessions.delete(channelId);
|
|
@@ -47,7 +47,7 @@ export function clearChannelSession(channelId) {
|
|
|
47
47
|
*
|
|
48
48
|
* Returns the session ID (callers should track this if needed).
|
|
49
49
|
*/
|
|
50
|
-
export async function processHumanMessages(messages,
|
|
50
|
+
export async function processHumanMessages(messages, issueId, config, verbose, repoPath) {
|
|
51
51
|
if (messages.length === 0) {
|
|
52
52
|
return undefined;
|
|
53
53
|
}
|
|
@@ -72,7 +72,7 @@ export async function processHumanMessages(messages, featureId, config, verbose,
|
|
|
72
72
|
// On resume: just send the new message — the session already has context.
|
|
73
73
|
let fullPrompt;
|
|
74
74
|
if (!existingSessionId) {
|
|
75
|
-
const context = await buildChatContext(
|
|
75
|
+
const context = await buildChatContext(issueId, channelId, verbose);
|
|
76
76
|
const contextStr = formatContextForAI(context);
|
|
77
77
|
// Load recent chat history so the AI has conversational continuity
|
|
78
78
|
const recentMessages = await listChatMessages(channelId, { limit: 30 }, verbose);
|
|
@@ -95,11 +95,11 @@ export async function processHumanMessages(messages, featureId, config, verbose,
|
|
|
95
95
|
].join('\n');
|
|
96
96
|
}
|
|
97
97
|
fullPrompt = [
|
|
98
|
-
`## Current
|
|
98
|
+
`## Current Issue Context`,
|
|
99
99
|
contextStr,
|
|
100
100
|
'',
|
|
101
101
|
`## Channel ID: ${channelId}`,
|
|
102
|
-
`##
|
|
102
|
+
`## Issue ID: ${issueId}`,
|
|
103
103
|
`## Product ID: ${context.productId}`,
|
|
104
104
|
'',
|
|
105
105
|
historySection,
|
|
@@ -148,7 +148,7 @@ export async function processHumanMessages(messages, featureId, config, verbose,
|
|
|
148
148
|
if (existingSessionId) {
|
|
149
149
|
logInfo(`Clearing session ${existingSessionId} and retrying without resume`);
|
|
150
150
|
channelSessions.delete(channelId);
|
|
151
|
-
return processHumanMessages(messages,
|
|
151
|
+
return processHumanMessages(messages, issueId, config, verbose, repoPath);
|
|
152
152
|
}
|
|
153
153
|
// Send error message to chat
|
|
154
154
|
try {
|
|
@@ -168,7 +168,7 @@ export async function processHumanMessages(messages, featureId, config, verbose,
|
|
|
168
168
|
}
|
|
169
169
|
/**
|
|
170
170
|
* Process one or more human messages from a product channel.
|
|
171
|
-
* Same session resumption pattern as
|
|
171
|
+
* Same session resumption pattern as issue chat, but uses
|
|
172
172
|
* product context, product prompt, and product tools.
|
|
173
173
|
*/
|
|
174
174
|
export async function processProductHumanMessages(messages, productId, config, verbose) {
|
|
@@ -273,25 +273,25 @@ export async function processProductHumanMessages(messages, productId, config, v
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
export async function processPhaseCompletion(opts) {
|
|
276
|
-
const {
|
|
276
|
+
const { issueId, phase, summary, phaseOutput, config, verbose, repoPath } = opts;
|
|
277
277
|
if (verbose) {
|
|
278
|
-
logInfo(`Processing phase completion: ${phase} for
|
|
278
|
+
logInfo(`Processing phase completion: ${phase} for issue ${issueId}`);
|
|
279
279
|
}
|
|
280
280
|
try {
|
|
281
|
-
// Get or create the
|
|
282
|
-
const channel = await
|
|
281
|
+
// Get or create the issue's channel
|
|
282
|
+
const channel = await getIssueChannel(issueId, verbose);
|
|
283
283
|
const channelId = channel.id;
|
|
284
284
|
const existingSessionId = channelSessions.get(channelId);
|
|
285
285
|
// Step 1: Write system message (factual, immediate)
|
|
286
286
|
await sendSystemMessage(channelId, `Phase "${phase}" completed.`, { phase, status: 'completed', summary }, verbose);
|
|
287
287
|
// Step 2: Build the advisor prompt
|
|
288
|
-
const context = await buildChatContext(
|
|
288
|
+
const context = await buildChatContext(issueId, channelId, verbose);
|
|
289
289
|
const recentMessages = await listChatMessages(channelId, { limit: 10 }, verbose);
|
|
290
290
|
const remainingPhases = context.workflow
|
|
291
291
|
.filter((p) => p.status === 'pending')
|
|
292
292
|
.map((p) => p.phase);
|
|
293
293
|
const advisorMessage = buildNextStepAdvisorMessage({
|
|
294
|
-
|
|
294
|
+
issueDescription: context.issueDescription,
|
|
295
295
|
completedPhase: phase,
|
|
296
296
|
summary,
|
|
297
297
|
phaseOutput,
|
|
@@ -308,11 +308,11 @@ export async function processPhaseCompletion(opts) {
|
|
|
308
308
|
if (!existingSessionId) {
|
|
309
309
|
const contextStr = formatContextForAI(context);
|
|
310
310
|
fullPrompt = [
|
|
311
|
-
`## Current
|
|
311
|
+
`## Current Issue Context`,
|
|
312
312
|
contextStr,
|
|
313
313
|
'',
|
|
314
314
|
`## Channel ID: ${channelId}`,
|
|
315
|
-
`##
|
|
315
|
+
`## Issue ID: ${issueId}`,
|
|
316
316
|
`## Product ID: ${context.productId}`,
|
|
317
317
|
'',
|
|
318
318
|
advisorMessage,
|
|
@@ -428,7 +428,7 @@ async function runChatAgent(opts) {
|
|
|
428
428
|
}
|
|
429
429
|
/**
|
|
430
430
|
* Run the Claude Agent SDK with product chat MCP tools.
|
|
431
|
-
* Same as runChatAgent but uses product-level tools instead of
|
|
431
|
+
* Same as runChatAgent but uses product-level tools instead of issue-level tools.
|
|
432
432
|
* No cwd parameter since product chat doesn't operate on a specific repo.
|
|
433
433
|
*/
|
|
434
434
|
async function runProductChatAgent(systemPrompt, userPrompt, config, resumeSessionId, verbose) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Build context for the product chat AI processor.
|
|
3
|
-
* Fetches product state,
|
|
3
|
+
* Fetches product state, issues summary, and recent chat history.
|
|
4
4
|
*/
|
|
5
5
|
import type { ChatMessage } from '../../types/index.js';
|
|
6
6
|
export interface ProductChatContext {
|
|
7
7
|
productId: string;
|
|
8
8
|
productName: string;
|
|
9
9
|
productDescription: string;
|
|
10
|
-
|
|
10
|
+
issuesSummary: {
|
|
11
11
|
total: number;
|
|
12
12
|
byStatus: Record<string, number>;
|
|
13
|
-
|
|
13
|
+
issues: {
|
|
14
14
|
id: string;
|
|
15
15
|
name: string;
|
|
16
16
|
status: string;
|