Migrate examples and guidance to shared domain inputs

This commit is contained in:
2026-11-29 18:22:32 +00:00
parent f05d2e593e
commit 9dc976afaf
24 changed files with 199 additions and 145 deletions

View File

@@ -67,7 +67,7 @@ into `source_refs`.
## Related contracts
The [spell-catalog overlay contract](dnd-spell-catalog-overlays.md) defines
The [shared domain input contract](shared-domain-inputs.md) defines
the configured catalog additions. The [JSON output contract](json-output.md)
defines where this logical artifact is published; [D&D module internals](../internal/dnd.md)
describes extraction and validation mechanics.

View File

@@ -1,78 +0,0 @@
# D&D Spell-Catalog Overlays
This document defines the optional JSON overlay consumed by the D&D spell
extractor. An overlay contributes campaign spell names and aliases for
recognition. It does not define spell rules, effects, levels, classes, or
transcript evidence. Bind the optional `spell_catalog` reference as described
in [Configuration](../config.md#references-and-ordered-handoffs).
## Contract Identity
| Property | Value |
| --- | --- |
| Consumer | D&D spell extraction and normalization |
| Reference slot | `spell_catalog` |
| Media type | `application/json` |
| Required schema version | `notarius.dnd.spell-catalog-overlay.v1` |
| Base catalog | Embedded D&D 5e 2014 SRD catalog |
At most one overlay document may be bound. The maintained example is
[spell-catalog.json](../../examples/dnd-complete/spell-catalog.json).
## Wire Shape
This is a minimal valid overlay:
```json
{
"schema_version": "notarius.dnd.spell-catalog-overlay.v1",
"catalogs": [
{
"id": "campaign.example",
"ruleset": "dnd-5e-2014",
"source": {"title": "Example campaign spells"},
"spells": [{"name": "Aegis of Emberfall"}]
}
]
}
```
| Field | Required | Meaning and constraints |
| --- | --- | --- |
| `schema_version` | Yes | Exactly `notarius.dnd.spell-catalog-overlay.v1`. |
| `catalogs` | Yes | Non-empty array of catalog objects with unique IDs. |
| `catalogs[].id` | Yes | Non-empty trimmed string. |
| `catalogs[].ruleset` | Yes | Exactly `dnd-5e-2014`. |
| `catalogs[].source.title` | Yes | Non-empty trimmed string. |
| `catalogs[].source.version` | No | String when present. |
| `catalogs[].source.url` | No | String when present. |
| `catalogs[].source.license` | No | String when present. |
| `catalogs[].spells` | Yes | Non-empty array of spell objects. |
| `catalogs[].spells[].name` | Yes | Non-empty trimmed string. |
| `catalogs[].spells[].aliases` | No | Array of non-empty trimmed strings when present. |
Unknown fields are rejected at every object level. The document must contain
one JSON value; `null` is not accepted for optional strings or aliases.
## Composition And Compatibility
Notarius starts with the embedded base catalog, then applies overlay catalogs
in ascending catalog-ID order. A new canonical spell name adds a recognition
entry. If an overlay names an existing canonical spell, it augments that spell
with aliases while retaining the established display spelling.
Repeated aliases for the same spell are accepted. A canonical-name, canonical-
to-alias, or alias-to-alias collision between different spells is rejected,
including a collision with the embedded catalog. Matching uses the catalog’s
case, whitespace, and apostrophe normalization, so authors should avoid names
or aliases that normalize to another spell.
Spell extraction receives the effective catalog as deterministic canonical-name
and alias pairs. An alias in the transcript selects its associated canonical
name; the extractor is instructed to return that canonical spelling. The
projection contains no catalog source metadata or provenance, and aliases
remain recognition context rather than transcript evidence.
The overlay is a recognition aid only. The durable spell-artifact schema and
source-evidence rules are defined by the
[D&D spell artifact contract](dnd-spell-artifacts.md).

View File

@@ -0,0 +1,68 @@
# Shared Domain Reference Inputs
Notarius accepts shared party and glossary documents as optional D&D reference
inputs. The complete example provides a [party](../../examples/dnd-complete/party.yml)
and one [multi-collection glossary](../../examples/dnd-complete/glossary.yml).
The reference binding interface and defaults belong to
[Configuration](../config.md#references-and-ordered-handoffs).
## Supported Contracts
Notarius bundles the following contracts from shared schemas distribution
`2026.11.1`, commit `f7e3cedeca11ed903311cdf29ca4d81fb1f216b7`, for offline
validation. The document marker is not a schema-version selector.
| Role | Version and marker | Upstream semantics |
| --- | --- | --- |
| `party` and accepted `roster` aliases | RPG party `0.2.0`, `maximumdirect.rpg.party.v1` | [Party semantics](https://forge.maximumdirect.net/eric/schemas/src/commit/f7e3cedeca11ed903311cdf29ca4d81fb1f216b7/rpg/party/v0.2.0/semantics.md) |
| `glossary` and `spell_catalog` | Glossary `0.2.0`, `maximumdirect.glossary.v1` | [Glossary semantics](https://forge.maximumdirect.net/eric/schemas/src/commit/f7e3cedeca11ed903311cdf29ca4d81fb1f216b7/glossary/v0.2.0/semantics.md) |
Inputs are YAML or JSON, with media types `application/yaml`,
`application/x-yaml`, or `application/json`. JSON must use JSON syntax.
Both serializations pass through ConfigKit's native mapping load and are
validated as complete documents, including unselected collections. See the
pinned [ConfigKit native contract](https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/config.md)
for loading, dynamic numeric binding, limits, and reserved controls such as
`extends` and source-root `config`. Notarius adds exact per-collection entry-ID
uniqueness and task-specific suitability checks; ordinary extensions remain
data, not instructions.
## Task Views
Each binding selects collections independently. General glossary context defaults
to the available `campaign` and `setting` collections; a bound
`spell_catalog` defaults to `spells`, which must exist. Explicit selections
must exist, may be empty, and compare names exactly. Empty valid selections or
collections contribute no added vocabulary. No binding is required merely
because another is present. The same file can serve both roles.
Party context includes names, aliases, optional player relationships and
classes/levels, without exposing roster IDs to the model. Distinct roster
entries remain distinct even when names match. `party` takes presentation
precedence over `roster`; both supplied documents are validated.
`players` remains optional supplemental text. No duplicate player list is
needed for relationships already in the roster.
General glossary context projects names, aliases, categories, descriptions,
and plural forms. Spell recognition projects names and aliases only and starts
with the embedded D&D 5e 2014 SRD vocabulary. Existing canonical display
names take precedence; selected entries may augment their aliases. Conflicting
recognition keys for different spells are task errors. Collection names and
entry IDs determine deterministic traversal; IDs, provenance, and irrelevant
extensions are not promoted to model instructions or transcript evidence.
## Migration
Replace plain-text `party` or `roster` files with the shared party envelope
and move character/player relationships into roster entries. Replace text
`glossary` files and the private `notarius.dnd.spell-catalog-overlay.v1`
envelope with shared glossary entries under named collections. Map old spell
names and aliases directly to entries; old ruleset metadata is not required,
and source information may be optional collection provenance. Aliases may be
omitted, null, or empty. Add `collections` on an external binding only when
the slot defaults are not appropriate. Existing slot names and CLI selectors
remain unchanged. There is no legacy reader or automatic conversion.
Run and explicit preflight validate supplied documents during preparation,
before domain inference; offline pipeline validation does not read reference
files. See [CLI preflight](../cli.md#preflight) for its readiness scope.