Consolidate D&D entity documentation

This commit is contained in:
2026-08-05 20:12:16 +00:00
parent 6de470d541
commit 2ec17f5b4f
7 changed files with 71 additions and 46 deletions

View File

@@ -14,9 +14,11 @@ inventory, balance, or ledger.
| Schema version | `v1` |
| Media type | `application/json` |
The strict root has required `occurrences`. Records require `item_id`, `name`,
`kind`, and `source_refs`; unknown fields are rejected. `quantity`, `from`, and
`to` appear only when their kind permits them.
`v1` accepts one strict JSON object with required `occurrences`; the array may
be empty. Each occurrence has required `item_id`, `name`, `kind`, and
`source_refs`, and occurrence and source-reference objects reject unknown
fields. `quantity`, `from`, and `to` appear only when their kind permits them.
An incompatible shape change requires a new schema version.
## Registry grounding
@@ -33,6 +35,10 @@ pairs.
## Wire shape
Each source reference has exactly `source_id`, `start_unit_id`, and
`end_unit_id`. It identifies an inclusive range in the current transcript;
unit IDs are positive and the start may not follow the end.
```json
{
"occurrences": [
@@ -54,7 +60,10 @@ The five kinds remain `discovered`, `acquired`, `lost`, `consumed`, and
`transferred`. Holder, quantity, currency, ordering, and exact-duplicate rules
are unchanged: discovered has no holder; acquired requires `to`; lost and
consumed require `from`; transferred requires distinct non-`party` holders.
Each source reference is an inclusive current-transcript range.
The only current downstream compatibility requirement is its registry handoff;
the normalized occurrence list is otherwise published for callers. See
[Configuration](../config.md#d-d-reference-slots) for the binding and
[JSON output](json-output.md) for publication.
See [item registry](dnd-item-registry-artifacts.md) for the grounding artifact
and [D&D module internals](../internal/dnd.md) for implementation details.