You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Custom functions in the specification — the part that is tied to a language #29
Named in office hours on 2026-08-21 as one of three areas of the format that need research and
workshopping before any normative wording is attempted. Not previously filed.
The question asked directly on the call — "is the spec going to also cover custom functions,
the interfaces?" — was answered yes. The response from the person who maintained the
implementation was equally direct:
That's going to be very tricky, right… it's kind of tied to a language after all.
Why this is hard, specifically
Everything else in the ruleset format is data. Custom functions are code, and code has a
runtime. The moment the specification says anything normative about them it is making claims
about a language:
The function signature and its inputs. What a function receives (the targeted value, the
path, the rule options, document context) and in what shape.
The return contract. What a violation looks like coming back, and how a function reports
more than one.
Options and their validation. Functions today declare an options schema; is that
normative, and in what schema language.
Resolution and packaging. How a ruleset names a function and how an implementation finds
it — a filesystem path and a JS module today. A Go implementation cannot honor that, and a
browser implementation honors it differently again.
The built-in set.truthy, falsy, pattern, schema, length, casing, and the rest
are the part every implementation must agree on. They are separable from the custom-function
extension point and are probably the part that can actually be made normative first.
The custom-function extension point — specify the contract (inputs, outputs, options
schema, error semantics) without specifying the binding, and let each implementation
declare its own binding. A ruleset that uses custom functions is then explicitly portable
only across implementations that share a binding, and the specification says so out loud
rather than pretending otherwise.
That split is a proposal, not a decision. What this issue needs is someone to work through
whether it holds up against the real implementation surface.
Activity