CRAN
Recommend AXM extensions from a CRAN (R) package and target CRAN packages from an extension.
AXM reads R extension metadata from a Config/agentExtensions field in the
package DESCRIPTION file. This is the
two-way linking model applied to the CRAN
ecosystem. CRAN reserves Config/ fields for package-specific configuration, so
the value travels with your package untouched.
Recommend extensions from a package
Section titled Recommend extensions from a packageAdd a Config/agentExtensions field to DESCRIPTION. Its value is the portable
recommendation array encoded as JSON on a single line. Each entry is an
extension reference (@owner/<type>/<name>):
Config/agentExtensions: [{"ref":"@examples/packs/r-cran-tinyflags"}]The DESCRIPTION format is line-oriented, so the JSON must stay on one logical
line (continuation lines are indented).
Keep recommendations identity-only — omit versionRange. AXM resolves the
reference to the newest matching extension version and pins it in the user's
axm.lock. Prefer recommending a single pack so you keep one stable
reference while its contents evolve.
Add a semver versionRange only when your package genuinely pairs with a
bounded major line of the extension:
Config/agentExtensions: [{"ref":"@examples/packs/r-cran-tinyflags","versionRange":"^1.0.0"}]Target CRAN packages from an extension
Section titled Target CRAN packages from an extensionOn the extension manifest (skill.json, pack.json, subagent.json, …), add a
packages array with a CRAN purl.
Use the package name from DESCRIPTION as the purl name:
// pack.json
{
"packages": [{ "purl": "pkg:cran/tinyflags" }],
}Version ranges
Section titled Version rangesDefault to identity-only. Add a VERS
versionRange with the cran scheme only when the extension depends on package
APIs introduced or removed in a known range:
{
"packages": [
{
"purl": "pkg:cran/tinyflags",
"versionRange": "vers:cran/>=0.1.0|<1.0.0",
},
],
}Official status
Section titled Official statusWhen the CRAN package recommends an extension through the AgentXM Registry and that extension names the package as a companion via its purl, AXM derives official status for the pair — no extra flag. See Official extensions.
Reference fixture
Section titled Reference fixtureThe
r-cran-lib
and
r-cran-app
directories in polyglot-examples are the working fixtures for everything
above. The package publishes a TinyFlags companion pack and recommends it from
the Config/agentExtensions field in DESCRIPTION; the pack and each skill
declare the package's pkg:cran purl as an identity-only companion package.