# `Reminisce.Import.JSONL`
[🔗](https://github.com/NoeticEcho/reminisce-elixir/blob/v0.6.0/lib/reminisce/import/jsonl.ex#L4)

Imports a directory of JSONL memory records through `Reminisce.remember/3`.

Each `*.jsonl` file holds one JSON record a line, with these fields (`id` is
required; the others are read when present):

    {"id": "L-001", "kind": "lesson", "title": "…", "body": "…",
     "scope": ["ci"], "confidence": "observed", "sources": ["commit:…"],
     "status": "active", "created_at": "2026-01-03T10:00:00Z",
     "derived_from": ["I-001"], "superseded_by": "D-002", "retired_reason": "…"}

The mapping:

  * `id` is the memory's key, so a rerun is idempotent;
  * `title` and `body` become the content;
  * `kind` becomes a facet, `kind=…`, and picks the aspects: lessons and
    rejected approaches are procedural and semantic, everything else
    semantic;
  * each `scope` tag becomes a facet, `scope=…`;
  * `confidence` maps onto basis: observed → `:observed`, inferred →
    `:inferred`, reported → `:told`;
  * `created_at` is `valid_from`;
  * a retired record is remembered, then archived with its reason, or marked
    superseded by its `superseded_by` record once that one is in.

A record the secret guard refuses is reported in `refused` with its rule and
never stored; anything else that fails is reported in `failed`.

# `import_dir`

```elixir
@spec import_dir(Reminisce.Store.t(), Reminisce.owner(), Path.t()) ::
  {:ok, map()} | {:error, term()}
```

---

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