From 7e774a9387c511a60ed7d85cdd0c129a9217aacd Mon Sep 17 00:00:00 2001 From: lacvet Date: Sun, 12 Apr 2026 22:49:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=94=EB=93=9C=20=ED=83=AD=EC=9D=80=20?= =?UTF-8?q?=EC=BB=A8=ED=85=8D=EC=8A=A4=ED=8A=B8=EB=A7=8C=20claude-code?= =?UTF-8?q?=EC=8B=9D=EC=9C=BC=EB=A1=9C=20=EB=91=90=EA=B3=A0=20=ED=92=88?= =?UTF-8?q?=EC=A7=88=20=EA=B2=8C=EC=9D=B4=ED=8A=B8=EB=A5=BC=20AX=20?= =?UTF-8?q?=EA=B8=B0=EC=A4=80=EC=9C=BC=EB=A1=9C=20=EB=B3=B5=EC=9B=90?= =?UTF-8?q?=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - balanced와 reasoning_first 프로필에서 post-tool verification을 다시 활성화해 일반 코드 수정에도 후속 검증이 붙도록 조정 - bugfix/feature/refactor 작업에 구조화된 최종 보고 게이트를 다시 적용하고 Code 시스템 프롬프트의 VERIFY/REPORT 기준을 더 강하게 복원 - README와 DEVELOPMENT 문서 이력을 2026-04-13 00:08 KST 기준으로 갱신 - 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\ 경고 0 / 오류 0 --- README.md | 1 + docs/DEVELOPMENT.md | 2 ++ .../Services/Agent/AgentLoopTransitions.Documents.cs | 9 ++++++++- .../Services/Agent/AgentLoopTransitions.Verification.cs | 4 +++- .../Services/Agent/ModelExecutionProfileCatalog.cs | 4 ++-- src/AxCopilot/Views/ChatWindow.SystemPromptBuilder.cs | 4 +++- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1d304fc..02bf96d 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Windows 전용 시맨틱 런처 & 워크스페이스 매니저 - Cowork 시스템 프롬프트도 같은 기준으로 조정했습니다. 새 문서 생성 시 filler paragraph 대신 bullets, tables, structured comparison을 적극적으로 쓰게 하고, 최종 응답에는 생성 후 점검 항목까지 포함한 구조화 요약을 남기도록 복원했습니다. - 문서형 최종 보고는 `simple`에서도 출력 파일 경로와 핵심 섹션을 남기고, `balanced/rich`에서는 문서 유형, 출력 경로, 핵심 섹션, 분량/구성 규모, 생성 후 확인 사항까지 요약하도록 다시 강화했습니다. - 실행 프로필도 AX 품질 기준으로 일부 되돌렸습니다. `balanced`, `reasoning_first`, `document_heavy`는 문서 검증 게이트와 최종 보고 재정리 게이트를 다시 활성화해, 컨텍스트 관리만 `claude-code`에 맞추고 품질 강제는 AX 쪽 기준을 유지하도록 조정했습니다. +- 코드 탭도 같은 원칙으로 재정렬했습니다. 컨텍스트 압축/전송만 `claude-code` 기준으로 두고, 일반 코드 수정에도 post-tool verification과 구조화된 최종 보고를 다시 요구해 검증 품질과 변경 요약 밀도를 AX 원래 수준에 가깝게 복원했습니다. - 검증: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\` 경고 0 / 오류 0 - 업데이트: 2026-04-12 23:45 (KST) diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index c11be60..7579860 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -741,6 +741,8 @@ owKindCounts를 함께 남겨 %APPDATA%\\AxCopilot\\perf 기준으로 transcript - `AgentLoopService.BuildFinalReportQualityPrompt`는 docs 태스크를 별도 분기합니다. `simple`도 출력 파일 경로와 핵심 섹션을 남기고, `balanced/rich`는 문서 종류, 출력 경로, 핵심 섹션 3~6개, 분량/구성 규모, 생성 후 확인 사항까지 요약하도록 복원했습니다. - `ChatWindow.SystemPromptBuilder`는 Cowork 시스템 프롬프트에 richer document composition 가이드를 다시 넣었습니다. filler paragraph를 줄이고 bullets/tables/structured comparison을 더 적극적으로 쓰게 하며, 최종 completion summary에 생성 후 점검 항목을 포함하도록 했습니다. - `ModelExecutionProfileCatalog`는 품질 강제를 다시 살렸습니다. `balanced`, `reasoning_first`, `document_heavy` 프로필에서 `EnableDocumentVerificationGate`, `DocumentVerificationGateMaxRetries`, `FinalReportGateMaxRetries`를 복원해 문서 생성 후 검증 근거와 최종 보고 품질을 다시 AX 기준으로 유지합니다. +- 코드 쪽도 같은 원칙으로 복원했습니다. `balanced`, `reasoning_first`는 `EnablePostToolVerification`을 다시 켜서 일반 코드 수정에도 후속 검증을 더 쉽게 붙이고, `TryApplyCodeCompletionGateTransition`은 bugfix/feature/refactor 작업에 구조화된 최종 보고를 다시 요구합니다. +- `TryApplyPostToolVerificationTransitionAsync`는 이제 고영향 수정만이 아니라 일반 코드 수정도 diff/build/test 근거가 충분치 않으면 후속 검증을 수행합니다. 컨텍스트 관리만 `claude-code` 방식으로 유지하고, 코드 품질 게이트는 AX 쪽 기준을 되살린 조정입니다. - 검증: `dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\` 경고 0 / 오류 0 ## claude-code식 provider/compact/UI 후속 정렬 diff --git a/src/AxCopilot/Services/Agent/AgentLoopTransitions.Documents.cs b/src/AxCopilot/Services/Agent/AgentLoopTransitions.Documents.cs index b174a4f..7662bdd 100644 --- a/src/AxCopilot/Services/Agent/AgentLoopTransitions.Documents.cs +++ b/src/AxCopilot/Services/Agent/AgentLoopTransitions.Documents.cs @@ -153,8 +153,15 @@ public partial class AgentLoopService var highImpactCodeChange = IsHighImpactCodeModification(ActiveTab ?? "", call.ToolName, result); var hasDiffEvidence = HasDiffEvidenceAfterLastModification(messages); var hasRecentBuildOrTestEvidence = HasBuildOrTestEvidenceAfterLastModification(messages); + var isCodeModification = call.ToolName is "file_edit" or "file_write" or "file_manage" or "script_create"; - if (!highImpactCodeChange || (hasDiffEvidence && hasRecentBuildOrTestEvidence)) + if (!isCodeModification) + return false; + + if (highImpactCodeChange && hasDiffEvidence && hasRecentBuildOrTestEvidence) + return false; + + if (!highImpactCodeChange && (hasDiffEvidence || hasRecentBuildOrTestEvidence)) return false; await RunPostToolVerificationAsync(messages, call.ToolName, result, context, ct); diff --git a/src/AxCopilot/Services/Agent/AgentLoopTransitions.Verification.cs b/src/AxCopilot/Services/Agent/AgentLoopTransitions.Verification.cs index 4a79602..f624bfd 100644 --- a/src/AxCopilot/Services/Agent/AgentLoopTransitions.Verification.cs +++ b/src/AxCopilot/Services/Agent/AgentLoopTransitions.Verification.cs @@ -98,7 +98,9 @@ public partial class AgentLoopService var hasBlockingCodeEvidenceGap = !(requireHighImpactCodeVerification ? hasCodeVerificationEvidence : hasLightweightCompletionEvidence) || (requireHighImpactCodeVerification && !hasSuccessfulBuildAndTestEvidence); var shouldRequestStructuredFinalReport = - taskPolicy.IsReviewTask || requireHighImpactCodeVerification; + taskPolicy.IsReviewTask + || requireHighImpactCodeVerification + || taskPolicy.TaskType is "bugfix" or "feature" or "refactor"; if (executionPolicy.FinalReportGateMaxRetries > 0 && shouldRequestStructuredFinalReport && !hasBlockingCodeEvidenceGap diff --git a/src/AxCopilot/Services/Agent/ModelExecutionProfileCatalog.cs b/src/AxCopilot/Services/Agent/ModelExecutionProfileCatalog.cs index cdb5ea0..bc17cb1 100644 --- a/src/AxCopilot/Services/Agent/ModelExecutionProfileCatalog.cs +++ b/src/AxCopilot/Services/Agent/ModelExecutionProfileCatalog.cs @@ -61,7 +61,7 @@ public static class ModelExecutionProfileCatalog DocumentPlanRetryMax: 0, PreferAggressiveDocumentFallback: false, ReduceEarlyMemoryPressure: true, - EnablePostToolVerification: false, + EnablePostToolVerification: true, EnableCodeQualityGates: true, EnableDocumentVerificationGate: false, EnableParallelReadBatch: true, @@ -87,7 +87,7 @@ public static class ModelExecutionProfileCatalog DocumentPlanRetryMax: 2, PreferAggressiveDocumentFallback: false, ReduceEarlyMemoryPressure: false, - EnablePostToolVerification: false, + EnablePostToolVerification: true, EnableCodeQualityGates: true, EnableDocumentVerificationGate: true, EnableParallelReadBatch: true, diff --git a/src/AxCopilot/Views/ChatWindow.SystemPromptBuilder.cs b/src/AxCopilot/Views/ChatWindow.SystemPromptBuilder.cs index c2809b6..0de0d9c 100644 --- a/src/AxCopilot/Views/ChatWindow.SystemPromptBuilder.cs +++ b/src/AxCopilot/Views/ChatWindow.SystemPromptBuilder.cs @@ -254,7 +254,9 @@ public partial class ChatWindow sb.AppendLine("3. IMPLEMENT: Apply the smallest safe edit. Use file_edit for existing files and file_write for new files."); sb.AppendLine("4. VERIFY: Run build_run/test_loop when the change affects buildable or testable behavior, or when the user explicitly asks for verification."); sb.AppendLine(" - Use git_tool(diff) when it helps confirm the final change set or explain what changed."); - sb.AppendLine("5. REPORT: Summarize what changed and what was verified. Mention remaining risk only when something is actually unresolved, especially for review or high-impact changes."); + sb.AppendLine(" - After editing code, do not stop until you have enough evidence from file_read, diff, build_run, or test_loop."); + sb.AppendLine("5. REPORT: Summarize what changed, which files/callers were affected, and what verification evidence was collected."); + sb.AppendLine(" - For bugfix/feature/refactor tasks, keep the final report structured and concrete rather than minimal."); sb.AppendLine("\n## Development Environment"); sb.AppendLine("Use dev_env_detect to check installed IDEs, runtimes, and build tools before running commands.");