# Dependency notes for Elixir

The `deps` function in `mix.exs` lists the packages a project needs and the versions it accepts. It does not say why a package is there, which Phoenix or Ecto upgrade it is waiting for, or what to run after it moves.

Pacmon keeps a note for each dependency in `.pacmon/mix/DEPENDENCY-NOTES.md`, beside `mix.exs`, and shows it on the dependency's tuple. The apps of an umbrella project can share one notes file at the umbrella root.

![The deps function of mix.exs in VS Code: filled marks and the first line of the note for the dependencies that have one, hollow marks before tesla and oban, which have none](https://pacmon.dev/shots/elixir.png)

*`mix.exs` in VS Code.*

## What Pacmon reads

- **Manifest:** `mix.exs`
- **Notes file:** `.pacmon/mix/DEPENDENCY-NOTES.md`
- **Section heading:** the dependency application atom: `## phoenix`, `## ecto_sql`

Pacmon reads literal dependency tuples in `def/defp deps` or an inline `deps: [...]` list, including Hex, Git, path and umbrella dependencies. Static `only` and `targets` options are shown as scopes; dynamically assembled lists are not run or guessed.

Pacmon never runs Mix or project code, so it needs no Elixir or Erlang installation.

## Example

```elixir
defp deps do
  [
    {:phoenix, "~> 1.7.14"},
    {:ecto_sql, "~> 3.12"},
    {:postgrex, ">= 0.0.0"},
    {:credo, "~> 1.7", only: [:dev, :test], runtime: false}
  ]
end
```

`.pacmon/mix/DEPENDENCY-NOTES.md`:

```md
## ecto_sql

Database layer; migrations are in priv/repo/migrations.

### Agent notes

- purpose: SQL adapters and migrations for the Postgres repo
- bump-with: postgrex
- verify: `mix test` and `mix ecto.migrate` on an empty database
- verified: 3.12.1
```

The heading is the dependency's application atom without the colon: `{:ecto_sql, "~> 3.12"}` is `## ecto_sql`. Credo's `only: [:dev, :test]` shows as its scope.

## For AI coding agents

An agent reads a dependency's section before it adds, upgrades or removes it, and logs what it did under `### Agent notes`. See [the rules agents follow](https://pacmon.dev/agents/).
