# Julia

Recommend AXM extensions from a Julia package and target Julia packages from an extension.

AXM reads Julia extension metadata from a top-level `agentExtensions` array in
the package's `Project.toml`. This is the
[two-way linking](/docs/package-ecosystems/overview) model applied to the Julia
ecosystem (the General registry).

## Recommend extensions from a package

Add a top-level `agentExtensions` array to `Project.toml`. Each entry is an
extension reference (`@owner/<type>/<name>`):

```toml
# Project.toml
name = "AgentXMExampleTinyFlags"
uuid = "9019d187-aeb1-4daa-a321-8e2340601955"
version = "0.1.0"

agentExtensions = [{ ref = "@examples/packs/julia-general-tinyflags" }]
```

`Project.toml` ships with the registered package, so the array is available to
consumers after resolution.

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:

```toml
agentExtensions = [
  { ref = "@examples/packs/julia-general-tinyflags", versionRange = "^1.0.0" },
]
```

## Target Julia packages from an extension

On the extension manifest (`skill.json`, `pack.json`, `subagent.json`, …), add a
`packages` array with a Julia [purl](https://github.com/package-url/purl-spec).
Use the package name as registered in the General registry as the purl name:

```jsonc
// pack.json
{
  "packages": [{ "purl": "pkg:julia/AgentXMExampleTinyFlags" }],
}
```

### Version ranges

Default to identity-only. Add a [VERS](https://github.com/package-url/vers-spec)
`versionRange` with the `julia` scheme only when the extension depends on
package APIs introduced or removed in a known range:

```jsonc
{
  "packages": [
    {
      "purl": "pkg:julia/AgentXMExampleTinyFlags",
      "versionRange": "vers:julia/>=0.1.0|<1.0.0",
    },
  ],
}
```

## Official status

When the Julia 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](/docs/package-ecosystems/overview#official-extensions).

## Reference fixture

The
[`julia-general-lib`](https://github.com/agentxm/polyglot-examples/tree/main/julia-general-lib)
and
[`julia-general-app`](https://github.com/agentxm/polyglot-examples/tree/main/julia-general-app)
directories in `polyglot-examples` are the working fixtures for everything
above. The package publishes a TinyFlags companion pack and recommends it from
the top-level `agentExtensions` array in `Project.toml`; the pack and each skill
declare the package's `pkg:julia` purl as an identity-only companion package.