Make the data model

NVM Express publishes the ratified specifications as PDF, for anyone to download, at nvmexpress.org/specifications. Download the eleven documents ratified in 2026 into one directory, ~/specs here: Base 2.4, the NVM, Zoned Namespace, Key Value, Subsystem Local Memory and Computational Programs command sets, Management Interface 2.2, Boot 1.4, and the PCIe, RDMA and TCP transports. senfd knows these files by their SHA-256, so a data model made from them links each citation to its page of the PDF. A member of NVM Express may give senfd the .docx of the same documents instead, and senfd makes the same data model from them. Read the notices on what the data model may be used for.

$ senfd ~/specs/*.pdf --output ~/.cache/senfd

The command takes a few minutes, two of them for the Base specification. At the end, senfd says what it made and how many figures to look at. senfd lint lists those figures; see linting the documents.

The files

senfd reads the documents it is given, .pdf or .docx, and writes three files for each document into the directory that --output names:

  • <name>.plain.figure.document.json, the FigureDocument: the document's figures as written, each figure as rows of cells.

  • <name>.normalized.figure.document.json, the NormalizedFigureDocument: each figure read as the kind it is, with diagnostics saying what was normalised.

  • <name>.spec.document.json, the SpecDocument: the data model of that one document.

senfd merges the data models of all the documents into merged.spec.document.json. Each of the three files of a document has an HTML rendering beside it. The stages show what a figure becomes at each stage, and the schema describes what the JSON holds.

senfd --help
usage: senfd [-h] [--output OUTPUT] [--dump-schema]
             [--skip-figures SKIP_FIGURES] [--version]
             [document ...]

Reads specification documents, .pdf or .docx, extracts and
normalises their figures, and makes a structured data model of
them; senfd lint lists what reading them found.

positional arguments:
  document              path to one or more document(s)

options:
  -h, --help            show this help message and exit
  --output OUTPUT       directory where the output will be saved
  --dump-schema         dump schema(s) and exit
  --skip-figures SKIP_FIGURES
                        TOML file of figures to leave out, see below
  --version             print the version and exit

--skip-figures names a TOML file of figures to leave out, each by a regular
expression of its caption and the number of figures it must match:

  [[skip]]
  regex = "^Byte, Word, and Dword Relationships$"
  matches = 1
  description = "why it is left out"

skiplists/ in senfd's repository holds those of the ratified documents.

Example

senfd's repository holds a synthetic document, example/example.docx, written to exercise the reader. Run senfd over it:

senfd example/example.docx --output output

The run ends with:

1 document into output/merged.spec.document.json: 8 commands, 2 features, 3 log pages and 49 structures.
For the authors: 6 candidate errata and 3 document errors. For senfd, or the figures: 0 figures not modelled, 0 worked examples and 3 unassigned dwords.
List them: senfd lint --spec output/merged.spec.document.json

The repository keeps the output of this run in example/output. jless and jq are useful for reading the JSON. sate answers questions from the merged data model; see the expert.