AX Agent 도구·스킬 정합성 재구성 및 실행 품질 보강
변경 목적: - AX Agent의 도구 이름, 내부 설정, 스킬 정책, 실행 루프 사이의 불일치를 줄이고 전체 동작 품질을 높인다. - claw-code 수준의 일관된 동작 품질을 참고하되 AX 구조에 맞는 고유한 카탈로그·정규화 레이어로 재구성한다. 핵심 수정사항: - 도구 canonical id, legacy alias, 탭 노출, 설정 카테고리, read-only 분류를 중앙 카탈로그로 통합했다. - ToolRegistry, AgentLoopService, 병렬 실행 분류, 권한 처리, 훅 처리, 스킬 allowed-tools 해석이 같은 이름 체계를 사용하도록 정리했다. - Agent 설정/일반 설정/도움말의 도구 카드와 훅 편집기, 스킬 설명을 현재 런타임 구조에 맞게 갱신했다. - 컨텍스트 압축, intent gate, spawn agents, session learning, model prompt adapter, workspace context 관련 변경과 테스트 추가를 함께 반영했다. - 문서 이력과 비교/로드맵 문서를 최신 상태로 갱신했다. 검증 결과: - dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\verify_toolcat\ -p:IntermediateOutputPath=obj\verify_toolcat\ : 경고 0 / 오류 0 - dotnet test src/AxCopilot.Tests/AxCopilot.Tests.csproj -c Release -v minimal --filter AgentToolCatalogTests -p:OutputPath=bin\verify_toolcat_tests\ -p:IntermediateOutputPath=obj\verify_toolcat_tests\ : 통과 8
This commit is contained in:
@@ -16,9 +16,11 @@ public class MarkdownSkill : IAgentTool
|
||||
public string Name => "markdown_create";
|
||||
public string Description =>
|
||||
"Create a Markdown (.md) document. " +
|
||||
"REQUIRED: 'content' (raw markdown string). " +
|
||||
"Alternative: set content=\"\" and provide 'sections' array for structured blocks. " +
|
||||
"NEVER call this tool with only title — you MUST include content (or sections). " +
|
||||
"Use 'sections' for structured content (heading/paragraph/table/list/callout/code/quote/divider/toc). " +
|
||||
"Use 'frontmatter' for YAML metadata. Use 'toc' to auto-generate a table of contents. " +
|
||||
"Use 'content' for raw markdown (backward compatible).";
|
||||
"Use 'frontmatter' for YAML metadata. Use 'toc' to auto-generate a table of contents.";
|
||||
|
||||
public ToolParameterSchema Parameters => new()
|
||||
{
|
||||
@@ -26,7 +28,8 @@ public class MarkdownSkill : IAgentTool
|
||||
{
|
||||
["path"] = new() { Type = "string", Description = "출력 파일 경로 (.md). 작업 폴더 기준 상대 경로." },
|
||||
["title"] = new() { Type = "string", Description = "문서 제목. 제공 시 최상단에 '# 제목' 헤딩을 추가합니다." },
|
||||
["content"] = new() { Type = "string", Description = "원시 마크다운 내용 (하위 호환). sections가 없을 때 사용합니다." },
|
||||
["content"] = new() { Type = "string", Description = "[REQUIRED unless 'sections' is provided] 원시 마크다운 내용. 문서의 주요 내용을 여기에 작성하세요. " +
|
||||
"sections 배열을 사용하려면 content=\"\"로 두고 sections에 최소 1개 이상의 블록을 제공하세요." },
|
||||
["sections"] = new()
|
||||
{
|
||||
Type = "array",
|
||||
@@ -51,18 +54,28 @@ public class MarkdownSkill : IAgentTool
|
||||
["toc"] = new() { Type = "boolean", Description = "true이면 문서 상단(제목 다음)에 목차를 자동 생성합니다." },
|
||||
["encoding"] = new() { Type = "string", Description = "파일 인코딩: 'utf-8' (기본값) 또는 'euc-kr'." },
|
||||
},
|
||||
Required = []
|
||||
Required = ["content"]
|
||||
};
|
||||
|
||||
public async Task<ToolResult> ExecuteAsync(JsonElement args, AgentContext context, CancellationToken ct)
|
||||
{
|
||||
// ── 필수 파라미터 ──────────────────────────────────────────────────
|
||||
var hasSections = args.SafeTryGetProperty("sections", out var sectionsEl) && sectionsEl.ValueKind == JsonValueKind.Array;
|
||||
var hasContent = args.SafeTryGetProperty("content", out var contentEl) && contentEl.ValueKind != JsonValueKind.Null;
|
||||
var hasSections = args.SafeTryGetProperty("sections", out var sectionsEl)
|
||||
&& sectionsEl.ValueKind == JsonValueKind.Array
|
||||
&& sectionsEl.GetArrayLength() > 0;
|
||||
var hasContent = args.SafeTryGetProperty("content", out var contentEl)
|
||||
&& contentEl.ValueKind == JsonValueKind.String
|
||||
&& !string.IsNullOrWhiteSpace(contentEl.SafeGetString());
|
||||
var hasFrontmatter= args.SafeTryGetProperty("frontmatter",out var frontEl) && frontEl.ValueKind == JsonValueKind.Object;
|
||||
|
||||
if (!hasSections && !hasContent)
|
||||
return ToolResult.Fail("필수 파라미터 누락: 'sections' 또는 'content' 중 하나는 반드시 제공해야 합니다.");
|
||||
{
|
||||
return ToolResult.Fail(
|
||||
"필수 파라미터 누락: 'content' (마크다운 문자열) 또는 'sections' (배열) 중 하나는 반드시 제공해야 합니다.\n" +
|
||||
"다시 호출할 때는 title 외에 반드시 content를 포함하세요. 예:\n" +
|
||||
"{\"name\":\"markdown_create\",\"arguments\":{\"title\":\"...\",\"content\":\"## 개요\\n...\\n\\n## 상세\\n...\"}}\n" +
|
||||
"sections 배열을 사용하려면 content=\"\"로 두고 sections에 최소 1개 이상의 블록을 제공하세요.");
|
||||
}
|
||||
|
||||
// path 미제공 시 title에서 자동 생성
|
||||
string path;
|
||||
|
||||
Reference in New Issue
Block a user