Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 14 additions & 22 deletions 00-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,25 +344,20 @@ directly comparable without making one product's internal API normative.
## Versioning

This specification uses semantic versioning. The current version is **0.3.0**,
in its sixth release candidate (`0.3.0-rc.6`), which is in draft.
the first stable release, dated 2026-11-15.
Collections declare their specification version with `spec_version` in
`mdbase.yaml`, which is `0.3.0` for every release candidate. Tools declare
the profiles and versions they implement.

rc.6 is the last release candidate that adds or changes behavior. A later
release candidate only confirms or removes a provisional choice, corrects an
error, or adds tests. 0.3.0 is declared stable when both of these hold:
The stable release freezes the rc.6 draft, confirms its provisional choices,
and applies the promised rejection of nondeterministic type matching. New
normative work belongs in backward-compatible 0.3.x errata or 0.4. The
[release record](./release/v0.3.0.md) distinguishes this specification freeze
from implementation qualification: releasing the specification does not assert
that an implementation passes every profile. Implementations declare only
verified conformance claims (Chapter 14).

1. No paragraph marked **Provisional** remains in chapters 00 to 14. Each is
confirmed, by removing its marker, or removed together with the behavior
it describes.
2. The implementations named in the
[release contract](./release/v0.3.0.md) hold verified conformance claims
(Chapter 14) against that release candidate for the profiles of this
specification that the contract lists for them.

Companion profiles are not part of that gate. They keep their own versions
and can change after 0.3.0 is stable.
Companion profiles keep their own versions and can change independently.

Companion profiles, artifacts, and schemas carry their own versions:

Expand All @@ -388,14 +383,11 @@ through version requirements.
The keywords `MUST`, `MUST NOT`, `SHOULD`, `SHOULD NOT`, and `MAY` are to be
interpreted as described in RFC 2119.

Draft notes use ordinary prose and are non-normative. A paragraph that begins
with **Provisional (rc.5).** or **Provisional (rc.6).** records a choice made
where the design input left a detail open. It is normative in the release
candidate, and it is confirmed or removed before 0.3.0 is declared stable
(see Versioning). The [release contract](./release/v0.3.0.md) lists every
such paragraph. A companion profile marks such a choice with its own version,
as in **Provisional (0.1).**, and may change it in a later version of the
profile.
Draft notes use ordinary prose and are non-normative. The provisional choices
in the collection specification's release candidates are confirmed in 0.3.0;
the [release record](./release/v0.3.0.md) lists them. A companion profile may
mark a normative choice with its own version, as in **Provisional (0.1).**,
and change it in a later version of that profile.

A paragraph that begins with *Note (informative).* is not normative. Where
the specification names a library or an implementation, it does so only in
Expand Down
8 changes: 4 additions & 4 deletions 02-collection-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ A tool that reads a collection skips files at such paths as it skips
excluded paths. A write that would create one fails with `invalid_request`
(`details.reason` names the rule) before any write.

**Provisional (rc.5).** The rule set comes from the
The rule set comes from the
review of the first implementation. Earlier drafts let implementations
reject such paths optionally; replicating a collection across file systems
needs every tool to agree on them.
Expand Down Expand Up @@ -231,7 +231,7 @@ collides, whatever file system it runs on:
code-point order. Core Read alone reads each file as written and computes
no path keys.

**Provisional (rc.5).** A tool that keeps records in a log or replicates
A tool that keeps records in a log or replicates
them across file systems cannot hold two records with one path key. It
MAY resolve a discovered group instead, by the collision rule below: with
no other order, the path that is smaller in code-point order keeps it, and
Expand All @@ -240,11 +240,11 @@ collides, whatever file system it runs on:

Path globs (above) remain case-sensitive and match paths as written.

**Provisional (rc.5).** Case folding uses the full mappings, so `ß` and
Case folding uses the full mappings, so `ß` and
`ss` collide. This flags more collisions than some file systems would, never
fewer.

**Provisional (rc.5).** NFC and case folding use the data of **Unicode
NFC and case folding use the data of **Unicode
17.0.0** (`UnicodeData.txt`, `CompositionExclusions.txt`, `CaseFolding.txt`).
Unicode's stability policies keep both stable for assigned characters, but a
character assigned in a later version can fold or compose differently once a
Expand Down
2 changes: 1 addition & 1 deletion 03-records-and-frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,6 @@ A writer that has no existing style to keep SHOULD quote a string that a YAML
1.1 parser would read as another type (for example `"yes"` or
`"2026-10-01"`), so tools that still use YAML 1.1 read the same value.

