Skip to content

Create semantic relation action

๐Ÿ”— A Relations action (#154). Writes a typed relation from the note being built to a target note, using the #147 semantic vocabulary. The relation is stored as a frontmatter field whose key is the relation type โ€” e.g. supports: "[[Target]]" โ€” which the knowledge model (#145) then indexes as a directed, typed edge on its next re-index. Deterministic and offline.

Relation types

The fixed semantic vocabulary: supports ยท contradicts ยท expands ยท inspired by ยท question ยท example ยท implements. (Plain [[links]] remain the untyped link fallback โ€” this action is for the typed ones.)

Options

  • Relation type โ€” the semantic relation to write (the key of the frontmatter field).
  • Target note โ€” the note this relation points to; written as an extensionless [[wikilink]]. An empty target, or a type outside the vocabulary, is a safe no-op (nothing is written).
  • Write to โ€” Frontmatter (recommended โ€” indexed promptly by the metadata cache) or Context.

Result

One typed frontmatter field, e.g. supports: "[[Target]]", also exposed as {{supports}}. Feeding that field through the relation schema yields exactly one Relation { type, from: note, to: target }.

Interactive-only (#231 Phase 4)

This action writes to a fixed target set in its own configuration, so it is meant for interactive use. It is a no-op when authored into a shipped .zftemplate system's onCreation โ€” a template can't know the per-note target. In a system, capture the relation with a normal prompt (a [[wikilink]] field) or use the deterministic find-related/suggest-link instead.

Removing a relation (#181)

To delete a relation you created, run the Remove a relation command (command palette) with the note active. It lists the note's typed relations, and after a confirmation naming the exact edge (type โ†’ [[target]]) removes the one you pick from the note's frontmatter โ€” deleting the key when its last value goes. A missing edge is a safe no-op. It is a command (not a wizard action) because it is the only destructive relation operation and mutates a pre-existing note; the confirmation is its safety guard. Offline, no AI. v1 handles typed frontmatter relations (inline body [[links]] are out of scope).

Capabilities

File-system write of a single typed frontmatter field (the same surface as every action). No network, no AI.