Reference

Commands, settings, shortcuts and the validation rules, in one place.

Commands

All commands are under the ORM category in the Command Palette.

CommandDescription
ORM: New ORM ModelCreate a starter .orm.json and open the diagram
ORM: Import NORMA (.orm) FileConvert a NORMA / ORM 2 XML file
ORM: Import Model (NORMA, FBM, Ossie, UMS)Convert any supported interchange document — see File formats
ORM: Export Model As (NORMA, FBM, Ossie, UMS)Write the model out in an interchange format
ORM: Derive Model from Example Data (CSV)Propose a first-draft model from a table of examples
ORM: Verbalize ModelFull FORML verbalization as a Markdown document
ORM: Show Relational MappingThe mapped tables as a Markdown table
ORM: Generate Relational Schema (SQL DDL)SQL DDL in a new editor
ORM: Generate Property Graph Schema (LadybugDB)LadybugDB Cypher DDL in a new editor
ORM: Export Diagram as SVGSave the diagram as SVG
ORM: Export Diagram as PNGSave the diagram as a 2× PNG
ORM: Auto-Layout DiagramRe-arrange the diagram
ORM: Open Model Source (JSON)Open the model as text

Settings

SettingDefaultDescription
orm.ddl.dialectpostgresSQL dialect: postgres, sqlserver, mysql, sqlite or ansi
orm.ddl.quoteIdentifiersfalseAlways quote generated identifiers
orm.graph.subtypeStrategynodeTablenodeTable gives each subtype its own label plus IS_A; absorb folds it into the supertype
orm.graph.ifNotExistsfalseEmit IF NOT EXISTS so the script can be re-run
orm.validation.enabledtrueReport model problems in the Problems panel
orm.verbalization.modeformlforml or plainer English
orm.diagram.snapToGridtrueSnap shapes to the grid while dragging
orm.diagram.gridSize10Grid size in pixels
orm.diagram.showGridtrueShow the grid

Keyboard and mouse

ActionBinding
Select toolV
Entity type / value typeE / T
Unary / binary / ternary fact type1 / 2 / 3
Subtype link / connect roleS / C
Zoom to fitF
Auto-layoutCtrl/Cmd + Alt + L
Delete selectionDelete
Undo / redoCtrl/Cmd + Z / Ctrl/Cmd + Shift + Z
Add to selectionShift + click
Rename in placeDouble-click a shape
PanMiddle-drag, or drag empty canvas
ZoomScroll wheel
Cancel / clear selectionEsc

Supported constraints

ConstraintApplies toDrawn as
Uniqueness (internal)Roles of one fact typeBar over the roles
Uniqueness (external)Roles across fact typesCircled bar with dashed links
Preferred identifierA uniqueness constraintDouble bar or double circle
Mandatory (simple)One roleDot where the role meets its object type
Mandatory (disjunctive)Several roles of one typeDot linked to each role
FrequencyOne or more rolesBar annotated with the range
RingTwo roles played by one typeCircled ring glyph
Subset / exclusion / equalityTwo role sequencesCircled ⊆, ✕ or = with dashed links
ValueObject type or role{'M', 'F'} beside the shape
CardinalityObject type or roleProperties panel
Subtype exclusion / exhaustionSubtypes of one supertypeProperties panel

Every constraint carries a modality: alethic (cannot be violated) or deontic (should not be), which the verbalizer renders as It is necessary that… versus It is obligatory that…

Validation rules

Problems appear in VS Code's Problems panel with the codes below, and the offending shape is highlighted on the diagram.

CodeSeverityMeaning
no-reference-schemeErrorAn entity type has no reference mode, preferred identifier, objectification or supertype
missing-uniquenessErrorA fact type has no uniqueness constraint
uniqueness-too-narrowErrorAn internal uniqueness constraint spans fewer than n−1 roles, so the fact type is not elementary
unattached-roleErrorA role is not connected to an object type
reading-arity-mismatchErrorA reading's placeholders do not match the fact type's roles
duplicate-object-type-nameErrorTwo object types share a name
subtype-cycleErrorSubtype links form a cycle
subtype-kind-mismatchErrorAn entity type and a value type are linked by subtyping
ring-incompatible-rolesErrorA ring constraint spans roles with no common object type
set-constraint-lengthErrorCompared role sequences have different lengths
set-constraint-compatibilityErrorCompared roles are played by incompatible types
bad-frequency-rangeErrorA frequency or cardinality range is impossible
unused-object-typeWarningAn object type plays no roles and is not part of a subtype graph
frequency-is-uniquenessWarningA frequency of exactly 1 should be a uniqueness constraint
redundant-spanning-uniquenessWarningA spanning uniqueness constraint is implied by a narrower one
ambiguous-identification-pathWarningA subtype has several supertypes but no single identification path
implied-mandatoryWarningA subset constraint from mandatory roles makes the superset roles mandatory

Turn validation off with orm.validation.enabled if you want to sketch freely.

Command line

The model is a text file, so a build can check it. factum runs the same model, verbalizer, validator and mappers the editor does.

CommandDescription
factum validate <model>Report problems. --format github annotates a CI run; --strict treats warnings as errors
factum verbalize <model>FORML sentences. --population also reads the sample facts back
factum ddl <model>SQL DDL, with --dialect
factum graph <model>LadybugDB Cypher DDL
factum diff <before> <after>What the model now says. --format markdown, --exit-code
factum drift <model> <schema.sql>Where an existing database disagrees, with the reconciling statements
factum convert <input>Read or write any interchange format with --to
factum derive <table.csv>A first-draft model from example data

validate exits 1 on a blocking error, 2 on a usage or IO failure, and 0 otherwise, so a shell can tell a broken model from a broken invocation.

Pull request check

The bundled GitHub Action validates a model and comments with the sentences that changed.

- uses: Volland/factum-orm@v0
  with:
    model: model/domain.orm.json
    base: /tmp/base.orm.json   # the same file from the base branch
    strict: 'true'

MCP server

factum-mcp exposes the model to a coding agent over stdio, so Claude Code, Copilot or any MCP client can read the conceptual schema instead of inferring it from the tables.

{ "mcpServers": { "factum": { "command": "factum-mcp" } } }

Tools: read_model, verbalize_model, validate_model, generate_schema, diff_models, detect_drift, read_population and apply_model. Everything is read-only except the last, which validates first and refuses to write a model with blocking errors.