Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

Take the format to a formal specification — normative wording, conformance, versioning #2

Open

Description

@kinlane

Yes. Please do the first draft.

This issue exists so the offer, the scope, and the open questions are in public rather than in my inbox — and so anyone else who wants in has something to join.

The offer

An offer has come in from people who draft and publish specifications professionally: help take the Spectral ruleset format the last step to a formal specification, published on its own site.

The framing was sharper than mine. This is not about redoing the README or the JSON Schema — those already describe the format. It is the layer on top: normative wording, a conformance section, and the bits an independent implementation needs to be able to point at. Plus a versioning strategy along the lines of what OpenAPI does — numbered versions, a clear line between what is stable and what can still move, and references that keep working.

That is exactly the gap. I have been treating "write it down properly" as one task. It is two, and the second one is a profession I am not in.

It also matters that an offer like this tends to come from people who already depend on the format rather than from bystanders. That is not a courtesy contribution — it is a dependent user with the relevant professional skill, which is the best possible combination.

What already exists, so nobody redoes it

  • The document — the format as implemented today, documented faithfully and without extension: ruleset object, rules, given path expressions, then and functions, severity, formats, message templating, shorthands, extends, aliases, overrides, parserOptions, custom functions, extension properties. Reverse engineered from the reference implementation's five internal draft-07 meta-schemas and its guides.
  • The JSON Schema — one self-contained JSON Schema draft 2020-12 document replacing those five draft-07 meta-schemas, with the implementation's runtime hooks and validator-specific error-message extensions removed. Verified against real-world published rulesets (accepts) and a suite of malformed ones (rejects).
  • A site, as of today: https://spec.spotlight-rules.com — the document in context, plus the roadmap, the versioning proposal, and the conformance plan, each as its own page so they can be worked on independently.

Both are descriptions, not norms. Neither uses normative keywords, neither defines conformance, and the versioning policy is currently three paragraphs of intent.

The four workstreams

Listed in dependency order, because they genuinely depend on each other.

1. Normative wording

Convert the document from this is what happens to an implementation MUST do this. The mechanical part is keyword conventions applied consistently and normative requirements separated from explanatory prose. The valuable part is what it exposes: every place the current text hides an assumption instead of stating a rule is a place implementations already diverge quietly.

2. A conformance section

There is no definition of what conformance means, which is why no compatibility claim between any two engines can be adjudicated today — there is nothing to adjudicate against. Needs conformance classes (a conforming validator vs. a conforming ruleset are different obligations), a line between required behavior and permitted variation, and a way for an implementation to declare conformance that is checkable rather than promotional.

The document has a Conformance notes section recording known implementation-defined behavior. That is the seed, not the section.

3. Versioning strategy

Numbered versions, a stated stability line, references that keep working — the OpenAPI model, as suggested, precisely because the people who need to cite this format are in many cases already citing that one.