**Provisional (rc.5).** This table resolves an ambiguity of earlier release
This table resolves an ambiguity of earlier release
candidates, which asked for "a safe YAML parser" without naming a schema. It
matches Obsidian and the current engines.
7 changes: 3 additions & 4 deletions 04-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,10 @@ always errors.
An explicit `validate` operation always performs record validation. At level
`off` it reports issues as `warning`.

**Provisional (rc.5).** Data contract view failures are classed as
Data contract view failures are classed as
single-record, although a contract view built from collection projections can
depend on other records or on the current time. Such projections are rare in
contract mappings; a later release candidate may move the affected failures to the
cross-record tier.
depend on other records or on the current time. This classification is
confirmed for 0.3.0.

## Runtime Host Config

Expand Down
2 changes: 1 addition & 1 deletion 06-json-schema-profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ unanchored. A pattern outside the profile, such as one using `\p{L}`, a
backreference, or look-around, makes the type file invalid with an `invalid_pattern`
diagnostic.

**Provisional (rc.5).** JSON Schema 2020-12 recommends ECMA-262 regular
JSON Schema 2020-12 recommends ECMA-262 regular
expressions. The profile departs from it so that one engine serves schema
validation, matching, and CEL. The two agree on `\d`, `\w`, and `\b` for
patterns without the ECMA-262 `u` flag; they differ on `\s`, which ECMA-262
Expand Down
25 changes: 10 additions & 15 deletions 07-collection-semantics.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,22 +151,17 @@ the type to match.

Type membership drives validation, lifecycle, path policy, and merge, so every
tool and every replay MUST compute the same membership for the same record.
`match.expr` SHOULD therefore be deterministic: it SHOULD NOT call `now()` or
`match.expr` MUST therefore be deterministic: it MUST NOT call `now()` or
`today()`, read `file.mtime` or `file.ctime`, or use a helper that reads
other records, such as `asFile()`, `file.backlinks`, or `file.hasLink()`.
Queries, projections, and lifecycle guards MAY use these functions.

A tool that loads a type whose `match.expr` uses one of them MUST report a
`warning` diagnostic with code `nondeterministic_match`, the type name, and
`details.binding` naming the function or field. The type still loads and the
expression is evaluated as before, with `now()` and `today()` reading the
operation's captured instant. Membership of such a type can differ between
tools and over time, so tools that merge or replay edits cannot rely on it.

In 0.3.0 stable such a `match.expr` is an error: the type is invalid and
reports `nondeterministic_match` with severity `error`. The warning in the
release candidates gives authors a window to move time-dependent or
cross-record logic into queries or collection projections.
A tool that loads a type whose `match.expr` uses one of them MUST report an
`error` diagnostic with code `nondeterministic_match`, the type name, and
`details.binding` naming the function or field. The type is invalid and MUST
NOT participate in matching. Authors must move time-dependent or cross-record
logic into queries or collection projections. Release candidates reported a
warning to give authors a migration window; 0.3.0 enforces this requirement.

Implementations compile `match.expr` when loading the type. Parse and type
errors invalidate the type definition. A per-record evaluation error reports a
Expand Down Expand Up @@ -314,7 +309,7 @@ record already violates the rule, for example after an external edit. Edits
made by other tools and the results of a merge are never
rejected; their violations are reported.

**Provisional (rc.5).** An `enforce: write` rule applies at every
An `enforce: write` rule applies at every
validation level, including `off`, because the author opted into it
explicitly.

Expand Down Expand Up @@ -351,7 +346,7 @@ as placeholder delimiters.
string is used as written, and a number or boolean uses its JSON
representation. A missing or null value produces `path_value_missing`.

**Provisional (rc.5).** The JSON representation of a number is the one RFC
The JSON representation of a number is the one RFC
8785 (JSON Canonicalization Scheme) specifies, which is ECMAScript's
`Number.prototype.toString`: an integer-valued number has no fraction
(`42.0` gives `42`), and exponents are written `1e+21` and `1e-7`. CEL's
Expand Down Expand Up @@ -529,7 +524,7 @@ chose: records created concurrently, records copied onto another file system,
and merged paths. Its suffix then becomes part of the decoded
value, such as `Call Bob (2)`.

