# `Gralkor.Format`
[🔗](https://github.com/elimydlarz/gralkor/blob/main/lib/gralkor/format.ex#L1)

Format graphiti edge data into the canonical fact strings the LLM sees.

Pure Elixir — graphiti runs in Python, but we extract its edges into
Elixir maps and format them here, never reaching back into Python for
formatting.

Output shape per fact:

    - {fact} (created …) (valid from …) (invalid since …) (expired …)

Timestamp normalisation matches the server's `pipelines/formatting.py` so
consumers see identical fact text from either stack.

See `ex-format-fact` in `gralkor/TEST_TREES.md`.

# `format_fact`

```elixir
@spec format_fact(map()) :: String.t()
```

# `format_facts`

```elixir
@spec format_facts([map()]) :: String.t()
```

# `format_timestamp`

```elixir
@spec format_timestamp(String.t()) :: String.t()
```

---

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