코워크 PPT 생성 경로를 공통 품질 루프로 고도화하고 자동 보정 단계를 추가
- Cowork 프롬프트와 direct-creation 탐색 정책에서 PPT 요청은 document_plan을 무조건 선행하지 않고 pptx_create를 우선하도록 조정했습니다. - DeckPlanningService에 RefineForQuality 루프를 추가해 executive summary, comparison, roadmap, chart, KPI dashboard 슬라이드의 headline, takeaway, verdict, timeline/owner, KPI narrative를 자동 보강하도록 했습니다. - PptxSkill이 초기 deck review가 약할 때 한 번 더 refined deck을 만들고 실제로 점수와 경고가 개선된 경우에만 최종 렌더링에 반영하도록 수정했습니다. - DeckPlanningServiceTests와 PptxSkillAutoRepairTests를 확장해 generic PPT 품질 보정 회귀를 고정했습니다. - 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_ppt_generic_quality\\ -p:IntermediateOutputPath=obj\\verify_ppt_generic_quality\\ (경고 0 / 오류 0) - 검증: deck planning, pptx auto repair, golden deck, deck quality review 테스트 통과 14
This commit is contained in:
@@ -75,5 +75,91 @@ public class PptxSkillAutoRepairTests
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ExecuteAsync_ShouldRefineWeakDeckBeforeExport()
|
||||
{
|
||||
var workDir = Path.Combine(Path.GetTempPath(), "ax-pptx-refine-" + Guid.NewGuid().ToString("N"));
|
||||
Directory.CreateDirectory(workDir);
|
||||
|
||||
try
|
||||
{
|
||||
var context = new AgentContext
|
||||
{
|
||||
WorkFolder = workDir,
|
||||
Permission = "Auto",
|
||||
OperationMode = "external",
|
||||
};
|
||||
|
||||
var tool = new PptxSkill();
|
||||
var args = JsonDocument.Parse(
|
||||
"""
|
||||
{
|
||||
"path": "refined-deck.pptx",
|
||||
"title": "Quarterly Steering Deck",
|
||||
"objective": "approve the next delivery wave",
|
||||
"slides": [
|
||||
{
|
||||
"layout": "executive_summary",
|
||||
"title": "Executive Summary",
|
||||
"body": [
|
||||
"Approve the next delivery wave",
|
||||
"The delivery plan should move forward"
|
||||
]
|
||||
},
|
||||
{
|
||||
"layout": "comparison",
|
||||
"title": "Options",
|
||||
"options": [
|
||||
{ "name": "Conservative" },
|
||||
{ "name": "Balanced" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"layout": "roadmap",
|
||||
"title": "Roadmap",
|
||||
"phases": [
|
||||
{ "title": "Kickoff", "owner": "담당 미정" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"layout": "chart",
|
||||
"title": "Trend",
|
||||
"chart_labels": ["Jan", "Feb", "Mar"],
|
||||
"chart_values": [10, 13, 16]
|
||||
},
|
||||
{
|
||||
"layout": "kpi_dashboard",
|
||||
"title": "KPI Snapshot",
|
||||
"kpis": [
|
||||
{ "label": "Revenue", "value": "+9%" },
|
||||
{ "label": "Cycle Time", "value": "-6%" },
|
||||
{ "label": "Stability", "value": "96%" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
""").RootElement;
|
||||
|
||||
var result = await tool.ExecuteAsync(args, context, CancellationToken.None);
|
||||
|
||||
result.Success.Should().BeTrue();
|
||||
result.Output.Should().Contain("PPT quality");
|
||||
result.Output.Should().Contain("Needs work: none");
|
||||
result.Output.Should().Contain("Auto-repair:");
|
||||
File.Exists(Path.Combine(workDir, "refined-deck.pptx")).Should().BeTrue();
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Directory.Exists(workDir))
|
||||
Directory.Delete(workDir, true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user