From 67c514b8542ea20799f42141527b4374e2618088 Mon Sep 17 00:00:00 2001 From: MartinForReal Date: Wed, 5 Aug 2026 17:29:09 +0800 Subject: [PATCH] Release 0.6.0: ask 18 settings questions instead of 29 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dates the unreleased section and bumps package.json, manifest.json, and versions.json to 0.6.0. Minor, not patch: the settings tab is a different shape, and "Warn about missing fields" adds a stored field. The default actor for generated.by becomes okf-enforcer/0.6, tracking the minor line as it has since 0.3.0. Only new vaults see it — a saved defaultActor is kept as written. The unreleased section had grown two "### Changed" headings, one from the report-pane work and one from the settings consolidation. Folded into a single section, and the categories put in Keep a Changelog's order. Verified by line multiset: the only content lines that moved out of the file are the "## [Unreleased]" heading and the duplicate "### Changed". Co-Authored-By: Claude Opus 5 --- CHANGELOG.md | 98 ++++++++++++++++++++++++----------------------- README.md | 2 +- main.js | 8 ++-- main.ts | 4 +- manifest.json | 2 +- package-lock.json | 4 +- package.json | 2 +- validator.ts | 6 +-- versions.json | 3 +- 9 files changed, 66 insertions(+), 63 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c315ee..fbced89 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,43 @@ All notable changes to this project are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [0.6.0] - 2026-08-05 + +### Added +- **Index gaps can be reported instead of written** ([#15](https://github.com/MartinForReal/okf-enforcer/issues/15)). + Setting **Incomplete index.md** to *Report in the vault scan* makes a vault + scan warn where a folder has no `index.md` and where an existing one doesn't + list a note + anywhere in the file — and write nothing. A note counts as listed under + whatever heading, in whatever order, and in whatever grouping its author + chose, so a listing kept by hand doesn't read as incomplete merely for not + looking generated. Both findings are warnings: §8 makes an index optional and + §11 forbids failing a bundle for a missing one. + + This comes from the closing comment on + [#8](https://github.com/MartinForReal/okf-enforcer/issues/8) — a vault that + writes its own indexes for readability can't use generation, because + generation writes a shape the vault didn't choose, but still wants to be told + when a listing has fallen behind. + +- **The note you have open is listed in the report pane.** Opening a note now + puts its warnings and errors in a section of their own at the top of the + pane, listed open rather than behind a click. Opening a note has always + re-validated it, but the verdict went to the status bar alone — a count, with + the detail in a tooltip — while the pane went on showing whatever the last + vault scan had found, every row collapsed. Now the note in the editor is in + front of you whether or not it happened to be failing when that scan ran, and + whether or not a scan has ever run. A note with nothing wrong says so rather + than leaving the section blank, and a rescan or a **Fix all** re-reads the + section from the same pass, so it can't sit there contradicting the list + below it. An `index.md` carries its folder's §8 gap findings there too: a + scan files those against the index's path, but only reaches them by walking + the folder tree, so opening one would otherwise make it the single file the + plugin under-reports — clean in the editor, flagged in the list below. The + status bar counts them for the same reason. The active note is deliberately + kept apart from the scan results rather than merged into them: those count + the vault, and one note's verdict arriving between scans would leave the + summary chips describing a vault nobody scanned. ### Changed - **The settings tab asks 18 questions instead of 29** @@ -46,53 +82,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 open-time check is now stated rather than implied. It is what the report pane's active-note section reads, so gating it would only make that section go stale behind the tab. - -### Removed -- **Three settings that did nothing.** `warnBrokenLinks` had no read sites at - all — it was in the settings type and the defaults, and nowhere else. - `checkReservedFiles` and `promptVersionBumpOnMigrate` had been gone from the - source for some time but lived on in every vault's `data.json`, because - loading merged saved data over the defaults wholesale and wrote unknown keys - straight back out. Loading now keeps only fields that still exist, so a - dropped setting ages out of the vault instead of persisting forever. - -### Added -- **Index gaps can be reported instead of written** ([#15](https://github.com/MartinForReal/okf-enforcer/issues/15)). - Setting **Incomplete index.md** to *Report in the vault scan* makes a vault - scan warn where a folder has no `index.md` and where an existing one doesn't - list a note - anywhere in the file — and write nothing. A note counts as listed under - whatever heading, in whatever order, and in whatever grouping its author - chose, so a listing kept by hand doesn't read as incomplete merely for not - looking generated. Both findings are warnings: §8 makes an index optional and - §11 forbids failing a bundle for a missing one. - - This comes from the closing comment on - [#8](https://github.com/MartinForReal/okf-enforcer/issues/8) — a vault that - writes its own indexes for readability can't use generation, because - generation writes a shape the vault didn't choose, but still wants to be told - when a listing has fallen behind. - -- **The note you have open is listed in the report pane.** Opening a note now - puts its warnings and errors in a section of their own at the top of the - pane, listed open rather than behind a click. Opening a note has always - re-validated it, but the verdict went to the status bar alone — a count, with - the detail in a tooltip — while the pane went on showing whatever the last - vault scan had found, every row collapsed. Now the note in the editor is in - front of you whether or not it happened to be failing when that scan ran, and - whether or not a scan has ever run. A note with nothing wrong says so rather - than leaving the section blank, and a rescan or a **Fix all** re-reads the - section from the same pass, so it can't sit there contradicting the list - below it. An `index.md` carries its folder's §8 gap findings there too: a - scan files those against the index's path, but only reaches them by walking - the folder tree, so opening one would otherwise make it the single file the - plugin under-reports — clean in the editor, flagged in the list below. The - status bar counts them for the same reason. The active note is deliberately - kept apart from the scan results rather than merged into them: those count - the vault, and one note's verdict arriving between scans would leave the - summary chips describing a vault nobody scanned. - -### Changed - The report pane groups findings by the folder they sit in. A row used to be a bare file name, which said nothing about which of two same-named notes had failed and nothing at all about an index finding — those name `index.md`. @@ -108,6 +97,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 It was always shown and silently did nothing otherwise, which a gap report — which names the `index.md` a folder hasn't got — would hit every time. It is also left off the active-note section, which describes a note already open. +- The default **Actor for `generated.by`** is now `okf-enforcer/0.6`, tracking + the minor line as it has since 0.3.0. This is a default: if you have ever + saved settings, your existing actor is kept as written. + +### Removed +- **Three settings that did nothing.** `warnBrokenLinks` had no read sites at + all — it was in the settings type and the defaults, and nowhere else. + `checkReservedFiles` and `promptVersionBumpOnMigrate` had been gone from the + source for some time but lived on in every vault's `data.json`, because + loading merged saved data over the defaults wholesale and wrote unknown keys + straight back out. Loading now keeps only fields that still exist, so a + dropped setting ages out of the vault instead of persisting forever. ### Internal - The listing a folder's contents call for, and the write of that listing, are @@ -558,6 +559,7 @@ Initial release. - Batched, non-blocking scan/fix queue with an inline progress bar for large vaults. - Settings for automation toggles, batch size, warning rules, and excluded folders. +[0.6.0]: https://github.com/MartinForReal/okf-enforcer/releases/tag/0.6.0 [0.5.0]: https://github.com/MartinForReal/okf-enforcer/releases/tag/0.5.0 [0.4.1]: https://github.com/MartinForReal/okf-enforcer/releases/tag/0.4.1 [0.4.0]: https://github.com/MartinForReal/okf-enforcer/releases/tag/0.4.0 diff --git a/README.md b/README.md index 949e117..2216206 100755 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Clicking the status-bar item auto-fixes the active note and, if a required field Configure under **Settings → OKF Enforcer**: - **Default type for auto-fix** — value inserted into `type` when fixing notes that lack it. -- **Default actor for `generated.by`** — the actor recorded when auto-fix adds a `generated` block (e.g. `okf-enforcer/0.5` or `human:`). It goes into an inline YAML mapping, so it cannot contain a comma. +- **Default actor for `generated.by`** — the actor recorded when auto-fix adds a `generated` block (e.g. `okf-enforcer/0.6` or `human:`). It goes into an inline YAML mapping, so it cannot contain a comma. - **On save** — what an edit to the active note triggers: **Do nothing**, **Check the note** (validate it and update the status bar), or **Check and fix** (also insert the missing `type`, `title`, and `generated`). Whichever this is set to, a note is always validated when you *open* it — that verdict is what the status bar and the report pane's active-note section show. - **Automation** — **Scan vault on startup** and **Auto-migrate to latest OKF on fix**. The latter is on by default and lets ordinary auto-fix apply the v0.1 → v0.2 migrations; turn it off to keep them behind the explicit command, since a migration rewrites what you wrote. - **Incomplete index.md** — what to do about a folder whose §8 listing is missing or out of date: diff --git a/main.js b/main.js index 4f0fc54..f0408c5 100755 --- a/main.js +++ b/main.js @@ -164,7 +164,7 @@ var ISO_DATETIME_RE = /^\d{4}-\d{2}-\d{2}T/; var WARNABLE_FIELDS = ["title", "description", "generated", "tags"]; var DEFAULT_SETTINGS = { defaultType: "Concept", - defaultActor: "okf-enforcer/0.5", + defaultActor: "okf-enforcer/0.6", // `tags` left out: §4.1 recommends the other three, and the spec never asks // for tags. warnMissingFields: ["title", "description", "generated"], @@ -1090,7 +1090,7 @@ function applyFixes(path, content, issues, settings, includeMigrations = false) ); if (fixes.size === 0) return { content, applied }; const nowIso = (/* @__PURE__ */ new Date()).toISOString().replace(/\.\d{3}Z$/, "Z"); - const actor = settings.defaultActor || "okf-enforcer/0.5"; + const actor = settings.defaultActor || "okf-enforcer/0.6"; const title = basename(path); const split = splitFrontmatter(content); if (!split.hasFm) { @@ -2430,10 +2430,10 @@ var OkfSettingTab = class extends import_obsidian3.PluginSettingTab { }, { name: "Default actor for `generated.by`", - desc: "Actor written when auto-fix adds a `generated` block (\xA77). Use `/` (e.g. `okf-enforcer/0.5`) or `human:`. Avoid commas \u2014 the block is written as inline YAML.", + desc: "Actor written when auto-fix adds a `generated` block (\xA77). Use `/` (e.g. `okf-enforcer/0.6`) or `human:`. Avoid commas \u2014 the block is written as inline YAML.", control: (row) => row.addText( (t) => t.setValue(s.defaultActor).onChange((v) => { - s.defaultActor = v.trim() || "okf-enforcer/0.5"; + s.defaultActor = v.trim() || "okf-enforcer/0.6"; save(); }) ) diff --git a/main.ts b/main.ts index 36af829..c8c4ed3 100755 --- a/main.ts +++ b/main.ts @@ -1306,11 +1306,11 @@ class OkfSettingTab extends PluginSettingTab { }, { name: "Default actor for `generated.by`", - desc: "Actor written when auto-fix adds a `generated` block (§7). Use `/` (e.g. `okf-enforcer/0.5`) or `human:`. Avoid commas — the block is written as inline YAML.", + desc: "Actor written when auto-fix adds a `generated` block (§7). Use `/` (e.g. `okf-enforcer/0.6`) or `human:`. Avoid commas — the block is written as inline YAML.", control: (row) => row.addText((t) => t.setValue(s.defaultActor).onChange((v) => { - s.defaultActor = v.trim() || "okf-enforcer/0.5"; + s.defaultActor = v.trim() || "okf-enforcer/0.6"; save(); }) ), diff --git a/manifest.json b/manifest.json index 442dbdb..d336ff1 100755 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "okf-enforcer", "name": "OKF Enforcer", - "version": "0.5.0", + "version": "0.6.0", "minAppVersion": "1.7.2", "description": "Validate and enforce the Open Knowledge Format (OKF v0.2): required type frontmatter, provenance/trust/lifecycle families, Attested Computation concepts, index.md/log.md structure, quick-fixes, v0.1→v0.2 migration, and a vault-wide report.", "author": "MartinForReal", diff --git a/package-lock.json b/package-lock.json index 8395006..08f5c67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "okf-enforcer", - "version": "0.5.0", + "version": "0.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "okf-enforcer", - "version": "0.5.0", + "version": "0.6.0", "license": "Apache-2.0", "devDependencies": { "@types/node": "^20.11.0", diff --git a/package.json b/package.json index 330c639..d509ff6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "okf-enforcer", - "version": "0.5.0", + "version": "0.6.0", "description": "Validate and enforce the Open Knowledge Format (OKF v0.2) in Obsidian.", "main": "main.js", "scripts": { diff --git a/validator.ts b/validator.ts index 0de364e..97cdc4a 100755 --- a/validator.ts +++ b/validator.ts @@ -55,7 +55,7 @@ export interface OkfSettings extends PortentSettings { defaultType: string; /** * Actor written to `generated.by` when auto-fix creates a `generated` block - * (§5.2, §7). Follows the actor convention — e.g. `okf-enforcer/0.5` for the + * (§5.2, §7). Follows the actor convention — e.g. `okf-enforcer/0.6` for the * plugin, or `human:` if a person wants edits attributed to them. */ defaultActor: string; @@ -139,7 +139,7 @@ export const WARNABLE_FIELDS = ["title", "description", "generated", "tags"] as export const DEFAULT_SETTINGS: OkfSettings = { defaultType: "Concept", - defaultActor: "okf-enforcer/0.5", + defaultActor: "okf-enforcer/0.6", // `tags` left out: §4.1 recommends the other three, and the spec never asks // for tags. warnMissingFields: ["title", "description", "generated"], @@ -1608,7 +1608,7 @@ export function applyFixes( if (fixes.size === 0) return { content, applied }; const nowIso = new Date().toISOString().replace(/\.\d{3}Z$/, "Z"); - const actor = settings.defaultActor || "okf-enforcer/0.5"; + const actor = settings.defaultActor || "okf-enforcer/0.6"; const title = basename(path); const split = splitFrontmatter(content); diff --git a/versions.json b/versions.json index 76c63d2..5fc2479 100755 --- a/versions.json +++ b/versions.json @@ -9,5 +9,6 @@ "0.3.0": "1.7.2", "0.4.0": "1.7.2", "0.4.1": "1.7.2", - "0.5.0": "1.7.2" + "0.5.0": "1.7.2", + "0.6.0": "1.7.2" }