# Data dictionary

This directory contains the verified Player's Handbook comparison manifest and the earlier class-species prototype data.

## Files

- `classes.json`: Current Player's Handbook base-class names and their SRD 5.2.1 presence.
- `species.json`: Current Player's Handbook species names and their SRD 5.2.1 presence.
- `combinations.json`: Generated Cartesian product of every class and species.
- `summary.json`: Generated counts and percentages by classification.
- `sources.json`: Dataset scope, provenance, licensing boundary, and caveat.
- `schema.json`: Record contract for the expanded dashboard dataset.
- `phb-5.5e-manifest.json`: Versioned Player's Handbook manifest for every approved proof-of-concept category.
- `phb-vs-srd-comparison.json`: Verified name-coverage assignment for all 758 Player's Handbook records, with stated limitations.
- `srd-5.2.1-comparison-inventory.json`: The 599 SRD matches within the approved comparison scope.
- `source-snapshots/phb-feats-index.json`: Names, categories, and canonical URLs returned by the official Player's Handbook feat filter.
- `source-snapshots/phb-spells-index.json`: Names, levels, and canonical URLs returned across all pages of the official Player's Handbook spell filter.
- `source-snapshots/phb-equipment-index.json`: Approved named nonmagical gear assembled from the documented official-source union.
- `source-snapshots/equipment-srd-structured-evidence.json`: Per-item SRD equipment evidence used to replace unrestricted substring matching.
- `source-snapshots/srd-pdf-name-locations.json`: PDF page-location audit for SRD feats and spells.

## Expanded manifest totals

| Category | Records |
|---|---:|
| Classes | 12 |
| Subclasses | 48 |
| Species | 10 |
| Backgrounds | 16 |
| Feats | 75 |
| Spells | 391 |
| Named nonmagical equipment | 206 |
| **Total** | **758** |

The PHB manifest establishes comparison-universe membership and intentionally retains unresolved SRD fields. The separate comparison dataset contains the verified SRD name-coverage results.

## Status values

| Status | Rule |
|---|---|
| `both-names-matched` | Both the class and species names appear in SRD 5.2.1. |
| `one-name-matched` | Exactly one component name appears in SRD 5.2.1. |
| `no-name-match` | Neither component name was matched in SRD 5.2.1. |

These derived combination statuses describe name coverage only. They do not license Player's Handbook text or decide whether an implementation is lawful.

## Provenance

The comparison universe uses names from the current Player's Handbook sections of the D&D Beyond class and species indexes. SRD presence and printed page numbers were checked against `SRD_CC_v5.2.1.pdf`.

Run `node scripts/generate-data.mjs` from the project root after changing the class or species source data.

Run `node scripts/generate-phb-manifest.mjs` to rebuild the expanded Player's Handbook manifest from the checked source snapshots.

The Python scripts in `scripts/` preserve the SRD comparison and adversarial evidence checks used during Verify. They expect the supplied SRD PDF and extraction work files in the shared project workspace; packaging them into a clean public data-refresh command remains an implementation task for the dashboard repository.