My current thinking is on the site, and the part I would most like challenged is the split between the document (a draft, will change) and the identity (a published version's URI resolves to the same bytes forever). I think conflating those two is how specifications lose the trust of people who cite them, but I have not had to defend that in a standards process.

4. A stable, citable identity

Half done today. The schema is now served from a project-controlled domain alongside the document: https://spec.spotlight-rules.com/schema/v1/spectral-ruleset.schema.json.

The other half is a known open defect: the schema's own $id still declares a raw.githubusercontent.com URL pointing at a branch — mutable by definition, on a hostname this project does not control, and not something anyone should cite in a national standard. Changing an $id is breaking for every downstream $ref, so it happens once, deliberately, early. It is deliberately not done yet.

  • Switch the $id to the canonical URI once DNS has settled. Done — see the comment below. The old GitHub URL still serves identical bytes rather than redirecting, since raw.githubusercontent.com cannot be redirected; nothing that referenced it is broken.

What I would ask for in a first draft

Whatever is natural for you — I would rather see how a standards organization actually structures this than specify it in advance. If it helps to know where the sharp edges are:

  1. Start wherever the ambiguity is worst rather than at section one. given path expressions and the then / function invocation rules are where I would expect implementations to diverge most, and where normative wording would do the most work immediately.
  2. Flag every place the description is ambiguous rather than resolving it silently. Where this specification and the reference implementation disagree, the implementation is right by definition and the document is wrong — but I want to see the list, because each one is undocumented behavior that a second implementation would have had to guess at.
  3. Conformance classes matter more to me than complete normative coverage. A specification with clear conformance and 60% normative wording is more useful than the reverse.

Open questions

  1. Where should the normative document live? It is currently the repository README, which is the single source of truth and rendered on the site by reference rather than copied, so the two cannot drift. If a real specification wants a different structure — multi-page, a document format with tooling, ReSpec or similar — that is a good reason to change it, and I would rather change it now than after people are linking to anchors.
  2. How do you handle the draft-to-stable transition? The format is frozen at the fork point and I do not intend to extend it, so this specification is describing something already stable in practice while the document describing it is not. I do not know what the right label for that is.
  3. Does the conformance suite belong in this repository? My instinct is yes, and firmly out of the implementation, because a suite that lives inside an engine measures that engine instead of defining the format.
  4. Licensing and attribution. The format originates in Spectral by Stoplight, Apache-2.0, and this document carries that provenance. If an organization contributes drafting, how is that normally attributed?
  5. What do you need from me? I can commit to review turnaround, keeping the implementation aligned with whatever the specification says, and not changing the format underneath you.

Anyone else reading this

This is not a closed conversation. If you draft specifications, maintain an engine, or depend on this format:

  • Standards drafting — the four workstreams above are the work.
  • Conformance cases — a ruleset that broke a tool is the most valuable thing you can contribute. Gnarly and production-real beats minimal and clean; the minimal cases already pass everywhere and prove nothing.
  • Implementers — every proposed format change gets a public comment window before it lands, with implementers notified directly. Say so here if you want to be on that list. That includes vacuum, which is a supported and valued implementation.
  • Dependent organizations — saying you rely on this is useful even if you contribute nothing else. The discussion thread is the place, or email me if you would rather be counted privately.

Site: https://spec.spotlight-rules.com · Roadmap: https://spec.spotlight-rules.com/roadmap/ · Companion issue on the tooling side: api-commons/spotlight-tools#1

Activity

  1. pinned this issue on Jul 30, 2026
  2. kinlane commented on Jul 30, 2026

    @kinlane
    ContributorAuthor

    Done. The schema's $id is now the canonical, project-controlled URI:

    https://spec.spotlight-rules.com/schema/v1/spectral-ruleset.schema.json
    

    It previously declared a raw.githubusercontent.com URL pointing at main — mutable by definition, on a hostname this project does not control, and not something anyone should cite in a national standard.

    Nothing is broken by this. The old GitHub URL still serves identical bytes, so anything that already referenced it keeps resolving. It is simply no longer the identity.

    Doing it now was the whole point. Changing an $id is breaking for every downstream $ref; on day three that costs a few links, and after adoption it costs everyone's pipeline. This is the cheap moment, and it will not come again.

    Verification: the schema still validates against the 2020-12 metaschema, every $ref in it is local (#/$defs/...) so none were affected by the identity change, and the file served at the canonical URI is byte-identical to the one in the repository.

    Remaining, and deliberately not done: the schema is served over Cloudflare rather than directly from GitHub Pages, so Content-Type and cache headers come from that layer. Worth a look when someone is doing the hosting properly — the correct type for a schema document is application/schema+json, and it is currently application/json.

  3. changed the title [-]Take the format to a formal specification — normative wording, conformance, versioning (with Geonovum)[/-] [+]Take the format to a formal specification — normative wording, conformance, versioning[/+] on Jul 31, 2026
  4. added
    roadmap
    maturity:consensus
    on Jul 31, 2026
  5. unpinned this issue on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maturity:consensusroadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions