Plugin scope now authors a single vendor-neutral .apm/agents/<name>.agent.md file (name/description/model/body only) instead of a Claude Code + Copilot CLI pair, per ADR-0016: apm compile has no per-target field integrator, so tools: and all Claude-only fields (isolation/maxTurns/effort/memory/ permissionMode) are omitted entirely rather than shipping a value that's guaranteed wrong on one harness. Scope detection switches from a flat plugin.json check to the same apm.yml+type: walk-up agent-audit's validate.sh already uses. Project scope and user scope are unaffected — both keep the existing dual-file pair model. Refs: #89
718 B
718 B
scripts/
new-agent.sh
Scaffolds agent definition file(s) from a single root directory input.
Usage: new-agent.sh <agent-name> <root>
Resolves scope by walking up from <root>: a type:-bearing apm.yml found at or above <root> → plugin/APM scope (single file at <package-root>/.apm/agents/<name>.agent.md; an apm.yml without type: is a marketplace-only manifest and is skipped); <root> exactly ~ → user scope (~/.claude/agents/ + ~/.copilot/agents/); otherwise project scope (<root>/.claude/agents/ + <root>/.github/agents/). Each file is a no-op if it already exists. See --help for full usage.
Tests: tests/new-agent.bats (requires bats-support and bats-assert).