# Build a schemaset

> Documentation index: [llms.min.txt](https://caseyrfsmith.github.io/scull/llms.min.txt) · Document manifest: [documents.json](https://caseyrfsmith.github.io/scull/documents.json)

Breadcrumbs: Build and use > Build a schemaset

## 1. Prepare inputs

A portable docset can contain:

```text
my-docset/
  vocabulary.yaml
  prose/
    overview.md
  openapi.yaml       # optional; spec.json is also supported
```

Define names and aliases in the [vocabulary](https://caseyrfsmith.github.io/scull/docs/procedure/designing-a-vocabulary.md). Bound the input to one
coherent subject. Include authoritative specs when available; prose supplies behavioral context.

## 2. Extract

```bash
uv sync --extra build
uv run scull-schemafier run \
  --concept myconcept \
  --docset /path/to/my-docset \
  --out schemas/ \
  --model provider/model-name
```

Configure the selected provider's credentials first. Local OpenAI-compatible endpoints can be
selected with `--model-api-base`. See [configuration](https://caseyrfsmith.github.io/scull/docs/reference/config-reference.md).

Explicit `--vocab`, `--spec`, `--oas`, and `--prose` flags override discovered inputs. Keep output
outside the docset.

## 3. Review

Exit status 2 means output was written but needs review. Check evidence, field assignments,
conflicts, and omissions. Do not treat extraction confidence as approval.

```bash
uv run scull validate
uv run scull-schemafier audit-assignments --schemas schemas --vocab /path/to/my-docset/vocabulary.yaml
```

Follow [review and release](https://caseyrfsmith.github.io/scull/docs/procedure/procedure-review.md), then [build an index](https://caseyrfsmith.github.io/scull/docs/procedure/procedure-kg.md) if you need
semantic search. Exact lookup works without an index.
