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,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Agent Workflow Processor - Cross-product
|
|
2
|
+
* Agent Workflow Processor - Cross-product issue processing
|
|
3
3
|
*
|
|
4
|
-
* Uses child_process.fork() to run each
|
|
4
|
+
* Uses child_process.fork() to run each issue in an isolated worker process.
|
|
5
5
|
* This enables:
|
|
6
|
-
* - Concurrent processing of multiple
|
|
7
|
-
* - Auto-update takes effect on next
|
|
6
|
+
* - Concurrent processing of multiple issues (each worker has its own cwd)
|
|
7
|
+
* - Auto-update takes effect on next issue (new workers load latest code)
|
|
8
8
|
* - Crash isolation (one worker failing doesn't affect others)
|
|
9
9
|
*/
|
|
10
10
|
import { fork } from 'child_process';
|
|
11
11
|
import { dirname, join } from 'path';
|
|
12
12
|
import { fileURLToPath } from 'url';
|
|
13
|
-
import {
|
|
13
|
+
import { listAllReadyIssues, } from '../../api/cross-product.js';
|
|
14
14
|
import { getGitHubConfig } from '../../api/github.js';
|
|
15
15
|
import { WorkerTimeoutError } from '../../errors/index.js';
|
|
16
16
|
import { sendHeartbeat, shouldProcess } from '../../system/session-manager.js';
|
|
17
17
|
import { logError, logInfo, logSuccess, logWarning, } from '../../utils/logger.js';
|
|
18
|
-
import {
|
|
19
|
-
import { calculateStats, createCompletedState, createFailedState, createInitialState, createProcessingState,
|
|
18
|
+
import { cloneIssueRepo } from '../../workspace/workspace-manager.js';
|
|
19
|
+
import { calculateStats, createCompletedState, createFailedState, createInitialState, createProcessingState, updateIssueState, } from '../workflow/core/state-manager.js';
|
|
20
20
|
/**
|
|
21
21
|
* Maximum allowed concurrency (hard cap).
|
|
22
22
|
* Limits are due to:
|
|
@@ -31,15 +31,15 @@ export const MAX_CONCURRENCY = 10;
|
|
|
31
31
|
const __filename = fileURLToPath(import.meta.url);
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/naming-convention -- ESM __filename/__dirname polyfill
|
|
33
33
|
const __dirname = dirname(__filename);
|
|
34
|
-
const WORKER_SCRIPT = join(__dirname, '
|
|
34
|
+
const WORKER_SCRIPT = join(__dirname, 'issue-worker.js');
|
|
35
35
|
const CHAT_WORKER_SCRIPT = join(__dirname, 'chat-worker.js');
|
|
36
36
|
export class AgentWorkflowProcessor {
|
|
37
37
|
options;
|
|
38
38
|
config;
|
|
39
39
|
isRunning = false;
|
|
40
|
-
|
|
40
|
+
processedIssues = createInitialState();
|
|
41
41
|
pollTimer;
|
|
42
|
-
/** Currently active worker processes, keyed by
|
|
42
|
+
/** Currently active worker processes, keyed by issueId */
|
|
43
43
|
activeWorkers = new Map();
|
|
44
44
|
/** Chat worker subprocess — runs in parallel, handles chat messages and phase events */
|
|
45
45
|
chatWorker;
|
|
@@ -60,14 +60,14 @@ export class AgentWorkflowProcessor {
|
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
this.isRunning = true;
|
|
63
|
-
logInfo(`Concurrent processing: up to ${this.options.maxConcurrent}
|
|
63
|
+
logInfo(`Concurrent processing: up to ${this.options.maxConcurrent} issue(s)`);
|
|
64
64
|
// Start chat worker subprocess
|
|
65
65
|
this.startChatWorker();
|
|
66
|
-
// Initial
|
|
67
|
-
await this.
|
|
66
|
+
// Initial issue check
|
|
67
|
+
await this.processNextIssues();
|
|
68
68
|
// Set up polling
|
|
69
69
|
this.pollTimer = setInterval(() => {
|
|
70
|
-
this.
|
|
70
|
+
this.processNextIssues().catch((error) => {
|
|
71
71
|
logError(`Polling error: ${error instanceof Error ? error.message : String(error)}`);
|
|
72
72
|
});
|
|
73
73
|
}, this.options.pollInterval);
|
|
@@ -163,9 +163,9 @@ export class AgentWorkflowProcessor {
|
|
|
163
163
|
}
|
|
164
164
|
this.chatWorker = undefined;
|
|
165
165
|
}
|
|
166
|
-
// Kill all active
|
|
167
|
-
for (const [
|
|
168
|
-
logInfo(`Stopping worker for
|
|
166
|
+
// Kill all active issue workers gracefully
|
|
167
|
+
for (const [issueId, worker] of this.activeWorkers) {
|
|
168
|
+
logInfo(`Stopping worker for issue: ${issueId}`);
|
|
169
169
|
if (worker.timeoutTimer) {
|
|
170
170
|
clearTimeout(worker.timeoutTimer);
|
|
171
171
|
}
|
|
@@ -177,7 +177,7 @@ export class AgentWorkflowProcessor {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
async
|
|
180
|
+
async processNextIssues() {
|
|
181
181
|
try {
|
|
182
182
|
// Check if we should be processing (not paused/stopped from web dashboard)
|
|
183
183
|
if (!shouldProcess()) {
|
|
@@ -186,7 +186,7 @@ export class AgentWorkflowProcessor {
|
|
|
186
186
|
}
|
|
187
187
|
return;
|
|
188
188
|
}
|
|
189
|
-
// Calculate how many more
|
|
189
|
+
// Calculate how many more issues we can take on
|
|
190
190
|
const availableSlots = this.options.maxConcurrent - this.activeWorkers.size;
|
|
191
191
|
if (availableSlots <= 0) {
|
|
192
192
|
if (this.options.verbose) {
|
|
@@ -194,23 +194,23 @@ export class AgentWorkflowProcessor {
|
|
|
194
194
|
}
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
// Fetch ready
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
197
|
+
// Fetch ready issues across all products
|
|
198
|
+
const issues = await listAllReadyIssues(this.options.verbose);
|
|
199
|
+
if (issues.length === 0) {
|
|
200
200
|
if (this.options.verbose) {
|
|
201
|
-
logInfo('No
|
|
201
|
+
logInfo('No issues available for processing');
|
|
202
202
|
}
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
|
-
// Filter out
|
|
205
|
+
// Filter out issues already being processed or recently failed
|
|
206
206
|
const cooldownMs = this.config.workflow.retryCooldown;
|
|
207
|
-
const
|
|
207
|
+
const newIssues = issues.filter((f) => {
|
|
208
208
|
if (this.activeWorkers.has(f.id)) {
|
|
209
209
|
return false;
|
|
210
210
|
}
|
|
211
|
-
const state = this.
|
|
211
|
+
const state = this.processedIssues.get(f.id);
|
|
212
212
|
if (state?.status === 'failed') {
|
|
213
|
-
// Allow retry if
|
|
213
|
+
// Allow retry if issue was updated after our last attempt (user intervention)
|
|
214
214
|
if (f.updated_at && new Date(f.updated_at) > state.lastAttempt) {
|
|
215
215
|
return true;
|
|
216
216
|
}
|
|
@@ -225,88 +225,88 @@ export class AgentWorkflowProcessor {
|
|
|
225
225
|
}
|
|
226
226
|
return true;
|
|
227
227
|
});
|
|
228
|
-
if (
|
|
229
|
-
// Log skipped
|
|
230
|
-
const skippedCount =
|
|
231
|
-
const state = this.
|
|
228
|
+
if (newIssues.length === 0) {
|
|
229
|
+
// Log skipped issues for debugging
|
|
230
|
+
const skippedCount = issues.filter((f) => {
|
|
231
|
+
const state = this.processedIssues.get(f.id);
|
|
232
232
|
return (state?.status === 'failed' &&
|
|
233
233
|
state.retryCount >= this.options.maxRetries);
|
|
234
234
|
}).length;
|
|
235
235
|
if (skippedCount > 0) {
|
|
236
|
-
logInfo(`${skippedCount}
|
|
236
|
+
logInfo(`${skippedCount} issue(s) skipped (max retries exceeded)`);
|
|
237
237
|
}
|
|
238
238
|
if (this.options.verbose) {
|
|
239
|
-
logInfo('No
|
|
239
|
+
logInfo('No issues available for processing');
|
|
240
240
|
}
|
|
241
241
|
return;
|
|
242
242
|
}
|
|
243
|
-
// Pick
|
|
244
|
-
const toProcess =
|
|
245
|
-
// Start processing each
|
|
246
|
-
for (const
|
|
247
|
-
this.
|
|
248
|
-
logError(`Failed to start worker for ${
|
|
243
|
+
// Pick issues up to available slots
|
|
244
|
+
const toProcess = newIssues.slice(0, availableSlots);
|
|
245
|
+
// Start processing each issue concurrently
|
|
246
|
+
for (const issue of toProcess) {
|
|
247
|
+
this.startIssueWorker(issue).catch((error) => {
|
|
248
|
+
logError(`Failed to start worker for ${issue.name}: ${error instanceof Error ? error.message : String(error)}`);
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
catch (error) {
|
|
253
|
-
logError(`Failed to process
|
|
253
|
+
logError(`Failed to process issues: ${error instanceof Error ? error.message : String(error)}`);
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
/**
|
|
257
|
-
* Start a child process worker for a single
|
|
257
|
+
* Start a child process worker for a single issue.
|
|
258
258
|
* Handles: GitHub config lookup, repo cloning, then forks the worker.
|
|
259
259
|
*/
|
|
260
|
-
async
|
|
261
|
-
const
|
|
260
|
+
async startIssueWorker(issue) {
|
|
261
|
+
const issueId = issue.id;
|
|
262
262
|
// Update state to processing
|
|
263
|
-
this.
|
|
264
|
-
logInfo(`Processing
|
|
265
|
-
if (
|
|
266
|
-
logInfo(` Product: ${
|
|
263
|
+
this.processedIssues = updateIssueState(this.processedIssues, issueId, (currentState) => createProcessingState(issueId, currentState));
|
|
264
|
+
logInfo(`Processing issue: ${issue.name}`);
|
|
265
|
+
if (issue.product_name) {
|
|
266
|
+
logInfo(` Product: ${issue.product_name}`);
|
|
267
267
|
}
|
|
268
|
-
// Send heartbeat with current
|
|
269
|
-
await sendHeartbeat(
|
|
268
|
+
// Send heartbeat with current issue info
|
|
269
|
+
await sendHeartbeat(issueId, issue.name);
|
|
270
270
|
try {
|
|
271
|
-
// Step 1: Get GitHub config for this
|
|
272
|
-
const githubConfig = await getGitHubConfig(
|
|
271
|
+
// Step 1: Get GitHub config for this issue
|
|
272
|
+
const githubConfig = await getGitHubConfig(issueId, this.options.verbose);
|
|
273
273
|
if (!githubConfig.configured ||
|
|
274
274
|
!githubConfig.token ||
|
|
275
275
|
!githubConfig.owner ||
|
|
276
276
|
!githubConfig.repo) {
|
|
277
|
-
logWarning(`GitHub not configured for
|
|
278
|
-
this.
|
|
277
|
+
logWarning(`GitHub not configured for issue: ${issue.name}. ${githubConfig.message || ''}`);
|
|
278
|
+
this.processedIssues = updateIssueState(this.processedIssues, issueId, (currentState) => createFailedState(issueId, currentState));
|
|
279
279
|
return;
|
|
280
280
|
}
|
|
281
281
|
// Step 2: Clone or reuse repo
|
|
282
|
-
const { repoPath, freshClone } =
|
|
282
|
+
const { repoPath, freshClone } = cloneIssueRepo(this.options.workspaceRoot, issueId, githubConfig.owner, githubConfig.repo, githubConfig.token);
|
|
283
283
|
logInfo(`Repo: ${repoPath} (${freshClone ? 'fresh clone' : 'reused'})`);
|
|
284
|
-
// Step 3: Fork a worker process to run the
|
|
285
|
-
// The worker runs with cwd set to the repo path, so each
|
|
284
|
+
// Step 3: Fork a worker process to run the issue workflow
|
|
285
|
+
// The worker runs with cwd set to the repo path, so each issue
|
|
286
286
|
// has its own isolated working directory.
|
|
287
287
|
const worker = fork(WORKER_SCRIPT, [], {
|
|
288
288
|
cwd: repoPath,
|
|
289
289
|
stdio: ['ignore', 'pipe', 'pipe', 'ipc'],
|
|
290
290
|
env: {
|
|
291
291
|
...process.env,
|
|
292
|
-
|
|
292
|
+
EDSGER_ISSUE_ID: issueId,
|
|
293
293
|
},
|
|
294
294
|
});
|
|
295
295
|
// Track the active worker
|
|
296
296
|
const activeWorker = {
|
|
297
297
|
process: worker,
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
issueId,
|
|
299
|
+
issueName: issue.name,
|
|
300
300
|
startedAt: new Date(),
|
|
301
301
|
};
|
|
302
|
-
this.activeWorkers.set(
|
|
303
|
-
logInfo(`Worker spawned for
|
|
302
|
+
this.activeWorkers.set(issueId, activeWorker);
|
|
303
|
+
logInfo(`Worker spawned for issue: ${issue.name} (pid: ${worker.pid})`);
|
|
304
304
|
// Forward worker stdout/stderr to parent logs
|
|
305
305
|
worker.stdout?.on('data', (data) => {
|
|
306
306
|
const lines = data.toString().trim().split('\n');
|
|
307
307
|
for (const line of lines) {
|
|
308
308
|
if (line) {
|
|
309
|
-
logInfo(` [${
|
|
309
|
+
logInfo(` [${issue.name}] ${line}`);
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
});
|
|
@@ -314,7 +314,7 @@ export class AgentWorkflowProcessor {
|
|
|
314
314
|
const lines = data.toString().trim().split('\n');
|
|
315
315
|
for (const line of lines) {
|
|
316
316
|
if (line) {
|
|
317
|
-
logError(` [${
|
|
317
|
+
logError(` [${issue.name}] ${line}`);
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
});
|
|
@@ -323,7 +323,7 @@ export class AgentWorkflowProcessor {
|
|
|
323
323
|
// Handle worker IPC messages
|
|
324
324
|
worker.on('message', (msg) => {
|
|
325
325
|
if (msg.type === 'log') {
|
|
326
|
-
const prefix = `[${
|
|
326
|
+
const prefix = `[${issue.name}]`;
|
|
327
327
|
switch (msg.level) {
|
|
328
328
|
case 'info':
|
|
329
329
|
logInfo(` ${prefix} ${msg.message}`);
|
|
@@ -344,29 +344,29 @@ export class AgentWorkflowProcessor {
|
|
|
344
344
|
}
|
|
345
345
|
else if (msg.type === 'result') {
|
|
346
346
|
resultReceived = true;
|
|
347
|
-
this.handleWorkerResult(
|
|
347
|
+
this.handleWorkerResult(issueId, issue.name, msg.success ?? false, msg.error);
|
|
348
348
|
}
|
|
349
349
|
});
|
|
350
350
|
// Handle worker exit (crash, killed, etc.)
|
|
351
351
|
worker.on('exit', (code) => {
|
|
352
352
|
// Clear timeout timer
|
|
353
|
-
const w = this.activeWorkers.get(
|
|
353
|
+
const w = this.activeWorkers.get(issueId);
|
|
354
354
|
if (w?.timeoutTimer) {
|
|
355
355
|
clearTimeout(w.timeoutTimer);
|
|
356
356
|
}
|
|
357
|
-
this.activeWorkers.delete(
|
|
357
|
+
this.activeWorkers.delete(issueId);
|
|
358
358
|
// If the worker exited without sending a result message, treat as failure
|
|
359
359
|
if (!resultReceived) {
|
|
360
360
|
if (code !== 0) {
|
|
361
|
-
logError(`Worker for ${
|
|
361
|
+
logError(`Worker for ${issue.name} exited with code ${code}`);
|
|
362
362
|
}
|
|
363
|
-
this.handleWorkerResult(
|
|
363
|
+
this.handleWorkerResult(issueId, issue.name, false, `Worker exited with code ${code}`);
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
366
|
// Set up worker timeout
|
|
367
367
|
const { workerTimeout } = this.config.workflow;
|
|
368
368
|
activeWorker.timeoutTimer = setTimeout(() => {
|
|
369
|
-
logError(`Worker for ${
|
|
369
|
+
logError(`Worker for ${issue.name} timed out after ${Math.round(workerTimeout / 1000)}s, killing...`);
|
|
370
370
|
try {
|
|
371
371
|
worker.kill('SIGTERM');
|
|
372
372
|
// Force kill after 10s if SIGTERM didn't work
|
|
@@ -382,57 +382,57 @@ export class AgentWorkflowProcessor {
|
|
|
382
382
|
catch {
|
|
383
383
|
// Worker may already be dead
|
|
384
384
|
}
|
|
385
|
-
const err = new WorkerTimeoutError(
|
|
386
|
-
this.handleWorkerResult(
|
|
385
|
+
const err = new WorkerTimeoutError(issueId, workerTimeout);
|
|
386
|
+
this.handleWorkerResult(issueId, issue.name, false, err.message);
|
|
387
387
|
}, workerTimeout);
|
|
388
388
|
// Send start message to worker
|
|
389
389
|
worker.send({
|
|
390
390
|
type: 'start',
|
|
391
|
-
|
|
391
|
+
issueId,
|
|
392
392
|
verbose: this.options.verbose,
|
|
393
393
|
config: this.config,
|
|
394
394
|
});
|
|
395
|
-
// Notify chat worker that
|
|
395
|
+
// Notify chat worker that an issue has started processing
|
|
396
396
|
this.notifyChatWorker({
|
|
397
|
-
type: 'event:
|
|
398
|
-
|
|
397
|
+
type: 'event:issue_started',
|
|
398
|
+
issueId,
|
|
399
399
|
repoPath,
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
catch (error) {
|
|
403
|
-
this.activeWorkers.delete(
|
|
404
|
-
this.
|
|
405
|
-
logError(`
|
|
403
|
+
this.activeWorkers.delete(issueId);
|
|
404
|
+
this.processedIssues = updateIssueState(this.processedIssues, issueId, (currentState) => createFailedState(issueId, currentState));
|
|
405
|
+
logError(`Issue error: ${issue.name} - ${error instanceof Error ? error.message : String(error)}`);
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
handleWorkerResult(
|
|
408
|
+
handleWorkerResult(issueId, issueName, success, error) {
|
|
409
409
|
if (success) {
|
|
410
|
-
this.
|
|
411
|
-
logSuccess(`
|
|
412
|
-
// Notify chat worker that
|
|
413
|
-
this.notifyChatWorker({ type: 'event:
|
|
410
|
+
this.processedIssues = updateIssueState(this.processedIssues, issueId, (currentState) => createCompletedState(issueId, currentState));
|
|
411
|
+
logSuccess(`Issue completed: ${issueName}`);
|
|
412
|
+
// Notify chat worker that issue workflow is done
|
|
413
|
+
this.notifyChatWorker({ type: 'event:issue_done', issueId });
|
|
414
414
|
}
|
|
415
415
|
else {
|
|
416
|
-
this.
|
|
417
|
-
logError(`
|
|
416
|
+
this.processedIssues = updateIssueState(this.processedIssues, issueId, (currentState) => createFailedState(issueId, currentState));
|
|
417
|
+
logError(`Issue failed: ${issueName}${error ? ` - ${error}` : ''}`);
|
|
418
418
|
// Only notify chat on first failure to avoid flooding with duplicate messages
|
|
419
|
-
const failedState = this.
|
|
419
|
+
const failedState = this.processedIssues.get(issueId);
|
|
420
420
|
if (failedState && failedState.retryCount <= 1) {
|
|
421
421
|
this.notifyChatWorker({
|
|
422
422
|
type: 'event:phase_failed',
|
|
423
|
-
|
|
423
|
+
issueId,
|
|
424
424
|
phase: 'workflow',
|
|
425
425
|
error: error || 'Unknown error',
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
// Clear heartbeat
|
|
429
|
+
// Clear heartbeat issue info
|
|
430
430
|
sendHeartbeat().catch(() => {
|
|
431
431
|
/* noop */
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
434
|
getStats() {
|
|
435
|
-
return calculateStats(this.
|
|
435
|
+
return calculateStats(this.processedIssues, this.isRunning);
|
|
436
436
|
}
|
|
437
437
|
getActiveWorkerCount() {
|
|
438
438
|
return this.activeWorkers.size;
|
|
@@ -7,7 +7,7 @@ import { getGitHubConfigByProduct } from '../../api/github.js';
|
|
|
7
7
|
import { getProduct } from '../../api/products.js';
|
|
8
8
|
import { deregisterSession, registerSession, } from '../../system/session-manager.js';
|
|
9
9
|
import { logInfo, logSuccess, logWarning } from '../../utils/logger.js';
|
|
10
|
-
import {
|
|
10
|
+
import { cloneIssueRepo, ensureWorkspaceDir, } from '../../workspace/workspace-manager.js';
|
|
11
11
|
import { analyzeBuildPlan, } from './detect-project.js';
|
|
12
12
|
/** Default (real) implementations of all dependencies. */
|
|
13
13
|
export function createDefaultDeps() {
|
|
@@ -15,7 +15,7 @@ export function createDefaultDeps() {
|
|
|
15
15
|
fetchConfigs: getAppStoreConfigs,
|
|
16
16
|
fetchProduct: getProduct,
|
|
17
17
|
fetchGitHub: getGitHubConfigByProduct,
|
|
18
|
-
cloneRepo: (workspaceRoot, dirName, owner, repo, token) =>
|
|
18
|
+
cloneRepo: (workspaceRoot, dirName, owner, repo, token) => cloneIssueRepo(workspaceRoot, dirName, owner, repo, token),
|
|
19
19
|
getWorkspaceRoot: ensureWorkspaceDir,
|
|
20
20
|
saveBuildConfig: updateBuildConfig,
|
|
21
21
|
checkoutDefaultBranch: checkoutDefaultBranchImpl,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command: edsger find-bugs <productId>
|
|
3
|
+
* Audits the product's repository for bugs and files each new finding as an issue.
|
|
4
|
+
*/
|
|
5
|
+
export interface FindBugsCliOptions {
|
|
6
|
+
full?: boolean;
|
|
7
|
+
branch?: string;
|
|
8
|
+
maxFiles?: number;
|
|
9
|
+
verbose?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function runFindBugs(productId: string, options: FindBugsCliOptions): Promise<void>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command: edsger find-bugs <productId>
|
|
3
|
+
* Audits the product's repository for bugs and files each new finding as an issue.
|
|
4
|
+
*/
|
|
5
|
+
import { getGitHubConfigByProduct } from '../../api/github.js';
|
|
6
|
+
import { scanForBugs } from '../../phases/find-bugs/index.js';
|
|
7
|
+
import { logError, logInfo, logSuccess } from '../../utils/logger.js';
|
|
8
|
+
export async function runFindBugs(productId, options) {
|
|
9
|
+
const { full, branch, maxFiles, verbose } = options;
|
|
10
|
+
logInfo(`Starting bug scan for product ${productId}`);
|
|
11
|
+
const githubConfig = await getGitHubConfigByProduct(productId, verbose);
|
|
12
|
+
if (!githubConfig.configured ||
|
|
13
|
+
!githubConfig.token ||
|
|
14
|
+
!githubConfig.owner ||
|
|
15
|
+
!githubConfig.repo) {
|
|
16
|
+
logError(`GitHub not configured for product ${productId}: ${githubConfig.message || 'No installation found'}`);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
const result = await scanForBugs({
|
|
20
|
+
productId,
|
|
21
|
+
githubToken: githubConfig.token,
|
|
22
|
+
owner: githubConfig.owner,
|
|
23
|
+
repo: githubConfig.repo,
|
|
24
|
+
full,
|
|
25
|
+
branch,
|
|
26
|
+
maxFiles,
|
|
27
|
+
verbose,
|
|
28
|
+
});
|
|
29
|
+
if (result.status === 'success') {
|
|
30
|
+
logSuccess(result.message);
|
|
31
|
+
if (result.summary) {
|
|
32
|
+
logInfo(result.summary);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
logError(result.message);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command: edsger find-features <productId>
|
|
3
|
+
* Synthesises feature opportunities from user feedback + intelligence reports +
|
|
4
|
+
* the codebase, and files each one as an issue.
|
|
5
|
+
*/
|
|
6
|
+
export interface FindFeaturesCliOptions {
|
|
7
|
+
branch?: string;
|
|
8
|
+
since?: string;
|
|
9
|
+
minClusterSize?: number;
|
|
10
|
+
maxSuggestions?: number;
|
|
11
|
+
againstReport?: string;
|
|
12
|
+
verbose?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function runFindFeatures(productId: string, options: FindFeaturesCliOptions): Promise<void>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command: edsger find-features <productId>
|
|
3
|
+
* Synthesises feature opportunities from user feedback + intelligence reports +
|
|
4
|
+
* the codebase, and files each one as an issue.
|
|
5
|
+
*/
|
|
6
|
+
import { getGitHubConfigByProduct } from '../../api/github.js';
|
|
7
|
+
import { scanForFeatures } from '../../phases/find-features/index.js';
|
|
8
|
+
import { logError, logInfo, logSuccess } from '../../utils/logger.js';
|
|
9
|
+
export async function runFindFeatures(productId, options) {
|
|
10
|
+
const { branch, since, minClusterSize, maxSuggestions, againstReport, verbose, } = options;
|
|
11
|
+
logInfo(`Starting feature discovery for product ${productId}`);
|
|
12
|
+
const githubConfig = await getGitHubConfigByProduct(productId, verbose);
|
|
13
|
+
if (!githubConfig.configured ||
|
|
14
|
+
!githubConfig.token ||
|
|
15
|
+
!githubConfig.owner ||
|
|
16
|
+
!githubConfig.repo) {
|
|
17
|
+
logError(`GitHub not configured for product ${productId}: ${githubConfig.message || 'No installation found'}`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
const result = await scanForFeatures({
|
|
21
|
+
productId,
|
|
22
|
+
githubToken: githubConfig.token,
|
|
23
|
+
owner: githubConfig.owner,
|
|
24
|
+
repo: githubConfig.repo,
|
|
25
|
+
branch,
|
|
26
|
+
since,
|
|
27
|
+
minClusterSize,
|
|
28
|
+
maxSuggestions,
|
|
29
|
+
focusReportId: againstReport,
|
|
30
|
+
verbose,
|
|
31
|
+
});
|
|
32
|
+
if (result.status === 'success') {
|
|
33
|
+
logSuccess(result.message);
|
|
34
|
+
if (result.summary) {
|
|
35
|
+
logInfo(result.summary);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
logError(result.message);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command: edsger find-smells <productId>
|
|
3
|
+
* Audits the product's repository for code smells (refactor candidates, perf
|
|
4
|
+
* cliffs, dead code, etc.) and files each new finding as an issue.
|
|
5
|
+
*/
|
|
6
|
+
import { type SmellCategory } from '../../phases/find-smells/types.js';
|
|
7
|
+
export interface FindSmellsCliOptions {
|
|
8
|
+
full?: boolean;
|
|
9
|
+
branch?: string;
|
|
10
|
+
maxFiles?: number;
|
|
11
|
+
categories?: SmellCategory[];
|
|
12
|
+
verbose?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Parse and validate `--categories` from the CLI. Throws on invalid input so
|
|
16
|
+
* commander's option-parser rejects the run before any work starts. Empty
|
|
17
|
+
* input is treated as "no filter" (returns undefined) rather than an error —
|
|
18
|
+
* matches user intuition for `--categories=`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseCategoriesOption(raw: string): SmellCategory[] | undefined;
|
|
21
|
+
export declare function runFindSmells(productId: string, options: FindSmellsCliOptions): Promise<void>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command: edsger find-smells <productId>
|
|
3
|
+
* Audits the product's repository for code smells (refactor candidates, perf
|
|
4
|
+
* cliffs, dead code, etc.) and files each new finding as an issue.
|
|
5
|
+
*/
|
|
6
|
+
import { getGitHubConfigByProduct } from '../../api/github.js';
|
|
7
|
+
import { scanForSmells } from '../../phases/find-smells/index.js';
|
|
8
|
+
import { isSmellCategory, SMELL_CATEGORIES, } from '../../phases/find-smells/types.js';
|
|
9
|
+
import { logError, logInfo, logSuccess } from '../../utils/logger.js';
|
|
10
|
+
/**
|
|
11
|
+
* Parse and validate `--categories` from the CLI. Throws on invalid input so
|
|
12
|
+
* commander's option-parser rejects the run before any work starts. Empty
|
|
13
|
+
* input is treated as "no filter" (returns undefined) rather than an error —
|
|
14
|
+
* matches user intuition for `--categories=`.
|
|
15
|
+
*/
|
|
16
|
+
export function parseCategoriesOption(raw) {
|
|
17
|
+
const tokens = raw
|
|
18
|
+
.split(',')
|
|
19
|
+
.map((s) => s.trim())
|
|
20
|
+
.filter((s) => s.length > 0);
|
|
21
|
+
if (tokens.length === 0) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
const invalid = tokens.filter((t) => !isSmellCategory(t));
|
|
25
|
+
if (invalid.length > 0) {
|
|
26
|
+
throw new Error(`--categories: unknown value(s): ${invalid.join(', ')}. ` +
|
|
27
|
+
`Allowed: ${SMELL_CATEGORIES.join(', ')}`);
|
|
28
|
+
}
|
|
29
|
+
// Dedup while preserving order so the error message and downstream behaviour
|
|
30
|
+
// are deterministic.
|
|
31
|
+
return Array.from(new Set(tokens));
|
|
32
|
+
}
|
|
33
|
+
export async function runFindSmells(productId, options) {
|
|
34
|
+
const { full, branch, maxFiles, categories, verbose } = options;
|
|
35
|
+
logInfo(`Starting smell scan for product ${productId}`);
|
|
36
|
+
const githubConfig = await getGitHubConfigByProduct(productId, verbose);
|
|
37
|
+
if (!githubConfig.configured ||
|
|
38
|
+
!githubConfig.token ||
|
|
39
|
+
!githubConfig.owner ||
|
|
40
|
+
!githubConfig.repo) {
|
|
41
|
+
logError(`GitHub not configured for product ${productId}: ${githubConfig.message || 'No installation found'}`);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
const result = await scanForSmells({
|
|
45
|
+
productId,
|
|
46
|
+
githubToken: githubConfig.token,
|
|
47
|
+
owner: githubConfig.owner,
|
|
48
|
+
repo: githubConfig.repo,
|
|
49
|
+
full,
|
|
50
|
+
branch,
|
|
51
|
+
maxFiles,
|
|
52
|
+
categories,
|
|
53
|
+
verbose,
|
|
54
|
+
});
|
|
55
|
+
if (result.status === 'success') {
|
|
56
|
+
logSuccess(result.message);
|
|
57
|
+
if (result.summary) {
|
|
58
|
+
logInfo(result.summary);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
logError(result.message);
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -22,7 +22,7 @@ Please explore the codebase and create a markdown document covering:
|
|
|
22
22
|
1. **Project Name** - Extract from package.json or similar
|
|
23
23
|
2. **Description** - What the project does (from package.json description or README)
|
|
24
24
|
3. **Goals and Objectives** - Infer from the codebase purpose
|
|
25
|
-
4. **Core
|
|
25
|
+
4. **Core Issues** - List main issues by analyzing code structure
|
|
26
26
|
5. **Target Users** - Who would use this project
|
|
27
27
|
6. **Key Business Logic** - Important business rules or logic patterns
|
|
28
28
|
7. **Important Notes** - Any critical information for developers
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Template files for .edsger directory initialization
|
|
3
3
|
* These files help edsger phases understand the project context
|
|
4
4
|
*/
|
|
5
|
-
export declare const projectOverviewTemplate = "# Project Overview\n\n## Project Name\n[Your project name]\n\n## Description\n[Brief description of what this project does]\n\n## Goals and Objectives\n- [Goal 1]\n- [Goal 2]\n- [Goal 3]\n\n## Core
|
|
5
|
+
export declare const projectOverviewTemplate = "# Project Overview\n\n## Project Name\n[Your project name]\n\n## Description\n[Brief description of what this project does]\n\n## Goals and Objectives\n- [Goal 1]\n- [Goal 2]\n- [Goal 3]\n\n## Core Issues\n1. **[Issue 1]**: [Description]\n2. **[Issue 2]**: [Description]\n3. **[Issue 3]**: [Description]\n\n## Target Users\n[Who uses this project?]\n\n## Key Business Logic\n[Describe the core business logic and rules]\n\n## Important Notes\n[Any critical information that developers should know]\n";
|
|
6
6
|
export declare const techStackTemplate = "# Technology Stack\n\n## Programming Languages\n- [Language 1]: [Version and usage]\n- [Language 2]: [Version and usage]\n\n## Frameworks and Libraries\n\n### Frontend (if applicable)\n- [Framework]: [Version]\n- [Library 1]: [Usage]\n- [Library 2]: [Usage]\n\n### Backend (if applicable)\n- [Framework]: [Version]\n- [Library 1]: [Usage]\n- [Library 2]: [Usage]\n\n### Database\n- [Database]: [Version and purpose]\n- [ORM/Query builder]: [If applicable]\n\n## Development Tools\n- Package Manager: [npm/yarn/pnpm]\n- Build Tool: [Webpack/Vite/etc]\n- Testing Framework: [Jest/Vitest/Playwright/etc]\n- Linting: [ESLint/etc]\n- Formatting: [Prettier/etc]\n\n## Infrastructure\n- Hosting: [Platform]\n- CI/CD: [Tool]\n- Monitoring: [Tool]\n\n## External Services and APIs\n- [Service 1]: [Purpose]\n- [Service 2]: [Purpose]\n\n## Environment Variables\n```\n[List key environment variables and their purposes]\n```\n";
|
|
7
7
|
export declare const architectureTemplate = "# System Architecture\n\n## High-Level Architecture\n[Describe the overall architecture - monolith, microservices, etc.]\n\n## Directory Structure\n```\nproject-root/\n\u251C\u2500\u2500 [directory 1]/ # [Purpose]\n\u251C\u2500\u2500 [directory 2]/ # [Purpose]\n\u2514\u2500\u2500 [directory 3]/ # [Purpose]\n```\n\n## Key Components\n\n### [Component 1]\n- **Location**: [Path]\n- **Purpose**: [What it does]\n- **Dependencies**: [What it depends on]\n\n### [Component 2]\n- **Location**: [Path]\n- **Purpose**: [What it does]\n- **Dependencies**: [What it depends on]\n\n## Data Flow\n[Describe how data flows through the system]\n\n## Integration Points\n- [External system 1]: [How it integrates]\n- [External system 2]: [How it integrates]\n\n## Design Patterns\n[List key design patterns used in the project]\n\n## Key Design Decisions\n1. **[Decision 1]**: [Rationale]\n2. **[Decision 2]**: [Rationale]\n\n## Security Considerations\n[Key security measures and considerations]\n\n## Performance Considerations\n[Key performance optimization strategies]\n";
|
|
8
8
|
export declare const codingGuidelinesTemplate = "# Coding Guidelines\n\n## Code Style\n\n### General Principles\n- [Principle 1]\n- [Principle 2]\n- [Principle 3]\n\n### Naming Conventions\n- **Files**: [Convention, e.g., kebab-case, PascalCase]\n- **Variables**: [Convention, e.g., camelCase]\n- **Functions**: [Convention, e.g., camelCase, descriptive verbs]\n- **Classes**: [Convention, e.g., PascalCase]\n- **Constants**: [Convention, e.g., UPPER_SNAKE_CASE]\n\n## File Organization\n[How files should be organized within directories]\n\n## Import Order\n[Standard order for imports]\n```typescript\n// Example:\n// 1. External libraries\n// 2. Internal modules\n// 3. Types\n// 4. Styles\n```\n\n## Function Guidelines\n- Maximum function length: [X lines]\n- Function complexity: [Guidelines]\n- Documentation: [When to add comments]\n\n## Error Handling\n[Standard error handling approach]\n\n## Testing Requirements\n- Unit tests: [Requirements]\n- Integration tests: [Requirements]\n- Test coverage: [Target percentage]\n\n## Code Review Checklist\n- [ ] Code follows style guidelines\n- [ ] Tests are included and passing\n- [ ] Documentation is updated\n- [ ] No security vulnerabilities\n- [ ] Performance considerations addressed\n\n## Common Patterns to Use\n[List common patterns used in this project]\n\n## Anti-Patterns to Avoid\n[List patterns that should be avoided]\n\n## Git Commit Guidelines\n- Format: [Convention, e.g., Conventional Commits]\n- Example: `feat: add user authentication`\n";
|
|
@@ -15,10 +15,10 @@ export const projectOverviewTemplate = `# Project Overview
|
|
|
15
15
|
- [Goal 2]
|
|
16
16
|
- [Goal 3]
|
|
17
17
|
|
|
18
|
-
## Core
|
|
19
|
-
1. **[
|
|
20
|
-
2. **[
|
|
21
|
-
3. **[
|
|
18
|
+
## Core Issues
|
|
19
|
+
1. **[Issue 1]**: [Description]
|
|
20
|
+
2. **[Issue 2]**: [Description]
|
|
21
|
+
3. **[Issue 3]**: [Description]
|
|
22
22
|
|
|
23
23
|
## Target Users
|
|
24
24
|
[Who uses this project?]
|