# `Choreo.Lab.DSL.Dependency`
[🔗](https://github.com/code-shoily/choreo/blob/v0.14.1/lib/choreo/lab/dsl/dependency.ex#L1)

Experimental Livebook-friendly DSL for sketching software dependency graphs.

This Lab DSL compiles to the stable, pipe-first `Choreo.Dependency` builders and
returns an ordinary `%Choreo.Dependency{}`. It is useful for quick architecture
sketches, refactoring conversations, onboarding maps, and interview explanations
of coupling between applications, modules, libraries, interfaces, and tests.

## Examples

    iex> import Choreo.Lab.DSL.Dependency
    ...> deps = dependency do
    ...>   core = cluster("Core")
    ...>   api = application("API Gateway")
    ...>   auth = module("Auth", cluster: core)
    ...>   contract = interface("Auth Behaviour")
    ...>   phoenix = library("Phoenix")
    ...>
    ...>   api ~> phoenix |> uses("HTTP stack")
    ...>   api ~> auth |> calls("validates token")
    ...>   auth ~> contract |> implements("implements callbacks")
    ...> end
    iex> Enum.sort(Choreo.Dependency.nodes(deps))
    [:api, :auth, :contract, :phoenix]

Edges can use generic, typed, or pipe-modified forms:

    api ~> auth
    api ~> auth |> calls("validates token")
    edge api ~> phoenix, uses: "framework"
    imports module_a ~> module_b, "alias/import"
    dev app ~> test_lib, "test helper"

# `cluster_decl`

```elixir
@type cluster_decl() :: %{id: String.t(), opts: keyword()}
```

# `edge_decl`

```elixir
@type edge_decl() :: %{from: Yog.node_id(), to: Yog.node_id(), opts: keyword()}
```

# `node_decl`

```elixir
@type node_decl() :: %{id: Yog.node_id(), builder: atom(), opts: keyword()}
```

# `app`

# `application`

# `calls`

# `cluster`

# `component`

# `contract`

# `dependency`
*macro* 

Builds a `%Choreo.Dependency{}` from a compact Lab DSL block.

# `dependency`
*macro* 

# `depends`

# `depends_on`

# `dev`

# `edge`

# `edge_type`

# `group`

# `implements`

# `imports`

# `inherits`

# `interface`

# `label`

# `layer`

# `lib`

# `library`

# `module`

# `on`

# `package`

# `protocol`

# `service`

# `spec`

# `taxonomy`

```elixir
@spec taxonomy() :: %{
  clusters: [atom()],
  nodes: [atom()],
  edges: [atom()],
  modifiers: [atom()],
  options: [atom()]
}
```

Returns the vocabulary supported by the dependency DSL.

    iex> taxonomy = Choreo.Lab.DSL.Dependency.taxonomy()
    iex> :application in taxonomy.nodes
    true
    iex> :cluster in taxonomy.clusters
    true
    iex> :calls in taxonomy.edges
    true

# `test_suite`

# `type`

# `uses`

# `verbs`

```elixir
@spec verbs() :: map()
```

Compatibility alias for `taxonomy/0`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
