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

Experimental Livebook-friendly DSL for sketching requirements traceability models.

This Lab DSL compiles to the stable, pipe-first `Choreo.Requirement` builders and
returns an ordinary `%Choreo.Requirement{}`. It is useful for quickly connecting
requirements to stakeholders, implementation components, tests, and traceability
links in design notebooks.

## Examples

    iex> import Choreo.Lab.DSL.Requirement
    ...> model = requirements "Auth v2" do
    ...>   security = stakeholder("Security Team")
    ...>   mfa = functional("Users must authenticate with MFA", id: "REQ-001", risk: :high)
    ...>   auth = component("Auth Service")
    ...>   mfa_test = test_case("MFA login test")
    ...>
    ...>   security ~> mfa |> traces("owns")
    ...>   auth ~> mfa |> satisfies("implements")
    ...>   mfa_test ~> mfa |> verifies("proves")
    ...> end
    iex> model.name
    "Auth v2"
    iex> Enum.sort(Choreo.Requirement.requirements(model))
    [:mfa]

Requirement constructors accept a text/label and can infer stable options for
quick sketches:

    mfa = requirement("Users must authenticate with MFA", id: "REQ-001")
    perf = performance("p95 latency below 100ms", risk: :high)

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

    auth ~> mfa |> satisfies("implements")
    test ~> mfa |> verifies("covers")
    child ~> parent |> refines("elaborates")
    edge req_a ~> req_b, depends: "requires first"
    contains parent ~> child, "breaks down"

# `edge_decl`

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

# `node_decl`

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

# `actor`

# `component`

# `constraint`

# `contains`

# `depends`

# `derives`

# `design_constraint`

# `docref`

# `edge`

# `functional`

# `interface_requirement`

# `label`

# `module`

# `on`

# `owner`

# `performance`

# `physical`

# `refines`

# `relates`

# `req`

# `requirements`
*macro* 

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

# `requirements`
*macro* 

# `satisfies`

# `service`

# `stakeholder`

# `system`

# `taxonomy`

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

Returns the vocabulary supported by the requirement DSL.

    iex> taxonomy = Choreo.Lab.DSL.Requirement.taxonomy()
    iex> :functional in taxonomy.requirements
    true
    iex> :component in taxonomy.nodes
    true
    iex> :satisfies in taxonomy.edges
    true

# `team`

# `test_case`

# `traces`

# `type`

# `verbs`

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

Compatibility alias for `taxonomy/0`.

# `verification`

# `verifies`

---

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