Repository navigation
Keep frontmatter dates as written; bundle an OKF v0.2 schema - #144
Merged
Merged
Conversation
…written Load frontmatter and embedded YAML blocks with js-yaml's default schema minus the timestamp type, replacing coerceDates. Datetimes are no longer truncated to YYYY-MM-DD, offsets are kept, and dates inside lists are no longer left as Date objects. Add a date-time format (ISO 8601 with offset) and document comparing dates in rules with $toMillis(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e wiki Schemas can now require a date, a datetime, or accept either. The knowledge wiki's published_date and note date accept either rather than rejecting datetimes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add schemas/_okf.json and schemas/okf.json so an OKF bundle validates as a plain markdown space. Any concept type is accepted and unknown fields are tolerated; provenance, trust, lifecycle and Attested Computation fields are checked when present, with rules for description, stale_after ordering, usage_count windows and computation presence. Reserved index.md and log.md are reported as excluded during parsing. Closes #143 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…date-time - date, date-time and date-or-date-time reject impossible values (2026-02-30, 25:00) - date-or-date-time accepts datetimes without seconds or offset, as Obsidian writes them - dumpYaml writes Date values as ISO 8601 strings instead of throwing - build YAML_SCHEMA by filtering the default schema's timestamp type - document comparing dates with $toMillis() in filters, and its seconds requirement Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #143
Frontmatter dates and datetimes (breaking)
YYYY-MM-DD, offsets kept, and dates inside lists are no longer left asDateobjects. This replacescoerceDates.Datevalues (e.g. from non-markdown sources) are written as ISO 8601 strings.date-time: seconds and a UTC offset required.date-or-date-time: a date, or a datetime with optional seconds and offset, as Obsidian writes them.2026-02-30,25:00).published_dateand notedatenow usedate-or-date-time.docs/rules.mdand the README filter section cover comparing dates with$toMillis(), including how datetimes without an offset are read and its need for seconds.Migration: a field with
format: "date"that holds datetimes now fails; usedate-or-date-time. Rules and filters that compare date strings directly should use$toMillis().OKF schema
schemas/_okf.jsonandschemas/okf.jsonfor Open Knowledge Format v0.2 bundles, validated as plain markdown spaces.typeis accepted and unknown fields are tolerated.stale_afterordering,usage_countwindow, and computation presence.index.md/log.mdshow up as excluded during parsing.Other
Testing
bun run test: 559 passbun run test:smoke: 18 passbun run typecheck,bun run lint: clean