개발언어 워크플로 힌트와 문서 품질 출력 경로를 고도화한다
- CodeLanguageCatalog에 manifest/build/test/lint 조회 API와 workflow summary 조합기를 추가해 no-LSP fallback과 컨텍스트 생성이 같은 힌트 소스를 재사용하도록 정리한다. - WorkspaceContextGenerator에 Language Workflow 섹션을 추가해 상위 언어의 실행 힌트를 .ax-context.md에 기록하고, HtmlSkill/ExcelSkill은 공통 ArtifactQualityOutputFormatter로 품질 요약과 repair guide를 일관되게 출력하도록 맞춘다. - README.md, docs/DEVELOPMENT.md, docs/NEXT_ROADMAP.md를 2026-04-15 09:49 (KST) 기준으로 갱신하고, CodeLanguageCatalogTests 및 WorkspaceContextGeneratorTests를 확장해 빌드 경고 0/오류 0과 관련 테스트 35건 통과를 확인한다.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
namespace AxCopilot.Services.Agent;
|
||||
|
||||
public static class ArtifactQualityOutputFormatter
|
||||
{
|
||||
public static IReadOnlyList<string> BuildLines(ArtifactQualityReport review)
|
||||
=> [review.ToToolSummary(), ArtifactRepairGuideService.BuildGuide(review)];
|
||||
|
||||
public static IReadOnlyList<string> BuildLines(DeckQualityReport review)
|
||||
=> [review.ToToolSummary(), DeckRepairGuideService.BuildGuide(review)];
|
||||
}
|
||||
@@ -222,8 +222,8 @@ public class ExcelSkill : IAgentTool
|
||||
false,
|
||||
false,
|
||||
false));
|
||||
features += $"\n{review.ToToolSummary()}";
|
||||
features += $"\n{ArtifactRepairGuideService.BuildGuide(review)}";
|
||||
foreach (var line in ArtifactQualityOutputFormatter.BuildLines(review))
|
||||
features += $"\n{line}";
|
||||
|
||||
return ToolResult.Ok(
|
||||
$"Excel 파일 생성 완료: {fullPath}\n시트: {sheetName}, 열: {colCount}, 행: {rowCount}{features}",
|
||||
@@ -333,8 +333,8 @@ public class ExcelSkill : IAgentTool
|
||||
HasSummaryItems(summarySheet, "scorecards") || HasSummaryItems(summarySheet, "cards") || HasSummaryItems(summarySheet, "kpis") || HasSummaryItems(summarySheet, "trend_series") || HasSummaryItems(summarySheet, "dashboard_tiles") || HasSummaryItems(summarySheet, "variance_series"),
|
||||
HasStructuredSummaryContent(summarySheet, "decision_summary"),
|
||||
HasSummaryItems(summarySheet, "sheet_summaries")));
|
||||
features += $"\n{review.ToToolSummary()}";
|
||||
features += $"\n{ArtifactRepairGuideService.BuildGuide(review)}";
|
||||
foreach (var line in ArtifactQualityOutputFormatter.BuildLines(review))
|
||||
features += $"\n{line}";
|
||||
|
||||
return ToolResult.Ok(
|
||||
$"Excel ?뚯씪 ?앹꽦 ?꾨즺: {fullPath}\n?쒗듃: {summaryName}, {sheetName}, ?? {colCount}, ?? {rowCount}{features} [?붿빟 ?쒗듃]",
|
||||
|
||||
@@ -308,8 +308,8 @@ public class HtmlSkill : IAgentTool
|
||||
useToc,
|
||||
usePrint,
|
||||
!string.IsNullOrWhiteSpace(printHeader) || !string.IsNullOrWhiteSpace(printFooter));
|
||||
featureStr += $"\n{review.ToToolSummary()}";
|
||||
featureStr += $"\n{ArtifactRepairGuideService.BuildGuide(review)}";
|
||||
foreach (var line in ArtifactQualityOutputFormatter.BuildLines(review))
|
||||
featureStr += $"\n{line}";
|
||||
|
||||
return ToolResult.Ok(
|
||||
$"HTML 문서 생성 완료: {fullPath} (디자인: {mood}{featureStr})",
|
||||
|
||||
@@ -94,6 +94,15 @@ internal static class WorkspaceContextGenerator
|
||||
}
|
||||
|
||||
// 4. 기존 컨텍스트 파일 감지
|
||||
var workflowGuidance = BuildLanguageWorkflow(extDist);
|
||||
if (workflowGuidance.Count > 0)
|
||||
{
|
||||
sb.AppendLine("## Language Workflow");
|
||||
foreach (var line in workflowGuidance)
|
||||
sb.AppendLine($"- {line}");
|
||||
sb.AppendLine();
|
||||
}
|
||||
|
||||
var contextFiles = DetectContextFiles(workFolder);
|
||||
if (contextFiles.Count > 0)
|
||||
{
|
||||
@@ -440,6 +449,28 @@ internal static class WorkspaceContextGenerator
|
||||
.Select(x => $"{x.Language}: {x.Count} file(s)")
|
||||
.ToList();
|
||||
|
||||
private static List<string> BuildLanguageWorkflow(List<KeyValuePair<string, int>> extDist)
|
||||
{
|
||||
var workflow = new List<string>();
|
||||
var seen = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
foreach (var (extension, _) in extDist)
|
||||
{
|
||||
var capability = Services.CodeLanguageCatalog.FindByExtension(extension);
|
||||
if (capability == null || !seen.Add(capability.Key))
|
||||
continue;
|
||||
|
||||
var summary = Services.CodeLanguageCatalog.BuildWorkflowSummary(capability.Key);
|
||||
if (!string.IsNullOrWhiteSpace(summary))
|
||||
workflow.Add(summary);
|
||||
|
||||
if (workflow.Count >= 3)
|
||||
break;
|
||||
}
|
||||
|
||||
return workflow;
|
||||
}
|
||||
|
||||
private static async Task<(string? Branch, string? Remote)> GetGitInfoAsync(
|
||||
string folder, CancellationToken ct)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user