Versioning
OpenTide separates **structural schema revisions** from **object instance versions**. Schema revisions select the validation model and generated JSON Schema artifact; instance versions track business content evolution in git.
Requirements
- Every Tide object MUST declare
metadata.schemaas a registered schema identifier ({family}::{major}.{minor}). - Every Tide object MUST declare
metadata.versionas a business version (semver string or integer). - Consumers MUST NOT use
metadata.versionto select a JSON Schema file. - Multiple schema revisions for the same family MAY coexist in a workspace (e.g.
rule::1.0andrule::1.1). - Breaking structural changes MUST introduce a new schema identifier and a new spec file version in this repository.
- Git history is the authoritative record of instance content changes; no
revisions.jsonindexer is required.
Definition
Schema identifier
| Component | Format | Example |
|---|---|---|
| Family | lowercase object type | rule, threat, objective |
| Revision | {major}.{minor} | 1.0 |
| Full identifier | {family}::{major}.{minor} | rule::1.0 |
Artifact naming
| Artifact | Path pattern | Example |
|---|---|---|
| JSON Schema | .opentide/schemas/{family}.{major}.{minor}.schema.json | rule.1.0.schema.json |
| YAML template | .opentide/templates/{family}.{major}.{minor}.template.yaml | rule.1.0.template.yaml |
| IDE router | .opentide/schemas/opentide.schema.json | routes objects/**/*.yaml by metadata.schema |
Runtime routing
An implementation MUST route objects to validation by their declared identifier:
- Resolve — read
metadata.schemaand select the validation model registered for that identifier. - Migrate (optional) — an object MAY be migrated from an older revision to a newer one before validation.
- Validate — check the object against the model for its declared identifier.
- Index — expose the generated
.opentide/schemas/*.schema.jsonartifacts keyed by identifier.
Each per-revision JSON Schema MUST pin metadata.schema as a const so editors and the router can discriminate objects by revision.
Multi-version coexistence
Schema revisions are additive; two revisions of a family MAY be active in one workspace at once. When a new revision such as rule::1.1 ships:
- A new validation model is registered for
rule::1.1alongside the existingrule::1.0. - A migration path from
rule::1.0torule::1.1MAY be provided by the implementation. opentide generate schemasemits both artifacts, and the IDE router adds a branch per identifier.- Objects opt in individually by setting
metadata.schema; objects still declaringrule::1.0continue to validate against1.0until migrated.
A schema upgrade therefore MUST NOT require a repository-wide migration in a single step.
Relationships
- metadata.md — defines
metadata.schemaandmetadata.versionfields - workspace.md — paths for schemas, templates, and object directories
- Object specs under
objects/— one spec per active schema revision
Defaults & overrides
Path defaults are configured in bundled paths.toml; clients MAY override via configuration.md. Schema artifacts under .opentide/schemas/ MUST NOT be hand-edited.
Examples
- Valid rule declaring
schema: rule::1.0: fixtures/valid/rule-1.0.yaml - Invalid unknown schema: fixtures/invalid/rule-unknown-schema.yaml
History
| Version | Date | Notes |
|---|---|---|
| 1.0 | 2026-06-25 | Initial spec bootstrapped from opentide SCHEMA_REVISION.md |