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 creation and code splitting
|
|
5
5
|
*/
|
|
6
|
-
export async function createPRExecutionSystemPrompt(
|
|
6
|
+
export async function createPRExecutionSystemPrompt(issueId, devBranchName, projectDir) {
|
|
7
7
|
const skill = await resolveSkill('phase/pr-execution', {
|
|
8
8
|
projectDir,
|
|
9
9
|
});
|
|
@@ -12,7 +12,7 @@ export async function createPRExecutionSystemPrompt(featureId, devBranchName, pr
|
|
|
12
12
|
}
|
|
13
13
|
let { prompt } = skill;
|
|
14
14
|
prompt = substituteVariables(prompt, {
|
|
15
|
-
|
|
15
|
+
ISSUE_ID: issueId,
|
|
16
16
|
DEV_BRANCH: devBranchName,
|
|
17
17
|
});
|
|
18
18
|
return `${prompt}\n\n${OUTPUT_CONTRACTS['pr-execution']}`;
|
|
@@ -20,7 +20,7 @@ export async function createPRExecutionSystemPrompt(featureId, devBranchName, pr
|
|
|
20
20
|
/**
|
|
21
21
|
* Create the system prompt for incremental sync (re-runs)
|
|
22
22
|
*/
|
|
23
|
-
export async function createIncrementalSyncSystemPrompt(
|
|
23
|
+
export async function createIncrementalSyncSystemPrompt(issueId, devBranchName, projectDir) {
|
|
24
24
|
const skill = await resolveSkill('phase/incremental-sync', {
|
|
25
25
|
projectDir,
|
|
26
26
|
});
|
|
@@ -29,7 +29,7 @@ export async function createIncrementalSyncSystemPrompt(featureId, devBranchName
|
|
|
29
29
|
}
|
|
30
30
|
let { prompt } = skill;
|
|
31
31
|
prompt = substituteVariables(prompt, {
|
|
32
|
-
|
|
32
|
+
ISSUE_ID: issueId,
|
|
33
33
|
DEV_BRANCH: devBranchName,
|
|
34
34
|
});
|
|
35
35
|
return `${prompt}\n\n${OUTPUT_CONTRACTS['incremental-sync']}`;
|
|
@@ -47,7 +47,7 @@ function resolveBaseBranch(pr, allPRs) {
|
|
|
47
47
|
/**
|
|
48
48
|
* Create the user prompt for first-time branch creation
|
|
49
49
|
*/
|
|
50
|
-
export function createPRExecutionPrompt(
|
|
50
|
+
export function createPRExecutionPrompt(issueId, devBranchName, pullRequests) {
|
|
51
51
|
const prList = pullRequests
|
|
52
52
|
.map((pr) => {
|
|
53
53
|
const files = pr.files
|
|
@@ -80,7 +80,7 @@ For each PR above (in sequence order):
|
|
|
80
80
|
After all branches are created, switch back to \`main\` and provide the execution result JSON.`;
|
|
81
81
|
}
|
|
82
82
|
export function createIncrementalSyncPrompt(opts) {
|
|
83
|
-
const {
|
|
83
|
+
const { issueId: _issueId, devBranchName, pullRequests, lastSyncedCommit, diffStat, changedFiles, } = opts;
|
|
84
84
|
const prList = pullRequests
|
|
85
85
|
.map((pr) => {
|
|
86
86
|
const files = pr.files
|
|
@@ -15,7 +15,7 @@ const LEARNER_SYSTEM_PROMPT = `You are a software quality engineer. Your task is
|
|
|
15
15
|
|
|
16
16
|
| Phase | When it runs | Good for |
|
|
17
17
|
|-------|-------------|----------|
|
|
18
|
-
| \`
|
|
18
|
+
| \`issue_analysis\` | Requirements gathering | Requirement gaps, scope issues, edge cases |
|
|
19
19
|
| \`user_stories_analysis\` | User story refinement | Acceptance criteria gaps, missing scenarios |
|
|
20
20
|
| \`test_cases_analysis\` | Test planning | Missing test coverage, untested edge cases |
|
|
21
21
|
| \`technical_design\` | Architecture & design | Design flaws, API contract issues, data modelling |
|
|
@@ -42,7 +42,7 @@ const LEARNER_SYSTEM_PROMPT = `You are a software quality engineer. Your task is
|
|
|
42
42
|
- **Security & error handling** → typically \`code_implementation\`
|
|
43
43
|
- **Missing test cases or edge cases** → \`test_cases_analysis\` or \`code_testing\`
|
|
44
44
|
- **Design or architecture issues** → \`technical_design\`
|
|
45
|
-
- **Missing requirements or acceptance criteria** → \`
|
|
45
|
+
- **Missing requirements or acceptance criteria** → \`issue_analysis\` or \`user_stories_analysis\`
|
|
46
46
|
- **Code style, readability, naming** → \`code_refine\`
|
|
47
47
|
- **Only use \`code_review\`** for cross-cutting concerns that genuinely can't be checked earlier.
|
|
48
48
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Standalone PR Review
|
|
3
|
-
* Reviews a GitHub PR and posts review comments, without
|
|
3
|
+
* Reviews a GitHub PR and posts review comments, without issue lifecycle dependency.
|
|
4
4
|
*/
|
|
5
5
|
export interface StandalonePRReviewOptions {
|
|
6
6
|
productId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Standalone PR Review
|
|
3
|
-
* Reviews a GitHub PR and posts review comments, without
|
|
3
|
+
* Reviews a GitHub PR and posts review comments, without issue lifecycle dependency.
|
|
4
4
|
*/
|
|
5
5
|
import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
6
6
|
import { Octokit } from '@octokit/rest';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Prompts for standalone PR review (no
|
|
2
|
+
* Prompts for standalone PR review (no issue/design context).
|
|
3
3
|
*/
|
|
4
4
|
export declare function createStandaloneReviewSystemPrompt(): string;
|
|
5
5
|
export declare function createStandaloneReviewUserPrompt(contextInfo: string): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Prompts for standalone PR review (no
|
|
2
|
+
* Prompts for standalone PR review (no issue/design context).
|
|
3
3
|
*/
|
|
4
4
|
export function createStandaloneReviewSystemPrompt() {
|
|
5
5
|
return `You are an expert code reviewer specializing in thorough, constructive code reviews. Your goal is to analyze pull request code and identify issues, potential bugs, code quality concerns, and areas for improvement.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared context builder for standalone PR operations.
|
|
3
|
-
* Reuses GitHub API utilities from code-review/context.ts without
|
|
3
|
+
* Reuses GitHub API utilities from code-review/context.ts without issue dependencies.
|
|
4
4
|
*/
|
|
5
5
|
import { type PRCommit, type PRData, type PRFile } from '../code-review/context.js';
|
|
6
6
|
export type { PRCommit, PRData, PRFile } from '../code-review/context.js';
|
|
@@ -15,10 +15,10 @@ export interface StandalonePRContext {
|
|
|
15
15
|
commits: PRCommit[];
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Fetch PR context for standalone review/resolve (no
|
|
18
|
+
* Fetch PR context for standalone review/resolve (no issue dependency).
|
|
19
19
|
*/
|
|
20
20
|
export declare function fetchStandalonePRContext(pullRequestUrl: string, githubToken: string, verbose?: boolean): Promise<StandalonePRContext>;
|
|
21
21
|
/**
|
|
22
|
-
* Format standalone PR context for prompts (no
|
|
22
|
+
* Format standalone PR context for prompts (no issue/design context).
|
|
23
23
|
*/
|
|
24
24
|
export declare function formatStandalonePRContextForPrompt(context: StandalonePRContext): string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared context builder for standalone PR operations.
|
|
3
|
-
* Reuses GitHub API utilities from code-review/context.ts without
|
|
3
|
+
* Reuses GitHub API utilities from code-review/context.ts without issue dependencies.
|
|
4
4
|
*/
|
|
5
5
|
import { Octokit } from '@octokit/rest';
|
|
6
6
|
import { logDebug } from '../../utils/logger.js';
|
|
7
7
|
import { fetchPRCommits, fetchPRDetails, fetchPRFiles, parsePullRequestUrl, } from '../code-review/context.js';
|
|
8
8
|
export { parsePullRequestUrl } from '../code-review/context.js';
|
|
9
9
|
/**
|
|
10
|
-
* Fetch PR context for standalone review/resolve (no
|
|
10
|
+
* Fetch PR context for standalone review/resolve (no issue dependency).
|
|
11
11
|
*/
|
|
12
12
|
export async function fetchStandalonePRContext(pullRequestUrl, githubToken, verbose) {
|
|
13
13
|
const prInfo = parsePullRequestUrl(pullRequestUrl);
|
|
@@ -33,7 +33,7 @@ export async function fetchStandalonePRContext(pullRequestUrl, githubToken, verb
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* Format standalone PR context for prompts (no
|
|
36
|
+
* Format standalone PR context for prompts (no issue/design context).
|
|
37
37
|
*/
|
|
38
38
|
export function formatStandalonePRContextForPrompt(context) {
|
|
39
39
|
const sections = [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ProductInfo } from '../../api/products.js';
|
|
2
2
|
import { type Branch } from '../../services/branches.js';
|
|
3
3
|
import { type PullRequest } from '../../services/pull-requests.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { IssueInfo } from '../../types/issues.js';
|
|
5
5
|
import { type RepoForkInfo } from '../../utils/github-repo-info.js';
|
|
6
6
|
export interface GitHubConfigInfo {
|
|
7
7
|
configured: boolean;
|
|
@@ -11,7 +11,7 @@ export interface GitHubConfigInfo {
|
|
|
11
11
|
message?: string;
|
|
12
12
|
}
|
|
13
13
|
export interface PRSplittingContext {
|
|
14
|
-
|
|
14
|
+
issue: IssueInfo;
|
|
15
15
|
product: ProductInfo;
|
|
16
16
|
existing_branches: Branch[];
|
|
17
17
|
existing_pull_requests: PullRequest[];
|
|
@@ -25,4 +25,4 @@ export interface PRSplittingContext {
|
|
|
25
25
|
/**
|
|
26
26
|
* Fetch all context information needed for PR splitting
|
|
27
27
|
*/
|
|
28
|
-
export declare function fetchPRSplittingContext(
|
|
28
|
+
export declare function fetchPRSplittingContext(issueId: string, verbose?: boolean, replaceExisting?: boolean): Promise<PRSplittingContext>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { execFileSync, execSync } from 'child_process';
|
|
2
|
-
import { getFeature } from '../../api/features/index.js';
|
|
3
2
|
import { getGitHubConfig } from '../../api/github.js';
|
|
3
|
+
import { getIssue } from '../../api/issues/index.js';
|
|
4
4
|
import { getProduct } from '../../api/products.js';
|
|
5
5
|
import { getBranches } from '../../services/branches.js';
|
|
6
6
|
import { getPullRequests, } from '../../services/pull-requests.js';
|
|
@@ -9,10 +9,10 @@ import { buildCredentialArgs } from '../../utils/git-push.js';
|
|
|
9
9
|
import { getRepoForkInfo, } from '../../utils/github-repo-info.js';
|
|
10
10
|
import { logError, logInfo } from '../../utils/logger.js';
|
|
11
11
|
/**
|
|
12
|
-
* Get the dev branch name for
|
|
12
|
+
* Get the dev branch name for an issue
|
|
13
13
|
*/
|
|
14
|
-
function getDevBranchName(
|
|
15
|
-
return `dev/${
|
|
14
|
+
function getDevBranchName(issueId) {
|
|
15
|
+
return `dev/${issueId}`;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Get the HEAD SHA of a branch
|
|
@@ -74,18 +74,18 @@ function determineDiffBaseRef(existingPRs, replaceExisting) {
|
|
|
74
74
|
* Fetch all context information needed for PR splitting
|
|
75
75
|
*/
|
|
76
76
|
// eslint-disable-next-line complexity -- assembles context from many data sources with fallback handling
|
|
77
|
-
export async function fetchPRSplittingContext(
|
|
77
|
+
export async function fetchPRSplittingContext(issueId, verbose, replaceExisting) {
|
|
78
78
|
try {
|
|
79
79
|
if (verbose) {
|
|
80
|
-
logInfo(`Fetching PR splitting context for
|
|
80
|
+
logInfo(`Fetching PR splitting context for issue: ${issueId}`);
|
|
81
81
|
}
|
|
82
|
-
const devBranchName = getDevBranchName(
|
|
82
|
+
const devBranchName = getDevBranchName(issueId);
|
|
83
83
|
// Fetch database data and GitHub config in parallel (need token before remote branch check)
|
|
84
|
-
const [
|
|
85
|
-
|
|
86
|
-
getBranches({
|
|
87
|
-
getPullRequests({
|
|
88
|
-
getGitHubConfig(
|
|
84
|
+
const [issue, existingBranches, existingPullRequests, githubConfig] = await Promise.all([
|
|
85
|
+
getIssue(issueId, verbose),
|
|
86
|
+
getBranches({ issueId, verbose }).catch(() => []),
|
|
87
|
+
getPullRequests({ issueId, verbose }).catch(() => []),
|
|
88
|
+
getGitHubConfig(issueId, verbose),
|
|
89
89
|
]);
|
|
90
90
|
// Fetch latest remote refs (updates origin/main and all remote-tracking branches)
|
|
91
91
|
try {
|
|
@@ -108,9 +108,9 @@ export async function fetchPRSplittingContext(featureId, verbose, replaceExistin
|
|
|
108
108
|
const remoteExists = !localExists && remoteBranchExists(devBranchName, githubConfig.token);
|
|
109
109
|
if (!localExists && !remoteExists) {
|
|
110
110
|
throw new Error(`Development branch '${devBranchName}' does not exist. ` +
|
|
111
|
-
`The
|
|
111
|
+
`The issue must have code on the dev branch before PR splitting.`);
|
|
112
112
|
}
|
|
113
|
-
const product = await getProduct(
|
|
113
|
+
const product = await getProduct(issue.product_id, verbose);
|
|
114
114
|
// Detect fork status
|
|
115
115
|
let forkInfo = { isFork: false };
|
|
116
116
|
if (githubConfig.configured &&
|
|
@@ -146,7 +146,7 @@ export async function fetchPRSplittingContext(featureId, verbose, replaceExistin
|
|
|
146
146
|
const changedFiles = getChangedFiles(baseRef, devRef);
|
|
147
147
|
if (verbose) {
|
|
148
148
|
logInfo(`✅ PR splitting context fetched successfully:`);
|
|
149
|
-
logInfo(`
|
|
149
|
+
logInfo(` Issue: ${issue.name}`);
|
|
150
150
|
logInfo(` Product: ${product.name}`);
|
|
151
151
|
logInfo(` Dev Branch: ${devBranchName}`);
|
|
152
152
|
logInfo(` Dev Branch HEAD: ${devBranchHeadSha}`);
|
|
@@ -157,7 +157,7 @@ export async function fetchPRSplittingContext(featureId, verbose, replaceExistin
|
|
|
157
157
|
logInfo(` GitHub: ${githubConfig.configured ? 'Configured' : 'Not configured'}`);
|
|
158
158
|
}
|
|
159
159
|
return {
|
|
160
|
-
|
|
160
|
+
issue,
|
|
161
161
|
product,
|
|
162
162
|
existing_branches: existingBranches,
|
|
163
163
|
existing_pull_requests: existingPullRequests,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type EdsgerConfig } from '../../types/index.js';
|
|
2
2
|
export interface PRSplittingOptions {
|
|
3
|
-
|
|
3
|
+
issueId: string;
|
|
4
4
|
verbose?: boolean;
|
|
5
5
|
replaceExisting?: boolean;
|
|
6
6
|
}
|
|
@@ -18,7 +18,7 @@ export interface PlannedPullRequest {
|
|
|
18
18
|
acceptance_criteria?: string[];
|
|
19
19
|
}
|
|
20
20
|
export interface PRSplittingResult {
|
|
21
|
-
|
|
21
|
+
issueId: string;
|
|
22
22
|
pullRequests: PlannedPullRequest[];
|
|
23
23
|
status: 'success' | 'error';
|
|
24
24
|
summary: string;
|
|
@@ -27,10 +27,10 @@ export interface PRSplittingResult {
|
|
|
27
27
|
/**
|
|
28
28
|
* PR Splitting Phase: Analyze diff and create PR split plan
|
|
29
29
|
*
|
|
30
|
-
* This phase analyzes the actual code diff between dev/{
|
|
30
|
+
* This phase analyzes the actual code diff between dev/{issueId} and main,
|
|
31
31
|
* then uses AI to produce a PR split plan saved to the database.
|
|
32
32
|
* Human review is expected before running the pr-execution phase.
|
|
33
33
|
*/
|
|
34
|
-
export declare const
|
|
34
|
+
export declare const splitIssueIntoPRs: (options: PRSplittingOptions, config: EdsgerConfig) => Promise<PRSplittingResult>;
|
|
35
35
|
export type { PRSplittingContext } from './context.js';
|
|
36
36
|
export { fetchPRSplittingContext } from './context.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
2
2
|
import { DEFAULT_MODEL } from '../../constants.js';
|
|
3
|
-
import {
|
|
3
|
+
import { logIssuePhaseEvent } from '../../services/audit-logs.js';
|
|
4
4
|
import { formatFeedbacksForContext, getFeedbacksForPhase, } from '../../services/feedbacks.js';
|
|
5
5
|
import { clearPullRequests, createPullRequests, updatePullRequest, } from '../../services/pull-requests.js';
|
|
6
6
|
import { logDebug, logError, logInfo } from '../../utils/logger.js';
|
|
@@ -23,20 +23,20 @@ async function* prompt(analysisPrompt) {
|
|
|
23
23
|
/**
|
|
24
24
|
* PR Splitting Phase: Analyze diff and create PR split plan
|
|
25
25
|
*
|
|
26
|
-
* This phase analyzes the actual code diff between dev/{
|
|
26
|
+
* This phase analyzes the actual code diff between dev/{issueId} and main,
|
|
27
27
|
* then uses AI to produce a PR split plan saved to the database.
|
|
28
28
|
* Human review is expected before running the pr-execution phase.
|
|
29
29
|
*/
|
|
30
30
|
// eslint-disable-next-line complexity
|
|
31
|
-
export const
|
|
32
|
-
const {
|
|
31
|
+
export const splitIssueIntoPRs = async (options, config) => {
|
|
32
|
+
const { issueId, verbose, replaceExisting } = options;
|
|
33
33
|
if (verbose) {
|
|
34
|
-
logInfo(`Starting PR splitting for
|
|
34
|
+
logInfo(`Starting PR splitting for issue ID: ${issueId}`);
|
|
35
35
|
}
|
|
36
36
|
try {
|
|
37
37
|
// Log phase start
|
|
38
|
-
await
|
|
39
|
-
|
|
38
|
+
await logIssuePhaseEvent({
|
|
39
|
+
issueId,
|
|
40
40
|
eventType: 'phase_started',
|
|
41
41
|
phase: 'pr_splitting',
|
|
42
42
|
result: 'info',
|
|
@@ -45,19 +45,19 @@ export const splitFeatureIntoPRs = async (options, config) => {
|
|
|
45
45
|
timestamp: new Date().toISOString(),
|
|
46
46
|
},
|
|
47
47
|
}, verbose);
|
|
48
|
-
// Fetch context (includes git diff from dev/{
|
|
49
|
-
const context = await fetchPRSplittingContext(
|
|
48
|
+
// Fetch context (includes git diff from dev/{issueId} vs main)
|
|
49
|
+
const context = await fetchPRSplittingContext(issueId, verbose, replaceExisting);
|
|
50
50
|
if (context.changedFiles.length === 0) {
|
|
51
51
|
if (verbose) {
|
|
52
52
|
logInfo('No code changes detected between dev branch and main.');
|
|
53
53
|
}
|
|
54
|
-
return buildNoChangeResult(
|
|
54
|
+
return buildNoChangeResult(issueId, context.existing_pull_requests.length);
|
|
55
55
|
}
|
|
56
56
|
// Fetch feedbacks for pr-splitting phase
|
|
57
57
|
let feedbacksContext = null;
|
|
58
58
|
let hasFeedbacks = false;
|
|
59
59
|
try {
|
|
60
|
-
feedbacksContext = await getFeedbacksForPhase({
|
|
60
|
+
feedbacksContext = await getFeedbacksForPhase({ issueId, verbose }, 'pr-splitting');
|
|
61
61
|
hasFeedbacks = feedbacksContext.feedbacks.length > 0;
|
|
62
62
|
if (verbose) {
|
|
63
63
|
logInfo(`📋 Feedbacks fetched: ${feedbacksContext.feedbacks.length} feedbacks found`);
|
|
@@ -74,10 +74,10 @@ export const splitFeatureIntoPRs = async (options, config) => {
|
|
|
74
74
|
// Check if existing PRs already planned and no feedback
|
|
75
75
|
if (hasExistingPRs && !hasFeedbacks && !replaceExisting) {
|
|
76
76
|
if (verbose) {
|
|
77
|
-
logInfo(`
|
|
77
|
+
logInfo(`Issue already has ${context.existing_pull_requests.length} PRs planned. No feedbacks to address.`);
|
|
78
78
|
logInfo('Use replaceExisting: true to re-plan.');
|
|
79
79
|
}
|
|
80
|
-
return buildNoChangeResult(
|
|
80
|
+
return buildNoChangeResult(issueId, context.existing_pull_requests.length);
|
|
81
81
|
}
|
|
82
82
|
if (verbose) {
|
|
83
83
|
logInfo('\n📋 PR Splitting Mode:');
|
|
@@ -92,7 +92,7 @@ export const splitFeatureIntoPRs = async (options, config) => {
|
|
|
92
92
|
if (verbose) {
|
|
93
93
|
logInfo(`Clearing ${context.existing_pull_requests.length} existing PRs for full re-plan...`);
|
|
94
94
|
}
|
|
95
|
-
await clearPullRequests({
|
|
95
|
+
await clearPullRequests({ issueId, verbose }, true);
|
|
96
96
|
}
|
|
97
97
|
// ==============================
|
|
98
98
|
// Diff Analysis with AI Agent
|
|
@@ -100,9 +100,9 @@ export const splitFeatureIntoPRs = async (options, config) => {
|
|
|
100
100
|
if (verbose) {
|
|
101
101
|
logInfo('\n🔍 Analyzing code diff with AI...');
|
|
102
102
|
}
|
|
103
|
-
const contextInfo = formatContextForPrompt(context.
|
|
103
|
+
const contextInfo = formatContextForPrompt(context.issue, context.product, context.existing_branches);
|
|
104
104
|
const existingPRsInfo = formatExistingPRsForPrompt(context.existing_pull_requests);
|
|
105
|
-
const systemPrompt = await createPRSplittingSystemPrompt(config,
|
|
105
|
+
const systemPrompt = await createPRSplittingSystemPrompt(config, issueId);
|
|
106
106
|
let userPrompt;
|
|
107
107
|
if (isIncrementalUpdate && feedbacksContext) {
|
|
108
108
|
if (verbose) {
|
|
@@ -114,20 +114,20 @@ export const splitFeatureIntoPRs = async (options, config) => {
|
|
|
114
114
|
const feedbacksInfo = await formatFeedbacksForContext(feedbacksContext);
|
|
115
115
|
const currentPlanInfo = existingPRsInfo || 'No existing PR plan documented.';
|
|
116
116
|
userPrompt = createImprovementPrompt(feedbacksInfo, currentPlanInfo);
|
|
117
|
-
userPrompt = `${userPrompt}\n\n##
|
|
117
|
+
userPrompt = `${userPrompt}\n\n## Issue Context\n\n${contextInfo}`;
|
|
118
118
|
}
|
|
119
119
|
else {
|
|
120
|
-
userPrompt = createPRSplittingPromptWithContext(
|
|
120
|
+
userPrompt = createPRSplittingPromptWithContext(issueId, contextInfo, existingPRsInfo, context.diffStat, context.changedFiles);
|
|
121
121
|
}
|
|
122
122
|
// Execute agent query
|
|
123
123
|
const result = await executeAgentQuery(userPrompt, systemPrompt, config, verbose);
|
|
124
124
|
if (!result || !result.pullRequests || result.pullRequests.length === 0) {
|
|
125
|
-
return buildErrorResult(
|
|
125
|
+
return buildErrorResult(issueId, 'No pull requests were generated');
|
|
126
126
|
}
|
|
127
127
|
// Validate PRs
|
|
128
128
|
const validation = validatePlannedPRs(result.pullRequests);
|
|
129
129
|
if (!validation.valid) {
|
|
130
|
-
return buildErrorResult(
|
|
130
|
+
return buildErrorResult(issueId, `Invalid PR plan: ${validation.errors.join(', ')}`);
|
|
131
131
|
}
|
|
132
132
|
const sortedPRs = sortPRsByDependency(result.pullRequests);
|
|
133
133
|
// Validate and auto-fix import dependency ordering
|
|
@@ -147,7 +147,7 @@ export const splitFeatureIntoPRs = async (options, config) => {
|
|
|
147
147
|
if (verbose) {
|
|
148
148
|
logInfo(`🔄 Clearing existing PRs for incremental update...`);
|
|
149
149
|
}
|
|
150
|
-
await clearPullRequests({
|
|
150
|
+
await clearPullRequests({ issueId, verbose: false }, true);
|
|
151
151
|
}
|
|
152
152
|
// Save PR plan to database
|
|
153
153
|
// Step 1: Create all PRs without base_pr_id (batch)
|
|
@@ -158,7 +158,7 @@ export const splitFeatureIntoPRs = async (options, config) => {
|
|
|
158
158
|
branch_name: pr.branch_name,
|
|
159
159
|
files: pr.files,
|
|
160
160
|
}));
|
|
161
|
-
const createdPRRecords = await createPullRequests({
|
|
161
|
+
const createdPRRecords = await createPullRequests({ issueId, verbose: false }, prInputs);
|
|
162
162
|
// Step 2: Build branch_name → ID map from created records
|
|
163
163
|
const prBranchNameToId = new Map();
|
|
164
164
|
createdPRRecords.forEach((createdPR) => {
|
|
@@ -181,8 +181,8 @@ export const splitFeatureIntoPRs = async (options, config) => {
|
|
|
181
181
|
logInfo(`\n📝 Saved ${createdPRRecords.length} PR records to database. Awaiting human review before execution.`);
|
|
182
182
|
}
|
|
183
183
|
// Log phase completion
|
|
184
|
-
await
|
|
185
|
-
|
|
184
|
+
await logIssuePhaseEvent({
|
|
185
|
+
issueId,
|
|
186
186
|
eventType: 'phase_completed',
|
|
187
187
|
phase: 'pr_splitting',
|
|
188
188
|
result: 'success',
|
|
@@ -195,14 +195,14 @@ export const splitFeatureIntoPRs = async (options, config) => {
|
|
|
195
195
|
timestamp: new Date().toISOString(),
|
|
196
196
|
},
|
|
197
197
|
}, verbose);
|
|
198
|
-
return buildSuccessResult(
|
|
199
|
-
`Split
|
|
198
|
+
return buildSuccessResult(issueId, finalPRs, result.summary ||
|
|
199
|
+
`Split issue into ${finalPRs.length} pull requests for review`, result.rationale);
|
|
200
200
|
}
|
|
201
201
|
catch (error) {
|
|
202
202
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
203
203
|
logError(`PR splitting failed: ${errorMessage}`);
|
|
204
|
-
await
|
|
205
|
-
|
|
204
|
+
await logIssuePhaseEvent({
|
|
205
|
+
issueId,
|
|
206
206
|
eventType: 'phase_failed',
|
|
207
207
|
phase: 'pr_splitting',
|
|
208
208
|
result: 'error',
|
|
@@ -211,7 +211,7 @@ export const splitFeatureIntoPRs = async (options, config) => {
|
|
|
211
211
|
timestamp: new Date().toISOString(),
|
|
212
212
|
},
|
|
213
213
|
}, verbose);
|
|
214
|
-
return buildErrorResult(
|
|
214
|
+
return buildErrorResult(issueId, errorMessage);
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
/**
|
|
@@ -2,15 +2,15 @@ import { type PlannedPullRequest, type PRSplittingResult } from './index.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Build a successful PR splitting result
|
|
4
4
|
*/
|
|
5
|
-
export declare function buildSuccessResult(
|
|
5
|
+
export declare function buildSuccessResult(issueId: string, pullRequests: PlannedPullRequest[], summary: string, rationale?: string): PRSplittingResult;
|
|
6
6
|
/**
|
|
7
7
|
* Build an error result
|
|
8
8
|
*/
|
|
9
|
-
export declare function buildErrorResult(
|
|
9
|
+
export declare function buildErrorResult(issueId: string, errorMessage: string): PRSplittingResult;
|
|
10
10
|
/**
|
|
11
11
|
* Build a result when no changes are needed
|
|
12
12
|
*/
|
|
13
|
-
export declare function buildNoChangeResult(
|
|
13
|
+
export declare function buildNoChangeResult(issueId: string, existingPRCount: number): PRSplittingResult;
|
|
14
14
|
/**
|
|
15
15
|
* Validate planned pull requests
|
|
16
16
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Build a successful PR splitting result
|
|
3
3
|
*/
|
|
4
|
-
export function buildSuccessResult(
|
|
4
|
+
export function buildSuccessResult(issueId, pullRequests, summary, rationale) {
|
|
5
5
|
return {
|
|
6
|
-
|
|
6
|
+
issueId,
|
|
7
7
|
pullRequests,
|
|
8
8
|
status: 'success',
|
|
9
9
|
summary,
|
|
@@ -13,9 +13,9 @@ export function buildSuccessResult(featureId, pullRequests, summary, rationale)
|
|
|
13
13
|
/**
|
|
14
14
|
* Build an error result
|
|
15
15
|
*/
|
|
16
|
-
export function buildErrorResult(
|
|
16
|
+
export function buildErrorResult(issueId, errorMessage) {
|
|
17
17
|
return {
|
|
18
|
-
|
|
18
|
+
issueId,
|
|
19
19
|
pullRequests: [],
|
|
20
20
|
status: 'error',
|
|
21
21
|
summary: `PR splitting failed: ${errorMessage}`,
|
|
@@ -24,12 +24,12 @@ export function buildErrorResult(featureId, errorMessage) {
|
|
|
24
24
|
/**
|
|
25
25
|
* Build a result when no changes are needed
|
|
26
26
|
*/
|
|
27
|
-
export function buildNoChangeResult(
|
|
27
|
+
export function buildNoChangeResult(issueId, existingPRCount) {
|
|
28
28
|
return {
|
|
29
|
-
|
|
29
|
+
issueId,
|
|
30
30
|
pullRequests: [],
|
|
31
31
|
status: 'success',
|
|
32
|
-
summary: `
|
|
32
|
+
summary: `Issue already has ${existingPRCount} pull requests planned. No changes needed.`,
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
@@ -2,15 +2,15 @@ import { type EdsgerConfig } from '../../types/index.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Create the system prompt for PR splitting: Diff analysis and PR planning
|
|
4
4
|
*/
|
|
5
|
-
export declare function createPRSplittingSystemPrompt(config: EdsgerConfig,
|
|
5
|
+
export declare function createPRSplittingSystemPrompt(config: EdsgerConfig, issueId: string, projectDir?: string): Promise<string>;
|
|
6
6
|
/**
|
|
7
7
|
* Create the user prompt with diff context for PR splitting
|
|
8
8
|
*/
|
|
9
|
-
export declare function createPRSplittingPromptWithContext(
|
|
9
|
+
export declare function createPRSplittingPromptWithContext(issueId: string, contextInfo: string, existingPRsInfo: string, diffStat: string, changedFiles: string[]): string;
|
|
10
10
|
/**
|
|
11
11
|
* Format the context information for the prompt
|
|
12
12
|
*/
|
|
13
|
-
export declare function formatContextForPrompt(
|
|
13
|
+
export declare function formatContextForPrompt(issue: {
|
|
14
14
|
name: string;
|
|
15
15
|
description?: string | null;
|
|
16
16
|
technical_design?: string | null;
|
|
@@ -3,7 +3,7 @@ import { OUTPUT_CONTRACTS } from '../output-contracts.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Create the system prompt for PR splitting: Diff analysis and PR planning
|
|
5
5
|
*/
|
|
6
|
-
export async function createPRSplittingSystemPrompt(config,
|
|
6
|
+
export async function createPRSplittingSystemPrompt(config, issueId, projectDir) {
|
|
7
7
|
const skill = await resolveSkill('phase/pr-splitting', {
|
|
8
8
|
projectDir,
|
|
9
9
|
});
|
|
@@ -13,19 +13,19 @@ export async function createPRSplittingSystemPrompt(config, featureId, projectDi
|
|
|
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['pr-splitting']}`;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Create the user prompt with diff context for PR splitting
|
|
22
22
|
*/
|
|
23
|
-
export function createPRSplittingPromptWithContext(
|
|
23
|
+
export function createPRSplittingPromptWithContext(issueId, contextInfo, existingPRsInfo, diffStat, changedFiles) {
|
|
24
24
|
let prompt = `# PR Splitting Task
|
|
25
25
|
|
|
26
|
-
Please analyze the actual code changes on the \`dev/${
|
|
26
|
+
Please analyze the actual code changes on the \`dev/${issueId}\` branch and create a plan to split them into multiple smaller PRs for review.
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Issue Context
|
|
29
29
|
|
|
30
30
|
${contextInfo}
|
|
31
31
|
|
|
@@ -51,7 +51,7 @@ ${existingPRsInfo}
|
|
|
51
51
|
}
|
|
52
52
|
prompt += `## Your Task
|
|
53
53
|
|
|
54
|
-
1. **Examine the actual diff**: Run \`git diff main...dev/${
|
|
54
|
+
1. **Examine the actual diff**: Run \`git diff main...dev/${issueId}\` or targeted diffs for specific files to understand what changed
|
|
55
55
|
2. **Identify logical groupings**: Find files that change together for the same reason, considering module boundaries
|
|
56
56
|
3. **Determine dependencies**: Figure out which groups must be merged first
|
|
57
57
|
4. **Create PR plan**: Define PRs with clear scope, file assignments, and acceptance criteria
|
|
@@ -66,20 +66,20 @@ ${existingPRsInfo}
|
|
|
66
66
|
/**
|
|
67
67
|
* Format the context information for the prompt
|
|
68
68
|
*/
|
|
69
|
-
export function formatContextForPrompt(
|
|
70
|
-
let context = `###
|
|
69
|
+
export function formatContextForPrompt(issue, product, branches) {
|
|
70
|
+
let context = `### Issue: ${issue.name}
|
|
71
71
|
|
|
72
|
-
${
|
|
72
|
+
${issue.description || 'No description provided'}
|
|
73
73
|
|
|
74
74
|
### Product: ${product.name}
|
|
75
75
|
|
|
76
76
|
${product.description || 'No description provided'}
|
|
77
77
|
|
|
78
78
|
`;
|
|
79
|
-
if (
|
|
79
|
+
if (issue.technical_design) {
|
|
80
80
|
context += `### Technical Design
|
|
81
81
|
|
|
82
|
-
${
|
|
82
|
+
${issue.technical_design}
|
|
83
83
|
|
|
84
84
|
`;
|
|
85
85
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pull Request Creator for the development workflow
|
|
3
|
-
* Creates pull requests from
|
|
3
|
+
* Creates pull requests from issue branches after successful testing
|
|
4
4
|
*/
|
|
5
5
|
export interface PullRequestConfig {
|
|
6
6
|
readonly githubToken: string;
|
|
@@ -9,7 +9,7 @@ export interface PullRequestConfig {
|
|
|
9
9
|
readonly baseBranch?: string;
|
|
10
10
|
readonly verbose?: boolean;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface IssueInfo {
|
|
13
13
|
readonly id: string;
|
|
14
14
|
readonly name: string;
|
|
15
15
|
readonly description: string;
|
|
@@ -25,6 +25,6 @@ export interface PullRequestResult {
|
|
|
25
25
|
readonly error?: string;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* Create a pull request for the
|
|
28
|
+
* Create a pull request for the issue
|
|
29
29
|
*/
|
|
30
|
-
export declare function createPullRequest(config: PullRequestConfig,
|
|
30
|
+
export declare function createPullRequest(config: PullRequestConfig, issue: IssueInfo): Promise<PullRequestResult>;
|