Compare commits

..
2 Commits
Author SHA1 Message Date
lacvet 7e774a9387 코드 탭은 컨텍스트만 claude-code식으로 두고 품질 게이트를 AX 기준으로 복원한다
- 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
2026-04-12 22:49:33 +09:00
lacvet ecff76d9ac 컨텍스트는 claude-code식으로 유지하고 품질 강제는 AX 기준으로 복원한다
- Cowork 문서 생성 가이드에 richer section pattern과 생성 후 점검 요약을 다시 넣어 단조로운 문서와 빈약한 최종 요약을 보강

- docs 태스크 최종 보고 프롬프트를 별도 분기해 출력 파일 경로, 핵심 섹션, 구성 규모, 생성 후 확인 사항을 다시 강하게 요구

- balanced/reasoning_first/document_heavy 프로필에서 문서 검증 게이트와 최종 보고 게이트를 복원해 품질 강제를 AX 기준으로 유지

- 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\ 경고 0 / 오류 0
2026-04-12 22:47:21 +09:00
8 changed files with 74 additions and 15 deletions
+8
View File
@@ -7,6 +7,14 @@ Windows 전용 시맨틱 런처 & 워크스페이스 매니저
개발 참고: Claw Code 동등성 작업 추적 문서 개발 참고: Claw Code 동등성 작업 추적 문서
`docs/claw-code-parity-plan.md` `docs/claw-code-parity-plan.md`
- 업데이트: 2026-04-12 23:58 (KST)
- Cowork 문서 생성이 단조로워지고 마지막 요약이 약해진 부분을 다시 보강했습니다. 문서 태스크 가이드에 반복적인 동일 패턴 섹션 작성을 피하고, 목적에 따라 요약/핵심 발견/비교표/타임라인/권고안/부록 같은 richer section pattern을 쓰도록 다시 유도했습니다.
- 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) - 업데이트: 2026-04-12 23:45 (KST)
- `claude-code` 기준으로 남아 있던 provider/compact/UI 후속 차이를 더 줄였습니다. OpenAI 호환 도구 호출은 이제 모델 계열별 호환 프로파일을 적용해 Qwen·LLaMA·DeepSeek 같은 취약한 vLLM 계열에서 최근 structured tool history 범위를 더 좁히고, 병렬 tool call과 reasoning_effort도 더 보수적으로 전송합니다. - `claude-code` 기준으로 남아 있던 provider/compact/UI 후속 차이를 더 줄였습니다. OpenAI 호환 도구 호출은 이제 모델 계열별 호환 프로파일을 적용해 Qwen·LLaMA·DeepSeek 같은 취약한 vLLM 계열에서 최근 structured tool history 범위를 더 좁히고, 병렬 tool call과 reasoning_effort도 더 보수적으로 전송합니다.
- tool forcing fallback도 보강했습니다. IBM 배포형뿐 아니라 일반 OpenAI 호환 경로에서도 `tool_choice`가 400으로 거부되면, plain text 지시를 덧붙인 대체 요청으로 한 번 더 재시도해 `채팅은 되지만 Cowork/Code만 막히는` 조합을 줄였습니다. - tool forcing fallback도 보강했습니다. IBM 배포형뿐 아니라 일반 OpenAI 호환 경로에서도 `tool_choice`가 400으로 거부되면, plain text 지시를 덧붙인 대체 요청으로 한 번 더 재시도해 `채팅은 되지만 Cowork/Code만 막히는` 조합을 줄였습니다.
+11
View File
@@ -734,6 +734,17 @@ owKindCounts를 함께 남겨 %APPDATA%\\AxCopilot\\perf 기준으로 transcript
- compact 뒤 첫 LLM 호출이 복원된 맥락의 종류를 더 안정적으로 전달받습니다. - compact 뒤 첫 LLM 호출이 복원된 맥락의 종류를 더 안정적으로 전달받습니다.
- transcript와 usage UI가 `claw-code`처럼 더 얇고 조용한 운영 메타 표현을 유지합니다. - transcript와 usage UI가 `claw-code`처럼 더 얇고 조용한 운영 메타 표현을 유지합니다.
## Cowork 문서 생성 다양성/최종 요약 보강
- 업데이트: 2026-04-12 23:58 (KST)
- `TaskTypePolicy`의 docs 가이드를 다시 강화했습니다. 새 문서 작성 시 flat하고 반복적인 섹션 구성을 피하고, 목적에 따라 요약/발견/비교표/타임라인/권고안/부록 같은 richer section pattern을 적극적으로 쓰도록 유도합니다.
- `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 후속 정렬 ## claude-code식 provider/compact/UI 후속 정렬
- 업데이트: 2026-04-12 23:45 (KST) - 업데이트: 2026-04-12 23:45 (KST)
@@ -3532,6 +3532,29 @@ public partial class AgentLoopService
private static string BuildFinalReportQualityPrompt(TaskTypePolicy taskPolicy, bool highImpact) private static string BuildFinalReportQualityPrompt(TaskTypePolicy taskPolicy, bool highImpact)
{ {
var expressionLevel = GetAgentUiExpressionLevel(); var expressionLevel = GetAgentUiExpressionLevel();
var isDocumentTask = string.Equals(taskPolicy.TaskType, "docs", StringComparison.OrdinalIgnoreCase);
if (isDocumentTask && expressionLevel == "simple")
{
return "[System:FinalReportQuality] 최종 답변을 짧게 정리하세요.\n" +
"1. 어떤 문서 또는 산출물을 만들었는지\n" +
"2. 실제 출력 파일 경로\n" +
"3. 핵심 섹션 또는 내용 2~4개\n" +
"4. 확인한 사항 한 줄\n" +
"불필요한 메타 설명은 쓰지 마세요.";
}
if (isDocumentTask)
{
return "[System:FinalReportQuality] 문서 작업 최종 답변을 한눈에 이해되게 정리하세요.\n" +
"1. 작업 유형 또는 문서 종류\n" +
"2. 실제 출력 파일 경로\n" +
"3. 핵심 섹션/장/표/분석 포인트를 3~6개로 요약\n" +
"4. 문서 분량 또는 대략적인 구성 규모\n" +
"5. 생성 후 무엇을 검토하거나 확인했는지\n" +
"6. 실제 미해결 이슈가 있을 때만 마지막에 짧게 적기\n" +
"사용자가 파일을 열지 않아도 내용이 떠오를 만큼 구체적으로 쓰되, 장황한 메타 설명은 피하세요.";
}
if (expressionLevel == "simple" && !taskPolicy.IsReviewTask && !highImpact) if (expressionLevel == "simple" && !taskPolicy.IsReviewTask && !highImpact)
{ {
@@ -153,8 +153,15 @@ public partial class AgentLoopService
var highImpactCodeChange = IsHighImpactCodeModification(ActiveTab ?? "", call.ToolName, result); var highImpactCodeChange = IsHighImpactCodeModification(ActiveTab ?? "", call.ToolName, result);
var hasDiffEvidence = HasDiffEvidenceAfterLastModification(messages); var hasDiffEvidence = HasDiffEvidenceAfterLastModification(messages);
var hasRecentBuildOrTestEvidence = HasBuildOrTestEvidenceAfterLastModification(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; return false;
await RunPostToolVerificationAsync(messages, call.ToolName, result, context, ct); await RunPostToolVerificationAsync(messages, call.ToolName, result, context, ct);
@@ -98,7 +98,9 @@ public partial class AgentLoopService
var hasBlockingCodeEvidenceGap = !(requireHighImpactCodeVerification ? hasCodeVerificationEvidence : hasLightweightCompletionEvidence) var hasBlockingCodeEvidenceGap = !(requireHighImpactCodeVerification ? hasCodeVerificationEvidence : hasLightweightCompletionEvidence)
|| (requireHighImpactCodeVerification && !hasSuccessfulBuildAndTestEvidence); || (requireHighImpactCodeVerification && !hasSuccessfulBuildAndTestEvidence);
var shouldRequestStructuredFinalReport = var shouldRequestStructuredFinalReport =
taskPolicy.IsReviewTask || requireHighImpactCodeVerification; taskPolicy.IsReviewTask
|| requireHighImpactCodeVerification
|| taskPolicy.TaskType is "bugfix" or "feature" or "refactor";
if (executionPolicy.FinalReportGateMaxRetries > 0 if (executionPolicy.FinalReportGateMaxRetries > 0
&& shouldRequestStructuredFinalReport && shouldRequestStructuredFinalReport
&& !hasBlockingCodeEvidenceGap && !hasBlockingCodeEvidenceGap
@@ -61,7 +61,7 @@ public static class ModelExecutionProfileCatalog
DocumentPlanRetryMax: 0, DocumentPlanRetryMax: 0,
PreferAggressiveDocumentFallback: false, PreferAggressiveDocumentFallback: false,
ReduceEarlyMemoryPressure: true, ReduceEarlyMemoryPressure: true,
EnablePostToolVerification: false, EnablePostToolVerification: true,
EnableCodeQualityGates: true, EnableCodeQualityGates: true,
EnableDocumentVerificationGate: false, EnableDocumentVerificationGate: false,
EnableParallelReadBatch: true, EnableParallelReadBatch: true,
@@ -87,18 +87,18 @@ public static class ModelExecutionProfileCatalog
DocumentPlanRetryMax: 2, DocumentPlanRetryMax: 2,
PreferAggressiveDocumentFallback: false, PreferAggressiveDocumentFallback: false,
ReduceEarlyMemoryPressure: false, ReduceEarlyMemoryPressure: false,
EnablePostToolVerification: false, EnablePostToolVerification: true,
EnableCodeQualityGates: true, EnableCodeQualityGates: true,
EnableDocumentVerificationGate: false, EnableDocumentVerificationGate: true,
EnableParallelReadBatch: true, EnableParallelReadBatch: true,
MaxParallelReadBatch: 6, MaxParallelReadBatch: 6,
CodeVerificationGateMaxRetries: 1, CodeVerificationGateMaxRetries: 1,
HighImpactBuildTestGateMaxRetries: 1, HighImpactBuildTestGateMaxRetries: 1,
FinalReportGateMaxRetries: 0, FinalReportGateMaxRetries: 1,
CodeDiffGateMaxRetries: 0, CodeDiffGateMaxRetries: 0,
RecentExecutionGateMaxRetries: 0, RecentExecutionGateMaxRetries: 0,
ExecutionSuccessGateMaxRetries: 0, ExecutionSuccessGateMaxRetries: 0,
DocumentVerificationGateMaxRetries: 0, DocumentVerificationGateMaxRetries: 1,
TerminalEvidenceGateMaxRetries: 1), TerminalEvidenceGateMaxRetries: 1),
"fast_readonly" => new ExecutionPolicy( "fast_readonly" => new ExecutionPolicy(
"fast_readonly", "fast_readonly",
@@ -139,16 +139,16 @@ public static class ModelExecutionProfileCatalog
ReduceEarlyMemoryPressure: true, ReduceEarlyMemoryPressure: true,
EnablePostToolVerification: false, EnablePostToolVerification: false,
EnableCodeQualityGates: false, EnableCodeQualityGates: false,
EnableDocumentVerificationGate: false, EnableDocumentVerificationGate: true,
EnableParallelReadBatch: true, EnableParallelReadBatch: true,
MaxParallelReadBatch: 6, MaxParallelReadBatch: 6,
CodeVerificationGateMaxRetries: 0, CodeVerificationGateMaxRetries: 0,
HighImpactBuildTestGateMaxRetries: 0, HighImpactBuildTestGateMaxRetries: 0,
FinalReportGateMaxRetries: 0, FinalReportGateMaxRetries: 1,
CodeDiffGateMaxRetries: 0, CodeDiffGateMaxRetries: 0,
RecentExecutionGateMaxRetries: 0, RecentExecutionGateMaxRetries: 0,
ExecutionSuccessGateMaxRetries: 0, ExecutionSuccessGateMaxRetries: 0,
DocumentVerificationGateMaxRetries: 0, DocumentVerificationGateMaxRetries: 1,
TerminalEvidenceGateMaxRetries: 1), TerminalEvidenceGateMaxRetries: 1),
_ => new ExecutionPolicy( _ => new ExecutionPolicy(
"balanced", "balanced",
@@ -164,16 +164,16 @@ public static class ModelExecutionProfileCatalog
ReduceEarlyMemoryPressure: false, ReduceEarlyMemoryPressure: false,
EnablePostToolVerification: false, EnablePostToolVerification: false,
EnableCodeQualityGates: true, EnableCodeQualityGates: true,
EnableDocumentVerificationGate: false, EnableDocumentVerificationGate: true,
EnableParallelReadBatch: true, EnableParallelReadBatch: true,
MaxParallelReadBatch: 6, MaxParallelReadBatch: 6,
CodeVerificationGateMaxRetries: 1, CodeVerificationGateMaxRetries: 1,
HighImpactBuildTestGateMaxRetries: 1, HighImpactBuildTestGateMaxRetries: 1,
FinalReportGateMaxRetries: 0, FinalReportGateMaxRetries: 1,
CodeDiffGateMaxRetries: 0, CodeDiffGateMaxRetries: 0,
RecentExecutionGateMaxRetries: 0, RecentExecutionGateMaxRetries: 0,
ExecutionSuccessGateMaxRetries: 0, ExecutionSuccessGateMaxRetries: 0,
DocumentVerificationGateMaxRetries: 0, DocumentVerificationGateMaxRetries: 1,
TerminalEvidenceGateMaxRetries: 1), TerminalEvidenceGateMaxRetries: 1),
}; };
} }
@@ -71,13 +71,15 @@ internal sealed class TaskTypePolicy
"[System:TaskType] This is a document/content task. " + "[System:TaskType] This is a document/content task. " +
"If the user asks you to create or write a new document, skip file exploration entirely and go directly to the creation tool (docx_create, html_create, excel_create, etc.). " + "If the user asks you to create or write a new document, skip file exploration entirely and go directly to the creation tool (docx_create, html_create, excel_create, etc.). " +
"Use document_plan only when it materially helps structure a multi-section document. " + "Use document_plan only when it materially helps structure a multi-section document. " +
"Avoid flat, repetitive section writing. Match the structure to the user's purpose and vary the shape with summaries, findings, tables, comparisons, timelines, action items, or appendices when useful. " +
"Prefer concrete and business-ready content over generic filler paragraphs. " +
"Prefer producing a real file on disk when the request is clearly for a deliverable, but do not force file creation for analysis-only or advisory requests. " + "Prefer producing a real file on disk when the request is clearly for a deliverable, but do not force file creation for analysis-only or advisory requests. " +
"If the user asks you to read or analyze existing documents, use: glob/grep -> document_read/file_read -> analysis. " + "If the user asks you to read or analyze existing documents, use: glob/grep -> document_read/file_read -> analysis. " +
"Use folder_map only when the user explicitly asks for folder contents or directory structure.", "Use folder_map only when the user explicitly asks for folder contents or directory structure.",
FailurePatternFocus = "Check source evidence and document completeness first.", FailurePatternFocus = "Check source evidence and document completeness first.",
FollowUpTaskLine = "", FollowUpTaskLine = "",
FailureInvestigationTaskLine = "", FailureInvestigationTaskLine = "",
FinalReportTaskLine = "", FinalReportTaskLine = "For document tasks, include output path, document type, key sections with one-line descriptions, and what was checked after generation.\n",
}, },
_ => new TaskTypePolicy _ => new TaskTypePolicy
{ {
@@ -65,6 +65,8 @@ public partial class ChatWindow
sb.AppendLine("For ordinary Cowork requests where no plan is requested, proceed directly with the work and focus on producing the requested result."); sb.AppendLine("For ordinary Cowork requests where no plan is requested, proceed directly with the work and focus on producing the requested result.");
sb.AppendLine("If the user asks for a brand-new report, proposal, analysis, manual, or other document and does not explicitly ask to reference workspace files, do NOT start with glob, grep, document_read, or folder_map."); sb.AppendLine("If the user asks for a brand-new report, proposal, analysis, manual, or other document and does not explicitly ask to reference workspace files, do NOT start with glob, grep, document_read, or folder_map.");
sb.AppendLine("In that case, go straight to the creation tool. Use document_plan only when multi-section structure work clearly improves the result or when the user explicitly requests a plan."); sb.AppendLine("In that case, go straight to the creation tool. Use document_plan only when multi-section structure work clearly improves the result or when the user explicitly requests a plan.");
sb.AppendLine("When writing a new document, avoid repetitive same-shape sections. Tailor the structure to the purpose and use summaries, findings, comparison tables, timelines, recommendations, appendices, or action items when they improve clarity.");
sb.AppendLine("Prefer concrete and useful content over filler. If a section benefits from bullets, tables, or structured comparison, use them instead of flat generic paragraphs.");
sb.AppendLine("After creating files, summarize what was created and include the actual output path."); sb.AppendLine("After creating files, summarize what was created and include the actual output path.");
sb.AppendLine("IMPORTANT: In your FINAL response after ALL work is done, provide a structured completion summary in this format:"); sb.AppendLine("IMPORTANT: In your FINAL response after ALL work is done, provide a structured completion summary in this format:");
sb.AppendLine(" - 작업 유형: (e.g., report/analysis/proposal)"); sb.AppendLine(" - 작업 유형: (e.g., report/analysis/proposal)");
@@ -72,6 +74,7 @@ public partial class ChatWindow
sb.AppendLine(" - 주요 섹션: list key sections/chapters with brief description"); sb.AppendLine(" - 주요 섹션: list key sections/chapters with brief description");
sb.AppendLine(" - 분량: page count, word count estimate"); sb.AppendLine(" - 분량: page count, word count estimate");
sb.AppendLine(" - 사용 도구: tools used during creation"); sb.AppendLine(" - 사용 도구: tools used during creation");
sb.AppendLine(" - verification: what you checked after generation (section completeness, placeholders, formatting, dates, etc.)");
sb.AppendLine("The user wants to see what the document contains at a glance without opening the file."); sb.AppendLine("The user wants to see what the document contains at a glance without opening the file.");
sb.AppendLine("Do not stop after a single step. Continue autonomously until the request is completed or a concrete blocker (permission denial, missing dependency, hard error) is encountered."); sb.AppendLine("Do not stop after a single step. Continue autonomously until the request is completed or a concrete blocker (permission denial, missing dependency, hard error) is encountered.");
sb.AppendLine("When adapting external references, rewrite names/structure/comments to AX Copilot style. Avoid clone-like outputs."); sb.AppendLine("When adapting external references, rewrite names/structure/comments to AX Copilot style. Avoid clone-like outputs.");
@@ -81,6 +84,7 @@ public partial class ChatWindow
sb.AppendLine(" 2. Use document_plan only when multi-section structure work clearly improves the result or when the user explicitly asks for a plan. When the user requests a plan, present it for approval before proceeding."); sb.AppendLine(" 2. Use document_plan only when multi-section structure work clearly improves the result or when the user explicitly asks for a plan. When the user requests a plan, present it for approval before proceeding.");
sb.AppendLine(" 3. Then immediately create the real output file with html_create, docx_create, markdown_create, or file_write."); sb.AppendLine(" 3. Then immediately create the real output file with html_create, docx_create, markdown_create, or file_write.");
sb.AppendLine(" 4. Fill every section with real content. Do not stop at an outline or plan only."); sb.AppendLine(" 4. Fill every section with real content. Do not stop at an outline or plan only.");
sb.AppendLine(" 4-1. Use richer section patterns when they help: summary box, key findings bullets, comparison table, timeline, checklist, action items, appendix.");
sb.AppendLine(" 5. The task is complete only after the actual document file has been created or updated."); sb.AppendLine(" 5. The task is complete only after the actual document file has been created or updated.");
// 문서 품질 검증 루프 // 문서 품질 검증 루프
@@ -250,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("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("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(" - 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("\n## Development Environment");
sb.AppendLine("Use dev_env_detect to check installed IDEs, runtimes, and build tools before running commands."); sb.AppendLine("Use dev_env_detect to check installed IDEs, runtimes, and build tools before running commands.");