la-gram — the Linked.Archi Modeller¶
Full documentation
This page is an overview. Every part of la-gram — the canvas, validation, Git storage, the command
line — is documented in full at app.linked.archi/la-gram/docs.
Open the app at app.linked.archi/la-gram.
Source: linked-archi/la-gram.
la-gram is the Linked.Archi modeller. It authors architecture models directly in RDF, against the metamodels published on this site. It runs in the browser and as a desktop app for macOS, Windows and Linux. It is open source, under the Apache License 2.0.
The converters lift models out of tools that already exist. la-gram is the other way into the graph. The model is RDF from its first element, so the shapes published here run while it is drawn, not after an export.
The model is RDF¶
The model lives in an RDF store. The diagrams, the model tree, the saved file and a shared room are all views of that store, and a diagram holds nothing the store does not.
A model saves as TriG by default, in the named graphs of DD-15: the model resource, its semantics, its diagram geometry and its provenance. Every resource is named in the model's own namespace, in the layout that IRI Minting sets for every tool. Each edit is recorded: the concept gets its created and modified dates, and the edits up to each save form a PROV-O activity that names the person and la-gram at its version.
Detail: Models and views, File formats and vocabulary, Last changed.
The metamodel is data¶
la-gram has no code for any one modelling language. It reads a metamodel's
arch:Metamodel manifest and gives each part it names a job:
| Manifest property | What la-gram does with it |
|---|---|
arch:modelConcepts |
the element and relationship types, with their names, definitions and guidance |
arch:conceptClassification, arch:paletteGrouping, arch:relationshipProposalOrder |
the palette's groups, the relationship categories, and the order relationships are proposed in |
arch:notationSet, arch:usesNotationSet |
how each type is drawn: figure, colours and icon |
arch:formalRules, arch:architectureViewpointsRestrictions |
the SHACL shapes and relationship tables: what may be drawn, and what validation reports |
arch:architectureViewpoints, arch:viewpointLibrary |
the viewpoints a view can conform to |
arch:hasQuestionSet |
the model questions of the SPARQL tab, and the model checks |
arch:presentationContextScheme |
the audiences a view can be drawn for, with a name and a picture for each |
arch:referenceData |
the values a property can point to |
It skips the derivation rules, which need a SHACL-AF engine, and the reference models and deliverable templates, which feed document generation.
ArchiMate 4.0 and 3.2 are bundled, with Basic and the Architecture Decisions and Architecture Processes extensions. Any other metamodel in the catalogue loads on demand, and one of your own loads from an address or from files, as Build Your Own Metamodel describes. Build Your Own Modelling Tool explains the same components: a metamodel loader, a palette built from the taxonomy, and notation from a notation set. la-gram is one implementation of them.
Detail: Metamodels, Palette, Drawing on the canvas.
Validation while you draw¶
la-gram validates in a background worker, so editing never waits. It runs 300 ms after the last change and checks only what that change can affect:
- the loaded metamodels' SHACL shapes and the core shapes: types, cardinalities, values;
- the relationship tables: which types may join which;
- the shapes' SPARQL-based rules, such as ArchiMate's principles and the viewpoint rules;
- references to anything the model does not contain.
A rule reports a violation and cannot be switched off. Advice reports a warning or an info, and can be switched off one shape at a time. Model checks ask the metamodels' finding questions of the whole model on request. The rules are the ones Validation describes; nothing is coded again in the tool.
Detail: Validation.
Git and CI¶
la-gram opens, pulls and saves models on GitHub and GitLab. It merges three ways, with a choice on each conflict, and opens merge requests. For live work, a collaboration server shares a model in real-time rooms.
la-gram-git is its command line,
built from la-gram's own engine, so it says of a model file what la-gram would. check --base fails a change
that breaks a model file or adds a SHACL violation. diff --comment lists the change by element on the pull
or merge request. A merge driver merges model files by element. CI templates run both commands on every
request, on GitHub Actions and GitLab CI.
npx @linked.archi/la-gram-git check --base origin/main # every model file sound, no new violation
npx @linked.archi/la-gram-git diff origin/main --comment # the change by element, on the request
Detail: Git storage, la-gram-git, la-gram-git in CI.
Existing models and the converters¶
An ArchiMate Model Exchange file imports as ArchiMate 3.2, with its diagrams, styles and folders, and an ArchiMate 3.2 model exports to the format. The import names what it reads as the ArchiMate converter does, so one file, imported or converted, gives the same local names, folders and custom properties. A model can therefore move from the converter pipeline to la-gram and keep its IRIs, as long as it keeps its namespace. The RDF any converter writes opens in la-gram as a model.
Detail: Files, import and export.
Questions and agents¶
The SPARQL tab's Questions menu lists the model questions the loaded metamodels publish, grouped by stage and filtered by concern. A question whose answers are problems is a finding, and the model checks ask all of them. The agent skills read the same question sets, so an agent asks of the graph the questions la-gram asks of a model.
Detail: SPARQL and model questions.
Where it sits in the toolchain¶
la-gram writes the RDF contract the converters write: the
DD-15 named graphs, the
DD-41
IRI layout, arch:inModel on every concept, and conformance to its
metamodel through arch:modelConformsToMetamodel.
Its files merge with converted models into one dataset, the same shapes judge both, and the
agent skills query them alike. The flow end to end shows where the
parts meet, and Authoring at the Start of the Chain
argues why checking at authoring time matters. Everything else is in the
la-gram documentation.