?? ?? - AgentLoopService? ?? ?? ? ?? ??? ?? ??? ??? ?? ??? ? ??? ??? ??? ?? - XLSX dashboard workbook? PPT deck? ?? ?? ??? ??? ?? dashboard, storyline ?? ????? ? ? ????? ?? ?? ???? - AgentQueuedCommandProjector? ??? queued command ??? queued_input_interrupt, queue_notification, queue_resume, queued_prompt ?? ???? thinking/user ???? ???? ?? helper? ?? - AgentLoopService? drain? ? ??? ?? switch? ?? ?? projector ??? ???? ??? ??? - ArtifactQualityReviewService? dashboard sheet? KPI, trend, decision ?? ?? ??? ???? workbook review ??? ?? - ArtifactRepairGuideService? ? dashboard ??? core story ?? ?? ???? ????? ?? - DeckQualityReviewService? storyline? Options, Roadmap, Appendix? ????? ?? ????? ?? ? ?? ?? ??? ????? ?? - DeckRepairGuideService? storyline ?? ??? deck storyline ?? ???? ????? ?? - AgentQueuedCommandProjectorTests, DeckQualityReviewServiceTests, ArtifactQualityReviewServiceTests, ArtifactRepairGuideServiceTests, DeckRepairGuideServiceTests? ??? ??? ?? - README.md? docs/DEVELOPMENT.md? 2026-04-15 09:24 (KST) ?? ??? ?? ??? ?? ?? ?? - dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify_loop_doc_finish2\\ -p:IntermediateOutputPath=obj\\verify_loop_doc_finish2\\ : ?? 0 / ?? 0 - dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter "AgentQueuedCommandProjectorTests|AgentCommandQueueTests|ArtifactQualityReviewServiceTests|ArtifactRepairGuideServiceTests|DeckQualityReviewServiceTests|DeckRepairGuideServiceTests|PptxSkillGoldenDeckTests|ExcelSkillDashboardSummaryTests" -p:OutputPath=bin\\verify_loop_doc_finish2_tests\\ -p:IntermediateOutputPath=obj\\verify_loop_doc_finish2_tests\\ : ?? 25
102 lines
6.0 KiB
C#
102 lines
6.0 KiB
C#
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("table of contents", StringComparison.OrdinalIgnoreCase))
|
|
return "Add a table of contents for longer print-ready 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 lacks KPI, trend, or decision content", StringComparison.OrdinalIgnoreCase))
|
|
return "Add KPI, trend, or decision blocks so the dashboard communicates the core story at a glance";
|
|
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("Dashboard sheet could better call out highlights or actions", StringComparison.OrdinalIgnoreCase))
|
|
return "Add highlight and action callout blocks to the dashboard sheet";
|
|
if (message.Contains("Dashboard sheet should link", StringComparison.OrdinalIgnoreCase))
|
|
return "Add hyperlinks from the dashboard to each supporting detail sheet";
|
|
if (message.Contains("trend or variance formulas", StringComparison.OrdinalIgnoreCase))
|
|
return "Add trend, variance, or rollup formulas so the dashboard summarizes detail sheets";
|
|
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("cover page", StringComparison.OrdinalIgnoreCase))
|
|
return "Add a cover page with subtitle, owner, and review context for the document";
|
|
if (message.Contains("table of contents", StringComparison.OrdinalIgnoreCase))
|
|
return "Add a table of contents so longer readers can navigate the document quickly";
|
|
if (message.Contains("Template-based styling", StringComparison.OrdinalIgnoreCase))
|
|
return "Apply a document template or style map to keep headings and body copy consistent";
|
|
if (message.Contains("Header or footer", StringComparison.OrdinalIgnoreCase))
|
|
return "Add header and footer metadata such as document name, confidentiality, or page numbers";
|
|
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;
|
|
}
|
|
}
|