SQL 리뷰 계층과 AgentLoop 응답 분해 helper를 추가해 코드 탭 마감 품질을 높임

- SqlReviewService를 추가해 SQL fallback 결과에 review severity, key findings, review checklist를 붙이고 schema migration, seed/reference data, reporting query마다 다른 검토 포인트를 안내하도록 확장했습니다.
- SqlAnalysisService와 CodeLanguageCatalog를 업데이트해 SQL fallback summary와 workflow summary가 rollback notes, dependency order, row-count guard 같은 리뷰 힌트를 직접 포함하도록 보강했습니다.
- AgentLoopResponseClassificationService를 추가해 LLM 응답에서 text/tool_use 분리, no-tool 연속 카운트 계산, thinking summary 생성을 helper로 분리했고 AgentLoopService 본체는 해당 helper를 사용하도록 정리했습니다.
- README, docs/DEVELOPMENT.md, docs/NEXT_ROADMAP.md에 2026-04-15 11:50 (KST) 기준 이력을 반영했습니다.

검증 결과
- dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_loop_sql_finalize\\ -p:IntermediateOutputPath=obj\\verify_loop_sql_finalize\\ : 경고 0 / 오류 0
- dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "AgentLoopResponseClassificationServiceTests|AgentLoopLlmRequestPreparationServiceTests|AgentLoopIterationPreparationServiceTests|SqlAnalysisServiceTests|SqlReviewServiceTests|CodeLanguageCatalogTests|WorkspaceContextGeneratorTests" -p:OutputPath=bin\\verify_loop_sql_finalize_tests\\ -p:IntermediateOutputPath=obj\\verify_loop_sql_finalize_tests\\ : 통과 48
This commit is contained in:
2026-04-15 11:51:42 +09:00
parent 2a49b1da24
commit 717d0f2143
12 changed files with 354 additions and 36 deletions

View File

@@ -1247,3 +1247,38 @@ UI ?붿옄???€洹쒕え 由ы뙥?좊쭅 ???꾪뿕 ?묒뾽 ??湲곕줉???덉쟾
### 검증
- `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_code_sql_doc\\ -p:IntermediateOutputPath=obj\\verify_code_sql_doc\\` 경고 0 / 오류 0
- `dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "SqlDialectDetectorTests|SqlAnalysisServiceTests|CodeLanguageCatalogTests|WorkspaceContextGeneratorTests|ArtifactQualityReviewServiceTests|ArtifactRepairGuideServiceTests|DeckQualityReviewServiceTests|HtmlSkillConsultingSectionsTests" -p:OutputPath=bin\\verify_code_sql_doc_tests\\ -p:IntermediateOutputPath=obj\\verify_code_sql_doc_tests\\` 통과 62
업데이트: 2026-04-15 11:50 (KST)
### SQL review 계층 추가
- 새 `SqlReviewService.cs`
- `SqlReviewResult`를 도입해 `review severity`, `key findings`, `review checklist`를 구조화했습니다.
- schema migration/schema change는 migration sequencing, dependent object readiness를 우선 체크합니다.
- seed/reference data는 rerun safety와 idempotent upsert 관점을 별도 체크합니다.
- query/reporting SQL은 join width와 downstream consumer 영향 검토 포인트를 추가합니다.
- destructive DDL, broad DML, unclear transaction scope, wildcard projection을 findings/checklist로 변환합니다.
- `SqlAnalysisService.cs`
- `BuildFallbackSummary()`가 `SqlReviewService.Review(report)` 결과를 이어붙여 SQL fallback을 `analysis + review` 2단 구조로 반환하도록 변경했습니다.
- `CodeLanguageCatalog.cs`
- SQL workflow summary에 `review: confirm rollback notes, dependency order, and row-count guards before apply` 힌트를 추가했습니다.
### AgentLoop 응답 분해 helper 추가
- 새 `AgentLoopResponseClassificationService.cs`
- LLM 응답 블록을 `TextResponse`, `TextParts`, `ToolCalls`, `NextConsecutiveNoToolResponses`로 분류합니다.
- `BuildThinkingSummary()`를 제공해 thinking preview 길이 제한도 helper에서 처리합니다.
- `AgentLoopService.cs`
- 수동 `text/tool_use` 분리 루프를 제거하고 `AgentLoopResponseClassificationService.Classify()`를 사용하도록 정리했습니다.
- no-tool 응답 누적 카운트와 thinking summary 생성 책임을 helper 호출로 대체했습니다.
### 테스트
- 새 `SqlReviewServiceTests.cs`
- destructive migration은 `high` severity와 rollback checklist를 반환하는지 검증
- seed/reference data는 idempotency와 rerun safety 체크리스트를 반환하는지 검증
- 새 `AgentLoopResponseClassificationServiceTests.cs`
- text/tool_use 분리와 no-tool counter reset/increment 동작 검증
- 기존 `SqlAnalysisServiceTests.cs`, `CodeLanguageCatalogTests.cs`
- SQL fallback summary에 `review severity`, `review checklist`, rollback review 힌트가 들어가는지 회귀 검증
### 검증
- `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_loop_sql_finalize\\ -p:IntermediateOutputPath=obj\\verify_loop_sql_finalize\\` 경고 0 / 오류 0
- `dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "AgentLoopResponseClassificationServiceTests|AgentLoopLlmRequestPreparationServiceTests|AgentLoopIterationPreparationServiceTests|SqlAnalysisServiceTests|SqlReviewServiceTests|CodeLanguageCatalogTests|WorkspaceContextGeneratorTests" -p:OutputPath=bin\\verify_loop_sql_finalize_tests\\ -p:IntermediateOutputPath=obj\\verify_loop_sql_finalize_tests\\` 통과 48

View File

@@ -210,3 +210,10 @@
1. SQL fallback은 `dialect/statement/risk` 수준을 넘어 `script intent/dependency/review focus`까지 확장됐습니다. 다음 선택지는 dialect별 migration lint, schema dependency graph, rollback 시뮬레이션처럼 더 깊은 전용 리뷰 계층입니다.
2. HTML 문서는 `decision_matrix``metric_strip`이 들어오면서 board/strategy 보고서의 의사결정 구조를 더 직접적으로 표현할 수 있게 됐습니다. 남은 작업은 bundled skill을 목적형으로 더 쪼개고 print/export polish를 마감하는 수준입니다.
3. PPT critic은 headline, trade-off, phase milestone, chart takeaway, KPI context를 세밀하게 보기 시작했습니다. 이후 남는 작업은 finance/sales/board fixture 확대와 slide-level auto-repair 정교화처럼 golden 마감 중심입니다.
업데이트: 2026-04-15 11:50 (KST)
### 추가 진행 메모
1. SQL은 이제 fallback 요약에 별도 `review severity / findings / checklist`가 붙는 수준까지 올라왔습니다. 남은 고도화는 dialect별 migration lint, schema dependency graph, rollback simulation 같은 더 깊은 검증 계층입니다.
2. Agent loop는 응답 분해 helper가 추가되어 `RunAsync` 본체가 한 단계 더 얇아졌습니다. 이후 분리 후보는 tool dispatch와 finalize 쪽이라, 구조적 마감은 거의 끝나가고 있습니다.
3. 문서 쪽은 기능 확장보다 `golden fixture 확대`, `목적형 bundled skill`, `print/export polish`처럼 완성도 마감 항목이 중심으로 남았습니다.