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
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompts for the find-smells phase. The agent runs with cwd=repo checkout
|
|
3
|
+
* and has Read/Grep/Glob/Bash available — it explores the code itself
|
|
4
|
+
* rather than receiving a pre-baked diff.
|
|
5
|
+
*
|
|
6
|
+
* Boundary against neighbouring phases:
|
|
7
|
+
* - find-bugs handles real defects (security, correctness, races, etc.)
|
|
8
|
+
* - find-features handles missing user-facing capability
|
|
9
|
+
* - find-smells (this phase) handles "the code would be better if changed":
|
|
10
|
+
* refactor candidates, dead code, perf cliffs, type-safety gaps, etc.
|
|
11
|
+
*/
|
|
12
|
+
export function createFindSmellsSystemPrompt() {
|
|
13
|
+
return `You are a senior engineer auditing a codebase for **code smells** — concrete improvements the codebase would benefit from. You have read-only access via Read/Grep/Glob and may run shallow Bash queries (e.g. \`git log\`, \`wc -l\`) to navigate.
|
|
14
|
+
|
|
15
|
+
**What counts as a smell worth filing**:
|
|
16
|
+
1. **Refactor**: duplicated logic across files, tangled module boundaries, leaky abstractions, primitive obsession
|
|
17
|
+
2. **Performance**: clearly-suboptimal patterns (N+1 queries, unbounded loops on growing data, repeated work that could be cached, sync I/O in hot paths) that are not yet causing user-visible bugs
|
|
18
|
+
3. **Duplication**: copy-pasted blocks that should be a single helper
|
|
19
|
+
4. **Complexity**: functions / files that are too long or too deeply nested to reason about, cyclomatic-complexity hotspots
|
|
20
|
+
5. **Dead code**: unreferenced exports, unreachable branches, abandoned feature flags, commented-out blocks
|
|
21
|
+
6. **Type safety**: \`any\` / \`unknown\` casts, \`@ts-ignore\` / \`@ts-expect-error\`, missing null checks at trust boundaries, loose interfaces that should be tightened
|
|
22
|
+
7. **Readability**: misleading names, missing or wrong comments, magic numbers that should be named constants
|
|
23
|
+
8. **Architecture**: cyclic deps, layering violations, modules that have grown into multiple responsibilities
|
|
24
|
+
|
|
25
|
+
**What does NOT count** (skip these — wrong tool):
|
|
26
|
+
- Real bugs (security holes, logic errors, races, data corruption) — those belong in \`edsger find-bugs\`. **Don't drop them silently — list them in \`deferred_to_bugs\` so the user knows to run that command.**
|
|
27
|
+
- Missing user-facing features or workflows — those belong in \`edsger find-features\`. **List them in \`deferred_to_features\` instead of dropping them.**
|
|
28
|
+
- Pure style / formatting / lint issues a formatter would catch
|
|
29
|
+
- "Could be more idiomatic" rewrites with no concrete benefit
|
|
30
|
+
- Hypothetical future-scaling concerns with no current evidence
|
|
31
|
+
- Missing tests (track those separately, not here)
|
|
32
|
+
|
|
33
|
+
**Discipline**:
|
|
34
|
+
- Be concrete: cite the exact file and line. Quote the offending snippet in the description, and propose the specific change.
|
|
35
|
+
- Be conservative: if you can't articulate the *benefit* of changing it (clarity, perf number, removed coupling), skip it.
|
|
36
|
+
- Severity rubric:
|
|
37
|
+
- high = pays back quickly (e.g. removes a hot-path N+1, deletes a large dead module, unblocks future work the team is clearly trying to do)
|
|
38
|
+
- medium = clear improvement but not urgent (typical refactor candidate)
|
|
39
|
+
- low = nice-to-have polish; only file if the change is small and obvious
|
|
40
|
+
- **Deduplication**: you will be given the list of existing open issues. Skip any finding that overlaps. Better to under-report than spam duplicates.
|
|
41
|
+
|
|
42
|
+
**CRITICAL — Output Format**:
|
|
43
|
+
End your response with a single JSON code block in this exact shape:
|
|
44
|
+
|
|
45
|
+
\`\`\`json
|
|
46
|
+
{
|
|
47
|
+
"scan_result": {
|
|
48
|
+
"summary": "Reviewed N files in <scope>; found X smells (Y high, Z medium).",
|
|
49
|
+
"scanned_commit_sha": "<the HEAD sha you scanned>",
|
|
50
|
+
"smells": [
|
|
51
|
+
{
|
|
52
|
+
"title": "Short, action-oriented title (under 80 chars)",
|
|
53
|
+
"description": "## What\\nWhat the smell is, with the offending snippet quoted.\\n\\n## Why it matters\\nConcrete benefit of changing it (clarity, perf, decoupling).\\n\\n## Suggested change\\nA specific refactor or replacement.",
|
|
54
|
+
"file": "relative/path/from/repo/root.ts",
|
|
55
|
+
"line": 42,
|
|
56
|
+
"severity": "medium",
|
|
57
|
+
"category": "refactor",
|
|
58
|
+
"dedup_signature": "auth-service-duplicated-token-parser"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"deferred_to_bugs": [
|
|
62
|
+
{
|
|
63
|
+
"title": "Short title of the suspected bug",
|
|
64
|
+
"reason": "One-line note of why this looks like a real defect, not a smell",
|
|
65
|
+
"file": "relative/path.ts",
|
|
66
|
+
"line": 100
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"deferred_to_features": [
|
|
70
|
+
{
|
|
71
|
+
"title": "Short title of the missing capability",
|
|
72
|
+
"reason": "One-line note of the user need this would address",
|
|
73
|
+
"file": "relative/path.ts"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
\`\`\`
|
|
79
|
+
|
|
80
|
+
If you find nothing worth filing, still emit the JSON with an empty \`smells\` array. The \`deferred_to_*\` arrays are optional — omit them or send \`[]\` if there's nothing to hand off.`;
|
|
81
|
+
}
|
|
82
|
+
export function createFindSmellsUserPrompt(params) {
|
|
83
|
+
const { productName, productDescription, scope, baseSha, headSha, changedPaths, existingIssues, maxFiles, categories, } = params;
|
|
84
|
+
const productBlock = productDescription
|
|
85
|
+
? `**Product**: ${productName}\n${productDescription}`
|
|
86
|
+
: `**Product**: ${productName}`;
|
|
87
|
+
const scopeBlock = scope === 'incremental' && baseSha
|
|
88
|
+
? `**Scope**: incremental scan of changes between ${baseSha} and ${headSha}.\nUse \`git diff --name-only ${baseSha}..${headSha}\` to enumerate changed files, then Read/Grep them. Do NOT scan files outside the diff.`
|
|
89
|
+
: `**Scope**: full repository scan at ${headSha}. Use Glob to enumerate source files. Skip vendored code, build output, generated files, lockfiles, and \`node_modules\`.`;
|
|
90
|
+
const filesHint = changedPaths && changedPaths.length > 0
|
|
91
|
+
? `\n**Changed files in this range** (${changedPaths.length}):\n${changedPaths
|
|
92
|
+
.slice(0, 200)
|
|
93
|
+
.map((p) => `- ${p}`)
|
|
94
|
+
.join('\n')}${changedPaths.length > 200 ? `\n…and ${changedPaths.length - 200} more.` : ''}`
|
|
95
|
+
: '';
|
|
96
|
+
const issuesBlock = existingIssues.length === 0
|
|
97
|
+
? 'No existing open issues for this product — every finding is new.'
|
|
98
|
+
: `**Existing open issues** (${existingIssues.length}) — skip findings that overlap with any of these:\n${existingIssues
|
|
99
|
+
.map((i) => `- [${i.id}] ${i.name}${i.description ? `\n ${truncate(i.description, 200)}` : ''}`)
|
|
100
|
+
.join('\n')}`;
|
|
101
|
+
const budgetBlock = typeof maxFiles === 'number' && maxFiles > 0
|
|
102
|
+
? `\n**Budget**: Read at most ${maxFiles} files. Prioritise files most likely to harbour smells (large modules, frequently-edited code per \`git log\`, files with \`any\`/\`@ts-ignore\`, hot data-access paths) over test fixtures and generated code. If the scope is larger than the budget, stop when you hit it and report truncation in \`summary\`.`
|
|
103
|
+
: '';
|
|
104
|
+
const categoryBlock = categories && categories.length > 0
|
|
105
|
+
? `\n**Category filter**: only file findings whose \`category\` is one of: ${categories.join(', ')}. Drop everything else.`
|
|
106
|
+
: '';
|
|
107
|
+
return `${productBlock}
|
|
108
|
+
|
|
109
|
+
${scopeBlock}${filesHint}${budgetBlock}${categoryBlock}
|
|
110
|
+
|
|
111
|
+
${issuesBlock}
|
|
112
|
+
|
|
113
|
+
## How to work
|
|
114
|
+
|
|
115
|
+
1. Identify the files in scope (per the scope block above).
|
|
116
|
+
2. For each file, Read it and look for the smell categories listed in the system prompt.
|
|
117
|
+
3. When you suspect a smell, re-read the surrounding context to confirm the *benefit* of changing it. If you can't name the benefit, drop it.
|
|
118
|
+
4. If something looks like a real bug (not a smell), drop it — \`edsger find-bugs\` covers that.
|
|
119
|
+
5. Cross-check every candidate against the existing issues list. Drop overlaps.
|
|
120
|
+
6. Produce the final JSON described in the system prompt.
|
|
121
|
+
|
|
122
|
+
Begin.`;
|
|
123
|
+
}
|
|
124
|
+
function truncate(s, n) {
|
|
125
|
+
if (s.length <= n) {
|
|
126
|
+
return s;
|
|
127
|
+
}
|
|
128
|
+
return `${s.slice(0, n)}…`;
|
|
129
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-product scan state for find-smells. Storage at
|
|
3
|
+
* `~/.edsger/find-smells-state/<productId>.json`.
|
|
4
|
+
*
|
|
5
|
+
* Same schema shape as find-bugs (incremental sha tracking) — file/lock
|
|
6
|
+
* machinery shared via createScanStateModule. Kept as a sibling state file
|
|
7
|
+
* (not merged with find-bugs) so a smell scan and a bug scan can run
|
|
8
|
+
* concurrently without contending on the same lock.
|
|
9
|
+
*/
|
|
10
|
+
import { type LockHandle } from '../find-shared/scan-state.js';
|
|
11
|
+
export type { LockHandle };
|
|
12
|
+
export interface FindSmellsState {
|
|
13
|
+
lastScannedCommitSha?: string;
|
|
14
|
+
lastScannedAt?: string;
|
|
15
|
+
lastAttemptedAt?: string;
|
|
16
|
+
lastError?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const loadFindSmellsState: (productId: string) => FindSmellsState;
|
|
19
|
+
export declare const saveFindSmellsState: (productId: string, state: FindSmellsState) => void;
|
|
20
|
+
export declare const updateFindSmellsState: (productId: string, patch: Partial<FindSmellsState>) => FindSmellsState;
|
|
21
|
+
export declare const acquireFindSmellsLock: (productId: string, staleAfterMs?: number) => LockHandle | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-product scan state for find-smells. Storage at
|
|
3
|
+
* `~/.edsger/find-smells-state/<productId>.json`.
|
|
4
|
+
*
|
|
5
|
+
* Same schema shape as find-bugs (incremental sha tracking) — file/lock
|
|
6
|
+
* machinery shared via createScanStateModule. Kept as a sibling state file
|
|
7
|
+
* (not merged with find-bugs) so a smell scan and a bug scan can run
|
|
8
|
+
* concurrently without contending on the same lock.
|
|
9
|
+
*/
|
|
10
|
+
import { createScanStateModule, } from '../find-shared/scan-state.js';
|
|
11
|
+
const m = createScanStateModule({
|
|
12
|
+
dirName: 'find-smells-state',
|
|
13
|
+
});
|
|
14
|
+
export const loadFindSmellsState = m.load;
|
|
15
|
+
export const saveFindSmellsState = m.save;
|
|
16
|
+
export const updateFindSmellsState = m.update;
|
|
17
|
+
export const acquireFindSmellsLock = m.acquireLock;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the find-smells phase.
|
|
3
|
+
*
|
|
4
|
+
* A "smell" here is anything the codebase would benefit from changing but that
|
|
5
|
+
* is **not** a real bug (find-bugs handles those) and **not** a missing feature
|
|
6
|
+
* (find-features handles those). Refactor candidates, dead code, performance
|
|
7
|
+
* cliffs, type-safety gaps, and over-complex modules all live here.
|
|
8
|
+
*/
|
|
9
|
+
export type SmellSeverity = 'high' | 'medium' | 'low';
|
|
10
|
+
/**
|
|
11
|
+
* Authoritative list of allowed categories. Kept as a `const` array so the
|
|
12
|
+
* type and the runtime whitelist can never drift apart — `SmellCategory` is
|
|
13
|
+
* derived from it, and `isSmellCategory` checks against it.
|
|
14
|
+
*/
|
|
15
|
+
export declare const SMELL_CATEGORIES: readonly ["refactor", "performance", "duplication", "complexity", "dead_code", "type_safety", "readability", "architecture", "other"];
|
|
16
|
+
export type SmellCategory = (typeof SMELL_CATEGORIES)[number];
|
|
17
|
+
export declare function isSmellCategory(value: unknown): value is SmellCategory;
|
|
18
|
+
export interface SmellFinding {
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
file: string;
|
|
22
|
+
line?: number;
|
|
23
|
+
severity: SmellSeverity;
|
|
24
|
+
category: SmellCategory;
|
|
25
|
+
/** Stable signature for log/audit; not used for storage dedup. */
|
|
26
|
+
dedup_signature?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A finding the agent saw but is handing off to a sibling phase rather than
|
|
30
|
+
* filing as a smell. Surfaced in the run log so the user knows the work
|
|
31
|
+
* wasn't silently lost — they can run `edsger find-bugs` / `find-features`
|
|
32
|
+
* to pick it up.
|
|
33
|
+
*/
|
|
34
|
+
export interface DeferredFinding {
|
|
35
|
+
title: string;
|
|
36
|
+
/** One-line reason the agent thinks the sibling phase owns this. */
|
|
37
|
+
reason: string;
|
|
38
|
+
file?: string;
|
|
39
|
+
line?: number;
|
|
40
|
+
}
|
|
41
|
+
export declare function isDeferredFinding(value: unknown): value is DeferredFinding;
|
|
42
|
+
export interface ScanResult {
|
|
43
|
+
summary: string;
|
|
44
|
+
scanned_commit_sha?: string;
|
|
45
|
+
smells: SmellFinding[];
|
|
46
|
+
/** Findings the agent thinks belong in `edsger find-bugs`. */
|
|
47
|
+
deferred_to_bugs?: DeferredFinding[];
|
|
48
|
+
/** Findings the agent thinks belong in `edsger find-features`. */
|
|
49
|
+
deferred_to_features?: DeferredFinding[];
|
|
50
|
+
}
|
|
51
|
+
export declare function isScanResult(value: unknown): value is ScanResult;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the find-smells phase.
|
|
3
|
+
*
|
|
4
|
+
* A "smell" here is anything the codebase would benefit from changing but that
|
|
5
|
+
* is **not** a real bug (find-bugs handles those) and **not** a missing feature
|
|
6
|
+
* (find-features handles those). Refactor candidates, dead code, performance
|
|
7
|
+
* cliffs, type-safety gaps, and over-complex modules all live here.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Authoritative list of allowed categories. Kept as a `const` array so the
|
|
11
|
+
* type and the runtime whitelist can never drift apart — `SmellCategory` is
|
|
12
|
+
* derived from it, and `isSmellCategory` checks against it.
|
|
13
|
+
*/
|
|
14
|
+
export const SMELL_CATEGORIES = [
|
|
15
|
+
'refactor',
|
|
16
|
+
'performance',
|
|
17
|
+
'duplication',
|
|
18
|
+
'complexity',
|
|
19
|
+
'dead_code',
|
|
20
|
+
'type_safety',
|
|
21
|
+
'readability',
|
|
22
|
+
'architecture',
|
|
23
|
+
'other',
|
|
24
|
+
];
|
|
25
|
+
export function isSmellCategory(value) {
|
|
26
|
+
return (typeof value === 'string' &&
|
|
27
|
+
SMELL_CATEGORIES.includes(value));
|
|
28
|
+
}
|
|
29
|
+
export function isDeferredFinding(value) {
|
|
30
|
+
if (!value || typeof value !== 'object') {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
const v = value;
|
|
34
|
+
return typeof v.title === 'string' && typeof v.reason === 'string';
|
|
35
|
+
}
|
|
36
|
+
export function isScanResult(value) {
|
|
37
|
+
if (!value || typeof value !== 'object') {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
const v = value;
|
|
41
|
+
if (typeof v.summary !== 'string' || !Array.isArray(v.smells)) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
const smellsOk = v.smells.every((s) => s &&
|
|
45
|
+
typeof s === 'object' &&
|
|
46
|
+
typeof s.title === 'string' &&
|
|
47
|
+
typeof s.description === 'string' &&
|
|
48
|
+
typeof s.file === 'string');
|
|
49
|
+
if (!smellsOk) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
// Deferred arrays are optional but, if present, must be well-formed —
|
|
53
|
+
// otherwise we'd silently drop hand-offs the agent intended us to log.
|
|
54
|
+
for (const key of ['deferred_to_bugs', 'deferred_to_features']) {
|
|
55
|
+
const arr = v[key];
|
|
56
|
+
if (arr === undefined) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
if (!Array.isArray(arr) || !arr.every(isDeferredFinding)) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
@@ -2,7 +2,7 @@ import { type ChecklistPhaseContext } from '../../services/checklist.js';
|
|
|
2
2
|
import { type EdsgerConfig } from '../../types/index.js';
|
|
3
3
|
import { type TestReportResult } from './test-report-creator.js';
|
|
4
4
|
export interface FunctionalTestingOptions {
|
|
5
|
-
|
|
5
|
+
issueId: string;
|
|
6
6
|
verbose?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export interface StructuredTestResult {
|
|
@@ -28,7 +28,7 @@ export interface StructuredTestResult {
|
|
|
28
28
|
}[];
|
|
29
29
|
}
|
|
30
30
|
export interface FunctionalTestingResult {
|
|
31
|
-
|
|
31
|
+
issueId: string;
|
|
32
32
|
testStatus: 'testing_passed' | 'testing_failed';
|
|
33
33
|
structuredTestResult: StructuredTestResult | null;
|
|
34
34
|
testReport?: TestReportResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable max-lines -- orchestration module with test execution, result processing, and report generation */
|
|
2
2
|
import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
3
|
-
import {
|
|
3
|
+
import { updateIssueStatus } from '../../api/issues/index.js';
|
|
4
4
|
import { getMcpServerUrl, getMcpToken } from '../../auth/auth-store.js';
|
|
5
5
|
import { DEFAULT_MODEL } from '../../constants.js';
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -170,11 +170,11 @@ function parseTestResult(responseText) {
|
|
|
170
170
|
/**
|
|
171
171
|
* Resolve the branch to use for testing
|
|
172
172
|
*/
|
|
173
|
-
async function resolveTestBranch(
|
|
174
|
-
let branchName = `dev/${
|
|
173
|
+
async function resolveTestBranch(issueId, verbose) {
|
|
174
|
+
let branchName = `dev/${issueId}`;
|
|
175
175
|
let currentBranch = null;
|
|
176
176
|
try {
|
|
177
|
-
currentBranch = await getReadyForReviewBranch({
|
|
177
|
+
currentBranch = await getReadyForReviewBranch({ issueId, verbose });
|
|
178
178
|
if (currentBranch?.branch_name) {
|
|
179
179
|
branchName = currentBranch.branch_name;
|
|
180
180
|
if (verbose) {
|
|
@@ -188,7 +188,7 @@ async function resolveTestBranch(featureId, verbose) {
|
|
|
188
188
|
}
|
|
189
189
|
catch (_error) {
|
|
190
190
|
if (verbose) {
|
|
191
|
-
logInfo(`Note: Could not fetch
|
|
191
|
+
logInfo(`Note: Could not fetch issue branches, using default branch`);
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
return { branchName, currentBranch };
|
|
@@ -196,9 +196,9 @@ async function resolveTestBranch(featureId, verbose) {
|
|
|
196
196
|
/**
|
|
197
197
|
* Fetch feedbacks for testing context
|
|
198
198
|
*/
|
|
199
|
-
async function fetchTestingFeedbacks(
|
|
199
|
+
async function fetchTestingFeedbacks(issueId, currentBranch, verbose) {
|
|
200
200
|
try {
|
|
201
|
-
const feedbacksContext = await getFeedbacksForPhase({
|
|
201
|
+
const feedbacksContext = await getFeedbacksForPhase({ issueId, verbose }, 'functional_testing', currentBranch?.id);
|
|
202
202
|
if (feedbacksContext.feedbacks.length > 0) {
|
|
203
203
|
const info = await formatFeedbacksForContext(feedbacksContext);
|
|
204
204
|
if (verbose) {
|
|
@@ -217,7 +217,7 @@ async function fetchTestingFeedbacks(featureId, currentBranch, verbose) {
|
|
|
217
217
|
/**
|
|
218
218
|
* Map test results to existing test cases by name matching
|
|
219
219
|
*/
|
|
220
|
-
async function mapTestResultsToTestCases(structuredTestResult,
|
|
220
|
+
async function mapTestResultsToTestCases(structuredTestResult, issueId, verbose) {
|
|
221
221
|
if (!structuredTestResult.test_cases?.length) {
|
|
222
222
|
return undefined;
|
|
223
223
|
}
|
|
@@ -233,7 +233,7 @@ async function mapTestResultsToTestCases(structuredTestResult, featureId, verbos
|
|
|
233
233
|
body: JSON.stringify({
|
|
234
234
|
jsonrpc: '2.0',
|
|
235
235
|
method: 'test_cases/list',
|
|
236
|
-
params: {
|
|
236
|
+
params: { issue_id: issueId },
|
|
237
237
|
id: Math.random().toString(36).substring(7),
|
|
238
238
|
}),
|
|
239
239
|
});
|
|
@@ -275,12 +275,12 @@ async function mapTestResultsToTestCases(structuredTestResult, featureId, verbos
|
|
|
275
275
|
/**
|
|
276
276
|
* Save test status and create test report
|
|
277
277
|
*/
|
|
278
|
-
async function saveTestResults(
|
|
278
|
+
async function saveTestResults(issueId, testStatus, structuredTestResult, lastAssistantResponse, verbose) {
|
|
279
279
|
if (verbose) {
|
|
280
280
|
logInfo('Saving test results...');
|
|
281
281
|
}
|
|
282
|
-
const statusSaved = await
|
|
283
|
-
|
|
282
|
+
const statusSaved = await updateIssueStatus({
|
|
283
|
+
issueId,
|
|
284
284
|
status: testStatus,
|
|
285
285
|
verbose,
|
|
286
286
|
});
|
|
@@ -289,7 +289,7 @@ async function saveTestResults(featureId, testStatus, structuredTestResult, last
|
|
|
289
289
|
logInfo('Direct status update failed, trying HTTP fallback...');
|
|
290
290
|
}
|
|
291
291
|
const fallbackSaved = await saveFunctionalTestResultsWithRetry({
|
|
292
|
-
|
|
292
|
+
issueId,
|
|
293
293
|
testStatus,
|
|
294
294
|
testResults: structuredTestResult?.execution_details || lastAssistantResponse,
|
|
295
295
|
verbose,
|
|
@@ -311,9 +311,9 @@ async function saveTestResults(featureId, testStatus, structuredTestResult, last
|
|
|
311
311
|
testResults: structuredTestResult.execution_details || lastAssistantResponse,
|
|
312
312
|
status: testStatus,
|
|
313
313
|
};
|
|
314
|
-
const testResults = await mapTestResultsToTestCases(structuredTestResult,
|
|
314
|
+
const testResults = await mapTestResultsToTestCases(structuredTestResult, issueId, verbose);
|
|
315
315
|
const testReportResult = await createTestReport({
|
|
316
|
-
|
|
316
|
+
issueId,
|
|
317
317
|
testReportData,
|
|
318
318
|
testResults,
|
|
319
319
|
verbose,
|
|
@@ -328,22 +328,22 @@ async function saveTestResults(featureId, testStatus, structuredTestResult, last
|
|
|
328
328
|
}
|
|
329
329
|
// eslint-disable-next-line complexity
|
|
330
330
|
export const runFunctionalTesting = async (options, config, checklistContext) => {
|
|
331
|
-
const {
|
|
331
|
+
const { issueId, verbose } = options;
|
|
332
332
|
if (verbose) {
|
|
333
|
-
logInfo(`Starting functional testing for
|
|
333
|
+
logInfo(`Starting functional testing for issue ID: ${issueId}`);
|
|
334
334
|
}
|
|
335
|
-
const { branchName, currentBranch } = await resolveTestBranch(
|
|
335
|
+
const { branchName, currentBranch } = await resolveTestBranch(issueId, verbose);
|
|
336
336
|
const cleanupGit = currentBranch
|
|
337
337
|
? prepareCustomBranchGitEnvironment(branchName, 'main', verbose)
|
|
338
|
-
: preparePhaseGitEnvironment(
|
|
338
|
+
: preparePhaseGitEnvironment(issueId, 'main', verbose);
|
|
339
339
|
try {
|
|
340
340
|
if (verbose) {
|
|
341
|
-
logInfo('Fetching
|
|
341
|
+
logInfo('Fetching issue testing context via MCP endpoints...');
|
|
342
342
|
}
|
|
343
|
-
const context = await fetchFunctionalTestingContext(
|
|
344
|
-
const feedbacksInfo = await fetchTestingFeedbacks(
|
|
345
|
-
const systemPrompt = createSystemPrompt(config,
|
|
346
|
-
const testingPrompt = createTestingPromptWithContext(
|
|
343
|
+
const context = await fetchFunctionalTestingContext(issueId, verbose);
|
|
344
|
+
const feedbacksInfo = await fetchTestingFeedbacks(issueId, currentBranch, verbose);
|
|
345
|
+
const systemPrompt = createSystemPrompt(config, issueId);
|
|
346
|
+
const testingPrompt = createTestingPromptWithContext(issueId, context, checklistContext, verbose, feedbacksInfo);
|
|
347
347
|
let lastAssistantResponse = '';
|
|
348
348
|
let structuredTestResult = null;
|
|
349
349
|
let testStatus = 'testing_failed';
|
|
@@ -402,10 +402,10 @@ export const runFunctionalTesting = async (options, config, checklistContext) =>
|
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
-
const testReportResult = await saveTestResults(
|
|
405
|
+
const testReportResult = await saveTestResults(issueId, testStatus, structuredTestResult, lastAssistantResponse, verbose);
|
|
406
406
|
if (structuredTestResult) {
|
|
407
407
|
return {
|
|
408
|
-
|
|
408
|
+
issueId,
|
|
409
409
|
testStatus,
|
|
410
410
|
structuredTestResult,
|
|
411
411
|
testReport: testReportResult,
|
|
@@ -417,7 +417,7 @@ export const runFunctionalTesting = async (options, config, checklistContext) =>
|
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
419
|
return {
|
|
420
|
-
|
|
420
|
+
issueId,
|
|
421
421
|
testStatus: 'testing_failed',
|
|
422
422
|
structuredTestResult: null,
|
|
423
423
|
testReport: testReportResult,
|
|
@@ -428,14 +428,14 @@ export const runFunctionalTesting = async (options, config, checklistContext) =>
|
|
|
428
428
|
catch (error) {
|
|
429
429
|
logError(`Functional testing failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
430
430
|
try {
|
|
431
|
-
const errorSaved = await
|
|
432
|
-
|
|
431
|
+
const errorSaved = await updateIssueStatus({
|
|
432
|
+
issueId,
|
|
433
433
|
status: 'testing_failed',
|
|
434
434
|
verbose,
|
|
435
435
|
});
|
|
436
436
|
if (!errorSaved) {
|
|
437
437
|
await saveFunctionalTestResultsWithRetry({
|
|
438
|
-
|
|
438
|
+
issueId,
|
|
439
439
|
testStatus: 'testing_failed',
|
|
440
440
|
testResults: `Testing failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
441
441
|
verbose,
|
|
@@ -448,7 +448,7 @@ export const runFunctionalTesting = async (options, config, checklistContext) =>
|
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
return {
|
|
451
|
-
|
|
451
|
+
issueId,
|
|
452
452
|
testStatus: 'testing_failed',
|
|
453
453
|
structuredTestResult: null,
|
|
454
454
|
status: 'error',
|
|
@@ -459,9 +459,9 @@ export const runFunctionalTesting = async (options, config, checklistContext) =>
|
|
|
459
459
|
cleanupGit();
|
|
460
460
|
}
|
|
461
461
|
};
|
|
462
|
-
const createSystemPrompt = (_config, mcpServerUrl, mcpToken,
|
|
462
|
+
const createSystemPrompt = (_config, mcpServerUrl, mcpToken, issueId) => {
|
|
463
463
|
let mcpInstructions = '';
|
|
464
|
-
if (mcpServerUrl && mcpToken &&
|
|
464
|
+
if (mcpServerUrl && mcpToken && issueId) {
|
|
465
465
|
mcpInstructions = `
|
|
466
466
|
|
|
467
467
|
**MANDATORY Checklist Compliance**:
|
|
@@ -478,7 +478,7 @@ CRITICAL: Checklists are not optional suggestions - they are mandatory quality g
|
|
|
478
478
|
}
|
|
479
479
|
return `You are a professional QA automation engineer performing comprehensive functional testing using headless Playwright MCP.
|
|
480
480
|
|
|
481
|
-
**Your Role**: Execute end-to-end functional tests for implemented
|
|
481
|
+
**Your Role**: Execute end-to-end functional tests for implemented issues using headless browser automation.
|
|
482
482
|
|
|
483
483
|
**Available Tools**:
|
|
484
484
|
- Headless Playwright MCP: Full headless browser automation capabilities for testing
|
|
@@ -508,8 +508,8 @@ CRITICAL: Checklists are not optional suggestions - they are mandatory quality g
|
|
|
508
508
|
- Optimize for performance in headless environments
|
|
509
509
|
|
|
510
510
|
**Important Notes**:
|
|
511
|
-
- The
|
|
512
|
-
- All
|
|
511
|
+
- The issue has already been implemented - you're testing existing functionality
|
|
512
|
+
- All issue information, user stories, test cases, and credentials are provided in the prompt
|
|
513
513
|
- You need to start the development server yourself (npm run dev, etc.)
|
|
514
514
|
- Use the provided login credentials for authentication
|
|
515
515
|
- ALWAYS configure browser in HEADLESS mode for better performance and CI/CD compatibility
|
|
@@ -558,7 +558,7 @@ IMPORTANT: In the checklist context, look for lines that say "ID: [UUID]" in the
|
|
|
558
558
|
|
|
559
559
|
Focus on systematic testing based on the provided context information.${mcpInstructions}`;
|
|
560
560
|
};
|
|
561
|
-
const createTestingPromptWithContext = (
|
|
561
|
+
const createTestingPromptWithContext = (issueId, context, checklistContext, verbose, feedbacksInfo) => {
|
|
562
562
|
const contextInfo = formatContextForPrompt(context);
|
|
563
563
|
let finalContextInfo = contextInfo;
|
|
564
564
|
// Add feedbacks context to the testing prompt
|
|
@@ -573,7 +573,7 @@ const createTestingPromptWithContext = (featureId, context, checklistContext, ve
|
|
|
573
573
|
logInfo(`Added ${checklistContext.checklists.length} checklists to testing context`);
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
return `Please perform comprehensive functional testing for
|
|
576
|
+
return `Please perform comprehensive functional testing for issue ID: ${issueId}
|
|
577
577
|
|
|
578
578
|
${finalContextInfo}
|
|
579
579
|
|
|
@@ -590,7 +590,7 @@ Follow this systematic approach:
|
|
|
590
590
|
- Log in using the provided credentials from the environment configuration
|
|
591
591
|
- Test each user story requirement systematically
|
|
592
592
|
- Execute all test cases, especially the CRITICAL ones
|
|
593
|
-
- Verify the
|
|
593
|
+
- Verify the issue works according to the technical design
|
|
594
594
|
- Test error handling and edge cases
|
|
595
595
|
|
|
596
596
|
3. **Report Results**: Provide detailed test results including:
|
|
@@ -604,7 +604,7 @@ Follow this systematic approach:
|
|
|
604
604
|
- Focus on the critical test cases marked as [CRITICAL]
|
|
605
605
|
- Ensure all user stories are properly validated
|
|
606
606
|
- Test both positive and negative scenarios
|
|
607
|
-
- The
|
|
607
|
+
- The issue should already be implemented - you're validating existing functionality
|
|
608
608
|
- Use the login credentials provided in the environment configuration
|
|
609
609
|
- Be thorough but efficient in your testing approach
|
|
610
610
|
|
|
@@ -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 FunctionalTestingContext {
|
|
4
|
-
|
|
4
|
+
issue: IssueInfo;
|
|
5
5
|
product: ProductInfo;
|
|
6
6
|
user_stories: UserStory[];
|
|
7
7
|
test_cases: TestCase[];
|
|
@@ -9,7 +9,7 @@ export interface FunctionalTestingContext {
|
|
|
9
9
|
/**
|
|
10
10
|
* Fetch all functional testing context information via MCP endpoints
|
|
11
11
|
*/
|
|
12
|
-
export declare function fetchFunctionalTestingContext(
|
|
12
|
+
export declare function fetchFunctionalTestingContext(issueId: string, verbose?: boolean): Promise<FunctionalTestingContext>;
|
|
13
13
|
/**
|
|
14
14
|
* Format the context into a readable string for Claude Code
|
|
15
15
|
*/
|
|
@@ -1,30 +1,30 @@
|
|
|
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 functional testing context information via MCP endpoints
|
|
6
6
|
*/
|
|
7
|
-
export async function fetchFunctionalTestingContext(
|
|
7
|
+
export async function fetchFunctionalTestingContext(issueId, verbose) {
|
|
8
8
|
try {
|
|
9
9
|
if (verbose) {
|
|
10
|
-
logInfo(`Fetching complete functional testing context for
|
|
10
|
+
logInfo(`Fetching complete functional testing 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(`✅ Functional testing 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}`);
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
|
-
|
|
27
|
+
issue,
|
|
28
28
|
product,
|
|
29
29
|
user_stories: userStories,
|
|
30
30
|
test_cases: testCases,
|
|
@@ -60,11 +60,11 @@ export function formatContextForPrompt(context) {
|
|
|
60
60
|
};
|
|
61
61
|
return `# Functional Testing Context
|
|
62
62
|
|
|
63
|
-
##
|
|
64
|
-
- **ID**: ${context.
|
|
65
|
-
- **Name**: ${context.
|
|
66
|
-
- **Description**: ${context.
|
|
67
|
-
- **Current Status**: ${context.
|
|
63
|
+
## Issue Information
|
|
64
|
+
- **ID**: ${context.issue.id}
|
|
65
|
+
- **Name**: ${context.issue.name}
|
|
66
|
+
- **Description**: ${context.issue.description || 'No description provided'}
|
|
67
|
+
- **Current Status**: ${context.issue.status}
|
|
68
68
|
|
|
69
69
|
## Product Information
|
|
70
70
|
- **Product**: ${context.product.name}
|
|
@@ -79,5 +79,5 @@ ${formatTestCases(context.test_cases)}
|
|
|
79
79
|
|
|
80
80
|
---
|
|
81
81
|
|
|
82
|
-
**Testing Instructions**: The
|
|
82
|
+
**Testing Instructions**: The issue has been implemented. Execute comprehensive functional testing using headless Playwright to verify all user stories work correctly and all test cases pass. Test both positive and negative scenarios.`;
|
|
83
83
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
interface SaveFunctionalTestResultsOptions {
|
|
2
|
-
|
|
2
|
+
issueId: string;
|
|
3
3
|
testStatus: 'testing_in_progress' | 'testing_passed' | 'testing_failed';
|
|
4
4
|
testResults?: string;
|
|
5
5
|
verbose?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare function saveFunctionalTestResultsViaHttp(options: SaveFunctionalTestResultsOptions): Promise<boolean>;
|
|
8
|
-
export declare function verifyTestStatusSaved(
|
|
8
|
+
export declare function verifyTestStatusSaved(issueId: string, verbose?: boolean, expectedStatus?: string): Promise<boolean>;
|
|
9
9
|
export declare function saveFunctionalTestResultsWithRetry(options: SaveFunctionalTestResultsOptions, maxRetries?: number): Promise<boolean>;
|
|
10
10
|
export {};
|