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,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
|
import { Octokit } from '@octokit/rest';
|
|
6
6
|
import { execFileSync, execSync } from 'child_process';
|
|
@@ -9,7 +9,7 @@ import { logDebug } from '../../utils/logger.js';
|
|
|
9
9
|
// GitHub PR title best practice: keep under 72 characters
|
|
10
10
|
const MAX_PR_TITLE_LENGTH = 72;
|
|
11
11
|
const PR_TITLE_PREFIX = 'feat: ';
|
|
12
|
-
const
|
|
12
|
+
const MAX_ISSUE_NAME_LENGTH = MAX_PR_TITLE_LENGTH - PR_TITLE_PREFIX.length;
|
|
13
13
|
/**
|
|
14
14
|
* Truncate text to a maximum length, adding ellipsis if truncated
|
|
15
15
|
*/
|
|
@@ -123,14 +123,14 @@ const switchToMainBranch = (mainBranch = 'main', verbose) => {
|
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
125
|
/**
|
|
126
|
-
* Generate pull request title from
|
|
126
|
+
* Generate pull request title from issue name
|
|
127
127
|
* Truncates to keep under 72 characters (GitHub best practice)
|
|
128
128
|
*/
|
|
129
|
-
const generatePRTitle = (
|
|
130
|
-
// Remove
|
|
131
|
-
const cleanName =
|
|
129
|
+
const generatePRTitle = (issueName) => {
|
|
130
|
+
// Remove issue ID prefix if present (e.g., "FEAT-123: Issue Name" -> "Issue Name")
|
|
131
|
+
const cleanName = issueName.replace(/^[A-Z]+-\d+:\s*/, '');
|
|
132
132
|
// Truncate to keep total title under 72 chars
|
|
133
|
-
const truncatedName = truncateText(cleanName.toLowerCase(),
|
|
133
|
+
const truncatedName = truncateText(cleanName.toLowerCase(), MAX_ISSUE_NAME_LENGTH);
|
|
134
134
|
return `${PR_TITLE_PREFIX}${truncatedName}`;
|
|
135
135
|
};
|
|
136
136
|
const findExistingPullRequest = async (opts) => {
|
|
@@ -162,55 +162,55 @@ const findExistingPullRequest = async (opts) => {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
/**
|
|
165
|
-
* Generate pull request body with
|
|
165
|
+
* Generate pull request body with issue details
|
|
166
166
|
*/
|
|
167
|
-
const generatePRBody = (
|
|
167
|
+
const generatePRBody = (issue) => {
|
|
168
168
|
const sections = [];
|
|
169
|
-
//
|
|
169
|
+
// Issue URL section
|
|
170
170
|
const appUrl = process.env.NEXTAUTH_URL || process.env.APP_URL || 'http://localhost:3000';
|
|
171
|
-
if (
|
|
172
|
-
sections.push('##
|
|
173
|
-
sections.push(`📋 [View
|
|
171
|
+
if (issue.productId) {
|
|
172
|
+
sections.push('## Issue Details');
|
|
173
|
+
sections.push(`📋 [View Issue Details](${appUrl}/products/${issue.productId}/issues/${issue.id})`);
|
|
174
174
|
sections.push('');
|
|
175
175
|
}
|
|
176
176
|
// Test Report section (if available)
|
|
177
|
-
if (
|
|
177
|
+
if (issue.testReportUrl) {
|
|
178
178
|
sections.push('## Test Report');
|
|
179
|
-
sections.push(`🧪 [View Detailed Test Report](${
|
|
179
|
+
sections.push(`🧪 [View Detailed Test Report](${issue.testReportUrl})`);
|
|
180
180
|
sections.push('');
|
|
181
181
|
}
|
|
182
182
|
// Metadata
|
|
183
183
|
sections.push('---');
|
|
184
|
-
sections.push(`
|
|
184
|
+
sections.push(`Issue ID: ${issue.id}`);
|
|
185
185
|
sections.push(`Created by: Automated Workflow`);
|
|
186
186
|
return sections.join('\n');
|
|
187
187
|
};
|
|
188
188
|
/**
|
|
189
|
-
* Create a pull request for the
|
|
189
|
+
* Create a pull request for the issue
|
|
190
190
|
*/
|
|
191
|
-
export async function createPullRequest(config,
|
|
191
|
+
export async function createPullRequest(config, issue) {
|
|
192
192
|
const { githubToken, owner, repo, baseBranch = 'main', verbose } = config;
|
|
193
193
|
try {
|
|
194
194
|
// Initialize Octokit with personal access token
|
|
195
195
|
const octokit = new Octokit({
|
|
196
196
|
auth: githubToken,
|
|
197
197
|
});
|
|
198
|
-
// Get current branch (should be dev/
|
|
198
|
+
// Get current branch (should be dev/issue-id)
|
|
199
199
|
let currentBranch = getCurrentBranch();
|
|
200
200
|
logDebug(`Current branch: ${currentBranch}`, verbose);
|
|
201
201
|
// If we're on the base branch, switch to dev branch (should already exist)
|
|
202
202
|
// Default behavior now checks remote if not found locally (multi-clone scenario)
|
|
203
203
|
if (currentBranch === baseBranch) {
|
|
204
|
-
const devBranch = `dev/${
|
|
204
|
+
const devBranch = `dev/${issue.id}`;
|
|
205
205
|
logDebug(`Currently on ${baseBranch} branch, switching to ${devBranch}`, verbose);
|
|
206
206
|
switchToBranch(devBranch, verbose, githubToken);
|
|
207
207
|
currentBranch = devBranch;
|
|
208
208
|
}
|
|
209
|
-
// Extract
|
|
209
|
+
// Extract issue ID from current branch (dev/issue-id)
|
|
210
210
|
let targetBranch = baseBranch;
|
|
211
211
|
if (currentBranch.startsWith('dev/')) {
|
|
212
|
-
const
|
|
213
|
-
targetBranch = `feat/${
|
|
212
|
+
const issueId = currentBranch.replace('dev/', '');
|
|
213
|
+
targetBranch = `feat/${issueId}`;
|
|
214
214
|
// Create the feat/ branch from base branch (main)
|
|
215
215
|
logDebug(`Creating target branch: ${targetBranch} from ${baseBranch}`, verbose);
|
|
216
216
|
try {
|
|
@@ -259,8 +259,8 @@ export async function createPullRequest(config, feature) {
|
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
// Generate PR title and body
|
|
262
|
-
const title = generatePRTitle(
|
|
263
|
-
const body = generatePRBody(
|
|
262
|
+
const title = generatePRTitle(issue.name);
|
|
263
|
+
const body = generatePRBody(issue);
|
|
264
264
|
// Check if PR already exists
|
|
265
265
|
const existingPR = await findExistingPullRequest({
|
|
266
266
|
octokit,
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { type PipelineResult } from '../../types/pipeline.js';
|
|
5
5
|
export interface PullRequestHandlerOptions {
|
|
6
|
-
|
|
6
|
+
issueId: string;
|
|
7
7
|
results: readonly PipelineResult[];
|
|
8
8
|
testingResult?: PipelineResult;
|
|
9
9
|
verbose?: boolean;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Create pull request for successful
|
|
12
|
+
* Create pull request for successful issue implementation
|
|
13
13
|
* Returns true if PR was successfully created, false otherwise
|
|
14
14
|
*/
|
|
15
|
-
export declare function handlePullRequestCreation({
|
|
15
|
+
export declare function handlePullRequestCreation({ issueId, results, testingResult, verbose, }: PullRequestHandlerOptions): Promise<boolean>;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pull request creation handler for pipeline execution
|
|
3
3
|
*/
|
|
4
|
-
import { getFeature } from '../../api/features/index.js';
|
|
5
4
|
import { getGitHubConfig } from '../../api/github.js';
|
|
5
|
+
import { getIssue } from '../../api/issues/index.js';
|
|
6
6
|
import { getCurrentBranch, updateBranch, } from '../../services/branches.js';
|
|
7
7
|
import { logDebug } from '../../utils/logger.js';
|
|
8
8
|
import { createPullRequest } from './creator.js';
|
|
9
9
|
/**
|
|
10
|
-
* Create pull request for successful
|
|
10
|
+
* Create pull request for successful issue implementation
|
|
11
11
|
* Returns true if PR was successfully created, false otherwise
|
|
12
12
|
*/
|
|
13
13
|
// eslint-disable-next-line complexity -- orchestration function with branch detection, PR creation, and status updates
|
|
14
|
-
export async function handlePullRequestCreation({
|
|
15
|
-
logDebug('Creating pull request for successful
|
|
16
|
-
// Get
|
|
17
|
-
const
|
|
18
|
-
if (!
|
|
19
|
-
logDebug('Could not fetch
|
|
14
|
+
export async function handlePullRequestCreation({ issueId, results, testingResult, verbose, }) {
|
|
15
|
+
logDebug('Creating pull request for successful issue...', verbose);
|
|
16
|
+
// Get issue details for PR creation
|
|
17
|
+
const issue = await getIssue(issueId, verbose);
|
|
18
|
+
if (!issue) {
|
|
19
|
+
logDebug('Could not fetch issue details for pull request creation', verbose);
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
22
|
-
// Get current branch for the
|
|
22
|
+
// Get current branch for the issue
|
|
23
23
|
let currentBranch = null;
|
|
24
24
|
try {
|
|
25
|
-
currentBranch = await getCurrentBranch({
|
|
25
|
+
currentBranch = await getCurrentBranch({ issueId, verbose });
|
|
26
26
|
}
|
|
27
27
|
catch (error) {
|
|
28
|
-
logDebug(`Could not fetch branch for
|
|
28
|
+
logDebug(`Could not fetch branch for issue: ${error}`, verbose);
|
|
29
29
|
}
|
|
30
30
|
// Check if PR already exists on the branch
|
|
31
31
|
if (currentBranch?.pull_request_url) {
|
|
@@ -34,7 +34,7 @@ export async function handlePullRequestCreation({ featureId, results, testingRes
|
|
|
34
34
|
return true;
|
|
35
35
|
}
|
|
36
36
|
// Get GitHub configuration from product developer settings
|
|
37
|
-
const githubConfig = await getGitHubConfig(
|
|
37
|
+
const githubConfig = await getGitHubConfig(issueId, verbose);
|
|
38
38
|
if (!githubConfig.configured ||
|
|
39
39
|
!githubConfig.token ||
|
|
40
40
|
!githubConfig.owner ||
|
|
@@ -52,10 +52,10 @@ export async function handlePullRequestCreation({ featureId, results, testingRes
|
|
|
52
52
|
baseBranch: 'main',
|
|
53
53
|
verbose,
|
|
54
54
|
}, {
|
|
55
|
-
id:
|
|
56
|
-
name:
|
|
57
|
-
description:
|
|
58
|
-
productId:
|
|
55
|
+
id: issue.id,
|
|
56
|
+
name: issue.name,
|
|
57
|
+
description: issue.description || '',
|
|
58
|
+
productId: issue.product_id,
|
|
59
59
|
// Get technical design and test result from previous phases (if available)
|
|
60
60
|
technicalDesign: results.find((r) => r.phase === 'technical-design')?.data?.technicalDesign,
|
|
61
61
|
testResult: testingResult
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { getGitHubConfigByProduct } from '../../api/github.js';
|
|
9
9
|
import { getReleaseByTag, upsertRelease, } from '../../api/releases.js';
|
|
10
10
|
import { logInfo, logSuccess, logWarning } from '../../utils/logger.js';
|
|
11
|
-
import {
|
|
11
|
+
import { cloneIssueRepo, ensureWorkspaceDir, syncRepoToRef, } from '../../workspace/workspace-manager.js';
|
|
12
12
|
import { fetchLatestTwoReleases, getDefaultBranchHead, } from './github.js';
|
|
13
13
|
import { detectSnapshotVersion, isPlausibleSnapshotTag } from './snapshot.js';
|
|
14
14
|
/**
|
|
@@ -95,7 +95,7 @@ export async function runReleaseSync(options, _config) {
|
|
|
95
95
|
let cwd;
|
|
96
96
|
try {
|
|
97
97
|
const workspaceRoot = ensureWorkspaceDir();
|
|
98
|
-
const { repoPath } =
|
|
98
|
+
const { repoPath } = cloneIssueRepo(workspaceRoot, `release-sync-${productId}`, gh.owner, gh.repo, gh.token);
|
|
99
99
|
cwd = repoPath;
|
|
100
100
|
}
|
|
101
101
|
catch (err) {
|
|
@@ -34,7 +34,7 @@ Bash safety rules (strict):
|
|
|
34
34
|
Output rules:
|
|
35
35
|
1. Output ONLY the final run-sheet Markdown. No preamble ("Here is..."), no trailing commentary, no wrapping code fence around the whole document.
|
|
36
36
|
2. Follow the structure of the TEMPLATE exactly — same section headings in the same order. If the template is free-form prose, infer sensible sections from it.
|
|
37
|
-
3. Ground every claim in the repo. Do not invent
|
|
37
|
+
3. Ground every claim in the repo. Do not invent issues, APIs, or risks that are not evidenced by the diff or code.
|
|
38
38
|
4. If the release is marked DRAFT, include a short "Draft" note near the top explaining the tag is not yet cut.
|
|
39
39
|
5. Prefer concise bullet points over long paragraphs for actionable items. Aim for under 600 lines of Markdown total — be specific, not exhaustive.
|
|
40
40
|
6. If the diff is empty or there is no previous ref to compare against, state that plainly rather than fabricating content.`;
|
|
@@ -96,7 +96,6 @@ function summariseToolUse(name, input, turn) {
|
|
|
96
96
|
const desc = typeof descRaw === 'string' ? descRaw : 'Running...';
|
|
97
97
|
return `[Turn ${turn}] ${name}: ${desc.slice(0, 160)}`;
|
|
98
98
|
}
|
|
99
|
-
// eslint-disable-next-line complexity -- agent loop with message type handling
|
|
100
99
|
export async function generateRunSheetWithAgent(input) {
|
|
101
100
|
const { repoDir } = input;
|
|
102
101
|
let assistantText = '';
|
|
@@ -18,7 +18,7 @@ import { getProduct } from '../../api/products.js';
|
|
|
18
18
|
import { getRelease } from '../../api/releases.js';
|
|
19
19
|
import { getRunSheetByRelease, upsertRunSheet, } from '../../api/run-sheets.js';
|
|
20
20
|
import { logError, logInfo, logSuccess, logWarning, } from '../../utils/logger.js';
|
|
21
|
-
import {
|
|
21
|
+
import { cloneIssueRepo, ensureWorkspaceDir, getIssueRepoPath, isSafeGitRef, syncRepoToRef, } from '../../workspace/workspace-manager.js';
|
|
22
22
|
import { getDefaultBranchHead } from '../release-sync/github.js';
|
|
23
23
|
import { generateRunSheetWithAgent } from './agent.js';
|
|
24
24
|
// Stale locks (e.g. left behind by a crashed or SIGKILLed CLI) are
|
|
@@ -261,7 +261,7 @@ export async function runRunSheet(options) {
|
|
|
261
261
|
logInfo(`Pruned ${pruned.removed.length} stale run-sheet workspace(s).`);
|
|
262
262
|
}
|
|
263
263
|
const workspaceName = `run-sheet-${release.id}`;
|
|
264
|
-
const repoPathAhead =
|
|
264
|
+
const repoPathAhead = getIssueRepoPath(workspaceRoot, workspaceName);
|
|
265
265
|
lockPath = `${repoPathAhead}.lock`;
|
|
266
266
|
if (!tryAcquireFileLock(lockPath)) {
|
|
267
267
|
return {
|
|
@@ -272,7 +272,7 @@ export async function runRunSheet(options) {
|
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
try {
|
|
275
|
-
const { repoPath } =
|
|
275
|
+
const { repoPath } = cloneIssueRepo(workspaceRoot, workspaceName, owner, repo, token);
|
|
276
276
|
repoDir = repoPath;
|
|
277
277
|
// SNAPSHOT releases have no GitHub release object backing them, so
|
|
278
278
|
// `published_at` is null. Use that as a free local signal to skip
|
|
@@ -10,7 +10,7 @@ import { getProduct } from '../../api/products.js';
|
|
|
10
10
|
import { clearReleaseTestCases, createReleaseTestCases, } from '../../api/release-test-cases.js';
|
|
11
11
|
import { getRelease, updateRelease } from '../../api/releases.js';
|
|
12
12
|
import { logError, logInfo, logSuccess, logWarning, } from '../../utils/logger.js';
|
|
13
|
-
import {
|
|
13
|
+
import { cloneIssueRepo, ensureWorkspaceDir, syncRepoToRef, } from '../../workspace/workspace-manager.js';
|
|
14
14
|
import { buildDiffDigest, fetchCompare, getDefaultBranchHead, summariseStats, } from '../release-sync/github.js';
|
|
15
15
|
import { executeSmokeTestQuery } from './agent.js';
|
|
16
16
|
import { buildSmokeTestUserPrompt, createSmokeTestSystemPrompt, } from './prompts.js';
|
|
@@ -104,7 +104,7 @@ async function runSmokeTestInner(ctx) {
|
|
|
104
104
|
let cwd;
|
|
105
105
|
try {
|
|
106
106
|
const workspaceRoot = ensureWorkspaceDir();
|
|
107
|
-
const { repoPath } =
|
|
107
|
+
const { repoPath } = cloneIssueRepo(workspaceRoot, `release-${release.product_id}`, ghResolved.owner, ghResolved.repo, ghResolved.token);
|
|
108
108
|
cwd = repoPath;
|
|
109
109
|
}
|
|
110
110
|
catch (err) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ProductInfo } from '../../api/products.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { IssueInfo, TestCase, UserStory } from '../../types/issues.js';
|
|
3
3
|
export interface TechnicalDesignContext {
|
|
4
|
-
|
|
4
|
+
issue: IssueInfo;
|
|
5
5
|
product: ProductInfo;
|
|
6
6
|
user_stories: UserStory[];
|
|
7
7
|
test_cases: TestCase[];
|
|
@@ -9,4 +9,4 @@ export interface TechnicalDesignContext {
|
|
|
9
9
|
/**
|
|
10
10
|
* Fetch all technical design context information via MCP endpoints
|
|
11
11
|
*/
|
|
12
|
-
export declare function fetchTechnicalDesignContext(
|
|
12
|
+
export declare function fetchTechnicalDesignContext(issueId: string, verbose?: boolean): Promise<TechnicalDesignContext>;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getIssue, getTestCases, getUserStories, } from '../../api/issues/index.js';
|
|
2
2
|
import { getProduct } from '../../api/products.js';
|
|
3
3
|
import { logError, logInfo } from '../../utils/logger.js';
|
|
4
4
|
/**
|
|
5
5
|
* Fetch all technical design context information via MCP endpoints
|
|
6
6
|
*/
|
|
7
|
-
export async function fetchTechnicalDesignContext(
|
|
7
|
+
export async function fetchTechnicalDesignContext(issueId, verbose) {
|
|
8
8
|
try {
|
|
9
9
|
if (verbose) {
|
|
10
|
-
logInfo(`Fetching complete technical design context for
|
|
10
|
+
logInfo(`Fetching complete technical design context for issue: ${issueId}`);
|
|
11
11
|
}
|
|
12
12
|
// Fetch all required data in parallel for better performance
|
|
13
|
-
const [
|
|
14
|
-
|
|
15
|
-
getUserStories(
|
|
16
|
-
getTestCases(
|
|
13
|
+
const [issue, userStories, testCases] = await Promise.all([
|
|
14
|
+
getIssue(issueId, verbose),
|
|
15
|
+
getUserStories(issueId, verbose),
|
|
16
|
+
getTestCases(issueId, verbose),
|
|
17
17
|
]);
|
|
18
|
-
const product = await getProduct(
|
|
18
|
+
const product = await getProduct(issue.product_id, verbose);
|
|
19
19
|
if (verbose) {
|
|
20
20
|
logInfo(`✅ Technical design context fetched successfully:`);
|
|
21
|
-
logInfo(`
|
|
21
|
+
logInfo(` Issue: ${issue.name}`);
|
|
22
22
|
logInfo(` Product: ${product.name}`);
|
|
23
23
|
logInfo(` User Stories: ${userStories.length}`);
|
|
24
24
|
logInfo(` Test Cases: ${testCases.length} (${testCases.filter((tc) => tc.is_critical).length} critical)`);
|
|
25
|
-
logInfo(` Existing Technical Design: ${
|
|
25
|
+
logInfo(` Existing Technical Design: ${issue.technical_design ? 'Yes' : 'No'}`);
|
|
26
26
|
}
|
|
27
27
|
return {
|
|
28
|
-
|
|
28
|
+
issue,
|
|
29
29
|
product,
|
|
30
30
|
user_stories: userStories,
|
|
31
31
|
test_cases: testCases,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type ChecklistPhaseContext } from '../../services/checklist.js';
|
|
2
2
|
import { type ChecklistItemResult, type EdsgerConfig, type VerificationResult } from '../../types/index.js';
|
|
3
3
|
export interface TechnicalDesignOptions {
|
|
4
|
-
|
|
4
|
+
issueId: string;
|
|
5
5
|
verbose?: boolean;
|
|
6
6
|
maxVerificationIterations?: number;
|
|
7
7
|
}
|
|
8
8
|
export interface TechnicalDesignResult {
|
|
9
|
-
|
|
9
|
+
issueId: string;
|
|
10
10
|
technicalDesign: string | null;
|
|
11
11
|
status: 'success' | 'error';
|
|
12
12
|
summary: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
2
|
-
import { updateTechnicalDesign } from '../../api/
|
|
2
|
+
import { updateTechnicalDesign } from '../../api/issues/index.js';
|
|
3
3
|
import { DEFAULT_MODEL } from '../../constants.js';
|
|
4
|
-
import {
|
|
4
|
+
import { logIssuePhaseEvent } from '../../services/audit-logs.js';
|
|
5
5
|
import { formatChecklistsForContext, } from '../../services/checklist.js';
|
|
6
6
|
import { extractChecklistItems, runPhaseCoaching, } from '../../services/coaching/index.js';
|
|
7
7
|
import { formatFeedbacksForContext, getFeedbacksForPhase, } from '../../services/feedbacks.js';
|
|
@@ -26,14 +26,14 @@ async function* prompt(analysisPrompt) {
|
|
|
26
26
|
}
|
|
27
27
|
// eslint-disable-next-line complexity
|
|
28
28
|
export const generateTechnicalDesign = async (options, config, checklistContext) => {
|
|
29
|
-
const {
|
|
29
|
+
const { issueId, verbose } = options;
|
|
30
30
|
if (verbose) {
|
|
31
|
-
logInfo(`Starting technical design generation for
|
|
31
|
+
logInfo(`Starting technical design generation for issue ID: ${issueId}`);
|
|
32
32
|
}
|
|
33
33
|
try {
|
|
34
34
|
// Fetch and prepare context
|
|
35
|
-
const context = await prepareDesignContext(
|
|
36
|
-
const systemPrompt = await createTechnicalDesignSystemPrompt(config,
|
|
35
|
+
const context = await prepareDesignContext(issueId, checklistContext, verbose);
|
|
36
|
+
const systemPrompt = await createTechnicalDesignSystemPrompt(config, issueId);
|
|
37
37
|
const initialDesignPrompt = context.designPrompt;
|
|
38
38
|
const maxIterations = options.maxVerificationIterations || 10;
|
|
39
39
|
let currentIteration = 0;
|
|
@@ -53,8 +53,8 @@ export const generateTechnicalDesign = async (options, config, checklistContext)
|
|
|
53
53
|
}
|
|
54
54
|
// Log iteration start (for iterations after the first)
|
|
55
55
|
if (currentIteration > 1) {
|
|
56
|
-
await
|
|
57
|
-
|
|
56
|
+
await logIssuePhaseEvent({
|
|
57
|
+
issueId,
|
|
58
58
|
eventType: 'phase_started',
|
|
59
59
|
phase: 'technical_design',
|
|
60
60
|
result: 'info',
|
|
@@ -80,8 +80,8 @@ export const generateTechnicalDesign = async (options, config, checklistContext)
|
|
|
80
80
|
// Update with new design result
|
|
81
81
|
structuredDesignResult = queryResult.data;
|
|
82
82
|
// Log design completion for this iteration
|
|
83
|
-
await
|
|
84
|
-
|
|
83
|
+
await logIssuePhaseEvent({
|
|
84
|
+
issueId,
|
|
85
85
|
eventType: 'phase_completed',
|
|
86
86
|
phase: 'technical_design',
|
|
87
87
|
result: 'success',
|
|
@@ -97,10 +97,10 @@ export const generateTechnicalDesign = async (options, config, checklistContext)
|
|
|
97
97
|
if (verbose) {
|
|
98
98
|
logInfo(`💾 Saving technical design (iteration ${currentIteration})...`);
|
|
99
99
|
}
|
|
100
|
-
await updateTechnicalDesign(
|
|
100
|
+
await updateTechnicalDesign(issueId, structuredDesignResult.technical_design, verbose);
|
|
101
101
|
// Coaching loop: self-rate → coach → improve → repeat (between execute and verify)
|
|
102
102
|
const coaching = await runPhaseCoaching({
|
|
103
|
-
|
|
103
|
+
issueId,
|
|
104
104
|
phase: 'technical_design',
|
|
105
105
|
phaseResult: { execution_session_id: executionSessionId },
|
|
106
106
|
checklistItems: extractChecklistItems(checklistContext),
|
|
@@ -114,7 +114,7 @@ export const generateTechnicalDesign = async (options, config, checklistContext)
|
|
|
114
114
|
if (design && typeof design === 'string') {
|
|
115
115
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
116
116
|
structuredDesignResult.technical_design = design;
|
|
117
|
-
await updateTechnicalDesign(
|
|
117
|
+
await updateTechnicalDesign(issueId, design, verbose);
|
|
118
118
|
}
|
|
119
119
|
else {
|
|
120
120
|
logError('Coaching improvement response missing technical_design field. Keeping previous design.');
|
|
@@ -132,9 +132,9 @@ export const generateTechnicalDesign = async (options, config, checklistContext)
|
|
|
132
132
|
technicalDesign: structuredDesignResult.technical_design,
|
|
133
133
|
checklistContext: checklistContext || null,
|
|
134
134
|
feedbacksContext: context.feedbacksContext,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
issueId,
|
|
136
|
+
issueName: context.issueName,
|
|
137
|
+
issueDescription: context.issueDescription,
|
|
138
138
|
config,
|
|
139
139
|
currentIteration,
|
|
140
140
|
maxIterations,
|
|
@@ -174,7 +174,7 @@ export const generateTechnicalDesign = async (options, config, checklistContext)
|
|
|
174
174
|
}
|
|
175
175
|
// Handle results
|
|
176
176
|
if (!structuredDesignResult?.technical_design) {
|
|
177
|
-
return buildNoResultsError(
|
|
177
|
+
return buildNoResultsError(issueId);
|
|
178
178
|
}
|
|
179
179
|
// Check if verification failed after all iterations
|
|
180
180
|
if (verificationResult &&
|
|
@@ -183,10 +183,10 @@ export const generateTechnicalDesign = async (options, config, checklistContext)
|
|
|
183
183
|
checklistContext.checklists.length > 0) {
|
|
184
184
|
logError(`❌ Final result: Checklist verification FAILED after ${currentIteration} iterations`);
|
|
185
185
|
logError(` Technical design saved for manual review`);
|
|
186
|
-
return buildVerificationFailureResult(
|
|
186
|
+
return buildVerificationFailureResult(issueId, structuredDesignResult.technical_design, verificationResult, currentIteration);
|
|
187
187
|
}
|
|
188
188
|
// Return success result with session ID for coaching at phase-executor level
|
|
189
|
-
const result = buildDesignResult(
|
|
189
|
+
const result = buildDesignResult(issueId, structuredDesignResult.technical_design, structuredDesignResult.summary ||
|
|
190
190
|
'Technical design generated successfully', currentIteration);
|
|
191
191
|
return {
|
|
192
192
|
...result,
|
|
@@ -199,7 +199,7 @@ export const generateTechnicalDesign = async (options, config, checklistContext)
|
|
|
199
199
|
catch (error) {
|
|
200
200
|
logError(`Technical design generation failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
201
201
|
return {
|
|
202
|
-
|
|
202
|
+
issueId,
|
|
203
203
|
technicalDesign: null,
|
|
204
204
|
status: 'error',
|
|
205
205
|
summary: `Generation failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
@@ -210,11 +210,11 @@ export const generateTechnicalDesign = async (options, config, checklistContext)
|
|
|
210
210
|
* Prepare all context information needed for design
|
|
211
211
|
*/
|
|
212
212
|
// eslint-disable-next-line complexity -- assembles context from many data sources with fallback handling
|
|
213
|
-
async function prepareDesignContext(
|
|
213
|
+
async function prepareDesignContext(issueId, checklistContext, verbose) {
|
|
214
214
|
if (verbose) {
|
|
215
215
|
logInfo('Fetching technical design context via MCP endpoints...');
|
|
216
216
|
}
|
|
217
|
-
const context = await fetchTechnicalDesignContext(
|
|
217
|
+
const context = await fetchTechnicalDesignContext(issueId, verbose);
|
|
218
218
|
const { content: contextInfo, downloadedImages } = await formatTechnicalDesignContext(context);
|
|
219
219
|
if (verbose && downloadedImages.length > 0) {
|
|
220
220
|
logInfo(`Downloaded ${downloadedImages.length} images for Claude Code:`);
|
|
@@ -226,7 +226,7 @@ async function prepareDesignContext(featureId, checklistContext, verbose) {
|
|
|
226
226
|
let hasFeedbacks = false;
|
|
227
227
|
let feedbacksContext = null;
|
|
228
228
|
// Check if there's existing technical design
|
|
229
|
-
const existingTechnicalDesign = context.
|
|
229
|
+
const existingTechnicalDesign = context.issue.technical_design;
|
|
230
230
|
const hasExistingDesign = !!existingTechnicalDesign && existingTechnicalDesign.trim().length > 0;
|
|
231
231
|
// Add existing technical design to context if it exists
|
|
232
232
|
if (hasExistingDesign && verbose) {
|
|
@@ -234,7 +234,7 @@ async function prepareDesignContext(featureId, checklistContext, verbose) {
|
|
|
234
234
|
}
|
|
235
235
|
// Add feedbacks context to the design prompt
|
|
236
236
|
try {
|
|
237
|
-
feedbacksContext = await getFeedbacksForPhase({
|
|
237
|
+
feedbacksContext = await getFeedbacksForPhase({ issueId, verbose }, 'technical-design');
|
|
238
238
|
if (verbose) {
|
|
239
239
|
logInfo(`📋 Feedbacks fetched successfully: ${feedbacksContext.feedbacks.length} feedbacks found`);
|
|
240
240
|
if (feedbacksContext.feedbacks.length > 0) {
|
|
@@ -311,10 +311,10 @@ async function prepareDesignContext(featureId, checklistContext, verbose) {
|
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
const designPrompt = createTechnicalDesignPromptWithContext(
|
|
314
|
+
const designPrompt = createTechnicalDesignPromptWithContext(issueId, finalContextInfo, existingTechnicalDesign, isIncrementalUpdate);
|
|
315
315
|
return {
|
|
316
|
-
|
|
317
|
-
|
|
316
|
+
issueName: context.issue.name,
|
|
317
|
+
issueDescription: context.issue.description || undefined,
|
|
318
318
|
designPrompt,
|
|
319
319
|
hasExistingDesign,
|
|
320
320
|
hasFeedbacks,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ChecklistVerificationResult } from '../technical-design-verification/agent.js';
|
|
2
2
|
export interface TechnicalDesignResult {
|
|
3
|
-
|
|
3
|
+
issueId: string;
|
|
4
4
|
technicalDesign: string | null;
|
|
5
5
|
status: 'success' | 'error';
|
|
6
6
|
summary: string;
|
|
@@ -14,12 +14,12 @@ export interface TechnicalDesignResult {
|
|
|
14
14
|
/**
|
|
15
15
|
* Build successful design result
|
|
16
16
|
*/
|
|
17
|
-
export declare function buildDesignResult(
|
|
17
|
+
export declare function buildDesignResult(issueId: string, technicalDesign: string, summary: string, iterations: number, checklistItemResults?: any[]): TechnicalDesignResult;
|
|
18
18
|
/**
|
|
19
19
|
* Build verification failure result
|
|
20
20
|
*/
|
|
21
|
-
export declare function buildVerificationFailureResult(
|
|
21
|
+
export declare function buildVerificationFailureResult(issueId: string, technicalDesign: string, verificationResult: ChecklistVerificationResult, iterations: number): TechnicalDesignResult;
|
|
22
22
|
/**
|
|
23
23
|
* Build error result when no design was generated
|
|
24
24
|
*/
|
|
25
|
-
export declare function buildNoResultsError(
|
|
25
|
+
export declare function buildNoResultsError(issueId: string): TechnicalDesignResult;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Build successful design result
|
|
3
3
|
*/
|
|
4
|
-
export function buildDesignResult(
|
|
4
|
+
export function buildDesignResult(issueId, technicalDesign, summary, iterations,
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
6
|
checklistItemResults) {
|
|
7
7
|
return {
|
|
8
|
-
|
|
8
|
+
issueId,
|
|
9
9
|
technicalDesign,
|
|
10
10
|
status: 'success',
|
|
11
11
|
summary,
|
|
@@ -18,9 +18,9 @@ checklistItemResults) {
|
|
|
18
18
|
/**
|
|
19
19
|
* Build verification failure result
|
|
20
20
|
*/
|
|
21
|
-
export function buildVerificationFailureResult(
|
|
21
|
+
export function buildVerificationFailureResult(issueId, technicalDesign, verificationResult, iterations) {
|
|
22
22
|
return {
|
|
23
|
-
|
|
23
|
+
issueId,
|
|
24
24
|
technicalDesign,
|
|
25
25
|
status: 'error',
|
|
26
26
|
summary: `Checklist verification failed after ${iterations} iterations: ${verificationResult.summary}`,
|
|
@@ -31,9 +31,9 @@ export function buildVerificationFailureResult(featureId, technicalDesign, verif
|
|
|
31
31
|
/**
|
|
32
32
|
* Build error result when no design was generated
|
|
33
33
|
*/
|
|
34
|
-
export function buildNoResultsError(
|
|
34
|
+
export function buildNoResultsError(issueId) {
|
|
35
35
|
return {
|
|
36
|
-
|
|
36
|
+
issueId,
|
|
37
37
|
technicalDesign: null,
|
|
38
38
|
status: 'error',
|
|
39
39
|
summary: 'Failed to generate technical design - no valid result received',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type EdsgerConfig } from '../../types/index.js';
|
|
2
2
|
import { type ChecklistVerificationResult } from '../technical-design-verification/agent.js';
|
|
3
|
-
export declare const createTechnicalDesignSystemPrompt: (_config: EdsgerConfig, mcpServerUrl?: string, mcpToken?: string,
|
|
4
|
-
export declare const createTechnicalDesignPromptWithContext: (
|
|
3
|
+
export declare const createTechnicalDesignSystemPrompt: (_config: EdsgerConfig, mcpServerUrl?: string, mcpToken?: string, issueId?: string, projectDir?: string) => Promise<string>;
|
|
4
|
+
export declare const createTechnicalDesignPromptWithContext: (issueId: string, contextInfo: string, existingTechnicalDesign?: string | null, isIncrementalUpdate?: boolean) => string;
|
|
5
5
|
/**
|
|
6
6
|
* Create a prompt for the technical design agent to improve based on verification feedback
|
|
7
7
|
*/
|