CompanyGraph, described in CompanyGraph

CompanyGraph explains its own Obsidian plugin

Every pane and every feature, read from the model it edits.

model/features

The plugin has a page in the model it edits

CompanyGraph describes itself in CompanyGraph. The plugin is one feature of the product CompanyGraph Core, and this is its page as the repository holds it.

Its concepts are this talk's vocabulary.

Why an editor at all

An instance is a folder of Markdown files. So is a vault.

What a vault lacks is what an instance's CI supplies after the edit: a reference that resolves, and no field its schema does not declare. The plugin says so while the edit is made, and implements no rule of its own.

The tour

Where each part sits in Obsidian

The editorFailures marked on their line, completion from the schema, names that open what they name, held headings, a picture at the H1.
The status barThe failure count, and the pin when it differs.
Meta-model complianceEvery failure in the instance, by file.
ReferencesWhat names this entity, and what it names.
Writing briefWhat the schema says of the place the cursor is in.
Pane · Meta-model compliance

A failure is marked where it is written

Every change checks the whole model, because a reference crosses files. A failure gets a mark on its line, a row in the pane and a count in the status bar.

Copy report puts the pane on the clipboard, for an agent or an issue.

Pane · References

What names an entity, and what it names

The pane follows the note in front. Each entry says where the name stands, a field or a section and its column, and opens that line.

While a vault is an instance, Obsidian's backlinks, outgoing links, properties and tags panes are off: none of them knows a name a schema declares.

Pane · Writing brief

The schema's rules, where the writing happens

The brief follows the cursor. It names the place, says whether the schema requires it, and shows the rules that name it.

A section or field in a rule is a chip that moves the cursor there. The type's other rules fold under the place each one names first.

Editor · Completion

It offers what the schema declares, and only that

A reference field offers the canonical names of its type, an enum its permitted values, a table cell what its column declares.

A name resolves by the type its schema declares; a name that exists only under another type is not offered.

Editor · Properties widget

Add property knows the schema

In Live Preview, Add property lists exactly the fields this file's schema declares and the file lacks, the required ones first.

Its last entry hands over to Obsidian's own list, for a field the checks will then report.

Editor · Sections

Declared headings are held, a missing one is drawn

A required section the page lacks is drawn where the schema puts it, and one click writes it. Add a section and Remove section do the rest.

A heading the schema declares is held against a stray edit. A section of the page's own is allowed.

Commands · Entities

New, Rename and Delete keep every reference

New entity writes a page with its required fields and sections. Rename entity rewrites the name in every file that uses it.

Delete entity lists the references it would leave naming nothing, before anything is deleted.

Editor · Ids

An id is set once and locked

Every page carries an id that outlives its name. The plugin writes one on every new page and refuses an edit that changes or removes it.

Copy entity id copies it. Give this page a fresh id replaces it, once you confirm.

Commands · The instance

An instance is made and moved from Obsidian

Make this vault an instance writes core, the manifest, CI and the first entities. Move this vault's core takes a newer release and leaves the model alone.

Open the command line opens the meta-model's own, in a tab at the vault's root.

Editor · Markdown form

A note is written back in the family's form

Obsidian's table editor pads every column the moment one cell is edited. The plugin writes the note back in the form the conventions' CI would write, when it is left or saved.

An edit that was undone leaves no diff at all.

rests onconcept Rule
Also in the editor

Four smaller things it does

A picture at the H1A profile's picture is drawn round at the start of its heading. One that is not square, is outside 256 to 1024 pixels or is over 300 KB fails by name.
The pin, in the status barIt says pin differs when the manifest names another checker release than the one bundled. The instance's CI stays the gate.
A failing row, tintedIn a Live Preview table, a row that fails is tinted, with its message as the tooltip.
A question's Rests onEach row reads its type and owner from its own cells, as the checks do, and completes within them.
Every command

All of it is in the command palette

Writing
  • Complete here
  • Add a field
  • Add a section
  • Remove section
  • Open the writing brief
  • Write this note in the family's Markdown form
Entities
  • New entity
  • Rename entity
  • Delete entity
  • Copy entity id
  • Give this page a fresh id
The instance
  • Make this vault an instance
  • Move this vault's core
  • Open the command line
Checks
  • Open the compliance pane
  • Check compliance now
References
  • Open the references pane
  • Toggle references in document
Obsidian's own, off in an instance
  • Backlinks
  • Outgoing links
  • Properties
  • Tags
What it does not do

It stops at the editor.

The gate a change has to pass is still the checks an instance runs in CI. And the writing rules are a judgment: no check reads them, here or anywhere. The brief puts them where the writing happens, and a person holds a page to them.

Getting it

The meta-model's tooling installs it

npx --yes 'github:companygraph/meta-model#semver:*'

Its menu's Obsidian plugin entry puts the newest release into the vault and switches it on. Run again, it updates the plugin and keeps its settings. The plugin is not in Obsidian's community directory.

github.com/companygraph/obsidian-plugin · github.com/companygraph/mental-model

CompanyGraph Robert Blust Talks

Sprecher-Notiz