문서 repair guide와 목적형 HTML/XLSX 경로를 추가 고도화
- ArtifactRepairGuideService를 추가해 HTML/XLSX/DOCX 품질 리뷰 결과를 Repair guide 형태의 실행 가능한 보정 지침으로 변환 - HtmlSkill, ExcelSkill, DocumentAssemblerTool 출력에 repair guide를 연결해 품질 점수 뒤에 후속 보완 방향을 함께 제공 - Excel dashboard sheet에 dashboard_tiles와 variance_series를 추가해 운영 리뷰형 workbook archetype을 강화 - strategy-brief-html, operating-review-xlsx 번들 스킬을 추가해 목적형 문서 생성 진입점을 확장 - README.md와 docs/DEVELOPMENT.md에 2026-04-14 23:58 (KST) 기준 작업 이력과 검증 명령을 반영 검증 결과 - dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_doc_next6\\ -p:IntermediateOutputPath=obj\\verify_doc_next6\\ : 경고 0 / 오류 0 - dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter ArtifactQualityReviewServiceTests|ArtifactRepairGuideServiceTests|ExcelSkillDashboardSummaryTests|HtmlSkillConsultingSectionsTests|HtmlSkillPrintFrameTests|DocumentAssemblerStyleMapTests|DocumentAssemblerDocxFeaturesTests|DocumentAssemblerSemanticTests|PptxSkillGoldenDeckTests|DeckQualityReviewServiceTests -p:OutputPath=bin\\verify_doc_next6_tests\\ -p:IntermediateOutputPath=obj\\verify_doc_next6_tests\\ : 통과 17
This commit is contained in:
83
src/AxCopilot/Services/Agent/ArtifactRepairGuideService.cs
Normal file
83
src/AxCopilot/Services/Agent/ArtifactRepairGuideService.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
namespace AxCopilot.Services.Agent;
|
||||
|
||||
public static class ArtifactRepairGuideService
|
||||
{
|
||||
public static string BuildGuide(ArtifactQualityReport review)
|
||||
{
|
||||
if (review.Issues.Count == 0)
|
||||
return "Repair guide: none";
|
||||
|
||||
var actions = new List<string>();
|
||||
|
||||
foreach (var issue in review.Issues)
|
||||
{
|
||||
var action = review.ArtifactType switch
|
||||
{
|
||||
"html" => BuildHtmlAction(issue.Message),
|
||||
"xlsx" => BuildWorkbookAction(issue.Message),
|
||||
"docx" => BuildDocumentAction(issue.Message),
|
||||
_ => null
|
||||
};
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(action) && !actions.Contains(action, StringComparer.OrdinalIgnoreCase))
|
||||
actions.Add(action);
|
||||
|
||||
if (actions.Count >= 3)
|
||||
break;
|
||||
}
|
||||
|
||||
if (actions.Count == 0)
|
||||
return "Repair guide: review low-signal issues and tighten structure before export";
|
||||
|
||||
return "Repair guide: " + string.Join(" | ", actions);
|
||||
}
|
||||
|
||||
private static string? BuildHtmlAction(string message)
|
||||
{
|
||||
if (message.Contains("decision summary or evidence cards", StringComparison.OrdinalIgnoreCase))
|
||||
return "Add a decision summary and evidence cards near the recommendation section";
|
||||
if (message.Contains("cover page", StringComparison.OrdinalIgnoreCase))
|
||||
return "Add a cover page for print-ready or board-facing reports";
|
||||
if (message.Contains("comparison or roadmap", StringComparison.OrdinalIgnoreCase))
|
||||
return "Add comparison or roadmap blocks to make options and sequencing explicit";
|
||||
if (message.Contains("supporting paragraphs", StringComparison.OrdinalIgnoreCase))
|
||||
return "Expand the core sections with supporting paragraphs and business evidence";
|
||||
if (message.Contains("Structured visual blocks are limited", StringComparison.OrdinalIgnoreCase))
|
||||
return "Use comparison, roadmap, matrix, KPI, or evidence blocks instead of plain text only";
|
||||
if (message.Contains("Executive summary", StringComparison.OrdinalIgnoreCase))
|
||||
return "Add an Executive Summary section near the top of the report";
|
||||
return null;
|
||||
}
|
||||
|
||||
private static string? BuildWorkbookAction(string message)
|
||||
{
|
||||
if (message.Contains("dashboard sheet", StringComparison.OrdinalIgnoreCase))
|
||||
return "Add a dashboard sheet with KPI tiles, trends, and links to detail sheets";
|
||||
if (message.Contains("Summary sheet could better surface", StringComparison.OrdinalIgnoreCase))
|
||||
return "Promote KPIs, decisions, and highlights into the summary or dashboard sheet";
|
||||
if (message.Contains("data validation", StringComparison.OrdinalIgnoreCase))
|
||||
return "Add data validation rules for editable status, owner, or category columns";
|
||||
if (message.Contains("Conditional formatting", StringComparison.OrdinalIgnoreCase))
|
||||
return "Add conditional formatting to flag priority items, variances, or risks";
|
||||
if (message.Contains("more formulas or rollups", StringComparison.OrdinalIgnoreCase))
|
||||
return "Add rollup formulas or summary calculations to turn detail data into insights";
|
||||
if (message.Contains("Summary sheet does not link", StringComparison.OrdinalIgnoreCase))
|
||||
return "Link the summary/dashboard sheet to each detail sheet for faster navigation";
|
||||
return null;
|
||||
}
|
||||
|
||||
private static string? BuildDocumentAction(string message)
|
||||
{
|
||||
if (message.Contains("Executive Summary", StringComparison.OrdinalIgnoreCase))
|
||||
return "Add an Executive Summary section at the start of the document";
|
||||
if (message.Contains("Recommendation", StringComparison.OrdinalIgnoreCase))
|
||||
return "Add a recommendation or next-step section with a clear decision ask";
|
||||
if (message.Contains("Appendix", StringComparison.OrdinalIgnoreCase))
|
||||
return "Add an appendix or reference section for longer documents";
|
||||
if (message.Contains("mostly plain paragraphs", StringComparison.OrdinalIgnoreCase))
|
||||
return "Introduce tables, lists, or callout blocks to break up dense prose";
|
||||
if (message.Contains("too short", StringComparison.OrdinalIgnoreCase))
|
||||
return "Deepen the supporting analysis before export";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user