@su-record/vibe 3.0.0 → 3.2.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.md +2 -2
- package/README.en.md +6 -4
- package/README.md +5 -3
- package/dist/__tests__/wiring-integrity.test.d.ts +2 -0
- package/dist/__tests__/wiring-integrity.test.d.ts.map +1 -0
- package/dist/__tests__/wiring-integrity.test.js +160 -0
- package/dist/__tests__/wiring-integrity.test.js.map +1 -0
- package/dist/cli/commands/info.d.ts.map +1 -1
- package/dist/cli/commands/info.js +2 -1
- package/dist/cli/commands/info.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +4 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/index.js +102 -128
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
- package/dist/cli/postinstall/claude-agents.js +0 -5
- package/dist/cli/postinstall/claude-agents.js.map +1 -1
- package/dist/cli/postinstall/constants.d.ts +6 -0
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +42 -60
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/postinstall/inline-skills.js +2 -2
- package/dist/cli/postinstall/inline-skills.js.map +1 -1
- package/dist/cli/postinstall/main.d.ts.map +1 -1
- package/dist/cli/postinstall/main.js +2 -0
- package/dist/cli/postinstall/main.js.map +1 -1
- package/dist/cli/postinstall.d.ts +6 -1
- package/dist/cli/postinstall.d.ts.map +1 -1
- package/dist/cli/postinstall.js +6 -1
- package/dist/cli/postinstall.js.map +1 -1
- package/dist/cli/setup/GlobalInstaller.d.ts +1 -15
- package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -1
- package/dist/cli/setup/GlobalInstaller.js +16 -115
- package/dist/cli/setup/GlobalInstaller.js.map +1 -1
- package/dist/cli/setup/GlobalInstaller.test.d.ts +2 -0
- package/dist/cli/setup/GlobalInstaller.test.d.ts.map +1 -0
- package/dist/cli/setup/GlobalInstaller.test.js +16 -0
- package/dist/cli/setup/GlobalInstaller.test.js.map +1 -0
- package/dist/cli/setup/ProjectSetup.js +2 -2
- package/dist/cli/setup/ProjectSetup.js.map +1 -1
- package/dist/cli/setup.d.ts +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +1 -1
- package/dist/cli/setup.js.map +1 -1
- package/dist/infra/lib/SkillRepository.js +1 -1
- package/dist/infra/lib/evolution/__tests__/integration.test.js +0 -42
- package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -1
- package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -78
- package/hooks/scripts/__tests__/clone-behaviors.test.js +97 -1
- package/hooks/scripts/__tests__/clone-merge-responsive.test.js +106 -0
- package/hooks/scripts/__tests__/code-check-memory-write.test.js +81 -0
- package/hooks/scripts/__tests__/step-counter.test.js +21 -0
- package/hooks/scripts/auto-format.js +2 -11
- package/hooks/scripts/auto-test.js +2 -11
- package/hooks/scripts/clone-extract.js +388 -38
- package/hooks/scripts/clone-merge-responsive.js +184 -0
- package/hooks/scripts/clone-spec.js +33 -8
- package/hooks/scripts/clone-validate.js +15 -9
- package/hooks/scripts/code-check.js +27 -55
- package/hooks/scripts/lib/glob.js +32 -0
- package/hooks/scripts/lib/hook-context.js +19 -2
- package/hooks/scripts/post-edit.js +2 -3
- package/hooks/scripts/prompt-dispatcher.js +1 -1
- package/hooks/scripts/scope-guard.js +3 -42
- package/hooks/scripts/sentinel-guard.js +5 -20
- package/hooks/scripts/session-start.js +2 -2
- package/hooks/scripts/step-counter.js +35 -57
- package/package.json +6 -4
- package/skills/clone/SKILL.md +74 -203
- package/skills/clone/references/capture-rules.md +48 -0
- package/skills/clone/references/legal-and-error-recovery.md +40 -0
- package/skills/clone/references/refine-rules.md +61 -0
- package/skills/clone/references/scaffold-phases.md +59 -0
- package/skills/clone/references/setup-and-layout.md +30 -0
- package/skills/docs/SKILL.md +39 -4
- package/skills/docs/references/api-docs-changelog.md +34 -0
- package/skills/docs/references/codemaps-output.md +23 -0
- package/{agents/diagrammer.md → skills/docs/references/diagram-spec.md} +2 -15
- package/skills/exec-plan/SKILL.md +1 -1
- package/skills/exec-plan/templates/plan.md +1 -1
- package/skills/handoff/SKILL.md +3 -3
- package/skills/handoff/templates/handoff.md +1 -1
- package/skills/vibe/SKILL.md +3 -2
- package/skills/vibe.analyze/SKILL.md +12 -249
- package/skills/vibe.analyze/references/output-templates.md +188 -0
- package/skills/vibe.analyze/references/quality-gate.md +93 -0
- package/skills/vibe.clone/SKILL.md +52 -19
- package/skills/vibe.continue/SKILL.md +32 -0
- package/skills/vibe.design/SKILL.md +23 -1
- package/skills/vibe.design/references/ui-preview.md +20 -0
- package/skills/vibe.docs/SKILL.md +4 -2
- package/skills/vibe.figma/SKILL.md +33 -260
- package/skills/vibe.figma/references/branch-phases.md +113 -0
- package/skills/vibe.figma/references/state-schema.md +42 -0
- package/skills/vibe.figma/references/step-algorithms.md +204 -0
- package/skills/vibe.image/SKILL.md +62 -0
- package/skills/vibe.image/references/image-generation-examples.md +39 -0
- package/skills/vibe.reason/SKILL.md +3 -183
- package/skills/vibe.reason/references/output-format-template.md +57 -0
- package/skills/vibe.reason/references/quality-rubrics.md +94 -0
- package/skills/vibe.reason/references/worked-example.md +45 -0
- package/skills/vibe.review/SKILL.md +13 -348
- package/skills/vibe.review/references/boundary-check.md +25 -0
- package/skills/vibe.review/references/output-template.md +74 -0
- package/skills/vibe.review/references/quality-gate.md +84 -0
- package/skills/vibe.review/references/race-mode.md +117 -0
- package/skills/vibe.review/references/worked-examples.md +94 -0
- package/vibe/templates/claudemd-template.md +1 -1
- package/agents/acceptance-tester.md +0 -56
- package/agents/documenter.md +0 -43
- package/agents/figma/figma-engineer.md +0 -76
- package/dist/cli/llm/gemini-commands.d.ts +0 -25
- package/dist/cli/llm/gemini-commands.d.ts.map +0 -1
- package/dist/cli/llm/gemini-commands.js +0 -143
- package/dist/cli/llm/gemini-commands.js.map +0 -1
- package/dist/cli/postinstall/codex-agents.d.ts +0 -24
- package/dist/cli/postinstall/codex-agents.d.ts.map +0 -1
- package/dist/cli/postinstall/codex-agents.js +0 -114
- package/dist/cli/postinstall/codex-agents.js.map +0 -1
- package/dist/cli/postinstall/codex-instruction.d.ts +0 -10
- package/dist/cli/postinstall/codex-instruction.d.ts.map +0 -1
- package/dist/cli/postinstall/codex-instruction.js +0 -56
- package/dist/cli/postinstall/codex-instruction.js.map +0 -1
- package/dist/cli/postinstall/gemini-agents.d.ts +0 -12
- package/dist/cli/postinstall/gemini-agents.d.ts.map +0 -1
- package/dist/cli/postinstall/gemini-agents.js +0 -80
- package/dist/cli/postinstall/gemini-agents.js.map +0 -1
- package/dist/cli/postinstall/gemini-instruction.d.ts +0 -10
- package/dist/cli/postinstall/gemini-instruction.d.ts.map +0 -1
- package/dist/cli/postinstall/gemini-instruction.js +0 -59
- package/dist/cli/postinstall/gemini-instruction.js.map +0 -1
- package/dist/cli/postinstall/index.d.ts +0 -23
- package/dist/cli/postinstall/index.d.ts.map +0 -1
- package/dist/cli/postinstall/index.js +0 -23
- package/dist/cli/postinstall/index.js.map +0 -1
- package/dist/cli/setup/index.d.ts +0 -9
- package/dist/cli/setup/index.d.ts.map +0 -1
- package/dist/cli/setup/index.js +0 -12
- package/dist/cli/setup/index.js.map +0 -1
- package/dist/infra/lib/ContextCompressor.d.ts +0 -104
- package/dist/infra/lib/ContextCompressor.d.ts.map +0 -1
- package/dist/infra/lib/ContextCompressor.js +0 -297
- package/dist/infra/lib/ContextCompressor.js.map +0 -1
- package/dist/infra/lib/ContextCompressor.test.d.ts +0 -2
- package/dist/infra/lib/ContextCompressor.test.d.ts.map +0 -1
- package/dist/infra/lib/ContextCompressor.test.js +0 -25
- package/dist/infra/lib/ContextCompressor.test.js.map +0 -1
- package/dist/infra/lib/ProgressTracker.d.ts +0 -73
- package/dist/infra/lib/ProgressTracker.d.ts.map +0 -1
- package/dist/infra/lib/ProgressTracker.js +0 -267
- package/dist/infra/lib/ProgressTracker.js.map +0 -1
- package/dist/infra/lib/TokenBudgetTracker.d.ts +0 -68
- package/dist/infra/lib/TokenBudgetTracker.d.ts.map +0 -1
- package/dist/infra/lib/TokenBudgetTracker.js +0 -191
- package/dist/infra/lib/TokenBudgetTracker.js.map +0 -1
- package/dist/infra/lib/autonomy/AuditStore.d.ts +0 -63
- package/dist/infra/lib/autonomy/AuditStore.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/AuditStore.js +0 -185
- package/dist/infra/lib/autonomy/AuditStore.js.map +0 -1
- package/dist/infra/lib/autonomy/AutonomyConfig.d.ts +0 -84
- package/dist/infra/lib/autonomy/AutonomyConfig.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/AutonomyConfig.js +0 -49
- package/dist/infra/lib/autonomy/AutonomyConfig.js.map +0 -1
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts +0 -78
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.js +0 -246
- package/dist/infra/lib/autonomy/AutonomyOrchestrator.js.map +0 -1
- package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts +0 -36
- package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/BackgroundMonitor.js +0 -138
- package/dist/infra/lib/autonomy/BackgroundMonitor.js.map +0 -1
- package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts +0 -56
- package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/CollaborationProtocol.js +0 -122
- package/dist/infra/lib/autonomy/CollaborationProtocol.js.map +0 -1
- package/dist/infra/lib/autonomy/ConfirmationManager.d.ts +0 -42
- package/dist/infra/lib/autonomy/ConfirmationManager.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/ConfirmationManager.js +0 -200
- package/dist/infra/lib/autonomy/ConfirmationManager.js.map +0 -1
- package/dist/infra/lib/autonomy/ConfirmationStore.d.ts +0 -55
- package/dist/infra/lib/autonomy/ConfirmationStore.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/ConfirmationStore.js +0 -130
- package/dist/infra/lib/autonomy/ConfirmationStore.js.map +0 -1
- package/dist/infra/lib/autonomy/EventBus.d.ts +0 -20
- package/dist/infra/lib/autonomy/EventBus.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/EventBus.js +0 -119
- package/dist/infra/lib/autonomy/EventBus.js.map +0 -1
- package/dist/infra/lib/autonomy/EventOutbox.d.ts +0 -32
- package/dist/infra/lib/autonomy/EventOutbox.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/EventOutbox.js +0 -152
- package/dist/infra/lib/autonomy/EventOutbox.js.map +0 -1
- package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts +0 -24
- package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/NotificationDispatcher.js +0 -112
- package/dist/infra/lib/autonomy/NotificationDispatcher.js.map +0 -1
- package/dist/infra/lib/autonomy/PolicyEngine.d.ts +0 -76
- package/dist/infra/lib/autonomy/PolicyEngine.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/PolicyEngine.js +0 -208
- package/dist/infra/lib/autonomy/PolicyEngine.js.map +0 -1
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts +0 -61
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.js +0 -236
- package/dist/infra/lib/autonomy/ProactiveAnalyzer.js.map +0 -1
- package/dist/infra/lib/autonomy/RiskClassifier.d.ts +0 -35
- package/dist/infra/lib/autonomy/RiskClassifier.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/RiskClassifier.js +0 -147
- package/dist/infra/lib/autonomy/RiskClassifier.js.map +0 -1
- package/dist/infra/lib/autonomy/SecuritySentinel.d.ts +0 -51
- package/dist/infra/lib/autonomy/SecuritySentinel.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/SecuritySentinel.js +0 -162
- package/dist/infra/lib/autonomy/SecuritySentinel.js.map +0 -1
- package/dist/infra/lib/autonomy/SuggestionStore.d.ts +0 -54
- package/dist/infra/lib/autonomy/SuggestionStore.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/SuggestionStore.js +0 -144
- package/dist/infra/lib/autonomy/SuggestionStore.js.map +0 -1
- package/dist/infra/lib/autonomy/TaskDecomposer.d.ts +0 -38
- package/dist/infra/lib/autonomy/TaskDecomposer.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/TaskDecomposer.js +0 -175
- package/dist/infra/lib/autonomy/TaskDecomposer.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.js +0 -198
- package/dist/infra/lib/autonomy/__tests__/audit-store.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.js +0 -225
- package/dist/infra/lib/autonomy/__tests__/event-bus.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/event-core.test.js +0 -194
- package/dist/infra/lib/autonomy/__tests__/event-core.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/governance.test.js +0 -540
- package/dist/infra/lib/autonomy/__tests__/governance.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/integration.test.js +0 -480
- package/dist/infra/lib/autonomy/__tests__/integration.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/proactive.test.js +0 -410
- package/dist/infra/lib/autonomy/__tests__/proactive.test.js.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts +0 -2
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.js +0 -486
- package/dist/infra/lib/autonomy/__tests__/sentinel.test.js.map +0 -1
- package/dist/infra/lib/autonomy/index.d.ts +0 -18
- package/dist/infra/lib/autonomy/index.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/index.js +0 -22
- package/dist/infra/lib/autonomy/index.js.map +0 -1
- package/dist/infra/lib/autonomy/schemas.d.ts +0 -317
- package/dist/infra/lib/autonomy/schemas.d.ts.map +0 -1
- package/dist/infra/lib/autonomy/schemas.js +0 -90
- package/dist/infra/lib/autonomy/schemas.js.map +0 -1
- package/dist/infra/lib/claude/index.d.ts +0 -5
- package/dist/infra/lib/claude/index.d.ts.map +0 -1
- package/dist/infra/lib/claude/index.js +0 -5
- package/dist/infra/lib/claude/index.js.map +0 -1
- package/dist/infra/lib/claude/storage.d.ts +0 -12
- package/dist/infra/lib/claude/storage.d.ts.map +0 -1
- package/dist/infra/lib/claude/storage.js +0 -54
- package/dist/infra/lib/claude/storage.js.map +0 -1
- package/dist/infra/lib/gemini/auth.d.ts +0 -18
- package/dist/infra/lib/gemini/auth.d.ts.map +0 -1
- package/dist/infra/lib/gemini/auth.js +0 -32
- package/dist/infra/lib/gemini/auth.js.map +0 -1
- package/dist/infra/lib/gemini/capabilities.d.ts +0 -28
- package/dist/infra/lib/gemini/capabilities.d.ts.map +0 -1
- package/dist/infra/lib/gemini/capabilities.js +0 -178
- package/dist/infra/lib/gemini/capabilities.js.map +0 -1
- package/dist/infra/lib/gemini/chat.d.ts +0 -35
- package/dist/infra/lib/gemini/chat.d.ts.map +0 -1
- package/dist/infra/lib/gemini/chat.js +0 -161
- package/dist/infra/lib/gemini/chat.js.map +0 -1
- package/dist/infra/lib/gemini/completion.d.ts +0 -12
- package/dist/infra/lib/gemini/completion.d.ts.map +0 -1
- package/dist/infra/lib/gemini/completion.js +0 -13
- package/dist/infra/lib/gemini/completion.js.map +0 -1
- package/dist/infra/lib/gemini/constants.d.ts +0 -8
- package/dist/infra/lib/gemini/constants.d.ts.map +0 -1
- package/dist/infra/lib/gemini/constants.js +0 -11
- package/dist/infra/lib/gemini/constants.js.map +0 -1
- package/dist/infra/lib/gemini/index.d.ts +0 -13
- package/dist/infra/lib/gemini/index.d.ts.map +0 -1
- package/dist/infra/lib/gemini/index.js +0 -12
- package/dist/infra/lib/gemini/index.js.map +0 -1
- package/dist/infra/lib/gemini/models.d.ts +0 -11
- package/dist/infra/lib/gemini/models.d.ts.map +0 -1
- package/dist/infra/lib/gemini/models.js +0 -38
- package/dist/infra/lib/gemini/models.js.map +0 -1
- package/dist/infra/lib/gemini/orchestration.d.ts +0 -33
- package/dist/infra/lib/gemini/orchestration.d.ts.map +0 -1
- package/dist/infra/lib/gemini/orchestration.js +0 -62
- package/dist/infra/lib/gemini/orchestration.js.map +0 -1
- package/dist/infra/lib/gemini/types.d.ts +0 -115
- package/dist/infra/lib/gemini/types.d.ts.map +0 -1
- package/dist/infra/lib/gemini/types.js +0 -5
- package/dist/infra/lib/gemini/types.js.map +0 -1
- package/dist/infra/orchestrator/AgentAnnouncer.d.ts +0 -64
- package/dist/infra/orchestrator/AgentAnnouncer.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentAnnouncer.js +0 -127
- package/dist/infra/orchestrator/AgentAnnouncer.js.map +0 -1
- package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts +0 -5
- package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentAnnouncer.test.js +0 -119
- package/dist/infra/orchestrator/AgentAnnouncer.test.js.map +0 -1
- package/dist/infra/orchestrator/AgentExecutor.d.ts +0 -22
- package/dist/infra/orchestrator/AgentExecutor.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentExecutor.js +0 -272
- package/dist/infra/orchestrator/AgentExecutor.js.map +0 -1
- package/dist/infra/orchestrator/AgentManager.d.ts +0 -72
- package/dist/infra/orchestrator/AgentManager.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentManager.js +0 -183
- package/dist/infra/orchestrator/AgentManager.js.map +0 -1
- package/dist/infra/orchestrator/AgentManifestCache.d.ts +0 -54
- package/dist/infra/orchestrator/AgentManifestCache.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentManifestCache.js +0 -191
- package/dist/infra/orchestrator/AgentManifestCache.js.map +0 -1
- package/dist/infra/orchestrator/AgentRegistry.d.ts +0 -76
- package/dist/infra/orchestrator/AgentRegistry.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentRegistry.js +0 -217
- package/dist/infra/orchestrator/AgentRegistry.js.map +0 -1
- package/dist/infra/orchestrator/AgentRegistry.test.d.ts +0 -5
- package/dist/infra/orchestrator/AgentRegistry.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/AgentRegistry.test.js +0 -122
- package/dist/infra/orchestrator/AgentRegistry.test.js.map +0 -1
- package/dist/infra/orchestrator/BackgroundManager.d.ts +0 -128
- package/dist/infra/orchestrator/BackgroundManager.d.ts.map +0 -1
- package/dist/infra/orchestrator/BackgroundManager.js +0 -620
- package/dist/infra/orchestrator/BackgroundManager.js.map +0 -1
- package/dist/infra/orchestrator/BackgroundManager.test.d.ts +0 -6
- package/dist/infra/orchestrator/BackgroundManager.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/BackgroundManager.test.js +0 -162
- package/dist/infra/orchestrator/BackgroundManager.test.js.map +0 -1
- package/dist/infra/orchestrator/CheckpointManager.d.ts +0 -54
- package/dist/infra/orchestrator/CheckpointManager.d.ts.map +0 -1
- package/dist/infra/orchestrator/CheckpointManager.js +0 -121
- package/dist/infra/orchestrator/CheckpointManager.js.map +0 -1
- package/dist/infra/orchestrator/CodexAgentRuntime.d.ts +0 -12
- package/dist/infra/orchestrator/CodexAgentRuntime.d.ts.map +0 -1
- package/dist/infra/orchestrator/CodexAgentRuntime.js +0 -94
- package/dist/infra/orchestrator/CodexAgentRuntime.js.map +0 -1
- package/dist/infra/orchestrator/CodexAgentRuntime.test.d.ts +0 -2
- package/dist/infra/orchestrator/CodexAgentRuntime.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/CodexAgentRuntime.test.js +0 -37
- package/dist/infra/orchestrator/CodexAgentRuntime.test.js.map +0 -1
- package/dist/infra/orchestrator/LLMCluster.d.ts +0 -82
- package/dist/infra/orchestrator/LLMCluster.d.ts.map +0 -1
- package/dist/infra/orchestrator/LLMCluster.js +0 -146
- package/dist/infra/orchestrator/LLMCluster.js.map +0 -1
- package/dist/infra/orchestrator/MultiLlmResearch.d.ts +0 -31
- package/dist/infra/orchestrator/MultiLlmResearch.d.ts.map +0 -1
- package/dist/infra/orchestrator/MultiLlmResearch.js +0 -160
- package/dist/infra/orchestrator/MultiLlmResearch.js.map +0 -1
- package/dist/infra/orchestrator/PhasePipeline.d.ts +0 -122
- package/dist/infra/orchestrator/PhasePipeline.d.ts.map +0 -1
- package/dist/infra/orchestrator/PhasePipeline.js +0 -385
- package/dist/infra/orchestrator/PhasePipeline.js.map +0 -1
- package/dist/infra/orchestrator/PhaseResultStore.d.ts +0 -39
- package/dist/infra/orchestrator/PhaseResultStore.d.ts.map +0 -1
- package/dist/infra/orchestrator/PhaseResultStore.js +0 -151
- package/dist/infra/orchestrator/PhaseResultStore.js.map +0 -1
- package/dist/infra/orchestrator/SessionStore.d.ts +0 -40
- package/dist/infra/orchestrator/SessionStore.d.ts.map +0 -1
- package/dist/infra/orchestrator/SessionStore.js +0 -116
- package/dist/infra/orchestrator/SessionStore.js.map +0 -1
- package/dist/infra/orchestrator/SmartRouter.d.ts +0 -90
- package/dist/infra/orchestrator/SmartRouter.d.ts.map +0 -1
- package/dist/infra/orchestrator/SmartRouter.js +0 -277
- package/dist/infra/orchestrator/SmartRouter.js.map +0 -1
- package/dist/infra/orchestrator/SmartRouter.test.d.ts +0 -5
- package/dist/infra/orchestrator/SmartRouter.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/SmartRouter.test.js +0 -484
- package/dist/infra/orchestrator/SmartRouter.test.js.map +0 -1
- package/dist/infra/orchestrator/SwarmOrchestrator.d.ts +0 -143
- package/dist/infra/orchestrator/SwarmOrchestrator.d.ts.map +0 -1
- package/dist/infra/orchestrator/SwarmOrchestrator.js +0 -378
- package/dist/infra/orchestrator/SwarmOrchestrator.js.map +0 -1
- package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts +0 -5
- package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/SwarmOrchestrator.test.js +0 -95
- package/dist/infra/orchestrator/SwarmOrchestrator.test.js.map +0 -1
- package/dist/infra/orchestrator/agentDiscovery.d.ts +0 -26
- package/dist/infra/orchestrator/agentDiscovery.d.ts.map +0 -1
- package/dist/infra/orchestrator/agentDiscovery.js +0 -175
- package/dist/infra/orchestrator/agentDiscovery.js.map +0 -1
- package/dist/infra/orchestrator/backgroundAgent.d.ts +0 -9
- package/dist/infra/orchestrator/backgroundAgent.d.ts.map +0 -1
- package/dist/infra/orchestrator/backgroundAgent.js +0 -10
- package/dist/infra/orchestrator/backgroundAgent.js.map +0 -1
- package/dist/infra/orchestrator/index.d.ts +0 -207
- package/dist/infra/orchestrator/index.d.ts.map +0 -1
- package/dist/infra/orchestrator/index.js +0 -362
- package/dist/infra/orchestrator/index.js.map +0 -1
- package/dist/infra/orchestrator/orchestrator.d.ts +0 -60
- package/dist/infra/orchestrator/orchestrator.d.ts.map +0 -1
- package/dist/infra/orchestrator/orchestrator.js +0 -214
- package/dist/infra/orchestrator/orchestrator.js.map +0 -1
- package/dist/infra/orchestrator/parallelResearch.d.ts +0 -27
- package/dist/infra/orchestrator/parallelResearch.d.ts.map +0 -1
- package/dist/infra/orchestrator/parallelResearch.js +0 -285
- package/dist/infra/orchestrator/parallelResearch.js.map +0 -1
- package/dist/infra/orchestrator/types.d.ts +0 -205
- package/dist/infra/orchestrator/types.d.ts.map +0 -1
- package/dist/infra/orchestrator/types.js +0 -87
- package/dist/infra/orchestrator/types.js.map +0 -1
- package/dist/infra/orchestrator/types.test.d.ts +0 -2
- package/dist/infra/orchestrator/types.test.d.ts.map +0 -1
- package/dist/infra/orchestrator/types.test.js +0 -57
- package/dist/infra/orchestrator/types.test.js.map +0 -1
- package/dist/tools/semantic/analyzeDependencyGraph.d.ts +0 -12
- package/dist/tools/semantic/analyzeDependencyGraph.d.ts.map +0 -1
- package/dist/tools/semantic/analyzeDependencyGraph.js +0 -359
- package/dist/tools/semantic/analyzeDependencyGraph.js.map +0 -1
- package/dist/tools/semantic/astGrep.d.ts +0 -25
- package/dist/tools/semantic/astGrep.d.ts.map +0 -1
- package/dist/tools/semantic/astGrep.js +0 -324
- package/dist/tools/semantic/astGrep.js.map +0 -1
- package/dist/tools/semantic/astGrep.test.d.ts +0 -2
- package/dist/tools/semantic/astGrep.test.d.ts.map +0 -1
- package/dist/tools/semantic/astGrep.test.js +0 -74
- package/dist/tools/semantic/astGrep.test.js.map +0 -1
- package/dist/tools/semantic/findReferences.d.ts +0 -9
- package/dist/tools/semantic/findReferences.d.ts.map +0 -1
- package/dist/tools/semantic/findReferences.js +0 -200
- package/dist/tools/semantic/findReferences.js.map +0 -1
- package/dist/tools/semantic/findSymbol.d.ts +0 -8
- package/dist/tools/semantic/findSymbol.d.ts.map +0 -1
- package/dist/tools/semantic/findSymbol.js +0 -204
- package/dist/tools/semantic/findSymbol.js.map +0 -1
- package/dist/tools/semantic/index.d.ts +0 -9
- package/dist/tools/semantic/index.d.ts.map +0 -1
- package/dist/tools/semantic/index.js +0 -11
- package/dist/tools/semantic/index.js.map +0 -1
- package/dist/tools/semantic/lsp.d.ts +0 -68
- package/dist/tools/semantic/lsp.d.ts.map +0 -1
- package/dist/tools/semantic/lsp.js +0 -561
- package/dist/tools/semantic/lsp.js.map +0 -1
- package/dist/tools/spec/e2eTestGenerator.d.ts +0 -61
- package/dist/tools/spec/e2eTestGenerator.d.ts.map +0 -1
- package/dist/tools/spec/e2eTestGenerator.js +0 -255
- package/dist/tools/spec/e2eTestGenerator.js.map +0 -1
- package/dist/tools/spec/specVersioning.d.ts +0 -76
- package/dist/tools/spec/specVersioning.d.ts.map +0 -1
- package/dist/tools/spec/specVersioning.js +0 -236
- package/dist/tools/spec/specVersioning.js.map +0 -1
- package/hooks/scripts/__tests__/.vibe/memories/memories.db +0 -0
- package/hooks/scripts/__tests__/.vibe/memories/memories.db-shm +0 -0
- package/hooks/scripts/__tests__/.vibe/memories/memories.db-wal +0 -0
- package/hooks/scripts/evolution-engine.js +0 -91
- package/hooks/scripts/hud-status.js +0 -321
- package/hooks/scripts/skill-injector.js +0 -83
- package/skills/vibe.utils/SKILL.md +0 -415
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parallel Research - 병렬 리서치 에이전트 실행
|
|
3
|
-
*/
|
|
4
|
-
import { ParallelResearchArgs, ResearchTask } from './types.js';
|
|
5
|
-
import { ToolResult } from '../types/tool.js';
|
|
6
|
-
import { executeMultiLlmResearch, formatMultiLlmResults } from './MultiLlmResearch.js';
|
|
7
|
-
export { executeMultiLlmResearch, formatMultiLlmResults };
|
|
8
|
-
/**
|
|
9
|
-
* 기본 리서치 태스크 템플릿
|
|
10
|
-
*/
|
|
11
|
-
export declare function createResearchTasks(feature: string, techStack?: string[]): ResearchTask[];
|
|
12
|
-
/**
|
|
13
|
-
* 병렬 리서치 실행
|
|
14
|
-
*/
|
|
15
|
-
export declare function parallelResearch(args: ParallelResearchArgs): Promise<ToolResult>;
|
|
16
|
-
/**
|
|
17
|
-
* 기능 기반 병렬 리서치 (간편 API)
|
|
18
|
-
*/
|
|
19
|
-
export declare function researchFeature(feature: string, techStack?: string[], projectPath?: string): Promise<ToolResult>;
|
|
20
|
-
/**
|
|
21
|
-
* 통합 병렬 리서치 (Claude 에이전트 + Multi-LLM)
|
|
22
|
-
*/
|
|
23
|
-
export declare function parallelResearchWithMultiLlm(args: ParallelResearchArgs & {
|
|
24
|
-
feature: string;
|
|
25
|
-
techStack: string[];
|
|
26
|
-
}): Promise<ToolResult>;
|
|
27
|
-
//# sourceMappingURL=parallelResearch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parallelResearch.d.ts","sourceRoot":"","sources":["../../../src/infra/orchestrator/parallelResearch.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,oBAAoB,EAEpB,YAAY,EAIb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAS9C,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EAEtB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,CAAC;AAE1D;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,MAAM,EAAO,GAAG,YAAY,EAAE,CAiD7F;AAgID;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,CAwDtF;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAAM,EAAO,EACxB,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC,UAAU,CAAC,CAGrB;AAED;;GAEG;AACH,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,oBAAoB,GAAG;IAC9E,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,GAAG,OAAO,CAAC,UAAU,CAAC,CAyDtB"}
|
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parallel Research - 병렬 리서치 에이전트 실행
|
|
3
|
-
*/
|
|
4
|
-
import { getAgentSdkQuery, warnLog, debugLog } from '../lib/utils.js';
|
|
5
|
-
import { TIMEOUTS, AGENT } from '../lib/constants.js';
|
|
6
|
-
import { getModelOverride } from '../lib/config/GlobalConfigManager.js';
|
|
7
|
-
import { isCodexAvailable } from '../lib/llm-availability.js';
|
|
8
|
-
import { CostAccumulator } from '../lib/CostAccumulator.js';
|
|
9
|
-
import { runCodexAgentOnce } from './CodexAgentRuntime.js';
|
|
10
|
-
// Multi-LLM Research (분리된 모듈)
|
|
11
|
-
import { executeMultiLlmResearch, formatMultiLlmResults, countPlannedMultiLlmCalls } from './MultiLlmResearch.js';
|
|
12
|
-
// Re-export for backward compatibility
|
|
13
|
-
export { executeMultiLlmResearch, formatMultiLlmResults };
|
|
14
|
-
/**
|
|
15
|
-
* 기본 리서치 태스크 템플릿
|
|
16
|
-
*/
|
|
17
|
-
export function createResearchTasks(feature, techStack = []) {
|
|
18
|
-
const stackStr = techStack.length > 0 ? techStack.join(', ') : 'the project';
|
|
19
|
-
return [
|
|
20
|
-
{
|
|
21
|
-
name: 'best-practices',
|
|
22
|
-
category: 'best-practices',
|
|
23
|
-
prompt: `Research best practices for implementing "${feature}" with ${stackStr}. Focus on:
|
|
24
|
-
1. Industry-standard patterns
|
|
25
|
-
2. Common pitfalls to avoid
|
|
26
|
-
3. Recommended libraries/tools
|
|
27
|
-
4. Testing strategies
|
|
28
|
-
|
|
29
|
-
Provide actionable recommendations.`
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: 'framework-docs',
|
|
33
|
-
category: 'framework-docs',
|
|
34
|
-
prompt: `Find the latest documentation for ${stackStr} related to "${feature}". Include:
|
|
35
|
-
1. Official API references
|
|
36
|
-
2. Configuration options
|
|
37
|
-
3. Migration guides if applicable
|
|
38
|
-
4. Code examples from official docs
|
|
39
|
-
|
|
40
|
-
Use context7 MCP if available for up-to-date documentation.`
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'codebase-patterns',
|
|
44
|
-
category: 'codebase-patterns',
|
|
45
|
-
prompt: `Analyze the current codebase for patterns related to "${feature}". Look for:
|
|
46
|
-
1. Similar existing implementations
|
|
47
|
-
2. Established conventions
|
|
48
|
-
3. Reusable utilities
|
|
49
|
-
4. Potential conflicts or dependencies
|
|
50
|
-
|
|
51
|
-
Use Glob and Grep to search the codebase.`
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
name: 'security-advisory',
|
|
55
|
-
category: 'security-advisory',
|
|
56
|
-
prompt: `Review security considerations for "${feature}" with ${stackStr}. Check:
|
|
57
|
-
1. OWASP Top 10 relevance
|
|
58
|
-
2. Authentication/authorization requirements
|
|
59
|
-
3. Data validation needs
|
|
60
|
-
4. Known vulnerabilities in dependencies
|
|
61
|
-
|
|
62
|
-
Provide security recommendations.`
|
|
63
|
-
}
|
|
64
|
-
];
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* 에이전트 파일 로드
|
|
68
|
-
*/
|
|
69
|
-
async function loadAgentFile(agentName, projectPath) {
|
|
70
|
-
const { promises: fs } = await import('fs');
|
|
71
|
-
const path = await import('path');
|
|
72
|
-
const possiblePaths = [
|
|
73
|
-
path.join(projectPath, '.claude', 'agents', 'research', `${agentName}.md`),
|
|
74
|
-
path.join(projectPath, 'agents', 'research', `${agentName}.md`),
|
|
75
|
-
path.join(process.cwd(), 'agents', 'research', `${agentName}.md`)
|
|
76
|
-
];
|
|
77
|
-
for (const filePath of possiblePaths) {
|
|
78
|
-
try {
|
|
79
|
-
return await fs.readFile(filePath, 'utf-8');
|
|
80
|
-
}
|
|
81
|
-
catch { /* try next path */ }
|
|
82
|
-
}
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* 단일 리서치 태스크 실행
|
|
87
|
-
*/
|
|
88
|
-
async function executeResearchTask(task, projectPath, timeout) {
|
|
89
|
-
const startTime = Date.now();
|
|
90
|
-
const query = await getAgentSdkQuery();
|
|
91
|
-
if (!query) {
|
|
92
|
-
if (isCodexAvailable()) {
|
|
93
|
-
return runCodexAgentOnce({
|
|
94
|
-
prompt: task.prompt,
|
|
95
|
-
agentName: task.name,
|
|
96
|
-
projectPath,
|
|
97
|
-
maxTurns: 3,
|
|
98
|
-
allowedTools: ['Read', 'Glob', 'Grep', 'WebFetch', 'WebSearch'],
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
return {
|
|
102
|
-
agentName: task.name,
|
|
103
|
-
sessionId: `simulated-${Date.now()}`,
|
|
104
|
-
result: `[Agent SDK not installed] Task "${task.name}" would execute: ${task.prompt.slice(0, 100)}...`,
|
|
105
|
-
success: true,
|
|
106
|
-
duration: Date.now() - startTime
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
try {
|
|
110
|
-
let sessionId = '';
|
|
111
|
-
let result = '';
|
|
112
|
-
const agentContent = await loadAgentFile(task.name, projectPath);
|
|
113
|
-
// timeout 시 SDK query stream/process 를 실제로 종료한다 (B-3 잔여).
|
|
114
|
-
// 이전에는 Promise.race 로 로컬만 빠져나오고 query 는 백그라운드에서 계속 돌았다.
|
|
115
|
-
const abortController = new AbortController();
|
|
116
|
-
const response = query({
|
|
117
|
-
prompt: task.prompt,
|
|
118
|
-
options: {
|
|
119
|
-
model: getModelOverride('claudeResearch') ?? process.env.CLAUDE_RESEARCH_MODEL,
|
|
120
|
-
maxTurns: 3,
|
|
121
|
-
allowedTools: ['Read', 'Glob', 'Grep', 'WebFetch', 'WebSearch'],
|
|
122
|
-
cwd: projectPath,
|
|
123
|
-
systemPrompt: agentContent || undefined,
|
|
124
|
-
abortController
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
let timeoutTimer;
|
|
128
|
-
const timeoutPromise = new Promise((_, reject) => {
|
|
129
|
-
timeoutTimer = setTimeout(() => {
|
|
130
|
-
abortController.abort();
|
|
131
|
-
reject(new Error('Research task timeout'));
|
|
132
|
-
}, timeout);
|
|
133
|
-
});
|
|
134
|
-
const collectResult = async () => {
|
|
135
|
-
for await (const message of response) {
|
|
136
|
-
const msg = message;
|
|
137
|
-
if (msg.type === 'system' && msg.subtype === 'init' && msg.session_id) {
|
|
138
|
-
sessionId = msg.session_id;
|
|
139
|
-
}
|
|
140
|
-
if (msg.type === 'result' && msg.result) {
|
|
141
|
-
result = msg.result;
|
|
142
|
-
}
|
|
143
|
-
if (msg.type === 'assistant' && msg.message?.content) {
|
|
144
|
-
const textContent = msg.message.content
|
|
145
|
-
.filter(block => block.type === 'text' && block.text)
|
|
146
|
-
.map(block => block.text)
|
|
147
|
-
.join('\n');
|
|
148
|
-
if (textContent)
|
|
149
|
-
result += textContent;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
try {
|
|
154
|
-
await Promise.race([collectResult(), timeoutPromise]);
|
|
155
|
-
}
|
|
156
|
-
finally {
|
|
157
|
-
if (timeoutTimer)
|
|
158
|
-
clearTimeout(timeoutTimer);
|
|
159
|
-
}
|
|
160
|
-
return {
|
|
161
|
-
agentName: task.name,
|
|
162
|
-
sessionId,
|
|
163
|
-
result: result || 'No result collected',
|
|
164
|
-
success: true,
|
|
165
|
-
duration: Date.now() - startTime
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
catch (error) {
|
|
169
|
-
return {
|
|
170
|
-
agentName: task.name,
|
|
171
|
-
sessionId: '',
|
|
172
|
-
result: '',
|
|
173
|
-
success: false,
|
|
174
|
-
error: error instanceof Error ? error.message : String(error),
|
|
175
|
-
duration: Date.now() - startTime
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* 병렬 리서치 실행
|
|
181
|
-
*/
|
|
182
|
-
export async function parallelResearch(args) {
|
|
183
|
-
const { tasks, projectPath = process.cwd(), maxConcurrency = AGENT.MAX_CONCURRENCY, timeout = TIMEOUTS.RESEARCH } = args;
|
|
184
|
-
const startTime = Date.now();
|
|
185
|
-
const results = [];
|
|
186
|
-
try {
|
|
187
|
-
const chunks = [];
|
|
188
|
-
for (let i = 0; i < tasks.length; i += maxConcurrency) {
|
|
189
|
-
chunks.push(tasks.slice(i, i + maxConcurrency));
|
|
190
|
-
}
|
|
191
|
-
for (const chunk of chunks) {
|
|
192
|
-
const chunkResults = await Promise.all(chunk.map(task => executeResearchTask(task, projectPath, timeout)));
|
|
193
|
-
results.push(...chunkResults);
|
|
194
|
-
}
|
|
195
|
-
const totalDuration = Date.now() - startTime;
|
|
196
|
-
const successCount = results.filter(r => r.success).length;
|
|
197
|
-
const failureCount = results.length - successCount;
|
|
198
|
-
let summary = `## Parallel Research Results\n\n`;
|
|
199
|
-
summary += `**Duration**: ${(totalDuration / 1000).toFixed(1)}s\n`;
|
|
200
|
-
summary += `**Success**: ${successCount}/${results.length}\n\n`;
|
|
201
|
-
for (const result of results) {
|
|
202
|
-
const status = result.success ? '✅' : '❌';
|
|
203
|
-
summary += `### ${status} ${result.agentName}\n`;
|
|
204
|
-
summary += `Duration: ${(result.duration / 1000).toFixed(1)}s\n`;
|
|
205
|
-
if (result.success) {
|
|
206
|
-
summary += `\n${result.result}\n`;
|
|
207
|
-
}
|
|
208
|
-
else {
|
|
209
|
-
summary += `Error: ${result.error}\n`;
|
|
210
|
-
}
|
|
211
|
-
summary += '\n---\n\n';
|
|
212
|
-
}
|
|
213
|
-
return {
|
|
214
|
-
content: [{ type: 'text', text: summary }],
|
|
215
|
-
results, totalDuration, successCount, failureCount
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
catch (error) {
|
|
219
|
-
return {
|
|
220
|
-
content: [{
|
|
221
|
-
type: 'text',
|
|
222
|
-
text: `Parallel research failed: ${error instanceof Error ? error.message : String(error)}`
|
|
223
|
-
}]
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* 기능 기반 병렬 리서치 (간편 API)
|
|
229
|
-
*/
|
|
230
|
-
export async function researchFeature(feature, techStack = [], projectPath = process.cwd()) {
|
|
231
|
-
const tasks = createResearchTasks(feature, techStack);
|
|
232
|
-
return parallelResearch({ tasks, projectPath });
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* 통합 병렬 리서치 (Claude 에이전트 + Multi-LLM)
|
|
236
|
-
*/
|
|
237
|
-
export async function parallelResearchWithMultiLlm(args) {
|
|
238
|
-
const { feature, techStack, ...researchArgs } = args;
|
|
239
|
-
const startTime = Date.now();
|
|
240
|
-
// ── Preflight (B-7): fan-out 규모를 먼저 보여주고, 예산 초과 시 직접 Multi-LLM 호출은 차단 ──
|
|
241
|
-
const projectPath = researchArgs.projectPath ?? process.cwd();
|
|
242
|
-
const concurrency = researchArgs.maxConcurrency ?? AGENT.MAX_CONCURRENCY;
|
|
243
|
-
const claudeCount = researchArgs.tasks.length;
|
|
244
|
-
const plannedMultiLlm = countPlannedMultiLlmCalls();
|
|
245
|
-
const budget = CostAccumulator.checkBudget(projectPath);
|
|
246
|
-
// 예산이 blocking 수준이면 비싼 직접 Multi-LLM fan-out 을 건너뛰고 Claude 에이전트만 실행한다.
|
|
247
|
-
const runMultiLlm = budget.allowed && plannedMultiLlm > 0;
|
|
248
|
-
debugLog(`[Research] Preflight: Claude agents=${claudeCount} (concurrency ${concurrency}), ` +
|
|
249
|
-
`Multi-LLM direct calls=${plannedMultiLlm}` +
|
|
250
|
-
(budget.budget > 0 ? `, budget ${budget.usagePercent.toFixed(0)}% (${budget.level})` : ''));
|
|
251
|
-
if (plannedMultiLlm > 0 && !runMultiLlm) {
|
|
252
|
-
warnLog(`[Research] Multi-LLM fan-out skipped — budget ${budget.level} ` +
|
|
253
|
-
`($${budget.currentSpend.toFixed(2)}/$${budget.budget}). Running Claude agents only.`);
|
|
254
|
-
}
|
|
255
|
-
const [claudeResult, multiLlmResults] = await Promise.all([
|
|
256
|
-
parallelResearch(researchArgs),
|
|
257
|
-
runMultiLlm
|
|
258
|
-
? executeMultiLlmResearch(feature, techStack).catch(e => {
|
|
259
|
-
warnLog('[Multi-LLM] Research failed:', e);
|
|
260
|
-
return [];
|
|
261
|
-
})
|
|
262
|
-
: Promise.resolve([])
|
|
263
|
-
]);
|
|
264
|
-
const totalDuration = Date.now() - startTime;
|
|
265
|
-
const multiLlmSuccess = multiLlmResults.filter(r => r.success).length;
|
|
266
|
-
const multiLlmFailure = multiLlmResults.length - multiLlmSuccess;
|
|
267
|
-
let combinedText = claudeResult.content[0].text;
|
|
268
|
-
if (multiLlmResults.length > 0) {
|
|
269
|
-
combinedText += formatMultiLlmResults(multiLlmResults);
|
|
270
|
-
}
|
|
271
|
-
return {
|
|
272
|
-
content: [{ type: 'text', text: combinedText }],
|
|
273
|
-
results: claudeResult.results || [],
|
|
274
|
-
totalDuration,
|
|
275
|
-
successCount: (claudeResult.successCount || 0) + multiLlmSuccess,
|
|
276
|
-
failureCount: (claudeResult.failureCount || 0) + multiLlmFailure,
|
|
277
|
-
multiLlm: {
|
|
278
|
-
results: multiLlmResults,
|
|
279
|
-
totalDuration: multiLlmResults.reduce((sum, r) => sum + r.duration, 0),
|
|
280
|
-
successCount: multiLlmSuccess,
|
|
281
|
-
failureCount: multiLlmFailure
|
|
282
|
-
}
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
//# sourceMappingURL=parallelResearch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parallelResearch.js","sourceRoot":"","sources":["../../../src/infra/orchestrator/parallelResearch.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;A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C;QAC/B,YAAY,IAAI,qBAAqB,CAAC,eAAe,CAAC,CAAC;IACzD,CAAC;IAED,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;QAC/C,OAAO,EAAG,YAAkD,CAAC,OAAO,IAAI,EAAE;QAC1E,aAAa;QACb,YAAY,EAAE,CAAE,YAAkD,CAAC,YAAY,IAAI,CAAC,CAAC,GAAG,eAAe;QACvG,YAAY,EAAE,CAAE,YAAkD,CAAC,YAAY,IAAI,CAAC,CAAC,GAAG,eAAe;QACvG,QAAQ,EAAE;YACR,OAAO,EAAE,eAAe;YACxB,aAAa,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;YACtE,YAAY,EAAE,eAAe;YAC7B,YAAY,EAAE,eAAe;SAC9B;KACqC,CAAC;AAC3C,CAAC"}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Orchestrator Types - Agent SDK 기반 오케스트레이션 타입 정의
|
|
3
|
-
*/
|
|
4
|
-
import { ToolResult } from '../types/tool.js';
|
|
5
|
-
export type ClaudeModel = 'claude-opus-4-8' | 'claude-sonnet-5' | 'claude-haiku-4-5-20251001' | 'opus' | 'sonnet' | 'haiku' | 'inherit' | string;
|
|
6
|
-
export interface AgentConfig {
|
|
7
|
-
name: string;
|
|
8
|
-
description: string;
|
|
9
|
-
prompt: string;
|
|
10
|
-
model?: ClaudeModel;
|
|
11
|
-
maxTurns?: number;
|
|
12
|
-
allowedTools?: string[];
|
|
13
|
-
systemPrompt?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface AgentResult {
|
|
16
|
-
agentName: string;
|
|
17
|
-
sessionId: string;
|
|
18
|
-
result: string;
|
|
19
|
-
success: boolean;
|
|
20
|
-
error?: string;
|
|
21
|
-
duration: number;
|
|
22
|
-
}
|
|
23
|
-
export interface ResearchTask {
|
|
24
|
-
name: string;
|
|
25
|
-
prompt: string;
|
|
26
|
-
category: 'best-practices' | 'framework-docs' | 'codebase-patterns' | 'security-advisory' | 'custom';
|
|
27
|
-
}
|
|
28
|
-
export interface ParallelResearchArgs {
|
|
29
|
-
tasks: ResearchTask[];
|
|
30
|
-
projectPath?: string;
|
|
31
|
-
maxConcurrency?: number;
|
|
32
|
-
timeout?: number;
|
|
33
|
-
}
|
|
34
|
-
export interface ParallelResearchResult {
|
|
35
|
-
results: AgentResult[];
|
|
36
|
-
totalDuration: number;
|
|
37
|
-
successCount: number;
|
|
38
|
-
failureCount: number;
|
|
39
|
-
/** Multi-LLM 리서치 결과 */
|
|
40
|
-
multiLlm?: MultiLlmResearchResult;
|
|
41
|
-
}
|
|
42
|
-
/** Multi-LLM 단일 결과 */
|
|
43
|
-
export interface MultiLlmResult {
|
|
44
|
-
provider: 'gpt' | 'antigravity';
|
|
45
|
-
category: 'best-practices' | 'security';
|
|
46
|
-
result: string;
|
|
47
|
-
success: boolean;
|
|
48
|
-
error?: string;
|
|
49
|
-
duration: number;
|
|
50
|
-
}
|
|
51
|
-
/** Multi-LLM 리서치 전체 결과 */
|
|
52
|
-
export interface MultiLlmResearchResult {
|
|
53
|
-
results: MultiLlmResult[];
|
|
54
|
-
totalDuration: number;
|
|
55
|
-
successCount: number;
|
|
56
|
-
failureCount: number;
|
|
57
|
-
}
|
|
58
|
-
export interface BackgroundAgentArgs {
|
|
59
|
-
prompt: string;
|
|
60
|
-
agentName?: string;
|
|
61
|
-
model?: ClaudeModel;
|
|
62
|
-
maxTurns?: number;
|
|
63
|
-
allowedTools?: string[];
|
|
64
|
-
projectPath?: string;
|
|
65
|
-
onProgress?: (message: string) => void;
|
|
66
|
-
}
|
|
67
|
-
export interface BackgroundAgentHandle {
|
|
68
|
-
sessionId: string;
|
|
69
|
-
agentName: string;
|
|
70
|
-
status: 'running' | 'completed' | 'failed' | 'cancelled';
|
|
71
|
-
startTime: number;
|
|
72
|
-
getResult: () => Promise<AgentResult>;
|
|
73
|
-
cancel: () => void;
|
|
74
|
-
}
|
|
75
|
-
export interface DiscoveredAgent {
|
|
76
|
-
name: string;
|
|
77
|
-
path: string;
|
|
78
|
-
category: string;
|
|
79
|
-
description: string;
|
|
80
|
-
content: string;
|
|
81
|
-
}
|
|
82
|
-
export interface AgentDiscoveryArgs {
|
|
83
|
-
projectPath?: string;
|
|
84
|
-
category?: string;
|
|
85
|
-
pattern?: string;
|
|
86
|
-
}
|
|
87
|
-
export interface SessionInfo {
|
|
88
|
-
sessionId: string;
|
|
89
|
-
agentName: string;
|
|
90
|
-
status: 'active' | 'completed' | 'failed';
|
|
91
|
-
startTime: number;
|
|
92
|
-
endTime?: number;
|
|
93
|
-
prompt: string;
|
|
94
|
-
}
|
|
95
|
-
export interface SessionStore {
|
|
96
|
-
sessions: Map<string, SessionInfo>;
|
|
97
|
-
add: (session: SessionInfo) => void;
|
|
98
|
-
get: (sessionId: string) => SessionInfo | undefined;
|
|
99
|
-
list: () => SessionInfo[];
|
|
100
|
-
cleanup: (maxAge: number) => void;
|
|
101
|
-
}
|
|
102
|
-
export interface OrchestratorOptions {
|
|
103
|
-
projectPath?: string;
|
|
104
|
-
verbose?: boolean;
|
|
105
|
-
saveResults?: boolean;
|
|
106
|
-
resultsPath?: string;
|
|
107
|
-
}
|
|
108
|
-
export interface AgentMessage {
|
|
109
|
-
type: 'system' | 'assistant' | 'user' | 'result';
|
|
110
|
-
subtype?: 'init' | 'progress' | 'tool_use' | 'tool_result';
|
|
111
|
-
session_id?: string;
|
|
112
|
-
content?: string;
|
|
113
|
-
result?: string;
|
|
114
|
-
message?: {
|
|
115
|
-
content: Array<{
|
|
116
|
-
type: string;
|
|
117
|
-
text?: string;
|
|
118
|
-
}>;
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
export interface OrchestratorToolResult extends ToolResult {
|
|
122
|
-
metadata?: {
|
|
123
|
-
sessionId?: string;
|
|
124
|
-
duration?: number;
|
|
125
|
-
agentName?: string;
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
/** 작업 유형 - LLM 선택에 사용 */
|
|
129
|
-
export type TaskType = 'architecture' | 'debugging' | 'uiux' | 'code-analysis' | 'code-gen' | 'web-search' | 'general' | 'code-review' | 'reasoning';
|
|
130
|
-
/** LLM 제공자 */
|
|
131
|
-
export type LLMProvider = 'gpt' | 'antigravity' | 'zai' | 'claude';
|
|
132
|
-
/** 스마트 라우팅 요청 */
|
|
133
|
-
export interface SmartRouteRequest {
|
|
134
|
-
type: TaskType;
|
|
135
|
-
prompt: string;
|
|
136
|
-
systemPrompt?: string;
|
|
137
|
-
/** 특정 LLM 강제 지정 (fallback은 여전히 동작) */
|
|
138
|
-
preferredLlm?: LLMProvider;
|
|
139
|
-
/** 재시도 횟수 (기본: 2) */
|
|
140
|
-
maxRetries?: number;
|
|
141
|
-
}
|
|
142
|
-
/** 스마트 라우팅 결과 */
|
|
143
|
-
export interface SmartRouteResult {
|
|
144
|
-
content: string;
|
|
145
|
-
provider: LLMProvider;
|
|
146
|
-
success: boolean;
|
|
147
|
-
/** fallback 발생 여부 */
|
|
148
|
-
usedFallback: boolean;
|
|
149
|
-
/** 시도한 LLM 목록 */
|
|
150
|
-
attemptedProviders: LLMProvider[];
|
|
151
|
-
/** 각 LLM의 에러 (있는 경우) */
|
|
152
|
-
errors?: Record<LLMProvider, string>;
|
|
153
|
-
duration: number;
|
|
154
|
-
}
|
|
155
|
-
/** LLM 가용성 캐시 */
|
|
156
|
-
export interface LLMAvailabilityCache {
|
|
157
|
-
gpt: {
|
|
158
|
-
available: boolean;
|
|
159
|
-
checkedAt: number;
|
|
160
|
-
errorCount: number;
|
|
161
|
-
};
|
|
162
|
-
antigravity: {
|
|
163
|
-
available: boolean;
|
|
164
|
-
checkedAt: number;
|
|
165
|
-
errorCount: number;
|
|
166
|
-
};
|
|
167
|
-
zai: {
|
|
168
|
-
available: boolean;
|
|
169
|
-
checkedAt: number;
|
|
170
|
-
errorCount: number;
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* 작업 유형 목록 (런타임 SSOT — TaskType 유니온의 값 표현)
|
|
175
|
-
*/
|
|
176
|
-
export declare const TASK_TYPES: TaskType[];
|
|
177
|
-
/** LLM 가용성 입력 — provider 별 boolean (미지정은 비가용으로 취급) */
|
|
178
|
-
export interface LlmAvailabilityInput {
|
|
179
|
-
codex?: boolean;
|
|
180
|
-
antigravity?: boolean;
|
|
181
|
-
zai?: boolean;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* 순수 LLM 우선순위 정책 — 가용성만 입력받아 provider 체인을 계산한다(I/O 없음).
|
|
185
|
-
* Claude 는 항상 최후 fallback.
|
|
186
|
-
*/
|
|
187
|
-
export declare function computeLlmPriority(type: TaskType, availability: LlmAvailabilityInput): LLMProvider[];
|
|
188
|
-
/**
|
|
189
|
-
* 작업 유형별 LLM 우선순위 (모든 provider 가용 시의 이상적 순서).
|
|
190
|
-
* computeLlmPriority 에서 파생 — getTaskLlmPriority(런타임) 와 절대 어긋나지 않는다.
|
|
191
|
-
*/
|
|
192
|
-
export declare const TASK_LLM_PRIORITY: Record<TaskType, LLMProvider[]>;
|
|
193
|
-
/**
|
|
194
|
-
* 작업 유형별 기본 system prompt (SSOT)
|
|
195
|
-
* — SmartRouter 편의 메서드와 index.ts smart* 래퍼가 공유한다.
|
|
196
|
-
* (이전에는 두 계층에 같은 문자열이 각각 하드코딩되어 있었다)
|
|
197
|
-
*/
|
|
198
|
-
export declare const TASK_SYSTEM_PROMPTS: Record<TaskType, string>;
|
|
199
|
-
/**
|
|
200
|
-
* 동적 LLM 우선순위 — 런타임 Codex/Antigravity 가용성에 맞춰 computeLlmPriority 를 적용.
|
|
201
|
-
*
|
|
202
|
-
* 기본: Claude만 사용 · +Codex: 추론/코딩/리뷰에 GPT 추가 · +Antigravity: 리서치/리뷰/UI에 추가
|
|
203
|
-
*/
|
|
204
|
-
export declare function getTaskLlmPriority(type: TaskType): LLMProvider[];
|
|
205
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/infra/orchestrator/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI9C,MAAM,MAAM,WAAW,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,2BAA2B,GAE3B,MAAM,GACN,QAAQ,GACR,OAAO,GACP,SAAS,GACT,MAAM,CAAC;AAGX,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAGD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,gBAAgB,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,mBAAmB,GAAG,QAAQ,CAAC;CACtG;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC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ability.js';
|
|
5
|
-
/**
|
|
6
|
-
* 작업 유형 목록 (런타임 SSOT — TaskType 유니온의 값 표현)
|
|
7
|
-
*/
|
|
8
|
-
export const TASK_TYPES = [
|
|
9
|
-
'architecture', 'debugging', 'uiux', 'code-analysis', 'code-gen',
|
|
10
|
-
'web-search', 'general', 'code-review', 'reasoning',
|
|
11
|
-
];
|
|
12
|
-
// ─── LLM 라우팅 정책 (단일 SSOT) ───
|
|
13
|
-
// 아래 그룹 + computeLlmPriority 가 provider 우선순위의 유일 소스다.
|
|
14
|
-
// 정적 맵(TASK_LLM_PRIORITY)과 동적 함수(getTaskLlmPriority) 둘 다 여기서 파생하므로
|
|
15
|
-
// 구조적으로 어긋날 수 없다. (이전에는 두 정의가 서로 다른 정책을 인코딩해 드리프트했다)
|
|
16
|
-
/** Codex(GPT) 를 우선 붙이는 작업 유형 */
|
|
17
|
-
const GPT_TASK_TYPES = [
|
|
18
|
-
'architecture', 'reasoning', 'code-analysis', 'code-gen', 'debugging', 'code-review',
|
|
19
|
-
];
|
|
20
|
-
/** Antigravity 를 최우선(맨 앞)으로 두는 작업 유형 */
|
|
21
|
-
const ANTIGRAVITY_FIRST_TASK_TYPES = ['web-search', 'uiux'];
|
|
22
|
-
/** Antigravity 를 교차검증용(GPT 뒤)으로 붙이는 작업 유형 */
|
|
23
|
-
const ANTIGRAVITY_CROSSCHECK_TASK_TYPES = ['code-review', 'architecture', 'reasoning'];
|
|
24
|
-
/**
|
|
25
|
-
* ZAI(GLM 최고 모델)가 최우선으로 담당하는 UI 작업 유형.
|
|
26
|
-
* "zai 사용 가능 시 모든 UI 개발은 GLM 최고 모델이 담당" 정책.
|
|
27
|
-
*/
|
|
28
|
-
const ZAI_UI_TASK_TYPES = ['uiux'];
|
|
29
|
-
/**
|
|
30
|
-
* 순수 LLM 우선순위 정책 — 가용성만 입력받아 provider 체인을 계산한다(I/O 없음).
|
|
31
|
-
* Claude 는 항상 최후 fallback.
|
|
32
|
-
*/
|
|
33
|
-
export function computeLlmPriority(type, availability) {
|
|
34
|
-
const { codex, antigravity, zai } = availability;
|
|
35
|
-
if (!codex && !antigravity && !zai)
|
|
36
|
-
return ['claude'];
|
|
37
|
-
const priority = [];
|
|
38
|
-
// ZAI(GLM)가 가용하면 UI 작업을 최우선으로 담당
|
|
39
|
-
if (zai && ZAI_UI_TASK_TYPES.includes(type))
|
|
40
|
-
priority.push('zai');
|
|
41
|
-
if (codex && GPT_TASK_TYPES.includes(type))
|
|
42
|
-
priority.push('gpt');
|
|
43
|
-
if (antigravity) {
|
|
44
|
-
if (ANTIGRAVITY_FIRST_TASK_TYPES.includes(type)) {
|
|
45
|
-
// zai 가 이미 선두면 그 뒤로, 아니면 맨 앞으로
|
|
46
|
-
if (priority[0] === 'zai')
|
|
47
|
-
priority.push('antigravity');
|
|
48
|
-
else
|
|
49
|
-
priority.unshift('antigravity');
|
|
50
|
-
}
|
|
51
|
-
else if (ANTIGRAVITY_CROSSCHECK_TASK_TYPES.includes(type)) {
|
|
52
|
-
priority.push('antigravity');
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
priority.push('claude');
|
|
56
|
-
return priority;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* 작업 유형별 LLM 우선순위 (모든 provider 가용 시의 이상적 순서).
|
|
60
|
-
* computeLlmPriority 에서 파생 — getTaskLlmPriority(런타임) 와 절대 어긋나지 않는다.
|
|
61
|
-
*/
|
|
62
|
-
export const TASK_LLM_PRIORITY = Object.fromEntries(TASK_TYPES.map((t) => [t, computeLlmPriority(t, { codex: true, antigravity: true, zai: true })]));
|
|
63
|
-
/**
|
|
64
|
-
* 작업 유형별 기본 system prompt (SSOT)
|
|
65
|
-
* — SmartRouter 편의 메서드와 index.ts smart* 래퍼가 공유한다.
|
|
66
|
-
* (이전에는 두 계층에 같은 문자열이 각각 하드코딩되어 있었다)
|
|
67
|
-
*/
|
|
68
|
-
export const TASK_SYSTEM_PROMPTS = {
|
|
69
|
-
'architecture': 'You are a software architect. Analyze and review the architecture.',
|
|
70
|
-
'debugging': 'You are a debugging expert. Find bugs and suggest fixes.',
|
|
71
|
-
'uiux': 'You are a UI/UX expert. Analyze and provide feedback.',
|
|
72
|
-
'code-analysis': 'You are a code analysis expert. Review and analyze the code.',
|
|
73
|
-
'code-gen': 'Generate clean, well-documented code.',
|
|
74
|
-
'web-search': 'Search the web and provide relevant information.',
|
|
75
|
-
'general': 'You are a helpful assistant.',
|
|
76
|
-
'code-review': 'You are a code review expert. Review the code for bugs, style, and best practices.',
|
|
77
|
-
'reasoning': 'You are a reasoning expert. Analyze the problem step by step.',
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* 동적 LLM 우선순위 — 런타임 Codex/Antigravity 가용성에 맞춰 computeLlmPriority 를 적용.
|
|
81
|
-
*
|
|
82
|
-
* 기본: Claude만 사용 · +Codex: 추론/코딩/리뷰에 GPT 추가 · +Antigravity: 리서치/리뷰/UI에 추가
|
|
83
|
-
*/
|
|
84
|
-
export function getTaskLlmPriority(type) {
|
|
85
|
-
return computeLlmPriority(type, detectLlmAvailability());
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/infra/orchestrator/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAgNnE;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAe;IACpC,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,UAAU;IAChE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW;CACpD,CAAC;AAEF,+BAA+B;AAC/B,sDAAsD;AACtD,mEAAmE;AACnE,qDAAqD;AAErD,gCAAgC;AAChC,MAAM,cAAc,GAAwB;IAC1C,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,E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