**Provisional (rc.6).** Only string fields can be path-stored, and FORMAT
Only string fields can be path-stored, and FORMAT
has only the `YYYY`, `MM`, and `DD` tokens. Normalization follows the
filename rules TaskNotes applies to titles, made idempotent: removals happen
before runs of spaces are collapsed and before the ends are trimmed.
Expand Down
24 changes: 18 additions & 6 deletions 10-cel-profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,21 @@ file.inFolder("tasks") && has(raw.tags) && tags.exists(t, t == "task")
Read defaults and projections enter after matching and are absent from this
context.

Matching should be deterministic (Chapter 07). Using `now()`, `today()`,
Matching MUST be deterministic (Chapter 07). Using `now()`, `today()`,
`file.mtime`, `file.ctime`, or a helper that reads another record, such as
`asFile()`, `file.backlinks`, or `file.hasLink()`, in this context reports a
`nondeterministic_match` warning when the type loads. In 0.3.0 stable it is
an error that invalidates the type.
`nondeterministic_match` error when the type loads. The type is invalid and
MUST NOT participate in matching (Chapter 07).

For type matching, the effective timezone MUST be the collection's configured
`settings.timezone` (Chapter 04). An invocation timezone or a local-runtime
default MUST NOT be used. The timezone-dependent functions are `today()`,
`date(timestamp)`, and `startOfDay(string)`. If `settings.timezone` is absent,
a `match.expr` that uses any of these functions MUST report a
`nondeterministic_match` error when the type loads, with the type name and
`details.binding` naming the function. The type is invalid and MUST NOT
participate in matching. A configured timezone does not permit `today()` in
matching: it still depends on the clock.

### Lifecycle Context

Expand Down Expand Up @@ -176,7 +186,7 @@ The durable runtime profile defines when each workflow expression is evaluated.

## Record Values

**Provisional (rc.5).** CEL maps are unordered, but comprehensions over a
CEL maps are unordered, but comprehensions over a
map (`all`, `exists`, `exists_one`, `map`, `filter`) visit its keys, and
`map` and `filter` return lists in that order. Maps iterate in insertion
order: frontmatter maps in the order of their keys in the source, map
Expand Down Expand Up @@ -277,7 +287,9 @@ evaluation error. Callers convert one side explicitly, for example
`startOfDay(due) < now()` or `due < date(now())`. Fixed spans use
`timestamp ± duration`; calendar spans use the date methods.

The effective timezone is the operation or query timezone defined in
In type matching, the effective timezone is only the collection's configured
`settings.timezone`, subject to the Matching Context rules above. Outside type
matching, the effective timezone is the operation or query timezone defined in
Chapter 11 and MUST be declared by every operation or runtime context that
evaluates `today()`, `date(timestamp)`, or `startOfDay()`.

Expand All @@ -301,7 +313,7 @@ profile adds two string methods:

Both use the Unicode default full case mappings without locale tailoring,
including the context-dependent final sigma rule, from the same Unicode
version as path keys (Chapter 02, provisionally 17.0.0), so
version as path keys (Chapter 02, 17.0.0), so
`"Éclair".lower()` is `"éclair"` and `"Straße".upper()` is `"STRASSE"`. A
case-insensitive search lowercases the text it searches:

Expand Down
20 changes: 16 additions & 4 deletions 11-querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,26 @@ The effective query timezone is resolved in this order:
2. the collection's configured timezone
3. the implementation's documented local-runtime default

Type matching is independent of this query-timezone resolution. Its effective
timezone MUST be the collection's configured `settings.timezone` (Chapter 04);
an invocation timezone or a local-runtime default MUST NOT be used. The
timezone-dependent functions are `today()`, `date(timestamp)`, and
`startOfDay(string)`. If `settings.timezone` is absent, a `match.expr` that uses
any of these functions MUST report a `nondeterministic_match` error when the
type loads, with the type name and `details.binding` naming the function. The
type is invalid and MUST NOT participate in matching. A configured timezone
does not permit `today()` in matching: it still depends on the clock
(Chapter 10).

