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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable max-lines -- orchestration module with inline prompt generation and agent execution */
|
|
2
2
|
import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
3
|
-
import { getFeature } from '../../api/features/index.js';
|
|
4
3
|
import { getGitHubConfig } from '../../api/github.js';
|
|
4
|
+
import { getIssue } from '../../api/issues/index.js';
|
|
5
5
|
import { DEFAULT_MODEL } from '../../constants.js';
|
|
6
|
-
import {
|
|
6
|
+
import { logIssuePhaseEvent } from '../../services/audit-logs.js';
|
|
7
7
|
import { createBranches, getBaseBranchInfo, getBranches, getCurrentBranch, updateBranch, } from '../../services/branches.js';
|
|
8
8
|
import { formatChecklistsForContext, } from '../../services/checklist.js';
|
|
9
9
|
import { extractChecklistItems, runPhaseCoaching, } from '../../services/coaching/index.js';
|
|
@@ -96,7 +96,7 @@ function logChecklistDebugInfo(implResult, verbose) {
|
|
|
96
96
|
/**
|
|
97
97
|
* Parse and extract the implementation result from a successful query response
|
|
98
98
|
*/
|
|
99
|
-
function parseSuccessResponse(responseText, hasMessageResult, hasAssistantResponse,
|
|
99
|
+
function parseSuccessResponse(responseText, hasMessageResult, hasAssistantResponse, issueId, verbose
|
|
100
100
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
101
101
|
) {
|
|
102
102
|
logResponseDebugInfo(responseText, hasMessageResult, hasAssistantResponse, verbose);
|
|
@@ -131,7 +131,7 @@ function parseSuccessResponse(responseText, hasMessageResult, hasAssistantRespon
|
|
|
131
131
|
logDebug(`JSON Parsing Failed - ${errorType}: ${errorMsg}`, verbose);
|
|
132
132
|
logError(`Failed to parse structured implementation result: ${error}`);
|
|
133
133
|
logDebug('Using Fallback Parsing', verbose);
|
|
134
|
-
const parsedResult = parseImplementationResponse(responseText,
|
|
134
|
+
const parsedResult = parseImplementationResponse(responseText, issueId, verbose);
|
|
135
135
|
logDebug(`Fallback parsed result: branchName=${parsedResult.branchName}, filesModified=${parsedResult.filesModified?.length || 0}, hasSummary=${!!parsedResult.summary}, commitHash=${parsedResult.commitHash}`, verbose);
|
|
136
136
|
return {
|
|
137
137
|
branch_name: parsedResult.branchName,
|
|
@@ -149,17 +149,17 @@ function parseSuccessResponse(responseText, hasMessageResult, hasAssistantRespon
|
|
|
149
149
|
*/
|
|
150
150
|
function processQueryResult(
|
|
151
151
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
152
|
-
message, lastAssistantResponse,
|
|
152
|
+
message, lastAssistantResponse, issueId, verbose
|
|
153
153
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
154
154
|
) {
|
|
155
155
|
if (message.subtype === 'success') {
|
|
156
156
|
logInfo('\n💻 Code implementation completed, parsing results...');
|
|
157
157
|
const responseText = message.result || lastAssistantResponse;
|
|
158
|
-
return parseSuccessResponse(responseText, !!message.result, !!lastAssistantResponse,
|
|
158
|
+
return parseSuccessResponse(responseText, !!message.result, !!lastAssistantResponse, issueId, verbose);
|
|
159
159
|
}
|
|
160
160
|
logError(`\n⚠️ Code implementation incomplete: ${message.subtype}`);
|
|
161
161
|
if (message.subtype === 'error_max_turns') {
|
|
162
|
-
logError('💡 Try breaking down the
|
|
162
|
+
logError('💡 Try breaking down the issue into smaller tasks');
|
|
163
163
|
}
|
|
164
164
|
if (lastAssistantResponse) {
|
|
165
165
|
logDebug(`Fallback for incomplete result, subtype: ${message.subtype}`, verbose);
|
|
@@ -171,55 +171,55 @@ message, lastAssistantResponse, featureId, verbose
|
|
|
171
171
|
return null;
|
|
172
172
|
}
|
|
173
173
|
// eslint-disable-next-line complexity
|
|
174
|
-
export const
|
|
175
|
-
const {
|
|
174
|
+
export const implementIssueCode = async (options, config, checklistContext) => {
|
|
175
|
+
const { issueId, verbose, baseBranch = 'main' } = options;
|
|
176
176
|
if (verbose) {
|
|
177
|
-
logInfo(`Starting code implementation for
|
|
177
|
+
logInfo(`Starting code implementation for issue ID: ${issueId}`);
|
|
178
178
|
logInfo(`Base branch: ${baseBranch}`);
|
|
179
179
|
}
|
|
180
|
-
// Check for
|
|
180
|
+
// Check for issue branches - use current branch if available
|
|
181
181
|
// If no branches exist (no branch planning), create a default branch record
|
|
182
182
|
let currentBranch = null;
|
|
183
183
|
try {
|
|
184
|
-
currentBranch = await getCurrentBranch({
|
|
184
|
+
currentBranch = await getCurrentBranch({ issueId, verbose });
|
|
185
185
|
if (currentBranch && verbose) {
|
|
186
|
-
logInfo(`📋 Using
|
|
186
|
+
logInfo(`📋 Using issue branch: ${currentBranch.name}`);
|
|
187
187
|
logInfo(` Branch name: ${currentBranch.branch_name || 'To be created'}`);
|
|
188
188
|
logInfo(` Status: ${currentBranch.status}`);
|
|
189
189
|
logInfo(` Description: ${currentBranch.description || 'No description'}`);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
catch (_error) {
|
|
193
|
-
//
|
|
193
|
+
// Issue branches not available or error - continue with default behavior
|
|
194
194
|
if (verbose) {
|
|
195
|
-
logInfo('No
|
|
195
|
+
logInfo('No issue branches found, using default branch naming');
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
// If no branch exists (no branch planning phase), create a default branch record
|
|
199
199
|
if (!currentBranch) {
|
|
200
200
|
try {
|
|
201
201
|
if (verbose) {
|
|
202
|
-
logInfo(`📋 Creating default branch record for
|
|
202
|
+
logInfo(`📋 Creating default branch record for issue: ${issueId}`);
|
|
203
203
|
}
|
|
204
|
-
// Fetch
|
|
205
|
-
let
|
|
204
|
+
// Fetch issue info to get the issue name for branch naming
|
|
205
|
+
let issueName = 'Issue Implementation';
|
|
206
206
|
try {
|
|
207
|
-
const
|
|
208
|
-
if (
|
|
209
|
-
// Truncate
|
|
210
|
-
|
|
207
|
+
const issueInfo = await getIssue(issueId, verbose);
|
|
208
|
+
if (issueInfo?.name) {
|
|
209
|
+
// Truncate issue name for branch display (max 100 chars)
|
|
210
|
+
issueName = truncateText(issueInfo.name, 100);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
catch (error) {
|
|
214
214
|
if (verbose) {
|
|
215
|
-
logInfo(`Could not fetch
|
|
215
|
+
logInfo(`Could not fetch issue name, using default: ${error}`);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
const defaultBranchName = `dev/${
|
|
219
|
-
const createdBranches = await createBranches({
|
|
218
|
+
const defaultBranchName = `dev/${issueId}`;
|
|
219
|
+
const createdBranches = await createBranches({ issueId, verbose }, [
|
|
220
220
|
{
|
|
221
|
-
name:
|
|
222
|
-
description: `Implementation branch for: ${
|
|
221
|
+
name: issueName,
|
|
222
|
+
description: `Implementation branch for: ${issueName}`,
|
|
223
223
|
branch_name: defaultBranchName,
|
|
224
224
|
status: 'pending',
|
|
225
225
|
},
|
|
@@ -238,22 +238,22 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
// Update
|
|
241
|
+
// Update issue branch status to in_progress if we have one
|
|
242
242
|
if (currentBranch && currentBranch.status === 'pending') {
|
|
243
243
|
try {
|
|
244
244
|
await updateBranch(currentBranch.id, { status: 'in_progress' }, verbose);
|
|
245
245
|
if (verbose) {
|
|
246
|
-
logInfo(`✅ Updated
|
|
246
|
+
logInfo(`✅ Updated issue branch status to in_progress`);
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
catch (error) {
|
|
250
250
|
if (verbose) {
|
|
251
|
-
logError(`Failed to update
|
|
251
|
+
logError(`Failed to update issue branch status: ${error}`);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
// Determine the actual base branch for branch chaining
|
|
256
|
-
// If the current
|
|
256
|
+
// If the current issue branch depends on another branch, use that as the base
|
|
257
257
|
let actualBaseBranch = baseBranch;
|
|
258
258
|
let rebaseTargetBranch;
|
|
259
259
|
let originalBaseBranch;
|
|
@@ -261,7 +261,7 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
261
261
|
if (currentBranch && currentBranch.base_branch_id) {
|
|
262
262
|
try {
|
|
263
263
|
const allBranches = await getBranches({
|
|
264
|
-
|
|
264
|
+
issueId,
|
|
265
265
|
verbose: false,
|
|
266
266
|
});
|
|
267
267
|
const baseBranchInfo = getBaseBranchInfo(currentBranch, allBranches, baseBranch);
|
|
@@ -293,10 +293,10 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
// Prepare git environment: switch to
|
|
296
|
+
// Prepare git environment: switch to issue branch and rebase with base
|
|
297
297
|
// Branch names are stored as dev/... (development branch)
|
|
298
298
|
// PR will be created from dev/... to feat/... after implementation
|
|
299
|
-
const devBranchName = currentBranch?.branch_name || `dev/${
|
|
299
|
+
const devBranchName = currentBranch?.branch_name || `dev/${issueId}`;
|
|
300
300
|
if (verbose && currentBranch) {
|
|
301
301
|
logInfo(`🔄 Using dev branch for development: ${devBranchName}`);
|
|
302
302
|
}
|
|
@@ -306,7 +306,7 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
306
306
|
let githubTokenForPush;
|
|
307
307
|
if (devBranchName.startsWith('dev/')) {
|
|
308
308
|
try {
|
|
309
|
-
const githubConfig = await getGitHubConfig(
|
|
309
|
+
const githubConfig = await getGitHubConfig(issueId, verbose);
|
|
310
310
|
if (githubConfig.configured &&
|
|
311
311
|
githubConfig.token &&
|
|
312
312
|
githubConfig.owner &&
|
|
@@ -337,7 +337,7 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
337
337
|
// Use async version to support --onto rebase for branch chaining
|
|
338
338
|
// This correctly handles cases where base branch was squash-merged
|
|
339
339
|
const { cleanup: cleanupGit } = await prepareCustomBranchGitEnvironmentAsync({
|
|
340
|
-
|
|
340
|
+
issueBranch: devBranchName,
|
|
341
341
|
baseBranch: actualBaseBranch,
|
|
342
342
|
rebaseTargetBranch, // For --onto rebase target (e.g., main) when base branch is merged
|
|
343
343
|
originalBaseBranch, // For --onto rebase starting point when base branch was squash-merged
|
|
@@ -355,12 +355,12 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
355
355
|
if (verbose) {
|
|
356
356
|
logInfo('Fetching code implementation context via MCP endpoints...');
|
|
357
357
|
}
|
|
358
|
-
const context = await fetchCodeImplementationContext(
|
|
358
|
+
const context = await fetchCodeImplementationContext(issueId, verbose);
|
|
359
359
|
// Fetch feedbacks for code implementation phase
|
|
360
|
-
// For multi-branch
|
|
360
|
+
// For multi-branch issues, filter by the current branch to get branch-specific feedbacks
|
|
361
361
|
let feedbacksInfo;
|
|
362
362
|
try {
|
|
363
|
-
const feedbacksContext = await getFeedbacksForPhase({
|
|
363
|
+
const feedbacksContext = await getFeedbacksForPhase({ issueId, verbose }, 'code_implementation', currentBranch?.id // Pass branch_id if we have a current branch
|
|
364
364
|
);
|
|
365
365
|
if (feedbacksContext.feedbacks.length > 0) {
|
|
366
366
|
feedbacksInfo = await formatFeedbacksForContext(feedbacksContext);
|
|
@@ -378,15 +378,15 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
378
378
|
// Use the dev branch name for development (already computed above)
|
|
379
379
|
const branchName = devBranchName;
|
|
380
380
|
const systemPrompt = createSystemPrompt(config, actualBaseBranch, // Use computed base branch for branch chaining
|
|
381
|
-
|
|
381
|
+
issueId, branchName);
|
|
382
382
|
const initialImplementationPrompt = createImplementationPromptWithContext({
|
|
383
|
-
|
|
383
|
+
issueId,
|
|
384
384
|
context,
|
|
385
385
|
baseBranch: actualBaseBranch, // Use computed base branch for branch chaining
|
|
386
386
|
checklistContext,
|
|
387
387
|
verbose,
|
|
388
388
|
feedbacksInfo,
|
|
389
|
-
|
|
389
|
+
issueBranch: currentBranch,
|
|
390
390
|
});
|
|
391
391
|
const maxIterations = options.maxVerificationIterations || 10;
|
|
392
392
|
let currentIteration = 0;
|
|
@@ -406,8 +406,8 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
406
406
|
}
|
|
407
407
|
// Log iteration start (for iterations after the first)
|
|
408
408
|
if (currentIteration > 1) {
|
|
409
|
-
await
|
|
410
|
-
|
|
409
|
+
await logIssuePhaseEvent({
|
|
410
|
+
issueId,
|
|
411
411
|
eventType: 'phase_started',
|
|
412
412
|
phase: 'code_implementation',
|
|
413
413
|
result: 'info',
|
|
@@ -459,7 +459,7 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
459
459
|
}
|
|
460
460
|
// Capture session ID for coaching loop
|
|
461
461
|
executionSessionId = message.session_id || executionSessionId;
|
|
462
|
-
newImplementationResult = processQueryResult(message, lastAssistantResponse,
|
|
462
|
+
newImplementationResult = processQueryResult(message, lastAssistantResponse, issueId, verbose);
|
|
463
463
|
}
|
|
464
464
|
// Check if implementation produced results
|
|
465
465
|
if (!newImplementationResult) {
|
|
@@ -471,8 +471,8 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
471
471
|
// Update with new implementation result
|
|
472
472
|
structuredImplementationResult = newImplementationResult;
|
|
473
473
|
// Log implementation completion for this iteration
|
|
474
|
-
await
|
|
475
|
-
|
|
474
|
+
await logIssuePhaseEvent({
|
|
475
|
+
issueId,
|
|
476
476
|
eventType: 'phase_completed',
|
|
477
477
|
phase: 'code_implementation',
|
|
478
478
|
result: 'success',
|
|
@@ -489,7 +489,7 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
489
489
|
// Coaching loop: self-rate → coach → improve → repeat (between execute and verify)
|
|
490
490
|
// Runs before push so any improvements are committed and pushed together
|
|
491
491
|
const coaching = await runPhaseCoaching({
|
|
492
|
-
|
|
492
|
+
issueId,
|
|
493
493
|
phase: 'code_implementation',
|
|
494
494
|
phaseResult: { execution_session_id: executionSessionId },
|
|
495
495
|
checklistItems: extractChecklistItems(checklistContext),
|
|
@@ -517,9 +517,9 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
517
517
|
branchName: structuredImplementationResult.branch_name || branchName,
|
|
518
518
|
baseBranch: actualBaseBranch, // Use computed base branch for branch chaining
|
|
519
519
|
checklistContext: checklistContext || null,
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
520
|
+
issueId,
|
|
521
|
+
issueName: context.issue.name,
|
|
522
|
+
issueDescription: context.issue.description,
|
|
523
523
|
config,
|
|
524
524
|
currentIteration,
|
|
525
525
|
maxIterations,
|
|
@@ -551,7 +551,7 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
551
551
|
}
|
|
552
552
|
// Handle results
|
|
553
553
|
if (!structuredImplementationResult) {
|
|
554
|
-
return buildNoResultsError(
|
|
554
|
+
return buildNoResultsError(issueId, branchName);
|
|
555
555
|
}
|
|
556
556
|
const { branch_name, files_modified, commit_hash, summary, checklist_results, checklist_item_results, } = structuredImplementationResult;
|
|
557
557
|
// Check if verification failed after all iterations
|
|
@@ -562,7 +562,7 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
562
562
|
logError(`❌ Final result: Code verification FAILED after ${currentIteration} iterations`);
|
|
563
563
|
logError(` Code committed for manual review`);
|
|
564
564
|
return buildVerificationFailureResult({
|
|
565
|
-
|
|
565
|
+
issueId,
|
|
566
566
|
branchName: branch_name || branchName,
|
|
567
567
|
implementationSummary: summary || 'Implementation completed with verification failures',
|
|
568
568
|
filesModified: files_modified || [],
|
|
@@ -571,12 +571,12 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
571
571
|
iterations: currentIteration,
|
|
572
572
|
});
|
|
573
573
|
}
|
|
574
|
-
// Create pull request from dev/ branch to feat/ branch if this is a multi-branch
|
|
574
|
+
// Create pull request from dev/ branch to feat/ branch if this is a multi-branch issue
|
|
575
575
|
let pullRequestUrl = null;
|
|
576
576
|
let pullRequestNumber = null;
|
|
577
577
|
if (currentBranch && devBranchName.startsWith('dev/')) {
|
|
578
578
|
// Get GitHub configuration from developer settings via MCP
|
|
579
|
-
const githubConfig = await getGitHubConfig(
|
|
579
|
+
const githubConfig = await getGitHubConfig(issueId, verbose);
|
|
580
580
|
if (githubConfig.configured &&
|
|
581
581
|
githubConfig.token &&
|
|
582
582
|
githubConfig.owner &&
|
|
@@ -593,7 +593,7 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
593
593
|
if (verbose) {
|
|
594
594
|
logInfo(`📝 Creating pull request from ${devBranchName} to ${featBranchName}...`);
|
|
595
595
|
}
|
|
596
|
-
const prResult = await createBranchPullRequest(prConfig, devBranchName, currentBranch.name, currentBranch.description || '
|
|
596
|
+
const prResult = await createBranchPullRequest(prConfig, devBranchName, currentBranch.name, currentBranch.description || 'Issue branch implementation', baseBranch);
|
|
597
597
|
if (prResult.success) {
|
|
598
598
|
pullRequestUrl = prResult.pullRequestUrl || null;
|
|
599
599
|
pullRequestNumber = prResult.pullRequestNumber || null;
|
|
@@ -611,7 +611,7 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
611
611
|
logInfo(` ${githubConfig.message || 'Please configure GitHub App in product developer settings.'}`);
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
// Update
|
|
614
|
+
// Update issue branch status to ready_for_review if we have one
|
|
615
615
|
if (currentBranch) {
|
|
616
616
|
try {
|
|
617
617
|
// Note: branch_name is stored as dev/... and used directly by all phases.
|
|
@@ -622,18 +622,18 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
622
622
|
pull_request_number: pullRequestNumber,
|
|
623
623
|
}, verbose);
|
|
624
624
|
if (verbose) {
|
|
625
|
-
logInfo(`✅ Updated
|
|
625
|
+
logInfo(`✅ Updated issue branch status to ready_for_review`);
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
628
|
catch (error) {
|
|
629
629
|
if (verbose) {
|
|
630
|
-
logError(`Failed to update
|
|
630
|
+
logError(`Failed to update issue branch status: ${error}`);
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
// Return success result with session ID for coaching
|
|
635
635
|
const implResult = buildImplementationResult({
|
|
636
|
-
|
|
636
|
+
issueId,
|
|
637
637
|
branchName: branch_name || branchName,
|
|
638
638
|
implementationSummary: summary || 'Implementation completed successfully',
|
|
639
639
|
filesModified: files_modified || [],
|
|
@@ -653,8 +653,8 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
653
653
|
catch (error) {
|
|
654
654
|
logError(`Code implementation failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
655
655
|
return {
|
|
656
|
-
|
|
657
|
-
branchName: `dev/${
|
|
656
|
+
issueId,
|
|
657
|
+
branchName: `dev/${issueId}`,
|
|
658
658
|
implementationSummary: null,
|
|
659
659
|
status: 'error',
|
|
660
660
|
message: `Implementation failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
@@ -665,7 +665,7 @@ export const implementFeatureCode = async (options, config, checklistContext) =>
|
|
|
665
665
|
cleanupGit();
|
|
666
666
|
}
|
|
667
667
|
};
|
|
668
|
-
const createSystemPrompt = (_config, baseBranch,
|
|
668
|
+
const createSystemPrompt = (_config, baseBranch, issueId, branchName) => {
|
|
669
669
|
const mcpInstructions = `
|
|
670
670
|
|
|
671
671
|
**MANDATORY Checklist Compliance**:
|
|
@@ -680,9 +680,9 @@ If you are provided with checklists in the context, you MUST satisfy ALL of them
|
|
|
680
680
|
- The system will validate that all checklists have been addressed - missing checklists will cause the pipeline to fail
|
|
681
681
|
|
|
682
682
|
CRITICAL: Checklists are not optional suggestions - they are mandatory quality gates that must be satisfied.`;
|
|
683
|
-
return `You are an expert full-stack developer implementing
|
|
683
|
+
return `You are an expert full-stack developer implementing issues based on specifications. Your task is to implement complete, production-ready code based on issue requirements, user stories, test cases, and technical design.
|
|
684
684
|
|
|
685
|
-
**Your Role**: Implement complete, working
|
|
685
|
+
**Your Role**: Implement complete, working issues based on provided specifications and requirements.
|
|
686
686
|
|
|
687
687
|
**Available Tools**:
|
|
688
688
|
- Bash: Git operations, running commands, tests, and builds
|
|
@@ -697,7 +697,7 @@ CRITICAL: Checklists are not optional suggestions - they are mandatory quality g
|
|
|
697
697
|
1. **GIT PULL REBASE**: First, ensure main branch is up to date with remote:
|
|
698
698
|
- git checkout ${baseBranch}
|
|
699
699
|
- git pull origin ${baseBranch} --rebase
|
|
700
|
-
2. **CREATE BRANCH**: Create
|
|
700
|
+
2. **CREATE BRANCH**: Create issue branch \`${branchName}\` from ${baseBranch}
|
|
701
701
|
3. **ANALYZE CODEBASE**: Use Glob and Read to understand the existing code structure
|
|
702
702
|
4. **IMPLEMENT CODE**: Write the actual implementation using Edit/Write tools
|
|
703
703
|
5. **FIX ISSUES**: Address any lint or build failures
|
|
@@ -742,8 +742,8 @@ You MUST end your response with a JSON object containing the implementation resu
|
|
|
742
742
|
\`\`\`json
|
|
743
743
|
{
|
|
744
744
|
"implementation_result": {
|
|
745
|
-
"
|
|
746
|
-
"branch_name": "dev/
|
|
745
|
+
"issue_id": "ISSUE_ID_PLACEHOLDER",
|
|
746
|
+
"branch_name": "dev/ISSUE_ID",
|
|
747
747
|
"files_modified": ["file1.ts", "file2.tsx"],
|
|
748
748
|
"commit_hash": "abc123...",
|
|
749
749
|
"summary": "Brief description of what was implemented",
|
|
@@ -768,20 +768,20 @@ IMPORTANT: In the checklist context, look for lines that say "ID: [UUID]" in the
|
|
|
768
768
|
Remember: Quality over speed. It's better to implement correctly than to rush and create bugs.`;
|
|
769
769
|
};
|
|
770
770
|
const createImplementationPromptWithContext = (opts) => {
|
|
771
|
-
const {
|
|
771
|
+
const { issueId, context, baseBranch, checklistContext, verbose, feedbacksInfo, issueBranch, } = opts;
|
|
772
772
|
const contextInfo = formatContextForPrompt(context);
|
|
773
773
|
let finalContextInfo = contextInfo;
|
|
774
|
-
// Add
|
|
775
|
-
if (
|
|
774
|
+
// Add issue branch context if available
|
|
775
|
+
if (issueBranch) {
|
|
776
776
|
const branchContext = `
|
|
777
|
-
## Current
|
|
777
|
+
## Current Issue Branch
|
|
778
778
|
|
|
779
|
-
This is a **multi-branch
|
|
779
|
+
This is a **multi-branch issue** - the issue has been split into multiple branches for incremental development.
|
|
780
780
|
|
|
781
781
|
**Current Branch Information:**
|
|
782
|
-
- **Name**: ${
|
|
783
|
-
- **Branch**: ${
|
|
784
|
-
- **Description**: ${
|
|
782
|
+
- **Name**: ${issueBranch.name}
|
|
783
|
+
- **Branch**: ${issueBranch.branch_name || 'To be created'}
|
|
784
|
+
- **Description**: ${issueBranch.description || 'No description'}
|
|
785
785
|
|
|
786
786
|
**Important**: Focus ONLY on implementing the scope defined for this specific branch. Do not implement functionality that belongs to other branches.
|
|
787
787
|
`;
|
|
@@ -828,11 +828,11 @@ Remember: Checklists are not suggestions - they are mandatory quality gates.`;
|
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
830
|
// Determine branch name
|
|
831
|
-
const branchName =
|
|
832
|
-
const branchDescription =
|
|
833
|
-
? `\n\n**Note**: This is a multi-branch
|
|
831
|
+
const branchName = issueBranch?.branch_name || `dev/${issueId}`;
|
|
832
|
+
const branchDescription = issueBranch
|
|
833
|
+
? `\n\n**Note**: This is a multi-branch issue. Focus only on the scope defined for this branch.`
|
|
834
834
|
: '';
|
|
835
|
-
return `Implement the ${
|
|
835
|
+
return `Implement the ${issueBranch ? `"${issueBranch.name}" branch of` : 'complete'} issue for issue ID: ${issueId}${branchDescription}
|
|
836
836
|
|
|
837
837
|
${finalContextInfo}
|
|
838
838
|
|
|
@@ -853,9 +853,9 @@ Follow this systematic approach:
|
|
|
853
853
|
- Where to place new components/files
|
|
854
854
|
- How to integrate with existing systems
|
|
855
855
|
|
|
856
|
-
4. **IMPLEMENT
|
|
856
|
+
4. **IMPLEMENT ISSUE**: Based on the context above, implement the issue by:
|
|
857
857
|
- Following the technical design (if available)
|
|
858
|
-
- Satisfying all user stories${
|
|
858
|
+
- Satisfying all user stories${issueBranch ? ' relevant to this branch' : ''}
|
|
859
859
|
- Creating components, services, APIs, database changes as needed
|
|
860
860
|
- Following existing code patterns and conventions
|
|
861
861
|
- Adding proper error handling and validation
|
|
@@ -868,7 +868,7 @@ Follow this systematic approach:
|
|
|
868
868
|
3. Last resort only: git commit --no-verify -m "message" (explain why in commit message)
|
|
869
869
|
|
|
870
870
|
## Important Notes
|
|
871
|
-
${
|
|
871
|
+
${issueBranch ? `- Focus ONLY on implementing the scope for this branch: "${issueBranch.name}"` : '- Focus on implementing ALL user stories completely'}
|
|
872
872
|
- Follow the technical design if provided, or create your own approach
|
|
873
873
|
- Maintain existing code quality and patterns
|
|
874
874
|
- Never skip pre-commit checks - always fix the issues
|
|
@@ -876,9 +876,9 @@ ${featureBranch ? `- Focus ONLY on implementing the scope for this branch: "${fe
|
|
|
876
876
|
|
|
877
877
|
${checklistInstructions}
|
|
878
878
|
|
|
879
|
-
Begin by creating the
|
|
879
|
+
Begin by creating the issue branch and analyzing the codebase structure.`;
|
|
880
880
|
};
|
|
881
|
-
const parseImplementationResponse = (response,
|
|
881
|
+
const parseImplementationResponse = (response, issueId, verbose) => {
|
|
882
882
|
logDebug('Parsing implementation response...', verbose);
|
|
883
883
|
try {
|
|
884
884
|
// Try to find JSON in the response
|
|
@@ -890,7 +890,7 @@ const parseImplementationResponse = (response, featureId, verbose) => {
|
|
|
890
890
|
if (parsed.implementation_result) {
|
|
891
891
|
const result = parsed.implementation_result;
|
|
892
892
|
return {
|
|
893
|
-
branchName: result.branch_name || `dev/${
|
|
893
|
+
branchName: result.branch_name || `dev/${issueId}`,
|
|
894
894
|
filesModified: result.files_modified || [],
|
|
895
895
|
commitHash: result.commit_hash || '',
|
|
896
896
|
summary: result.summary || '',
|
|
@@ -903,7 +903,7 @@ const parseImplementationResponse = (response, featureId, verbose) => {
|
|
|
903
903
|
const filesMatch = response.match(/files?[:\s]+([^\n]+)/i);
|
|
904
904
|
const commitMatch = response.match(/commit[:\s]+([a-f0-9]{7,})/i);
|
|
905
905
|
return {
|
|
906
|
-
branchName: branchMatch?.[1] || `dev/${
|
|
906
|
+
branchName: branchMatch?.[1] || `dev/${issueId}`,
|
|
907
907
|
filesModified: filesMatch
|
|
908
908
|
? filesMatch[1].split(/[,\s]+/).filter((f) => f)
|
|
909
909
|
: [],
|
|
@@ -914,7 +914,7 @@ const parseImplementationResponse = (response, featureId, verbose) => {
|
|
|
914
914
|
catch (error) {
|
|
915
915
|
logError(`Response parsing failed: ${error}`);
|
|
916
916
|
return {
|
|
917
|
-
branchName: `dev/${
|
|
917
|
+
branchName: `dev/${issueId}`,
|
|
918
918
|
filesModified: [],
|
|
919
919
|
commitHash: '',
|
|
920
920
|
summary: 'Implementation completed',
|
|
@@ -6,7 +6,7 @@ export interface VerificationCycleResult {
|
|
|
6
6
|
nextPrompt: string | null;
|
|
7
7
|
}
|
|
8
8
|
export interface BuildImplementationResultOptions {
|
|
9
|
-
|
|
9
|
+
issueId: string;
|
|
10
10
|
branchName: string;
|
|
11
11
|
implementationSummary: string;
|
|
12
12
|
filesModified: string[];
|
|
@@ -29,7 +29,7 @@ export interface BuildImplementationResultOptions {
|
|
|
29
29
|
*/
|
|
30
30
|
export declare function buildImplementationResult(opts: BuildImplementationResultOptions): CodeImplementationResult;
|
|
31
31
|
export interface BuildVerificationFailureResultOptions {
|
|
32
|
-
|
|
32
|
+
issueId: string;
|
|
33
33
|
branchName: string;
|
|
34
34
|
implementationSummary: string;
|
|
35
35
|
filesModified: string[];
|
|
@@ -44,4 +44,4 @@ export declare function buildVerificationFailureResult(opts: BuildVerificationFa
|
|
|
44
44
|
/**
|
|
45
45
|
* Build error result for no implementation
|
|
46
46
|
*/
|
|
47
|
-
export declare function buildNoResultsError(
|
|
47
|
+
export declare function buildNoResultsError(issueId: string, branchName: string): CodeImplementationResult;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Build successful implementation result
|
|
3
3
|
*/
|
|
4
4
|
export function buildImplementationResult(opts) {
|
|
5
|
-
const {
|
|
5
|
+
const { issueId, branchName, implementationSummary, filesModified, commitHash, checklistResults, checklistItemResults, } = opts;
|
|
6
6
|
return {
|
|
7
|
-
|
|
7
|
+
issueId,
|
|
8
8
|
branchName,
|
|
9
9
|
implementationSummary,
|
|
10
10
|
status: 'success',
|
|
@@ -21,9 +21,9 @@ export function buildImplementationResult(opts) {
|
|
|
21
21
|
* Build verification failure result
|
|
22
22
|
*/
|
|
23
23
|
export function buildVerificationFailureResult(opts) {
|
|
24
|
-
const {
|
|
24
|
+
const { issueId, branchName, implementationSummary, filesModified, commitHash, verificationResult, iterations, } = opts;
|
|
25
25
|
return {
|
|
26
|
-
|
|
26
|
+
issueId,
|
|
27
27
|
branchName,
|
|
28
28
|
implementationSummary,
|
|
29
29
|
status: 'error',
|
|
@@ -42,9 +42,9 @@ export function buildVerificationFailureResult(opts) {
|
|
|
42
42
|
/**
|
|
43
43
|
* Build error result for no implementation
|
|
44
44
|
*/
|
|
45
|
-
export function buildNoResultsError(
|
|
45
|
+
export function buildNoResultsError(issueId, branchName) {
|
|
46
46
|
return {
|
|
47
|
-
|
|
47
|
+
issueId,
|
|
48
48
|
branchName,
|
|
49
49
|
implementationSummary: null,
|
|
50
50
|
status: 'error',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type EdsgerConfig } from '../../types/index.js';
|
|
2
2
|
import { type ChecklistVerificationResult } from '../code-implementation-verification/agent.js';
|
|
3
3
|
export declare const createCodeImplementationSystemPrompt: (_config: EdsgerConfig, baseBranch: string, projectDir?: string) => Promise<string>;
|
|
4
|
-
export declare const createCodeImplementationPromptWithContext: (
|
|
4
|
+
export declare const createCodeImplementationPromptWithContext: (issueId: string, contextInfo: string, baseBranch: string) => string;
|
|
5
5
|
/**
|
|
6
6
|
* Create a prompt for the implementation agent to improve code based on verification feedback
|
|
7
7
|
*/
|
|
@@ -11,8 +11,8 @@ export const createCodeImplementationSystemPrompt = async (_config, baseBranch,
|
|
|
11
11
|
prompt = substituteVariables(prompt, { BASE_BRANCH: baseBranch });
|
|
12
12
|
return `${prompt}\n\n${OUTPUT_CONTRACTS['code-implementation']}`;
|
|
13
13
|
};
|
|
14
|
-
export const createCodeImplementationPromptWithContext = (
|
|
15
|
-
return `Implement the complete
|
|
14
|
+
export const createCodeImplementationPromptWithContext = (issueId, contextInfo, baseBranch) => {
|
|
15
|
+
return `Implement the complete issue for issue ID: ${issueId}
|
|
16
16
|
|
|
17
17
|
${contextInfo}
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ Follow this systematic approach:
|
|
|
22
22
|
|
|
23
23
|
1. **Git Setup**:
|
|
24
24
|
- Checkout ${baseBranch} and pull latest changes: git pull origin ${baseBranch} --rebase
|
|
25
|
-
- Create a new
|
|
25
|
+
- Create a new issue branch: git checkout -b dev/${issueId}
|
|
26
26
|
|
|
27
27
|
2. **Codebase Analysis**:
|
|
28
28
|
- Use Glob to understand the project structure and find relevant files
|
|
@@ -41,13 +41,13 @@ Follow this systematic approach:
|
|
|
41
41
|
|
|
42
42
|
5. **Commit Changes**:
|
|
43
43
|
- Stage all changes: git add .
|
|
44
|
-
- Commit with descriptive message: git commit -m "feat: implement [
|
|
44
|
+
- Commit with descriptive message: git commit -m "feat: implement [issue description]"
|
|
45
45
|
- Handle any pre-commit hook issues appropriately
|
|
46
46
|
|
|
47
47
|
## Important Implementation Notes:
|
|
48
48
|
- Focus on production-ready, maintainable code
|
|
49
49
|
- Follow the technical design specifications closely
|
|
50
|
-
- Implement complete functionality, not just partial
|
|
50
|
+
- Implement complete functionality, not just partial issues
|
|
51
51
|
- Handle error cases and edge scenarios appropriately
|
|
52
52
|
- Use proper TypeScript types and interfaces
|
|
53
53
|
- Add appropriate validation and error handling
|
|
@@ -141,7 +141,7 @@ You MUST return ONLY the JSON object below after completing your improvements. D
|
|
|
141
141
|
\`\`\`json
|
|
142
142
|
{
|
|
143
143
|
"implementation_result": {
|
|
144
|
-
"
|
|
144
|
+
"issue_id": "...",
|
|
145
145
|
"branch_name": "${branchName}",
|
|
146
146
|
"files_modified": ["list", "of", "modified", "files"],
|
|
147
147
|
"commit_hash": "new commit hash after improvements",
|
|
@@ -18,11 +18,11 @@ export interface ChecklistVerificationResult {
|
|
|
18
18
|
feedbacks_rejected_count?: number;
|
|
19
19
|
}
|
|
20
20
|
export interface VerifyCodeImplementationOptions {
|
|
21
|
-
|
|
21
|
+
issueId: string;
|
|
22
22
|
branchName: string;
|
|
23
23
|
baseBranch: string;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
issueName: string;
|
|
25
|
+
issueDescription?: string;
|
|
26
26
|
checklistContext: string;
|
|
27
27
|
verbose?: boolean;
|
|
28
28
|
}
|