코드탭 pre-LLM 단계 결정을 별도 서비스로 분리

- AgentLoopPreLlmStageService를 추가해 thinking summary, Gemini free-tier delay, user prompt submit hook, missing-tool guard, request assembly handoff를 한 단계로 정리함

- AgentLoopService는 pre-LLM stage 결과를 소비하는 형태로 단순화해 history/query assembly 다음 단계가 claw-code처럼 더 선명하게 보이도록 구조를 개선함

- AgentLoopPreLlmStageServiceTests를 추가하고 관련 구조 테스트 60개를 통과시켰으며 dotnet build 경고/오류 0으로 검증함
This commit is contained in:
2026-04-16 02:18:05 +09:00
parent 2e1c7be8c3
commit 1ec529ed1c
6 changed files with 443 additions and 56 deletions

View File

@@ -303,3 +303,21 @@ Updated: 2026-04-16 02:05 (KST)
- Remaining follow-up:
- keep extracting more inline AgentLoop responsibilities into smaller staged services where it improves observability or retry correctness
- continue measuring long Code runs against claw-code-style continuity scenarios
Updated: 2026-04-16 02:13 (KST)
- Delivered in this pass:
- structural alignment step:
- `AgentLoopPreLlmStageService.cs` now owns the iteration decisions immediately before the LLM call.
- the service centralizes:
- thinking-summary selection
- Gemini free-tier delay planning
- user-prompt submit hook fingerprint/payload planning
- missing-tool guard shaping
- request assembly handoff
- `AgentLoopService.cs` now consumes that stage result instead of computing those branches inline.
- test coverage step:
- `AgentLoopPreLlmStageServiceTests.cs` now locks the new pre-LLM decision layer.
- Remaining follow-up:
- continue extracting the actual LLM dispatch / streaming callback branch into a narrower execution service
- compare long-running Code traces against claw-code-style staged transitions and keep reducing inline loop logic