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
|
@@ -350,34 +350,34 @@ export function pullLatestFromBranch(branch, verbose, githubToken) {
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
/**
|
|
353
|
-
* Switch to
|
|
353
|
+
* Switch to issue branch and rebase with main
|
|
354
354
|
* This should be called at the START of each phase
|
|
355
355
|
*
|
|
356
|
-
* @param
|
|
356
|
+
* @param issueBranch - The issue branch to switch to (e.g., "dev/issue-id")
|
|
357
357
|
* @param baseBranch - The base branch to rebase from (usually "main")
|
|
358
358
|
* @param verbose - Whether to log verbose output
|
|
359
359
|
* @returns Object containing the previous branch name
|
|
360
360
|
*/
|
|
361
361
|
// eslint-disable-next-line complexity -- git branch management with rebase, conflict handling, and fallback strategies
|
|
362
|
-
export function
|
|
362
|
+
export function switchToIssueBranchAndRebase(issueBranch, baseBranch = 'main', verbose, githubToken) {
|
|
363
363
|
const previousBranch = getCurrentBranch();
|
|
364
364
|
if (verbose) {
|
|
365
|
-
logInfo(`\n🔄 Preparing
|
|
365
|
+
logInfo(`\n🔄 Preparing issue branch: ${issueBranch}`);
|
|
366
366
|
logInfo(` Current branch: ${previousBranch}`);
|
|
367
367
|
}
|
|
368
|
-
// If
|
|
369
|
-
if (!branchExists(
|
|
368
|
+
// If issue branch doesn't exist, we need to create it from base branch
|
|
369
|
+
if (!branchExists(issueBranch)) {
|
|
370
370
|
if (verbose) {
|
|
371
|
-
logInfo(`
|
|
371
|
+
logInfo(` Issue branch ${issueBranch} doesn't exist, will create from ${baseBranch}`);
|
|
372
372
|
}
|
|
373
|
-
// First, ensure we're on the base branch to create
|
|
373
|
+
// First, ensure we're on the base branch to create issue branch from it
|
|
374
374
|
if (previousBranch !== baseBranch) {
|
|
375
375
|
if (verbose) {
|
|
376
376
|
logInfo(` Switching to ${baseBranch} first...`);
|
|
377
377
|
}
|
|
378
378
|
switchToBranch(baseBranch, verbose);
|
|
379
379
|
}
|
|
380
|
-
// Pull latest base branch before creating
|
|
380
|
+
// Pull latest base branch before creating issue branch
|
|
381
381
|
try {
|
|
382
382
|
if (verbose) {
|
|
383
383
|
logInfo(` Pulling latest ${baseBranch}...`);
|
|
@@ -390,12 +390,12 @@ export function switchToFeatureBranchAndRebase(featureBranch, baseBranch = 'main
|
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
// Switch to
|
|
393
|
+
// Switch to issue branch (will create if doesn't exist)
|
|
394
394
|
// Default behavior now checks remote first (handles multi-clone scenarios)
|
|
395
|
-
if (getCurrentBranch() !==
|
|
396
|
-
switchToBranch(
|
|
395
|
+
if (getCurrentBranch() !== issueBranch) {
|
|
396
|
+
switchToBranch(issueBranch, verbose, { githubToken });
|
|
397
397
|
}
|
|
398
|
-
// Sync with remote
|
|
398
|
+
// Sync with remote issue branch if it exists and local branch needs updating
|
|
399
399
|
// This handles the case where local branch exists but is behind remote
|
|
400
400
|
try {
|
|
401
401
|
// Check for uncommitted changes and reset if found before any git operations
|
|
@@ -411,58 +411,58 @@ export function switchToFeatureBranchAndRebase(featureBranch, baseBranch = 'main
|
|
|
411
411
|
encoding: 'utf-8',
|
|
412
412
|
stdio: 'pipe',
|
|
413
413
|
});
|
|
414
|
-
// Check if remote
|
|
414
|
+
// Check if remote issue branch exists
|
|
415
415
|
try {
|
|
416
|
-
execSync(`git rev-parse --verify origin/${
|
|
416
|
+
execSync(`git rev-parse --verify origin/${issueBranch}`, {
|
|
417
417
|
encoding: 'utf-8',
|
|
418
418
|
stdio: 'pipe',
|
|
419
419
|
});
|
|
420
420
|
// Remote branch exists, check if we need to sync
|
|
421
421
|
// Get local and remote commit SHAs
|
|
422
|
-
const localSha = execSync(`git rev-parse ${
|
|
422
|
+
const localSha = execSync(`git rev-parse ${issueBranch}`, {
|
|
423
423
|
encoding: 'utf-8',
|
|
424
424
|
stdio: 'pipe',
|
|
425
425
|
}).trim();
|
|
426
|
-
const remoteSha = execSync(`git rev-parse origin/${
|
|
426
|
+
const remoteSha = execSync(`git rev-parse origin/${issueBranch}`, {
|
|
427
427
|
encoding: 'utf-8',
|
|
428
428
|
stdio: 'pipe',
|
|
429
429
|
}).trim();
|
|
430
430
|
if (localSha !== remoteSha) {
|
|
431
431
|
// Local and remote differ, reset to remote
|
|
432
432
|
if (verbose) {
|
|
433
|
-
logInfo(`📥 Syncing with remote
|
|
433
|
+
logInfo(`📥 Syncing with remote issue branch origin/${issueBranch}...`);
|
|
434
434
|
logInfo(` Local: ${localSha.substring(0, 7)}`);
|
|
435
435
|
logInfo(` Remote: ${remoteSha.substring(0, 7)}`);
|
|
436
436
|
}
|
|
437
437
|
// Reset local branch to match remote branch
|
|
438
438
|
// This ensures we have all commits from the remote (e.g., from another machine)
|
|
439
|
-
execSync(`git reset --hard origin/${
|
|
439
|
+
execSync(`git reset --hard origin/${issueBranch}`, {
|
|
440
440
|
encoding: 'utf-8',
|
|
441
441
|
stdio: 'pipe',
|
|
442
442
|
});
|
|
443
443
|
if (verbose) {
|
|
444
|
-
logInfo(`✅ Synced local branch with origin/${
|
|
444
|
+
logInfo(`✅ Synced local branch with origin/${issueBranch}`);
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
else if (verbose) {
|
|
448
|
-
logInfo(`✅ Local branch is up to date with origin/${
|
|
448
|
+
logInfo(`✅ Local branch is up to date with origin/${issueBranch}`);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
catch (_e) {
|
|
452
452
|
// Remote branch doesn't exist, that's fine - we'll push later
|
|
453
453
|
if (verbose) {
|
|
454
|
-
logInfo(` Remote branch origin/${
|
|
454
|
+
logInfo(` Remote branch origin/${issueBranch} doesn't exist yet, will create on push`);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
catch (_error) {
|
|
459
459
|
if (verbose) {
|
|
460
|
-
logInfo(`⚠️ Could not sync with remote
|
|
460
|
+
logInfo(`⚠️ Could not sync with remote issue branch, continuing with local branch`);
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
// Rebase
|
|
463
|
+
// Rebase issue branch with latest main
|
|
464
464
|
if (verbose) {
|
|
465
|
-
logInfo(`📥 Rebasing ${
|
|
465
|
+
logInfo(`📥 Rebasing ${issueBranch} with origin/${baseBranch}...`);
|
|
466
466
|
}
|
|
467
467
|
try {
|
|
468
468
|
// Check for uncommitted changes and reset if found
|
|
@@ -478,7 +478,7 @@ export function switchToFeatureBranchAndRebase(featureBranch, baseBranch = 'main
|
|
|
478
478
|
stdio: verbose ? 'inherit' : 'pipe',
|
|
479
479
|
});
|
|
480
480
|
if (verbose) {
|
|
481
|
-
logInfo(`✅ Successfully rebased ${
|
|
481
|
+
logInfo(`✅ Successfully rebased ${issueBranch} with origin/${baseBranch}\n`);
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
484
|
catch (error) {
|
|
@@ -492,8 +492,8 @@ export function switchToFeatureBranchAndRebase(featureBranch, baseBranch = 'main
|
|
|
492
492
|
catch (_abortError) {
|
|
493
493
|
// Rebase abort failed or wasn't needed, that's okay
|
|
494
494
|
}
|
|
495
|
-
throw new Error(`Failed to rebase ${
|
|
496
|
-
`This usually means there are conflicts between your
|
|
495
|
+
throw new Error(`Failed to rebase ${issueBranch} with ${baseBranch}: ${error instanceof Error ? error.message : String(error)}\n` +
|
|
496
|
+
`This usually means there are conflicts between your issue branch and main branch.\n` +
|
|
497
497
|
`Please resolve conflicts manually and try again.`);
|
|
498
498
|
}
|
|
499
499
|
return { previousBranch };
|
|
@@ -523,7 +523,7 @@ export function returnToMainBranch(baseBranch = 'main', verbose) {
|
|
|
523
523
|
logError(` Resetting uncommitted changes to allow branch switch.`);
|
|
524
524
|
}
|
|
525
525
|
// Reset uncommitted changes to allow clean branch switch
|
|
526
|
-
// The code should already be committed on the
|
|
526
|
+
// The code should already be committed on the issue branch,
|
|
527
527
|
// so these changes are likely from post-commit operations
|
|
528
528
|
resetUncommittedChanges(verbose);
|
|
529
529
|
}
|
|
@@ -533,9 +533,9 @@ export function returnToMainBranch(baseBranch = 'main', verbose) {
|
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
/**
|
|
536
|
-
* Full phase lifecycle: switch to
|
|
536
|
+
* Full phase lifecycle: switch to issue branch, rebase with main, and return a cleanup function
|
|
537
537
|
* Usage:
|
|
538
|
-
* const cleanup = preparePhaseGitEnvironment(
|
|
538
|
+
* const cleanup = preparePhaseGitEnvironment(issueId, baseBranch, verbose)
|
|
539
539
|
* try {
|
|
540
540
|
* // ... phase logic ...
|
|
541
541
|
* } finally {
|
|
@@ -546,18 +546,18 @@ export function returnToMainBranch(baseBranch = 'main', verbose) {
|
|
|
546
546
|
* is in a clean state (rebase aborted). The caller should still call the cleanup function
|
|
547
547
|
* in a finally block to return to the main branch.
|
|
548
548
|
*
|
|
549
|
-
* @param
|
|
549
|
+
* @param issueId - The issue ID (will be used to construct branch name "dev/{issueId}")
|
|
550
550
|
* @param baseBranch - The base branch to rebase from (default: "main")
|
|
551
551
|
* @param verbose - Whether to log verbose output
|
|
552
552
|
* @returns Cleanup function that will return to main branch
|
|
553
553
|
*/
|
|
554
|
-
export function preparePhaseGitEnvironment(
|
|
555
|
-
const
|
|
556
|
-
return prepareCustomBranchGitEnvironment(
|
|
554
|
+
export function preparePhaseGitEnvironment(issueId, baseBranch = 'main', verbose) {
|
|
555
|
+
const issueBranch = `dev/${issueId}`;
|
|
556
|
+
return prepareCustomBranchGitEnvironment(issueBranch, baseBranch, verbose);
|
|
557
557
|
}
|
|
558
558
|
/**
|
|
559
559
|
* Full phase lifecycle with custom branch names for branch chaining support.
|
|
560
|
-
* This allows creating a
|
|
560
|
+
* This allows creating a issue branch from another issue branch (not just main).
|
|
561
561
|
*
|
|
562
562
|
* Usage:
|
|
563
563
|
* const cleanup = prepareCustomBranchGitEnvironment('feat/123/2-api', 'feat/123/1-database', verbose)
|
|
@@ -567,20 +567,20 @@ export function preparePhaseGitEnvironment(featureId, baseBranch = 'main', verbo
|
|
|
567
567
|
* cleanup()
|
|
568
568
|
* }
|
|
569
569
|
*
|
|
570
|
-
* @param
|
|
570
|
+
* @param issueBranch - The issue branch to switch to (e.g., "feat/123/2-api")
|
|
571
571
|
* @param baseBranch - The base branch to rebase from (e.g., "main" or "feat/123/1-database")
|
|
572
572
|
* @param verbose - Whether to log verbose output
|
|
573
573
|
* @returns Cleanup function that will return to main branch
|
|
574
574
|
*/
|
|
575
|
-
export function prepareCustomBranchGitEnvironment(
|
|
575
|
+
export function prepareCustomBranchGitEnvironment(issueBranch, baseBranch = 'main', verbose) {
|
|
576
576
|
// Create cleanup function BEFORE any operations that might fail
|
|
577
|
-
// This ensures cleanup can be called even if
|
|
577
|
+
// This ensures cleanup can be called even if switchToIssueBranchAndRebase throws
|
|
578
578
|
const cleanup = () => {
|
|
579
579
|
returnToMainBranch('main', verbose); // Always return to main, not the baseBranch
|
|
580
580
|
};
|
|
581
581
|
try {
|
|
582
|
-
// Switch to
|
|
583
|
-
|
|
582
|
+
// Switch to issue branch and rebase with base branch
|
|
583
|
+
switchToIssueBranchAndRebase(issueBranch, baseBranch, verbose);
|
|
584
584
|
}
|
|
585
585
|
catch (error) {
|
|
586
586
|
// If setup fails, try to cleanup before re-throwing
|
|
@@ -600,4 +600,4 @@ export function prepareCustomBranchGitEnvironment(featureBranch, baseBranch = 'm
|
|
|
600
600
|
return cleanup;
|
|
601
601
|
}
|
|
602
602
|
// Re-export async operations from separate file for backward compatibility
|
|
603
|
-
export { prepareCustomBranchGitEnvironmentAsync, preparePhaseGitEnvironmentAsync,
|
|
603
|
+
export { prepareCustomBranchGitEnvironmentAsync, preparePhaseGitEnvironmentAsync, switchToIssueBranchAndRebaseAsync, syncFeatBranchWithMain, } from './git-branch-manager-async.js';
|
|
@@ -7,10 +7,10 @@ export interface DownloadedImage {
|
|
|
7
7
|
alt: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Set current
|
|
10
|
+
* Set current issue ID for image downloads
|
|
11
11
|
* Should be called at the start of pipeline execution
|
|
12
12
|
*/
|
|
13
|
-
export declare function
|
|
13
|
+
export declare function setCurrentIssueId(issueId: string): void;
|
|
14
14
|
/**
|
|
15
15
|
* Reset image cache (useful for testing)
|
|
16
16
|
*/
|
|
@@ -20,9 +20,9 @@ export declare function resetImageCache(): void;
|
|
|
20
20
|
* Uses cache to avoid downloading same image multiple times
|
|
21
21
|
*
|
|
22
22
|
* @param markdown - Markdown content with image URLs
|
|
23
|
-
* @param
|
|
23
|
+
* @param issueId - Issue ID for directory naming
|
|
24
24
|
*/
|
|
25
|
-
export declare function downloadImagesForClaudeCode(markdown: string,
|
|
25
|
+
export declare function downloadImagesForClaudeCode(markdown: string, issueId?: string): Promise<{
|
|
26
26
|
processedMarkdown: string;
|
|
27
27
|
downloadedImages: DownloadedImage[];
|
|
28
28
|
}>;
|
|
@@ -30,8 +30,8 @@ function detectImageExtension(url, contentType) {
|
|
|
30
30
|
// Cache for downloaded images in current session
|
|
31
31
|
// Key: image URL, Value: local path
|
|
32
32
|
const imageCache = new Map();
|
|
33
|
-
// Current
|
|
34
|
-
let
|
|
33
|
+
// Current issue ID for directory naming
|
|
34
|
+
let currentIssueId = null;
|
|
35
35
|
/**
|
|
36
36
|
* Generate hash from URL to use as filename
|
|
37
37
|
* This ensures same URL always maps to same file
|
|
@@ -40,20 +40,20 @@ function hashUrl(url) {
|
|
|
40
40
|
return createHash('md5').update(url).digest('hex');
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
* Get or create temp directory for current
|
|
43
|
+
* Get or create temp directory for current issue
|
|
44
44
|
*/
|
|
45
|
-
function getTempDir(
|
|
46
|
-
return join(tmpdir(), 'claude-code-images', `
|
|
45
|
+
function getTempDir(issueId) {
|
|
46
|
+
return join(tmpdir(), 'claude-code-images', `issue-${issueId}`);
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Set current
|
|
49
|
+
* Set current issue ID for image downloads
|
|
50
50
|
* Should be called at the start of pipeline execution
|
|
51
51
|
*/
|
|
52
|
-
export function
|
|
53
|
-
if (
|
|
54
|
-
// Clear cache when switching to different
|
|
52
|
+
export function setCurrentIssueId(issueId) {
|
|
53
|
+
if (currentIssueId !== issueId) {
|
|
54
|
+
// Clear cache when switching to different issue
|
|
55
55
|
imageCache.clear();
|
|
56
|
-
|
|
56
|
+
currentIssueId = issueId;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
@@ -61,29 +61,29 @@ export function setCurrentFeatureId(featureId) {
|
|
|
61
61
|
*/
|
|
62
62
|
export function resetImageCache() {
|
|
63
63
|
imageCache.clear();
|
|
64
|
-
|
|
64
|
+
currentIssueId = null;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Download images from URLs to temporary directory for Claude Code to read
|
|
68
68
|
* Uses cache to avoid downloading same image multiple times
|
|
69
69
|
*
|
|
70
70
|
* @param markdown - Markdown content with image URLs
|
|
71
|
-
* @param
|
|
71
|
+
* @param issueId - Issue ID for directory naming
|
|
72
72
|
*/
|
|
73
|
-
export async function downloadImagesForClaudeCode(markdown,
|
|
73
|
+
export async function downloadImagesForClaudeCode(markdown, issueId) {
|
|
74
74
|
if (!markdown) {
|
|
75
75
|
return { processedMarkdown: markdown, downloadedImages: [] };
|
|
76
76
|
}
|
|
77
|
-
// Use provided
|
|
78
|
-
const
|
|
77
|
+
// Use provided issueId or fall back to currentIssueId or timestamp
|
|
78
|
+
const effectiveIssueId = issueId || currentIssueId || Date.now().toString();
|
|
79
79
|
// Extract all image URLs from markdown
|
|
80
80
|
const imageRegex = /!\[([^\]]*)\]\(([^)]+)\)(?:\{width=\d+\})?/g;
|
|
81
81
|
const matches = Array.from(markdown.matchAll(imageRegex));
|
|
82
82
|
if (matches.length === 0) {
|
|
83
83
|
return { processedMarkdown: markdown, downloadedImages: [] };
|
|
84
84
|
}
|
|
85
|
-
// Create temp directory for this
|
|
86
|
-
const tempDir = getTempDir(
|
|
85
|
+
// Create temp directory for this issue
|
|
86
|
+
const tempDir = getTempDir(effectiveIssueId);
|
|
87
87
|
await mkdir(tempDir, { recursive: true });
|
|
88
88
|
const downloadedImages = [];
|
|
89
89
|
let processedMarkdown = markdown;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Logging utilities for pipeline execution
|
|
3
3
|
*/
|
|
4
4
|
import { type PipelineResult } from '../types/pipeline.js';
|
|
5
|
-
export declare const logPipelineStart: (
|
|
5
|
+
export declare const logPipelineStart: (issueId: string, verbose?: boolean) => void;
|
|
6
6
|
export declare const logPhaseResult: (result: PipelineResult, verbose?: boolean) => PipelineResult;
|
|
7
7
|
export declare const logPipelineComplete: (results: readonly PipelineResult[], verbose?: boolean) => readonly PipelineResult[];
|
|
8
8
|
export declare const shouldContinuePipeline: (results: readonly PipelineResult[]) => boolean;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { logDebug, logError, logSuccess } from './logger.js';
|
|
5
5
|
// Pipeline execution utilities
|
|
6
|
-
export const logPipelineStart = (
|
|
7
|
-
logDebug(`Starting complete pipeline for
|
|
8
|
-
logDebug('Pipeline phases:
|
|
6
|
+
export const logPipelineStart = (issueId, verbose) => {
|
|
7
|
+
logDebug(`Starting complete pipeline for issue: ${issueId}`, verbose);
|
|
8
|
+
logDebug('Pipeline phases: issue-analysis → technical-design → code-implementation → functional-testing', verbose);
|
|
9
9
|
};
|
|
10
10
|
export const logPhaseResult = (result, verbose) => {
|
|
11
11
|
if (verbose) {
|
|
@@ -21,9 +21,9 @@ export const logPhaseResult = (result, verbose) => {
|
|
|
21
21
|
export const logPipelineComplete = (results, verbose) => {
|
|
22
22
|
if (verbose) {
|
|
23
23
|
const lastResult = results[results.length - 1];
|
|
24
|
-
const
|
|
24
|
+
const issueId = lastResult?.issueId;
|
|
25
25
|
if (lastResult?.status === 'success') {
|
|
26
|
-
logSuccess(`Complete pipeline finished successfully for
|
|
26
|
+
logSuccess(`Complete pipeline finished successfully for issue: ${issueId}`);
|
|
27
27
|
}
|
|
28
28
|
else {
|
|
29
29
|
logError(`Pipeline failed at ${lastResult?.phase}: ${lastResult?.message}`);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Workspace Manager - Manages the edsger working directory and
|
|
2
|
+
* Workspace Manager - Manages the edsger working directory and issue repos
|
|
3
3
|
*
|
|
4
4
|
* Handles:
|
|
5
5
|
* - Detecting or creating the 'edsger' working directory
|
|
6
6
|
* - Cloning repos using GitHub App installation tokens
|
|
7
|
-
* - Using
|
|
8
|
-
* - Reusing existing cloned repos for the same
|
|
7
|
+
* - Using issue ID as directory name for cloned repos
|
|
8
|
+
* - Reusing existing cloned repos for the same issue
|
|
9
9
|
*/
|
|
10
10
|
export interface WorkspaceConfig {
|
|
11
11
|
/** Root workspace directory path */
|
|
12
12
|
rootDir: string;
|
|
13
13
|
}
|
|
14
|
-
export interface
|
|
14
|
+
export interface IssueRepo {
|
|
15
15
|
/** Path to the cloned repo directory */
|
|
16
16
|
repoPath: string;
|
|
17
17
|
/** Whether the repo was freshly cloned (vs reused) */
|
|
@@ -30,28 +30,28 @@ export declare function getWorkspaceRoot(): string;
|
|
|
30
30
|
*/
|
|
31
31
|
export declare function ensureWorkspaceDir(): string;
|
|
32
32
|
/**
|
|
33
|
-
* Get the directory path for
|
|
34
|
-
* Uses the
|
|
33
|
+
* Get the directory path for an issue's repo clone
|
|
34
|
+
* Uses the issue ID as the directory name
|
|
35
35
|
*/
|
|
36
|
-
export declare function
|
|
36
|
+
export declare function getIssueRepoPath(workspaceRoot: string, issueId: string): string;
|
|
37
37
|
/**
|
|
38
|
-
* Check if
|
|
38
|
+
* Check if an issue's repo already exists locally
|
|
39
39
|
*/
|
|
40
|
-
export declare function
|
|
40
|
+
export declare function issueRepoExists(workspaceRoot: string, issueId: string): boolean;
|
|
41
41
|
/**
|
|
42
|
-
* Clone a repository for
|
|
42
|
+
* Clone a repository for an issue using GitHub App installation token
|
|
43
43
|
*
|
|
44
44
|
* Uses `git -c credential.helper` to pass the token securely
|
|
45
45
|
* instead of embedding it in the clone URL (which would be visible via `ps`).
|
|
46
46
|
*
|
|
47
47
|
* @param workspaceRoot - The workspace root directory
|
|
48
|
-
* @param
|
|
48
|
+
* @param issueId - The issue ID (used as directory name)
|
|
49
49
|
* @param owner - GitHub repo owner
|
|
50
50
|
* @param repo - GitHub repo name
|
|
51
51
|
* @param token - GitHub installation token
|
|
52
|
-
* @returns
|
|
52
|
+
* @returns IssueRepo with the path and clone status
|
|
53
53
|
*/
|
|
54
|
-
export declare function
|
|
54
|
+
export declare function cloneIssueRepo(workspaceRoot: string, issueId: string, owner: string, repo: string, token: string): IssueRepo;
|
|
55
55
|
/**
|
|
56
56
|
* Loose validator for a git ref name (tag or branch) coming from callers
|
|
57
57
|
* that pass data originating from external sources (GitHub API, AI output).
|
|
@@ -61,7 +61,7 @@ export declare function cloneFeatureRepo(workspaceRoot: string, featureId: strin
|
|
|
61
61
|
*/
|
|
62
62
|
export declare function isSafeGitRef(ref: string): boolean;
|
|
63
63
|
/**
|
|
64
|
-
* Sync a cloned
|
|
64
|
+
* Sync a cloned issue repo to a specific git ref — a tag or a branch.
|
|
65
65
|
*
|
|
66
66
|
* Behaviour:
|
|
67
67
|
* - `git fetch origin --tags --prune` brings in new tags (release tags!) and
|
|
@@ -84,12 +84,12 @@ export declare function syncRepoToRef(repoPath: string, ref: {
|
|
|
84
84
|
branch?: string;
|
|
85
85
|
}, token: string): void;
|
|
86
86
|
/**
|
|
87
|
-
* Set up
|
|
87
|
+
* Set up an issue's repo for work (install deps, etc.)
|
|
88
88
|
* This is called after cloning or reusing a repo
|
|
89
89
|
*/
|
|
90
|
-
export declare function
|
|
90
|
+
export declare function setupIssueRepo(repoPath: string): void;
|
|
91
91
|
/**
|
|
92
|
-
* Update the remote token for
|
|
92
|
+
* Update the remote token for an issue repo
|
|
93
93
|
* Used when the installation token has been refreshed
|
|
94
94
|
*/
|
|
95
95
|
export declare function updateRepoToken(repoPath: string, owner: string, repo: string, _token: string): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Workspace Manager - Manages the edsger working directory and
|
|
2
|
+
* Workspace Manager - Manages the edsger working directory and issue repos
|
|
3
3
|
*
|
|
4
4
|
* Handles:
|
|
5
5
|
* - Detecting or creating the 'edsger' working directory
|
|
6
6
|
* - Cloning repos using GitHub App installation tokens
|
|
7
|
-
* - Using
|
|
8
|
-
* - Reusing existing cloned repos for the same
|
|
7
|
+
* - Using issue ID as directory name for cloned repos
|
|
8
|
+
* - Reusing existing cloned repos for the same issue
|
|
9
9
|
*/
|
|
10
10
|
import { execFileSync, execSync } from 'child_process';
|
|
11
11
|
import { existsSync, mkdirSync } from 'fs';
|
|
@@ -41,34 +41,34 @@ export function ensureWorkspaceDir() {
|
|
|
41
41
|
return workspaceRoot;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Get the directory path for
|
|
45
|
-
* Uses the
|
|
44
|
+
* Get the directory path for an issue's repo clone
|
|
45
|
+
* Uses the issue ID as the directory name
|
|
46
46
|
*/
|
|
47
|
-
export function
|
|
48
|
-
return join(workspaceRoot,
|
|
47
|
+
export function getIssueRepoPath(workspaceRoot, issueId) {
|
|
48
|
+
return join(workspaceRoot, issueId);
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
* Check if
|
|
51
|
+
* Check if an issue's repo already exists locally
|
|
52
52
|
*/
|
|
53
|
-
export function
|
|
54
|
-
const repoPath =
|
|
53
|
+
export function issueRepoExists(workspaceRoot, issueId) {
|
|
54
|
+
const repoPath = getIssueRepoPath(workspaceRoot, issueId);
|
|
55
55
|
return existsSync(join(repoPath, '.git'));
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Clone a repository for
|
|
58
|
+
* Clone a repository for an issue using GitHub App installation token
|
|
59
59
|
*
|
|
60
60
|
* Uses `git -c credential.helper` to pass the token securely
|
|
61
61
|
* instead of embedding it in the clone URL (which would be visible via `ps`).
|
|
62
62
|
*
|
|
63
63
|
* @param workspaceRoot - The workspace root directory
|
|
64
|
-
* @param
|
|
64
|
+
* @param issueId - The issue ID (used as directory name)
|
|
65
65
|
* @param owner - GitHub repo owner
|
|
66
66
|
* @param repo - GitHub repo name
|
|
67
67
|
* @param token - GitHub installation token
|
|
68
|
-
* @returns
|
|
68
|
+
* @returns IssueRepo with the path and clone status
|
|
69
69
|
*/
|
|
70
|
-
export function
|
|
71
|
-
const repoPath =
|
|
70
|
+
export function cloneIssueRepo(workspaceRoot, issueId, owner, repo, token) {
|
|
71
|
+
const repoPath = getIssueRepoPath(workspaceRoot, issueId);
|
|
72
72
|
const repoUrl = `https://github.com/${owner}/${repo}.git`;
|
|
73
73
|
// Use the shared credential helper builder. Passes the installation
|
|
74
74
|
// token via `git -c credential.helper=...` so it stays out of the
|
|
@@ -76,7 +76,7 @@ export function cloneFeatureRepo(workspaceRoot, featureId, owner, repo, token) {
|
|
|
76
76
|
const gitCredentialArgs = buildCredentialArgs(token);
|
|
77
77
|
// Check if already cloned
|
|
78
78
|
if (existsSync(join(repoPath, '.git'))) {
|
|
79
|
-
logInfo(`Reusing existing repo for
|
|
79
|
+
logInfo(`Reusing existing repo for issue ${issueId}`);
|
|
80
80
|
// Update the remote URL (without token) and fetch using credential helper
|
|
81
81
|
try {
|
|
82
82
|
execSync(`git remote set-url origin "${repoUrl}"`, {
|
|
@@ -102,7 +102,7 @@ export function cloneFeatureRepo(workspaceRoot, featureId, owner, repo, token) {
|
|
|
102
102
|
return { repoPath, freshClone: false };
|
|
103
103
|
}
|
|
104
104
|
// Clone fresh using credential helper
|
|
105
|
-
logInfo(`Cloning ${owner}/${repo} for
|
|
105
|
+
logInfo(`Cloning ${owner}/${repo} for issue ${issueId}...`);
|
|
106
106
|
// Use execFileSync to avoid shell interpretation of credential helper metacharacters
|
|
107
107
|
try {
|
|
108
108
|
execFileSync('git', [...gitCredentialArgs, 'clone', repoUrl, repoPath], {
|
|
@@ -142,7 +142,7 @@ export function isSafeGitRef(ref) {
|
|
|
142
142
|
return /^[A-Za-z0-9._\-+/@]+$/.test(ref);
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
|
-
* Sync a cloned
|
|
145
|
+
* Sync a cloned issue repo to a specific git ref — a tag or a branch.
|
|
146
146
|
*
|
|
147
147
|
* Behaviour:
|
|
148
148
|
* - `git fetch origin --tags --prune` brings in new tags (release tags!) and
|
|
@@ -221,10 +221,10 @@ export function syncRepoToRef(repoPath, ref, token) {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
|
-
* Set up
|
|
224
|
+
* Set up an issue's repo for work (install deps, etc.)
|
|
225
225
|
* This is called after cloning or reusing a repo
|
|
226
226
|
*/
|
|
227
|
-
export function
|
|
227
|
+
export function setupIssueRepo(repoPath) {
|
|
228
228
|
// Check for package.json and install deps if needed
|
|
229
229
|
if (existsSync(join(repoPath, 'package.json'))) {
|
|
230
230
|
try {
|
|
@@ -241,7 +241,7 @@ export function setupFeatureRepo(repoPath) {
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
244
|
-
* Update the remote token for
|
|
244
|
+
* Update the remote token for an issue repo
|
|
245
245
|
* Used when the installation token has been refreshed
|
|
246
246
|
*/
|
|
247
247
|
export function updateRepoToken(repoPath, owner, repo, _token) {
|
package/package.json
CHANGED
package/vitest.config.ts
CHANGED
|
@@ -9,6 +9,10 @@ export default defineConfig({
|
|
|
9
9
|
include: [
|
|
10
10
|
'src/phases/run-sheet/__tests__/**/*.test.ts',
|
|
11
11
|
'src/phases/code-refine-verification/__tests__/**/*.test.ts',
|
|
12
|
+
'src/phases/find-bugs/__tests__/**/*.test.ts',
|
|
13
|
+
'src/phases/find-features/__tests__/**/*.test.ts',
|
|
14
|
+
'src/phases/find-smells/__tests__/**/*.test.ts',
|
|
15
|
+
'src/commands/find-smells/__tests__/**/*.test.ts',
|
|
12
16
|
],
|
|
13
17
|
exclude: ['dist/**', 'node_modules/**'],
|
|
14
18
|
environment: 'node',
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for app-store API helpers.
|
|
3
|
-
*
|
|
4
|
-
* Tests the parsing/extraction logic that getAppStorePrimaryLocale uses
|
|
5
|
-
* to parse MCP response data.
|
|
6
|
-
*/
|
|
7
|
-
import assert from 'node:assert';
|
|
8
|
-
import { describe, it } from 'node:test';
|
|
9
|
-
/**
|
|
10
|
-
* Extracts locale from an MCP response — mirrors the parsing logic
|
|
11
|
-
* inside getAppStorePrimaryLocale without requiring network mocks.
|
|
12
|
-
*/
|
|
13
|
-
function parseLocaleFromMcpResponse(result) {
|
|
14
|
-
const text = result?.content?.[0]?.text || '{}';
|
|
15
|
-
const parsed = JSON.parse(text);
|
|
16
|
-
return parsed.locale || null;
|
|
17
|
-
}
|
|
18
|
-
void describe('parseLocaleFromMcpResponse', () => {
|
|
19
|
-
void it('should return locale string when present', () => {
|
|
20
|
-
const result = { content: [{ text: '{"locale":"en-US"}' }] };
|
|
21
|
-
assert.strictEqual(parseLocaleFromMcpResponse(result), 'en-US');
|
|
22
|
-
});
|
|
23
|
-
void it('should return locale for non-English locales', () => {
|
|
24
|
-
assert.strictEqual(parseLocaleFromMcpResponse({ content: [{ text: '{"locale":"ja"}' }] }), 'ja');
|
|
25
|
-
assert.strictEqual(parseLocaleFromMcpResponse({
|
|
26
|
-
content: [{ text: '{"locale":"zh-Hans"}' }],
|
|
27
|
-
}), 'zh-Hans');
|
|
28
|
-
assert.strictEqual(parseLocaleFromMcpResponse({ content: [{ text: '{"locale":"fr-FR"}' }] }), 'fr-FR');
|
|
29
|
-
});
|
|
30
|
-
void it('should return null when locale is null', () => {
|
|
31
|
-
const result = { content: [{ text: '{"locale":null}' }] };
|
|
32
|
-
assert.strictEqual(parseLocaleFromMcpResponse(result), null);
|
|
33
|
-
});
|
|
34
|
-
void it('should return null when locale is empty string', () => {
|
|
35
|
-
const result = { content: [{ text: '{"locale":""}' }] };
|
|
36
|
-
assert.strictEqual(parseLocaleFromMcpResponse(result), null);
|
|
37
|
-
});
|
|
38
|
-
void it('should return null when content array is empty', () => {
|
|
39
|
-
const result = { content: [] };
|
|
40
|
-
assert.strictEqual(parseLocaleFromMcpResponse(result), null);
|
|
41
|
-
});
|
|
42
|
-
void it('should return null when content field is missing', () => {
|
|
43
|
-
assert.strictEqual(parseLocaleFromMcpResponse({}), null);
|
|
44
|
-
});
|
|
45
|
-
void it('should return null when result is null', () => {
|
|
46
|
-
assert.strictEqual(parseLocaleFromMcpResponse(null), null);
|
|
47
|
-
});
|
|
48
|
-
void it('should return null when result is undefined', () => {
|
|
49
|
-
assert.strictEqual(parseLocaleFromMcpResponse(undefined), null);
|
|
50
|
-
});
|
|
51
|
-
void it('should throw when text is not valid JSON', () => {
|
|
52
|
-
assert.throws(() => {
|
|
53
|
-
parseLocaleFromMcpResponse({ content: [{ text: 'not json' }] });
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
void it('should return null when text field is missing', () => {
|
|
57
|
-
const result = { content: [{}] };
|
|
58
|
-
assert.strictEqual(parseLocaleFromMcpResponse(result), null);
|
|
59
|
-
});
|
|
60
|
-
});
|