AI Agents SDE Task Viewer
      • Pr description
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-351
  5. changes
  6. pr_description.md
pr_description.md(1.3 KB)· Apr 8, 2026· 1 min read
  • Title
  • Problem
  • Task / Link
  • Changes
  • Notes
  • Testing

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: import LLMModule instead of InvokeModule
  • phase-router.service.ts: inject LLMProvider via LLM_PROVIDER token instead of ClaudeInvocationService; call this.llm.invoke() instead of this.claude.invoke()
  • phase-router.service.ts: remove toSignalKind() — use result.signal directly from PhaseResult
  • phase-router.service.ts: update PR metadata extraction to use result.prNumber/result.prBranch instead of result.metadata
  • phase-router.service.ts: update validateCompoundScope() to accept PhaseResult
  • phase-router.service.spec.ts: replace ClaudeInvocationService mock with LLM_PROVIDER token mock; update all result helpers to return PhaseResult

Notes#

Depends on #346 (LLMProvider interface + ClaudeCLIProvider), which is already merged.

Testing#

  • npx tsc --noEmit — no type errors
  • npm run lint — zero warnings
  • npm run test (phase-router) — 101 tests passing
PrdAgent-runner