Files
schemas/docs/development.md

50 lines
2.6 KiB
Markdown

# Development
Start with the [README](../README.md), [agent guidance](../AGENTS.md), and the
affected contract's schema and semantic document. [Inventory](inventory.md)
records the initial scope decisions; [compatibility](compatibility.md) owns
change classification and current consumer gaps.
Go 1.27.0 is the harness minimum. Maintained checks use the official Go 1.27.4
toolchain. Prepare the pinned dependencies with `go mod download`, then run:
```sh
go test ./...
go vet ./...
```
`go test ./...` compiles and meta-validates all schemas, validates all examples
and fixtures, checks semantic uniqueness and YAML/JSON equivalence, exercises
decoding and CLI failures, and checks that distribution content and local
documentation links are present. Tests are offline and use synthetic data.
`sh scripts/check.sh` runs those checks and verifies an unpacked `git archive`
of the committed candidate. Use it after committing when preparing a release.
CI uses the same command. It tests the source archive independently of the
original checkout so missing files and accidental outside references are caught.
## Layout and changes
- `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/`: 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.
Keep one canonical owner for each definition. Link to upstream library guides
for their features. Use original synthetic examples. Before incorporating source
material, record its origin, revision, applicable license, and modifications in
[attribution](oss/attribution.md); the repository's CC0 choice does not change
third-party terms. New code and prose here are dedicated under [CC0](../COPYRIGHT).