- SQL 전용 정적 분석 계층을 추가해 PostgreSQL/MySQL/SQL Server/SQLite/Oracle 방언 추정, statement kind 분류, object 추출, destructive DDL·broad DML·transaction boundary 위험 감지를 지원한다 - CodeLanguageCatalog의 SQL manifest/build/test/lint 힌트와 fallback summary를 SQL 분석 결과 중심으로 보강해 no-LSP 환경에서도 dialect·risk·next checks를 직접 안내한다 - DeckPlanningService가 구조화된 content 슬라이드를 kpi_dashboard/comparison/roadmap/chart로 자동 승격하고 DeckQualityReviewService·DeckRepairGuideService가 KPI 근거, verdict, owner/timeline, takeaway 부족을 별도 진단·보정한다 - HtmlSkill에 kpi_panel 섹션을 추가하고 ArtifactQualityReviewService·ArtifactRepairGuideService가 board/strategy 문서의 KPI·evidence·decision 연결 부족을 더 정확히 감지하도록 확장한다 - README.md, docs/DEVELOPMENT.md, docs/NEXT_ROADMAP.md에 2026-04-15 11:17 (KST) 기준 작업 이력과 검증 결과를 반영했다 검증 결과 - dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\verify_sql_doc_batch\ -p:IntermediateOutputPath=obj\verify_sql_doc_batch\ : 경고 0 / 오류 0 - dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter SqlDialectDetectorTests|SqlAnalysisServiceTests|CodeLanguageCatalogTests|DeckPlanningServiceTests|DeckQualityReviewServiceTests|ArtifactQualityReviewServiceTests|ArtifactRepairGuideServiceTests|HtmlSkillConsultingSectionsTests|HtmlSkillGoldenReportTests|PptxSkillGoldenDeckTests -p:OutputPath=bin\verify_sql_doc_batch_tests\ -p:IntermediateOutputPath=obj\verify_sql_doc_batch_tests\ : 통과 47
132 lines
5.4 KiB
C#
132 lines
5.4 KiB
C#
using System.IO;
|
|
using System.Text.Json;
|
|
using AxCopilot.Services.Agent;
|
|
using FluentAssertions;
|
|
using Xunit;
|
|
|
|
namespace AxCopilot.Tests.Services;
|
|
|
|
public class HtmlSkillConsultingSectionsTests
|
|
{
|
|
[Fact]
|
|
public async Task ExecuteAsync_WithConsultingSections_ShouldRenderAdvancedBlocks()
|
|
{
|
|
var workDir = Path.Combine(Path.GetTempPath(), "ax-html-consulting-" + Guid.NewGuid().ToString("N"));
|
|
Directory.CreateDirectory(workDir);
|
|
|
|
try
|
|
{
|
|
var tool = new HtmlSkill();
|
|
var context = new AgentContext
|
|
{
|
|
WorkFolder = workDir,
|
|
Permission = "Auto",
|
|
OperationMode = "external",
|
|
};
|
|
|
|
var args = JsonDocument.Parse(
|
|
"""
|
|
{
|
|
"path": "consulting.html",
|
|
"title": "Executive Report",
|
|
"body": "",
|
|
"sections": [
|
|
{
|
|
"type": "comparison",
|
|
"title": "Option Comparison",
|
|
"items": [
|
|
{ "name": "Option A", "summary": "Fast rollout", "pros": "Low setup effort", "cons": "Limited scale", "verdict": "Fast" }
|
|
]
|
|
},
|
|
{
|
|
"type": "roadmap",
|
|
"title": "Delivery Roadmap",
|
|
"phases": [
|
|
{ "title": "Phase 1", "detail": "Assess and design", "timeline": "0-30 days", "owner": "PMO" }
|
|
]
|
|
},
|
|
{
|
|
"type": "matrix",
|
|
"title": "Priority Matrix",
|
|
"quadrants": [
|
|
{ "title": "Quick Wins", "items": ["Automate reporting", "Standardize templates"] },
|
|
{ "title": "Strategic Bets", "items": ["Operating model redesign"] }
|
|
]
|
|
},
|
|
{
|
|
"type": "decision_summary",
|
|
"title": "Decision",
|
|
"decision": "Approve pilot expansion",
|
|
"rationale": "Retention and margin improved in the pilot region.",
|
|
"actions": ["Approve budget", "Launch phase 2"]
|
|
},
|
|
{
|
|
"type": "kpi_panel",
|
|
"title": "KPI Panel",
|
|
"headline": "Pilot economics remain above threshold",
|
|
"items": [
|
|
{ "label": "Margin", "value": "+4.2pt", "trend": "up", "note": "pilot" },
|
|
{ "label": "Lead Time", "value": "-18%", "trend": "down", "note": "handoff" }
|
|
],
|
|
"takeaway": "The pilot shows both service and margin improvement."
|
|
},
|
|
{
|
|
"type": "evidence_cards",
|
|
"title": "Evidence",
|
|
"items": [
|
|
{ "title": "Margin uplift", "detail": "+4.2p improvement after workflow change", "source": "Finance close", "tag": "KPI" },
|
|
{ "title": "Cycle time", "detail": "Lead time reduced from 12 to 8 days", "source": "PMO tracker", "tag": "Ops" }
|
|
]
|
|
},
|
|
{
|
|
"type": "board_report",
|
|
"title": "Board Ask",
|
|
"decision": "Approve the next rollout wave",
|
|
"recommendation": "Release the phase-2 budget now",
|
|
"rationale": "The pilot hit margin and lead-time targets.",
|
|
"metrics": [
|
|
{ "label": "Margin", "value": "+4.2p", "note": "pilot" }
|
|
],
|
|
"risks": ["Adoption lag in region B"],
|
|
"next_steps": ["Confirm budget", "Launch phase 2"]
|
|
},
|
|
{
|
|
"type": "strategy_brief",
|
|
"title": "Strategy Brief",
|
|
"strategic_question": "Where should we scale first?",
|
|
"thesis": "Scale the high-retention segment first.",
|
|
"implications": ["Refocus sales coverage", "Prioritize onboarding"],
|
|
"decisions": ["Approve segment focus", "Adjust regional targets"]
|
|
}
|
|
]
|
|
}
|
|
""").RootElement;
|
|
|
|
var result = await tool.ExecuteAsync(args, context, CancellationToken.None);
|
|
|
|
result.Success.Should().BeTrue();
|
|
result.Output.Should().Contain("Repair guide:");
|
|
var html = File.ReadAllText(Path.Combine(workDir, "consulting.html"));
|
|
html.Should().Contain("comparison-grid");
|
|
html.Should().Contain("roadmap-block");
|
|
html.Should().Contain("matrix-grid");
|
|
html.Should().Contain("decision-summary");
|
|
html.Should().Contain("kpi-panel");
|
|
html.Should().Contain("evidence-cards");
|
|
html.Should().Contain("board-report-panel");
|
|
html.Should().Contain("strategy-brief-panel");
|
|
}
|
|
finally
|
|
{
|
|
try
|
|
{
|
|
if (Directory.Exists(workDir))
|
|
Directory.Delete(workDir, true);
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
}
|
|
}
|