Title#
Migrate PhaseRouterService from ClaudeInvocationService to LLMProvider
Problem#
PhaseRouterService directly depended on ClaudeInvocationService and performed its own signal parsing (toSignalKind()) and raw metadata extraction (result.metadata['prNumber']). This coupling made the phase router aware of Claude-specific signal protocol details.
Task / Link#
Closes #351
Changes#
phase-router.module.ts: importLLMModuleinstead ofInvokeModulephase-router.service.ts: injectLLMProviderviaLLM_PROVIDERtoken instead ofClaudeInvocationService; callthis.llm.invoke()instead ofthis.claude.invoke()phase-router.service.ts: removetoSignalKind()— useresult.signaldirectly fromPhaseResultphase-router.service.ts: update PR metadata extraction to useresult.prNumber/result.prBranchinstead ofresult.metadataphase-router.service.ts: updatevalidateCompoundScope()to acceptPhaseResultphase-router.service.spec.ts: replaceClaudeInvocationServicemock withLLM_PROVIDERtoken mock; update all result helpers to returnPhaseResult
Notes#
Depends on #346 (LLMProvider interface + ClaudeCLIProvider), which is already merged.
Testing#
npx tsc --noEmit— no type errorsnpm run lint— zero warningsnpm run test(phase-router) — 101 tests passing