require-valid-agent-target
Require Copilot custom-agent target metadata to use a documented target value when present.
Rule catalog ID: R019
Targeted pattern scopeâ
.github/agents/**/*.agent.md
What this rule reportsâ
- empty
targetvalues in custom-agent frontmatter - custom-agent
targetvalues other thanvscodeorgithub-copilot
Why this rule existsâ
VS Code documents target as the target environment or context for a custom agent and currently supports vscode and github-copilot. Using other target values drifts away from the documented custom-agent contract and can make the agent configuration ambiguous.
This rule intentionally defers to the more specific require-github-copilot-target-for-mcp-servers rule when mcp-servers metadata is present.
â Incorrectâ
---
description: Plan work inside VS Code
target: github
---
Plan work before implementation starts.
â Correctâ
---
description: Plan work inside VS Code
target: vscode
---
Plan work before implementation starts.