모델 프로파일 기반 Cowork/Code 루프와 진행 UX 고도화 반영

- 등록 모델 실행 프로파일을 검증 게이트, 문서 fallback, post-tool verification까지 확장 적용

- Cowork/Code 진행 카드에 계획/도구/검증/압축/폴백/재시도 단계 메타를 추가해 대기 상태 가시성 강화

- OpenAI/vLLM tool 요청에 병렬 도구 호출 힌트를 추가하고 회귀 프롬프트 문서를 프로파일 기준으로 전면 정리

- 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\ (경고 0 / 오류 0)
This commit is contained in:
2026-04-08 13:41:57 +09:00
parent b391dfdfb3
commit a2c952879d
552 changed files with 8094 additions and 13595 deletions

View File

@@ -0,0 +1,173 @@
namespace AxCopilot.Services.Agent;
public static class ModelExecutionProfileCatalog
{
public sealed record ExecutionPolicy(
string Key,
string Label,
bool ForceInitialToolCall,
bool ForceToolCallAfterPlan,
double? ToolTemperatureCap,
int NoToolResponseThreshold,
int NoToolRecoveryMaxRetries,
int PlanExecutionRetryMax,
int DocumentPlanRetryMax,
bool PreferAggressiveDocumentFallback,
bool ReduceEarlyMemoryPressure,
bool EnablePostToolVerification,
bool EnableCodeQualityGates,
bool EnableDocumentVerificationGate,
bool EnableParallelReadBatch,
int MaxParallelReadBatch,
int CodeVerificationGateMaxRetries,
int HighImpactBuildTestGateMaxRetries,
int FinalReportGateMaxRetries,
int CodeDiffGateMaxRetries,
int RecentExecutionGateMaxRetries,
int ExecutionSuccessGateMaxRetries,
int DocumentVerificationGateMaxRetries,
int TerminalEvidenceGateMaxRetries);
public static string Normalize(string? key)
{
var normalized = (key ?? "").Trim().ToLowerInvariant();
return normalized switch
{
"tool_call_strict" => "tool_call_strict",
"reasoning_first" => "reasoning_first",
"fast_readonly" => "fast_readonly",
"document_heavy" => "document_heavy",
_ => "balanced",
};
}
public static ExecutionPolicy Get(string? key)
=> Normalize(key) switch
{
"tool_call_strict" => new ExecutionPolicy(
"tool_call_strict",
"도구 호출 우선",
ForceInitialToolCall: true,
ForceToolCallAfterPlan: true,
ToolTemperatureCap: 0.2,
NoToolResponseThreshold: 1,
NoToolRecoveryMaxRetries: 1,
PlanExecutionRetryMax: 1,
DocumentPlanRetryMax: 1,
PreferAggressiveDocumentFallback: true,
ReduceEarlyMemoryPressure: true,
EnablePostToolVerification: false,
EnableCodeQualityGates: true,
EnableDocumentVerificationGate: false,
EnableParallelReadBatch: true,
MaxParallelReadBatch: 8,
CodeVerificationGateMaxRetries: 1,
HighImpactBuildTestGateMaxRetries: 1,
FinalReportGateMaxRetries: 1,
CodeDiffGateMaxRetries: 1,
RecentExecutionGateMaxRetries: 0,
ExecutionSuccessGateMaxRetries: 0,
DocumentVerificationGateMaxRetries: 0,
TerminalEvidenceGateMaxRetries: 1),
"reasoning_first" => new ExecutionPolicy(
"reasoning_first",
"추론 우선",
ForceInitialToolCall: false,
ForceToolCallAfterPlan: false,
ToolTemperatureCap: 0.45,
NoToolResponseThreshold: 2,
NoToolRecoveryMaxRetries: 2,
PlanExecutionRetryMax: 2,
DocumentPlanRetryMax: 2,
PreferAggressiveDocumentFallback: false,
ReduceEarlyMemoryPressure: false,
EnablePostToolVerification: true,
EnableCodeQualityGates: true,
EnableDocumentVerificationGate: true,
EnableParallelReadBatch: true,
MaxParallelReadBatch: 6,
CodeVerificationGateMaxRetries: 2,
HighImpactBuildTestGateMaxRetries: 1,
FinalReportGateMaxRetries: 1,
CodeDiffGateMaxRetries: 1,
RecentExecutionGateMaxRetries: 1,
ExecutionSuccessGateMaxRetries: 1,
DocumentVerificationGateMaxRetries: 1,
TerminalEvidenceGateMaxRetries: 1),
"fast_readonly" => new ExecutionPolicy(
"fast_readonly",
"읽기 속도 우선",
ForceInitialToolCall: true,
ForceToolCallAfterPlan: false,
ToolTemperatureCap: 0.25,
NoToolResponseThreshold: 1,
NoToolRecoveryMaxRetries: 1,
PlanExecutionRetryMax: 1,
DocumentPlanRetryMax: 1,
PreferAggressiveDocumentFallback: false,
ReduceEarlyMemoryPressure: true,
EnablePostToolVerification: false,
EnableCodeQualityGates: false,
EnableDocumentVerificationGate: false,
EnableParallelReadBatch: true,
MaxParallelReadBatch: 10,
CodeVerificationGateMaxRetries: 0,
HighImpactBuildTestGateMaxRetries: 0,
FinalReportGateMaxRetries: 0,
CodeDiffGateMaxRetries: 0,
RecentExecutionGateMaxRetries: 0,
ExecutionSuccessGateMaxRetries: 0,
DocumentVerificationGateMaxRetries: 0,
TerminalEvidenceGateMaxRetries: 0),
"document_heavy" => new ExecutionPolicy(
"document_heavy",
"문서 생성 우선",
ForceInitialToolCall: true,
ForceToolCallAfterPlan: true,
ToolTemperatureCap: 0.35,
NoToolResponseThreshold: 1,
NoToolRecoveryMaxRetries: 1,
PlanExecutionRetryMax: 1,
DocumentPlanRetryMax: 0,
PreferAggressiveDocumentFallback: true,
ReduceEarlyMemoryPressure: true,
EnablePostToolVerification: false,
EnableCodeQualityGates: false,
EnableDocumentVerificationGate: false,
EnableParallelReadBatch: true,
MaxParallelReadBatch: 6,
CodeVerificationGateMaxRetries: 0,
HighImpactBuildTestGateMaxRetries: 0,
FinalReportGateMaxRetries: 0,
CodeDiffGateMaxRetries: 0,
RecentExecutionGateMaxRetries: 0,
ExecutionSuccessGateMaxRetries: 0,
DocumentVerificationGateMaxRetries: 0,
TerminalEvidenceGateMaxRetries: 1),
_ => new ExecutionPolicy(
"balanced",
"균형",
ForceInitialToolCall: true,
ForceToolCallAfterPlan: true,
ToolTemperatureCap: 0.35,
NoToolResponseThreshold: 2,
NoToolRecoveryMaxRetries: 2,
PlanExecutionRetryMax: 2,
DocumentPlanRetryMax: 2,
PreferAggressiveDocumentFallback: false,
ReduceEarlyMemoryPressure: false,
EnablePostToolVerification: true,
EnableCodeQualityGates: true,
EnableDocumentVerificationGate: true,
EnableParallelReadBatch: true,
MaxParallelReadBatch: 6,
CodeVerificationGateMaxRetries: 2,
HighImpactBuildTestGateMaxRetries: 1,
FinalReportGateMaxRetries: 1,
CodeDiffGateMaxRetries: 1,
RecentExecutionGateMaxRetries: 1,
ExecutionSuccessGateMaxRetries: 1,
DocumentVerificationGateMaxRetries: 1,
TerminalEvidenceGateMaxRetries: 1),
};
}