Files
holocron/plugins/kyberforge/skills/agent-author
Defame1297 311e7cd22c fix(kyberforge): reconcile the authoring rules the ADR-0020 trim left disagreeing
Six defects, each one a place where two files that an author reads in the same
sitting told them different things — or where the trim dropped a rule and nothing
noticed because no gate covers prose.

**"Use proactively" contradicted itself across the pair.** All three agent
templates said to add it where the runtime should delegate unprompted, while
`agent-audit`'s `KyberforgeCopilot.ProactivePhrase` rule grades it a hard FAIL in
any `*.agent.md` — which is the Copilot half of every project/user pair *and* the
vendor-neutral plugin-scope file, since that compiles to a real Copilot agent
downstream. Following the template produced a file the repo's own gate rejects.
The phrase is now permitted in exactly one place, the Claude Code `.md`, and
`references/contract.md` carries the per-file table plus the consequence authors
ask about next: a pair whose CC half has it and whose Copilot half does not is
correct, because `agent-audit` checks that both halves describe the same job, not
that they match word for word.

**The output-schema rule contradicted itself inside one file.** `contract.md`
said any content only one branch reaches moves to `references/`, and then offered
an "Output format template" body pattern with no qualification. Stated once now,
so it is not re-litigated: an output schema stays in the body only when every flow
produces it and it is roughly 50 words or less. No third option.

**Gotchas tiers disagreed with the script.** `validate.sh` emits the entry count
through `suggest()` and exits 0, while `skill-author` and `skill-audit` both
called more than five entries a FAIL. Whether a given gotcha earns its place is
judgment, so the prose moves to the script's tier rather than the reverse. The
paraphrase rule stays a FAIL and is explicitly marked as the auditor's call — no
script detects it.

**The dispatch exemplar was cited at the wrong number.** `apm-workflow`'s body is
421 words; 554 is its whole-file count. Both `contract.md` and `body-discipline.md`
cited 554 while describing a body budget, so an author calibrating against the
exemplar overshot by ~30% — the exact whole-file/body-only conflation those two
sections exist to warn against, reproduced inside the warning.

**"Error handling" came back as a required body element.** It was one of four and
is the one that gets dropped, and dropping it is not neutral: an agent handed
malformed input with no instruction invents a recovery, and a subagent's invented
recovery is invisible to its caller until the output is wrong. Restored in
`agent-audit`'s rubric as a SUGGESTION, in `agent-author`'s contract and both
scope checklists as a required element, and as an `## Errors` section in all three
templates.

**`skill-author` Step 4 gains the one check the audit misses.** An empty body
reports `PASS SKILL.md body word count 0` — a word gate cannot tell "concise"
from "absent". Step 4 now hand-checks for a non-empty section, and its commit
verification is conditioned on actually being inside a git worktree, which a skill
under `~/.claude/skills/` is not.

Also here: absolute repo paths removed from `skill-author`'s SKILL.md and
contract.md in favour of naming the skill (`zoom-out`'s description is quoted
inline instead of pointed at), the boundary-target universe documented to match
the resolver, a two-hops-from-SKILL.md limit on reference chains, and
`new-agent.sh`'s next-steps output naming the description budget and the
deliberate absence of an agent body gate.

Refs: ADR-0020
2026-08-16 16:40:51 +00:00
..

agent-author

Creates and improves agent definition files for Claude Code and GitHub Copilot CLI.

What it does

Scaffolds and fills in agent definition files at plugin/APM, project, or user scope. Project and user scope always generate a Claude Code + Copilot CLI file pair (.md + .agent.md) in one pass. Plugin/APM scope generates a single vendor-neutral .apm/agents/<name>.agent.md file instead — no separate Claude Code / Copilot split, since apm compile has no per-target field integrator (see ADR-0016). Also applies improvement signals — grill output, inline feedback, session context — to existing agent files. Bumps the version after every change: the resolved package's apm.yml at plugin/APM scope (minor for new agents, patch for improvements); project/user scope has no manifest to bump.

Before you start

Have ready: the agent's name (kebab-case), the root directory (plugin root, project root, or ~), a one-sentence purpose, and the triggering condition (when should the runtime delegate to this agent?).

Usage

/agent-author

Manual scaffold (human workflow):

bash scripts/new-agent.sh <agent-name> <root>

# Examples:
bash scripts/new-agent.sh code-reviewer packages/my-package/   # plugin/APM scope if packages/my-package/apm.yml has a type: field
bash scripts/new-agent.sh deploy-assistant .
bash scripts/new-agent.sh security-reviewer ~

Files

File Purpose
SKILL.md Skill instructions for agents — gotchas, the create/improve dispatch table, the scope dispatch table, the shared gates, and validation/close
scripts/new-agent.sh Scaffolds agent definition file(s) from templates — a single .apm/agents/<name>.agent.md at plugin/APM scope, or a Claude Code + Copilot CLI pair at project/user scope
references/create.md Create flow: prerequisites, scaffold and scope walk-up, what to fill in, package-root sources.md
references/improve.md Improve flow: signal verification, root-cause grouping, generalizing, delegation over growth, ADR-0020 retrofit
references/contract.md Description and body contract: three-part description shape, 250/400 tiers, delegation rule in place of a body word gate, invocation axis
references/plugin-scope.md Plugin/APM scope field rules for the single vendor-neutral file, plus its pre-audit checklist
references/project-user-scope.md Project/user scope field rules for the Claude Code + Copilot pair, both Copilot formats, plus its pre-audit checklist
references/deployment-modes.md Scope hierarchy and precedence, scoped identifiers, cache isolation, path conventions
references/scripts.md Conventions for new-agent.sh and the templates it copies: contract, template variables, file placement, error messages
references/sources.md Research provenance — sources that informed this skill
assets/templates/claude-code.md Annotated Claude Code agent definition template (project/user scope)
assets/templates/copilot.agent.md.template Annotated Copilot CLI agent definition template (project/user scope)
assets/templates/apm-agent.md Annotated vendor-neutral APM agent definition template (plugin/APM scope)
tests/new-agent.bats (source-only) bats tests for scripts/new-agent.sh
assets/README.md Directory meta-documentation for assets/
references/README.md Directory meta-documentation for references/
scripts/README.md Directory meta-documentation for scripts/
tests/README.md (source-only) bats dependency instructions and run command

Rows marked (source-only) exist in the authoring source (.apm/skills/agent-author/) but are not present in an installed plugin: scripts/sync-plugin-content.sh strips <category>/<name>/tests when it generates the flat mirror, because these are dev-time fixtures no plugin host needs to discover (ADR-0017). Run them from a repo checkout, not from an install. The assets/templates/ rows above are unaffected — the exclusion is depth-scoped to <category>/<name>/tests, so template trees that themselves contain a tests/ directory ship intact.