Separate CalVer distributions from immutable schema versions
This commit is contained in:
@@ -1,57 +1,78 @@
|
||||
# Compatibility
|
||||
|
||||
The initial candidate is the `v1.0.0` schema set. Publication status is established
|
||||
by the immutable upstream tag, not by this candidate's `VERSION` file. Contracts
|
||||
jointly comprise their JSON Schemas and semantic documents.
|
||||
Contracts comprise their versioned JSON Schema and adjacent semantic document.
|
||||
The initial candidates are glossary, RPG party, and RPG campaign at `0.1.0`.
|
||||
No published shared-schema release is assumed.
|
||||
|
||||
## Version identities
|
||||
## Independent identities
|
||||
|
||||
Schema-set releases use Semantic Versioning and ship together. Contract markers
|
||||
`maximumdirect.rpg.party.v1`, `maximumdirect.rpg.campaign.v1`, and
|
||||
`maximumdirect.glossary.v1` identify major domain contracts. A compatible schema
|
||||
release does not require editing operator document headers.
|
||||
- Repository distribution: CalVer `YYYY.MM.MICRO`, with UTC year, zero-padded
|
||||
month, and a publication counter starting at zero each month. The counter
|
||||
conveys no compatibility guarantee.
|
||||
- Schema version: full SemVer, independently selected per schema, represented
|
||||
by its `v<version>/` directory.
|
||||
- Document generation: `maximumdirect.glossary.v1`,
|
||||
`maximumdirect.rpg.party.v1`, or `maximumdirect.rpg.campaign.v1`.
|
||||
- Canonical schema identity: `https://schemas.maximumdirect.net/` plus the exact
|
||||
repository-relative schema path. It stays unchanged across repository snapshots.
|
||||
|
||||
- Major: incompatible structure, validation, or meaning.
|
||||
- Minor: compatible additions that preserve interpretation of existing data.
|
||||
- Patch: compatible corrections. A tighter validation rule that rejects previously
|
||||
valid documents is not automatically a patch fix.
|
||||
A compatible schema update retains its document marker. Incompatible structure
|
||||
or meaning changes the affected marker, including during pre-stable development.
|
||||
Independent stable schemas use SemVer: major for incompatibility, minor for
|
||||
compatible additions, patch for compatible corrections. Pre-stable versions
|
||||
express developing maturity; `1.0.0` is selected when adoption establishes a
|
||||
stable contract. Document generation is not derived from schema or Go module major.
|
||||
|
||||
Each release pins absolute `$id` values to its immutable raw tag URLs. These are
|
||||
schema resource identities, distinct from the operator's contract marker.
|
||||
Vocabulary, schema-set, and consumer application versions evolve independently.
|
||||
## Published contracts
|
||||
|
||||
## Both directions matter
|
||||
Published version directories, including semantics and examples, remain available
|
||||
byte-for-byte. A change requires a new schema version. Retain old records in
|
||||
[catalog.json](../catalog.json). Later CalVer snapshots may add versions without
|
||||
changing unrelated schemas. Exact publication dates belong in release notes.
|
||||
|
||||
A new consumer should accept old documents within its claimed major contract.
|
||||
An older consumer can accept and preserve new optional extension fields without
|
||||
claiming their meaning. Additional fields are compatible only when ignoring
|
||||
them preserves interpretation of the known data. A field changing that
|
||||
interpretation needs a new major contract or an explicitly selected extension
|
||||
contract with its own documented semantics.
|
||||
Hosting exposes raw repository files directly from `main`, including candidates.
|
||||
Only published tags and their inventories establish released versions. A source
|
||||
release completes at successful upstream publication; live URL inspection is
|
||||
optional delivery verification. Hosting selection and consumer adoption are
|
||||
independent of source publication.
|
||||
|
||||
Consumers forwarding or republishing shared documents should preserve extensions;
|
||||
task-specific projections may omit them. Extensions cannot redefine a standard
|
||||
field. Consumers can require additional data for a task without claiming that
|
||||
every shared document must contain it.
|
||||
## Consumer selection and compatibility
|
||||
|
||||
Contract changes include a compatibility assessment, updated schema and semantics,
|
||||
examples and focused fixtures, and migration guidance for incompatible changes.
|
||||
Retain representative valid documents from supported releases in `tests/valid/`
|
||||
as compatibility evidence. A schema diff alone does not detect changed meanings.
|
||||
The initial release has no earlier shared-schema releases to compare against.
|
||||
Select a published CalVer archive and exact `name@version` entries from its
|
||||
[catalog](catalog.md). For example, select `glossary@0.1.0` from `2026.11.0`
|
||||
after that distribution is published. Bundle `glossary/v0.1.0/` with its schema,
|
||||
semantic document, and any exact-version dependency directories referenced by
|
||||
the schema. Register canonical IDs against bundled files for offline resolution.
|
||||
No Go module dependency is required.
|
||||
|
||||
For an update, review that schema's compatibility and migration notes, replace
|
||||
the selected bundled directories, test application behavior, and commit the
|
||||
selected schema versions and source distribution. Unrelated schema updates can
|
||||
be ignored. Migration is explicit, with no automatic conversion or legacy reader.
|
||||
|
||||
A new consumer reads supported older documents. An older consumer may preserve
|
||||
new optional extensions without interpreting them. Additions are compatible only
|
||||
when ignoring them preserves known meanings; otherwise select a new contract
|
||||
generation or an explicitly selected extension contract. Forwarded documents
|
||||
preserve extensions; task-specific projections may omit them. Consumers may
|
||||
require more data for a particular operation than schema conformance requires.
|
||||
|
||||
Each contract change includes compatibility assessment, updated semantics,
|
||||
examples and focused fixtures, and migration guidance where needed. Retain valid
|
||||
supported-release fixtures as evidence. Schema diffs alone cannot establish
|
||||
unchanged meaning.
|
||||
|
||||
## Existing consumers
|
||||
|
||||
No existing application is declared compatible by this repository's initial
|
||||
release. Adoption requires explicit implementation and verification.
|
||||
No current application is declared compatible by this repository's readiness.
|
||||
|
||||
| Consumer | Current gap / later adoption responsibility |
|
||||
| Consumer | Later adoption responsibility |
|
||||
| --- | --- |
|
||||
| Narratio | Uses `narratio.party.v1`, stricter roster requirements, and the wrapperless glossary schema. Separate shared domain documents from operational campaign configuration and adopt the shared marker, alias spelling, and extension semantics. |
|
||||
| Audita v4.2.0 | Runtime glossary input is wrapperless and can contain task instructions. Adopt the shared envelope and obtain instructions through application configuration. |
|
||||
| Notarius v0.9.0 | Spell recognition consumes a strict JSON overlay with separate catalog and ruleset semantics. Reconcile its embedded catalog, merges, and ambiguity rules with shared spell entries and provenance; recognize names and aliases without asking operators to duplicate the source vocabulary. |
|
||||
| Scriptorium prompts | Adopt shared party and glossary structures in the prompt input contracts that need them; no generic application compatibility is implied. |
|
||||
| Reference catalog | Retains a wrapperless glossary and partial authoring format. Adopt shared completed envelopes while leaving composition to ConfigKit and vocabulary distribution independent. |
|
||||
| Narratio | Adopt the RPG party marker, plural aliases, optional attributes, and shared glossary envelope; separate campaign context from operational configuration. |
|
||||
| Audita v4.2.0 | Adopt the glossary envelope and obtain task instructions from application configuration. |
|
||||
| Notarius v0.9.0 | Reconcile shared spell entries and provenance with embedded vocabulary, recognition, merges, and ambiguity policy. |
|
||||
| Scriptorium prompts | Adopt the shared structures required by individual prompt input contracts. |
|
||||
| Reference catalog | Adopt shared completed envelopes while leaving composition to ConfigKit and vocabulary releases independent. |
|
||||
|
||||
The [inventory](inventory.md) identifies source baselines and the deliberate
|
||||
differences. Consumer release order and conversion code belong to later work.
|
||||
[Inventory](inventory.md) records the source baselines and deliberate differences.
|
||||
Consumer adoption order and implementation remain separate work.
|
||||
|
||||
@@ -25,17 +25,20 @@ original checkout so missing files and accidental outside references are caught.
|
||||
|
||||
## Layout and changes
|
||||
|
||||
- `schemas/`: language-neutral Draft 2020-12 contracts.
|
||||
- `docs/{party,campaign,glossary}.md`: field meanings and semantic rules.
|
||||
- `examples/`: complete authoring examples, including equivalent YAML and JSON.
|
||||
- `glossary/v<version>/` and `rpg/{party,campaign}/v<version>/`: independent
|
||||
schemas, adjacent `semantics.md`, and complete `examples/`.
|
||||
- `catalog.json`: exact schema-version inventory; see [catalog format](catalog.md).
|
||||
- `tests/valid/`: valid compatibility fixtures.
|
||||
- `tests/invalid/`: focused invalid documents; prefixes identify failure phase.
|
||||
- `internal/validation/`: local YAML profile, schema registration, semantic check.
|
||||
- `cmd/validate/`: developer CLI; no application SDK or configuration loader.
|
||||
- `cmd/validate/`: exact-version developer CLI; no consumer SDK.
|
||||
- `internal/publication/` and `cmd/check-published/`: separate Git history checks
|
||||
used only in explicitly requested release preparation.
|
||||
|
||||
Implement a contract change in its schema, semantics, and relevant examples and
|
||||
fixtures together. Test observable acceptance and rejection, extension retention,
|
||||
and semantic boundaries. Avoid duplicating the upstream libraries' own suites.
|
||||
Published version directories are immutable; additions use a new version.
|
||||
New standard fields need a compatibility assessment. Routine editing does not
|
||||
publish a release or upgrade any consumer.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## Narratio reference catalog
|
||||
|
||||
Material: `schemas/glossary.schema.json`, adapted from the catalog's glossary-v1
|
||||
Material: `glossary/v0.1.0/schema.json`, adapted from the catalog's glossary-v1
|
||||
schema at `a1a87edafd59a1de545a1c0b4efe5feeb80348e0`. The unmodified source is
|
||||
retained in `docs/origins/reference-catalog-glossary-v1.schema.json`. The shared
|
||||
envelope, defined fields, provenance, and structural extension behavior were changed.
|
||||
|
||||
131
docs/release.md
131
docs/release.md
@@ -1,85 +1,78 @@
|
||||
# Release procedure
|
||||
|
||||
This is a source-only schema distribution. The authoritative remote is `origin`
|
||||
at `ssh://git@forge.maximumdirect.net:22222/eric/schemas.git`, branch `main`.
|
||||
Publication requires an explicit release request. Implementing the repository
|
||||
does not publish the initial candidate.
|
||||
This repository publishes source-only CalVer distributions. The authoritative
|
||||
remote is `origin`, `ssh://git@forge.maximumdirect.net:22222/eric/schemas.git`;
|
||||
the release branch is `main`. Publication requires an explicit release request.
|
||||
ReleaseKit adoption is deferred.
|
||||
|
||||
## Prepare the candidate
|
||||
## Prepare
|
||||
|
||||
1. Select a fresh Semantic Versioning tag under the [compatibility rules](compatibility.md).
|
||||
2. Update `VERSION`, each schema's raw-tag `$id`, release-specific README examples,
|
||||
and references between schemas to that version. Contract markers change only
|
||||
when their major domain contract changes.
|
||||
3. Write `docs/releases/<version>.md` with the changes, compatibility assessment,
|
||||
and migration instructions where needed. Include links to COPYRIGHT, LICENSE,
|
||||
and ATTRIBUTION at the intended immutable tag. The initial candidate note is
|
||||
[v1.0.0](releases/v1.0.0.md).
|
||||
4. Prepare Go 1.27.4 and `go mod download`. Commit the intended source with a
|
||||
short descriptive message. Review the diff for unintended data or credentials.
|
||||
Select a fresh `YYYY.MM.MICRO` tag using the UTC publication year and month,
|
||||
with a counter starting at zero each month. Check existing authoritative tags;
|
||||
the current candidate `2026.11.0` reserves no date or counter. Re-evaluate it
|
||||
when publication is requested.
|
||||
|
||||
Run `sh scripts/check.sh` on that committed candidate. It performs the same checks
|
||||
as CI, including offline compilation and validation from the unpacked tagged-source
|
||||
archive format. Validation dependencies are prepared separately; tests need no
|
||||
network, consumer applications, provider credentials, or LLM calls.
|
||||
Update `VERSION` and `docs/releases/<version>.md`. Record the exact UTC
|
||||
publication date in that note during actual release preparation. Identify changed
|
||||
schema versions and compatibility/migration information. Unchanged schema
|
||||
directories, IDs, and markers stay unchanged. A schema change gets a new
|
||||
independent version and inventory record under [compatibility](compatibility.md).
|
||||
Keep all published version directories and records.
|
||||
|
||||
## Distribution
|
||||
Prepare Go 1.27.4 and `go mod download`. Review and commit the intended source.
|
||||
Run `GOTOOLCHAIN=go1.27.4 sh scripts/check.sh` for that exact candidate.
|
||||
The command validates locally and from an unpacked committed source archive.
|
||||
Prepare dependencies separately; normal tests are offline.
|
||||
|
||||
The forge's immutable tagged source archive is the distribution:
|
||||
## Publication guards
|
||||
|
||||
```text
|
||||
https://forge.maximumdirect.net/eric/schemas/archive/v1.0.0.tar.gz
|
||||
Before creating a tag:
|
||||
|
||||
1. Confirm a clean worktree and index on `main`, with HEAD unchanged since
|
||||
validation, and a version-matched release note.
|
||||
2. Fetch authoritative branch and tag state: `git fetch origin main --tags`.
|
||||
3. Confirm `git merge-base --is-ancestor origin/main HEAD` succeeds.
|
||||
4. Confirm the chosen tag is absent locally and on origin using
|
||||
`git tag --list 2026.11.0` and
|
||||
`git ls-remote --tags origin refs/tags/2026.11.0`. Stop if either lists it.
|
||||
5. Run `GOTOOLCHAIN=go1.27.4 go run ./cmd/check-published -remote origin`.
|
||||
It reads authoritative CalVer tags, verifies fetched tag identities, and
|
||||
compares their inventories and every retained directory file against HEAD.
|
||||
Additions outside those directories are allowed. The initial release has
|
||||
no published baseline. This history/network check is separate from offline
|
||||
archive checks.
|
||||
|
||||
For the example version, after every guard passes:
|
||||
|
||||
```sh
|
||||
git tag -a 2026.11.0 -F docs/releases/2026.11.0.md
|
||||
git push --atomic origin HEAD:refs/heads/main refs/tags/2026.11.0
|
||||
```
|
||||
|
||||
It contains the complete schema directory, semantic documentation, examples,
|
||||
license and attribution, release note, and pinned optional Go harness and fixtures.
|
||||
A consumer can bundle the schemas and semantic documents, register each `$id`
|
||||
against its local file, and resolve all references offline. The harness is not a
|
||||
runtime dependency. No binaries or separate registry are published.
|
||||
Publish only those refs. Publication completes when the push succeeds; CI,
|
||||
consumer installs, and live website tests are not completion gates. On an
|
||||
ambiguous result inspect the exact remote branch and tag before retrying.
|
||||
Published tags and contents are immutable; corrections use a new version.
|
||||
|
||||
To inspect the candidate distribution locally before publication:
|
||||
## Source distribution and hosting
|
||||
|
||||
The forge supplies the immutable archive, for example after publication:
|
||||
`https://forge.maximumdirect.net/eric/schemas/archive/2026.11.0.tar.gz`.
|
||||
It includes the catalog, complete versioned contracts with semantics/examples,
|
||||
license/attribution, and optional pinned Go tools and fixtures.
|
||||
|
||||
A local preview of the validated committed candidate is:
|
||||
|
||||
```sh
|
||||
mkdir -p dist
|
||||
git archive --format=tar.gz --prefix=schemas-v1.0.0/ \
|
||||
--output=dist/schemas-v1.0.0.tar.gz HEAD
|
||||
git archive --format=tar.gz --prefix=schemas-2026.11.0/ \
|
||||
--output=dist/schemas-2026.11.0.tar.gz HEAD
|
||||
```
|
||||
|
||||
Individual schema/editor URLs use the raw tag route, for example:
|
||||
|
||||
```text
|
||||
https://forge.maximumdirect.net/eric/schemas/raw/tag/v1.0.0/schemas/glossary.schema.json
|
||||
```
|
||||
|
||||
The forge's raw-commit route was checked against the initial repository revision;
|
||||
the public raw-tag JSON route was checked against a released sibling JSON document.
|
||||
The exact URLs above become available only after this tag is published. Optional
|
||||
post-publication inspection can use `curl --fail` on them and decode the response
|
||||
as JSON, not an HTML forge page. It does not delay source-release completion.
|
||||
|
||||
## Publish when requested
|
||||
|
||||
Start from a clean `main` whose HEAD is the validated candidate. Fetch `origin`
|
||||
and verify that advancing `origin/main` to HEAD is fast-forward. Check that the
|
||||
selected tag is absent locally and on `origin`. Publish only the intended branch
|
||||
and fresh annotated tag. For the initial candidate:
|
||||
|
||||
```sh
|
||||
git fetch origin main --tags
|
||||
git merge-base --is-ancestor origin/main HEAD
|
||||
git status --short
|
||||
git tag --list v1.0.0
|
||||
git ls-remote --tags origin refs/tags/v1.0.0
|
||||
git tag -a v1.0.0 -F docs/releases/v1.0.0.md
|
||||
git push --atomic origin HEAD:refs/heads/main refs/tags/v1.0.0
|
||||
```
|
||||
|
||||
The status and tag checks must be empty before creating the tag. Stop if the
|
||||
branch is not `main`, the candidate changed, the worktree is dirty, the version
|
||||
is already used, or validation failed. Publication completes when the push
|
||||
succeeds; do not wait for CI. The forge supplies the tagged source archive.
|
||||
|
||||
Published tags and contents are immutable. A defect is corrected in a new
|
||||
version. On an ambiguous push result, inspect the exact upstream branch and tag
|
||||
before reporting success or retrying. Preserve already-published tags. Routine
|
||||
releases do not require installed-consumer checks or a new external approval gate.
|
||||
Hosting serves raw repository paths from `main` without a release selector.
|
||||
For example, glossary's canonical ID and hosted path are
|
||||
`https://schemas.maximumdirect.net/glossary/v0.1.0/schema.json`.
|
||||
Candidates may be visible before publication. Tags and their catalogs establish
|
||||
release status. Local static-serving tests verify path/byte correspondence;
|
||||
optional inspection of live URLs after publication verifies delivery.
|
||||
Hosting provisioning and backend changes remain separately maintained.
|
||||
|
||||
20
docs/releases/2026.11.0.md
Normal file
20
docs/releases/2026.11.0.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Maximum Direct shared schemas 2026.11.0
|
||||
|
||||
Unpublished candidate. Select the actual UTC publication date and CalVer counter
|
||||
when a release is explicitly requested.
|
||||
|
||||
## Initial schema versions
|
||||
|
||||
- `glossary@0.1.0`: `maximumdirect.glossary.v1`.
|
||||
- `rpg/party@0.1.0`: `maximumdirect.rpg.party.v1`.
|
||||
- `rpg/campaign@0.1.0`: `maximumdirect.rpg.campaign.v1`.
|
||||
|
||||
Versioned contracts contain schemas, semantics, and synthetic examples. The catalog
|
||||
identifies exact versions for offline selection. Distribution dates, schema
|
||||
SemVer, document generations, and canonical IDs are independent.
|
||||
|
||||
This replaces the unpublished flat candidate layout and party/campaign markers.
|
||||
Existing applications require separately planned adoption; no conversion shims
|
||||
or application compatibility claims are supplied. See [compatibility](../compatibility.md).
|
||||
|
||||
[COPYRIGHT](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.0/COPYRIGHT) | [LICENSE](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.0/LICENSE) | [ATTRIBUTION](https://forge.maximumdirect.net/eric/schemas/src/tag/2026.11.0/docs/oss/attribution.md)
|
||||
@@ -1,18 +0,0 @@
|
||||
# Maximum Direct shared schemas v1.0.0
|
||||
|
||||
Initial shared party, campaign, and general glossary contracts, identified by
|
||||
`maximumdirect.rpg.party.v1`, `maximumdirect.rpg.campaign.v1`, and
|
||||
`maximumdirect.glossary.v1`.
|
||||
|
||||
The distribution includes Draft 2020-12 schemas, semantic documentation,
|
||||
synthetic YAML/JSON examples, compatibility rules, and an optional offline Go
|
||||
validation harness. Objects support extensions; semantic validation checks
|
||||
glossary entry IDs within collections. Glossaries use a versioned envelope and
|
||||
keep task instructions in consumer configuration.
|
||||
|
||||
This is a new independent contract set. Existing Narratio, Audita, Notarius,
|
||||
Scriptorium prompt, and reference catalog formats require separately planned
|
||||
adoption. See [compatibility](../compatibility.md#existing-consumers) for the
|
||||
initial differences. There is no earlier shared release to migrate.
|
||||
|
||||
[COPYRIGHT](https://forge.maximumdirect.net/eric/schemas/src/tag/v1.0.0/COPYRIGHT) | [LICENSE](https://forge.maximumdirect.net/eric/schemas/src/tag/v1.0.0/LICENSE) | [ATTRIBUTION](https://forge.maximumdirect.net/eric/schemas/src/tag/v1.0.0/docs/oss/attribution.md)
|
||||
@@ -12,7 +12,8 @@ source archive:
|
||||
|
||||
```sh
|
||||
go mod download
|
||||
go run ./cmd/validate examples/party.yml examples/campaign.yml examples/glossary.yml
|
||||
go run ./cmd/validate -schema rpg/party@0.1.0 rpg/party/v0.1.0/examples/party.yml
|
||||
go run ./cmd/validate -schema glossary@0.1.0 glossary/v0.1.0/examples/weather.yml
|
||||
```
|
||||
|
||||
Dependencies are pinned in `go.mod` and `go.sum`. Once prepared, validation is
|
||||
@@ -20,12 +21,15 @@ offline. A built tool can select another unpacked distribution:
|
||||
|
||||
```sh
|
||||
go build -o /tmp/schemas-validate ./cmd/validate
|
||||
/tmp/schemas-validate -root /path/to/schemas-v1.0.0 /path/to/completed-glossary.yml
|
||||
/tmp/schemas-validate -root /path/to/distribution -schema glossary@0.1.0 /path/to/completed-glossary.yml
|
||||
```
|
||||
|
||||
Select exactly `name@version` from [catalog.json](../catalog.json). All supplied
|
||||
documents are validated against that definition, including their document marker.
|
||||
Separate invocations select different schemas. Success reports the selected version.
|
||||
Flags precede filenames. All files are checked even if an earlier file fails.
|
||||
Exit 0 means all documents passed; 1 means a document could not be read or
|
||||
validated; 2 means invalid command usage or an unusable schema set. Errors identify
|
||||
validated; 2 means invalid command usage, missing/unknown selection, or an unusable distribution. Errors identify
|
||||
the document and distinguish `decode`, `structure`, and `semantic`. Decoding
|
||||
errors include field paths and source positions where the YAML library or node
|
||||
profile provides them. Structural errors include JSON instance locations.
|
||||
@@ -93,14 +97,15 @@ can use the document for a particular operation.
|
||||
|
||||
## Offline schema use and editors
|
||||
|
||||
Every schema declares Draft 2020-12 and an immutable release `$id`. The harness
|
||||
Every schema declares Draft 2020-12 and an exact versioned canonical `$id`. The harness
|
||||
registers the bundled schemas under those IDs before compiling them and rejects
|
||||
unresolved resource loads. The schema engine supplies the standard meta-schema;
|
||||
ordinary validation performs no network requests.
|
||||
|
||||
Other validators can likewise register local files under their `$id` values.
|
||||
Keep the complete schema directory from one release together. Configure editors
|
||||
externally to associate document paths with a local schema or its immutable raw
|
||||
Bundle the selected version directories and their exact referenced dependencies
|
||||
from one selected CalVer snapshot, with their adjacent semantic documents. Configure editors
|
||||
externally to associate document paths with a local schema or its canonical versioned
|
||||
URL. Operator documents use `schema_version`; they do not need a `$schema` field.
|
||||
Schema validation supplies editor feedback for known fields. Optional tooling
|
||||
can warn about likely misspellings without rejecting extensions.
|
||||
|
||||
Reference in New Issue
Block a user