Add ConfigKit aligned schema versions without changing published contracts
This commit is contained in:
9
rpg/campaign/v0.2.0/examples/campaign.yml
Normal file
9
rpg/campaign/v0.2.0/examples/campaign.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
schema_version: maximumdirect.rpg.campaign.v1
|
||||
id: lantern-coast
|
||||
name: Lantern Coast Expedition
|
||||
description: A synthetic coastal exploration campaign.
|
||||
setting: Lantern Coast
|
||||
system: Sample Fantasy
|
||||
references:
|
||||
party: ../../../party/v0.2.0/examples/party.yml
|
||||
glossaries: [../../../../glossary/v0.2.0/examples/glossary.yml]
|
||||
23
rpg/campaign/v0.2.0/schema.json
Normal file
23
rpg/campaign/v0.2.0/schema.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://schemas.maximumdirect.net/rpg/campaign/v0.2.0/schema.json",
|
||||
"title": "MAXIMUMDIRECT RPG Campaign v1",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "id"],
|
||||
"properties": {
|
||||
"schema_version": {"const": "maximumdirect.rpg.campaign.v1"},
|
||||
"id": {"$ref": "#/$defs/text"},
|
||||
"name": {"$ref": "#/$defs/text"},
|
||||
"description": {"type": "string"},
|
||||
"setting": {"$ref": "#/$defs/text"},
|
||||
"system": {"$ref": "#/$defs/text"},
|
||||
"references": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"party": {"$ref": "#/$defs/text"},
|
||||
"glossaries": {"type": "array", "items": {"$ref": "#/$defs/text"}}
|
||||
}
|
||||
}
|
||||
},
|
||||
"$defs": {"text": {"type": "string", "minLength": 1}}
|
||||
}
|
||||
52
rpg/campaign/v0.2.0/semantics.md
Normal file
52
rpg/campaign/v0.2.0/semantics.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# Campaign contract
|
||||
|
||||
## Native loading boundary
|
||||
|
||||
Full conformance includes acquisition through the public mapping-root handoff of
|
||||
[ConfigKit v1.4.0](https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/config.md),
|
||||
followed by this schema and its semantic checks. ConfigKit owns syntax, structural
|
||||
controls, numeric binding, and resource limits, including its 8 MiB source limit.
|
||||
Dynamic integers bind as int64 and fractional/exponent values as finite float64;
|
||||
authored decimal precision is not guaranteed. Preserve supported resolved values.
|
||||
`extends` is structural input and source-root `config` is a control namespace;
|
||||
nested ordinary `config` follows upstream rules. Other supported domain extensions
|
||||
remain permitted. Schema validation adds no trimming, case folding, or defaults.
|
||||
Structural validation alone does not prove native loading compatibility. The
|
||||
pinned upstream contract defines this version's boundary independently of later
|
||||
changes to the repository's general guidance.
|
||||
|
||||
Contract: `maximumdirect.rpg.campaign.v1`. [Schema](schema.json).
|
||||
The [validation profile](../../../docs/validation.md) and [compatibility rules](../../../docs/compatibility.md)
|
||||
apply. See the [example](examples/campaign.yml).
|
||||
|
||||
| Field | Required | Meaning |
|
||||
| --- | --- | --- |
|
||||
| `schema_version` | Yes | Exactly `maximumdirect.rpg.campaign.v1`. |
|
||||
| `id` | Yes | Nonempty stable campaign identity, independent of its display name. |
|
||||
| `name` | No | Nonempty campaign display name. |
|
||||
| `description` | No | Free text campaign context; an empty string is valid. |
|
||||
| `setting` | No | Nonempty domain setting label or identifier. |
|
||||
| `system` | No | Nonempty game-system label or identifier. |
|
||||
| `references` | No | Relationships to domain documents. |
|
||||
| `references.party` | No | Nonempty locator for a party document. |
|
||||
| `references.glossaries` | No | List of nonempty locators for glossary documents; may be empty. |
|
||||
|
||||
Optional fields accept omission, not null. An empty `references` object is
|
||||
valid. Objects allow additional fields. IDs, labels, and locator strings are
|
||||
preserved as supported resolved values without domain normalization. The issuer supplies the identity's namespace;
|
||||
this contract does not require globally unique campaign IDs.
|
||||
|
||||
References are locator strings, including URI references and relative file
|
||||
references. Consumers select supported locator forms and resolve relative
|
||||
references against the domain document's location (or a base
|
||||
provided with an in-memory document). Resolving authored configuration paths
|
||||
before this boundary remains the composing application's responsibility.
|
||||
References express relationships; the harness neither fetches them nor requires
|
||||
local installation. List order does not prescribe merge order, precedence, or
|
||||
execution. Those belong to the consuming application.
|
||||
|
||||
This document records shared context. Narratio's `campaign.yml` remains
|
||||
application configuration with its own operational fields. Session templates,
|
||||
speaker-file choices, execution paths, provider policy, and credentials are
|
||||
outside the defined shared campaign fields. Additional fields gain no execution
|
||||
or credential semantics through schema conformance.
|
||||
15
rpg/party/v0.2.0/examples/party.yml
Normal file
15
rpg/party/v0.2.0/examples/party.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
schema_version: maximumdirect.rpg.party.v1
|
||||
characters:
|
||||
mira:
|
||||
player:
|
||||
name: Rowan
|
||||
character:
|
||||
name: Mira Vale
|
||||
aliases: [Mira, The Lantern]
|
||||
classes:
|
||||
- name: ranger
|
||||
level: 3
|
||||
homeland: Lantern Coast
|
||||
guide-npc:
|
||||
character:
|
||||
name: Tavi
|
||||
51
rpg/party/v0.2.0/schema.json
Normal file
51
rpg/party/v0.2.0/schema.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://schemas.maximumdirect.net/rpg/party/v0.2.0/schema.json",
|
||||
"title": "MAXIMUMDIRECT RPG Party v1",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "characters"],
|
||||
"properties": {
|
||||
"schema_version": {"const": "maximumdirect.rpg.party.v1"},
|
||||
"characters": {
|
||||
"type": "object",
|
||||
"propertyNames": {"minLength": 1},
|
||||
"additionalProperties": {"$ref": "#/$defs/rosterEntry"}
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"text": {"type": "string", "minLength": 1},
|
||||
"rosterEntry": {
|
||||
"type": "object",
|
||||
"required": ["character"],
|
||||
"properties": {
|
||||
"player": {
|
||||
"type": "object",
|
||||
"required": ["name"],
|
||||
"properties": {"name": {"$ref": "#/$defs/text"}}
|
||||
},
|
||||
"character": {
|
||||
"type": "object",
|
||||
"required": ["name"],
|
||||
"properties": {
|
||||
"name": {"$ref": "#/$defs/text"},
|
||||
"aliases": {
|
||||
"type": ["array", "null"],
|
||||
"items": {"$ref": "#/$defs/text"}
|
||||
},
|
||||
"classes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["name"],
|
||||
"properties": {
|
||||
"name": {"$ref": "#/$defs/text"},
|
||||
"level": {"type": "integer", "minimum": 1, "maximum": 9223372036854775807}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
54
rpg/party/v0.2.0/semantics.md
Normal file
54
rpg/party/v0.2.0/semantics.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Party contract
|
||||
|
||||
## Native loading boundary
|
||||
|
||||
Full conformance includes acquisition through the public mapping-root handoff of
|
||||
[ConfigKit v1.4.0](https://forge.maximumdirect.net/base-layer/configkit/src/commit/4a7ae664a6287d71cba20f59c7c5b37b6f05b0a3/docs/config.md),
|
||||
followed by this schema and its semantic checks. ConfigKit owns syntax, structural
|
||||
controls, numeric binding, and resource limits, including its 8 MiB source limit.
|
||||
Dynamic integers bind as int64 and fractional/exponent values as finite float64;
|
||||
authored decimal precision is not guaranteed. Preserve supported resolved values.
|
||||
`extends` is structural input and source-root `config` is a control namespace;
|
||||
nested ordinary `config` follows upstream rules. Other supported domain extensions
|
||||
remain permitted. Schema validation adds no trimming, case folding, or defaults.
|
||||
Structural validation alone does not prove native loading compatibility. The
|
||||
pinned upstream contract defines this version's boundary independently of later
|
||||
changes to the repository's general guidance.
|
||||
|
||||
Contract: `maximumdirect.rpg.party.v1`. [Schema](schema.json).
|
||||
The [validation profile](../../../docs/validation.md) and [compatibility rules](../../../docs/compatibility.md)
|
||||
apply. See the [example](examples/party.yml).
|
||||
|
||||
| Field | Required | Meaning |
|
||||
| --- | --- | --- |
|
||||
| `schema_version` | Yes | Exactly `maximumdirect.rpg.party.v1`. |
|
||||
| `characters` | Yes | Mapping from stable character IDs to roster entries; an empty mapping is valid. |
|
||||
| `characters.<id>.character` | Yes | Character information. |
|
||||
| `character.name` | Yes | Nonempty canonical display name. |
|
||||
| `character.aliases` | No | Alternative names for the same character; omission, null, an empty list, or a list of nonempty strings. |
|
||||
| `character.classes` | No | List of class objects, possibly empty. Each has a nonempty `name` and optional integer `level` from 1 through 9223372036854775807 after native binding. |
|
||||
| `characters.<id>.player` | No | Player relationship. When present, an object with a required nonempty `name`. Multiple characters may have the same player. |
|
||||
|
||||
IDs are nonempty strings scoped to this party, independent of display names and
|
||||
application artifact names. They remain stable when a display name changes.
|
||||
Player names are display labels, not globally unique player identifiers.
|
||||
Equal character names and aliases do not establish identity; consumers decide
|
||||
how to handle ambiguity in a particular task. Supported strings are preserved in the resolved handoff.
|
||||
|
||||
Every object permits additional fields. Classes are optional domain information
|
||||
for campaigns that use them. Other character attributes may be extensions.
|
||||
Known fields have the documented type even when other fields are present.
|
||||
Optional objects and `classes` accept omission, not null. List order carries no
|
||||
additional contract meaning; mapping order never establishes character order.
|
||||
|
||||
A consumer can derive a party glossary from this roster. It uses character IDs
|
||||
as entry IDs, canonical names and aliases, and its selected domain category.
|
||||
Operators need not maintain a duplicate party vocabulary document.
|
||||
|
||||
## Differences from Narratio's existing party input
|
||||
|
||||
This contract uses a shared marker and `aliases` rather than `alias`. Player and
|
||||
class information is optional. IDs follow domain identity rather than artifact
|
||||
key syntax. Name uniqueness, class requirements, and mapping iteration order are
|
||||
consumer decisions. Narratio's existing `narratio.party.v1` format remains a
|
||||
separate released interface until adoption is implemented.
|
||||
Reference in New Issue
Block a user