Files
holocron/plugins/kyberforge/skills/agent-author/assets/templates/copilot.agent.md.template
Defame1297 4a5c3c0cff feat(kyberforge): enforce the ADR-0020 context contract for skills and agents
Skill name+description pairs are preloaded into every session, costing
~6,200 tokens across 39 skills before any skill is invoked. The authoring
rules mandated that growth: skill-author:104 and description-quality.md:21
both required padding, while skill-author:102 (the deflating rule) had no
FAIL condition behind it.

Gates (blocking, no baseline file):
- description 250 chars SUGGESTION / 400 FAIL, measured on the folded
  YAML value
- body-only 600 words SUGGESTION / 900 FAIL, independent of the unchanged
  whole-file 2770-word / 500-line spec backstop
- every boundary-clause routing target must resolve to a real skill or
  agent; catches skill-improve, neuledge-context and gitea-labels
- agents take the description gates but deliberately no body gate; a test
  pins that absence

Vale: DescriptionOpener widened to ^This\b, new CompositionNote rule
banning architecture notes from descriptions. 10 hits, 0 false positives.

Kyberforge's own four skills retrofitted: descriptions 3,364 -> 938 chars
(-72%), bodies 8,306 -> 2,487 words (-70%), all via the apm-workflow
dispatch pattern. Fixes the skill-improve dangling route and the
agent-author misroute to manual review.

Also fixes a pre-existing false positive where any line-initial 'read '
was flagged as interactive input, which had already caused two scripts to
be rewritten around it.

Refs: ADR-0020
2026-08-14 21:13:13 +00:00

71 lines
3.6 KiB
Plaintext

---
<!-- 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. -->
description: FILL IN: Use when <trigger>. <One capability clause.> Not <thing> -> <name>.
<!-- Required. Used by the runtime for automatic agent selection, and preloaded into
every session whether or not this agent is ever used. Three parts, nothing else:
a trigger clause opening "Use when", at most one capability clause, and a
boundary clause naming a real sibling skill or agent.
250 characters is the target, 400 the hard ceiling (ADR-0020).
Do not open with an action verb ("Reviews...", "Analyzes...") — that rule was deleted.
Keep it identical in wording to the Claude Code half of the pair.
Example: "Use when a diff needs checking for injected credentials before it
merges. Not general code review -> code-reviewer." -->
<!-- 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. -->
<!-- source_keys:
- slug-name
Development-only. Add when research sources informed this agent (slugs must match sources.md at the plugin root).
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 -->
---
FILL IN: System prompt body. Should match the Claude Code version — the agent's task is the same across providers.
You are a FILL IN: role description. When invoked, FILL IN: primary action.
<!-- Delegate, don't restate. If an installed skill already owns a procedure this agent
needs, name it ("invoke `git-commits`") instead of transcribing it — a body that
restates a procedure an invocable skill owns is an agent-audit FAIL. One job per
agent. Delete this comment before shipping. -->
## Inputs
FILL IN: What inputs does this agent expect? (files, context, parameters)
## Process
FILL IN: Steps the agent takes. Be specific about ordering if it matters.
## Output
FILL IN: What does the agent produce? Format, location, structure.