# `PtcRunner.Lisp.Prelude.Spec`
[🔗](https://github.com/andreasronge/ptc_runner/blob/main/lib/ptc_runner/lisp/prelude/spec.ex#L1)

Internal raw-definition spec gathered by
`PtcRunner.Lisp.Prelude.Compiler` during its AST walk, before
host-boundary `%PtcRunner.Lisp.Prelude.Export{}` records are built and
before the callable private env is captured.

Not part of the public prelude artifact — it carries the raw parser forms
(`params_form`, `body_form`) that the compiler needs to both build export
metadata and reconstruct definition forms for env capture (fact #6).

`metadata_form` is the **raw** `{:map, pairs}` parser node captured from a
`defn`/`defn-` before `normalize_meta/1` flattens it into the (lossy,
order-destroying) `metadata` map. It exists so `source` discovery can render
the author's metadata Formatter-faithfully with original key order; `metadata`
(normalized) still drives everything else. Always `nil` for constants — `(def
...)` carries no metadata syntax.

# `t`

```elixir
@type t() :: %PtcRunner.Lisp.Prelude.Spec{
  arity: non_neg_integer() | :variadic,
  body_form: [term()],
  doc: String.t() | nil,
  metadata: map(),
  metadata_form: {:map, [term()]} | nil,
  namespace: String.t(),
  params_form: term() | nil,
  private?: boolean(),
  symbol: String.t()
}
```

---

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