An invalid invocation timezone produces `invalid_timezone` and aborts before
candidate evaluation. An implementation MUST NOT silently substitute another
timezone for a supplied value.

The execution authority captures the current instant once per query. `now()`,
`today()`, conversion of datetimes to calendar dates, and calendar arithmetic
MUST all use that captured instant and the same effective timezone throughout
the execution. Callers do not supply the current instant through this field.
The execution authority captures the current instant once per query. In query
expressions, `now()`, `today()`, conversion of datetimes to calendar dates, and
calendar arithmetic MUST all use that captured instant and the same effective
timezone throughout the execution. Callers do not supply the current instant
through this field.

Interactive callers SHOULD send their current IANA timezone on every temporal
query. Headless callers MAY omit it to use the durable collection default.
Expand Down
4 changes: 2 additions & 2 deletions 12-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ item appears in both `add` and `remove` for one field, or when an `add` or
`remove` value is not a list. List operations work on any list field; they do
not require `uniqueItems`. A list emptied by `remove` stays as an empty list.

**Provisional (rc.5).** `add` and `remove` address top-level fields
`add` and `remove` address top-level fields
only, like `patch`, because the merge unit is the top-level field.

### Path-stored fields
Expand Down Expand Up @@ -323,7 +323,7 @@ line-based body merge of the concurrent edits profile: two edits to different wo
conflict. A later release may detect conflicts at a finer granularity; that
is a compatible refinement, because it only turns some conflicts into merges.

**Provisional (rc.5).** Offsets are Unicode scalar values, the unit that
Offsets are Unicode scalar values, the unit that
regular expressions and `.` match over. Byte offsets could fall inside a
character, and UTF-16 code units, which JavaScript editors use, are
specific to one platform; adapters convert at their boundary. Retaining old
Expand Down
5 changes: 3 additions & 2 deletions 13-migrations-and-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ worked under rc.4 stops loading.

| Rule | How an engine reports a collection that relies on the rc.4 behavior |
| --- | --- |
| `match.expr` should not call `now()` or `today()`, read `file.mtime` or `file.ctime`, or follow links (Chapter 07) | the type still loads and its expression is evaluated as before; the engine reports a `warning` with code `nondeterministic_match`, the type name, and `details.binding`. In 0.3.0 stable this becomes an error that invalidates the type, so authors must move such logic before then |
| `match.expr` must not call `now()` or `today()`, read `file.mtime` or `file.ctime`, or follow links (Chapter 07) | the type is invalid and does not participate in matching; the engine reports an `error` with code `nondeterministic_match`, the type name, and `details.binding`. Release candidates warned instead; move such logic into queries or collection projections |
| a `collection.path.pattern` value may not contain `/` or `\`, begin with `.`, or be empty (Chapter 07) | existing records are unaffected, whatever their paths; only a create that would derive such a path fails, with `path_value_invalid` naming the field. rc.4 already called such values invalid, but engines created folders from them |
| paths equal under case folding and NFC name one record path (Chapter 02) | existing files that collide stay records and each reports a `warning` with code `path_collision` and `details.paths`; an explicit create or rename onto an equivalent path fails with `path_conflict` |
| an ambiguous configured ID does not fall back to filename resolution (Chapter 08) | the link resolves to null and the referring record reports an `ambiguous_link` warning with `details.candidates`. rc.4 already required this; engines that fell back are non-conforming |
Expand Down Expand Up @@ -92,7 +92,8 @@ diverges.

## Changes Since rc.5

0.3.0-rc.6 (draft) adds path-stored fields (Chapter 07): fields whose values
The rc.6 draft, included in 0.3.0, adds path-stored fields (Chapter 07):
fields whose values
live in the record's path, such as a task title kept as the filename or a
daily note's date. Collections keep `spec_version: "0.3.0"`. A collection that
does not declare `collection.path.fields` behaves as under rc.5, apart from
Expand Down
4 changes: 2 additions & 2 deletions 14-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ CEL Match implementations MUST:
- combine it with other members of `match` using AND
- match only a boolean true result
- report per-record evaluation errors and treat that candidate as a non-match
- report `nondeterministic_match` for a `match.expr` that uses a
time-dependent or cross-record binding
- reject a type with an error `nondeterministic_match` for a `match.expr`
that uses a time-dependent or cross-record binding

## Query Requirements

Expand Down
Loading
Loading