knowledge-catalog icon indicating copy to clipboard operation
knowledge-catalog copied to clipboard

Proposal: typed/confidence-tagged links: frontmatter extension for OKF concepts

Open asphwathpc opened this issue 4 months ago • 2 comments

Summary

OKF v0.1 links between concepts are plain markdown links — no type, no provenance/confidence. This makes it hard for a producer to express "concept A writes_to concept B, inferred with medium confidence" versus "A references B, stated explicitly" — both currently render as the same undifferentiated [B](../b.md) link.

We ran into this building graphify-okf-bridge, a bridge between Graphify code knowledge graphs (typed, confidence-scored edges: imports_from, inherits, reads_from, …) and OKF bundles. Exporting a Graphify graph to OKF and re-importing it losslessly requires some place to carry edge type and confidence — OKF v0.1 has no such field.

Proposal

A backward-compatible frontmatter extension (relies on §4.1's "bundles can carry arbitrary extra frontmatter keys" — no spec change required to adopt it, but documenting it as a convention would let independent producers/consumers interoperate on typed edges):

links:
  - target: tables/orders.md
    rel: writes_to        # relation vocabulary is producer-defined
    confidence: inferred  # extracted | inferred | ambiguous

Kept alongside the existing plain markdown link in the body (## Connections or similar), so untyped consumers (Obsidian, viz.html, any tool that doesn't know this convention) are unaffected and continue to see a normal link. Typed-aware consumers get the extra structure.

Why raise it here

  • It's fully additive — no breaking change to §9 conformance (parseable frontmatter + non-empty type; everything else stays soft).
  • We have a working, tested implementation to point to as a concrete example: spec/MAPPING.md §2 rule E7 (export) and §3 rule I3/I4 (import, including the fallback for bundles that only have plain links).
  • OKF v0.1 explicitly invites external producers/tooling; a documented links: convention seems like a natural place for the spec (or a companion "conventions" doc) to standardize something multiple producers will independently reinvent otherwise.

Happy to contribute a PR with a spec section or a conventions/ doc if that's a useful direction — wanted to open this as a discussion first since it's a design choice, not just a bug.

asphwathpc avatar Jul 11 '26 18:07 asphwathpc

Hey — this overlaps a lot with #148, which has had a good amount of convergence already: typed supersedes/contradicts/contested_by edges, plus (as of today) a design for how an edge composes with an append-only affirmation/resolution-event log so an agent can't silently retire or promote a record. Might be worth cross-linking rather than running in parallel — a few of us (ajdelaguila's Data Olympus, andrewcrenshaw's Lexenne work) have already landed on close-but-not-identical field shapes there.

The rel/confidence-tagged part of your proposal is the piece #148 doesn't cover yet, though — arbitrary relationship typing (writes_to, imports_from) is a different, broader problem than the narrower lifecycle-edge case (supersedes/contested_by) the rest of us have been focused on. Worth keeping that distinction explicit if the two threads merge, since the frontmatter shape looks similar but they're solving different problems.

inkxel avatar Jul 11 '26 20:07 inkxel

+1 to @inkxel's split: arbitrary relationship typing (writes_to, imports_from) is a broader problem than the two lifecycle edges #148 has been converging on, and keeping the two distinct will save both threads pain. Two notes from the #148 side, where the registration text for those edges posted today.

If rel: supersedes ever rides this carrier, one rule is worth carrying with it: exclusion follows affirmation. An automated writer's proposed supersession must not displace the live incumbent until a resolution event is appended - otherwise typed links quietly become hidden precedence. The #148 text carries this as a named invariant (@ajdelaguila's point), and the semantics attach to the relation rather than the syntax, so the registered edges could ride a links: array as easily as flat keys. If this convention lands, we're glad to make the #148 text carrier-aware so the two compose rather than fork.

On per-link confidence: - worth a look at #151 and PR #159 before minting a third home for confidence. #159's reliability object already carries a basis vocabulary (how a claim was obtained: live-source, computed, inferred, with authored under discussion), and the lesson from #182 was that adding a missing value beats standing up a second field. Your extracted reads close to computed/live-source; inferred is already there; ambiguous sounds like the conflict state #159 models explicitly. If per-edge confidence needs something the object lacks, naming the gap on #159 is the fast path - the authored delta went up with conformance vectors and was independently validated the same day.

andrewcrenshaw avatar Jul 12 '26 15:07 andrewcrenshaw