refactor(factory): align agent-author and agent-audit with skill-author pattern
- agent-author: convert template comments from YAML (#) to HTML (<!-- -->) - Easier to spot and distinguish from functional comments - Add explicit "Delete template comments before shipping" reminders - Update SKILL.md Steps 2-3 with removal instruction - agent-audit: add comment-discipline check - Flag excessive frontmatter documentation comments as padding - Mirrors skill-audit's body-discipline principle - Update coverage line to include comment-discipline dimension This ensures agents follow the same comment-cleanup discipline as skills, preventing template documentation from shipping with agent definitions. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,44 +1,45 @@
|
||||
---
|
||||
# GitHub Copilot CLI agent definition (CLI format — path: .github/agents/<name>.agent.md)
|
||||
# File extension MUST be .agent.md — a plain .md file is not picked up by Copilot CLI.
|
||||
# Fill in all FILL IN: placeholders. Remove or uncomment optional fields as needed.
|
||||
# Body length limit: 30,000 characters — content beyond this is silently truncated.
|
||||
#
|
||||
# NOTE: This template is for the CLI format. The cloud/IDE format (path: .github/copilot/agents/<name>.md,
|
||||
# extension: .md) supports additional fields: target, user-invocable, disable-model-invocation, mcp-servers.
|
||||
# Do not add those fields here — they are silently ignored by the CLI runtime.
|
||||
<!-- GitHub Copilot CLI agent definition (CLI format — path: .github/agents/<name>.agent.md)
|
||||
File extension MUST be .agent.md — a plain .md file is not picked up by Copilot CLI.
|
||||
Fill in all FILL IN: placeholders. Remove or uncomment optional fields as needed.
|
||||
Body length limit: 30,000 characters — content beyond this is silently truncated.
|
||||
Delete template comments before shipping.
|
||||
|
||||
NOTE: This template is for the CLI format. The cloud/IDE format (path: .github/copilot/agents/<name>.md,
|
||||
extension: .md) supports additional fields: target, user-invocable, disable-model-invocation, mcp-servers.
|
||||
Do not add those fields here — they are silently ignored by the CLI runtime. -->
|
||||
|
||||
name: AGENT_NAME
|
||||
# Required. Kebab-case identifier. Home-directory version wins on name collision.
|
||||
<!-- Required. Kebab-case identifier. Home-directory version wins on name collision. -->
|
||||
|
||||
description: FILL IN: Action-first description of what this agent does and when to invoke it.
|
||||
# Required. Used by the runtime for automatic agent selection — quality matters.
|
||||
# Start with a verb: "Reviews...", "Analyzes...", "Generates..."
|
||||
# Example: "Reviews pull request diffs for security issues."
|
||||
<!-- Required. Used by the runtime for automatic agent selection — quality matters.
|
||||
Start with a verb: "Reviews...", "Analyzes...", "Generates..."
|
||||
Example: "Reviews pull request diffs for security issues." -->
|
||||
|
||||
# tools: ["read", "search", "edit"]
|
||||
# Optional. Array of tool names. Omit = all available tools. [] = no tools.
|
||||
# Copilot tool aliases (use these, not Claude Code names):
|
||||
# execute — run shell commands (aliases: shell, Bash, powershell)
|
||||
# read — read file contents (aliases: Read, NotebookRead)
|
||||
# edit — modify files (aliases: Edit, MultiEdit, Write, NotebookEdit)
|
||||
# search — search files (aliases: Grep, Glob)
|
||||
# agent — invoke sub-agents (aliases: custom-agent, Task)
|
||||
# web — web search and fetch (aliases: WebSearch, WebFetch)
|
||||
# For MCP tools: "server-name/tool-name" or "server-name/*"
|
||||
<!-- tools: ["read", "search", "edit"]
|
||||
Optional. Array of tool names. Omit = all available tools. [] = no tools.
|
||||
Copilot tool aliases (use these, not Claude Code names):
|
||||
execute — run shell commands (aliases: shell, Bash, powershell)
|
||||
read — read file contents (aliases: Read, NotebookRead)
|
||||
edit — modify files (aliases: Edit, MultiEdit, Write, NotebookEdit)
|
||||
search — search files (aliases: Grep, Glob)
|
||||
agent — invoke sub-agents (aliases: custom-agent, Task)
|
||||
web — web search and fetch (aliases: WebSearch, WebFetch)
|
||||
For MCP tools: "server-name/tool-name" or "server-name/*" -->
|
||||
|
||||
# model: claude-sonnet-4-5
|
||||
# Optional. Model to run this agent on.
|
||||
# Cloud/IDE-only fields (target, user-invocable, disable-model-invocation, mcp-servers)
|
||||
# are not valid in this CLI format — use the .github/copilot/agents/<name>.md path for those.
|
||||
<!-- model: claude-sonnet-4-5
|
||||
Optional. Model to run this agent on.
|
||||
Cloud/IDE-only fields (target, user-invocable, disable-model-invocation, mcp-servers)
|
||||
are not valid in this CLI format — use the .github/copilot/agents/<name>.md path for those. -->
|
||||
|
||||
# source_keys:
|
||||
# - slug-name
|
||||
# Development-only. Add when research sources informed this agent (slugs must match agents/sources.md).
|
||||
# Omit when no research was used. Not a Copilot runtime field — silently ignored.
|
||||
<!-- source_keys:
|
||||
- slug-name
|
||||
Development-only. Add when research sources informed this agent (slugs must match agents/sources.md).
|
||||
Omit when no research was used. Not a Copilot runtime field — silently ignored. -->
|
||||
|
||||
# DO NOT include these Claude Code-only fields:
|
||||
# maxTurns, isolation, memory, permissionMode, effort, hooks, mcpServers
|
||||
<!-- DO NOT include these Claude Code-only fields:
|
||||
maxTurns, isolation, memory, permissionMode, effort, hooks, mcpServers -->
|
||||
---
|
||||
|
||||
FILL IN: System prompt body. Should match the Claude Code version — the agent's task is the same across providers.
|
||||
|
||||
Reference in New Issue
Block a user